MUSE Pipeline Reference Manual  2.5.2
Functions
Raman scattering light removal procedures

Functions

cpl_table * muse_raman_lines_load (muse_processing *aProcessing)
 Load the raman lines file. More...
 
cpl_error_code muse_raman_add_lsf (muse_pixtable *aPixtable, cpl_table *aRamanLines, int aGroup, double aFlux, muse_lsf_cube **aLsfCube)
 Add a Raman line profile to pixtable. More...
 
cpl_array * muse_raman_simulate (muse_pixtable *aPixtable, cpl_array *aPar, cpl_array *aRetval)
 Apply the LSF and spatial Raman light distribution. More...
 
muse_image * muse_raman_simulate_image (const muse_image *aImage, const cpl_array *aPar)
 Simulate an image of the parameters of the spatial Raman light fit. More...
 
static cpl_error_code muse_raman_eval (void *aData, cpl_array *aPar, cpl_array *aRetval)
 Evaluate a given parameter set for the Raman fit. More...
 
cpl_array * muse_raman_fit (muse_pixtable *aPixtable[MUSE_RAMAN_RANGES])
 Fit raman lines to an array of pixtables. More...
 

Detailed Description

This module contains functionality to remove the Raman scattering lines of the O2 and N2 molecules, exited around the Laser Guide Stars of the 4LGSF used by the GALACSI AO system of MUSE.

Function Documentation

cpl_error_code muse_raman_add_lsf ( muse_pixtable *  aPixtable,
cpl_table *  aRamanLines,
int  aGroup,
double  aFlux,
muse_lsf_cube **  aLsfCube 
)

Add a Raman line profile to pixtable.

Parameters
aPixtabletable with wavelengths and an lsf column
aRamanLinesRaman line list
aGroupline group to take from the Raman line list
aFluxtotal flux of the line list, relative to the line list
aLsfCubeLSF data cube

This will, slice by slice, add the raman lines profile to all entries in 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 111 of file muse_raman.c.

References muse_lsf_apply_slice(), muse_pixtable_extracted_delete(), muse_pixtable_extracted_get_size(), muse_pixtable_extracted_get_slices(), MUSE_PIXTABLE_ORIGIN, muse_pixtable_origin_get_ifu(), muse_pixtable_origin_get_slice(), and muse_pixtable::table.

Referenced by muse_postproc_correct_raman().

static cpl_error_code muse_raman_eval ( void *  aData,
cpl_array *  aPar,
cpl_array *  aRetval 
)
static

Evaluate a given parameter set for the Raman fit.

Parameters
aDataData forwarded from the fit algorithm call (structure containing the pixtables)
aParCurrent fit parameter.
aRetvalReturn value vector.
Returns
CPL_ERROR_NONE if everything went OK.

Definition at line 325 of file muse_raman.c.

References muse_cpltable_extract_column(), MUSE_PIXTABLE_DATA, and muse_raman_simulate().

Referenced by muse_raman_fit().

cpl_array* muse_raman_fit ( muse_pixtable *  aPixtable[MUSE_RAMAN_RANGES])

Fit raman lines to an array of pixtables.

Parameters
aPixtablearray of MUSE_RAMAN_RANGES (2) pixtables
Returns
Array with fit values

The fit uses a common spatial profile (two dimensional 2nd order polynomial) for both pixtables. The spatial profile is returned in the first five values of the returned array:

0 - x² coefficient 1 - xy coefficient 2 - y² coefficient 3 - x coefficient 4 - y coefficient

The remaining two values of the array contain the central (x=y=0) flux for both pixtables.

This requires the pixtables to have an additional "lsf" column containing the Line profile of the Raman scattering, normalized to one.

Definition at line 377 of file muse_raman.c.

References muse_cpl_optimize_lvmq(), and muse_raman_eval().

Referenced by muse_postproc_correct_raman().

cpl_table* muse_raman_lines_load ( muse_processing *  aProcessing)

Load the raman lines file.

Parameters
aProcessingthe processing structure
Returns
Table with sky lines
Exceptions
set CPL_ERROR_NULL_INPUT, return NULL(aFile) not fulfilled

Definition at line 48 of file muse_raman.c.

References muse_processing::inframes, muse_cpltable_load(), muse_frameset_find(), muse_processing_append_used(), and muse_sky_lines_lines_def.

cpl_array* muse_raman_simulate ( muse_pixtable *  aPixtable,
cpl_array *  aPar,
cpl_array *  aRetval 
)

Apply the LSF and spatial Raman light distribution.

Parameters
aPixtabletable with x and y positions, wavelength and lsf entries
aParParameter table
aRetvalArray to hold the data values, or NULL.
Returns
Array with fit values

The fit uses a common spatial profile (two dimensional 2nd order polynomial) for both pixtables. The spatial profile is returned in the first five values of the returned array:

0 - x² coefficient 1 - xy coefficient 2 - y² coefficient 3 - x coefficient 4 - y coefficient

The flux is normalized to be 1 at the center (x=y=0).

This requires the pixtables to have an additional "lsf" column containing the Line profile of the Raman scattering, normalized to one.

Definition at line 189 of file muse_raman.c.

References muse_cpltable_extract_column(), MUSE_PIXTABLE_XPOS, MUSE_PIXTABLE_YPOS, and muse_pixtable::table.

Referenced by muse_postproc_correct_raman(), and muse_raman_eval().

muse_image* muse_raman_simulate_image ( const muse_image *  aImage,
const cpl_array *  aPar 
)

Simulate an image of the parameters of the spatial Raman light fit.

Parameters
aImageinput image
aParparameter array
Returns
A new muse_image * with the simulated Raman distribution.

aImage is used to define the (pixel-table) WCS (which was used to fit the Raman light distribution) and as basis for the output image.

aPar contains the fit parameters, see muse_raman_fit().

Exceptions
set CPL_ERROR_NULL_INPUT, return NULLaImage and/or aPar are NULL
set CPL_ERROR_ILLEGAL_INPUT, return NULLaPar does not contain 5 entries

Definition at line 265 of file muse_raman.c.

References muse_image::data, muse_image::header, muse_image_new(), muse_wcs_new(), and muse_wcs_projplane_from_pixel_fast().

Referenced by muse_postproc_correct_raman().