34 #include "omega_pfits.h"
35 #include "omega_stats.h"
36 #include "omega_utils.h"
38 static int omega_get_quadrant(
const char * extname,
int filtno);
56 static void omega_property_dump(cpl_property *property)
59 const char *name = cpl_property_get_name(property);
60 const char *comment = cpl_property_get_comment(property);
64 long size = cpl_property_get_size(property);
66 cpl_type type = cpl_property_get_type(property);
69 cpl_msg_info(cpl_func,
"Property at address %p", property);
70 cpl_msg_info(cpl_func,
"\tname : %p '%s'", name, name);
71 cpl_msg_info(cpl_func,
"\tcomment: %p '%s'", comment, comment);
72 cpl_msg_info(cpl_func,
"\ttype : %#09x", type);
73 cpl_msg_info(cpl_func,
"\tsize : %ld", size);
74 cpl_msg_info(cpl_func,
"\tvalue : ");
79 c = cpl_property_get_char(property);
81 fprintf(stderr,
"''");
83 fprintf(stderr,
"'%c'", c);
87 fprintf(stderr,
"%d", cpl_property_get_bool(property));
91 fprintf(stderr,
"%d", cpl_property_get_int(property));
95 fprintf(stderr,
"%ld", cpl_property_get_long(property));
99 fprintf(stderr,
"%.7g", cpl_property_get_float(property));
102 case CPL_TYPE_DOUBLE:
103 fprintf(stderr,
"%.15g", cpl_property_get_double(property));
106 case CPL_TYPE_STRING:
107 fprintf(stderr,
"'%s'", cpl_property_get_string(property));
111 fprintf(stderr,
"unknown.");
116 fprintf(stderr,
"\n");
129 const char * omega_pfits_get_date_obs(
const cpl_propertylist * plist)
131 return (
const char *) cpl_propertylist_get_string(plist,
"DATE-OBS") ;
144 return (
const char *) cpl_propertylist_get_string(plist,
"ARCFILE");
156 if (cpl_propertylist_has(plist,
"ESO DET DIT") == 1)
157 return cpl_propertylist_get_double(plist,
"ESO DET DIT");
171 return (
const char *) cpl_propertylist_get_string(plist,
"ESO TPL ID") ;
183 return cpl_propertylist_get_double(plist,
"MJD-OBS") ;
196 if(cpl_propertylist_has(plist,
"EXPTIME")){
197 return cpl_propertylist_get_double(plist,
"EXPTIME") ;
219 if(cpl_propertylist_has(plist,
"ESO DET CHIP LIVE") == 0){
225 val = cpl_propertylist_get_bool(plist,
"ESO DET CHIP LIVE");
226 if (cpl_error_get_code() == CPL_ERROR_NONE) {
261 if(strcmp(chip,
"ESO_CCD_#65" )==0 ||
262 strcmp(chip,
"ESO_CCD_#66" )==0 ||
263 strcmp(chip,
"ESO_CCD_#67" )==0 ||
264 strcmp(chip,
"ESO_CCD_#68" )==0 ||
265 strcmp(chip,
"ESO_CCD_#69" )==0 ||
266 strcmp(chip,
"ESO_CCD_#70" )==0 ||
267 strcmp(chip,
"ESO_CCD_#71" )==0 ||
268 strcmp(chip,
"ESO_CCD_#72" )==0 ||
269 strcmp(chip,
"ESO_CCD_#73" )==0 ||
270 strcmp(chip,
"ESO_CCD_#74" )==0 ||
271 strcmp(chip,
"ESO_CCD_#75" )==0 ||
272 strcmp(chip,
"ESO_CCD_#76" )==0 ||
273 strcmp(chip,
"ESO_CCD_#77" )==0 ||
274 strcmp(chip,
"ESO_CCD_#78" )==0 ||
275 strcmp(chip,
"ESO_CCD_#79" )==0 ||
276 strcmp(chip,
"ESO_CCD_#80" )==0){
280 else if (strcmp(chip,
"ESO_CCD_#81" )==0 ||
281 strcmp(chip,
"ESO_CCD_#82" )==0 ||
282 strcmp(chip,
"ESO_CCD_#83" )==0 ||
283 strcmp(chip,
"ESO_CCD_#84" )==0 ||
284 strcmp(chip,
"ESO_CCD_#85" )==0 ||
285 strcmp(chip,
"ESO_CCD_#86" )==0 ||
286 strcmp(chip,
"ESO_CCD_#87" )==0 ||
287 strcmp(chip,
"ESO_CCD_#88" )==0 ||
288 strcmp(chip,
"ESO_CCD_#89" )==0 ||
289 strcmp(chip,
"ESO_CCD_#90" )==0 ||
290 strcmp(chip,
"ESO_CCD_#91" )==0 ||
291 strcmp(chip,
"ESO_CCD_#92" )==0 ||
292 strcmp(chip,
"ESO_CCD_#93" )==0 ||
293 strcmp(chip,
"ESO_CCD_#94" )==0 ||
294 strcmp(chip,
"ESO_CCD_#95" )==0 ||
295 strcmp(chip,
"ESO_CCD_#96" )==0){
337 switch (orientation) {
704 if( (cpl_propertylist_has(plist,
"ESO TEL AIRM START") == 1) &&
705 (cpl_propertylist_has(plist,
"ESO TEL AIRM END") == 1 ) ) {
706 airm0 = cpl_propertylist_get_double(plist,
"ESO TEL AIRM START");
707 airm1 = cpl_propertylist_get_double(plist,
"ESO TEL AIRM END");
709 *airm = (airm0 + airm1)/2;
711 else if ( (cpl_propertylist_has(plist,
"AIRMSTRT") == 1) &&
712 (cpl_propertylist_has(plist,
"AIRMEND")) == 1 ){
713 airm0 = cpl_propertylist_get_double(plist,
"AIRMSTRT");
714 airm1 = cpl_propertylist_get_double(plist,
"AIRMEND");
716 *airm = (airm0 + airm1)/2;
718 else if (cpl_propertylist_has(plist,
"AIRMASS") == 1){
719 *airm = cpl_propertylist_get_double(plist,
"AIRMASS");
751 if (plist1 == NULL) {
752 cpl_msg_error(cpl_func,
"Main header is empty");
755 if( (cpl_propertylist_has(plist1,
"ESO TEL AIRM START") == 1) &&
756 (cpl_propertylist_has(plist1,
"ESO TEL AIRM END") == 1 ) ){
757 *start = cpl_propertylist_get_double(plist1,
"ESO TEL AIRM START");
758 *end = cpl_propertylist_get_double(plist1,
"ESO TEL AIRM END");
760 else if ( (cpl_propertylist_has(plist1,
"AIRMSTRT") == 1) &&
761 (cpl_propertylist_has(plist1,
"AIRMEND")) == 1 ){
762 *start = cpl_propertylist_get_double(plist1,
"AIRMSTRT");
763 *end = cpl_propertylist_get_double(plist1,
"AIRMEND");
765 else if (cpl_propertylist_has(plist1,
"AIRMASS") == 1) {
766 *start = cpl_propertylist_get_double(plist1,
"AIRMASS");
788 const char *INSTRUMENT = NULL;
789 cpl_propertylist *plist;
793 cpl_msg_error(cpl_func,
"NULL frame");
797 plist = cpl_propertylist_load_regexp(cpl_frame_get_filename(fr), 0,
800 cpl_msg_error (cpl_func,
"Cannot load main header for %s",cpl_frame_get_filename(fr));
804 INSTRUMENT = cpl_propertylist_get_string(plist,
"INSTRUME");
806 cpl_msg_error(cpl_func,
"Cannot find INSTRUME keyword in header");
807 cpl_propertylist_delete(plist);
811 if(strcmp(
"OMEGA", INSTRUMENT)==0){
812 cpl_propertylist_delete(plist);
815 else if(strcmp(
"WFI", INSTRUMENT)==0){
816 cpl_propertylist_delete(plist);
820 cpl_propertylist_delete(plist);
837 const char *INSTRUMENT = NULL;
841 cpl_msg_error(cpl_func,
"NULL property list");
846 INSTRUMENT = cpl_propertylist_get_string(plist,
"INSTRUME");
848 cpl_msg_warning(cpl_func,
"Cannot find INSTRUME keyword in header");
852 if(strcmp(
"OMEGA", INSTRUMENT)==0){
855 else if(strcmp(
"WFI", INSTRUMENT)==0){
875 const char *ronstring =
"ESO DET OUT1 RON";
881 cpl_msg_error(cpl_func,
"Extension header is empty");
884 if (cpl_propertylist_has(plist, ronstring) == 1) {
885 *rn = cpl_propertylist_get_double(plist, ronstring);
887 else if (cpl_propertylist_has(plist,
"RON") == 1) {
888 *rn = cpl_propertylist_get_double(plist,
"RON");
892 for(i=1; i<= 32; i++) {
894 sprintf(name,
"ESO DET OUT%d RON", i);
896 if (cpl_propertylist_has(plist, name) == 1) {
897 *rn = cpl_propertylist_get_double(plist, name);
915 cpl_propertylist *plist;
918 cpl_msg_warning(cpl_func,
"Frame is NULL");
922 plist = cpl_propertylist_load_regexp(cpl_frame_get_filename(frame), xn,
926 cpl_msg_warning(cpl_func,
"Cannot load property list");
930 if( cpl_propertylist_has(plist,
"ESO DRS OVERSCAN METHOD") == 1 ){
931 value = cpl_propertylist_get_int(plist,
"ESO DRS OVERSCAN METHOD");
934 cpl_msg_warning(cpl_func,
"Cannot find overscan method in header");
965 cpl_msg_warning(cpl_func,
"Header is NULL");
967 else if (cpl_propertylist_has(plist,
"ESO DET OUT GAIN") == 1) {
968 *gain = cpl_propertylist_get_double(plist,
"ESO DET OUT GAIN");
970 else if (cpl_propertylist_has(plist,
"GAIN") == 1) {
971 *gain = cpl_propertylist_get_double(plist,
"GAIN");
975 for(i=1; i<= 32; i++){
977 sprintf(name,
"ESO DET OUT%d GAIN", i);
979 if (cpl_propertylist_has(plist, name) == 1) {
980 *gain = cpl_propertylist_get_double(plist, name);
1007 if (plist == NULL) {
1008 cpl_msg_error(cpl_func,
"Header is empty");
1010 else if (cpl_propertylist_has(plist,
"ESO DET OUT CONAD") == 1) {
1011 *conad = cpl_propertylist_get_double(plist,
"ESO DET OUT CONAD");
1013 else if (cpl_propertylist_has(plist,
"CONAD") == 1) {
1014 *conad = cpl_propertylist_get_double(plist,
"CONAD");
1018 for(i=1; i<= 32; i++){
1020 sprintf(name,
"ESO DET OUT%d CONAD", i);
1022 if (cpl_propertylist_has(plist, name) == 1) {
1023 *conad = cpl_propertylist_get_double(plist, name);
1047 int nextensions = 32;
1048 const char *chipid = NULL;
1051 if (plist == NULL) {
1052 cpl_msg_error(cpl_func,
"NULL input property list");
1060 for(i=1; i<= nextensions; i++) {
1062 if (cpl_propertylist_has(plist,
"ESO DET CHIP ID") == 1) {
1063 chipid = cpl_propertylist_get_string(plist,
"ESO DET CHIP ID");
1067 sprintf(name,
"ESO DET CHIP%d ID", i);
1069 if (cpl_propertylist_has(plist, name) == 1) {
1070 chipid = cpl_propertylist_get_string(plist, name);
1090 if (cpl_propertylist_has(plist,
"EXTNAME") == 0){
1094 return cpl_propertylist_get_string(plist,
"EXTNAME");
1111 const char *extn1 = NULL;
1112 const char *extn2 = NULL;
1114 if(plist1 == NULL || plist2 == NULL){
1115 cpl_msg_error(cpl_func,
"NULL input property list(s)");
1119 if((cpl_propertylist_has(plist1,
"EXTNAME") == 1)
1120 && (cpl_propertylist_has(plist2,
"EXTNAME") == 1)) {
1122 extn1 = cpl_propertylist_get_string(plist1,
"EXTNAME");
1123 extn2 = cpl_propertylist_get_string(plist2,
"EXTNAME");
1124 return strcmp(extn1, extn2);
1157 int has_fringes = 0;
1164 double wave_central = 0.0f;
1166 const char *filtid =
"none";
1167 const char *filtname =
"none";
1168 const char *reffiltname =
"none";
1169 const char *referr =
"none";
1170 const char *extname =
"none";
1173 cpl_propertylist *list;
1176 cpl_msg_error(cpl_func,
"Main header is empty");
1180 list = cpl_propertylist_new();
1182 if (cpl_propertylist_has(main,
"ESO INS FILT ID") == 1) {
1183 filtid = cpl_propertylist_get_string(main,
"ESO INS FILT ID");
1184 filtname = cpl_propertylist_get_string(main,
"ESO INS FILT NAME");
1186 else if (cpl_propertylist_has(main,
"ESO INS FILT1 ID") == 1) {
1187 filtid = cpl_propertylist_get_string(main,
"ESO INS FILT1 ID");
1188 filtname = cpl_propertylist_get_string(main,
"ESO INS FILT1 NAME");
1190 else if (cpl_propertylist_has(main,
"FILT_ID") == 1) {
1191 filtid = cpl_propertylist_get_string(main,
"FILT_ID");
1192 filtname = cpl_propertylist_get_string(main,
"FILT_NAME");
1197 cpl_msg_warning(cpl_func,
"Cannot find filter information in header");
1201 if (cpl_propertylist_has(main,
"EXTNAME") == 1) {
1202 extname= cpl_propertylist_get_string(main,
"EXTNAME");
1206 cpl_msg_debug(cpl_func,
"Cannot find extension name in header");
1209 if (cpl_propertylist_has(main,
"ESO INS FILT1 NO") == 1) {
1210 filtno= cpl_propertylist_get_int(main,
"ESO INS FILT1 NO");
1218 cpl_propertylist_append_string(list,
"FILT_ID", filtid);
1222 for(i=0; i<n; i++) {
1228 check = strcmp(
"PS7", filtid);
1229 check1 = strcmp(
"u_SDSS", filtname);
1230 if(check == 0 || check1 == 0) {
1231 reffiltname =
"SloanU";
1232 referr =
"SloanU_err";
1233 wave_central = 3540.;
1238 check = strcmp(
"PS2", filtid);
1239 check1 = strcmp(
"g_SDSS", filtname);
1240 if(check == 0 || check1 == 0) {
1241 reffiltname =
"SloanG";
1242 referr =
"SloanG_err";
1243 wave_central = 4750.;
1248 check = strcmp(
"PS4", filtid);
1249 check1 = strcmp(
"r_SDSS", filtname);
1250 if(check == 0 || check1 == 0) {
1251 reffiltname =
"SloanR";
1252 referr =
"SloanR_err";
1253 wave_central = 6250.;
1258 check = strcmp(
"PS3", filtid);
1259 check1 = strcmp(
"i_SDSS", filtname);
1260 if(check == 0 || check1 == 0) {
1261 reffiltname =
"SloanI";
1262 referr =
"SloanI_err";
1263 wave_central = 7560.;
1268 check = strcmp(
"PS1", filtid);
1269 check1 = strcmp(
"z_SDSS", filtname);
1270 if(check == 0 || check1 == 0) {
1271 reffiltname =
"SloanZ";
1272 referr =
"SloanZ_err";
1273 wave_central = 8800.;
1278 check = strcmp(
"PS9", filtid);
1279 check1 = strcmp(
"B_JOHN", filtname);
1280 if(check == 0 || check1 == 0) {
1281 reffiltname =
"JohnsonB";
1282 referr =
"JohnsonB_err";
1283 wave_central = 4390;
1288 check = strcmp(
"PS10", filtid);
1289 check1 = strcmp(
"V_JOHN", filtname);
1290 if(check == 0 || check1 == 0) {
1291 reffiltname =
"JohnsonV";
1292 referr =
"JohnsonV_err";
1293 wave_central = 5510;
1298 check = strcmp(
"PS5", filtid);
1299 check1 = strcmp(
"v_STRM", filtname);
1300 if(check == 0 || check1 == 0) {
1301 wave_central = 4120.;
1319 check = strcmp(
"PS6", filtid);
1320 check1 = strcmp(
"NB_852_861_869_878", filtname);
1321 if(check == 0 || check1 == 0) {
1327 check = strcmp(
"PS14", filtid);
1328 check1 = strcmp(
"NB_454_494_533_575", filtname);
1329 if(check == 0 || check1 == 0) {
1335 check = strcmp(
"PS22", filtid);
1336 check1 = strcmp(
"NB_617_710_755_817", filtname);
1337 if(check == 0 || check1 == 0) {
1343 check = strcmp(
"PS59", filtid);
1344 check1 = strcmp(
"Dummy_2", filtname);
1345 if(check == 0 || check1 == 0) {
1351 check = strcmp(
"PS60", filtid);
1352 check1 = strcmp(
"Dummy_1", filtname);
1353 if(check == 0 || check1 == 0) {
1359 check = strcmp(
"opaque", filtid);
1360 check1 = strcmp(
"opaque", filtname);
1361 if(check == 0 || check1 == 0) {
1368 check = strcmp(
"calib", filtid);
1369 check1 = strcmp(
"u_g_r_i_SDSS", filtname);
1370 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 1) {
1371 reffiltname =
"SloanU";
1372 referr =
"SloanU_err";
1373 wave_central = 3540.;
1379 check = strcmp(
"calib", filtid);
1380 check1 = strcmp(
"u_g_r_i_SDSS", filtname);
1381 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 4) {
1382 reffiltname =
"SloanG";
1383 referr =
"SloanG_err";
1384 wave_central = 4750.;
1390 check = strcmp(
"calib", filtid);
1391 check1 = strcmp(
"u_g_r_i_SDSS", filtname);
1392 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 3) {
1393 reffiltname =
"SloanR";
1394 referr =
"SloanR_err";
1395 wave_central = 6250.;
1400 check = strcmp(
"calib", filtid);
1401 check1 = strcmp(
"u_g_r_i_SDSS", filtname);
1402 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 2) {
1403 reffiltname =
"SloanI";
1404 referr =
"SloanI_err";
1405 wave_central = 7560.;
1413 check = strcmp(
"PS11", filtid);
1414 check1 = strcmp(
"H_ALPHA", filtname);
1415 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 1) {
1416 reffiltname =
"H_ALPHA";
1417 referr =
"H_ALPHA_err";
1418 wave_central = 6791.;
1424 check = strcmp(
"PS11", filtid);
1425 check1 = strcmp(
"H_ALPHA", filtname);
1426 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 4) {
1427 reffiltname =
"H_ALPHA";
1428 referr =
"H_ALPHA_err";
1429 wave_central = 6590.;
1435 check = strcmp(
"PS11", filtid);
1436 check1 = strcmp(
"H_ALPHA", filtname);
1437 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 3) {
1438 reffiltname =
"H_ALPHA";
1439 referr =
"H_ALPHA_err";
1440 wave_central = 6660.;
1445 check = strcmp(
"PS11", filtid);
1446 check1 = strcmp(
"H_ALPHA", filtname);
1447 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 2) {
1448 reffiltname =
"H_ALPHA";
1449 referr =
"H_ALPHA_err";
1450 wave_central = 6726.;
1457 check = strcmp(
"PS30", filtid);
1458 check1 = strcmp(
"NB_659", filtname);
1459 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 1) {
1460 reffiltname =
"NB_659";
1461 referr =
"NB_659_err";
1462 wave_central = 6586.;
1468 check = strcmp(
"PS30", filtid);
1469 check1 = strcmp(
"NB_659", filtname);
1470 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 4) {
1471 reffiltname =
"NB_659";
1472 referr =
"NB_659_err";
1473 wave_central = 6593.;
1479 check = strcmp(
"PS30", filtid);
1480 check1 = strcmp(
"NB_659", filtname);
1481 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 3) {
1482 reffiltname =
"NB_659";
1483 referr =
"NB_659_err";
1484 wave_central = 6586.;
1489 check = strcmp(
"PS30", filtid);
1490 check1 = strcmp(
"NB_659", filtname);
1491 if((check == 0 || check1 == 0) && omega_get_quadrant(extname, filtno) == 2) {
1492 reffiltname =
"NB_659";
1493 referr =
"NB_659_err";
1494 wave_central = 6586.;
1501 cpl_propertylist_append_string(list,
"FILT_NAME", filtname);
1502 cpl_propertylist_append_string(list,
"REF_MAG_ID", reffiltname);
1503 cpl_propertylist_append_string(list,
"REF_MAG_ID_ERR", referr);
1504 cpl_propertylist_append_double(list,
"CWL", wave_central);
1505 cpl_propertylist_append_int(list,
"HAS_FRINGES", has_fringes);
1532 to = cpl_propertylist_new();
1533 cpl_propertylist_append(to, from);
1537 n = cpl_propertylist_get_size(from);
1538 for (i=0; i < n; i++){
1539 const cpl_property *pro = cpl_propertylist_get_const(from, i);
1540 const char *name = cpl_property_get_name(pro);
1541 if(cpl_propertylist_has(to, name) == 1)
1542 cpl_propertylist_erase(to, name);
1544 cpl_propertylist_copy_property(to, from, name);
1574 const char *readkeys =
"|ESO DET OUT[0-9]|ESO DET OUT|";
1575 cpl_vector *sregion;
1589 for(i=1; i<= next; i++) {
1590 sprintf(name,
"ESO DET OUT%d INDEX", i);
1591 if(cpl_propertylist_has(plist, name) == 1) {
1592 index = cpl_propertylist_get_int (plist, name);
1598 cpl_msg_warning(cpl_func,
"Cannot find HIERARCH ESO DET OUT# INDEX");
1604 sprintf(name,
"ESO DET OUT%d PRSCX", index);
1605 if(cpl_propertylist_has(plist, name) == 1){
1606 prscx = cpl_propertylist_get_int (plist, name);
1607 sprintf(name,
"ESO DET OUT%d PRSCY", index);
1608 prscy = cpl_propertylist_get_int (plist, name);
1609 sprintf(name,
"ESO DET OUT%d OVSCX", index);
1610 ovscx = cpl_propertylist_get_int (plist, name);
1611 sprintf(name,
"ESO DET OUT%d OVSCY", index);
1612 ovscy = cpl_propertylist_get_int (plist, name);
1618 sregion = cpl_vector_new(4);
1619 cpl_vector_set(sregion, 0, prscx);
1620 cpl_vector_set(sregion, 1, prscy);
1621 cpl_vector_set(sregion, 2, ovscx);
1622 cpl_vector_set(sregion, 3, ovscy);
1640 double offset = 0.0;
1642 if(cpl_propertylist_has(plist,
"ESO TEL TARG OFFSETSIZE") == 0)
1645 offset = cpl_propertylist_get_double(plist,
"ESO TEL TARG OFFSETSIZE");
1661 double offset = 0.0;
1663 if(cpl_propertylist_has(plist,
"ESO TEL TARG OFFSETSIZEX") == 0)
1666 offset = cpl_propertylist_get_double(plist,
"ESO TEL TARG OFFSETSIZEX");
1682 double offset = 0.0;
1684 if(cpl_propertylist_has(plist,
"ESO TEL TARG OFFSETSIZEY") == 0)
1687 offset = cpl_propertylist_get_double(plist,
"ESO TEL TARG OFFSETSIZEY");
1703 double offset = 0.0;
1705 if(cpl_propertylist_has(plist,
"ESO TEL TARG OFFSETALPHA") == 0)
1708 offset = cpl_propertylist_get_double(plist,
"ESO TEL TARG OFFSETALPHA");
1724 double offset = 0.0;
1726 if(cpl_propertylist_has(plist,
"ESO TEL TARG OFFSETDELTA") == 0)
1729 offset = cpl_propertylist_get_double(plist,
"ESO TEL TARG OFFSETDELTA");
1746 if(cpl_propertylist_has(plist,
"CD1_1") == 0)
1749 return(cpl_propertylist_get_double(plist,
"CD1_1"));
1764 if(cpl_propertylist_has(plist,
"CD1_2") == 0)
1767 return(cpl_propertylist_get_double(plist,
"CD1_2"));
1783 if(cpl_propertylist_has(plist,
"CD2_1") == 0)
1786 return(cpl_propertylist_get_double(plist,
"CD2_1"));
1802 if(cpl_propertylist_has(plist,
"CD2_2") == 0)
1805 return(cpl_propertylist_get_double(plist,
"CD2_2"));
1821 if(cpl_propertylist_has(plist,
"CDELT2") == 0)
1824 return(cpl_propertylist_get_double(plist,
"CDELT2"));
1854 cpl_msg_info(cpl_func,
"Using default chip sizes");
1857 x1 = naxis1 - ovscx;
1858 y1 = naxis2 - ovscy;
1866 naxis1 = cpl_propertylist_get_int(plist,
"NAXIS1");
1867 naxis2 = cpl_propertylist_get_int(plist,
"NAXIS2");
1871 prscx = cpl_vector_get(vec,0);
1872 prscy = cpl_vector_get(vec,1);
1873 ovscx = cpl_vector_get(vec,2);
1874 ovscy = cpl_vector_get(vec,3);
1878 x1 = naxis1 - ovscx;
1879 y1 = naxis2 - ovscy;
1898 static int omega_get_quadrant(
const char * extname,
int filtno)
1913 if (extname == NULL){
1916 else if((strcmp(
"ESO_CCD_#96", extname)== 0) ||
1917 (strcmp(
"ESO_CCD_#95", extname)== 0) ||
1918 (strcmp(
"ESO_CCD_#94", extname)== 0) ||
1919 (strcmp(
"ESO_CCD_#93", extname)== 0) ||
1920 (strcmp(
"ESO_CCD_#88", extname)== 0) ||
1921 (strcmp(
"ESO_CCD_#87", extname)== 0) ||
1922 (strcmp(
"ESO_CCD_#86", extname)== 0) ||
1923 (strcmp(
"ESO_CCD_#85", extname)== 0)) {
1924 if(filtno>=1 && filtno<=6){
1927 else if (filtno>=7 && filtno<=12){
1931 else if((strcmp(
"ESO_CCD_#92", extname)== 0) ||
1932 (strcmp(
"ESO_CCD_#91", extname)== 0) ||
1933 (strcmp(
"ESO_CCD_#90", extname)== 0) ||
1934 (strcmp(
"ESO_CCD_#89", extname)== 0) ||
1935 (strcmp(
"ESO_CCD_#84", extname)== 0) ||
1936 (strcmp(
"ESO_CCD_#83", extname)== 0) ||
1937 (strcmp(
"ESO_CCD_#82", extname)== 0) ||
1938 (strcmp(
"ESO_CCD_#81", extname)== 0)) {
1939 if(filtno>=1 && filtno<=6){
1942 else if (filtno>=7 && filtno<=12){
1946 else if((strcmp(
"ESO_CCD_#76", extname)== 0) ||
1947 (strcmp(
"ESO_CCD_#75", extname)== 0) ||
1948 (strcmp(
"ESO_CCD_#74", extname)== 0) ||
1949 (strcmp(
"ESO_CCD_#73", extname)== 0) ||
1950 (strcmp(
"ESO_CCD_#68", extname)== 0) ||
1951 (strcmp(
"ESO_CCD_#67", extname)== 0) ||
1952 (strcmp(
"ESO_CCD_#66", extname)== 0) ||
1953 (strcmp(
"ESO_CCD_#65", extname)== 0)) {
1954 if(filtno>=1 && filtno<=6){
1957 else if (filtno>=7 && filtno<=12){
1961 else if((strcmp(
"ESO_CCD_#80", extname)== 0) ||
1962 (strcmp(
"ESO_CCD_#79", extname)== 0) ||
1963 (strcmp(
"ESO_CCD_#78", extname)== 0) ||
1964 (strcmp(
"ESO_CCD_#77", extname)== 0) ||
1965 (strcmp(
"ESO_CCD_#72", extname)== 0) ||
1966 (strcmp(
"ESO_CCD_#71", extname)== 0) ||
1967 (strcmp(
"ESO_CCD_#70", extname)== 0) ||
1968 (strcmp(
"ESO_CCD_#69", extname)== 0)){
1969 if(filtno>=1 && filtno<=6){
1972 else if (filtno>=7 && filtno<=12){