Data Structures | |
| struct | muse_lsf_cube |
| Data cube/stacked image list containing the LSF for one IFU. More... | |
| struct | muse_lsf_params |
| Structure definition of detector (slice) parameters. More... | |
| struct | muse_lsf_fit_params |
| Structure to define which slice parameters are fit. More... | |
Functions | |
| static cpl_size | muse_lsf_check_arc_line (cpl_table *aPixtable, double aLambda) |
| Check the pixels for one arc line. | |
| static cpl_table * | select_arc_line (muse_pixtable *aPixtable, double aLambda, double aWindow) |
| Select the pixels for one arc line. | |
| muse_pixtable * | muse_lsf_create_arcpixtable (muse_imagelist *aImages, cpl_table *aTrace, cpl_table *aWave, cpl_table *aArcLines, int aQuality, double aWindow) |
| Read images and combine the arc lines into one pixtable. | |
| static cpl_polynomial * | muse_lsf_fit_polynomial (cpl_table *aPixtable, int aOrderLsf, int aOrderLambda) |
| Do a polynomial fit on an arc pixtable. | |
| cpl_error_code | muse_lsf_fit_slice (const muse_pixtable *aPixtable, cpl_image *aLsfImage, muse_wcs *aWCS, double aLsfRegressionWindow) |
| Compute the LSF for all wavelengths of one slice. | |
| muse_lsf_cube * | muse_lsf_cube_new (double aLsfHalfRange, cpl_size aNLsf, cpl_size aNLambda, const cpl_propertylist *aHeader) |
| Create a new LSF datacube. | |
| void | muse_lsf_cube_delete (muse_lsf_cube *aLsfCube) |
| Deallocate the memory for the LSF cube. | |
| cpl_error_code | muse_lsf_cube_save (muse_lsf_cube *aLsfCube, const char *aFileName) |
| Save the LSF cube to disk. | |
| muse_lsf_cube ** | muse_lsf_cube_load_all (muse_processing *aProcessing) |
| Load all LSF cubes for all IFUs into an array. | |
| void | muse_lsf_cube_delete_all (muse_lsf_cube **aLsfCube) |
| Delete all LSF cubes. | |
| muse_lsf_cube * | muse_lsf_cube_load (const char *aFileName, unsigned char aIFU) |
| Load a LSF cube for one single IFU from disk. | |
| cpl_image * | muse_lsf_average_cube_all (muse_lsf_cube **aLsfCube, muse_pixtable *aPixtable) |
| Create an average image from all LSF cubes. | |
| cpl_error_code | muse_lsf_fold_rectangle (cpl_image *aLsfImage, const muse_wcs *aWCS, double aBinWidth) |
| Filter an LSF image with a rectangle to model spectrum binning. | |
| cpl_error_code | muse_lsf_apply (const cpl_image *aLsfImage, const muse_wcs *aWCS, cpl_array *aVal, double aLambda) |
| Apply the LSF to a number of data points of one slice. | |
| muse_lsf_params * | muse_lsf_params_new (cpl_size n_sensit, cpl_size n_lsf_width, cpl_size n_hermit) |
| Create a new lsf_params structure. | |
| cpl_size | muse_lsf_params_get_size (muse_lsf_params **aParams) |
| Count the number of entries in the array. | |
| void | muse_lsf_params_delete (muse_lsf_params *aParams) |
| Delete an allocated muse_lsf_params structure. | |
| void | muse_lsf_params_delete_all (muse_lsf_params **aParams) |
| Delete an allocated array of muse_lsf_params structure. | |
| cpl_error_code | muse_lsf_params_save (const muse_lsf_params **aLsfParams, const char *aFile) |
| Save slice LSF parameters to the extension "slice" on disk. | |
| muse_lsf_params ** | muse_lsf_params_load (const char *aFile, muse_lsf_params **aParams, int aIFU) |
| Load slice LSF parameters from the extension "SLICE_PARAM". | |
| muse_lsf_params ** | muse_processing_lsf_params_load (muse_processing *aProcessing, int aIFU) |
| Load slice LSF parameters. | |
| muse_lsf_params * | muse_lsf_params_get (muse_lsf_params **aParams, int aIFU, int aSlice) |
| Get the slice LSF parameters for one slice. | |
| static cpl_array * | muse_lsf_G (cpl_array *aX, cpl_array *aCoeffs) |
| Helper function "G" for integrated damped gauss-hermitean function. | |
| cpl_error_code | muse_lsf_params_apply (const muse_lsf_params *aLsfParams, cpl_array *aVal, double aLambda) |
| Apply the MUSE LSF function to a single line. | |
| cpl_array * | muse_lsf_params_spectrum (const cpl_array *aLambda, cpl_table *aLines, const muse_lsf_params *aLsfParams) |
| Create spectrum for a single slice. | |
| muse_lsf_fit_params * | muse_lsf_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. | |
| void | muse_lsf_fit_params_delete (muse_lsf_fit_params *params) |
| Delete the fit parameter structure. | |
| muse_lsf_params * | muse_lsf_params_fit (muse_pixtable *aPixtable, cpl_table *aLines, int aMaxIter) |
| Fit all entries of one slice. | |
| double | muse_lsf_fwhm_lambda (const muse_lsf_params *aDP, double aLambda, double aSampling, unsigned int aLength) |
| Measure the FWHM of an LSF at a given wavelength. | |
Variables | |
| const muse_cpltable_def | muse_lsfparams_def [] |
| Definition of a lsf parameters table. | |
| cpl_error_code muse_lsf_apply | ( | const cpl_image * | aLsfImage, | |
| const muse_wcs * | aWCS, | |||
| cpl_array * | aVal, | |||
| double | aLambda | |||
| ) |
Apply the LSF to a number of data points of one slice.
| aLsfImage | The slice specific image from the LSF cube | |
| aWCS | The WCS of the image. | |
| aVal | Array with wavelengths [A]. Will be replaced by the normalized LSF data points | |
| aLambda | Line wavelength reference [A]. |
| CPL_ERROR_NONE | Everything went OK | |
| CPL_ERROR_NULL_INPUT | (aLsfImage) not fulfilled | |
| CPL_ERROR_NULL_INPUT | (aWCS) not fulfilled | |
| CPL_ERROR_NULL_INPUT | (aVal) not fulfilled |
Referenced by muse_sky_lines_spectrum().
| cpl_image * muse_lsf_average_cube_all | ( | muse_lsf_cube ** | aLsfCube, | |
| muse_pixtable * | aPixtable | |||
| ) |
Create an average image from all LSF cubes.
| aLsfCube | Array of all LSF cubes | |
| aPixtable | Pixtable for the weighting, or NULL |
All images from all cubes are squeezed into one image. If a pixtable is given, each IFU/slice is weighted with the number of entries in the pixtable for this IFU/slice.
Referenced by muse_postproc_process_exposure().
| static cpl_size muse_lsf_check_arc_line | ( | cpl_table * | aPixtable, | |
| double | aLambda | |||
| ) | [static] |
Check the pixels for one arc line.
| aPixtable | The pixel table with pixels around the line | |
| aLambda | The arc line reference wavelength |
The basic check is done with a gaussian fit, which also gives the total flux for this line. Lines with a low flux, and lines with an implausible Gaussian width are completely ignored (the function returns 0). Otherwise, pixels that deviate too much from the gaussian are deleted from the pixel table.
Finally, new columns line_lambda, line_flux, and line_background are added to the pixel table and set with the constant values of the aLambda parameter, the calculated total line flux, and the calculated continuum background.
Definition at line 75 of file muse/muse_lsf.c.
References muse_pixtable_origin_get_ifu(), and muse_pixtable_origin_get_slice().
Referenced by select_arc_line().
| muse_pixtable * muse_lsf_create_arcpixtable | ( | muse_imagelist * | aImages, | |
| cpl_table * | aTrace, | |||
| cpl_table * | aWave, | |||
| cpl_table * | aArcLines, | |||
| int | aQuality, | |||
| double | aWindow | |||
| ) |
Read images and combine the arc lines into one pixtable.
| aImages | List of arc images | |
| aTrace | Table containing the trace solution | |
| aWave | Table containing the wavelength calibration solution | |
| aArcLines | ARC reference line table | |
| aQuality | Minimal line quality to select | |
| aWindow | Wavelength window around each line |
| Combined | pixel table or NULL on error |
| set CPL_ERROR_NULL_INPUT, return NULL | (aImages) not fulfilled | |
| set CPL_ERROR_NULL_INPUT, return NULL | (aTrace) not fulfilled | |
| set CPL_ERROR_NULL_INPUT, return NULL | (aWave) not fulfilled | |
| set CPL_ERROR_NULL_INPUT, return NULL | (aArcLines) not fulfilled |
Create pixel tables from all images in the aImages list, select the pixels around each arc line, and store the resulting pixels in a new pixtable.
The output pixel table will have additional columns line_lambda, line_flux, and line_background, containing the reference wavelength, the estimated flux, and the background level of the corresponding line.
| void muse_lsf_cube_delete | ( | muse_lsf_cube * | aLsfCube | ) |
Deallocate the memory for the LSF cube.
| aLsfCube | The LSF cube to deallocate |
| void muse_lsf_cube_delete_all | ( | muse_lsf_cube ** | aLsfCube | ) |
Delete all LSF cubes.
| aLsfCube | Array of 48 data cubes |
Referenced by muse_postproc_properties_delete().
| muse_lsf_cube * muse_lsf_cube_load | ( | const char * | aFileName, | |
| unsigned char | aIFU | |||
| ) |
Load a LSF cube for one single IFU from disk.
| aFileName | FITS file name | |
| aIFU | the IFU number |
| The | LSF cube. |
| set CPL_ERROR_NULL_INPUT, return NULL | (aFileName) not fulfilled |
| muse_lsf_cube ** muse_lsf_cube_load_all | ( | muse_processing * | aProcessing | ) |
Load all LSF cubes for all IFUs into an array.
| aProcessing | the processing structure |
This function output a warning message, if one of the files from the input frameset cannot be loaded or if the LSFs for one of the IFUs cannot be found.
| set CPL_ERROR_NULL_INPUT, return NULL | (aProcessing) not fulfilled |
| muse_lsf_cube * muse_lsf_cube_new | ( | double | aLsfHalfRange, | |
| cpl_size | aNLsf, | |||
| cpl_size | aNLambda, | |||
| const cpl_propertylist * | aHeader | |||
| ) |
Create a new LSF datacube.
| aLsfHalfRange | Half width of the range in LSF direction | |
| aNLsf | Number of data points in LSF direction | |
| aNLambda | Number of data points in line wavelength direction | |
| aHeader | Header to derive the LSF cube header from (can be NULL) |
| cpl_error_code muse_lsf_cube_save | ( | muse_lsf_cube * | aLsfCube, | |
| const char * | aFileName | |||
| ) |
Save the LSF cube to disk.
| aLsfCube | The LSF cube | |
| aFileName | FITS file name |
Referenced by muse_processing_save_cube().
| void muse_lsf_fit_params_delete | ( | muse_lsf_fit_params * | params | ) |
Delete the fit parameter structure.
| params | Structure to destroy |
Definition at line 717 of file muse_lsf_params.c.
Referenced by muse_lsf_params_fit().
| muse_lsf_fit_params* muse_lsf_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 682 of file muse_lsf_params.c.
Referenced by muse_lsf_params_fit().
| static cpl_polynomial* muse_lsf_fit_polynomial | ( | cpl_table * | aPixtable, | |
| int | aOrderLsf, | |||
| int | aOrderLambda | |||
| ) | [static] |
Do a polynomial fit on an arc pixtable.
| aPixtable | special pixel table with arc lines | |
| aOrderLsf | polynomial order in x (LSF) direction | |
| aOrderLambda | polynomial order in y (arc line wavelength) direction |
| set CPL_ERROR_ILLEGAL_INPUT, return NULL | (aPixtable["d_lambda"] != NULL) not fulfilled | |
| set CPL_ERROR_ILLEGAL_INPUT, return NULL | (aPixtable["line_lambda"] != NULL) not fulfilled | |
| set CPL_ERROR_ILLEGAL_INPUT, return NULL | (aPixtable["data"] != NULL) not fulfilled | |
| set CPL_ERROR_ILLEGAL_INPUT, return NULL | (aPixtable["line_flux"] != NULL) not fulfilled | |
| set CPL_ERROR_ILLEGAL_INPUT, return NULL | (aPixtable["line_background"] != NULL) not fulfilled |
The fit is done in two dimensions: x direction is the pixel wavelength, relative to the arc line (column d_lambda), and y direction is the arc line wavelength (column line_lambda).
The data are normalized by dividing by the according line flux (column line_flux) and line background (column line_background)
If there are not enough data points, or if the fit fails for other reasons, the funtion returns NULL, without setting an error.
Definition at line 346 of file muse/muse_lsf.c.
| cpl_error_code muse_lsf_fit_slice | ( | const muse_pixtable * | aPixtable, | |
| cpl_image * | aLsfImage, | |||
| muse_wcs * | aWCS, | |||
| double | aLsfRegressionWindow | |||
| ) |
Compute the LSF for all wavelengths of one slice.
| aPixtable | Special pixel table with arc lines. | |
| aLsfImage | Image to store the LSF. | |
| aWCS | The WCS of the image. | |
| aLsfRegressionWindow | The Regression window in LSF direction. |
| CPL_ERROR_NONE | Everything went OK | |
| CPL_ERROR_NULL_INPUT | (aPixtable) not fulfilled | |
| CPL_ERROR_NULL_INPUT | (aLsfImage) not fulfilled | |
| CPL_ERROR_NULL_INPUT | (aWCS) not fulfilled | |
| CPL_ERROR_ILLEGAL_INPUT | (aLsfRegressionWindow > 0) not fulfilled |
The pixel table is assumed to be restricted to one slice.
The LSF is computed as a twodimensional regression fit, with the wavelength of the pixel in the x (LSF) direction, and the arc line reference wavelength in y direction. The regression window in x (LSF) direction is taken as parameter; in y (line wavelength) direction always the full range is used.
As fit, a polynomial fit with order 2 in x (LSF) and order 3 in y (line wavelength) direction is used. One fit per x value is done.
After the fit, the according pixels in the image are set to the LSF. If a fit did not succeed, the pixels in the according image column are set invalid.
| cpl_error_code muse_lsf_fold_rectangle | ( | cpl_image * | aLsfImage, | |
| const muse_wcs * | aWCS, | |||
| double | aBinWidth | |||
| ) |
Filter an LSF image with a rectangle to model spectrum binning.
| aLsfImage | The LSF image. Filtering is in-place. | |
| aWCS | The WCS of the image. | |
| aBinWidth | The width of the rectangle. |
| return CPL_ERROR_NULL_INPUT | aLsfImage and/or aWcs are NULL | |
| return CPL_ERROR_ILLEGAL_INPUT | aBinWidth is not positive |
Referenced by muse_postproc_process_exposure().
| double muse_lsf_fwhm_lambda | ( | const muse_lsf_params * | aDP, | |
| double | aLambda, | |||
| double | aSampling, | |||
| unsigned int | aLength | |||
| ) |
Measure the FWHM of an LSF at a given wavelength.
| aDP | the LSF parameters (for one IFU and slice) | |
| aLambda | wavelength at which to evaluate the LSF | |
| aSampling | sampling of the spectrum in Angstrom | |
| aLength | length of spectrum in pixels |
This function creates a spectrum of given aLength with given resolution (aSampling), fills it with a line with a reference flux (1.0) at the given wavelength aLambda. This spectrum is then used to measures peak intensity, searches for the position where the intensity reaches half the peak, to derive the FWHM from this.
| set CPL_ERROR_NULL_INPUT, return 0. | aDP is NULL | |
| set CPL_ERROR_ILLEGAL_INPUT, return 0. | aDP contains lsf_width of zero or one | |
| set CPL_ERROR_ILLEGAL_OUTPUT, return 0. | FWHM is outside the test spectrum for the given parameters |
Definition at line 1265 of file muse_lsf_params.c.
References muse_lsf_params::lsf_width, and muse_lsf_params_spectrum().
| static cpl_array* muse_lsf_G | ( | cpl_array * | aX, | |
| cpl_array * | aCoeffs | |||
| ) | [static] |
Helper function "G" for integrated damped gauss-hermitean function.
| aX | X values array to apply | |
| aCoeffs | pointer to five values for the damping polynomial |
| set CPL_ERROR_NULL_INPUT, return 0.0 | (aX != NULL) not fulfilled | |
| set CPL_ERROR_NULL_INPUT, return 0.0 | (aCoeffs != NULL) not fulfilled |
R(x) = aCoeffs[0] * x**4 + aCoeffs[1] * x**3
+ aCoeffs[2] * x**2 + aCoeffs[3] * x + aCoeffs[4]
G(x) = exp(-0.5 * x**2)
+ R(x) * exp(-x**2) / 60
+ x * sqrt(Pi/2) * erf(x * sqrt(0.5))Definition at line 489 of file muse_lsf_params.c.
References muse_cplarray_erf(), muse_cplarray_exp(), and muse_cplarray_poly1d().
Referenced by muse_lsf_params_apply().
| cpl_error_code muse_lsf_params_apply | ( | const muse_lsf_params * | aLsfParams, | |
| cpl_array * | aVal, | |||
| double | aLambda | |||
| ) |
Apply the MUSE LSF function to a single line.
| aLsfParams | LSF parameters | |
| aVal | Array with wavelengths [A]. Will be replaced by the normalized LSF data points | |
| aLambda | Line wavelength reference [A]. |
| CPL_ERROR_NONE | Everything went OK | |
| CPL_ERROR_NULL_INPUT | (aLsfParamsImage) not fulfilled | |
| CPL_ERROR_NULL_INPUT | (aWCS) not fulfilled | |
| CPL_ERROR_NULL_INPUT | (aVal) not fulfilled |
x = (aVal - aLambda) / aLsfParams.width slit_width = aLsfParams.slit_width / aLsfParams.width bin_width = aLsfParams.bin_width / aLsfParams.width aVal = G(x + slit_width/2 + bin_width/2) - G(x - slit_width/2 + bin_width/2) - G(x + slit_width/2 - bin_width/2) + G(x - slit_width/2 - bin_width/2)
Definition at line 544 of file muse_lsf_params.c.
References muse_lsf_params::bin_width, muse_lsf_params::hermit, muse_lsf_params::lambda_ref, muse_lsf_params::lsf_width, muse_cplarray_poly1d_double(), muse_lsf_G(), and muse_lsf_params::slit_width.
Referenced by muse_lsf_params_spectrum().
| void muse_lsf_params_delete | ( | muse_lsf_params * | aParams | ) |
Delete an allocated muse_lsf_params structure.
| aParams | Structure to delete. |
Definition at line 122 of file muse_lsf_params.c.
References muse_lsf_params::hermit, muse_lsf_params::lsf_width, and muse_lsf_params::sensitivity.
Referenced by muse_lsf_params_delete_all(), and muse_lsf_params_fit().
| void muse_lsf_params_delete_all | ( | muse_lsf_params ** | aParams | ) |
Delete an allocated array of muse_lsf_params structure.
| aParams | Structure to delete. |
Definition at line 141 of file muse_lsf_params.c.
References muse_lsf_params_delete().
Referenced by muse_postproc_properties_delete().
| muse_lsf_params* muse_lsf_params_fit | ( | muse_pixtable * | aPixtable, | |
| cpl_table * | aLines, | |||
| int | aMaxIter | |||
| ) |
Fit all entries of one slice.
| aPixtable | Pixel table created from an arc exposure. | |
| aLines | List of emission lines. | |
| aMaxIter | Maximum number of iterations. |
As a quality measure, the LSF fitted lines are subtracted from the measured spectrum.
| set CPL_ERROR_NULL_INPUT, return NULL | aPixtable is NULL |
Definition at line 1072 of file muse_lsf_params.c.
References muse_lsf_params::bin_width, muse_cpl_optimize_lvmq(), muse_cpltable_extract_column(), muse_lsf_fit_params_delete(), muse_lsf_fit_params_new(), muse_lsf_params_delete(), muse_lsf_params_new(), muse_lsf_params_spectrum(), muse_pixtable_origin_get_ifu(), muse_pixtable_origin_get_slice(), muse_lsf_params::slit_width, and muse_pixtable::table.
| muse_lsf_params* muse_lsf_params_get | ( | muse_lsf_params ** | aParams, | |
| int | aIFU, | |||
| int | aSlice | |||
| ) |
Get the slice LSF parameters for one slice.
Definition at line 457 of file muse_lsf_params.c.
Referenced by muse_sky_subtract_lines_old().
| cpl_size muse_lsf_params_get_size | ( | muse_lsf_params ** | aParams | ) |
Count the number of entries in the array.
| aParams | LSF parameter array |
Definition at line 104 of file muse_lsf_params.c.
Referenced by muse_lsf_params_load().
| muse_lsf_params** muse_lsf_params_load | ( | const char * | aFile, | |
| muse_lsf_params ** | aParams, | |||
| int | aIFU | |||
| ) |
Load slice LSF parameters from the extension "SLICE_PARAM".
| aFile | File name (file must exist, is written as extension) | |
| aParams | NULL-terminated array of LSF parameters to append to, or NULL. | |
| aIFU | the IFU/channel number, or 0 for all IFUs/channels |
The extension "SLICE_PARAM" (or "CHANnn.SLICE_PARAM") is expected to be a table with the slice dependent LSF parameters.
Definition at line 302 of file muse_lsf_params.c.
References muse_lsf_params::bin_width, muse_lsf_params::hermit, muse_lsf_params::lsf_width, muse_cpltable_get_array_copy(), muse_cpltable_load(), muse_lsf_params_get_size(), muse_lsf_params_new(), muse_lsf_params::sensitivity, and muse_lsf_params::slit_width.
Referenced by muse_processing_lsf_params_load().
| muse_lsf_params* muse_lsf_params_new | ( | cpl_size | n_sensit, | |
| cpl_size | n_lsf_width, | |||
| cpl_size | n_hermit | |||
| ) |
Create a new lsf_params structure.
| n_sensit | Order of polynomial sensitivity parametrization. | |
| n_lsf_width | Order of polynomial lsf width parametrization. | |
| n_hermit | Order of polynomial parametrization of hermitean coefficients. |
All polynomial parametrizations are meant as wavelength dependent.
Definition at line 68 of file muse_lsf_params.c.
References muse_lsf_params::bin_width, muse_lsf_params::hermit, muse_lsf_params::lambda_ref, muse_lsf_params::lsf_width, muse_lsf_params::sensitivity, and muse_lsf_params::slit_width.
Referenced by muse_lsf_params_fit(), and muse_lsf_params_load().
| cpl_error_code muse_lsf_params_save | ( | const muse_lsf_params ** | aLsfParams, | |
| const char * | aFile | |||
| ) |
Save slice LSF parameters to the extension "slice" on disk.
| aLsfParams | NULL-terminated array of LSF parameters. | |
| aFile | File name (file must exist, is written as extension) |
| CPL_ERROR_NONE | if everything went OK | |
| CPL_ERROR_NULL_INPUT | (aLsfParams != NULL) not fulfilled | |
| CPL_ERROR_DATA_NOT_FOUND | (*aLsfParams != NULL) not fulfilled | |
| CPL_ERROR_NULL_INPUT | (aFile != NULL) not fulfilled |
The slice parameters are converted to a table structure:
ifu: IFU numberslice: slice number within the IFUsensitivitysensitivity, relative to the referencelsf_width: LSF gauss-hermitean width [Angstrom]hermit3: 3rd order hermitean coefficienthermit4: 4th order hermitean coefficienthermit5: 5th order hermitean coefficienthermit6: 6th order hermitean coefficient Definition at line 208 of file muse_lsf_params.c.
References muse_cpltable_append_file().
| cpl_array* muse_lsf_params_spectrum | ( | const cpl_array * | aLambda, | |
| cpl_table * | aLines, | |||
| const muse_lsf_params * | aLsfParams | |||
| ) |
Create spectrum for a single slice.
| aLambda | Wavelength array. | |
| aLines | Sky emission line table | |
| aLsfParams | LSF parameters to use return the spectrum as cpl_array |
The values in the returned array correspond to the wavelengths in the aLambda parameter.
spectrum = 0
for line in aLines:
spectrum += muse_lsf_line_apply(aLambda - line.lambda, line.lambda) * line.flux
return spectrumDefinition at line 628 of file muse_lsf_params.c.
References muse_cplarray_add_window(), muse_cplarray_find_sorted(), and muse_lsf_params_apply().
Referenced by muse_lsf_fwhm_lambda(), muse_lsf_params_fit(), and muse_sky_subtract_lines_old().
| muse_lsf_params** muse_processing_lsf_params_load | ( | muse_processing * | aProcessing, | |
| int | aIFU | |||
| ) |
Load slice LSF parameters.
| aProcessing | the processing structure | |
| aIFU | the IFU/channel number, or 0 for all IFUs/channels |
| set CPL_ERROR_NULL_INPUT, return NULL | invalid processing pointer | |
| propagate CPL error code, return NULL | LST_TABLE frame not found in input frameset of the processing structure |
The input files must be tables with the slice dependent LSF parameters.
Definition at line 392 of file muse_lsf_params.c.
References muse_processing::inframes, muse_frameset_find(), muse_lsf_params_load(), and muse_processing_append_used().
| static cpl_table* select_arc_line | ( | muse_pixtable * | aPixtable, | |
| double | aLambda, | |||
| double | aWindow | |||
| ) | [static] |
Select the pixels for one arc line.
| aPixtable | The pixel table for one slice | |
| aLambda | The arc line reference wavelength | |
| aWindow | Wavelength window around each line |
From the pixel table, the pixels around the specified wavelength are selected. Then, a simple gaussian fit is made and the pixels that are too far from the gaussian are removed as a simple rejection of cosmics. Also, the reference wavelength and the estimated flux (from the gaussian fit) are added as additional columns line_lambda, line_flux, and line_background
If no line is found, NULL is returned.
Definition at line 186 of file muse/muse_lsf.c.
References muse_cpltable_find_sorted(), muse_lsf_check_arc_line(), and muse_pixtable::table.
| const muse_cpltable_def muse_lsfparams_def[] |
{
{"ifu", CPL_TYPE_INT, NULL, "%i", "IFU number", CPL_TRUE},
{"slice", CPL_TYPE_INT, NULL, "%i", "slice number within the IFU", CPL_TRUE},
{"sensitivity", CPL_TYPE_DOUBLE | CPL_TYPE_POINTER, NULL, "%e",
"detector sensitivity, relative to the reference", CPL_TRUE},
{"offset", CPL_TYPE_DOUBLE, NULL, "%e", "wavelength calibration offset", CPL_TRUE},
{"refraction", CPL_TYPE_DOUBLE, NULL, "%e", "relative refraction index", CPL_TRUE},
{"slit_width", CPL_TYPE_DOUBLE, "Angstrom", "%e", "slit width", CPL_TRUE},
{"bin_width", CPL_TYPE_DOUBLE, "Angstrom", "%e", "bin width", CPL_TRUE},
{"lsf_width", CPL_TYPE_DOUBLE | CPL_TYPE_POINTER, "Angstrom", "%e",
" LSF gauss-hermitean width", CPL_TRUE},
{"hermit3", CPL_TYPE_DOUBLE | CPL_TYPE_POINTER, NULL, "%e",
"3rd order hermitean coefficient", CPL_TRUE},
{"hermit4", CPL_TYPE_DOUBLE | CPL_TYPE_POINTER, NULL, "%e",
"4th order hermitean coefficient", CPL_TRUE},
{"hermit5", CPL_TYPE_DOUBLE | CPL_TYPE_POINTER, NULL, "%e",
"5th order hermitean coefficient", CPL_TRUE},
{"hermit6", CPL_TYPE_DOUBLE | CPL_TYPE_POINTER, NULL, "%e",
"6th order hermitean coefficient", CPL_TRUE},
{ NULL, 0, NULL, NULL, NULL, CPL_FALSE }
}
Definition of a lsf parameters table.
ifu: IFU numberslice: slice number within the IFUsensitivitysensitivity, relative to the referencelsf_width: LSF gauss-hermitean width [Angstrom]hermit3: 3rd order hermitean coefficienthermit4: 4th order hermitean coefficienthermit5: 5th order hermitean coefficienthermit6: 6th order hermitean coefficient Definition at line 166 of file muse_lsf_params.c.
1.6.1