Text Files

by Gustaaf Van Moorsel last modified Jan 19, 2017 by Lorant Sjouwerman

Apart from direct manual editing in the fields exposed by the web interface, all components of the OPT web application can import and export ASCII text files that, e.g., can be created and manipulated or optimized by computer programs or scripts outside the OPT web application.

A source list can be prepared from external source catalogs and formatted such that the SCT can ingest it, or a source list can be exported to a text file. Similar catalog operations can be performed on resource catalogs as well.  Furthermore, (re)source lists can be extracted from an existing scheduling block and can be shared or loaded in either the RCT or the SCT.  The OPT can read and write scan lists or ingest script-generated scheduling blocks, etc.

This section describes the syntax that might be of interest to most users of this feature: importing source lists into the SCT and importing scan lists or complete scheduling blocks into the OPT. A properly formatted standardized list of spectral lines is also provided for upload. To be able to read in scans or scheduling blocks into the OPT without overloading the individual entries with too many variables, the source and resource catalogs must be defined beforehand (so that the scan parser can grab the (re)source definitions from the existing catalogs). If only VLA calibrators and NRAO default resources are required, no other additional (re)source catalogs need to be defined.

The following sections in this chapter of the OPT manual describe the syntax for importing source lists into the SCT, and for importing scan lists and scheduling blocks into the OPT. For information about importing source lists into the Proposal Submission Tool (PST), see the Sources Section of the PST manual.


General Syntax

The import of text files is accomplished by parsing each line, where each line is assumed to define a complete instruction. Parsing occurs for plain ASCII characters so if a rich-text capable text editor is used (e.g., Word) please save without rich-text formatting in plain ASCII text or the import will fail without an error message. Empty or whitespace-only lines and lines where the first non-whitespace character is a hash (# symbol) are ignored. That is, hashes may be used to insert comments in the text file. Typical lines will have input fields delimited by semi-colons (;), where multi-variable fields have their variables separated by commas (,). The comma after the final value of a field is optional, but the final semi-colon after the final field is mandatory (except for spectral line lists). Leading and trailing whitespace around field variables is ignored, but whitespace between the first and last non-whitespace character of a variable is preserved (see examples). Optional fields may be left unspecified (i.e., no characters or whitespace-only characters) and will be assigned a default value where appropriate. Character fields are treated as case-sensitive unless otherwise specified. Illegal characters in (free-format text) fields are non-printable (tab) characters, including any form of end-of-line characters, variable delimiters (semi-colon and comma) and any of the specified ones in the table below; leading and trailing whitespace around free-format text variables is ignored, but whitespace within freeformat text is preserved. The full list of acceptable and illegal characters in free-format text fields is:

Acceptable characters
a-zA-Z lower and upper case letters
0-9 digits
+ - . = plus, minus, period/decimal and equal signs
/ _ # * slash, underscore, hash/sharp and "star"
( ) [ ] open/close parentheses and square braces
Illegal characters
' " single quote and double quote
{ } curly braces
< > less than and greater than

end-of-line and non-printable characters (e.g. "tab"),

rich-text formatted text or other non-ASCII characters

\ @ % $ backslash, at, percent and dollar signs
` ~ ! ^ & | : , ; other textual and linguistic characters