----- Documentation for Manip\average_bisp.pro ----- NAME: AVERAGE_BISP AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: calculate weighted mean and stdev of specified closure phase/bispectrum/triple product files of different observing files (with direct bootstrap if number of files ge NB_DATA_BOOT) CATEGORY: data manipulation INPUTS: need a text input file (in OBS_PATH/INP/ directory) with: - number of observing block(s) for each observing block: - number of input file(s) - input data file name(s) then: - if needed (default = AMBER format) : data format ('clos' or 'bisp' or 'trip') REQUIREMENTS: closure phase data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel) : - closure phase and err. [deg] for each observing file bispectrum data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel) : - wavelength [nm], nber of frames or weight, real part of bispectrum (or bisp resp), and error, imaginary part of bispectrum (or bisp resp), and error ([photoel^3] or [(W/m^2/mu)^3] or [photoel^3/(W/m^2/mu)^3]) triple product data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel) : - wavelength [nm], nber of frames or weight, real part of triple product (or triple prod resp), and error, imaginary part of triple product (or triple prod resp), and error AMBER data (default): data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames or weight, real part of bispectrum (or bisp resp), and error, imaginary part of bispectrum (or bisp resp), and error ([photoel^3] or [(W/m^2/mu)^3] or [photoel^3/(W/m^2/mu)^3]), real part of triple product (or triple prod resp), and error, imaginary part of triple product (or triple prod resp), and error OUTPUTS: closure phase data: data written in output mean bispectral file (in the same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - mean closure phase and err. [deg] bispectrum data: data written in output mean bispectral file (in the same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - wavelength [nm], mean nber of frames of mean weight, real part of mean bispectrum (or bisp resp), and error, imaginary part of mean bispectrum (or bisp resp), and error (in [photoel^3] or in [(W/m^2/mu)^3] or in [photoel^3/(W/m^2/mu)^3]) triple product data: data written in output mean triple product file (in the same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - wavelength [nm], mean nber of frames of mean weight, real part of mean triple product (or triple prod resp), and error, imaginary part of mean triple product (or triple prod resp), and error AMBER data (default): data written in output bispectral response file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - wavelength [nm], mean nber of frames of mean weight, real part of mean bispectrum (or bisp resp), and error, imaginary part of mean bispectrum (or bisp resp), and error (in [photoel^3] or in [(W/m^2/mu)^3] or in [photoel^3/(W/m^2/mu)^3]), real part of mean triple product (or triple prod resp), and error, imaginary part of mean triple product (or triple prod resp), and error LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: COSD EXTRACT_PROHEADER GET_OUTLIER_FENCES SIND SYM WAVG WSTERR LOCAL SYSTEM VARIABLE USED: EPSILON MAX_FLUX MIN_FLUX NB_BOOT_LOOPS NB_DATA_BOOT NB_LAMBDA_MAX NB_OB_MAX MAX_NDIT OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2008/05/19 last modification 2010/12/26 ----- Documentation for Manip\average_data.pro ----- NAME: AVERAGE_DATA AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: calculate weighted mean and stdev of specified data files of different observing files (with direct bootstrap if number of files ge NB_DATA_BOOT) CATEGORY: data manipulation INPUTS: need a text input file (in OBS_PATH/INP/ directory) with: - number of observing block(s) for each block: - number of data file(s) to average - data file name(s) then: - if needed (default = AMBER format) : data format ('vis' or 'spec' or 'coh' or 'wave') REQUIREMENTS: vis data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel) : - visibility (or vis response) and error for each observing file flux data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel) : - flux (or flux response) and error (fluxes [photoel] or [W/m^2/mum], flux resp [photoel/(W/m^2/mum)]) for each observing file coh flux data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel) : - coherent flux (or coh flux response) and error (coh fluxes [photoel] or [W/m^2/mum], coh flux resp [photoel/(W/m^2/mum)]) for each observing file wavelength data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one row per wavelength) : - wavelength and bandwidth for each observing file AMBER data (default): data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel) : - weight or nber of frames, visibility (or vis response) and error, flux (or flux response) and error, coh flux (or coh flux response) and error (fluxes [photoel] or [W/m^2/mum], flux resp [photoel/(W/m^2/mum)]) OUTPUTS: vis data: data written in output mean data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - mean visibility (or vis response) and error flux data: data written in output mean data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - mean flux (or flux response) and error (fluxes [photoel] or [W/m^2/mum], flux resp [photoel/(W/m^2/mum)]) coh flux data: data written in output mean data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - mean coherent flux (or coh flux response) and error (coh fluxes [photoel] or [W/m^2/mum], coh flux resp [photoel/(W/m^2/mum)]) wavelength data: data written in output mean data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - mean wavelength and mean-resolution bandwidth AMBER data (default): data written in output mean data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - mean weight or mean nb of fr, mean vis (or vis response) and error, mean flux (or flux response) and error, mean coh flux (or coh flux response) and error (fluxes [photoel] or [W/m^2/mum], flux resp [photoel/(W/m^2/mum)]) LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: EXTRACT_PROHEADER GET_OUTLIER_FENCES SYM WAVG WSTERR LOCAL SYSTEM VARIABLE USED: EPSILON MAX_FLUX MIN_FLUX NB_BOOT_LOOPS NB_DATA_BOOT NB_LAMBDA_MAX NB_OB_MAX OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2007/08/27 last modification by pcr 2010/12/26 ----- Documentation for Manip\average_observations.pro ----- NAME: AVERAGE_OBSERVATIONS AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: give observing parameter and baseline files associated to mean data file(s) with multiple observing blocks CATEGORY: data manipulation INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - baseline and observing parameter file names (in same row) - number of file(s) to average in each obs block (in same row) REQUIREMENTS: data read in input baseline file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (2*NBASE=NTEL*(NTEL-1) columns, one row per data file) : - (START_PBL[m] , START_PBLA[deg]) and (END_PBL[m] , END_PBLA[deg]) of the projected baseline(s) associated to each data file data read in input observation parameter file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per data file): - (DIT[s] , NDIT), (RA[deg] , DEC[deg]), (START_UTC[h] , END_UTC[h]), (START_FWHM["] , END_FWHM["]), (START_TAU0[s] , END_TAU0[s]), (MJD@0h , 0) OUTPUTS: data written in output baseline file(s) (in the same subdirectory of OBS_PATH/) are of same type as input (one row per obs block): - (START_PBL[m] , START_PBLA[deg]) and (END_PBL[m] , END_PBLA[deg]) of the projected baseline(s) associated to the output mean data file(s) data written in input observation parameter file(s) (in the same subdirectory of OBS_PATH/) are of same type as input (one row per obs block): - (TIT[s] , NDIT=1), (MEAN_RA[deg] , MEAN_DEC[deg]), (MIN_UTC[h] , MAX_UTC[h]), (MIN_FWHM["] , MAX_FWHM["]), (MIN_TAU0[s] , MAX_TAU0[s]), (MJD@0h , 0) associated to the output mean data file(s) LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: COSD EXTRACT_PROHEADER SIND SYM LOCAL SYSTEM VARIABLE USED: NB_OB_MAX NB_PAIR_MAX OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2009/01/25 last modification by pcr 2010/12/26 ----- Documentation for Manip\concatenate_observations.pro ----- NAME: CONCATENATE_OBSERVATIONS AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: concatenate a set of observing parameter and baseline files of a given target in a single parameter+baseline file split/concatenate obs/base/data file(s) in OB/dir/run/global file(s) CATEGORY: data manipulation INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - target name - allocation programme information file - subdir of OBS_PATH for writing results then finds the following files associated to target : - baseline file(s) - observing parameter file(s) - spec file(s) - vis file(s) - coh spec file(s) - clos file(s) - bisp file(s) - trip file(s) REQUIREMENTS: data read in allocation programme file (in OBS_PATH/ directory) must be in ASCII format and contain 2*nrun+1 rows with : - total number of run(s) allocated for the observing programme and obs run name(s) (same row) then for each run : - nber of allocated night(s) in run and name(s) of obs data directory(ies) (1 dir per obs night) data read in input baseline file(s) (in subdirectory of OBS_PATH/, .base extension) must be in ASCII format and contain 2*npair=NTEL*(NTEL-1) columns of complex values (one row per obs block) with: - (START_PBL[m] , START_PBLA[deg]) and (END_PBL[m] , END_PBLA[deg]) of the projected baseline(s) associated to each OB data read in input obs. parameter file(s) (in the same subdir of OBS_PATH/, .obs extension) must be in ASCII format and contain 6 columns of complex values (one row per obs block) with: - (DIT[s] , NDIT), (RA[deg] , DEC[deg]), (START_UTC[h] , END_UTC[h]), (START_FWHM["] , END_FWHM["]), (START_TAU0[s] , END_TAU0[s]), (MJD@0h , 0) data read in input spectrum file(s) (in subdir of OBS_PATH/ containing input data, .spec extension) must be in ASCII format and contain (1 row per spectral channel): - wavelength and bandwidth [m], flux and error [W/m^2/mum] for each OB data read in input visibility file(s) (in subdir of OBS_PATH/ containing input data, .vis extension) must be in ASCII format and contain (1 row per spectral channel, one file per baseline): - wavelength and bandwidth [m], vis. and err. for each OB data read in input coherent spectrum file(s) (in subdir of OBS_PATH/ containing input data, .coh extension) must be in ASCII format and contain (1 row per spectral channel, one file per baseline): - wavelength and bandwidth [m], coh. flux and err. [W/m^2/mum] for each OB data read in input closure phase file(s) (in subdir of OBS_PATH/ containing input data, .clos extension) must be in ASCII format and contain (1 row per spectral channel, one file per baseline triplet): - wavelength and bandwidth [m], clos. phase and err. [deg] for each OB data read in each input bispectrum file(s) (in subdir of OBS_PATH/ containing input data, .bisp extension) must be in ASCII format and contain (1 row per spectral channel, one file per baseline triplet): - wavelength and bandwidth [m], real part of bisp. and err., imaginary part of bisp. and err. [(W/m^2/mum)^3] for each OB data read in each input triple product file(s) (in subdir of OBS_PATH/ containing input data, .trip extension) must be in ASCII format and contain (1 row per spectral channel, one file per baseline triplet): - wavelength and bandwidth [m], real part of triple prod. and err., imaginary part of triple prod. and err. for each OB OUTPUTS: data written in output baseline file(s) (in subdirectory of OBS_PATH/, .base extension) are in ASCII format and contain 2*npair=NTEL*(NTEL-1) columns of complex values (one row per obs block) with: - (START_PBL[m] , START_PBLA[deg]) and (END_PBL[m] , END_PBLA[deg]) of the projected baseline(s) associated to each OB data written in output obs. parameter file(s) (in the same subdir of OBS_PATH/, .obs extension) are in ASCII format and contain 6 columns of complex values (one row per obs block) with: - (DIT[s] , NDIT), (RA[deg] , DEC[deg]), (START_UTC[h] , END_UTC[h]), (START_FWHM["] , END_FWHM["]), (START_TAU0[s] , END_TAU0[s]), (MJD@0h , 0) data written in output spectrum file(s) (in subdir of OBS_PATH/ containing input data, .spec extension) are in ASCII format and contain (1 row per spectral channel): - wavelength and bandwidth [m], flux and error [W/m^2/mum] for each OB data written in output visibility file(s) (in subdir of OBS_PATH/ containing input data, .vis extension) are in ASCII format and contain (1 row per spectral channel, one file per baseline): - wavelength and bandwidth [m], vis. and err. for each OB data written in output coherent spectrum file(s) (in subdir of OBS_PATH/ containing input data, .coh extension) are in ASCII format and contain (1 row per spectral channel, one file per baseline): - wavelength and bandwidth [m], coh. flux and err. [W/m^2/mum] for each OB data written in output closure phase file(s) (in subdir of OBS_PATH/ containing input data, .clos extension) are in ASCII format and contain (1 row per spectral channel, one file per baseline triplet): - wavelength and bandwidth [m], clos. phase and err. [deg] for each OB data written in each output bispectrum file(s) (in subdir of OBS_PATH/ containing input data, .bisp extension) are in ASCII format and contain (1 row per spectral channel, one file per baseline triplet): - wavelength and bandwidth [m], real part of bisp. and err., imaginary part of bisp. and err. [(W/m^2/mum)^3] for each OB data written in each output triple product file(s) (in subdir of OBS_PATH/ containing input data, .trip extension) are in ASCII format and contain (1 row per spectral channel, one file per baseline triplet): - wavelength and bandwidth [m], real part of triple prod. and err., imaginary part of triple prod. and err. for each OB data written in concatenated output obs+base file (in the given subdir of OBS_PATH/, .txt extension) are in ASCII format and contain 2*npair+5 columns values (one row per OB) with: - MEAN_DATE_OBS (ISO standard), MEAN_MJD_OBS (in day), MEAN_PBL[RANGE_PBL] (in m) and MEAN_PBLA[RANGE_PBLA] (in deg) of each baseline, MEAN_FWHM[RANGE_FWHM] (in arcsec), MEAN_TAU0[RANGE_TAU0] (in s) LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: COSD DATE_CONV EXTRACT_PROHEADER SYM SIND LOCAL SYSTEM VARIABLE USED: NB_LAMBDA_MAX NB_NIGHT_MAX NB_OB_MAX NB_PAIR_MAX OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2010/05/31 last modification by pcr 2011/01/05 ----- Documentation for Manip\get_broadband_flux.pro ----- NAME: GET_BROADBAND_FLUX AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: calculate broadband flux from spectrum CATEGORY: data manipulation INPUTS: needs text input file with: - input spectrum file name - minimum and maximum wavelengths [mum] REQUIREMENST: data read in input spectrum file (in OBS_PATH/DATA/ directory) must be in ASCII format and contain (1 row per spectral channel): - wavelength [nm], flux and error [W/m^2/mum] OUTPUTS: data written in output broadband flux file (in OBS_PATH/DATA/ directory) are in ASCII format and contain (in same row) : - central wavelength and total bandwidth [mum], mean flux and error in band [W/m^2/mum] LOCAL PROCEDURE CALLED: NONE LOCAL FUNCTIOD USED: EXTRACT_PROHEADER TRAP LOCAL SYSTEM VARIABLE USED: NB_LAMBDA_MAX OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2009/03/04 last modification by pcr ----- Documentation for Manip\get_flux_scale.pro ----- NAME: GET_FLUX_SCALE AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: calculate flux scale factor(s) to apply to input flux file(s) from reference flux in a given band CATEGORY: data manipulation INPUTS: needs text input file with: - nber of input data file(s) - input data file name(s) - reference flux file AMBER data: - wavelength list name associated to input data file(s) REQUIREMENTS: data read in input data file(s) (in OBS_PATH/DATA/ directory) must be in ASCII format and contain (1 row per spectral channel): spec data: - wavelength [nm], flux and error [W/m^2/mum] AMBER data: - weight, vis. and error, flux and error, coh. flux and error [W/m^2/mum] data read in reference flux file (in OBS_PATH/DATA/ directory) must be in ASCII format and contain (in this order, 1 spectral band per row) : - central wavelength and spectral bandwidth [mum], mean flux and error in band [W/m^2/mum] OUPUTS: data written in output scale file (in OBS_PATH/DATA/ directory) are in ASCII format and contain (1 row per input data file) - flux scale factor LOCAL PROCEDURE CALLED: NONE LOCAL FUNCTION USED: EXTRACT_PROHEADER TRAP LOCAL SYSTEM VARIABLE USED: NB_LAMBDA_MAX OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2009/02/16 last modification by pcr 2009/03/04 ----- Documentation for Manip\merge_bands.pro ----- NAME: MERGE_BANDS AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: merge data file(s) obtained in different spectral band(s) and formatting output file(s) for interpretation purpose CATEGORY: data manipulation INPUTS: needs text input file with: - nber of band(s) to merge and nber of data file(s) per band (in same row) - data file name(s) (input data, 1 row per band) - input wavelength list name(s) associated to data file(s) (in same row) - if nber of bands > 1 : merged wavelength list name (output) - if needed (non-AMBER data): data format ('vis', 'spec' or 'coh') REQUIREMENTS: vis data: data read in input vis. file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel) : - visibility (or vis. response) and error spec data: data read in input spec. file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel) : - flux (or flux resp.) and error [W/m^2/mum] (or [photoel/(W/m^2/mum)]) coh. spec data: data read in input coh. spec. file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel) : - coh. flux (or coh. flux resp.) and error [W/m^2/mum] (or [photoel/(W/m^2/mum)]) AMBER data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel) : - weight, vis. (or vis. resp.) and error, flux (or flux resp.) and error [W/m^2/mum] (or [photoel/(W/m^2/mum)]), coh. flux (or coh. flux resp.) and error [W/m^2/mum] (or [photoel/(W/m^2/mum)]) data read in wavelength list(s) (in subdirectory of OBS_PATH/) must be wavelengths and bandwidths [m] in ASCII format (in same order as input data) OUTPUTS: vis data: data written in output merged vis. file (in the same subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], vis. (or vis. resp.) and error for each data file spec data: data written in output merged spec. file (in the same subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], flux (or flux resp.) and error ([W/m^2/mum] or [photoel] or [photoel/(W/m^2/mum)]) for each data file coh. spec data: data written in output merged coh. spec. file (in the same subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], coh. flux (or coh. flux resp.) and error [W/m^2/mum] (or [photoel/(W/m^2/mum)]) for each data file AMBER data: data written in output merged vis. file (in the same subdir of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], vis. (or vis. resp.) and error for each data file data written in output merged spec. file (in the same subdir of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], flux (or flux resp.) and error [W/m^2/mum] (or [photoel/(W/m^2/mum)]) for each data file data written in output merged coh. spec. file (in the same subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], coh. flux (or coh. flux resp.) and error [W/m^2/mum] (or [photoel/(W/m^2/mum)]) for each data file data written in wavelength list(s) (in subdirectory of OBS_PATH/) are wavelengths and bandwidths [m] in ASCII format (in same order as output data) LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: EXTRACT_PROHEADER SYM LOCAL SYSTEM VARIABLE USED: MAX_FLUX MIN_FLUX OBS_PATH NB_LAMBDA_MAX PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2007/10/07 last modification by pcr 2010/12/26 ----- Documentation for Manip\merge_bisp_bands.pro ----- NAME: MERGE_BISP_BANDS AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: merge data file(s) obtained in different spectral band(s) and formatting output file(s) for fitting purpose CATEGORY: data manipulation INPUTS: needs text input file with : - nber of band(s) to merge and nber of data file(s) per band (in same row) - data file name(s) (input data, 1 row per band) - input wavelength list name(s) associated to data file(s) (in same row) - if nber of bands > 1 : merged wavelength list name (output) - if needed (default = AMBER format) : data format ('clos' or 'bisp' or 'trip') REQUIREMENTS: closure phase data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel) : - closure phase and err. [deg] bispectrum data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel) : - wavelength [nm], weight, real part of bispectrum and error, imaginary part of bispectrum and error [(W/m^2/mum)^3] or [photoel^3] or [photoel^3/(W/m^2/mum)^3]) triple product data: data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel) : - wavelength [nm], weight, real part of triple product and error, imaginary part of triple product and error AMBER data (default): data read in input data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel) : - wavelength [nm], weight, real part of bispectrum and error, imaginary part of bispectrum and error [(W/m^2/mum)^3] or [photoel^3] or [photoel^3/(W/m^2/mum)^3]), real part of triple product and error, imaginary part of triple product and error data read in wavelength list(s) (in subdirectory of OBS_PATH/) must be wavelengths and bandwidths [m] in ASCII format (in same order as input data) OUTPUTS: closure phase data: data written in output merged closure phase file (in the same subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], closure phase and err. [deg] for each data file bispectrum data: data written in output merged closure phase file (in the same subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], closure phase and err. [deg] for each data file data written in output merged bispectrum file (in subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], real part of bispectrum and error, imaginary part of bispectrum and error ([(W/m^2/mum)^3] or [photoel^3] or [photoel^3/(W/m^2/mum)^3]) for each data file triple product data: data written in output merged closure phase file (in the same subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], closure phase and err. [deg] for each data file data written in output merged triple product file (in subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], real part of triple product and error, imaginary part of triple product and error for each data file AMBER data (default): data written in output merged closure phase file (in the same subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], closure phase and err. [deg] for each data file data written in output merged bispectrum file (in subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], real part of bispectrum and error, imaginary part of bispectrum and error ([(W/m^2/mum)^3] or [photoel^3] or [photoel^3/(W/m^2/mum)^3]) for each data file data written in output merged triple product file (in subdirectory of OBS_PATH/) are in ASCII format and contain (1 row per spectral channel) : - wavelength and bandwidth [m], real part of triple product and error, imaginary part of triple product and error for each data file data written in wavelength list(s) (in subdirectory of OBS_PATH/) are wavelengths and bandwidths [m] in ASCII format (in same order as output data) LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: COSD EXTRACT_PROHEADER SIND SYM TRI_STDEV LOCAL SYSTEM VARIABLE USED: EPSILON MAX_REL_ERR NB_LAMBDA_MAX OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2008/05/20 last modification by pcr 2011/01/09 ----- Documentation for Manip\replace_bisp_mod.pro ----- NAME: REPLACE_BISP_MOD AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: replace modulus of complex bispectrum or triple product with triple product of coherent fluxes or visibilities CATEGORY: data manipulation INPUTS: needs text input file with: - data format ('bisp' or 'trip') - input bispectrum or triple product file name - triplet of coherent flux or visibilities file names (in same row) REQUIREMENTS: data read in input complex bispectrum file (in subdirectory of OBS_PATH/) must be (in this order, one raw per spectral channel) : - wavelength and bandwidth [m], real part of bispectrum and error, imaginary part of bispectrum and error [(W/m^2/mu)^3] for each observing block data read in input complex triple product file (in subdirectory of OBS_PATH/) must be (in this order, one raw per spectral channel) : - wavelength and bandwidth [m], real part of triple product and error, imaginary part of triple product and error for each observing block data read in input coherent flux files (in same subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel): - wavelength and bandwidth [m], coh. flux and error [W/m^2/mum] for each data file data read in input visibility files (in same subdirectory of OBS_PATH/) must be in ASCII format and contain (1 row per spectral channel): - wavelength and bandwidth [m], visibility and error for each observing block OUTPUTS: data written in output complex bispectrum file(s) (in same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - wavelength and bandwidth [m], real part of modulus-replaced bispectrum and error, imaginary part of modulus-replaced bispectrum and error [(W/m^2/mu)^3] for each observing block data written in output complex triple product file(s) (in same subdirectory of OBS_PATH/) are (in this order, one row per wavelength) : - wavelength and bandwidth [m], real part of modulus-replaced triple product and error, imaginary part of modulus-replaced triple product and error for each observing block LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: EXTRACT_PROHEADER GET_OUTLIER_FENCES LOCAL SYSTEM VARIABLE USED: MAX_REL_ERR NB_OB_MAX OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2009/02/19 last modification by pcr 2011/01/15 ----- Documentation for Manip\scale_flux.pro ----- NAME: SCALE_FLUX AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: correct flux and/or coherent flux with flux scale factor(s) INPUTS: needs text input file with: - flux scale factor file - input data file name(s) REQUIREMENTS: data read in input scale file (in OBS_PATH/DATA/ directory) must be in ASCII format and contain (1 row per input data file) - flux scale factor and error flux or coh. flux data: data read in input data file(s) (in OBS_PATH/DATA/ directory) must be in ASCII format and contain (1 row per spectral channel): - wavelength, flux or coh. flux and error [W/m^2/mum] AMBER data: data read in input data file(s) (in OBS_PATH/DATA/ directory) must be (in this order, one raw per spectral channel) : - weight, vis. and error, flux and error, coh. flux and error [W/m^2/mum] OUTPUTS: flux or coh. flux data: data written in input data file(s) (in OBS_PATH/DATA/ directory) are in ASCII format and contain (1 row per spectral channel): - wavelength, corr. flux or corr. coh. flux and error [W/m^2/mum] AMBER data: data written in output scaled data file(s) (in OBS_PATH/DATA/ directory) are (in this order, one row per wavelength) : - weight, vis. and error, scaled flux and error, scaled coh. flux and error [W/m^2/mum] LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: EXTRACT_PROHEADER LOCAL SYSTEM VARIABLE USED: OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2009/02/18 last modification by pcr ----- Documentation for Manip\select_bisp.pro ----- NAME: SELECT_BISP AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: select input bispectral data based on measurements and errors CATEGORY: data manipulation INPUTS: needs a text input file (in OBS_PATH/INP/ directory) with : - data file number - input data file name(s) - min/max thresholds for Re(bisp)+error, Im(bisp)+error (in same row) REQUIREMENTS: data read in input bisp data file(s) (in OBS_PATH/DATA/ directory) must be in ASCII format and contain : - lambda (in nm), number of sel. frames, Re(bisp) and error, Im(bisp) and error (in photoelectrons^3) OUTPUTS: data written in output file(s) (in OBS_PATH/DATA/ directory) are (in this order, one row per spectral channel) : - lambda (in nm), nber of sel. fr. (null if data not selected), Re(bisp) and error, Im(bisp) and err. (in photoelectrons^3) LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: EXTRACT_PROHEADER LOCAL SYSTEM VARIABLE USED: OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2008/05/05 last modification by pcr 2008/05/14 ----- Documentation for Manip\select_data.pro ----- NAME: SELECT_DATA AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: select input data based on measurements and errors CATEGORY: data manipulation INPUTS: needs a text input file (in OBS_PATH/INP/ directory) with : - data file number - input data file name(s) - min/max thresholds for visibility/error, flux/error and coherent flux/error (in same row) REQUIREMENTS: data read in input data file(s) (in OBS_PATH/DATA/ directory) must be in ASCII format and contain : - weight, visibility and error, flux and error, coherent flux and error OUTPUTS: data written in output file(s) (in OBS_PATH/DATA/ directory) are (in this order, one row per spectral channel) : - weight (null if data not selected), vis. and error, flux and err., coh. flux and err. LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: EXTRACT_PROHEADER LOCAL SYSTEM VARIABLE USED: OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2007/04/25 last modification by pcr 2008/05/19 ----- Documentation for Manip\shift_vis.pro ----- NAME: SHIFT_VIS AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: shift visibilities of second data file up or down towards visibility of first file used as reference by polynomial fit continuity CATEGORY: data manipulation INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - name of first data file used as visibility reference (input data) - name of second data file to be corrected (input data) - name of wavelength list associated to first data file (input data) - name of wavelength list associated to second data file (input data) - polynomial degree of first data file, degree of second data file (if one null : no shift), number of bad data at band boundary for first file, number of bad data for second, wavelength used for continuity (if null uses mean wavelength between bands) REQUIREMENTS: data read in input data files (in OBS_PATH/DATA/ directory) must be in ASCII format and contain (1 row per spectrum channel) : visibility and error, flux and error (in W.m^-2.mu^-1), coherent flux and error (in W.m^-2.mu^-1) data read in wavelength lists (in OBS_PATH/DATA/ directory) must be wavelengths (in mu) in ASCII format (in same order than input data) OUTPUTS: data written in output visibility-shifted data file (in OBS_PATH/DATA/ directory) are in ASCII format and contain (1 row per spectrum channel) : - visibility and error, flux and error (in W.m^-2.mu^-1), coherent flux and error (in W.m^-2.mu^-1) LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: EXTRACT_PROHEADER LOCAL SYSTEM VARIABLE USED: OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2007/10/07 last modification by pcr 2008/02/13