Writing Command Files - BenningtonCS/Telescope-2014 GitHub Wiki

The following are instructions taken from the MIT SRT Manual. But before you take off to start writing command files, make sure to read the section "Command File Quirks That Nobody Told You About." But I digest:

MIT Documentation

" The use of input command files (filename.cmd) will speed the entry of SRT commands as well as reduce command entry mistakes. A list of the command file syntax can be found by moving the mouse pointer to the Rcmdfl button. The first part of the list will appear in the message board above the text entry box. Moving the pointer off the button then back on will show the rest of the syntax list. The command file is ASCII and can accept instruction lines (those that are read and take some action), blank lines (they are ignored) and comment lines (also ignored by the system). Comments: Start with an asterisk and can be any text the user wishes.

*The following are examples of command file entries *2005:148:00:00:00 Cas *

Instruction: The line must start with a time mark (either UT or LST) or a colon. For Example:

2005:148:00:00:00 radec 23:00:00 06:50:00 (yyyy:ddd:hh:mm:ss (UT))
LST:06:00:00 (LST:hh:mm:ss)
:120 azel 120 30 (sss azel position)

Rules:

: cmd /execute the command and proceed to the next line
:120 cmd /execute the command and wait 120 seconds, taking data, before
        proceeding to the next line in the schedule
:120 /wait 120 seconds, taking data, before proceeding to the next
    line. This is a convenient way of increasing the radiometer
   integration to more than one scan.

Note: There is NO space allowed between the colon and a time “wait” command

LST:06:00:00 /wait until LST 06:00:00, taking data, before proceeding to the
            next line
2005:148:00:00:00 /wait until UT= yyyy:ddd:hh:mm:ss, before proceeding to the
                 next line

Example Set: Instructions can be set in order to perform an observation. The following set of instructions will command the SRT to take 1420.4 MHz hydrogen spectra in 5 degree spacing along a section of the galactic equator. The user must start data recording, unstow the telescope, calibrate the receiver, set the observing frequency center and frequency scan and then repeat the spectral line observations for ten points along the equator. Note: Allow a space between the colon and the command.

: record rotation.rad  /(Start data recording of file rotation.rad)
: galactic 206 20      /(unstow and move to calibration position)
: freq 1419            /(Off-hydrogen calibration frequency)
: calibrate
: freq 1420.4 4        /(Set center frequency mode 4)
: galactic 205 0       /(Move to first data point)
: galactic 210 0       /(Next point)
: galactic 215 0
: galactic 220 0
: galactic 225 0
: freq 1419            /(Off-hydrogen calibration frequency)
: galactic 225 20      /(Calibration point)
: calibrate
: freq 1420.4 4        /(Set center frequency mode 4)
: galactic 230 0       /(Move to sixth data point)
: galactic 235 0       /(Next point)
: galactic 240 0
: galactic 245 0
: galactic 250 0
: roff                 /(End data recording)

If this input command file were named galactic.cmd, the user could initiate this observation by clicking in the command text box: galactic.cmd The SRT will read each line in turn and report the current line read as green text in the message board area. If, for example, the start time was 1400 Universal Time on March 15, 2002; and no output file name was entered, the default OUTPUT file would automatically be written and labeled 0414814.rad. Where the file label is: yydddhh.rad"

Thus ends the MIT documentation, outside of what’s in the helpfile, of how to write command files.

Command File Quirks That Nobody Told You About
  • For our version of SRTN, you must save your command files with a .txt suffix.

  • In our version of SRTN, we do not have an input text box to execute command files from within SRTN. Instead, you must write your command file, go into srt.cat and add a line like "COMMAND mycommandfile.txt" if you want SRTN to execute any command file that isn’t the stock command file. This command file will be excuted automatically when you run SRTN with your new command line in srt.cat, so be prepared.

  • even if you assign a filename to the output file, like ": record myfile.rad," IN THE COMMAND FILE the data doesn’t actually get put into myfile.rad. It instead gets put into a generically named output file. myfile.rad gets created, but nothing gets put in it. Your file will be uniquely named if you manually push the "record" button in the SRTN toolbar.

⚠️ **GitHub.com Fallback** ⚠️