MUSE Pipeline Reference Manual
1.0.2
|
Data Structures | |
struct | muse_sky_master |
Structure to hold the MASTER SKY result. More... | |
struct | muse_sky_params |
Structure to define the major settable sky parameters. More... | |
struct | muse_sky_fit_params |
Structure to define which slice parameters are fit. More... | |
Functions | |
cpl_array * | muse_sky_slice_lsf_firstguess (const muse_sky_fit_params *aFitParams) |
Return the parametrization values of the first guess. More... | |
cpl_array * | muse_sky_slice_lsf_set_param (muse_lsf_params *aLsf, const muse_sky_fit_params *aFitParams) |
Return the parametrization values for the specific LSF params. More... | |
muse_lsf_params * | muse_sky_slice_apply_lsf_parametrization (const muse_lsf_params *aTemplate, const cpl_array *aPar, const muse_sky_fit_params *aFitParams) |
Convert a parametrization to LSF parameters. More... | |
muse_lsf_params * | muse_lsf_params_fit (const cpl_array *aLambda, cpl_array *aData, const cpl_array *aStat, const cpl_table *aLines, muse_lsf_params *aFirstGuess, int aMaxIter, const muse_sky_fit_params *aFitParams) |
Fit all entries of one slice. More... | |
cpl_table * | muse_sky_spectrum_from_cube (muse_datacube *aCube, const cpl_mask *aMask) |
Create a spectrum out of a cube by applying a mask. More... | |
muse_mask * | muse_sky_create_skymask (muse_image *aImage, double aFraction, const char *aQCPrefix) |
Select spaxels to be considered as sky. More... | |
cpl_array * | muse_sky_apply_lsf (const cpl_array *aLambda, const cpl_table *aLines, const muse_lsf_params *aLsf) |
Apply the LSF parameters to a spectrum. More... | |
void | muse_sky_mark_cosmic (cpl_table *aSpectrum, muse_pixtable *aPixtable) |
Mark all pixel above a certain limit as COSMIC. More... | |
cpl_error_code | muse_sky_save_continuum (muse_processing *aProcessing, const cpl_table *aContinuum, cpl_propertylist *aHeader) |
Save sky continuum table to file. More... | |
cpl_error_code | muse_sky_lines_set_range (cpl_table *aLines, double aLow, double aHigh) |
Limit the lines in the table to a wavelength range. More... | |
cpl_error_code | muse_sky_lines_save (muse_processing *aProcessing, const cpl_table *aLines, cpl_propertylist *aHeader) |
Save sky lines table to file. More... | |
cpl_table * | muse_sky_lines_load (muse_processing *aProcessing) |
Load the sky data files. More... | |
cpl_error_code | muse_sky_lines_apply_strength (cpl_table *aLines, const cpl_array *aStrength) |
Apply the line strengths to the lines. More... | |
cpl_error_code | muse_sky_lines_cut (cpl_table *aLines, double aMinflux) |
Remove all lines below a certain flux limit. More... | |
cpl_table * | muse_sky_lines_create (const cpl_table *aLines, const cpl_table *aOh_transitions, double aT_vibr) |
Create the emission lines from the OH transitions and other lines. More... | |
muse_sky_fit_params * | muse_sky_fit_params_new (cpl_boolean aOffset, cpl_boolean aRefraction, cpl_size aSensitivity, cpl_size aSlitWidth, cpl_size aBinWidth, cpl_size aLSFWidth, cpl_size aHermit3, cpl_size aHermit4, cpl_size aHermit5, cpl_size aHermit6) |
Create a new fit parameter structure. More... | |
void | muse_sky_fit_params_delete (muse_sky_fit_params *params) |
Delete the fit parameter structure. More... | |
muse_lsf_params * | muse_sky_lsf_params_fit (const cpl_array *aLambda, const cpl_array *aData, const cpl_array *aStat, const cpl_table *aLines, const cpl_array *aContinuum, const cpl_array *aSensitivity, muse_lsf_params *aFirstGuess, int aMaxIter, const muse_sky_fit_params *aFitParams) |
Fit all entries of one slice. More... | |
muse_sky_master * | muse_sky_master_fit (const cpl_array *aLambda, const cpl_array *aData, const cpl_array *aStat, const cpl_table *aLines) |
Fit all entries of the pixel table to the master sky. More... | |
cpl_table * | muse_sky_continuum_load (muse_processing *aProcessing) |
Load the SKY_CONTINUUM spectrum. More... | |
muse_sky_master * | muse_sky_master_load (muse_processing *aProcessing) |
Load SKY_LINES, SKY_CONTINUUM, and LSF_PROFILE into a structure. More... | |
void | muse_sky_qc_lines (cpl_propertylist *aHeader, cpl_table *aLines, const char *aPrefix) |
Fill a header with the QC parameters for the sky lines. More... | |
void | muse_sky_qc_continuum (cpl_propertylist *aHeader, cpl_table *aContinuum, const char *aPrefix) |
Fill a header with the QC parameters for the sky continuum. More... | |
cpl_error_code | muse_sky_subtract_rowbyrow_mask (muse_image *aImage, cpl_table *aTrace) |
Prepare an (object) mask for the sky row-by-row fitting. More... | |
cpl_error_code | muse_sky_subtract_rowbyrow (muse_image *aImage, cpl_table *aTrace, float aRSigma, unsigned int aOrder) |
Subtract the sky row-by-row from a CCD-based image. More... | |
cpl_error_code | muse_sky_subtract_slice (muse_pixtable *aPixtable, muse_sky_master *aMaster, muse_lsf_params *aLsf) |
Subtract the sky spectrum from the "data" column of a pixel table for one slice. More... | |
cpl_error_code | muse_sky_subtract_pixtable (muse_pixtable *aPixtable, muse_sky_master *aMaster, muse_lsf_params **aLsf) |
Subtract the sky spectrum from the "data" column of a pixel table. More... | |
Variables | |
const muse_cpltable_def | muse_fluxspectrum_def [] |
Definition of the flux spectrum table structure. More... | |
The sky subtraction consists of two steps: the calculation of the common sky parameters (continuum spectrum and emission line fluxes), and the actual subtraction of this spectrum applied to LSF parameters from each slice. The communication between these two steps is realized with the muse_sky_master
structure.
As input for the master sky calculation a parameter file is used that will be read into a muse_sky_lines
structure.
This type of file contains one or more binary tables with the relative fluxes on the sky emission lines. If both tables are present, they are merged, so that lines should not appear in both tables.
Columns:
name
': Line name [string]group
': Line group id [int]lambda
': Air wavelength [double]flux
': Line flux [double]dq
': Quality of the entry (>0: dont use) [int] muse_lsf_params* muse_lsf_params_fit | ( | const cpl_array * | aLambda, |
cpl_array * | aData, | ||
const cpl_array * | aStat, | ||
const cpl_table * | aLines, | ||
muse_lsf_params * | aFirstGuess, | ||
int | aMaxIter, | ||
const muse_sky_fit_params * | aFitParams | ||
) |
Fit all entries of one slice.
aLambda | Wavelength array [Angstrom]. |
aData | Measured spectrum. |
aStat | The variance spectrum. |
aLines | List of emission lines. |
aFirstGuess | First guess for LSF params, or NULL. |
aMaxIter | Maximum number of iterations. |
aFitParams | Specification which parameters to fit |
As a quality measure, the LSF fitted lines are subtracted from the measured spectrum.
Definition at line 131 of file muse_lsf_fit.c.
References muse_lsf_params::bin_width, muse_cpl_optimize_lvmq(), muse_cpltable_extract_column(), muse_lsf_params_delete_one(), muse_lsf_params_new(), muse_lsf_spectrum_get_lines(), muse_sky_fit_params_delete(), muse_sky_fit_params_new(), muse_sky_slice_apply_lsf_parametrization(), muse_sky_slice_lsf_firstguess(), muse_sky_slice_lsf_set_param(), and muse_lsf_params::slit_width.
cpl_array* muse_sky_apply_lsf | ( | const cpl_array * | aLambda, |
const cpl_table * | aLines, | ||
const muse_lsf_params * | aLsf | ||
) |
Apply the LSF parameters to a spectrum.
aLambda | Wavelength bins [Angstrom] |
aLines | List of emission lines. |
aLsf | LSF parameters |
set CPL_ERROR_NULL_INPUT, return NULL | (aLambda != NULL) not fulfilled |
set CPL_ERROR_NULL_INPUT, return NULL | (aLines != NULL) not fulfilled |
set CPL_ERROR_NULL_INPUT, return NULL | (aLsf != NULL) not fulfilled |
This function applies the instrument LSF to create a spectrum from a sky parametrization.
linespectrum = muse_sky_spectrum_set_lines(lines, aLsf) spectrum = linespectrum + spectrum.continuum return spectrum
Definition at line 168 of file muse_sky_common.c.
References muse_lsf_params::lambda_ref, muse_cplarray_poly1d(), muse_cpltable_extract_column(), muse_lsf_spectrum_get_lines(), and muse_lsf_params::sensitivity.
Referenced by muse_sky_master_fit().
cpl_table* muse_sky_continuum_load | ( | muse_processing * | aProcessing | ) |
Load the SKY_CONTINUUM spectrum.
aProcessing | the processing structure |
Definition at line 585 of file muse_sky_master.c.
References muse_processing::inframes, muse_cpltable_load(), muse_fluxspectrum_def, muse_frameset_find(), and muse_processing_append_used().
muse_mask* muse_sky_create_skymask | ( | muse_image * | aImage, |
double | aFraction, | ||
const char * | aQCPrefix | ||
) |
Select spaxels to be considered as sky.
aImage | MUSE (white-light) image of the field of view. |
aFraction | Fraction of spectra to select |
aQCPrefix | prefix for the QC keywords |
Use thresholding to create a mask of sky regions. The output mask contains a QC parameter aQCPrefix" THRESHOLD" in its header component.
set CPL_ERROR_NULL_INPUT, return NULL | aImage is NULL |
Definition at line 119 of file muse_sky_common.c.
References muse_image::data, muse_mask::header, muse_image::header, muse_mask::mask, muse_cplimage_get_percentile(), muse_image_reject_from_dq(), and muse_mask_new().
Referenced by muse_postproc_process_exposure().
void muse_sky_fit_params_delete | ( | muse_sky_fit_params * | params | ) |
Delete the fit parameter structure.
params | Structure to destroy |
Definition at line 93 of file muse_sky_lsf_fit.c.
Referenced by muse_lsf_params_fit().
muse_sky_fit_params* muse_sky_fit_params_new | ( | cpl_boolean | aOffset, |
cpl_boolean | aRefraction, | ||
cpl_size | aSensitivity, | ||
cpl_size | aSlitWidth, | ||
cpl_size | aBinWidth, | ||
cpl_size | aLSFWidth, | ||
cpl_size | aHermit3, | ||
cpl_size | aHermit4, | ||
cpl_size | aHermit5, | ||
cpl_size | aHermit6 | ||
) |
Create a new fit parameter structure.
aOffset | Set to CPL_True if the offset is to be fit |
aRefraction | set to CPL_True if the atmospheric refraction is to be fit |
aSensitivity | Order of the sensitivity fit parameter |
aSlitWidth | Order of the slit width fit parameter |
aBinWidth | Order of the bin width fit parameter |
aLSFWidth | Order of the LSF width fit parameter |
aHermit3 | Order of the 3rd order hermitean fit parameter |
aHermit4 | Order of the 4rd order hermitean fit parameter |
aHermit5 | Order of the 5rd order hermitean fit parameter |
aHermit6 | Order of the 6rd order hermitean fit parameter |
Definition at line 58 of file muse_sky_lsf_fit.c.
Referenced by muse_lsf_params_fit().
cpl_error_code muse_sky_lines_apply_strength | ( | cpl_table * | aLines, |
const cpl_array * | aStrength | ||
) |
Apply the line strengths to the lines.
aLines | List of emission lines. |
aStrength | Array of strengths, sorted by line group. |
CPL_ERROR_NONE | Everything went OK |
CPL_ERROR_NULL_INPUT | (aLines != NULL) not fulfilled |
CPL_ERROR_NULL_INPUT | (aStrength != NULL) not fulfilled |
The line strengths are applied in-place, changing the emission lines list.
Definition at line 229 of file muse_sky_lines.c.
Referenced by muse_sky_master_fit().
cpl_table* muse_sky_lines_create | ( | const cpl_table * | aLines, |
const cpl_table * | aOh_transitions, | ||
double | aT_vibr | ||
) |
Create the emission lines from the OH transitions and other lines.
aLines | non-OH lines table |
aOh_transitions | OH transition table |
aT_vibr | structure to hold vibrational transitions |
If the input parameters are NULL
, then the function returns an empty table (default).
Definition at line 377 of file muse_sky_lines.c.
Referenced by muse_sky_lines_load().
cpl_error_code muse_sky_lines_cut | ( | cpl_table * | aLines, |
double | aMinflux | ||
) |
Remove all lines below a certain flux limit.
aLines | List of emission lines. |
aMinflux | Minimal flux, in 10^-20 erg/(s cm^2 arcsec^2) |
CPL_ERROR_NONE | Everything went OK |
CPL_ERROR_NULL_INPUT | (aLines != NULL) not fulfilled |
The line strengths are applied in-place, changing the emission lines list.
Definition at line 256 of file muse_sky_lines.c.
Referenced by muse_sky_lsf_params_fit().
cpl_table* muse_sky_lines_load | ( | muse_processing * | aProcessing | ) |
Load the sky data files.
aProcessing | the processing structure |
set CPL_ERROR_NULL_INPUT, return NULL | (aFile != NULL) not fulfilled |
The file must consist of two extensions containing the OH transition table ("OH_TRANSITIONS") and the table of other lines ("LINES").
Definition at line 168 of file muse_sky_lines.c.
References muse_processing::inframes, muse_cpltable_load(), muse_frameset_find(), muse_processing_append_used(), muse_sky_lines_create(), and muse_sky_lines_lines_def.
cpl_error_code muse_sky_lines_save | ( | muse_processing * | aProcessing, |
const cpl_table * | aLines, | ||
cpl_propertylist * | aHeader | ||
) |
Save sky lines table to file.
aProcessing | the processing structure |
aLines | the sky lines table |
aHeader | the FITS header to use for the primary HDU |
The table extension is marked with and EXTNAME of "LINES".
return CPL_ERROR_NULL_INPUT | one of the arguments is NULL |
return CPL_ERROR_ILLEGAL_INPUT | the output frame could not be created |
Definition at line 136 of file muse_sky_lines.c.
References muse_cpltable_append_file(), muse_processing_new_frame(), muse_sky_lines_lines_def, and muse_processing::outframes.
cpl_error_code muse_sky_lines_set_range | ( | cpl_table * | aLines, |
double | aLow, | ||
double | aHigh | ||
) |
Limit the lines in the table to a wavelength range.
aLines | sky lines table |
aLow | lower limit, in Angstrom |
aHigh | higher limit, in Angstrom |
CPL_ERROR_NONE | Success |
CPL_ERROR_NULL_INPUT | (aSkyData != NULL) not fulfilled |
This function is used to improve the efficiency of the fits by removing lines outside of the data range.
Definition at line 108 of file muse_sky_lines.c.
Referenced by muse_postproc_process_exposure().
muse_lsf_params* muse_sky_lsf_params_fit | ( | const cpl_array * | aLambda, |
const cpl_array * | aData, | ||
const cpl_array * | aStat, | ||
const cpl_table * | aLines, | ||
const cpl_array * | aContinuum, | ||
const cpl_array * | aSensitivity, | ||
muse_lsf_params * | aFirstGuess, | ||
int | aMaxIter, | ||
const muse_sky_fit_params * | aFitParams | ||
) |
Fit all entries of one slice.
aLambda | Wavelength array [Angstrom]. |
aData | Measured spectrum. |
aStat | The variance spectrum. |
aLines | List of emission lines. |
aContinuum | Continuum spectrum, or NULL |
aSensitivity | Sensitivity array, must correspond to aLambda. |
aFirstGuess | First guess for LSF params, or NULL. |
aMaxIter | Maximum number of iterations. |
aFitParams | Specification which parameters to fit |
Definition at line 427 of file muse_sky_lsf_fit.c.
References muse_cpl_optimize_lvmq(), muse_lsf_params_delete_one(), muse_lsf_params_new(), muse_sky_lines_cut(), muse_sky_slice_apply_lsf_parametrization(), muse_sky_slice_lsf_firstguess(), and muse_sky_slice_lsf_set_param().
void muse_sky_mark_cosmic | ( | cpl_table * | aSpectrum, |
muse_pixtable * | aPixtable | ||
) |
Mark all pixel above a certain limit as COSMIC.
aSpectrum | Reference spectrum |
aPixtable | Pixel table |
Check each selected pixel of the pixel table against the reference spectrum. If the data value of the pixel is higher than the according value of the spectrum + 5 * variance, it is considered as cosmic. This works well for sky since we assume a homogenious illumination, strong variations are not expected here.
Definition at line 208 of file muse_sky_common.c.
References muse_cpltable_find_sorted(), and muse_pixtable::table.
muse_sky_master* muse_sky_master_fit | ( | const cpl_array * | aLambda, |
const cpl_array * | aData, | ||
const cpl_array * | aStat, | ||
const cpl_table * | aLines | ||
) |
Fit all entries of the pixel table to the master sky.
aLambda | Wavelength array [Angstrom]. |
aData | Measured sky spectrum. |
aStat | Variance sky spectrum. |
aLines | Sky lines table. |
set CPL_ERROR_NULL_INPUT, return NULL | (aLambda != NULL) not fulfilled |
set CPL_ERROR_NULL_INPUT, return NULL | (aData != NULL) not fulfilled |
set CPL_ERROR_NULL_INPUT, return NULL | (aStat != NULL) not fulfilled |
set CPL_ERROR_NULL_INPUT, return NULL | (aLines != NULL) not fulfilled |
set CPL_ERROR_DATA_NOT_FOUND, return NULL | aStat has no entries |
Definition at line 463 of file muse_sky_master.c.
References muse_sky_master::continuum, muse_sky_master::lines, muse_sky_master::lsf, muse_cpl_optimize_lvmq(), muse_cpltable_copy_array(), muse_cpltable_new(), muse_fluxspectrum_def, muse_sky_apply_lsf(), muse_sky_lines_apply_strength(), and muse_sky_master_new().
Referenced by muse_postproc_process_exposure().
muse_sky_master* muse_sky_master_load | ( | muse_processing * | aProcessing | ) |
Load SKY_LINES, SKY_CONTINUUM, and LSF_PROFILE into a structure.
aProcessing | the processing structure |
set CPL_ERROR_NULL_INPUT, return NULL | invalid processing pointer |
propagate CPL error code, return NULL | SKY_LINES, SKY_CONTINUUM, or LST_TABLE frame not found in input frameset of the processing structure |
Definition at line 624 of file muse_sky_master.c.
References muse_sky_master::continuum, muse_processing::inframes, muse_sky_master::lines, muse_sky_master::lsf, muse_cpltable_load(), muse_fluxspectrum_def, muse_frameset_find(), muse_lsf_params_load(), muse_processing_append_used(), muse_sky_lines_lines_def, muse_sky_master_delete(), and muse_sky_master_new().
void muse_sky_qc_continuum | ( | cpl_propertylist * | aHeader, |
cpl_table * | aContinuum, | ||
const char * | aPrefix | ||
) |
Fill a header with the QC parameters for the sky continuum.
aHeader | header to store the QC parameters for the sky continuum |
aContinuum | sky continuum table |
aPrefix | prefix for the QC keywords |
set CPL_ERROR_NULL_INPUT and return | one of the input arguments is NULL |
set CPL_ERROR_DATA_NOT_FOUND and return | aContinuum does not contain any rows |
Definition at line 102 of file muse_sky_qc.c.
void muse_sky_qc_lines | ( | cpl_propertylist * | aHeader, |
cpl_table * | aLines, | ||
const char * | aPrefix | ||
) |
Fill a header with the QC parameters for the sky lines.
aHeader | header with the QC parameters for the sky lines |
aLines | sky line table |
aPrefix | prefix for the QC keywords |
set CPL_ERROR_NULL_INPUT and return | one of the input arguments is NULL |
set CPL_ERROR_DATA_NOT_FOUND and return | aLines does not contain any rows |
Definition at line 46 of file muse_sky_qc.c.
cpl_error_code muse_sky_save_continuum | ( | muse_processing * | aProcessing, |
const cpl_table * | aContinuum, | ||
cpl_propertylist * | aHeader | ||
) |
Save sky continuum table to file.
aProcessing | the processing structure |
aContinuum | the sky continuum table |
aHeader | the FITS header to use for the primary HDU |
The table extension is marked with and EXTNAME of "CONTINUUM".
return CPL_ERROR_NULL_INPUT | one of the arguments is NULL |
return CPL_ERROR_ILLEGAL_INPUT | the output frame could not be created |
Definition at line 264 of file muse_sky_common.c.
References muse_cpltable_append_file(), muse_processing_new_frame(), and muse_processing::outframes.
muse_lsf_params * muse_sky_slice_apply_lsf_parametrization | ( | const muse_lsf_params * | aTemplate, |
const cpl_array * | aPar, | ||
const muse_sky_fit_params * | aFitParams | ||
) |
Convert a parametrization to LSF parameters.
aTemplate | Template for parametrization values |
aPar | Parametrization values |
aFitParams | Structure defining slice parameter fitting flags |
This is the parametrization used in the SLICE procedure.
Definition at line 110 of file muse_sky_lsf_fit.c.
References muse_lsf_params::bin_width, muse_lsf_params::hermit, muse_lsf_params::lsf_width, muse_lsf_params_delete_one(), muse_lsf_params_new(), muse_lsf_params::sensitivity, and muse_lsf_params::slit_width.
Referenced by muse_lsf_params_fit(), and muse_sky_lsf_params_fit().
cpl_array * muse_sky_slice_lsf_firstguess | ( | const muse_sky_fit_params * | aFitParams | ) |
Return the parametrization values of the first guess.
aFitParams | Structure defining slice parameter fitting flags |
This array can be converted to lsf parametern using muse_lsf_slice_apply_lsf_parametrization().
Definition at line 314 of file muse_sky_lsf_fit.c.
Referenced by muse_lsf_params_fit(), and muse_sky_lsf_params_fit().
cpl_array * muse_sky_slice_lsf_set_param | ( | muse_lsf_params * | aLsf, |
const muse_sky_fit_params * | aFitParams | ||
) |
Return the parametrization values for the specific LSF params.
aLsf | slice LSF params. |
aFitParams | Structure defining slice parameter fitting flags |
Definition at line 235 of file muse_sky_lsf_fit.c.
References muse_lsf_params::bin_width, muse_lsf_params::hermit, muse_lsf_params::lsf_width, muse_lsf_params::sensitivity, and muse_lsf_params::slit_width.
Referenced by muse_lsf_params_fit(), and muse_sky_lsf_params_fit().
cpl_table* muse_sky_spectrum_from_cube | ( | muse_datacube * | aCube, |
const cpl_mask * | aMask | ||
) |
Create a spectrum out of a cube by applying a mask.
aCube | MUSE datacube. |
aMask | Mask image of sky regions. |
Definition at line 70 of file muse_sky_common.c.
References muse_datacube::data, muse_datacube::dq, muse_datacube::header, muse_cpltable_new(), and muse_dataspectrum_def.
cpl_error_code muse_sky_subtract_pixtable | ( | muse_pixtable * | aPixtable, |
muse_sky_master * | aMaster, | ||
muse_lsf_params ** | aLsf | ||
) |
Subtract the sky spectrum from the "data" column of a pixel table.
aPixtable | Pixel table to take lambda values from. |
aMaster | Master sky parameters. |
aLsf | Array with slice specific LSF parameters. |
CPL_ERROR_NONE | if everything was OK. |
set CPL_ERROR_NULL_INPUT, return CPL_ERROR_NULL_INPUT | (aPixtable != NULL) not fulfilled |
set CPL_ERROR_NULL_INPUT, return CPL_ERROR_NULL_INPUT | (aPixtable->table != NULL) not fulfilled |
set CPL_ERROR_DATA_NOT_FOUND, return CPL_ERROR_DATA_NOT_FOUND | (aPixtable->table is a pixel table) not fulfilled |
set CPL_ERROR_NULL_INPUT, return CPL_ERROR_NULL_INPUT | (aMaster != NULL) not fulfilled |
set CPL_ERROR_NULL_INPUT, return CPL_ERROR_NULL_INPUT | (aLsfs != NULL) not fulfilled |
Definition at line 159 of file muse_sky_subtract.c.
References muse_sky_master::continuum, muse_pixtable::header, muse_sky_master::lines, muse_cpltable_check(), MUSE_HDR_PT_SKYSUB, muse_lsf_params_get(), muse_pixtable_def, muse_pixtable_extracted_delete(), muse_pixtable_extracted_get_size(), muse_pixtable_extracted_get_slices(), muse_pixtable_get_nrow(), muse_pixtable_origin_get_ifu(), muse_pixtable_origin_get_slice(), muse_pixtable_restrict_wavelength(), muse_sky_subtract_slice(), and muse_pixtable::table.
Referenced by muse_postproc_process_exposure().
cpl_error_code muse_sky_subtract_rowbyrow | ( | muse_image * | aImage, |
cpl_table * | aTrace, | ||
float | aRSigma, | ||
unsigned int | aOrder | ||
) |
Subtract the sky row-by-row from a CCD-based image.
aImage | the image to subtract the sky from |
aTrace | the tracing table |
aRSigma | rejection sigma for the iterative polynomial fit |
aOrder | polynomial order for the fit of each row |
This function is based on the method developed by Lutz Wisotzki end of 2010 and documented in Dec. 2011. This function expects non-relevant pixels to be masked in some way, i.e. only pixels with DQ values equal to EURO3D_GOODPIXEL are used in the fit, see muse_sky_subtract_rowbyrow(). Then go row by row through each slice on the raw image, do an iterative horizontal polynomial fit, and subtract it.
To find the slices on the image, this functions needs a trace table (aTrace). Alternatively, if aTrace is NULL, aImage needs to contain header keywords of the form ESO.DRS.MUSE.SLICEi.CENTER containing the approximate center of each slice. In that case, the row-by-row fit extends between the pixels flagged as EURO3D_MISSDATA on either side of this center.
return CPL_ERROR_NULL_INPUT | aImage is NULL |
return CPL_ERROR_ILLEGAL_INPUT | no slices are found, because aTrace is NULL or faulty, and aImage does not contain slice center keywords |
Definition at line 224 of file muse_sky_rowbyrow.c.
References muse_image::data, muse_image::dq, muse_image::header, muse_image_save(), muse_trace_polys_delete(), muse_trace_table_get_polys_for_slice(), muse_utils_iterate_fit_polynomial(), and muse_image::stat.
Referenced by muse_postproc_process_exposure().
cpl_error_code muse_sky_subtract_rowbyrow_mask | ( | muse_image * | aImage, |
cpl_table * | aTrace | ||
) |
Prepare an (object) mask for the sky row-by-row fitting.
aImage | the image to create the mask for |
aTrace | the tracing table |
This function is based on the method developed by Lutz Wisotzki end of 2010 and documented in Dec. 2011: detect continuum objects by vertically medianing Masking object pixels rejected from an iterative first-order fit in each slice. The object pixels are marked as EURO3D_OBJECT in the DQ extension of the input image.
To find the slices on the image, this functions needs a trace table (aTrace). Alternatively, if aTrace is NULL, aImage needs to contain header keywords of the form ESO.DRS.MUSE.SLICEi.CENTER containing the approximate center of each slice. In that case, the row-by-row fit extends between the pixels flagged as EURO3D_MISSDATA on either side of this center.
return CPL_ERROR_NULL_INPUT | aImage is NULL |
return CPL_ERROR_ILLEGAL_INPUT | no slices are found, because aTrace is NULL or faulty, and aImage does not contain slice center keywords |
Definition at line 74 of file muse_sky_rowbyrow.c.
References muse_image::data, muse_image::dq, muse_image::header, muse_trace_polys_delete(), muse_trace_table_get_polys_for_slice(), and muse_utils_iterate_fit_polynomial().
Referenced by muse_postproc_process_exposure().
cpl_error_code muse_sky_subtract_slice | ( | muse_pixtable * | aPixtable, |
muse_sky_master * | aMaster, | ||
muse_lsf_params * | aLsf | ||
) |
Subtract the sky spectrum from the "data" column of a pixel table for one slice.
aPixtable | Pixel table to take lambda values from. |
aMaster | Master sky parameters. |
aLsf | Slice specific LSF parameters. |
CPL_ERROR_NONE | if everything was OK. |
The pixel table is sorted by wavelength in this function.
Definition at line 115 of file muse_sky_subtract.c.
References muse_cpltable_extract_column(), and muse_pixtable::table.
Referenced by muse_sky_subtract_pixtable().
const muse_cpltable_def muse_fluxspectrum_def[] |
Definition of the flux spectrum table structure.
lambda
: wavelength [Angstrom]flux
: Flux [erg/(s cm^2 arcsec^2)]The table can be expected to be sorted by the wavelength.
Definition at line 55 of file muse_sky_common.c.
Referenced by muse_sky_continuum_load(), muse_sky_master_fit(), and muse_sky_master_load().