30 #include "muse_exp_combine_z.h"
52 int nexposures = cpl_table_get_nrow(exposures);
54 cpl_msg_error(__func__,
"This recipe only makes sense with multiple "
56 cpl_table_delete(exposures);
64 for (i = 0; i < nexposures; i++) {
65 cpl_table *thisexp = cpl_table_extract(exposures, i, 1);
69 cpl_table_delete(thisexp);
71 cpl_propertylist_erase_regexp(pixtables[i]->header,
"ESO QC ", 0);
73 cpl_table_delete(exposures);
79 if (rc != CPL_ERROR_NONE) {
80 cpl_msg_error(__func__,
"weighting the pixel tables didn't work: %s",
81 cpl_error_get_message());
87 cpl_msg_error(__func__,
"combining the pixel tables didn't work: %s",
88 cpl_error_get_message());
101 rp->
ld = aParams->
ld;
102 rp->
rc = aParams->
rc;
108 cpl_propertylist_delete(outwcs);
111 format, rp, aParams->
filter);
115 MUSE_TAG_PIXTABLE_COMBINED,
119 return rc == CPL_ERROR_NONE ? 0 : -1;
121 for (i = 0; i < nexposures; i++) {
cpl_propertylist * muse_postproc_cube_load_output_wcs(muse_processing *aProcessing)
Find a file with a usable output WCS in the input frameset.
int ld
Number of adjacent pixels to take into account during resampling in all three directions (loop distan...
const char * crtype_s
Type of statistics used for detection of cosmic rays during final resampling. "iraf" uses the varianc...
cpl_error_code muse_resampling_params_set_wcs(muse_resampling_params *aParams, const cpl_propertylist *aWCS)
Set an output WCS (and wavelength scale) in the resampling parameters.
muse_xcombine_types muse_postproc_get_weight_type(const char *aWeightString)
Select correct weighting type for weight string.
const char * resample_s
The resampling technique to use for the final output cube. (as string)
int save_combined
If true, save the fully reduced and combined pixel table for the full set of exposures.
muse_resampling_crstats_type muse_postproc_get_cr_type(const char *aCRTypeString)
Select correct cosmic ray rejection type for crtype string.
double crsigma
Sigma rejection factor to use for cosmic ray rejection during final resampling. A zero or negative va...
const char * format_s
Type of output file format, "Cube" is a standard FITS cube with NAXIS=3 and multiple extensions (for ...
cpl_error_code muse_postproc_cube_resample_and_collapse(muse_processing *aProcessing, muse_pixtable *aPixtable, muse_cube_type aFormat, muse_resampling_params *aParams, const char *aFilter)
High level function to resample to a datacube and collapse that to an image of the field of view and ...
cpl_error_code muse_xcombine_weights(muse_pixtable **aPixtables, muse_xcombine_types aWeighting)
compute the weights for combination of two or more exposures
muse_resampling_crstats_type crtype
double dy
Vertical step size for resampling (in arcsec or pixel). The following defaults are taken when this va...
double pixfrac
Pixel down-scaling factor for the "drizzle" resampling method.
Structure definition of MUSE pixel table.
Structure to hold the parameters of the muse_exp_combine recipe.
muse_cube_type muse_postproc_get_cube_format(const char *aFormatString)
Select correct cube format for format string.
const char * weight_s
Type of weighting scheme to use when combining multiple exposures. (as string)
muse_resampling_params * muse_resampling_params_new(muse_resampling_type aMethod)
Create the resampling parameters structure.
double lambdamax
Cut off the data above this wavelength after loading the pixel table(s).
const char * filter
The filter name(s) to be used for the output field-of-view image. Each name has to correspond to an E...
double lambdamin
Cut off the data below this wavelength after loading the pixel table(s).
double dlambda
Wavelength step size (in Angstrom). Natural instrument sampling is used, if this is 0...
double dx
Horizontal step size for resampling (in arcsec or pixel). The following defaults are taken when this ...
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.
muse_resampling_type muse_postproc_get_resampling_type(const char *aResampleString)
Select correct resampling type for resample string.
muse_pixtable * muse_xcombine_tables(muse_pixtable **aPixtables)
combine the pixel tables of several exposures into one
double rc
Critical radius for the "renka" resampling method.
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.
muse_resampling_type
Resampling types.
void muse_resampling_params_delete(muse_resampling_params *aParams)
Delete a resampling parameters structure.
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.