GRAVI Pipeline Reference Manual  1.2.3
Functions
Metrology reduction

Functions

cpl_error_code gravi_metrology_tac (cpl_table *metrology_table, cpl_table *vismet_table, cpl_propertylist *header)
 Compute the metrology signal from TAC algorithm. More...
 
cpl_error_code gravi_metrology_telfc (cpl_table *metrology_table, cpl_table *vismet_table, gravi_data *default_focus_data, cpl_propertylist *header)
 Best knowledge correction for referencing TEL to FC. More...
 
cpl_error_code gravi_metrology_acq (cpl_table *visacq_table, cpl_table *vismet_table, double delay, cpl_propertylist *header)
 Fill the VIS_MET table with the OPD_PUPIL column. More...
 
cpl_error_code gravi_metrology_update_receiverpos (cpl_propertylist *header, cpl_table *receiver_table)
 Update the receiver position from header from external calibration. More...
 
double gravi_metrology_get_posx (cpl_propertylist *header, int tel, int diode)
 Read the receiver position from header. More...
 
double gravi_metrology_get_fc_focus (cpl_propertylist *header, int gv, gravi_data *static_param_data)
 Read the fiber coupler focus offset from the fits header. More...
 
double gravi_metrology_get_fc_shift (cpl_propertylist *header, int gv, gravi_data *static_param_data)
 Read the fiber coupler focus offset from the fits header. More...
 
cpl_error_code gravi_metrology_get_astig (cpl_propertylist *header, int gv, double *amplitude, double *angle, double *radius)
 Read the astigmatism amplitude and angle from the fits header. More...
 
cpl_table * gravi_metrology_create (cpl_table *metrology_table, cpl_propertylist *header)
 Create the VIS_MET table. More...
 
cpl_error_code gravi_metrology_drs (cpl_table *metrology_table, cpl_table *vismet_table, cpl_propertylist *header)
 Fill the VIS_MET table with the DRS algorithm. More...
 
cpl_table * gravi_metrology_compute_p2vm (cpl_table *metrology_table, double wave_met)
 Calibrate the P2VM of the metrology. More...
 
cpl_error_code gravi_metrology_reduce (gravi_data *data, gravi_data *eop_data, gravi_data *static_param_data, gravi_data *met_pos, const cpl_parameterlist *parlist)
 Reduce the metrology. More...
 

Detailed Description

This module implements the function relative to the metrology. The two main functions are

Function Documentation

cpl_error_code gravi_metrology_acq ( cpl_table *  visacq_table,
cpl_table *  vismet_table,
double  delay,
cpl_propertylist *  header 
)

Fill the VIS_MET table with the OPD_PUPIL column.

Parameters
visacq_tableinput OI_VIS_ACQ table
vismet_tableoutput OI_VIS_MET table
delaydelay in [s] between TIME in ACQ and the correction seen by the metrology (TIME in OI_VIS_MET)
headercorresponding HEADER

Fill the OI_VIS_MET table from the OPD_PUPIL column computed from the OPD_PUPIL column of the OI_VIS_ACQ table.

Definition at line 1745 of file gravi_metrology.c.

References gravi_signal_create_sync().

Referenced by gravi_metrology_reduce().

cpl_table* gravi_metrology_compute_p2vm ( cpl_table *  metrology_table,
double  wave_met 
)

Calibrate the P2VM of the metrology.

Parameters
metrology_tableinput metrology data
wave_metWavelength of the metrology [m]
Returns
the p2vm of the metrology
Exceptions
CPL_ERROR_NULL_INPUTinput data is missing

The resulting P2VM table contains the TRANSMISSION, COHERENCE and PHASE of the metrology.

Definition at line 3156 of file gravi_metrology.c.

References gravi_ellipse_phase_create().

cpl_table* gravi_metrology_create ( cpl_table *  metrology_table,
cpl_propertylist *  header 
)

Create the VIS_MET table.

Parameters
metrology_tableinput METROLOGY table
headercorresponding HEADER
Returns
a new VIS_MET table

Create the VIS_MET table from the METROLOGY table. The table has nsample*ntel rows, so that the measurements for beam 0 are in rows 0,5,10,15... the ones for beam 1 are in 1,6,11,16... that is following the same format as OI_FLUX. This function only create the TIME column.

Definition at line 1692 of file gravi_metrology.c.

Referenced by gravi_metrology_reduce(), and gravi_wave_compute_opds().

cpl_error_code gravi_metrology_drs ( cpl_table *  metrology_table,
cpl_table *  vismet_table,
cpl_propertylist *  header 
)

Fill the VIS_MET table with the DRS algorithm.

Parameters
metrology_tableinput METROLOGY table
vismet_tableoutput OI_VIS_MET table
headercorresponding HEADER

Fill the VIS_MET table from the METROLOGY table with the pipeline alorithm. The function creates the columns PHASE_MET_FC (scalar) and PHASE_MET_TEL (array of 4 values = diodes). Note that the p2vm of the metrology is note used in this computation.

Definition at line 1883 of file gravi_metrology.c.

Referenced by gravi_metrology_reduce(), and gravi_wave_compute_opds().

cpl_error_code gravi_metrology_get_astig ( cpl_propertylist *  header,
int  gv,
double *  amplitude,
double *  angle,
double *  radius 
)

Read the astigmatism amplitude and angle from the fits header.

Parameters
headerinput header
gvgravity input [0...3]
amplitudeoutput amplitude of the astigmatism in [nm]
angleoutput angle of the astigmatism in [deg] rmax radius of the telescope in [m]

Definition at line 1621 of file gravi_metrology.c.

Referenced by gravi_metrology_telfc().

double gravi_metrology_get_fc_focus ( cpl_propertylist *  header,
int  gv,
gravi_data *  static_param_data 
)

Read the fiber coupler focus offset from the fits header.

Parameters
headerinput header
gvgravity input [0...3]
Returns
Fiber coupler focus offset in nanometer

Definition at line 1446 of file gravi_metrology.c.

References gravi_data_get_table().

Referenced by gravi_metrology_telfc().

double gravi_metrology_get_fc_shift ( cpl_propertylist *  header,
int  gv,
gravi_data *  static_param_data 
)

Read the fiber coupler focus offset from the fits header.

Parameters
headerinput header
gvgravity input [0...3]
static_param_datadefault values for focus and focus shift
Returns
Fiber coupler focus offset in nanometer

Definition at line 1533 of file gravi_metrology.c.

References gravi_data_get_table().

Referenced by gravi_metrology_telfc().

double gravi_metrology_get_posx ( cpl_propertylist *  header,
int  tel,
int  diode 
)

Read the receiver position from header.

Parameters
headerinput header
teltelescope number (0 to 3) in gravity_beam
diodediode number (0 to 3)
Returns
Receiver position as double in [m]

Definition at line 1390 of file gravi_metrology.c.

Referenced by gravi_metrology_telfc().

cpl_error_code gravi_metrology_reduce ( gravi_data *  data,
gravi_data *  eop_data,
gravi_data *  static_param_data,
gravi_data *  met_pos,
const cpl_parameterlist *  parlist 
)

Reduce the metrology.

Parameters
dataa gravi_data with a METROLOGY extension (input/output)
eop_dataEarth orientation parameter data or NULL
met_posMetrology receiver position data or NULL
parlistlist of recipe options (including acq-correction-delay)
Exceptions
CPL_ERROR_NULL_INPUTinput data is missing

The resulting VIS_MET table is created from the METROLOGY table and added this data. It is then updated with the TAC algorithm.

EKW : Attention met_pos is called diode_pos in call

Definition at line 3323 of file gravi_metrology.c.

References gravi_data_add_table(), gravi_data_get_table(), gravi_data_get_table_x(), gravi_data_has_extension(), gravi_eop_pointing_uv(), gravi_metrology_acq(), gravi_metrology_create(), gravi_metrology_drs(), gravi_metrology_tac(), gravi_metrology_telfc(), gravi_metrology_update_receiverpos(), and gravi_param_get_double_default().

cpl_error_code gravi_metrology_tac ( cpl_table *  metrology_table,
cpl_table *  vismet_table,
cpl_propertylist *  header 
)

Compute the metrology signal from TAC algorithm.

Parameters
metrology_tableThe input METROLOGY table
vismet_tableThe input/output OI_VIS_MET table
headerThe corresponding HEADER

Wrapper to interface with the TAC real-time algorithm. This fill new columns in the existing OI_VIS_MET table: OPD_MET_FC and OPD_MET_TEL, as well as FLAGs...

Definition at line 2249 of file gravi_metrology.c.

Referenced by gravi_metrology_reduce().

cpl_error_code gravi_metrology_telfc ( cpl_table *  metrology_table,
cpl_table *  vismet_table,
gravi_data *  default_focus_data,
cpl_propertylist *  header 
)

Best knowledge correction for referencing TEL to FC.

Parameters
metrology_tableThe input METROLOGY table
vismet_tableThe input/output OI_VIS_MET table
headerThe corresponding HEADER

FE start "tel" referes to "GV" all through this function

Definition at line 2483 of file gravi_metrology.c.

References gravi_metrology_get_astig(), gravi_metrology_get_fc_focus(), gravi_metrology_get_fc_shift(), and gravi_metrology_get_posx().

Referenced by gravi_metrology_reduce().

cpl_error_code gravi_metrology_update_receiverpos ( cpl_propertylist *  header,
cpl_table *  receiver_table 
)

Update the receiver position from header from external calibration.

Parameters
headerinput/output header to be modified
receiver_tabletable with the new receiver position

The table shall have a column TEL_NAME with value 'UT1', 'AT3'..., a column RECX[4] with the x-position of the 4 diode of this telescope, and a column REXY[4] with the y-position of the 4 diode of this telescope.

The function update the keys 'ESO MET UTi RECjX' and 'ESO MET UTi RECjY' of the the input headers.

Definition at line 1331 of file gravi_metrology.c.

Referenced by gravi_metrology_reduce().