00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172 #ifndef UVES_PFITS_H
00173 #define UVES_PFITS_H
00174
00175
00180
00181
00182
00183
00184
00185
00186 #include <uves_propertylist.h>
00187 #include <uves_chip.h>
00188 #include <cpl.h>
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199 #define UVES_DRS_ID "ESO PRO REC1 DRS ID"
00200
00201
00202
00203
00204
00205
00206 #define UVES_PRESCANX(new_format, chip) \
00207 ((!(new_format) && (chip) == UVES_CHIP_REDL) ? "ESO DET OUT4 PRSCX" : "ESO DET OUT1 PRSCX")
00208 #define UVES_PRESCANY(new_format, chip) \
00209 ((!(new_format) && (chip) == UVES_CHIP_REDL) ? "ESO DET OUT4 PRSCY" : "ESO DET OUT1 PRSCY")
00210
00211 #define UVES_OVRSCANX(new_format, chip) \
00212 ((!(new_format) && (chip) == UVES_CHIP_REDL) ? "ESO DET OUT4 OVSCX" : "ESO DET OUT1 OVSCX")
00213 #define UVES_OVRSCANY(new_format, chip) \
00214 ((!(new_format) && (chip) == UVES_CHIP_REDL) ? "ESO DET OUT4 OVSCY" : "ESO DET OUT1 OVSCY")
00215
00216
00217
00218
00219
00220 #define UVES_RON(new_format, chip) \
00221 ((!(new_format) && (chip) == UVES_CHIP_REDL) ? "ESO DET OUT4 RON" : "ESO DET OUT1 RON")
00222 #define UVES_GAIN(new_format, chip) \
00223 ((!(new_format) && (chip) == UVES_CHIP_REDL) ? "ESO DET OUT4 GAIN" : "ESO DET OUT1 GAIN")
00224 #define UVES_CONAD(new_format, chip) \
00225 ((!(new_format) && (chip) == UVES_CHIP_REDL) ? "ESO DET OUT4 CONAD" : "ESO DET OUT1 CONAD")
00226
00227
00228 #define UVES_NX(new_format, chip) \
00229 ((!(new_format) && (chip) == UVES_CHIP_REDL) ? "ESO DET OUT4 NX" : "ESO DET OUT1 NX")
00230 #define UVES_NY(new_format, chip) \
00231 ((!(new_format) && (chip) == UVES_CHIP_REDL) ? "ESO DET OUT4 NY" : "ESO DET OUT1 NY")
00232
00233
00234
00235
00236 #define UVES_EXPTIME "EXPTIME"
00237
00238
00239
00240
00241 #define UVES_UIT(new_format) "ESO DET WIN1 UIT1"
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254 #define UVES_QC_UIT(new_format, chip) \
00255 ((chip) == UVES_CHIP_REDL ? "ESO INS DET4 UIT" : "ESO INS DET1 UIT")
00256
00257
00258
00259
00260
00261
00262 #define UVES_TPL_START "ESO TPL START"
00263 #define UVES_TMSTART "TM-START"
00264
00265
00266
00267
00268
00269 #define UVES_AIRMASS_START "ESO TEL AIRM START"
00270 #define UVES_AIRMASS_END "ESO TEL AIRM END"
00271 #define UVES_AIRMASS "AIRMASS"
00272
00273
00274
00275
00276 #define UVES_IMAGETYP "IMAGETYP"
00277
00278
00279
00280
00281 #define UVES_UTC "UTC"
00282 #define UVES_UT "UT"
00283 #define UVES_ST "ST"
00284
00285
00286
00287
00288 #define UVES_GEOLAT "ESO TEL GEOLAT"
00289 #define UVES_GEOLON "ESO TEL GEOLON"
00290
00291
00292
00293
00294 #define UVES_EXTNAME "EXTNAME"
00295
00296
00297
00298
00299 #define UVES_MJDOBS "MJD-OBS"
00300 #define UVES_DATE "DATE"
00301
00302
00303 #define UVES_OS_EXPOI "OS-EXPOI"
00304
00305
00306
00307
00308 #define UVES_RA "RA"
00309 #define UVES_DEC "DEC"
00310
00311
00312
00313
00314 #define UVES_TARG_NAME "ESO OBS TARG NAME"
00315
00316
00317
00318
00319
00320 #define UVES_BINX "ESO DET WIN1 BINX"
00321 #define UVES_BINY "ESO DET WIN1 BINY"
00322
00323
00324
00325
00326 #define UVES_PIXELSCALE "ESO INS PIXSCALE"
00327
00328
00329
00330
00331
00332 #define UVES_ENCODER_REF1 "ESO INS SLIT3 X1ENC"
00333 #define UVES_ENCODER_REF2 "ESO INS SLIT3 X2ENC"
00334
00335
00336
00337
00338
00339 #define UVES_SLIT1NAME "ESO INS SLIT1 NAME"
00340 #define UVES_ARM(chip) (((chip) == UVES_CHIP_BLUE) ? "BLUE" : "RED")
00341 #define UVES_ARMID(chip) (((chip) == UVES_CHIP_BLUE) ? "b" : "r")
00342 #define UVES_DETECTOR(chip) (((chip) == UVES_CHIP_BLUE) ? "EEV" : "MIT-LL")
00343 #define UVES_SLITLENGTH(chip) \
00344 (((chip) == UVES_CHIP_BLUE) ? "ESO INS SLIT2 LEN" : "ESO INS SLIT3 LEN")
00345 #define UVES_SLITWIDTH(chip) \
00346 (((chip) == UVES_CHIP_BLUE) ? "ESO INS SLIT2 WID" : "ESO INS SLIT3 WID")
00347
00348
00349
00350
00351
00352 #define UVES_GRATWLEN(chip) \
00353 (((chip) == UVES_CHIP_BLUE) ? "ESO INS GRAT1 WLEN" : "ESO INS GRAT2 WLEN")
00354 #define UVES_GRATID(chip) \
00355 (((chip) == UVES_CHIP_BLUE) ? "ESO INS GRAT1 ID" : "ESO INS GRAT2 ID")
00356 #define UVES_GRATNAME(chip) \
00357 (((chip) == UVES_CHIP_BLUE) ? "ESO INS GRAT1 NAME" : "ESO INS GRAT2 NAME")
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367 #define UVES_CHIP_NAME(chip) \
00368 (((chip) == UVES_CHIP_REDL) ? "ESO DET CHIP2 NAME" : "ESO DET CHIP1 NAME")
00369 #define UVES_CHIP_ID(chip) \
00370 (((chip) == UVES_CHIP_REDL) ? "ESO DET CHIP2 ID" : "ESO DET CHIP1 ID")
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388 #define UVES_CCDID "ESO DET ID"
00389 #define UVES_PRESSURE "ESO INS SENS26 MEAN"
00390 #define UVES_TEMPCAM(chip) \
00391 (((chip) == UVES_CHIP_BLUE) ? "ESO INS TEMP1 MEAN" : "ESO INS TEMP2 MEAN")
00392
00393 #define UVES_HUMIDITY "ESO INS TEMP31 MEAN"
00394
00395
00396
00397
00398
00399
00400 #define UVES_ORD_PRED "NBORDI"
00401
00402 #define UVES_INSMODE "ESO INS MODE"
00403 #define UVES_INSPATH "ESO INS PATH"
00404
00405
00406
00407 #define UVES_PRO_DATAAVG "ESO PRO DATAAVG"
00408 #define UVES_PRO_DATARMS "ESO PRO DATARMS"
00409 #define UVES_PRO_DATAMED "ESO PRO DATAMED"
00410 #define UVES_DATAMIN "DATAMIN"
00411 #define UVES_DATAMAX "DATAMAX"
00412 #define UVES_DATAMEAN "DATAMEAN"
00413 #define UVES_DATAMED "DATAMED"
00414 #define UVES_DATARMS "DATARMS"
00415
00416
00417 #define UVES_OBJECT "OBJECT"
00418
00419
00420 #define UVES_TRACEID "TRACEID"
00421 #define UVES_TRACE_OFFSET "OFFSET"
00422 #define UVES_WINDOWNUMBER "WINDOW"
00423
00424
00425 #define UVES_FIRSTABSORDER "FABSORD"
00426 #define UVES_LASTABSORDER "LABSORD"
00427
00428
00429 #define UVES_BUNIT "BUNIT"
00430 #define UVES_CTYPE1 "CTYPE1"
00431 #define UVES_CTYPE2 "CTYPE2"
00432 #define UVES_CRVAL1 "CRVAL1"
00433 #define UVES_CRVAL2 "CRVAL2"
00434 #define UVES_CRPIX1 "CRPIX1"
00435 #define UVES_CRPIX2 "CRPIX2"
00436 #define UVES_CDELT1 "CDELT1"
00437 #define UVES_CDELT2 "CDELT2"
00438
00439 #define UVES_BITPIX "BITPIX"
00440 #define UVES_NAXIS "NAXIS"
00441 #define UVES_NAXIS1 "NAXIS1"
00442 #define UVES_NAXIS2 "NAXIS2"
00443 #define UVES_STARTX "STARTX"
00444 #define UVES_STARTY "STARTY"
00445
00446 #define UVES_OUT1NX "ESO DET OUT1 NX"
00447 #define UVES_OUT1NY "ESO DET OUT1 NY"
00448 #define UVES_OUT4NX "ESO DET OUT4 NX"
00449 #define UVES_OUT4NY "ESO DET OUT4 NY"
00450
00451 #define UVES_READ_SPEED "ESO DET READ SPEED"
00452
00453
00454 #define UVES_HS "HS"
00455
00456
00457 #define UVES_WSTART "WSTART"
00458 #define UVES_WEND "WEND"
00459
00460
00461 #define UVES_DATANCOM "ESO PRO DATANCOM"
00462 #define UVES_DATANCOM_OLD "ESO PRO QC DATANCOM"
00463
00464
00465 #define UVES_QC_BADPIXCORR "ESO QC BADPIX CORR"
00466
00467
00468 #define UVES_REDLEVEL "ESO PRO REDLEVEL"
00469
00470
00471
00472
00473
00474
00475
00476
00477 #define UVES_STATUS "ESO PRO REC1 STATUS"
00478
00479 #define UVES_START "ESO PRO REC1 START"
00480 #define UVES_STOP "ESO PRO REC1 STOP"
00481
00482 #define UVES_DPR_TECH "ESO DPR TECH"
00483 #define UVES_DPR_TYPE "ESO DPR TYPE"
00484 #define UVES_OCS_SIMCAL "ESO OCS SIMCAL"
00485
00486
00487
00488
00489
00490 #define FLAMES_NFLATS "NFLATS"
00491
00492 #define FLAMES_OBS_PLATE_ID "ESO INS SLIT3 PLATE"
00493 #define FLAMES_INS_SHUT09 "ESO INS SHUT9 ST"
00494 #define FLAMES_INS_SHUT10 "ESO INS SHUT10 ST"
00495 #define FLAMES_PLATEID "ESO INS1 TUMB POS"
00496 #define FLAMES_NEWPLATEID "ESO INS OBSPLATE"
00497 #define FLAMES_DIT "ESO DET WIN1 DIT1"
00498 #define FLAMES_CCFPOSMAX "ESO QC CCF POSMAX"
00499
00502
00503
00504
00505 bool uves_format_is_new(const uves_propertylist * plist);
00506 void
00507 uves_pfits_set_history_val(uves_propertylist *plist, const char *name, const char *format, ...)
00508 #ifdef __GNUC__
00509 __attribute__((format (printf, 3, 4)))
00510 #endif
00511 ;
00512
00513
00514
00515 int uves_pfits_get_slit3_x1encoder(const uves_propertylist * plist);
00516 int uves_pfits_get_slit3_x2encoder(const uves_propertylist * plist);
00517 double uves_pfits_get_startx(const uves_propertylist * plist);
00518 double uves_pfits_get_starty(const uves_propertylist * plist);
00519
00520 int uves_pfits_get_maxfibres(const uves_propertylist * plist);
00521 char uves_pfits_get_chipchoice(const uves_propertylist * plist);
00522 const char * uves_pfits_get_origfile(const uves_propertylist * plist);
00523 const char * uves_pfits_get_badpxframe(const uves_propertylist * plist);
00524 const char * uves_chop_eso_prefix(const char* key);
00525 const char * uves_pfits_get_rec1raw1name(const uves_propertylist * plist);
00526 const char * uves_pfits_get_arcfile(const uves_propertylist * plist);
00527 const char * uves_pfits_get_pipefile(const uves_propertylist * plist);
00528 const char * uves_pfits_get_templateid(const uves_propertylist * plist);
00529 const char * uves_pfits_get_pro_catg(const uves_propertylist * plist) ;
00530 const char * uves_pfits_get_dpr_catg(const uves_propertylist * plist) ;
00531 const char * uves_pfits_get_dpr_tech(const uves_propertylist * plist) ;
00532 const char * uves_pfits_get_dpr_type(const uves_propertylist * plist) ;
00533 const char * uves_pfits_get_date_obs(const uves_propertylist * plist) ;
00534
00535 const char* uves_pfits_get_chipid(const uves_propertylist * plist, enum uves_chip chip);
00536 const char* uves_pfits_get_chip_name(const uves_propertylist * plist, enum uves_chip chip);
00537 const char *uves_pfits_get_drs_id(const uves_propertylist * plist);
00538 const char *uves_pfits_get_tpl_start(const uves_propertylist * plist);
00539 const char* uves_pfits_get_insmode(const uves_propertylist * plist);
00540 const char* uves_pfits_get_inspath(const uves_propertylist * plist);
00541 const char *uves_pfits_get_targ_name(const uves_propertylist * plist);
00542 int uves_pfits_get_ocs_simcal(const uves_propertylist * plist);
00543 void uves_pfits_set_ocs_simcal(uves_propertylist * plist, int simcal);
00544
00545 int uves_pfits_get_prescanx(const uves_propertylist * plist, enum uves_chip chip);
00546 int uves_pfits_get_ovrscanx(const uves_propertylist * plist, enum uves_chip chip);
00547 int uves_pfits_get_prescany(const uves_propertylist * plist, enum uves_chip chip);
00548 int uves_pfits_get_ovrscany(const uves_propertylist * plist, enum uves_chip chip);
00549
00550 int uves_pfits_get_ordpred(const uves_propertylist * plist);
00551 int uves_pfits_get_binx(const uves_propertylist * plist);
00552 int uves_pfits_get_biny(const uves_propertylist * plist);
00553 double uves_pfits_get_mjdobs(const uves_propertylist * plist);
00554 double uves_pfits_get_utc(const uves_propertylist * plist);
00555 double uves_pfits_get_ra(const uves_propertylist * plist);
00556 double uves_pfits_get_dec(const uves_propertylist * plist);
00557 double uves_pfits_get_geolon(const uves_propertylist * plist);
00558 double uves_pfits_get_geolat(const uves_propertylist * plist);
00559 double uves_pfits_get_ron_adu(const uves_propertylist * plist, enum uves_chip chip);
00560 double uves_pfits_get_ambipress(const uves_propertylist * plist);
00561 double uves_pfits_get_gain(const uves_propertylist * plist, enum uves_chip chip);
00562 double uves_pfits_get_conad(const uves_propertylist * plist, enum uves_chip chip);
00563 double uves_pfits_get_exptime(const uves_propertylist * plist);
00564 double uves_pfits_get_uit(const uves_propertylist * plist);
00565 double uves_pfits_get_airmass_start(const uves_propertylist * plist);
00566 double uves_pfits_get_airmass_end(const uves_propertylist * plist);
00567 cpl_error_code uves_pfits_set_exptime(uves_propertylist *plist, double exptime);
00568 void uves_pfits_set_dec(uves_propertylist *plist, double dec);
00569 void uves_pfits_set_ra(uves_propertylist *plist, double ra);
00570 void uves_pfits_set_firstabsorder(uves_propertylist *plist, int first_abs_order);
00571 int uves_pfits_get_firstabsorder(const uves_propertylist * plist);
00572 void uves_pfits_set_lastabsorder(uves_propertylist *plist, int last_abs_order);
00573 int uves_pfits_get_lastabsorder(const uves_propertylist * plist);
00574 double uves_pfits_get_offset(const uves_propertylist * plist);
00575 void uves_pfits_set_traceid(uves_propertylist * plist, int trace_id);
00576 void uves_pfits_set_offset(uves_propertylist * plist, double trace_offset);
00577 int uves_pfits_get_traceid(const uves_propertylist * plist);
00578 void uves_pfits_set_windownumber(uves_propertylist * plist, int window_number);
00579 int uves_pfits_get_windownumber(const uves_propertylist * plist);
00580 cpl_error_code uves_pfits_set_data_average(uves_propertylist * plist, double average);
00581 cpl_error_code uves_pfits_set_data_stddev (uves_propertylist * plist, double stddev);
00582 cpl_error_code uves_pfits_set_data_median (uves_propertylist * plist, double median);
00583 cpl_error_code uves_pfits_set_data_min (uves_propertylist * plist, double min);
00584 cpl_error_code uves_pfits_set_data_max (uves_propertylist * plist, double max);
00585 cpl_error_code uves_pfits_set_object(uves_propertylist * plist, const char *object);
00586 cpl_error_code uves_pfits_set_ordpred(uves_propertylist *plist, int nord);
00587 cpl_error_code uves_pfits_set_badpixcorr(uves_propertylist * plist, const char *corr);
00588 cpl_error_code uves_pfits_set_redlevel(uves_propertylist * plist, const char *redlevel);
00589 cpl_error_code uves_pfits_set_status(uves_propertylist * plist, const char *status);
00590 cpl_error_code uves_pfits_set_starttime(uves_propertylist * plist, const char *start_time);
00591 cpl_error_code uves_pfits_set_stoptime(uves_propertylist * plist, const char *stop_time);
00592 int uves_pfits_get_datancom(const uves_propertylist * plist);
00593 const char* uves_pfits_get_ccdid(const uves_propertylist * plist);
00594 double uves_pfits_get_pressure(const uves_propertylist * plist);
00595 double uves_pfits_get_tempcam(const uves_propertylist * plist,enum uves_chip chip);
00596 double uves_pfits_get_humidity(const uves_propertylist * plist);
00597 double uves_pfits_get_slitlength_pixels(const uves_propertylist * plist, enum uves_chip chip);
00598 double uves_pfits_get_slitwidth(const uves_propertylist * plist, enum uves_chip chip);
00599 double uves_pfits_get_slitlength(const uves_propertylist * plist, enum uves_chip chip);
00600 double uves_pfits_get_gratwlen(const uves_propertylist * plist, enum uves_chip chip);
00601 const char* uves_pfits_get_gratid(const uves_propertylist * plist, enum uves_chip chip);
00602 const char* uves_pfits_get_gratname(const uves_propertylist * plist, enum uves_chip chip);
00603 const char* uves_pfits_get_readspeed(const uves_propertylist * plist);
00604
00605 const char* uves_pfits_get_slit1_name(const uves_propertylist * plist);
00606 const char* uves_pfits_get_bunit(const uves_propertylist * plist);
00607 const char* uves_pfits_get_ctype1(const uves_propertylist * plist);
00608 const char* uves_pfits_get_ctype2(const uves_propertylist * plist);
00609 int uves_pfits_get_bitpix(const uves_propertylist * plist);
00610 int uves_pfits_get_naxis(const uves_propertylist * plist);
00611 int uves_pfits_get_naxis1(const uves_propertylist * plist);
00612 int uves_pfits_get_naxis2(const uves_propertylist * plist);
00613 int uves_pfits_get_out1nx(const uves_propertylist * plist);
00614 int uves_pfits_get_out1ny(const uves_propertylist * plist);
00615 int uves_pfits_get_out4nx(const uves_propertylist * plist);
00616 int uves_pfits_get_out4ny(const uves_propertylist * plist);
00617 int uves_pfits_get_nx(const uves_propertylist * plist,enum uves_chip chip);
00618 int uves_pfits_get_ny(const uves_propertylist * plist,enum uves_chip chip);
00619
00620 double uves_pfits_get_crval1(const uves_propertylist * plist);
00621 double uves_pfits_get_crval2(const uves_propertylist * plist);
00622 double uves_pfits_get_crpix1(const uves_propertylist * plist);
00623 double uves_pfits_get_crpix2(const uves_propertylist * plist);
00624 double uves_pfits_get_cdelt1(const uves_propertylist * plist);
00625 double uves_pfits_get_cdelt2(const uves_propertylist * plist);
00626 double uves_pfits_get_wstart(const uves_propertylist * plist, int order);
00627 double uves_pfits_get_wend(const uves_propertylist * plist, int order);
00628 cpl_error_code uves_pfits_set_bunit(uves_propertylist * plist, const char *bunit);
00629 cpl_error_code uves_pfits_set_ctype1(uves_propertylist * plist, const char *ctype1);
00630 cpl_error_code uves_pfits_set_ctype2(uves_propertylist * plist, const char *ctype2);
00631 cpl_error_code uves_pfits_set_crval1(uves_propertylist * plist, double crval1);
00632 cpl_error_code uves_pfits_set_crval2(uves_propertylist * plist, double crval2);
00633 cpl_error_code uves_pfits_set_crpix1(uves_propertylist * plist, double crpix1);
00634 cpl_error_code uves_pfits_set_crpix2(uves_propertylist * plist, double crpix2);
00635 cpl_error_code uves_pfits_set_cdelt1(uves_propertylist * plist, double cdelt1);
00636 cpl_error_code uves_pfits_set_cdelt2(uves_propertylist * plist, double cdelt2);
00637 cpl_error_code uves_pfits_set_wstart(uves_propertylist * plist, int order, double wstart);
00638 cpl_error_code uves_pfits_set_wend(uves_propertylist * plist, int order, double wend);
00639
00640 void uves_pfits_set_hs(uves_propertylist * plist, int hs);
00641 void uves_flames_pfits_set_ccfposmax(uves_propertylist *plist, double ccfposmax);
00642 double uves_flames_pfits_get_dit(const uves_propertylist *raw_header);
00643 int uves_flames_pfits_get_plateid(const uves_propertylist *raw_header);
00644 void uves_flames_pfits_set_newplateid(uves_propertylist * plist, int plate_no);
00645 int uves_flames_pfits_get_nflats(const uves_propertylist * plist);
00646 const char * uves_flames_pfits_get_ident(const uves_propertylist * plist);
00647 const char * uves_flames_pfits_get_object(const uves_propertylist * plist);
00648 double uves_pfits_get_pixelscale(const uves_propertylist *plist);
00649
00650 #endif
00651