30 #include "muse_scipost_combine_pixtables_z.h" 52 cpl_msg_error(__func__,
"no science exposures found in input");
55 int nexposures = cpl_table_get_nrow(exposures);
59 cpl_msg_warning(__func__,
"Input %s has unexpected format, proceeding " 60 "without offset and flux scales!", MUSE_TAG_OFFSET_LIST);
61 cpl_table_delete(offsets);
69 for (i = 0; i < nexposures; i++) {
70 cpl_table *thisexp = cpl_table_extract(exposures, i, 1);
74 cpl_table_delete(thisexp);
77 cpl_propertylist_erase_regexp(pixtables[i]->header,
"ESO QC ", 0);
80 cpl_table_delete(exposures);
87 if (rc != CPL_ERROR_NONE) {
88 cpl_msg_error(__func__,
"weighting the pixel tables didn't work: %s",
89 cpl_error_get_message());
95 cpl_msg_error(__func__,
"combining the pixel tables didn't work: %s",
96 cpl_error_get_message());
100 bigpixtable = pixtables[0];
105 MUSE_TAG_PIXTABLE_COMBINED,
108 cpl_table_delete(offsets);
111 for (i = 0; i < nexposures; i++) {
115 cpl_table_delete(offsets);
Structure to hold the parameters of the muse_scipost_combine_pixtables recipe.
muse_xcombine_types muse_postproc_get_weight_type(const char *aWeightString)
Select correct weighting type for weight string.
cpl_error_code muse_xcombine_weights(muse_pixtable **aPixtables, muse_xcombine_types aWeighting)
compute the weights for combination of two or more exposures
double lambdamin
Cut off the data below this wavelength after loading the pixel table(s).
cpl_error_code muse_cpltable_check(const cpl_table *aTable, const muse_cpltable_def *aDef)
Check whether the table contains the fields of the definition.
const char * weight_s
Type of weighting scheme to use when combining multiple exposures. "exptime" just uses the exposure t...
Structure definition of MUSE pixel table.
muse_pixtable * muse_xcombine_tables(muse_pixtable **aPixtables, const cpl_table *aOffsets)
combine the pixel tables of several exposures into one
double lambdamax
Cut off the data above this wavelength after loading the pixel table(s).
cpl_table * muse_processing_load_ctable(muse_processing *aProcessing, const char *aTag, unsigned char aIFU)
Load a CPL table according to its tag and IFU/channel number.
muse_pixtable * muse_pixtable_load_merge_channels(cpl_table *aExposureList, double aLambdaMin, double aLambdaMax)
Load and merge the pixel tables of the 24 MUSE sub-fields.
cpl_error_code muse_processing_save_table(muse_processing *aProcessing, int aIFU, void *aTable, cpl_propertylist *aHeader, const char *aTag, muse_table_type aType)
Save a computed table to disk.
cpl_table * muse_processing_sort_exposures(muse_processing *aProcessing)
Sort input frames (containing lists of pixel table filenames) into different exposures.
void muse_pixtable_delete(muse_pixtable *aPixtable)
Deallocate memory associated to a pixel table object.
muse_xcombine_types
Xposure combination types.