|
CR2RE Pipeline Reference Manual 1.6.10
|
Functions | |
| cpl_bivector * | cr2res_pol_demod_stokes (cpl_vector **intens, cpl_vector **wl, cpl_vector **errors, int n) |
| Demodulate extracted spectra into Stokes parameter. | |
| int | cr2res_pol_resample (cpl_vector **intens, cpl_vector **wl, cpl_vector **errors, int n, cpl_vector **xmin, cpl_vector **xmax) |
| Resample all spectra to the same wavelength grid. | |
| cpl_bivector * | cr2res_pol_demod_null (cpl_vector **intens, cpl_vector **wl, cpl_vector **errors, int n) |
| Demodulate extracted spectra into Null spectrum. | |
| cpl_bivector * | cr2res_pol_demod_intens (cpl_vector **intens, cpl_vector **wl, cpl_vector **errors, int n) |
| Combine extracted spectra into Intensity spectrum. | |
| cpl_table * | cr2res_pol_POL_SPEC_create (int *orders, cpl_vector **wl, cpl_bivector **stokes, cpl_bivector **null, cpl_bivector **intens, int norders) |
| Create the POL_SPEC table to be saved. | |
| int * | cr2res_pol_sort_frames (const cpl_frame *frame1, const cpl_frame *frame2, const cpl_frame *frame3, const cpl_frame *frame4) |
| Compute the positions of the passed frames. | |
| cpl_table * | cr2res_pol_spec_pol_merge (const cpl_table **pol_spec_list, int pol_spec_nb) |
| Merge several POL_SPEC tables together, by averaging. | |
| cpl_table * | cr2res_pol_get_beam_trace (const cpl_table *tw_in, cr2res_decker decker_position, int up_or_down) |
| Compute the traces for the polarimetric beams. | |
| cpl_bivector * cr2res_pol_demod_intens | ( | cpl_vector ** | intens, |
| cpl_vector ** | wl, | ||
| cpl_vector ** | errors, | ||
| int | n | ||
| ) |
Combine extracted spectra into Intensity spectrum.
| intens | Array of n extracted intensities |
| wl | Array of n extracted wavelengths |
| errors | Array of n extracted errors |
| n | Length of intens, wl and errors [needs to be 8] |
The calculation is a simple sum of input spectra, divided by half the number of spectra, since two pol-beams together make up one unit intensity.
Important : the first of the 8 input wavelength vectors (wl[0]) is the reference one for which the output parameters shall be computed
Definition at line 528 of file cr2res_pol.c.
References cr2res_pol_resample().
| cpl_bivector * cr2res_pol_demod_null | ( | cpl_vector ** | intens, |
| cpl_vector ** | wl, | ||
| cpl_vector ** | errors, | ||
| int | n | ||
| ) |
Demodulate extracted spectra into Null spectrum.
| intens | Array of n extracted intensities |
| wl | Array of n extracted wavelengths |
| errors | Array of n extracted errors |
| n | Length of intens, wl and errors [needs to be 8] |
The input list of spectra needs to come in this order: 1u, 1d, 2u , 2d, 3u, 3d, 4u, 4d i.e. first exposure upper beam, then down, then second exposure etc.
Demodulation formula is N = (R^1/4 - 1) / (R^1/4 + 1) , with R = 1u/1d * 2u/2d * 3d/3u * 4d/4u see equation 3 in Donati et al. 1997 bibcode: 1997MNRAS.291..658D This is analogous to the Stokes demodulation but the last two ratios are inverted which makes the true polarization signal cancel out. Thus the Null spectrum's deviation from zero is an inverse measure of quality. We simply re-use the Stokes demodulation after switching the spectra in the input order.
Important : the first of the 8 input wavelength vectors (wl[0]) is the reference one for which the output parameters shall be computed
Definition at line 410 of file cr2res_pol.c.
References cr2res_pol_demod_stokes().
| cpl_bivector * cr2res_pol_demod_stokes | ( | cpl_vector ** | intens, |
| cpl_vector ** | wl, | ||
| cpl_vector ** | errors, | ||
| int | n | ||
| ) |
Demodulate extracted spectra into Stokes parameter.
| intens | Array of n extracted intensities |
| wl | Array of n extracted wavelengths |
| errors | Array of n extracted errors |
| n | Length of intens, wl and errors [needs to be 8] |
The input list of the n spectra needs to come in this order: 1u, 1d, 2u , 2d, 3u, 3d, 4u, 4d i.e. first exposure upper beam, then down, then second exposure etc.
The demodulation formula is P/I = (R^1/4 - 1) / (R^1/4 + 1) with R = 1u/1d * 2d/2u * 3d/3u * 4u/4d see equation 2 in Donati et al. 1997 bibcode: 1997MNRAS.291..658D Important : the first of the 8 input wavelength vectors (wl[0]) is the reference one for which the output parameters shall be computed
Definition at line 106 of file cr2res_pol.c.
References cr2res_pol_resample().
Referenced by cr2res_pol_demod_null().
| cpl_table * cr2res_pol_get_beam_trace | ( | const cpl_table * | tw_in, |
| cr2res_decker | decker_position, | ||
| int | up_or_down | ||
| ) |
Compute the traces for the polarimetric beams.
| tw_in | The input traces |
| decker_name | The decker name |
| up_down | Upper or lower beam |
Uses hardcoded correction polynomials to account for the diverging beams
Definition at line 970 of file cr2res_pol.c.
References cr2res_get_trace_wave_poly(), and cr2res_trace_new_slit_fraction().
| cpl_table * cr2res_pol_POL_SPEC_create | ( | int * | orders, |
| cpl_vector ** | wl, | ||
| cpl_bivector ** | stokes, | ||
| cpl_bivector ** | null, | ||
| cpl_bivector ** | intens, | ||
| int | norders | ||
| ) |
Create the POL_SPEC table to be saved.
| orders | List of orders |
| wl | Wavelength for the different orders |
| stokes | Stokes parameters for the different orders with errors |
| null | Null parameters for the different orders with errors |
| intens | Intensity for the different orders with errors |
| norders | Number of orders |
Definition at line 696 of file cr2res_pol.c.
References cr2res_dfs_POL_INTENS_colname(), cr2res_dfs_POL_INTENS_ERROR_colname(), cr2res_dfs_POL_NULL_colname(), cr2res_dfs_POL_NULL_ERROR_colname(), cr2res_dfs_POL_STOKES_colname(), cr2res_dfs_POL_STOKES_ERROR_colname(), and cr2res_dfs_POL_WAVELENGTH_colname().
| int cr2res_pol_resample | ( | cpl_vector ** | intens, |
| cpl_vector ** | wl, | ||
| cpl_vector ** | errors, | ||
| int | n, | ||
| cpl_vector ** | xmin, | ||
| cpl_vector ** | xmax | ||
| ) |
Resample all spectra to the same wavelength grid.
| intens | vectors to be resampled |
| wl | wavelengths of those vectors |
| errors | uncertainties of the vectors |
| n | number of spectra |
Important : the first of the 8 input wavelength vectors (wl[0]) is the reference one for which the output parameters shall be computed
Definition at line 289 of file cr2res_pol.c.
Referenced by cr2res_pol_demod_intens(), and cr2res_pol_demod_stokes().
| int * cr2res_pol_sort_frames | ( | const cpl_frame * | frame1, |
| const cpl_frame * | frame2, | ||
| const cpl_frame * | frame3, | ||
| const cpl_frame * | frame4 | ||
| ) |
Compute the positions of the passed frames.
| frame1 | Frame #1 |
| frame2 | Frame #2 |
| frame3 | Frame #3 |
| frame4 | Frame #4 |
If the Out array is giving the new position : ordering[0] is the position of frame1, ordering[1] is the position of frame2, etc... If the Frames order needs to be Frame #4, #1, #3, #2, ordering will contain [3, 0, 2, 1]
The returned positions correspond to the 1,2,3,4 inputs in the demod fuctions.
Definition at line 833 of file cr2res_pol.c.
References cr2res_pfits_get_poltype().
| cpl_table * cr2res_pol_spec_pol_merge | ( | const cpl_table ** | pol_spec_list, |
| int | pol_spec_nb | ||
| ) |
Merge several POL_SPEC tables together, by averaging.
| pol_spec_list | The list of tables |
| pol_spec_nb | The number of tables in list |
Definition at line 915 of file cr2res_pol.c.