-
Notifications
You must be signed in to change notification settings - Fork 0
API_Documentation
Below is a summary of functional modules available in the v1_dev_mac branch.
| Module | Description |
|---|---|
op_pipeline.py |
Main driver for the pipeline execution |
op_rawdata.py |
Extract and Calibrate the raw datas |
op_corrflux.py |
Compute the Correlated Flux |
op_vis.py |
Compute the squared visibility |
op_flux.py |
Extract the flux |
op_clos.py |
Compute the closure phase |
op_oifits.py |
Create the oifits file |
op_parameters.py |
Store the global parameters |
op_instruments.py |
Store the instruments parameters |
n_co2/ |
Update the Co2 model |
uv_coverage/ |
UV-coverage toolkit to go further |
phase_correction/ |
Computation and Comparison of models of air refractive index |
You will find under the Complete API Documentation for OPTRA
Sort the files by their category and type
PARAMETERS:
- data_dir : directory of the data
RETURN:
- data_collection: dictionnary of the data sorted
Assign the closest skyfile to each exposure
PARAMETERS:
- data_collection : dictionnary of the sorted data
RETURN:
- data_collection: dictionnary of the data sorted with the matched sky added.
Assign the bias to each exposusre
PARAMETERS:
- data_collection : dictionnary of the sorted data
RETURN:
- None
Assign the flat field map to each exposusre
PARAMETERS:
- data_collection : dictionnary of the sorted data
RETURN:
- None
Assign the bad pixel map to each exposusre
PARAMETERS:
- data_collection : dictionnary of the sorted data
RETURN:
- None
Compute the correlated flux, the squared visibility from the raw files and store them in the oifits files
PARAMETERS:
- starfile: file of the star
- skyfile: file of the assiociated sky
- badfile: file of the assiociated bad pixel map
- flatfile: file of the assiociated flat field map
- shiftfile: file of the associated shift map
Optional Parameters:
- outdir=None: specify if another directory
- verbose=False : specify if you want to have all the logs printed
- plot=False : specify if you want the plots to appear
RETURN:
- None (but OIFITS File generated)
Interpolate the bad pixels
PARAMETERS:
- data : datas from the raw files
- bad_pixel_map : Bad Pixel Map
Optional Parameters:
- verbose=False : specify if you want to have all the logs printed
RETURN:
- data: raw data corrected by the bad pixel
- filtered_data: filter applied to the raw data
Load the bad pixels map
PARAMETERS:
- filename : file of the bad pixel map
Optional Parameters:
- verbose=False : specify if you want to have all the logs printed
RETURN:
- bpm: bad Pixel Map
Apply the bad pixels map to the raw datas
PARAMETERS:
- rawdata : datas from the raw files
- bpmap : Bad Pixel Map
Optional Parameters:
- verbose=False : specify if you want to have all the logs printed
RETURN:
- rawdata : data corrected from the bad pixel
Load the flat field map
PARAMETERS:
- filename : file of the flat field map
Optional Parameters:
- verbose=False : specify if you want to have all the logs printed
RETURN:
- ffm : Flat Field Map
Apply the flat field map to the raw datas
PARAMETERS:
- rawdata : datas from the raw files
- ffmap : Flat field Map
Optional Parameters:
- verbose=False : specify if you want to have all the logs printed
RETURN:
- rawdata: data corrected from the ffm
Substract the mean of the sky to the raw datas
PARAMETERS:
- rawdata : datas from the raw files
- skydata : data of the sky
Optional Parameters:
- verbose=False : specify if you want to have all the logs printed
- plot=False : specify if you want the plots to appear
Display the structure of a FITS file
PARAMETERS:
- fitsdata : datas from the raw files
Display the header of a FITS file
PARAMETERS:
- fitsdata : datas from the raw files
Load the raw datas from the FITS files and store them
PARAMETERS:
- filename : name of the FITS file
Load and Calibrate the raw datas from the FITS files
PARAMETERS:
- sciencefile : File of the Target
- skyfile : File of the associated sky
- bpm : Bad pixel map file
- ffm : flat field map file
Optional Parameters:
- instrument=op_MATISSE_L: instrument used
- verbose=False : specify if you want to have all the logs printed
- plot=False : specify if you want the plots to appear
Get the location of the telescopes:
PARAMETERS:
- hdr: Header of a fit file
- plot: Specify if you want to plot the map of Paranal
Optional Parameters:
- verbose=False : specify if you want to have all the logs printed
Compute the uvw coordinates
PARAMETERS:
- data : uvw coord dictionnary to be corrected.
- bvect: baseline vector of observation.
- loc: Location of Paranal
Get the station of the telescopes
PARAMETERS:
- hdr : hdr of a fits file
- bvect: baseline vector of observation.
- loc: Location of Paranal
get the baseline vector between 2 stations
PARAMETERS:
- station1 : name of the first station
- station2 : name of the second station
- loc: Location of Paranal
Optional Parameters:
- delay = dict(): dictionnary to store the fix delay
Extract all the baseline vector
PARAMETERS:
- hdr : hdr of a fits file
- loc: Location of Paranal
Optional Parameters:
*instrument = op_MATISSE_L: Instrument used (to get the scramble)
Compute the uv Coordinate corresponding to one FITS file.
PARAMETERS:
- cfdata: data from the FITS file.
- loc: Location of Paranal
Optional Parameters:
*instrument = op_MATISSE_L: Instrument used (to get the scramble)
Generate the uv-coverage
PARAMETERS:
- uCoord: all the u coordinate of the night
- vCoord: all the v coordinate of the night
Optional Parameters:
*instrument = op_MATISSE_L: Instrument used (to get the scramble)
Apodize the Calibrated data
PARAMETERS:
- data : Calibrated data
Compute the Fast Fourier Transform of our datas
PARAMETERS:
- data : Calibrated data
Compute the wavelength:
PARAMETERS:
- shift_map: Shift Map
- rawdata : Calibrated data
Extract the peaks position
PARAMETERS:
- fftdata : Fourier Transformed data
Optional Parameters:
*instrument = op_MATISSE_L: Instrument used
Compute the correlated Flux
PARAMETERS:
- fftdata : Fourier Transformed data
- peaks : peaks of each baselines in the fft
- peakswd: width of each peaks
Demodulate MATISSE Fringes
PARAMETERS:
- CFdata : Correlated Flux data
Optional Parameters:
*cfin = 'CF': From which data in the dictionnary you demodulate.
Compute the Correlated Flux and apply all the phase correction from the Calibrated datas
PARAMETERS:
- bdata : Calibrated data
- shiftfile: Shift Map File
Reorder the baselines ( Reorder based on the bcd)
PARAMETERS:
- data : correlated flux data
Optional Parameters:
- cfin = 'CF_demod': From which data you reorder.
Get the atmospheric conditions and the dPath
PARAMETERS:
- data : correlated flux data
Compute the Co2 concentration at Paranal in ppm
PARAMETERS:
- data : correlated flux data
op_air_index
Compute the air refractive index
PARAMETERS:
- wlen : Wavelength (in m )
- T : Temperature (in C)
- P : Pressure (in hPa)
- h : Relative humidity
- N_CO2 : Co2 concentration (in ppm)
Correct the air refractive index in the phase
PARAMETERS:
- data : correlated flux data
- n_air : Air refractive index
- dPath : differential path
Optional Parameters:
- cfin = 'CF_reord': From which data you correct the air refractive index.
Compute the residual piston on the Correlated flux phase, via FFT method
PARAMETERS:
- data : correlated flux data
Optional Parameters:
- cfin = 'CF_Binned': From which data you get the piston.
Correct the residual piston
PARAMETERS:
- data : correlated flux data
Optional Parameters:
- cfin = 'CF_Binned': From which data you get the piston.
Bin the data.
PARAMETERS:
- data : correlated flux data
Optional Parameters:
- binning = 5: Coefficient of binning
- cfin = 'CF_achr_phase_corr': From which data you will bin.
Extract the error of the correlated flux
PARAMETERS:
- data : correlated flux data
Optional Parameters:
- cfin = 'CF_piston_corr2': From which data you get the error.
Compute the snr thanks to the error computed before.
PARAMETERS:
- wlen : wavelength array
- vis : Correlated flux datas
- visAmpErr:Error on the amplitude of the Correlated flux
- visPhiErr: Error on the Phase of the Correlated Flux
Compute the SNR based on a semi theoretical value of the SNR.
PARAMETERS:
- data : correlated flux data
Optional Parameters:
- cfin = 'CF_Binned': From which data you get the piston.
Extract the mean of the correlated flux.
PARAMETERS:
- data : correlated flux data
Optional Parameters:
- cfin = 'CF_piston_corr2': From which data you compute the mean.
Compute the bias of the visibility
PARAMETERS:
- data : correlated flux data
extract the squared visibility
PARAMETERS:
- data : correlated flux data
extract the mean of the suared visibilty
Create the OI_ARRAY Table
PARAMETERS:
- data : correlated flux data
Create the OI_TARGET Table
PARAMETERS:
- data : correlated flux data
Create the OI_WAVELENGTH Table
PARAMETERS:
- data : correlated flux data
Optional Parameters:
- wlen_fin = 'EFF_WAVE_Binned': Specify if the wlen is binned or not
Create the OI_VIS Table
PARAMETERS:
- data : correlated flux data
Create the OI_VIS2 Table
PARAMETERS:
- data : squared visibilities data
Create the OIFITS file and store the datas in it
PARAMETERS:
- filename : Name of the output file
- hdr : hdr of the FITS File
- oiwavelength : OI_WAVELENGTH Table
Optional Parameters
- oirray = None : OI_ARRAY Table
- oitarget = None : OI_TARGET Table
- oivis = None : OI_VIS Table
- oivis2 = None : OI_VIS2 Table
- oit3 = None :OI_T3 Table