APT Command Line Arguments
APT now accepts command line arguments according to the following syntax:
runAPT [ options - see below ] [ proposal-file ... ]
APT will automatically load (or optionally batch process) the proposal files listed on the command line. If no proposals are specified the APT will come up with no proposal, or if the auto-load preference is set, the proposal(s) from the previous session.
These command options, when used, will override the system properties which are still available to acheive the same functionality.
The command options are:
-batch, --batch:
Causes APT to run in batch mode. That means it will perform "Run All" on each proposal specified on the command line, then exit. There are currently two exceptions to this:
- When -batch is specified with -import, "Run All" will not be performed unless -runAll is also specified on the command line.
- When -batch is specified with -toprop, "Run All" will not be performed. To speed up this operation, proposal legality checking is also disabled.
Disables the STScIEditNumber version checking in APT. APT will not access the STScI database either.
-debug [<classname> | ALL]:
Turns on APT debug messages and send them to standard out. Where:
<classname> := Turns on debug messages for class named only.
ALL := Turns on all debug messages.
(Note that if you do not give a value the next command line argument will be assumed to be a classname - and will not be properly interpretted.)
-autoadjust, --autoadjust:
When used with -batch, the Orbit Planner processing will include auto-adjustment of applicable exposures. Ignored if not running batch.
-forcesaves, --forcesaves:
Ignored if not running batch. Causes APT to save each proposal after performing "Run All" on it.
-ForceLoad, --ForceLoad:
Ignored if not importing from RPS2 files. Currently if the RPS2 importer creates any diagnostics during an import, the imported proposal is stripped of its CoI, targets and visits. Using this argument forces those things to be preserved in the imported file regardless of diagnostics. It's important to note that some import diagnostics cause parsing to stop, so the imported proposal may not be complete even with this setting.
-mode STScI, --mode STScI:
Causes APT to make the CAL, ENG and SM categories available.
-toprop, --toprop:
Causes APT to load a proposal and write out a prop file. You must also specify batch mode (e.g., -batch -toprop or -bt). When -toprop is specified, APT will never run the orbit planner or visit planner. This argument simply tells APT to convert an XML file to a .prop file.
-import <import-type>, --import <import-type>:
Causes APT to interpret the command line list of proposal files as file of type <import-type> rather than as normal APT files. For example, an <import-type> of prop would cause APT to import all the specified proposal files as RPS2 .prop files.
When -import is specified with -batch, each loaded proposal will generate the following output:
-export <export-type-list>, --export <export-type-list>:
Causes APT to export each loaded proposal to each of the specified export types. This argument is ignored unless -batch is specified. The available types of export are defined by the document model, but currently consist of pdf, prop, targets and targetTemplate. To specify multiple export types, separate the types by commas with NO intervening white space.
An example of an import/export batch command (should be all on one line) is:
runAPT -mode STScI -batch -import prop -export prop,targets testdata/1.prop testdata/2.prop
That command would import testdata/1.prop and testdata/2.prop and output the following files:
-input <input-path>, --input <input-path>:
Specify a semi-colon (;) delimited list of input directories to search for input products. Currently limited to the tv-desc and tv-diag files loaded by the Orbit Planner to build its initial orbit displays.
-output <output-path>, --output <output-path>:
Specify an output directory to which APT should write output products. In GUI mode this defines the default directory for the File Chooser for exporters. In batch mode it overrides the output directory for output products.
-quickload, --quickload:
Ensures fast loading of proposals by turning off the OCM and stopping address verification and proposal status lookup. Note that this will lead to spurious errors due to absence of OCM status and should be used with caution. It's primary use is for speeding up rendering of tv-desc files in the Orbit Planner.
-visits <visit-list>, --visits <visit-list>:
Loads and processes only those visits which are specified in the <visit-list>.
<visit-list> is a comma delimited list of visit numbers.
-runAll, --runAll:
Causes APT to perform a "Run All" on each proposal specified on the command line. For now, this argument is ignored unless -batch and -import are specified.
-status, --status:
Prevents visit status from effecting the editing of a proposal. Visit status will still be obtained from the status server and displayed but visits will remain editable and no warnings will be generated.
Disables the STScIEditNumber version checking in APT. APT will not access the STScI database either.
-Tools <tool-list>, --Tools <tool-list>:
Ignored unless performing a "Run All" (see -runAll). If this option is specified then only those tools included in <tool-list> will be run.
<tool-list> is a comma delimited list of tool names or tool short names with no whitespace. If any tool name includes whitespace then the whole list should be quoted, e.g.:
-Tools "Orbit Planner,Diagnostics"
-Metrics, --Metrics:
APT will record specific timing and memory metrics during execution. The raw data is written to the file Metrics.xml in APT's runtime directory (the same directory as the runAPT executable) and is also written as a report to stdout when APT is quit.
-Property, --Property:
Expects exactly one argument. That argument defines a system property that can be used by APT or any of it's tools. The argument looks a lot like a Java Property definition, i.e., <property name>=<property value>.
There can be no intervening spaces in the name/value pair unless they are part of the property value. There *must*, however, be a space between the -Property and the name/value pair.
Unlike Java Property definitions, no quotes are required around the property value. You may use quotes as needed to deal with building the argument in the command shell, but the actual argument that arrives inside APT should not have quotes unless they are part of the property value.
-Property may be used as many times as desired on a command line. If the same property is defined more than once, only the last one will take effect. Property definitions will only be used if APT or one of its tools expects them. Unexpected property defintions will be ignored. Some examples of legal -Property arguments are:
# 3 different ways to specify the transIORFile property:
runAPT -Property transIORFile=/home/donald/myIOR
runAPT -Prop transIORFile=/home/donald/myIOR
runAPT -P transIORFile=/home/donald/myIOR
# Specifying both the transIORFile and transOutputDir properties:
runAPT -P transIORFile=/home/donald/myIOR -P transOutputDir=/var/tmp
# Specify file that will contain overrides to Orbit Planner properties:
runAPT -P op.properties.file=/home/donald/OrbitPlanner.prop
# Specifying a property that's unknown to any APT tools has no effect:
runAPT -P useless.definition=will.be.ignored
For more information on properties that can be used with the Orbit Planner, see the Trans Developers' Guide to Running APT.
-STScIEditNumber, --STScIEditNumber:
Sets the revision number in the prop or xml file.To do this specify the option -STScIEditNumber where must be a non-negative integer. If -STScIEditNumber is specified, an APT file must also be specified on the command line. -STScIEditNumber will cause the revision number to be set to regardless of any previous value that may have been in the APT or prop file. The shorthand for -STScIEditNumber is -S.
-STScIEditNumber will be used when APT is run during PLIB check-in:
/usr/local/bin/hot-apt -batch -toprop -forcesaves -status -STScIEditNumber <revision> <APT file>
-batch - runs the tool in batch mode
-toprop - generates a new .prop file
-forcesaves - generates a new xml file
-status - disables visit status and STScIEditNumber checking with the ASSIST database
-STScIEditNumber - the new edit version in the .prop and .xml files written
This command should read <APT file>, overwrite it with a new file containing <revision>, and write a .prop file containing <revision>.
All the command options can be abbreviated to their shortest unique form, so -b, -f, -t, and -m STScI are all acceptable. When the single character options are used, they can be combined (-bf, for example).