IDFStoPDS_batch.p is a driver program for IDFStoPDS [a program which is used to generate PDS compliant data and label files from data that has been stored in the Instrument Description File System (IDFS) format]. Conversion of IDFS data files into PDS data files requires the execution of the SDDAS program idfs_time in conjunction with IDFStoPDS; also required is a layout file (".I2P" file). For more specific information on the requirements for running IDFStoPDS, consult the documentation "IDFStoPDS.html". The execution of IDFStoPDS performed by IDFStoPDS_batch.p is referred to in the aforementioned documentation as "batch mode" [hence the GUI interface is avoided].
This script facilitates the location of data files for conversion, their conversion, and the relocation of converted files to an appropriate destination directory. Control of this script is accomplished by the creation of a simple configuration file. Within the configuration file is specified, at a bare minimum, the name[s] of the .I2P layout file to be used in the conversion process. The configuration file may also be used to specify [and change 'on the fly'] any of the directory paths and/or executables used in the conversion process.
IDFStoPDS_batch.p always generates a logfile and will, by default, append to the logfile each time it is run. For greater error information, the script may be run in a verbose mode, in which specific results and other information pertaining to each step of the conversion process are written to the logfile.
The name[s] of a configuration file[s] is the only required - and the only accepted - input for the exeuction of IDFStoPDS_batch.p. Should no data path be specified in the configuration file, the script will look for the input data along a datapath defined by the environment data ${SDDAS_DATA} and information gleaned from the .I2P [layout] file. It is expected that in the normal execution of this script, both the input and output data paths will be specified in the configuration file.
The most general view of this code, then, is that of a processing driver for IDFStoPDS which steps through a configuration file one line at a time. Each line in the configuration file which specifies an I2P file results in data processing using IDFStoPDS. In between lines used to trigger processing of individual I2P files, the user may change any configuration parameter.
Interpretation of each line in a configuration file is based on the assumption that it is one of the following four types:
Valid formats for execution lines within the configuration file:
Configuration file examples for individual program/pathname specifiers: