48 #include <uves_pfits.h>
50 #include <uves_utils.h>
51 #include <uves_utils_wrappers.h>
52 #include <uves_dump.h>
53 #include <uves_error.h>
55 #include <irplib_utils.h>
82 "Error writing keyword '%s'", UVES_CD1);
98 "Error writing keyword '%s'", UVES_CD11);
113 "Error writing keyword '%s'", UVES_CD12);
128 "Error writing keyword '%s'", UVES_CD21);
143 "Error writing keyword '%s'", UVES_CD22);
160 "Error getting %s", UVES_ENCODER_REF1);
178 "Error getting %s",UVES_ENCODER_REF2);
196 check(uves_get_property_value(plist,
"MAXFIBRES",
197 CPL_TYPE_INT, &result),
198 "Error reading MAXFIBRES");
216 "Error getting CHIPCHOICE");
232 const char* result=NULL;
234 check(uves_get_property_value(plist,
"BADPXFRAME",
235 CPL_TYPE_STRING, &result),
236 "Error reading BADPXFRAME");
255 check(uves_get_property_value(plist,
"ESO INS SENS26 MEAN",
256 CPL_TYPE_DOUBLE, &result),
257 "Error reading ESO INS SENS26 MEAN");
275 const char* result=NULL;
278 check(uves_get_property_value(plist,
"ARCFILE",
279 CPL_TYPE_STRING, &result),
280 "Error reading ARCFILE");
297 const char* result=NULL;
300 "Error getting IDENT");
317 const char* result=NULL;
320 "Error getting OBJECT");
337 const char* result=NULL;
339 check(uves_get_property_value(plist,
"ORIGFILE",
340 CPL_TYPE_STRING, &result),
341 "Error reading ORIGFILE");
358 const char* result=NULL;
361 check(uves_get_property_value(plist,
"PIPEFILE",
362 CPL_TYPE_STRING, &result),
363 "Error reading PIPEFILE");
382 const char* result=NULL;
384 check(uves_get_property_value(plist,
"ESO PRO REC1 RAW1 NAME",
385 CPL_TYPE_STRING, &result),
386 "Error reading ESO PRO REC1 RAW1 NAME");
401 const char* result=NULL;
403 check(uves_get_property_value(plist,
"ESO TPL ID",
404 CPL_TYPE_STRING, &result),
405 "Error reading ESO TPL ID");
424 const char* result=NULL;
425 check(uves_get_property_value(plist,
"DATE-OBS",
426 CPL_TYPE_STRING, &result),
427 "Error reading DATE-OBS");
442 const char* result=NULL;
444 check(uves_get_property_value(plist, UVES_DPR_CATG,
445 CPL_TYPE_STRING, &result),
446 "Error reading %s", UVES_DPR_CATG);
463 check( uves_get_property_value(plist, UVES_OCS_SIMCAL, CPL_TYPE_INT, &returnvalue),
464 "Error reading keyword '%s'", UVES_OCS_SIMCAL);
480 "Error writing keyword '%s'", UVES_OCS_SIMCAL);
496 const char* result=NULL;
498 check(uves_get_property_value(plist,
"ESO PRO CATG",
499 CPL_TYPE_STRING, &result),
500 "Error reading ESO PRO CATG");
515 const char* result=NULL;
517 check( uves_get_property_value(plist, UVES_DPR_TECH,
518 CPL_TYPE_STRING, &result),
519 "Error reading %s", UVES_DPR_TECH);
534 const char* result=NULL;
537 check( uves_get_property_value(plist, UVES_DPR_TYPE,
538 CPL_TYPE_STRING, &result),
539 "Error reading %s", UVES_DPR_TYPE);
555 double mjd_obs = 0.0;
558 "Could not read observation date");
562 return (mjd_obs > 55018.0);
575 double mjd_obs = 0.0;
578 "Could not read observation date");
582 return (mjd_obs > 53096.0);
600 "Error determining FITS header format");
602 check( uves_get_property_value(plist, UVES_PRESCANX(new_format, chip),
603 CPL_TYPE_INT, &returnvalue),
604 "Error reading keyword %s", UVES_PRESCANX(new_format, chip));
621 const char* returnvalue =
"";
623 check( uves_get_property_value(plist, UVES_CHIP_ID(chip), CPL_TYPE_STRING, &returnvalue),
624 "Error reading keyword %s", UVES_CHIP_ID(chip));
641 const char* returnvalue =
"";
643 check( uves_get_property_value(plist, UVES_CHIP_NAME(chip), CPL_TYPE_STRING, &returnvalue),
644 "Error reading keyword %s", UVES_CHIP_NAME(chip));
665 "Error determining FITS header format");
667 check( uves_get_property_value(plist, UVES_OVRSCANX(new_format, chip),
668 CPL_TYPE_INT, &returnvalue),
669 "Error reading keyword %s", UVES_OVRSCANX(new_format, chip));
691 "Error determining FITS header format");
693 check( uves_get_property_value(plist, UVES_PRESCANY(new_format, chip),
694 CPL_TYPE_INT, &returnvalue),
695 "Error reading keyword %s", UVES_PRESCANY(new_format, chip));
716 "Error determining FITS header format");
718 check( uves_get_property_value(plist, UVES_OVRSCANY(new_format, chip),
719 CPL_TYPE_INT, &returnvalue),
720 "Error reading keyword %s", UVES_OVRSCANY(new_format, chip));
743 double default_ron_el = 5.0;
748 "Error determining FITS header format");
750 check( uves_get_property_value(plist, UVES_RON(new_format, chip), CPL_TYPE_DOUBLE, &ron_el),
751 "Error reading keyword '%s'", UVES_RON(new_format, chip));
756 "non-positive (%e electrons). Using default value %e",
757 ron_el, default_ron_el);
758 ron_el = default_ron_el;
762 "Error reading gain");
764 assure( ron_el * gain > 0, CPL_ERROR_ILLEGAL_INPUT,
765 "Non-positive read-out noise: %f ADU", ron_el * gain);
768 return ron_el * gain;
785 check( uves_get_property_value(plist, UVES_TEL_ALT, CPL_TYPE_DOUBLE, &result),
786 "Error reading keyword '%s'", UVES_TEL_ALT);
805 check( uves_get_property_value(plist, UVES_AIRMASS_START, CPL_TYPE_DOUBLE, &result),
806 "Error reading keyword '%s'", UVES_AIRMASS_START);
824 check( uves_get_property_value(plist, UVES_AIRMASS_END, CPL_TYPE_DOUBLE, &result),
825 "Error reading keyword '%s'", UVES_AIRMASS_END);
847 "Error determining FITS header format");
849 check( uves_get_property_value(plist, UVES_CONAD(new_format, chip),
850 CPL_TYPE_DOUBLE, &result),
851 "Error reading keyword '%s'", UVES_CONAD(new_format, chip));
867 const char* returnvalue =
"";
869 check( uves_get_property_value(plist, UVES_TARG_NAME, CPL_TYPE_STRING, &returnvalue),
870 "Error reading keyword %s", UVES_TARG_NAME);
890 double default_gain = 2.1;
894 "Error determining FITS header format");
896 check( uves_get_property_value(plist, UVES_GAIN(new_format, chip),
897 CPL_TYPE_DOUBLE, &result),
898 "Error reading keyword '%s'", UVES_GAIN(new_format, chip));
903 "non-positive (%e). Using default value %e",
904 result, default_gain);
905 result = default_gain;
926 check( uves_get_property_value(plist, UVES_EXPTIME, CPL_TYPE_DOUBLE, &result),
927 "Error reading keyword '%s'", UVES_EXPTIME);
928 assure( result >= 0, CPL_ERROR_ILLEGAL_OUTPUT,
"Exposure time is negative: %f", result);
948 "Error writing keyword '%s'", UVES_EXPTIME);
950 return cpl_error_get_code();
967 "Error writing keyword '%s'", UVES_DEC);
985 "Error writing keyword '%s'", UVES_RA);
1004 "Error writing keyword '%s'", UVES_ORD_PRED);
1006 return cpl_error_get_code();
1019 const char *result =
"";
1021 check( uves_get_property_value(plist, UVES_DRS_ID, CPL_TYPE_STRING, &result),
1022 "Error reading keyword '%s'", UVES_DRS_ID);
1025 if (cpl_error_get_code() != CPL_ERROR_NONE)
1045 const char *result =
"";
1047 check( uves_get_property_value(plist, UVES_TPL_START, CPL_TYPE_STRING, &result),
1048 "Error reading keyword '%s'", UVES_TPL_START);
1051 if (cpl_error_get_code() != CPL_ERROR_NONE)
1069 double returnvalue = 0;
1071 check( uves_get_property_value(plist, UVES_UTC, CPL_TYPE_DOUBLE, &returnvalue),
1072 "Error reading keyword '%s'", UVES_UTC);
1088 double returnvalue = 0;
1090 check( uves_get_property_value(plist, UVES_MJDOBS, CPL_TYPE_DOUBLE, &returnvalue),
1091 "Error reading keyword '%s'", UVES_MJDOBS);
1106 double returnvalue = 0;
1108 check( uves_get_property_value(plist, UVES_GEOLAT, CPL_TYPE_DOUBLE, &returnvalue),
1109 "Error reading keyword '%s'", UVES_GEOLAT);
1124 double returnvalue = 0;
1126 check( uves_get_property_value(plist, UVES_GEOLON, CPL_TYPE_DOUBLE, &returnvalue),
1127 "Error reading keyword '%s'", UVES_GEOLON);
1142 double returnvalue = 0;
1144 check( uves_get_property_value(plist, UVES_RA, CPL_TYPE_DOUBLE, &returnvalue),
1145 "Error reading keyword '%s'", UVES_RA);
1160 double returnvalue = 0;
1162 check( uves_get_property_value(plist, UVES_DEC, CPL_TYPE_DOUBLE, &returnvalue),
1163 "Error reading keyword '%s'", UVES_DEC);
1178 int returnvalue = 0;
1180 check( uves_get_property_value(plist, UVES_BINX, CPL_TYPE_INT, &returnvalue),
1181 "Error reading keyword '%s'", UVES_BINX);
1196 int returnvalue = 0;
1198 check( uves_get_property_value(plist, UVES_BINY, CPL_TYPE_INT, &returnvalue),
1199 "Error reading keyword '%s'", UVES_BINY);
1214 int returnvalue = 0;
1219 assure( plist != NULL, CPL_ERROR_NULL_INPUT,
"Null plist");
1223 check( uves_get_property_value(plist, UVES_DATANCOM, CPL_TYPE_INT, &returnvalue),
1224 "Error reading keyword '%s'", UVES_DATANCOM);
1229 check( uves_get_property_value(plist, UVES_DATANCOM_OLD, CPL_TYPE_INT, &returnvalue),
1230 "Error reading keyword '%s'", UVES_DATANCOM_OLD);
1233 uves_msg_warning(
"Neither %s nor %s found! We assume a value of 5! This may affect noise/error propagation",
1234 UVES_DATANCOM,UVES_DATANCOM_OLD);
1253 const char* result=
"";
1255 check( uves_get_property_value(plist, UVES_CCDID, CPL_TYPE_STRING, &result),
1256 "Error reading keyword '%s'", UVES_CCDID);
1273 check( uves_get_property_value(plist, UVES_PRESSURE, CPL_TYPE_DOUBLE, &returnvalue),
1274 "Error reading keyword '%s'", UVES_PRESSURE);
1290 const char *result = NULL;
1291 const char *prefix =
"ESO ";
1292 unsigned int pref_len = strlen(prefix);
1294 assure( strlen(key) >= pref_len &&
1295 strncmp(key, prefix, pref_len) == 0,
1296 CPL_ERROR_ILLEGAL_INPUT,
1297 "Keyword %s does not contain 'ESO ' prefix", key);
1299 result = key + pref_len;
1317 check( uves_get_property_value(plist, UVES_TEMPCAM(chip), CPL_TYPE_DOUBLE, &returnvalue),
1318 "Error reading keyword '%s'", UVES_TEMPCAM(chip));
1336 check( uves_get_property_value(plist, UVES_HUMIDITY, CPL_TYPE_DOUBLE, &returnvalue),
1337 "Error reading keyword '%s'", UVES_HUMIDITY);
1354 check( uves_get_property_value(plist,
"WLEN1", CPL_TYPE_DOUBLE, &returnvalue),
1355 "Error reading keyword '%s'",
"WLEN1");
1357 assure(returnvalue > 0, CPL_ERROR_ILLEGAL_INPUT,
"Non-positive wavelength: %e", returnvalue);
1375 check( uves_get_property_value(plist, UVES_GRATWLEN(chip), CPL_TYPE_DOUBLE, &returnvalue),
1376 "Error reading keyword '%s'", UVES_GRATWLEN(chip));
1378 assure(returnvalue > 0, CPL_ERROR_ILLEGAL_INPUT,
"Non-positive wavelength: %e", returnvalue);
1393 const char* returnvalue=
"";
1395 check( uves_get_property_value(plist, UVES_INSMODE, CPL_TYPE_STRING, &returnvalue),
1396 "Error reading keyword '%s'", UVES_INSMODE);
1411 const char* returnvalue=
"";
1413 check( uves_get_property_value(plist, UVES_INSPATH, CPL_TYPE_STRING, &returnvalue),
1414 "Error reading keyword '%s'", UVES_INSPATH);
1429 const char* returnvalue=
"";
1431 check( uves_get_property_value(plist, UVES_GRATNAME(chip), CPL_TYPE_STRING, &returnvalue),
1432 "Error reading keyword '%s'", UVES_GRATNAME(chip));
1448 const char* returnvalue=
"";
1450 check( uves_get_property_value(plist, UVES_READ_SPEED, CPL_TYPE_STRING, &returnvalue),
1451 "Error reading keyword '%s'", UVES_READ_SPEED);
1467 const char* returnvalue=
"";
1469 check( uves_get_property_value(plist, UVES_GRATID(chip), CPL_TYPE_STRING, &returnvalue),
1470 "Error reading keyword '%s'", UVES_GRATID(chip));
1488 check( uves_get_property_value(plist, UVES_SLITLENGTH(chip), CPL_TYPE_DOUBLE, &returnvalue),
1489 "Error reading keyword '%s'", UVES_SLITLENGTH(chip));
1508 check( uves_get_property_value(plist, UVES_SLITWIDTH(chip), CPL_TYPE_DOUBLE, &returnvalue),
1509 "Error reading keyword '%s'", UVES_SLITWIDTH(chip));
1527 assure( plist != NULL, CPL_ERROR_NULL_INPUT,
"Null plist");
1534 CPL_ERROR_DATA_NOT_FOUND,
1535 "Keyword %s does not exist", UVES_ORD_PRED);
1537 "Error reading type of property '%s'", UVES_ORD_PRED);
1539 if (type == CPL_TYPE_INT)
1541 check( uves_get_property_value(
1542 plist, UVES_ORD_PRED, CPL_TYPE_INT, &returnvalue),
1543 "Error reading keyword '%s'", UVES_ORD_PRED);
1545 else if (type == CPL_TYPE_DOUBLE)
1548 check( uves_get_property_value(
1549 plist, UVES_ORD_PRED, CPL_TYPE_DOUBLE, &dvalue),
1550 "Error reading keyword '%s'", UVES_ORD_PRED);
1551 returnvalue = uves_round_double(dvalue);
1555 assure(
false, CPL_ERROR_TYPE_MISMATCH,
1556 "Keyword '%s' has wrong type '%s'",
1581 char *val_str = NULL;
1582 char *number_str = NULL;
1583 cpl_property *existing = NULL;
1589 existing == NULL && i < plist_size; i++)
1591 cpl_property *p = uves_propertylist_get(plist, i);
1592 const char *pname = cpl_property_get_name(p);
1594 if (strcmp(pname,
"HISTORY") == 0)
1597 check( pval = cpl_property_get_string(p),
1598 "Error reading property value");
1602 if (strlen(pval) > strlen(name) + strlen(
" ") &&
1603 strncmp(pval, name, strlen(name)) == 0 &&
1604 pval[strlen(name)] ==
' ')
1612 va_start(arglist, format);
1613 number_str = cpl_vsprintf(format, arglist);
1616 val_str = uves_sprintf(
"%s %s", name, number_str);
1618 if (existing != NULL)
1620 check( cpl_property_set_string(existing, val_str),
1621 "Error updating HISTORY keyword with value '%s'", val_str);
1625 check( uves_propertylist_append_string(plist,
"HISTORY", val_str),
1626 "Error writing HISTORY keyword with value '%s'", val_str);
1631 cpl_free(number_str);
1655 double returnvalue = 0;
1661 for (i = 0; !found && i < plist_size; i++) {
1663 const char *value = cpl_property_get_name(p);
1665 if (strcmp(value,
"HISTORY") == 0) {
1666 check( value = cpl_property_get_string(p),
1667 "Error reading property value");
1671 if (strlen(value) > strlen(name) + strlen(
" ") &&
1672 strncmp(value, name, strlen(name)) == 0 &&
1673 value[strlen(name)] ==
' ') {
1677 returnvalue = atoi(value + strlen(name) + strlen(
" "));
1678 assure(errno == 0, CPL_ERROR_ILLEGAL_INPUT,
1679 "Could not parse string '%s' as integer. "
1680 "atoi() returned %d",
1681 value + strlen(name) + strlen(
" "), errno);
1683 case CPL_TYPE_DOUBLE:
1684 returnvalue = strtod(value + strlen(name) + strlen(
" "), NULL);
1685 assure(errno == 0, CPL_ERROR_ILLEGAL_INPUT,
1686 "Could not parse string '%s' as double. "
1687 "strtod() returned %d",
1688 value + strlen(name) + strlen(
" "), errno);
1691 assure(
false, CPL_ERROR_UNSUPPORTED_MODE,
1700 assure( found, CPL_ERROR_DATA_NOT_FOUND,
"Missing record 'HISTORY %s '",
1736 return uves_round_double(
parse_history(plist, UVES_FIRSTABSORDER, CPL_TYPE_INT));
1766 return uves_round_double(
parse_history(plist, UVES_LASTABSORDER, CPL_TYPE_INT));
1782 "Error writing keyword '%s'", UVES_PRO_DATAAVG);
1784 return cpl_error_get_code();
1800 "Standard deviation of pixel values")),
1801 "Error writing keyword '%s'", UVES_PRO_DATARMS);
1804 return cpl_error_get_code();
1820 "Error writing keyword '%s'", UVES_PRO_DATAMED);
1823 return cpl_error_get_code();
1838 "Error writing keyword '%s'", UVES_DATAMIN);
1841 return cpl_error_get_code();
1856 "Maximum of pixel values")),
1857 "Error writing keyword '%s'", UVES_DATAMAX);
1860 return cpl_error_get_code();
1877 return cpl_error_get_code();
1908 check( uves_get_property_value(plist, UVES_TRACE_OFFSET, CPL_TYPE_DOUBLE,
1910 "Error reading keyword %s", UVES_TRACE_OFFSET);
1914 offset =
parse_history(plist, UVES_TRACE_OFFSET, CPL_TYPE_DOUBLE);
1961 return uves_round_double(
parse_history(plist, UVES_TRACEID, CPL_TYPE_INT));
1974 return uves_round_double(
parse_history(plist, UVES_WINDOWNUMBER, CPL_TYPE_INT));
1987 const char* returnvalue=
"";
1989 check( uves_get_property_value(plist, UVES_BUNIT, CPL_TYPE_STRING, &returnvalue),
1990 "Error reading keyword '%s'", UVES_BUNIT);
2006 double returnvalue = 0;
2008 check( uves_get_property_value(plist, UVES_BSCALE, CPL_TYPE_DOUBLE, &returnvalue),
2009 "Error reading keyword '%s'", UVES_BSCALE);
2026 const char* returnvalue=
"";
2028 check( uves_get_property_value(plist, UVES_CUNIT1, CPL_TYPE_STRING, &returnvalue),
2029 "Error reading keyword '%s'", UVES_CUNIT1);
2045 const char* returnvalue=
"";
2047 check( uves_get_property_value(plist, UVES_CUNIT2, CPL_TYPE_STRING, &returnvalue),
2048 "Error reading keyword '%s'", UVES_CUNIT2);
2064 const char* returnvalue=
"";
2066 check( uves_get_property_value(plist, UVES_CTYPE1, CPL_TYPE_STRING, &returnvalue),
2067 "Error reading keyword '%s'", UVES_CTYPE1);
2083 const char* returnvalue=
"";
2085 check( uves_get_property_value(plist, UVES_CTYPE2, CPL_TYPE_STRING, &returnvalue),
2086 "Error reading keyword '%s'", UVES_CTYPE2);
2102 double returnvalue = 0;
2106 "Error determining FITS header format");
2108 check( uves_get_property_value(plist, UVES_UIT(new_format), CPL_TYPE_DOUBLE, &returnvalue),
2109 "Error reading keyword %s", UVES_UIT(new_format));
2129 int returnvalue = 0;
2133 "Error determining FITS header format");
2135 check( uves_get_property_value(plist, UVES_NX(new_format, chip), CPL_TYPE_INT, &returnvalue),
2136 "Error reading keyword %s", UVES_NX(new_format, chip));
2158 int returnvalue = 0;
2162 "Error determining FITS header format");
2164 check( uves_get_property_value(plist, UVES_NY(new_format, chip), CPL_TYPE_INT, &returnvalue),
2165 "Error reading keyword %s", UVES_NY(new_format, chip));
2184 int returnvalue = 0;
2186 check( uves_get_property_value(plist, UVES_OUT1NX, CPL_TYPE_INT, &returnvalue),
2187 "Error reading keyword '%s'", UVES_OUT1NX);
2203 int returnvalue = 0;
2205 check( uves_get_property_value(plist, UVES_OUT1NY, CPL_TYPE_INT, &returnvalue),
2206 "Error reading keyword '%s'", UVES_OUT1NY);
2222 int returnvalue = 0;
2224 check( uves_get_property_value(plist, UVES_OUT4NX, CPL_TYPE_INT, &returnvalue),
2225 "Error reading keyword '%s'", UVES_OUT4NX);
2241 int returnvalue = 0;
2243 check( uves_get_property_value(plist, UVES_OUT4NY, CPL_TYPE_INT, &returnvalue),
2244 "Error reading keyword '%s'", UVES_OUT4NY);
2261 int returnvalue = 0;
2263 check( uves_get_property_value(plist, UVES_NAXIS, CPL_TYPE_INT, &returnvalue),
2264 "Error reading keyword '%s'", UVES_NAXIS);
2280 int returnvalue = 0;
2282 check( uves_get_property_value(plist, FLAMES_NFLATS, CPL_TYPE_INT, &returnvalue),
2283 "Error reading keyword '%s'", FLAMES_NFLATS);
2300 int returnvalue = 0;
2302 check( uves_get_property_value(plist, UVES_BITPIX, CPL_TYPE_INT, &returnvalue),
2303 "Error reading keyword '%s'", UVES_BITPIX);
2318 int returnvalue = 0;
2320 check( uves_get_property_value(plist, UVES_NAXIS1, CPL_TYPE_INT, &returnvalue),
2321 "Error reading keyword '%s'", UVES_NAXIS1);
2338 double returnvalue = 0;
2340 check( uves_get_property_value(plist, UVES_STARTX, CPL_TYPE_DOUBLE, &returnvalue),
2341 "Error reading keyword '%s'", UVES_STARTX);
2358 double returnvalue = 0;
2360 check( uves_get_property_value(plist, UVES_STARTY, CPL_TYPE_DOUBLE, &returnvalue),
2361 "Error reading keyword '%s'", UVES_STARTY);
2377 int returnvalue = 0;
2379 check( uves_get_property_value(plist, UVES_NAXIS2, CPL_TYPE_INT, &returnvalue),
2380 "Error reading keyword '%s'", UVES_NAXIS2);
2395 double returnvalue = 0.0;
2397 check( uves_get_property_value(plist, UVES_CRVAL1, CPL_TYPE_DOUBLE, &returnvalue),
2398 "Error reading keyword '%s'", UVES_CRVAL1);
2413 double returnvalue = 0.0;
2415 check( uves_get_property_value(plist, UVES_CRVAL2, CPL_TYPE_DOUBLE, &returnvalue),
2416 "Error reading keyword '%s'", UVES_CRVAL2);
2431 double returnvalue = 0.0;
2433 check( uves_get_property_value(plist, UVES_CRPIX1, CPL_TYPE_DOUBLE, &returnvalue),
2434 "Error reading keyword '%s'", UVES_CRPIX1);
2449 double returnvalue = 0.0;
2451 check( uves_get_property_value(plist, UVES_CRPIX2, CPL_TYPE_DOUBLE, &returnvalue),
2452 "Error reading keyword '%s'", UVES_CRPIX2);
2467 double returnvalue = 0.0;
2469 check( uves_get_property_value(plist, UVES_CDELT1, CPL_TYPE_DOUBLE, &returnvalue),
2470 "Error reading keyword '%s'", UVES_CDELT1);
2485 double returnvalue = 0.0;
2487 check( uves_get_property_value(plist, UVES_CDELT2, CPL_TYPE_DOUBLE, &returnvalue),
2488 "Error reading keyword '%s'", UVES_CDELT2);
2507 "Error writing %s", UVES_DPR_CATG);
2524 "Error writing %s", UVES_DPR_TECH);
2540 "Error writing %s", UVES_DPR_TYPE);
2557 "Error writing keyword '%s'", UVES_OBJECT);
2560 return cpl_error_get_code();
2574 "Error writing keyword '%s'", UVES_QC_BADPIXCORR);
2577 return cpl_error_get_code();
2592 "Error writing keyword '%s'", UVES_REDLEVEL);
2595 return cpl_error_get_code();
2610 "Error writing keyword '%s'", UVES_STATUS);
2613 return cpl_error_get_code();
2628 "Error writing keyword '%s'", UVES_START);
2631 return cpl_error_get_code();
2645 "Error writing keyword '%s'", UVES_STOP);
2648 return cpl_error_get_code();
2663 "Error writing keyword '%s'", UVES_BUNIT);
2666 return cpl_error_get_code();
2681 "Error writing keyword '%s'", UVES_BSCALE);
2684 return cpl_error_get_code();
2700 sprintf(key_name,
"%s%d",UVES_TUNIT,col_no);
2701 uves_msg(
"Filling key %s with value %s",key_name,tunit);
2703 "Error writing keyword '%s'", key_name);
2706 return cpl_error_get_code();
2721 "Error writing keyword '%s'", UVES_BUNIT);
2724 return cpl_error_get_code();
2739 check( uves_propertylist_append_string(plist,
"EXTNAME", extname),
2740 "Error writing EXTNAME keyword with value '%s'", extname);
2743 return cpl_error_get_code();
2759 "Error writing keyword '%s'", UVES_CTYPE1);
2762 return cpl_error_get_code();
2776 "Error writing keyword '%s'", UVES_CTYPE2);
2779 return cpl_error_get_code();
2796 "Error writing keyword '%s'", UVES_CUNIT1);
2799 return cpl_error_get_code();
2814 "Error writing keyword '%s'", UVES_CUNIT2);
2817 return cpl_error_get_code();
2832 "Error writing keyword '%s'", UVES_CRVAL1);
2835 return cpl_error_get_code();
2850 "Error writing keyword '%s'", UVES_CRVAL2);
2853 return cpl_error_get_code();
2867 "Error writing keyword '%s'", UVES_CRPIX1);
2870 return cpl_error_get_code();
2885 "Error writing keyword '%s'", UVES_CRPIX2);
2888 return cpl_error_get_code();
2902 "Error writing keyword '%s'", UVES_CDELT1);
2905 return cpl_error_get_code();
2920 "Error writing keyword '%s'", FLAMES_CCFPOSMAX);
2938 "Error writing keyword '%s'", UVES_CDELT2);
2941 return cpl_error_get_code();
2955 "Error writing keyword '%s'", UVES_HS);
2974 char *wstart_string = NULL;
2976 assure (1 <= order && order <= 99, CPL_ERROR_ILLEGAL_INPUT,
2977 "Illegal order number: %d. Allowed range is 1 to 99", order);
2980 wstart_string = cpl_malloc( strlen(UVES_WSTART) + 2 + 1);
2983 snprintf(wstart_string, strlen(UVES_WSTART)+2+1, UVES_WSTART
"%d", order);
2986 "Error updating product header");
2989 cpl_free(wstart_string);
2990 return cpl_error_get_code();
3007 char *wstart = NULL;
3009 assure (1 <= order && order <= 99, CPL_ERROR_ILLEGAL_INPUT,
3010 "Illegal order number: %d. Allowed range is 1 to 99", order);
3013 wstart = cpl_malloc( strlen(UVES_WSTART) + 2 + 1);
3016 snprintf(wstart, strlen(UVES_WSTART)+2+1, UVES_WSTART
"%d", order);
3018 check( uves_get_property_value(plist, wstart, CPL_TYPE_DOUBLE, &returnvalue),
3019 "Error reading keyword '%s'", wstart);
3037 char *wend_string = NULL;
3039 assure (1 <= order && order <= 99, CPL_ERROR_ILLEGAL_INPUT,
3040 "Illegal order number: %d. Allowed range is 1 to 99", order);
3043 wend_string = cpl_malloc( strlen(UVES_WEND) + 2 + 1);
3046 snprintf(wend_string, strlen(UVES_WEND)+2+1, UVES_WEND
"%d", order);
3049 "Error updating product header");
3052 cpl_free(wend_string);
3053 return cpl_error_get_code();
3072 assure (1 <= order && order <= 99, CPL_ERROR_ILLEGAL_INPUT,
3073 "Illegal order number: %d. Allowed range is 1 to 99", order);
3076 wend = cpl_malloc( strlen(UVES_WEND) + 2 + 1);
3079 snprintf(wend, strlen(UVES_WEND)+2+1, UVES_WEND
"%d", order);
3081 check( uves_get_property_value(plist, wend, CPL_TYPE_DOUBLE, &returnvalue),
3082 "Error reading keyword '%s'", wend);
3099 double pixelscale = 0;
3101 check( uves_get_property_value(plist, UVES_PIXELSCALE, CPL_TYPE_DOUBLE, &pixelscale),
3102 "Error reading keyword '%s'", UVES_PIXELSCALE);
3118 const char* returnvalue =
"";
3120 check( uves_get_property_value(plist, UVES_SLIT1NAME, CPL_TYPE_STRING, &returnvalue),
3121 "Error reading keyword '%s'", UVES_SLIT1NAME);
3142 enum uves_chip chip)
3144 double slitlength_pixels = 0;
3146 const char *slicer_name =
"";
3147 double slitlength_arcsecs = 0;
3150 "Could not read slicer id");
3152 if ( strncmp(slicer_name,
"FREE", 4) != 0)
3155 if (strncmp(slicer_name,
"SLIC#1", 6) == 0) slitlength_arcsecs = 8.0;
3156 else if (strncmp(slicer_name,
"SLIC#2", 6) == 0) slitlength_arcsecs = 8.0;
3157 else if (strncmp(slicer_name,
"SLIC#3", 6) == 0) slitlength_arcsecs = 10.0;
3160 assure(
false, CPL_ERROR_ILLEGAL_INPUT,
"Unrecognized slicer name: '%s'. "
3161 "Recognized names are 'FREE', 'SLIC#1', 'SLIC#2', 'SLIC#3'.",
3169 check( uves_get_property_value(
3170 plist, UVES_SLITLENGTH(chip), CPL_TYPE_DOUBLE, &slitlength_arcsecs),
3171 "Error reading keyword '%s'", UVES_SLITLENGTH(chip));
3183 "Could not get x-binning");
3185 slitlength_pixels = slitlength_arcsecs / (pixelscale * binx);
3189 return slitlength_pixels;
3208 check( uves_get_property_value(raw_header, FLAMES_NEWPLATEID,
3209 CPL_TYPE_INT, &plate_no),
3210 "Error reading keyword '%s'", FLAMES_NEWPLATEID);
3213 FLAMES_OBS_PLATE_ID))
3215 check( uves_get_property_value(raw_header, FLAMES_OBS_PLATE_ID,
3216 CPL_TYPE_INT, &plate_no),
3217 "Error reading keyword '%s'", FLAMES_NEWPLATEID);
3233 "setting plate number = %d",
3235 FLAMES_OBS_PLATE_ID,
3256 double returnvalue = 0;
3258 check( uves_get_property_value(plist, FLAMES_DIT, CPL_TYPE_DOUBLE, &returnvalue),
3259 "Error reading keyword '%s'", FLAMES_DIT);
3276 "Error writing keyword '%s'", FLAMES_NEWPLATEID);
double uves_pfits_get_utc(const uves_propertylist *plist)
Find out the observation time.
int uves_pfits_get_prescanx(const uves_propertylist *plist, enum uves_chip chip)
Find out the x-prescan.
int uves_pfits_get_firstabsorder(const uves_propertylist *plist)
Get first absolute order number.
cpl_error_code uves_pfits_set_wstart(uves_propertylist *plist, int order, double wstart)
Write the wstart keyword.
const cpl_property * uves_propertylist_get_const(const uves_propertylist *self, long position)
Access property list elements by index.
cpl_error_code uves_pfits_set_data_median(uves_propertylist *plist, double median)
Write the median pixel value.
int uves_pfits_get_datancom(const uves_propertylist *plist)
Find out the number of input raw frames.
double uves_pfits_get_uit(const uves_propertylist *plist)
Find out the user integration time.
int uves_flames_pfits_get_nflats(const uves_propertylist *plist)
Find out the NFLATS.
cpl_error_code uves_pfits_set_crpix2(uves_propertylist *plist, double crpix2)
Write the crpix2 keyword.
const char * uves_pfits_get_dpr_tech(const uves_propertylist *plist)
find out the data tech as defined by the DataFlow
const char * uves_pfits_get_tpl_start(const uves_propertylist *plist)
Find out the tpl start.
double uves_pfits_get_tempcam(const uves_propertylist *plist, enum uves_chip chip)
find out the pressure value
int uves_pfits_get_nx(const uves_propertylist *plist, enum uves_chip chip)
Find out the OUT1 NX or OUT4 NX.
#define uves_msg_warning(...)
Print an warning message.
cpl_error_code uves_pfits_set_data_stddev(uves_propertylist *plist, double stddev)
Write the RMS error of pixel values.
int uves_flames_pfits_get_plateid(const uves_propertylist *raw_header)
read the plate id
int uves_pfits_get_ny(const uves_propertylist *plist, enum uves_chip chip)
Find out the OUT1 NY or OUT4 NY.
cpl_error_code uves_pfits_set_ctype1(uves_propertylist *plist, const char *ctype1)
Write the ctype1 keyword.
void uves_pfits_set_dpr_tech(uves_propertylist *plist, const char *tech)
Set DPR TECH value.
int uves_pfits_get_ovrscanx(const uves_propertylist *plist, enum uves_chip chip)
Find out the x-overscan.
void uves_pfits_set_windownumber(uves_propertylist *plist, int window_number)
Write the window number.
void uves_pfits_set_history_val(uves_propertylist *plist, const char *name, const char *format,...)
Write integer value to HISTORY keyword.
void uves_pfits_set_hs(uves_propertylist *plist, int hs)
Write the 2d extractino slit length.
cpl_error_code uves_pfits_set_cdelt1(uves_propertylist *plist, double cdelt1)
Write the cdelt1 keyword.
char uves_pfits_get_chipchoice(const uves_propertylist *plist)
find out the frame
int uves_pfits_get_ocs_simcal(const uves_propertylist *plist)
Read the SIMCAL flag.
double uves_pfits_get_slitlength_pixels(const uves_propertylist *plist, enum uves_chip chip)
Read the slit length in pixels.
double uves_pfits_get_tel_alt_start(const uves_propertylist *plist)
Find out the start telescope altitude.
const char * uves_pfits_get_cunit1(const uves_propertylist *plist)
Find out the cunit1.
double uves_pfits_get_bscale(const uves_propertylist *plist)
Find out the bscale.
const char * uves_pfits_get_arcfile(const uves_propertylist *plist)
find out the arcfile
cpl_error_code uves_pfits_set_stoptime(uves_propertylist *plist, const char *stop_time)
Write the stop time.
cpl_error_code uves_pfits_set_tunit_no(uves_propertylist *plist, const int col_no, const char *tunit)
Write the tunit keyword.
int uves_pfits_get_lastabsorder(const uves_propertylist *plist)
Get last absolute order number.
const char * uves_pfits_get_cunit2(const uves_propertylist *plist)
Find out the cunit2.
const char * uves_pfits_get_badpxframe(const uves_propertylist *plist)
find out the frame
int uves_pfits_get_windownumber(const uves_propertylist *plist)
Get the window number.
double uves_pfits_get_gain(const uves_propertylist *plist, enum uves_chip chip)
Find out the gain.
double uves_pfits_get_geolat(const uves_propertylist *plist)
Find out the telescope latitude.
int uves_pfits_get_ordpred(const uves_propertylist *plist)
Read the predicted number of orders.
cpl_error_code uves_pfits_set_crval1(uves_propertylist *plist, double crval1)
Write the crval1 keyword.
const char * uves_pfits_get_dpr_catg(const uves_propertylist *plist)
find out the data category as defined by the DataFlow
const char * uves_pfits_get_drs_id(const uves_propertylist *plist)
Find out the drs id.
double uves_pfits_get_geolon(const uves_propertylist *plist)
Find out the telescope longitude.
double uves_pfits_get_cdelt2(const uves_propertylist *plist)
Find out the cdelt2.
cpl_error_code uves_pfits_set_bunit_no(uves_propertylist *plist, const int axis_no, const char *bunit)
Write the bunit keyword.
cpl_error_code uves_pfits_set_badpixcorr(uves_propertylist *plist, const char *corr)
Write the object keyword.
cpl_error_code uves_pfits_set_cunit2(uves_propertylist *plist, const char *cunit2)
Write the cunit2 keyword.
cpl_error_code uves_pfits_set_object(uves_propertylist *plist, const char *object)
Write the object keyword.
int uves_pfits_get_out4nx(const uves_propertylist *plist)
Find out the OUT4 NX.
double uves_pfits_get_gratwlen(const uves_propertylist *plist, enum uves_chip chip)
find out the central wavelength
const char * uves_pfits_get_targ_name(const uves_propertylist *plist)
Get target name.
cpl_error_code uves_propertylist_update_string(uves_propertylist *self, const char *name, const char *value)
Update a property list with a string value.
int uves_pfits_get_naxis2(const uves_propertylist *plist)
Find out the NAXIS2.
int uves_pfits_get_slit3_x2encoder(const uves_propertylist *plist)
find out the value of UVES_ENCODER_REF2
double uves_pfits_get_slitwidth(const uves_propertylist *plist, enum uves_chip chip)
find out the slit width
double uves_pfits_get_ambipress(const uves_propertylist *plist)
find out the arcfile
void uves_flames_pfits_set_newplateid(uves_propertylist *plist, int plate_no)
Write the plate number.
const char * uves_pfits_get_pro_catg(const uves_propertylist *plist)
find out the product category as defined by the DataFlow
const char * uves_pfits_get_slit1_name(const uves_propertylist *plist)
Get image slicer name.
int uves_pfits_get_naxis(const uves_propertylist *plist)
Find out the NAXIS.
const char * uves_pfits_get_chip_name(const uves_propertylist *plist, enum uves_chip chip)
Find out the chip name.
double uves_pfits_get_wstart(const uves_propertylist *plist, int order)
Read the wstart keyword.
const char * uves_pfits_get_origfile(const uves_propertylist *plist)
find out the origfile
const char * uves_flames_pfits_get_object(const uves_propertylist *plist)
find out the OBJECT
double uves_pfits_get_crpix2(const uves_propertylist *plist)
Find out the crpix2.
cpl_error_code uves_pfits_set_bscale(uves_propertylist *plist, const double bscale)
Write the bscale keyword.
cpl_type uves_propertylist_get_type(const uves_propertylist *self, const char *name)
Get the the type of a property list entry.
long uves_propertylist_get_size(const uves_propertylist *self)
Get the current size of a property list.
int uves_pfits_get_binx(const uves_propertylist *plist)
Find out the x binning factor.
static double parse_history(const uves_propertylist *plist, const char *name, cpl_type type)
Parse the value of a HISTORY keyword.
#define uves_msg(...)
Print a message on 'info' or 'debug' level.
void uves_pfits_set_dpr_catg(uves_propertylist *plist, const char *catg)
Set DPR CATG value.
cpl_error_code uves_propertylist_set_comment(uves_propertylist *self, const char *name, const char *comment)
Modify the comment field of the given property list entry.
const char * uves_propertylist_get_string(const uves_propertylist *self, const char *name)
Get the string value of the given property list entry.
double uves_pfits_get_ra(const uves_propertylist *plist)
Find out the right ascension.
void uves_pfits_set_traceid(uves_propertylist *plist, int trace_id)
Write the trace ID.
cpl_error_code uves_pfits_set_ctype2(uves_propertylist *plist, const char *ctype2)
Write the ctype2 keyword.
const char * uves_pfits_get_bunit(const uves_propertylist *plist)
Find out the bunit.
double uves_pfits_get_mjdobs(const uves_propertylist *plist)
Find out the modified julian observation date.
int uves_pfits_get_slit3_x1encoder(const uves_propertylist *plist)
find out the value of UVES_ENCODER_REF1
cpl_error_code uves_pfits_set_crpix1(uves_propertylist *plist, double crpix1)
Write the crpix1 keyword.
int uves_pfits_get_biny(const uves_propertylist *plist)
Find out the y binning factor.
double uves_pfits_get_starty(const uves_propertylist *plist)
Find out the STARTY.
cpl_error_code uves_pfits_set_data_max(uves_propertylist *plist, double max)
Write the max pixel value.
void uves_pfits_set_cd11(uves_propertylist *plist, double value)
Write the CD1_1 value.
double uves_flames_pfits_get_dit(const uves_propertylist *plist)
Find out the integration time.
char uves_propertylist_get_char(const uves_propertylist *self, const char *name)
Get the character value of the given property list entry.
double uves_pfits_get_dec(const uves_propertylist *plist)
Find out the declination.
int uves_pfits_get_out1nx(const uves_propertylist *plist)
Find out the OUT1 NX.
bool uves_ccd_is_new(const uves_propertylist *plist)
Find out if CCD header is new.
cpl_error_code uves_pfits_set_starttime(uves_propertylist *plist, const char *start_time)
Write the start time.
const char * uves_pfits_get_gratname(const uves_propertylist *plist, enum uves_chip chip)
find out the grating name value
double uves_pfits_get_pressure(const uves_propertylist *plist)
find out the pressure value
double uves_pfits_get_exptime(const uves_propertylist *plist)
Find out the exposure time in seconds.
cpl_error_code uves_pfits_set_redlevel(uves_propertylist *plist, const char *redlevel)
Write the reduction level.
void uves_pfits_set_cd12(uves_propertylist *plist, double value)
Write the CD1_2 value.
const char * uves_pfits_get_ccdid(const uves_propertylist *plist)
find out the ccd id
const char * uves_pfits_get_insmode(const uves_propertylist *plist)
find out the chip name value
const char * uves_pfits_get_inspath(const uves_propertylist *plist)
find out the chip name value
cpl_error_code uves_pfits_set_cdelt2(uves_propertylist *plist, double cdelt2)
Write the cdelt2 keyword.
const char * uves_pfits_get_readspeed(const uves_propertylist *plist)
find out the readout speed
void uves_pfits_set_ra(uves_propertylist *plist, double ra)
Write the right ascension.
double uves_pfits_get_startx(const uves_propertylist *plist)
Find out the START1.
cpl_error_code uves_pfits_set_extname(uves_propertylist *plist, const char *extname)
Write the EXTNAME keyword.
int uves_pfits_get_prescany(const uves_propertylist *plist, enum uves_chip chip)
Find out the y-prescan.
int uves_propertylist_get_int(const uves_propertylist *self, const char *name)
Get the integer value of the given property list entry.
cpl_error_code uves_pfits_set_status(uves_propertylist *plist, const char *status)
Write the status.
cpl_error_code uves_pfits_set_data_average(uves_propertylist *plist, double average)
Write the average pixel value.
const char * uves_tostring_cpl_type(cpl_type t)
Convert a CPL type to a string.
const char * uves_pfits_get_date_obs(const uves_propertylist *plist)
find out the date of observation
double uves_pfits_get_airmass_end(const uves_propertylist *plist)
Find out the end airmass.
cpl_error_code uves_pfits_set_exptime(uves_propertylist *plist, double exptime)
Write the exposure time.
int uves_pfits_get_out4ny(const uves_propertylist *plist)
Find out the OUT4 NY.
bool uves_format_is_new(const uves_propertylist *plist)
Find out FITS header format.
void uves_pfits_set_lastabsorder(uves_propertylist *plist, int last_abs_order)
Write the last absolute order number.
cpl_error_code uves_pfits_set_cunit1(uves_propertylist *plist, const char *cunit1)
Write the cunit1 keyword.
double uves_pfits_get_pixelscale(const uves_propertylist *plist)
Get pixel scale.
const char * uves_pfits_get_dpr_type(const uves_propertylist *plist)
find out the data type as defined by the DataFlow
double uves_pfits_get_cdelt1(const uves_propertylist *plist)
Find out the cdelt1.
double uves_pfits_get_humidity(const uves_propertylist *plist)
find out the humidity value
const char * uves_flames_pfits_get_ident(const uves_propertylist *plist)
find out the ident
double uves_pfits_get_crval1(const uves_propertylist *plist)
Find out the crval1.
cpl_error_code uves_pfits_set_bunit(uves_propertylist *plist, const char *bunit)
Write the bunit keyword.
int uves_pfits_get_maxfibres(const uves_propertylist *plist)
find out the frame
void uves_pfits_set_cd1(uves_propertylist *plist, double value)
Write the CD1 value.
cpl_error_code uves_pfits_set_wend(uves_propertylist *plist, int order, double wend)
Write the wend keyword.
const char * uves_pfits_get_gratid(const uves_propertylist *plist, enum uves_chip chip)
find out the grating ID value
int uves_pfits_get_out1ny(const uves_propertylist *plist)
Find out the OUT1 NY.
int uves_pfits_get_naxis1(const uves_propertylist *plist)
Find out the NAXIS1.
cpl_error_code uves_pfits_set_wlen1(uves_propertylist *plist, double wlen1)
Write the WLEN1 value.
cpl_error_code uves_pfits_set_ordpred(uves_propertylist *plist, int nord)
Write the predicted number of order.
const char * uves_pfits_get_templateid(const uves_propertylist *plist)
find out the template id
int uves_propertylist_contains(const uves_propertylist *self, const char *name)
Check whether a property is present in a property list.
const char * uves_pfits_get_rec1raw1name(const uves_propertylist *plist)
find out the arcfile
cpl_error_code uves_pfits_set_data_min(uves_propertylist *plist, double min)
Write the min pixel value.
int uves_pfits_get_traceid(const uves_propertylist *plist)
Get the trace ID number.
double uves_pfits_get_crval2(const uves_propertylist *plist)
Find out the crval2.
void uves_pfits_set_dec(uves_propertylist *plist, double dec)
Write the declination.
cpl_error_code uves_propertylist_update_int(uves_propertylist *self, const char *name, int value)
Update a property list with a integer value.
const char * uves_chop_eso_prefix(const char *key)
chop the "ESO " prefix
void uves_pfits_set_ocs_simcal(uves_propertylist *plist, int simcal)
Set the SIMCAL flag.
int uves_pfits_get_bitpix(const uves_propertylist *plist)
Find out the BITPIX.
void uves_pfits_set_cd22(uves_propertylist *plist, double value)
Write the CD2_2 value.
const char * uves_pfits_get_chipid(const uves_propertylist *plist, enum uves_chip chip)
Find out the chip ID.
void uves_pfits_set_firstabsorder(uves_propertylist *plist, int first_abs_order)
Write the first absolute order number.
void uves_pfits_set_cd21(uves_propertylist *plist, double value)
Write the CD2_1 value.
double uves_pfits_get_slitlength(const uves_propertylist *plist, enum uves_chip chip)
find out the slit length
double uves_pfits_get_offset(const uves_propertylist *plist)
Get the trace offset.
double uves_pfits_get_crpix1(const uves_propertylist *plist)
Find out the crpix1.
double uves_pfits_get_wlen1(const uves_propertylist *plist)
find out the WLEN1 wavelength value
void uves_flames_pfits_set_ccfposmax(uves_propertylist *plist, double ccfposmax)
Write the ccfposmax keyword (what is it?)
const char * uves_pfits_get_ctype2(const uves_propertylist *plist)
Find out the ctype2.
const char * uves_pfits_get_pipefile(const uves_propertylist *plist)
find out the pipefile
void uves_pfits_set_dpr_type(uves_propertylist *plist, const char *type)
Set DPR TYPE value.
double uves_pfits_get_airmass_start(const uves_propertylist *plist)
Find out the start airmass.
double uves_pfits_get_ron_adu(const uves_propertylist *plist, enum uves_chip chip)
Find out the readout noise in ADU.
void uves_pfits_set_offset(uves_propertylist *plist, double trace_offset)
Write the trace offset.
double uves_pfits_get_wend(const uves_propertylist *plist, int order)
Read the wend keyword.
cpl_error_code uves_propertylist_update_double(uves_propertylist *self, const char *name, double value)
Update a property list with a double value.
double uves_pfits_get_conad(const uves_propertylist *plist, enum uves_chip chip)
Find out the conad.
const char * uves_pfits_get_ctype1(const uves_propertylist *plist)
Find out the ctype1.
int uves_pfits_get_ovrscany(const uves_propertylist *plist, enum uves_chip chip)
Find out the y-overscan.
cpl_error_code uves_pfits_set_crval2(uves_propertylist *plist, double crval2)
Write the crval2 keyword.