GRAVI Pipeline Reference Manual 1.7.2
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
gravi_metrology.c File Reference
#include <cpl.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include "gravi_data.h"
#include "gravi_pfits.h"
#include "gravi_dfs.h"
#include "gravi_cpl.h"
#include "gravi_utils.h"
#include "gravi_ellipse.h"
#include "gravi_signal.h"
#include "gravi_eop.h"
#include "gravi_metrology.h"

Go to the source code of this file.

Data Structures

struct  structTacConfiguration
 
struct  structTacData
 

Macros

#define DEBUG_LEVEL   2
 
#define PI   3.14159265359
 
#define TWOPI   6.28318530718
 
#define MAX_DATA   1000000
 
#define MET_MAX_HISTORY   100
 
#define FLAG_FLUX   1 /* error L on gui */
 
#define FLAG_SNR   2 /* error K on gui */
 
#define FLAG_UNWRAP   4 /* error J on gui */
 
#define FLAG_SPEED   8 /* error I on gui */
 
#define FLAG_JUMP   16 /* error H on gui */
 
#define FLAG_OVERLOAD   32 /* error G on gui */
 
#define FLAG_UNLOCKED   64 /* error F on gui */
 
#define FLAG_LASER_MV   128 /* error E on gui */
 
#define FLAG_LASER_MW   256 /* error D on gui */
 
#define FLAG_LASER_WAVE   512 /* error C on gui */
 
#define FLAG_VOLT   1024 /* error B on gui */
 
#define FLAG_PHASOR0   2048 /* error A on gui */
 
#define FLAG_LOST_PHASE   4096 /* error T on gui */
 
#define FT   0
 
#define SC   1
 
#define BOTH   2
 
#define SIN   0
 
#define COS   1
 
#define NCOL   80
 

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.
 
cpl_error_code gravi_metrology_telfc (cpl_table *metrology_table, cpl_table *vismet_table, gravi_data *static_param_data, cpl_propertylist *header, const cpl_parameterlist *parlist)
 Best knowledge correction for referencing TEL to FC.
 
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.
 
cpl_error_code gravi_metrology_update_receiverpos (cpl_propertylist *header, cpl_table *receiver_table)
 Update the receiver position from header from external calibration.
 
double gravi_metrology_get_posx (cpl_propertylist *header, int tel, int diode)
 Read the receiver position from header.
 
double gravi_metrology_get_posy (cpl_propertylist *header, int tel, int diode)
 
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.
 
double gravi_metrology_get_fc_shift (cpl_propertylist *header, int gv, gravi_data *static_param_data)
 Read the fiber coupler shift parameter, resulting from offset between fiber coupler pickup and pupil tracker reference spot, from the fits header.
 
cpl_error_code gravi_metrology_get_astig (cpl_propertylist *header, int gv, double *amplitude, double *angle, double *radius, gravi_data *static_param_data)
 Read the astigmatism amplitude and angle from the fits header.
 
long gravi_round (double number)
 
double metrology_sq (double x)
 
double myAtan (double x, double y, int *flag)
 
structTacConfigurationmetrology_makeDefaultTacConfiguration (double lambda_met)
 
structTacDatametrology_makeDefaultTacData (double lambda_met)
 
int metrology_algorithm (structTacData *tacData)
 
int metrology_unwrap (double raw_phase, double previous_phase, double max_allowed_phase_diff, double *unwrapped_phase)
 
int metrology_read_voltages (structTacData *tacData, double *volt)
 
cpl_table * gravi_metrology_create (cpl_table *metrology_table, cpl_propertylist *header)
 Create the VIS_MET table.
 
cpl_error_code gravi_metrology_drs (cpl_table *metrology_table, cpl_table *vismet_table, cpl_propertylist *header, const cpl_parameterlist *parlist)
 Fill the VIS_MET table with the DRS algorithm.
 
static int sin_lambda (const double x[], const double a[], double *result)
 Create the P2VM of the metrology.
 
static int dfda_sin (const double x[], const double a[], double result[])
 
cpl_table * gravi_metrology_compute_p2vm (cpl_table *metrology_table, double wave_met)
 Calibrate the P2VM of the metrology.
 
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.