|
MUSE Pipeline Reference Manual
2.5.2
|
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 | |
| 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. More... | |
| 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. More... | |
| muse_lsf_cube * | muse_lsf_cube_new (double aLsfHalfRange, cpl_size aNLsf, cpl_size aNLambda, const cpl_propertylist *aHeader) |
| Create a new LSF datacube. More... | |
| void | muse_lsf_cube_delete (muse_lsf_cube *aLsfCube) |
| Deallocate the memory for the LSF cube. More... | |
| cpl_error_code | muse_lsf_cube_save (muse_lsf_cube *aLsfCube, const char *aFileName) |
| Save the LSF cube to disk. More... | |
| muse_lsf_cube ** | muse_lsf_cube_load_all (muse_processing *aProcessing) |
| Load all LSF cubes for all IFUs into an array. More... | |
| void | muse_lsf_cube_delete_all (muse_lsf_cube **aLsfCube) |
| Delete all LSF cubes. More... | |
| muse_lsf_cube * | muse_lsf_cube_load (const char *aFileName, unsigned char aIFU) |
| Load a LSF cube for one single IFU from disk. More... | |
| cpl_image * | muse_lsf_average_cube_all (muse_lsf_cube **aLsfCube, muse_pixtable *aPixtable) |
| Create an average image from all LSF cubes. More... | |
| muse_wcs * | muse_lsf_cube_get_wcs_all (muse_lsf_cube **aLsfCubes) |
| Get the world coordinate representative of all LSF cubes. More... | |
| 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. More... | |
| 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. More... | |
| cpl_error_code | muse_lsf_apply_slice (muse_pixtable *aPixtable, double aWavelength, double aFlux, cpl_image *aLsfImage, muse_wcs *aLsfWCS) |
| Add line spread function to a MUSE slice of a pixtable. More... | |
| 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. More... | |
| cpl_size | muse_lsf_params_get_size (muse_lsf_params **aParams) |
| Count the number of entries in the array. More... | |
| void | muse_lsf_params_delete (muse_lsf_params *aParams) |
| Delete an allocated muse_lsf_params structure. More... | |
| void | muse_lsf_params_delete_all (muse_lsf_params **aParams) |
| Delete an allocated array of muse_lsf_params structure. More... | |
| 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. More... | |
| 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". More... | |
| muse_lsf_params ** | muse_processing_lsf_params_load (muse_processing *aProcessing, int aIFU) |
| Load slice LSF parameters. More... | |
| muse_lsf_params * | muse_lsf_params_get (muse_lsf_params **aParams, int aIFU, int aSlice) |
| Get the slice LSF parameters for one slice. More... | |
| static cpl_array * | muse_lsf_G (cpl_array *aX, cpl_array *aCoeffs) |
| Helper function "G" for integrated damped gauss-hermitean function. More... | |
| 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. More... | |
| cpl_array * | muse_lsf_params_spectrum (const cpl_array *aLambda, cpl_table *aLines, const muse_lsf_params *aLsfParams) |
| Create spectrum for a single slice. More... | |
| 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. More... | |
| void | muse_lsf_fit_params_delete (muse_lsf_fit_params *params) |
| Delete the fit parameter structure. More... | |
| muse_lsf_params * | muse_lsf_params_fit (muse_pixtable *aPixtable, cpl_table *aLines, int aMaxIter) |
| Fit all entries of one slice. More... | |
| 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. More... | |
Variables | |
| const muse_cpltable_def | muse_lsfparams_def [] |
| Definition of a lsf parameters table. More... | |
| 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_NULL_INPUT | (aLsfImage) not fulfilled |
| CPL_ERROR_NULL_INPUT | (aWCS) not fulfilled |
| CPL_ERROR_NULL_INPUT | (aVal) not fulfilled |
Definition at line 923 of file muse/muse_lsf.c.
References muse_wcs::cd22, muse_wcs::crpix2, muse_wcs::crval2, and muse_cplarray_interpolate_linear().
Referenced by muse_lsf_apply_slice(), and muse_sky_lines_spectrum().
| cpl_error_code muse_lsf_apply_slice | ( | muse_pixtable * | aPixtable, |
| double | aWavelength, | ||
| double | aFlux, | ||
| cpl_image * | aLsfImage, | ||
| muse_wcs * | aLsfWCS | ||
| ) |
Add line spread function to a MUSE slice of a pixtable.
| aPixtable | table containing one slice, with wavelength and an lsf column |
| aWavelength | line wave length |
| aFlux | line flux |
| aLsfImage | image containing the line spread function for the slice |
| aLsfWCS | WCS definition for aLsfImage |
This will add the LSF for one line to the pixtable. The pixtable is required to hold an "lsf" column with values set to zero. Subsequent calls of this function add the line spread functions of each call.
Definition at line 1010 of file muse/muse_lsf.c.
References muse_cplarray_add_window(), muse_cplarray_find_sorted(), muse_cpltable_extract_column(), muse_lsf_apply(), MUSE_PIXTABLE_LAMBDA, and muse_pixtable::table.
Referenced by muse_raman_add_lsf().
| 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.
Definition at line 781 of file muse/muse_lsf.c.
References muse_pixtable_get_nrow(), MUSE_PIXTABLE_ORIGIN, muse_pixtable_origin_get_ifu(), muse_pixtable_origin_get_slice(), and muse_pixtable::table.
Referenced by muse_postproc_process_exposure().
| 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 |
| 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.
Definition at line 250 of file muse/muse_lsf.c.
References muse_pixtable::header, muse_cpltable_new(), muse_imagelist_get(), muse_imagelist_get_size(), muse_pfits_get_mode(), muse_pixtable_create(), MUSE_PIXTABLE_DATA, muse_pixtable_def, muse_pixtable_delete(), muse_pixtable_extracted_delete(), muse_pixtable_extracted_get_size(), muse_pixtable_extracted_get_slices(), muse_utils_header_get_lamp_names(), muse_wave_lines_covered_by_data(), muse_wave_lines_get_lampname(), and muse_pixtable::table.
| void muse_lsf_cube_delete | ( | muse_lsf_cube * | aLsfCube | ) |
Deallocate the memory for the LSF cube.
| aLsfCube | The LSF cube to deallocate |
Definition at line 584 of file muse/muse_lsf.c.
References muse_lsf_cube::header, muse_lsf_cube::img, and muse_lsf_cube::wcs.
Referenced by muse_lsf_cube_delete_all(), and muse_lsf_cube_load().
| void muse_lsf_cube_delete_all | ( | muse_lsf_cube ** | aLsfCube | ) |
Delete all LSF cubes.
| aLsfCube | array of 48 data cubes |
Definition at line 696 of file muse/muse_lsf.c.
References muse_lsf_cube_delete().
Referenced by muse_lsf_cube_load_all(), and muse_postproc_properties_delete().
| muse_wcs * muse_lsf_cube_get_wcs_all | ( | muse_lsf_cube ** | aLsfCubes | ) |
Get the world coordinate representative of all LSF cubes.
| aLsfCubes | the array of LSF cubes |
Since apparently nobody messed with the cube's WCS, it is enough to just return the first WCS found.
XXX this should really check that all WCSs are identical!
| set CPL_ERROR_NULL_INPUT, return NULL | aLsfCubes are NULL |
Definition at line 860 of file muse/muse_lsf.c.
References muse_lsf_cube::wcs.
Referenced by muse_postproc_process_exposure().
| 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 |
| set CPL_ERROR_NULL_INPUT, return NULL | (aFileName) not fulfilled |
Definition at line 718 of file muse/muse_lsf.c.
References muse_wcs::cd22, muse_wcs::crpix2, muse_wcs::crval2, muse_lsf_cube::header, muse_lsf_cube::img, muse_lsf_cube_delete(), muse_pfits_get_cd(), muse_pfits_get_crpix(), muse_pfits_get_crval(), and muse_lsf_cube::wcs.
Referenced by muse_lsf_cube_load_all().
| 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 |
Definition at line 648 of file muse/muse_lsf.c.
References muse_processing::inframes, muse_frameset_find(), muse_lsf_cube_delete_all(), muse_lsf_cube_load(), and muse_processing_append_used().
| 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) |
Definition at line 546 of file muse/muse_lsf.c.
References muse_wcs::cd22, muse_wcs::crpix2, muse_wcs::crval2, muse_lsf_cube::header, muse_lsf_cube::img, MUSE_WCS_KEYS, and muse_lsf_cube::wcs.
| 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 |
Definition at line 603 of file muse/muse_lsf.c.
References muse_wcs::cd22, muse_wcs::crpix2, muse_wcs::crval2, muse_lsf_cube::header, muse_lsf_cube::img, and muse_lsf_cube::wcs.
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 712 of file muse_lsf_params.c.
References muse_lsf_params::bin_width, muse_lsf_params::hermit, muse_lsf_params::lsf_width, muse_lsf_params_delete(), muse_lsf_params_new(), muse_lsf_params_spectrum(), muse_lsf_params::sensitivity, and muse_lsf_params::slit_width.
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 677 of file muse_lsf_params.c.
Referenced by muse_lsf_params_fit().
| 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_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.
Definition at line 443 of file muse/muse_lsf.c.
References muse_wcs::cd22, muse_wcs::crpix2, muse_wcs::crval2, muse_cpltable_find_sorted(), muse_pixtable_get_nrow(), MUSE_PIXTABLE_LAMBDA, MUSE_PIXTABLE_ORIGIN, muse_pixtable_origin_get_ifu(), muse_pixtable_origin_get_slice(), and muse_pixtable::table.
| 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 |
Definition at line 885 of file muse/muse_lsf.c.
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 1260 of file muse_lsf_params.c.
References muse_lsf_params::lsf_width, and muse_lsf_params_spectrum().
|
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 484 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 539 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 117 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_fit_params_delete(), 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 136 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 1067 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_DATA, MUSE_PIXTABLE_LAMBDA, MUSE_PIXTABLE_ORIGIN, muse_pixtable_origin_get_ifu(), muse_pixtable_origin_get_slice(), MUSE_PIXTABLE_STAT, 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 452 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 99 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 297 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 63 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_fit_params_delete(), 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 203 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 spectrum Definition at line 623 of file muse_lsf_params.c.
References muse_cplarray_add_window(), muse_cplarray_find_sorted(), and muse_lsf_params_apply().
Referenced by muse_lsf_fit_params_delete(), 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 387 of file muse_lsf_params.c.
References muse_processing::inframes, muse_frameset_find(), muse_lsf_params_load(), and muse_processing_append_used().
| const muse_cpltable_def muse_lsfparams_def[] |
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 161 of file muse_lsf_params.c.
1.8.11