PDS_VERSION_ID = PDS3 RECORD_TYPE = STREAM RELEASE_ID = 0001 REVISION_ID = 0000 OBJECT = TEXT PUBLICATION_DATE = 2010-07-28 NOTE = "Description of the SOFTWARE directory contents" END_OBJECT = TEXT END PFS software (tested on IDL version < 7) July 2008 Set of softwares able to open and read raw and geometry data, and to read the right calibration tables and apply the calibration operation to obtain the calibrated spectra. ----------------------------------------------------------------------------- Intro When downloading a ZIP file, the user should put it in a working directory dedicated to PFS software,then unzip it. This will create a two subdirectory : /SOFTWARE/ | |- /DATA/ | |- /GEOMETRY/ | |- /CALIB/ The essential functions to open and read the data are in the FUNCTIONS subdirectory of each directory. The examples programs given in both DATA and GEOMETRY are intended only as reader of the PFS data. The CALIB subdirectory contains both the programs to read calibrated PFS spectra stored in the /CALIB_SAMPLE/ directory at root level and the code to produce that outputs starting from the RAW data and the calibration tables stored in the /CALIB / directory at root level. Essentially the software in the /SOFTWARE/CALIB/CALIBRATOR/ use the same functions stored in the /SOFTWARE/CALIB/DATA/ to read raw data, then read the right calibration tables and apply the calibration operation to obtain the calibrated spectra (further details should be found in the calibration documents PFS_LWC_CALIB.PDF and PFS_SWC_CALIB.PDF as well in the PFS_CAL_LAB_1.PDF , PFS_CAL_LAB_2.PDF and PFS_CAL_NEAREARTH.PDF, in the /DOCUMENT/ directory). To run example code do the following steps: - open a .PRJ file (for DATA or for GEOMETRY) - change the PATH variable to your PFS Data directory - Menu Project > Compile > All Files - Menů Project > Run Only for the software stored in the /CALIBRATOR/ subdirectory, the last step must be substituted with : - Menů Run > Run 'program_name' The LWC_CAL.pro, SWC_CAL_LASER-OFF.pro and SWC_CAL_LASER-ON.pro will give to the user the calibrated spectra calculated directly from the raw data and from the calibration tables. ----------------------------------------------------------------------------- Function and Resulting Variables -------- read_pfs_data(FILE,NUM,RECORDS): return a structured variable array with the data. Array length is NUM. Each array element is defined as : OBT_OBSERVATION_TIME : DOUBLE PRECISION FLOAT SCET_OBSERVATION_TIME : UNSIGNED LONG INTEGER INTERFEROGRAM : INTEGER ARRAY WITH LENGTH = RECORDS INPUT: FILE : path of the data file to open NUM : total number of the field (= observation) stored in the file RECORDS : length of a single interferogram -------- read_pfs_hk(FILE,NUM): return a structured variable array with the housekeeping data. Array length is NUM. Each array element is defined as : OBT_OBSERVATION_TIME : DOUBLE PRECISION FLOAT SCET_OBSERVATION_TIME : UNSIGNED LONG INTEGER TypeOfMes : UNSIGNED LONG INTEGER SD_Version : UNSIGNED LONG INTEGER ZOPD_SW_FWD : UNSIGNED LONG INTEGER ZOPD_SW_REV : UNSIGNED LONG INTEGER ZOPD_LW_FWD : UNSIGNED LONG INTEGER ZOPD_LW_REV : UNSIGNED LONG INTEGER SCANPOS : UNSIGNED LONG INTEGER SW_ZeroX_Cutoff_Status : DOUBLE PRECISION FLOAT LW_ZeroX_Cutoff_Status : DOUBLE PRECISION FLOAT SPEEDCLOCK_Status : DOUBLE PRECISION FLOAT ADCCLOCK_Status : DOUBLE PRECISION FLOAT SW_Detector_Cutoff_Status : DOUBLE PRECISION FLOAT LW_Detector_Cutoff_Status : DOUBLE PRECISION FLOAT SWGAIN_Status : UNSIGNED LONG INTEGER LWGAIN_Status : UNSIGNED LONG INTEGER First_ADC_1_Status : UNSIGNED LONG INTEGER Second_ADC_1_Status : UNSIGNED LONG INTEGER First_ADC_2_Status : UNSIGNED LONG INTEGER Second_ADC_2_Status : UNSIGNED LONG INTEGER Select_Motor_Coil_Status : UNSIGNED LONG INTEGER DPDIR_Status : UNSIGNED LONG INTEGER SW_ZOPD_Position : UNSIGNED LONG INTEGER LW_ZOPD_Position : UNSIGNED LONG INTEGER Right_Collisions : UNSIGNED LONG INTEGER Left_Collisions : UNSIGNED LONG INTEGER SWLASERPWR_10V : DOUBLE PRECISION FLOAT LWLASERPWR_10V : DOUBLE PRECISION FLOAT SWPHOTODIODEPWR_10V : DOUBLE PRECISION FLOAT LWPHOTODIODEPWR_10V : DOUBLE PRECISION FLOAT T1_10V : DOUBLE PRECISION FLOAT T2_10V : DOUBLE PRECISION FLOAT T3_10V : DOUBLE PRECISION FLOAT T4_10V : DOUBLE PRECISION FLOAT T5_10V : DOUBLE PRECISION FLOAT T6_10V : DOUBLE PRECISION FLOAT T7_10V : DOUBLE PRECISION FLOAT T8_10V : DOUBLE PRECISION FLOAT LDTEMPSW_10V : DOUBLE PRECISION FLOAT LDTEMPLW_10V : DOUBLE PRECISION FLOAT SWTEMP_10V : DOUBLE PRECISION FLOAT LWTEMP_10V : DOUBLE PRECISION FLOAT TEMPA1_10V : DOUBLE PRECISION FLOAT TEMPA2_10V : DOUBLE PRECISION FLOAT SWTRW_10V : DOUBLE PRECISION FLOAT LWTRW_10V : DOUBLE PRECISION FLOAT CLVOLTAGE_10V : DOUBLE PRECISION FLOAT INPUT: FILE : path of the data file to open NUM : total number of the field (= observation) stored in the file -------- read_pfs_label(FILE,NAME): return value stored in a PDS label file in the NAME field INPUT: FILE : path of the label file to open NAME : name if the field to search for (i.e. ROWS or FIELDS) -------- reader_geometry(FILE,NUM): return a structured variable array with all the geometrical information.Array length is NUM. Each array element is defined as : SCET : DOUBLE PRECISION FLOAT LONGITUDE : DOUBLE PRECISION FLOAT LATITUDE : DOUBLE PRECISION FLOAT SPACECRAFT_ALTITUDE : DOUBLE PRECISION FLOAT Local_Time : SINGLE PRECISION FLOAT Solar_Longitude : DOUBLE PRECISION FLOAT INCIDENC_EANGLE : SINGLE PRECISION FLOAT EMISSION_ANGLE : SINGLE PRECISION FLOAT PHASE_ANGLE : SINGLE PRECISION FLOAT MOLA_ALTIMETRY : SINGLE PRECISION FLOAT LW_TANGENT_ALTITUDE : SINGLE PRECISION FLOAT LW_TARGET_DISTANCE : SINGLE PRECISION FLOAT SOLAR_DISTANCE : SINGLE PRECISION FLOAT SUBSOLAR_LONGITUDE : DOUBLE PRECISION FLOAT SUBSOLAR_LATITUDE : DOUBLE PRECISION FLOAT PLANETARY_PHASE_ANGLE : SINGLE PRECISION FLOAT SUB_SPACECRAFT_LONGITUDE : DOUBLE PRECISION FLOAT SUB_SPACECRAFT_LATITUDE : DOUBLE PRECISION FLOAT JULIAN_DATE : DOUBLE PRECISION FLOAT AIR_MASS : SINGLE PRECISION FLOAT INPUT: FILE : path of the geometry file to open NUM : total number of the field (= observation) stored in the file Definition of field in Geometry File: ----------------------------------------------------------------------------- Label Range Units ----------------------------------------------------------------------------- SCET Value of the Spacecraft clock LONG_LW Mars Longitude for the LWC instrument (-180°;+180°) deg LAT_LW Mars Latitude for the LWC instrument (-90°;+90°) deg LONG_SW Mars Longitude for the SWC instrument (-180°;+180°) deg LAT_SW Mars Latitude for the SWC instrument (-90°;+90°) deg The Longitudes are expressed following the Eastward convention SC_ALT Spacecraft altitude km LT Local Time at the SWC target hours LS Solar Longitude (0°;+360°) deg INC_SW Incidence angle for the SWC instrument (0°;+180°) deg EM_SW Emission angle for the SWC instrument (0°;+180°) deg PH_SW Phase angle for the SWC instrument (0°;+180°) deg ALTM Mola Altimetry m TG_ALT Limb altitude for the SWC instrument km This parameter is not null only for limb observations TG_DIST Distance from the spacecraft to the target point (SWC) km S_DIST Solar distance AU SS_LONG Longitude of the sub-solar point (-180°;+180°) deg SS_LAT Latitude of the sub-solar point (-90°;+90°) deg PL_PH Planetary phase angle (0°;+180°) deg SSC_LONG Longitude of the sub-spacecraft point (-180°;+180°) deg SSC_LAT Latitude of the sub-spacecraft point (-90°;+90°) deg JD Julian Date Airmass Secant of the emission angle ============================================================================= -------- read_pfs_data_calib(FILE,NUM,RECORDS): return a structured variable array with the data. Array length is NUM. Each array element is defined as : OBT_OBSERVATION_TIME : DOUBLE PRECISION FLOAT SCET_OBSERVATION_TIME : DOUBLE PRECISION FLOAT WAVENUMBER : DOUBLE PRECISION ARRAY WITH LENGTH = RECORDS RADIANCE : DOUBLE PRECISION ARRAY WITH LENGTH = RECORDS INPUT: FILE : path of the data file to open NUM : total number of the field (= observation) stored in the file RECORDS : length of a single spectra, the same for the WAVENUMBER and RADIANCE fields. END