----- Documentation for Calib\calibrate_bisp_source.pro ----- NAME: CALIBRATE_BISP_SOURCE AUTHOR pierre.cruzalebes@oca.eu PURPOSE: calibrate bispectral science data true science = raw science / response use 4th order approx of ensemble average and variance of ratio according to Winzer, P., Review of Scientific Instruments, vol. 71 (issue 3), pages 1447-1454 (2000) CATEGORY: data calibration INPUTS: need text input file (in OBS_PATH/INP/ directory) with : - science and response observation file names (in same row) - number of science data file(s) - science bispectral data file name(s) (one name per row) - bispectral response data file name(s) (one name per row, same number as source) - if needed (default = AMBER format) : data format ('clos' or 'bisp' or 'trip') REQUIREMENTS: data read in science and response observation parameter files (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per OB): - (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) closure phase data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - science closure phase and err. [deg] data read in response data file(s) (in the same subdirectory of OBS_PATH/) must be in ASCII format and contain : - response closure phase and err. [deg] bispectrum data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of fr., Re(bisp) and err., Im(bisp) and err. [photoel^3] data read in bispectrum response data file(s) (in the same subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mu)^3] triple product data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of fr., Re(triple prod) and err., Im(triple prod) and err. data read in triple product response data file(s) (in the same subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames, Re(triple prod resp) and err., Im(triple prod resp) and err. AMBER data (default): data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of fr., Re(bisp) and err., Im(bisp) and err. [photoel^3], Re(triple prod) and err., Im(triple prod) and err. data read in response data file(s) (in the same subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mu)^3], Re(triple prod resp) and err., Im(triple prod resp) and err. OUTPUTS: closure phase data: data written in true closure file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - true closure phase and err. [deg] bispectrum data: data written in true bisp data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one raw per spectral channel) : - response wavelength [nm], weight, real part of true bispectrum and error, imaginary part of true bispectrum and error [(W/m^2/mu)^3] triple product data: data written in true triple product data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one raw per spectral channel) : - response wavelength [nm], weight, real part of true triple product and error, imaginary part of true triple product and error AMBER data (default): data written in true data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one raw per spectral channel) : - response wavelength [nm], weight, real part of true bispectrum and err., imaginary part of true bispectrum and err. [(W/m^2/mu)^3], real part of true triple product and err., imaginary part of true triple product and err. LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: ANGULAR_DIST COSD EXTRACT_PROHEADER GET_OUTLIER_FENCES LORENTZIAN SIND SYM LOCAL SYSTEM VARIABLE USED: EPSILON MAX_HEADER MAX_REL_ERR NB_DATA_BOOT NB_OB_MAX OBS_PATH PLOT_DEV REF_ANG_DIST REF_FWHM REF_TAU0 REF_TIME_DELAY SPIDAST_PATH REVISION HISTORY; Written by pcr 2008/06/06 last modification by pcr 2011/01/08 ----- Documentation for Calib\calibrate_source.pro ----- NAME: CALIBRATE_SOURCE AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: calibrate science data true science = raw science / response use 4th order approx of ensemble average and variance of ratio according to Winzer, P., Review of Scientific Instruments, vol. 71 (issue 3), pages 1447-1454 (2000) CATEGORY: data calibration INPUTS: need text input file (in OBS_PATH/INP/ directory) with : - science and response observation file names (in same row) - science data file name(s) (one name per row) - response data file name(s) (one name per row, same number as source(s)) - if needed (default = AMBER format) : data format ('vis' or 'spec' or 'coh') REQUIREMENTS: data read in science and response observation parameter files (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per OB): - (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) vis data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - visibility and error data read in response data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - vis. resp. and error spec data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - flux and error [photoel] data read in response data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - flux resp. and error [photoel/(W/m^2/mum)] coh. spec data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - coherent flux and error (in photoelectrons) data read in response data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - coh. flux resp. and error [photoel/(W/m^2/mum)] AMBER data (default): data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - nber of sel. fr., vis. and error, flux and error, coh. flux and error (in photoelectrons) data read in response data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - nb of frames, vis. resp. and error, flux resp. and err., coh. flux resp. and err. [photoel/(W/m^2/mum)] OUTPUTS: vis data: data written in true data file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - true vis. and error spec data: data written in true data file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - true flux and err. [W/m^2/mum] coh. spec data: data written in true data file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - true coh. flux and err. [W/m^2/mum] AMBER data (default): data written in true data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one raw per spectral channel) : - weight, true vis. and error, true flux and error, true coh. flux and error [W/m^2/mum] LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: ANGULAR_DIST EXTRACT_PROHEADER GET_OUTLIER_FENCES LORENTZIAN SYM LOCAL SYSTEM VARIABLE USED: EPSILON MAX_REL_ERR NB_OB_MAX OBS_PATH PLOT_DEV REF_ANG_DIST REF_FWHM REF_TAU0 REF_TIME_DELAY SPIDAST_PATH REVISION HISTORY: Written by pcr 2008/06/06 last modification by pcr 2011/01/08 ----- Documentation for Calib\calib_coh.pro ----- NAME: CALIB_COH AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: calibrate coherent flux in spectral band using mean product visibilibity times flux CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - input data file name - name of wavelength list associated to input data file - polynomial degree of input visibility, degree of input flux, degree of input coherent flux (if one is null : no calibration) number of bad input data at band boundary (same number for visibility, flux and coherent flux) REQUIREMENTS: data read in input data file (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 list (in OBS_PATH/DATA/ directory) must be wavelengths (in mu) in ASCII format (in the same order than the input data) OUTPUTS: data written in output 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 TRAP LOCAL SYSTEM VARIABLE USED: OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2007/10/08 modified by pcr 2008/02/13 ----- Documentation for Calib\calib_flux.pro ----- NAME: CALIB_FLUX AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: calibrate flux of second data file using flux ratio between 2 bands given by external photometry CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - name of first data file used as flux reference (input data) - name of the second data file to be corrected (input data) - the name of wavelength list associated to first data file (input data) - name of wavelength list associated to second data file (input data) - name of broadband photometric flux measurement file (input) - effective wavelengths of bands - names of input broadband filter+detector transmission files for bands - name of input atmospheric transmission file - polynomial degree of first data file, degree of second data file (if one null : no calib), - number of bad data at band boundary for first file, number of bad data for second 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) data read in broadband photometric flux measurement file (in OBS_PATH/DATA/ directory) must be in ASCII format and contain (in this order) : - wavelength (in mu), bandwidth (in mu), flux and absolute error on flux (both in W.m^-2.mu^-1) effective wavelengths must be in microns (in same row, reference first) OUTPUTS: data written in output joined 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 TRAP LOCAL SYSTEM VARIABLE USED: OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2007/10/07 modified by pcr 2008/04/12 ----- Documentation for Calib\create_calibration_batch.pro ----- NAME: CREATE_CALIBRATION_BATCH AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: create program batch for calibration processing and make input files used by programs : - spectral calibration - synthetic data generation - response interpolation - cross calibration and averaging CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with: - subpath of OBS_PATH to observation data - spectral bandwith name(s) (J or/and H or/and K) simultaneously measured (in same row) - name(s) of each part (corresponding to each P2VM settings, in same row) - min and max wavelengths of global spectral range covered with all bandwidths in all parts [mum] (in same row) - number of observing blocks in each part (in same row) for each part : - name of target, start-end obs time (hh:mm(:ss)-hh:mm(:ss)) for each OB (1 target per row) then : - number of calibrator targets for each calibrator : - name of calibrator, name of synthetic spectrum, name of diameter file, name(s) of science target(s) associated (1 calibrator per row) OUTPUTS: data calibration processing batch text file (in SPIDAST_PATH/ directory) and associated text input files (in OBS_PATH/INP/ directory) LOCAL PROCEDURE CALLED: EXTRACT_PROHEADER LOCAL FUNCTION USED: NONE LOCAL SYSTEM VARIABLE USED: MAX_HEADER NB_BAND_MAX NB_OB_MAX NB_PART_MAX NB_TARG_MAX OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2010/03/27 last modification by pcr 2010/12/21 ----- Documentation for Calib\create_data.pro ----- NAME: CREATE_DATA AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: create synthetic model data file(s) (1 vis/spec/coh.spec/vis+flux+coh file per baseline pair and 1 bisp/trip file with per baseline triplet) CATEGORY: data manipulation INPUTS: needs text input file (in OBS_PATH/INP/ directory) with: - baseline file name - wavelength list name - model parameter file name and covariance file name (in same row) - flux scale [photoel/(W/m^2/mum)] (=0 => flux [W/m^2/mum], else => flux [photoel]) - error factor (null for noiseless data creation) - observation parameter file name (if error factor gt 0) 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 obs file) : - (length[m] , angle[deg]) of each projected baseline at obs file start/end data read in wavelength list (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per spectral channel, decreasing order of wavelength): - wavelength and bandwidth [m] data read in model parameter file (in OBS_PATH/OUT/ directory) must be in ASCII format and contain (in this order): - model flag, flux flag, synthetic exitance+radiance file names, data format flag, starting parameters, free flag(s), goodness of fit parameter, fitted parameters, inferior errors, superior errors, nber of degrees of freedom data read in covariance file (of name input_file_stem.cova in OBS_PATH/OUT/ directory) must be in ASCII format and contain the covariance matrix (of size NB_MAX_PARAM*NB_MAX_PARAM) data read in synthetic exitance file (in SYNTHE_PATH/ directory) must be in ASCII format and contain: - wavelength [AA = 10^-4 mu] and exitance [erg/cm^2/s/AA = 10*W/m^2/mu] if synthetic radiance file also found in directory (of name exitance_file_stem.limb) use also radiance data (in SYNTHE_PATH/ directory) composed of !NB_LUMIN+1 colums of data: first line: - Rosseland to limb_darkened conversion factor and relative impact parameters (!NB_LUMIN values between 0. and 1.) then: - wavelength [mum], !NB_LUMIN values of absolute intensities [W/m^2/mum] data read in input observation parameter file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per obs file): - DIT[s]/NDIT, RA[deg]/DEC[deg], UTC-OBS[h] at start/end, FWHM["] at start/end, TAU0[s] at start/end OUTPUTS: data written in output synthetic data file(s) (in the same subdirectory of OBS_PATH/DATA/) are (one row per spectral channel): vis data (one file per baseline): - vis and error spec data (one file per baseline): - flux and error ([W/m^2/mum] or [photoel]) coh spec data (one file per baseline): - coh flux and error ([W/m^2/mum] or [photoel]) AMBER data (one file per baseline): - weight, vis, vis error, flux, flux error, coh. flux, coh. flux error ([W/m^2/mum] or [photoel]) clos phase data (one file per baseline triplet): - closure phase and error [deg] bisp data (one file per baseline triplet): - wavelength [nm], weight, bispectrum real part and error, bispectrum imaginary part and error ([(W/m^6/mum)^3] or [photoel^3]) triple product data (one file per baseline triplet): - wavelength [nm], weight, triple prod real part and error, triple prod imaginary part and error AMBER data (one file per baseline triplet): - wavelength [nm], weight, bispectrum real part and error, bispectrum imaginary part and error ([(W/m^6/mum)^3] or [photoel^3]), triple prod real part and error, triple prod imaginary part and error LOCAL PROCEDURE CALLED: COV2COR ENGELKE EXTRACT_PROHEADER GET_SYN_REF MODEL_DATA_FUNCT_PROJ MODEL_SPECTRUM PLANCK RESET_PLOT LOCAL FUNCTION USED: COSD FUNCTPROJ MAKE_TAB3 SIND SYM TRAP LOCAL SYSTEM VARIABLE USED: EPSILON FORMAT_OUT MAS2RADIAN MAX_REL_ERR NB_BASE_STEP NB_MAX_PARAM NB_OB_MAX NB_PAIR_MAX NB_RES_STEP OBS_PATH PLOT_DEV SPIDAST_PATH SYNTHE_PATH REVISION HISTORY: Written by pcr 2007/01/02 last modification by pcr 2011/01/13 ----- Documentation for Calib\create_data_spec.pro ----- NAME: CREATE_DATA_SPEC AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: create synthetic model spectrum file CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with: - wavelength list name - model parameter file name and covariance file name (in same row) - flux scale [photoel/(W/m^2/mum)] (=0 => flux [W/m^2/mum], else => flux [photoel]) - error factor (null for noiseless data creation) REQUIREMENTS: data read in wavelength list (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per spectral channel, decreasing order of wavelength): - wavelength and bandwidth [m] data read in model parameter file (in OBS_PATH/OUT/ directory) must be in ASCII format and contain (in this order): - model flag, flux flag, synthetic exitance+radiance file names, data format flag, starting parameters, free flag(s), goodness of fit parameter, fitted parameters, inferior errors, superior errors, nber of degrees of freedom data read in covariance file (of name input_file_stem.cova in OBS_PATH/OUT/ directory) must be in ASCII format and contain the covariance matrix (of size NB_MAX_PARAM*NB_MAX_PARAM) data read in synthetic exitance file (in SYNTHE_PATH/ directory) must be in ASCII format and contain: - wavelength [AA = 10^-4 mu] and exitance [erg/cm^2/s/AA = 10*W/m^2/mu] if synthetic radiance file also found in directory (of name exitance_file_stem.limb) use also radiance data (in SYNTHE_PATH/ directory) composed of !NB_LUMIN+1 colums of data: first line: - Rosseland to limb_darkened conversion factor and relative impact parameters (!NB_LUMIN values between 0. and 1.) then: - wavelength [mum], !NB_LUMIN values of absolute intensities [W/m^2/mum] OUTPUTS: data written in output synthetic data file (in the same subdirectory of OBS_PATH/) are (one row per spectral channel): - wavelength [nm], flux, flux error ([W/m^2/mum] or [photoel]) LOCAL PROCEDURE CALLED: COV2COR ENGELKE EXTRACT_PROHEADER GET_SYN_REF MODEL_DATA_FUNCT_PROJ MODEL_SPECTRUM PLANCK RESET_PLOT LOCAL FUNCTIOn USED: FUNCTPROJ TRAP LOCAL SYSTEM VARIABLE USED: EPSILON FORMAT_OUT MAX_REL_ERR NB_BASE_STEP NB_MAX_PARAM NB_RES_STEP OBS_PATH PLOT_DEV SPIDAST_PATH SYNTHE_PATH REVISION HISTORY: Written by pcr 2009/03/04 last modification by pcr 2010/12/21 ----- Documentation for Calib\create_input_files.pro ----- created by pcr 2010/03/27 modified by pcr 2010/03/31 create input files used by programs called for calibration processing : - spectral calibration - synthetic data generation - response interpolation - cross calibration and averaging needs text input file (in OBS_PATH/INP/ directory) with: - subpath of OBS_PATH to observation data - spectral bandwith name(s) (J or/and H or/and K) of each part (in same row) - name(s) of each part (corresponding to each P2VM settings, in same row) - number of observing blocks in each part (in same row) for each part : - name of target, Teff+logg (ex 4660g2.9), start-end obs time (hh:mm(:ss)-hh:mm(:ss)) for each OB (1 target per row) then : - number of calibrator targets for each calibrator : - name of calibrator and name(s) of science target(s) associated (1 calibrator per row) local procedure called: EXTRACT_PROHEADER local function used: none local system variable used: MAX_HEADER NB_BAND_MAX NB_OB_MAX NB_PART_MAX NB_TARG_MAX OBS_PATH SPIDAST_PATH ----- Documentation for Calib\cross_calibrate_bisp_source.pro ----- NAME: CROSS_CALIBRATE_BISP_SOURCE AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: cross-calibrate bispectral source data true source(k) = raw source(i) / response(j) use 4th order approx of ensemble average and variance of ratio according to Winzer, P., Review of Scientific Instruments, vol. 71 (issue 3), pages 1447-1454 (2000) CATEGORY: data calibration INPUTS: need text input file (in OBS_PATH/INP/ directory) with: - science and response observation file names (in same row) - number of observing block(s) for each observing block set: - number of source and response files (in same row) - bispectral source data file name(s) (one name per row) - bispectral response data file name(s) (one name per row) then: - if needed (default = AMBER format) : data format ('clos' or 'bisp' or 'trip') REQUIREMENTS: data read in science and response observation parameter files (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per OB): - (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) closure phase data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - science closure phase and err. [deg] data read in response data file(s) (in the same subdirectory of OBS_PATH/) must be in ASCII format and contain : - response closure phase and err. [deg] bispectrum data : data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames, Re(bisp) and err., Im(bisp) and err. [photoel^3] data read in bispectrum response data file(s) (in the same subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mu)^3] triple product data : data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames, Re(triple prod) and err., Im(triple prod) and err. data read in triple product response data file(s) (in the same subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames, Re(triple prod resp) and err., Im(triple prod resp) and err. AMBER data (default) : data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames, Re(bisp) and err., Im(bisp) and err. [photoel^3], Re(triple prod) and err., Im(triple prod) and err. data read in response data file(s) (in the same subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of frames, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mu)^3], Re(triple prod resp) and err., Im(triple prod resp) and err. OUTPUTS: closure phase data: data written in true closure phase file(s) (in the same subdir of OBS_PATH/) are (in this order) : - true closure phase and err. [deg] bispectrum data : data written in true bisp data file(s) (in the same subdir of OBS_PATH/) are (in this order, one raw per spectral channel) : - response wavelength [nm], weight, real part of true bispectrum and error, imaginary part of true bispectrum and error [(W/m^2/mu)^3] triple product data : data written in true triple prod data file(s) (in the same subdir of OBS_PATH/) are (in this order, one raw per spectral channel) : - response wavelength [nm], weight, real part of true triple product and error, imaginary part of true triple product and error AMBER data (default) : data written in true data file(s) (in the same subdir of OBS_PATH/) are (in this order, one raw per spectral channel) : - response wavelength [nm], weight, real part of true bispectrum and error, imaginary part of true bispectrum and error [(W/m^2/mu)^3], real part of true triple product and error, imaginary part of true triple product and error LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: ANGULAR_DIST COSD EXTRACT_PROHEADER GET_OUTLIER_FENCES LORENTZIAN SIND SYM LOCAL SYSTEM VARIABLE USED: EPSILON MAX_HEADER MAX_REL_ERR NB_OB_MAX OBS_PATH PLOT_DEV REF_ANG_DIST REF_FWHM REF_TAU0 REF_TIME_DELAY SPIDAST_PATH REVISION HISTORY: Written by pcr 2008/05/14 last modification by pcr 2011/01/08 ----- Documentation for Calib\cross_calibrate_source.pro ----- NAME: CROSS_CALIBRATE_SOURCE AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: cross-calibrate science data true science(k) = raw science(i) / response(j) use 4th order approx of ensemble average and variance of ratio according to Winzer, P., Review of Scientific Instruments, vol. 71 (issue 3), pages 1447-1454 (2000) CATEGORY: data calibration INPUTS: need text input file (in OBS_PATH/INP/ directory) with: - science and response observation file names (in same row, potentially many responses per science) - number of observing block(s) for each observing block: - number of science and response files (in same row) - source data file name(s) (one name per row) - response data file name(s) (one name per row) then: - if needed (default = AMBER format) : data format ('vis' or 'spec' or 'coh') REQUIREMENTS: data read in science and response observation parameter files (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per OB): - (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) vis data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - visibility and error data read in response data file(s) (in the same subdir of OBS_PATH/) must be in ASCII format and contain : - vis. resp. and error spec data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - flux and error [photoel] data read in response data file(s) (in the same subdir of OBS_PATH/) must be in ASCII format and contain : - flux resp. and error [photoel/(W/m^2/mum)] coh. spec data: data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - coherent flux and error (in photoelectrons) data read in response data file(s) (in the same subdir of OBS_PATH/) must be in ASCII format and contain : - coh. flux resp. and error [photoel/(W/m^2/mum)] AMBER data (default): data read in science data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - nber of selected frames, vis. and error, flux and error, coh. flux and error (in photoelectrons) data read in response data file(s) (in the same subdirectory of OBS_PATH/) must be in ASCII format and contain : - nber of calib frames, vis. resp. and error, flux resp. and err., coh. flux resp. and err. [photoel/(W/m^2/mum)] OUTPUTS: vis data: data written in true data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one raw per spectral channel) : - true vis. and error spec data: data written in true data file(s) (in the same subdirectory) of OBS_PATH/) are (in this order, one raw per spectral channel) : - true flux and err. [W/m^2/mum] coh. spec data: data written in true data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one raw per spectral channel) : - true coh. flux and err. [W/m^2/mum] AMBER data (default): data written in true data file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one raw per spectral channel) : - weight, true vis. and error, true flux and error, true coh. flux and error [W/m^2/mum] LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: ANGULAR_DIST EXTRACT_PROHEADER GET_OUTLIER_FENCES LORENTZIAN SYM LOCAL SYSTEM VARIABLE USED: EPSILON MAX_REL_ERR NB_OB_MAX OBS_PATH PLOT_DEV REF_ANG_DIST REF_FWHM REF_TAU0 REF_TIME_DELAY SPIDAST_PATH REVISION HISTORY: Written by pcr 2007/08/27 last modification by pcr 2011/01/08 ----- Documentation for Calib\get_bisp_response.pro ----- NAME: GET_BISP_RESPONSE AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: calculate closure phase/bispectrum/triple product intrumental spectral response resp = raw calib / synthetic calib use 4th order approx of ensemble average and variance of ratio according to Winzer, P., Review of Scientific Instruments, vol. 71 (issue 3), pages 1447-1454 (2000) if synthetic calib eq 'none' then resp = raw calib CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - data file number - calibrator data file name(s) - synthetic data file name(s) (same number as calibrator(s)) - if needed (default = AMBER format) : data format ('clos' or 'bisp' or 'trip') REQUIREMENTS: closure phase data: data read in calibrator closure phase data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - closure phase and err. [deg] data read in synthetic data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - closure phase and err. [deg] bispectrum data: data read in calibrator bispectral data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of sel frames, Re(bisp) and err., Im(bisp) and err. [photoel^3] data read in synthetic data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], weight, Re(bisp) and err., Im(bisp) and err. [(W/m^2/mum)^3] triple product data: data read in calibrator bispectral data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of sel frames, Re(trip) and err., Im(trip) and err. data read in synthetic data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], weight, Re(trip) and err., Im(trip) and err. AMBER data (default): data read in calibrator data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [nm], nber of sel frames, Re(bisp) and err., Im(bisp) and err. [photoel^3], Re(trip) and err., Im(trip) and err. OUTPUTS: closure phase data: data written in output closure phase response file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - closure phase response and err. [deg] bispectrum data: data written in output bispectral response file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - synthetic wavelength [nm], nber of calib fr, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mum)^3] triple product data: data written in output triple product response file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - synthetic wavelength [nm], nber of calib fr, Re(trip resp) and err., Im(trip resp) and err. AMBER data (default): data written in output bispectral response file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - synthetic wavelength [nm], nber of calib fr, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mum)^3], Re(trip resp) and err., Im(trip resp) and err. LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: COSD EXTRACT_PROHEADER GET_OUTLIER_FENCES SIND SYM LOCAL SYSTEM VARIABLE USED: EPSILON MAX_REL_ERR OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2008/05/14 last modification by pcr 2011/01/08 ----- Documentation for Calib\get_observations.pro ----- NAME: GET_OBSERVATIONS AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: extract start and end observation parameters and baseline(s) from header(s) of observing file(s) CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - header file number - input observing file header name(s) (one row per obs file) - input baseline station file REQUIREMENTS: observing file header(s) (in OBS_PATH/DATA/ directory) must be in standard FITS format and contain the following ASCII lines with: RA = aaa.aaaaaa / RA pointing (deg) DEC = +-dd.ddddd / DEC pointing (deg) MJD-OBS = ddddd.dddddddddd / Obs start HIERARCH ESO DET DIT = i.iiiiiii / Integration Time HIERARCH ESO DET NDIT = n / # of Sub-Integrations HIERARCH ESO ISS AMBI FWHM END= e.ee / Observatory seeing HIERARCH ESO ISS AMBI FWHM START= s.ss / Observatory seeing HIERARCH ESO ISS AMBI TAU0 END= e.eeeeee / Coherence time HIERARCH ESO ISS AMBI TAU0 START= s.ssssss / Coherence time HIERARCH ESO ISS CONF NTEL = n / Number of telescopes used + NTEL ASCII lines with: HIERARCH ESO ISS CONF STATIONi= 'Xj ' / Station of telescope i + 2*NTEL*(NTEL-1) ASCII lines with: HIERARCH ESO ISS PBLij END = xx.xxx / Proj baseline Ti Tj at end HIERARCH ESO ISS PBLij START = yy.yyy / Proj baseline Ti Tj at start HIERARCH ESO ISS PBLAij END = aa.aaa / Proj baseline orientation ang HIERARCH ESO ISS PBLAij START = bb.bbb / Proj baseline orientation ang where i,j = telescope indexes xx.xxx = proj (ij) baselength [m] at end, yy.yyy = proj (ij) baselength [m] at start, aa.aaa = proj (ij) baseline orientation ang [deg] at end (from N to E) bb.bbb = proj (ij) baseline orientation ang [deg] at start (N to E) input baseline station file must contain NBASE=NTEL*(NTEL-1)/2 rows with each station combination, respecting baseline order of measured data files OUTPUTS: output baseline file contain (in OBS_PATH/DATA/ directory, .base extension, 2*NBASE columns of complex data, one row per 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 written in input observation parameter file (in OBS_PATH/DATA/ directory, .obs extension, one row per observation) are of complex type : - (DIT[s] , NDIT), (RA[deg] , DEC[deg]), (START_UTC[h] , END_UTC[h]), (START_FWHM["] , END_FWHM), (START_TAU0[s] , START_TAU0[s]), (MJD@Oh , 0) LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: COSD EXTRACT_PROHEADER SIND LOCAL SYSTEM VARIABLE USED: MAX_HEADER NB_PAIR_MAX OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2009/01/25 last modification by pcr 2010/12/23 ----- Documentation for Calib\get_response.pro ----- NAME: GET_RESPONSE AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: calculate vis/flux/coh flux instrumental spectral response resp = raw calib / synthetic calib use 4th order approx of ensemble average and variance of ratio according to Winzer, P., Review of Scientific Instruments, vol. 71 (issue 3), pages 1447-1454 (2000) if synthetic calib eq 'none' then resp = raw calib CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - number of calibrator data file(s) - calibrator data file name(s) - synthetic data file name(s) (same number as calibrator(s)) - if needed (default = AMBER format) : data format ('vis' or 'spec' or 'coh') REQUIREMENTS: vis data: data read in calibrator data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - visibility and error data read in synthetic data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - visibility and error spec data: data read in calibrator data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - flux and error [photoel] data read in synthetic data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - flux and error [W/m^2/mum] coh. spec data: data read in calibrator data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - coh. flux and error [photoel] data read in synthetic data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - coh. flux and error [W/m^2/mum] AMBER data (default): data read in calibrator data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - number of selected frames, visibility and error, flux and error, coherent flux and error [photoel] data read in synthetic data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - weight, visibility and error, flux and error, coherent flux and error [W/m^2/mum] OUTPUTS: vis data: data written in output response file(s) (in subdirectory of OBS_PATH/) are (in this order) : - vis. resp. and error spec data: data written in output response file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - flux resp. and err. [photoel/(W/m^2/mum)] coh. spec data: data written in output response file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - coh. flux resp. and err. [photoel/(W/m^2/mum)] AMBER data (default): data written in output response file(s) (in the same subdirectory of OBS_PATH/) are (in this order) : - number of calib frames, vis. resp. and error, flux resp. and err., coh. flux resp. and err. [photoel/(W/m^2/mum)] LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: EXTRACT_PROHEADER GET_OUTLIER_FENCES SYM LOCAL VARIABLE SYSTEM USED: EPSILON MAX_REL_ERR OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2007/08/27 last modification by pcr 2011/01/08 ----- Documentation for Calib\interpol_bisp_response.pro ----- NAME: INTERPOL_BISP_RESPONSE AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: evaluate instrumental bispectral complex responses for each spectral channel and each baseline on time of science observations by temporal linear interpolation or polynomial fit CATEGORY: data calibration INPUTS: need text input file (in OBS_PATH/INP/ directory) with : - calibrator and science observation file names (in same row) - bispectral response file name(s) - degree of polynomial fit to be fitted to data (=0 for linear interpolation) and desired confidence level (only used for fit) - if needed (default = AMBER format) : data format ('clos' or 'bisp' or 'trip') REQUIREMENTS: data read in science and calib observation parameter files (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per OB): - (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) closure phase data: data read in closure phase response 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 resp. and err. [deg] bispectrum data : data read in bispectral response data files (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, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mum)^3] triple product data : data read in triple product response data files (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, Re(triple prod resp) and err., Im(triple prod resp) and err. AMBER data (default) : data read in response data files (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, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mum)^3], Re(triple prod resp) and err., Im(triple prod resp) and err. OUTPUTS: closure phase data: data written in output interpolated closure phase response file(s) (in the same subdir of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - closure phase and err. [deg] bispectrum data : data written in interpolated bispectral response files (in the same subdir of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - wavelength [nm], nber of frames, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mum)^3] triple product data : data written in interpolated triple product response files (in the same subdir of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - wavelength [nm], nber of frames, Re(triple prod resp) and err., Im(triple prod resp) and err. AMBER data (default) : data written in interpolated response files (in the same subdir of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - wavelength [nm], nber of frames, Re(bisp resp) and err., Im(bisp resp) and err. [photoel^3/(W/m^2/mum)^3], Re(triple prod resp) and err., Im(triple prod resp) and err. LOCAL PROCEDURE CALLED: COV2COR RESET_PLOT LOCAL FUNCTION USED: COSD EXTRACT_PROHEADER POLY_BOOT POLYBOOTW SIND SYM LOCAL SYSTEM VARIABLE USED: EPSILON NB_BOOT_LOOPS NB_DATA_BOOT NB_OB_MAX OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2008/06/05 last modification by pcr 2010/12/26 ----- Documentation for Calib\interpol_observations.pro ----- NAME: INTERPOL_OBSERVATIONS AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: create response observing parameters during science observations : calib DIT+NDIT+RA+DEC + calib or sci start/end UTC+FWHM+TAU0+MJD@0h CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - calibrator and science observation file names (in same row) - number of science observing blocks (if null => 1 block with all science obs files, first calib OB used for DIT+NDIT+RA+DEC(+UTC+FWHM+TAU0+MJD@0h) replacement) if nber of sci OB(s) gt 0 : - number of science observing file(s) in each OB (in same row) - index of calibrator file used for DIT+NDIT+RA+DEC(+UTC+FWHM+TAU0+MJD@0h) replacement for each science OB (starting at 0, in same row) REQUIREMENTS: data read in input science and calib observation parameter files (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per OB): - (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 interpolated output calib observation parameter file (in the same subdir of OBS_PATH/) are of same type as input (one row per OB): - (DIT[s] , NDIT), (RA[deg] , DEC[deg]) of calib, (START_UTC[h] , END_UTC[h]) of calib or sci, (START_FWHM["] , END_FWHM["]) of sci, (START_TAU0[s] , END_TAU0[s]), (MJD@0h , 0) of sci LOCAL PROCEDURE CALLED: NONE LOCAL FUNCTION CALLED: EXTRACT_PROHEADER NONE LOCAL SYSTEM VARIABLE USED: NB_OB_MAX OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY: Written by pcr 2009/02/11 last modification by pcr 2010/05/31 ----- Documentation for Calib\interpol_response.pro ----- NAME: INTERPOL_RESPONSE AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: evaluate instrumental responses in vis, flux and/or coh flux for each spectral channel and each baseline on science observations by temporal linear interpolation or polynomial fit CATEGORY: data calibration INPUTS: need text input file (in OBS_PATH/INP/ directory) with : - calibrator and science observation file names (in same row) - response file name(s) - degree of polynomial fit to be fitted to data (=0 for linear interpolation) and desired confidence level (only used for fit) - if needed (default = AMBER format) : data format ('vis' or 'spec' or 'coh') REQUIREMENTS: data read in science and calib observation parameter files (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per OB): - (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) vis data: data read in response data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - vis. resp. and error spec data: data read in response data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - flux resp. and error [photoel/(W/m^2/mum)] coh. spec data: data read in response data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - coh. flux resp. and error [photoel/(W/m^2/mum)] data read in response data file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - nber of frames, vis. resp. and error, flux resp. and err., coh. flux resp. and err. [photoel/(W/m^2/mum)] OUTPUTS: vis data: data written in interpolated response data file(s) (in the same subdir of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - vis. resp. and error spec data: data written in interpolated response data file(s) (in the same subdir of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - flux resp. and error [photoel/(W/m^2/mum)] coh. spec data: data written in interpolated response data file(s) (in the same subdir of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - coh. flux resp. and error [photoel/(W/m^2/mum)] AMBER data (default): data written in interpolated response data file(s) (in the same subdir of OBS_PATH/) must be in ASCII format and contain (in this order, one raw per spectral channel): - nber of frames, vis. resp. and error, flux resp. and err., coh. flux resp. and err. [photoel/(W/m^2/mum)] LOCAL PROCEDURE CALLED: COV2COR RESET_PLOT LOCAL FUNCTION USED: EXTRACT_PROHEADER POLY_BOOT SYM LOCAL SYSTEM VARIABLE USED: POLYBOOTW NB_BOOT_LOOPS NB_DATA_BOOT NB_OB_MAX OBS_PATH PLOT_DEV SPIDAST_PATH REVISION HISTORY Written by pcr 2008/06/03 last modification by pcr 2010/12/23 ----- Documentation for Calib\print_night_stat.pro ----- NAME: PRINT_NIGHT_STAT AUTHOR: pierre.cruzalebes@oca.eu PURPOSE: print whole-night uv-coverage of science-target and turbulence-statistics (seeing FWHM and tau0) extracted from baseline+observation+wavelength file(s) and gather all observation files of the night in one single file CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - number of parts (defined with P2VM settings) - nber of input science-target baseline file(s) per part (in same row) - input science-target baseline file name(s) of each part (one row per part) - number of wavelength file(s) per part - wavelength list name(s) of each bands (all bands in same row, one row per part) for each part : - number of science and calibrator target(s) (in same row) - science observation parameter file name(s) (same row for all science in part) - calibrator observation parameter file name(s) (same row for all calib in part) 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 obs 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 wavelength list(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain (one row per spectral channel): - wavelength and bandwidth [m] data read in input observation parameter file(s) (in OBS_PATH/DATA/ directory, .obs extension, one row per observation) are of complex type : - (DIT[s] , NDIT), (RA[deg] , DEC[deg]), (START_UTC[h] , END_UTC[h]), (START_FWHM["] , END_FWHM), (START_TAU0[s] , START_TAU0[s]), (MJD@Oh , 0) OUTPUTS: data written in output observation parameter file (in OBS_PATH/OUT/ directory, .obs extension, one row per observation) are of complex type : - (DIT[s] , NDIT), (RA[deg] , DEC[deg]), (START_UTC[h] , END_UTC[h]), (START_FWHM["] , END_FWHM), (START_TAU0[s] , START_TAU0[s]), (MJD@Oh , 0) LOCAL PROCEDURE CALLED: RESET_PLOT LOCAL FUNCTION USED: COSD EXTRACT_PROHEADER SIND SYM LOCAL SYSTEM VARIABLE USED: NB_OB_MAX NB_PAIR_MAX NB_TARG_MAX OBS_PATH SPIDAST_PATH REVISION HISTORY: Written by pcr 2008/06/13 last modification by pcr 2010/12/23 ----- Documentation for Calib\shift_wave_list.pro ----- NAME: SHIFT_WAVE_LIST PURPOSE: shift wavelength lists using cross-correlation CATEGORY: data calibration INPUTS: needs text input file (in OBS_PATH/INP/ directory) with : - number of input data raw spectrum file(s) - input raw spectrum file name(s) (in same row) - reference line spectrum file name - reference line spectrum type ('star' or 'lab') - basic data file name & observing header file name(s) (in same row) - nber of spectral windows used for calculating wavelength shift(s) - atmospheric transmission file name - filter transmission file name - spectral resolution for calculating the spectrum continuum used for scaling - nber of pixels used for barycentric position of phase-correlation peak (odd integer) - output wavelength file name(s) (in same row) - reference spectral line table (in ALL_DATA/directory) REQUIREMENTS: data read in raw spectrum file(s) (in subdirectory of OBS_PATH/) must be in ASCII format and contain the same number of spectral channels with (one row per spectral channel) : - wavelength and bandwidth [m], flux and error [photoel] for each observing file if reference line spectrum type = 'star' (reference lines given by reference exitance) : data read in reference line spectrum (in SYNTHE_PATH/directory) must be in ASCII format and contain : - wavelength [AA = 10^-4 mum] and exitance [erg/cm^2/s/AA = 10 W/m^2/mum] if reference line spectrum type = 'lab' (reference lines given by laboratory spectrum) : data read in reference line spectrum (in subdirectory of OBS_PATH/) must be in ASCII format and contain : - wavelength [m] and flux [photoel] basic data file (in subdirectory of OBS_PATH/) must be in standard FITS format and contain the following ASCII lines with: RAEP0 = 'hh:mm:ss.sss' / Right Ascension (J2000) (h:min:sec) DECEP0 = '+-dd:mm:ss.ss' / Declination (J2000) (deg:arcmin:arcsec) PMRA = +-ppp.pp / Annual Proper Motion in RA (milliarcsec/yr) PMDEC = +-ppp.pp / Annual Proper Motion in DEC (milliarcsec/yr) SYSVEL = +-vvv.v / Radial Velocity (km/s) observing header file(s) (in OBS_PATH/DATA/ directory) must be in standard FITS format and contain the following ASCII lines with: EXPTIME = t.ttttttt / Integration time MJD-OBS = ddddd.dddddddddd / Obs start HIERARCH ESO DET NDIT = nnn / # of Sub-Integrations data read in atmospheric file (in ALL_DATA_PATH/directory) must be in ASCII format and contain : - wavelength [mum] and transmission data read in filter file (in ALL_DATA_PATH/directory) must be in ASCII format and contain : - wavelength [mum] and transmission data read in line table (in ALL_DATA_PATH/directory) must be in ASCII format and contain : - wavelength [mum] and element identification OUTPUTS: data written in output wavelength file(s) (in the same subdirectory of OBS_PATH/) are (in this order, one row per spectral channel) : - shifted wavelengths and bandwidths [m] LOCAL PROCEDURE CALLED: DEG2DMS DEG2HMS HELIOCOR HELIO_JD RESET_PLOT YDN2MD LOCAL FUNCTION USED: DATE_CONV EXTRACT_PROHEADER GET_OUTLIER_FENCES JULDATE SYM TRAP LOCAL SYSTEM VARIABLE USED: ALL_DATA_PATH GEOLAT GEOLON NB_LAMBDA_MAX NB_OB_MAX OBS_PATH PLOT_DEV SPIDAST_PATH SYNTHE_PATH REVISION HISTORY: Written by pcr 2010/03/06 last modification by pcr 2011/01/12