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