Science Operations

The MODS Script Engines

 

MODS scripts are text files. There are 5 types of scripts:

  • Spectroscopic Acquisition scripts;
  • Spectroscopic Observation scripts; 
  • Imaging scripts; 
  • Calibration scripts; and 
  • Procedure scripts.

The script engines, acqMODS and execMODS, parse the scripts and send the commands through the GUI to the instrument. The GUI must be open for the scripts to run. Use acqMODS to run Spectroscopic Acquisition scripts and execMODS for all other scripts.

acqMODS (acqBinoMODS)

acqMODS –mods1 mods1acq.txt will send the spectroscopic acquisition script, mods1acq.txt, to MODS1; and
acqMODS –mods2 mods2acq.txt will send the spectroscopic acquisition script, mods2acq.txt to MODS2.
 

acqMODS must be told the instrument to which the script will be directed.

As the linked image illustrates, spectroscopic acquisition scripts are divided into 4 blocks: Archive; Target; Instrument; Acquire. acqMODS can optionally be run on only one of the Target, Instrument or Acquire blocks:

  • acqMODS –modsN -p modsNacq.txt will send the preset only;
    • Useful in case a binocular preset (sent by acqBinoMODS) failed on one side.
  • acqMODS –modsN -i modsNacq.txt will configure the instrument only;
  • acqMODS –modsN -a modsNacq.txt will acquire the set of acquisition images only.

    • Useful in case the thru-mask and field acquisition images need to be repeated. If just one image, say the field image or the final thru-slit confirmatory image, needs to be repeated, this might more easily be done by clicking the “Go” button on the GUI.
acqBinoMODS is a shell script which opens two terminal windows, one for MODS1 and the other for MODS2, sends a binocular preset and sends the script(s) on the command line to MODS1 and MODS2.
 
acqBinoMODS mods1acq.txt will send the mods1acq.txt script to both MODS1 and MODS2;
acqBinoMODS mods1acq.txt mods2acq.txt will send mods1acq.txt to MODS1 and mods2acq.txt to MODS2.
 

The full set of options to acqMODS is given by typing acqMODS followed by a carriage return, and is:

  • –bino execute this MODS acquisition in binocular mode
  • -n dry-run the script w/o execution (alias –dryrun/–chk)
  • -a only run the acquisition image sequence (alias –acquire)
  • -p only preset the telescope (alias –preset)
  • -i only configure the instrument (alias –inst)
  • -l load target coordinates but don’t execute (alias –load)

execMODS (execBinoMODS)

execMODS –mods1 mods1obs.txt will send a spectroscopic observation script or an imaging script to MODS1.
execMODS –mods2 mods2obs.txt will send a spectroscopic observation script or an imaging script to MODS2.
 

Spectroscopic observation scripts contain no target information and must have the 3 key blocks: Archive, Instrument, Exec.
Imaging scripts contain target information and must have the following 4 blocks: Archive, Target, Instrument, Exec.

 
execMODS  –modsN -e modsNobs.txt will run only the Exec block of the script, modsNobs.txt. This or clicking “Go” on the GUI are the only recommended ways to repeat one or all of the series of exposures. Running the entire script again would repeat the instconfig command that sets the collimator to its zeropoint and realigns it based on feedback from the IR laser, and this re-zeroing and realignment could cause a 1-2 pixel shift in the lines.
 
execBinoMODS mods1obs.txt will send the mods1obs.txt script to both MODS1 and MODS2;

execBinoMODS mods1obs.txt mods2obs.txt will send mods1obs.txt to MODS1 and mods2obs.txt to MODS2.

 

The full set of options to execMODS is given by typing execMODS followed by a carriage return, and is:


  • –bino execute this script in binocular mode (–bino is automatically added when execBinoMODS is used)
  • -n dry run the script w/o execution (alias –dryrun/–chk)
  • -r N run the script starting from command number N (alias –runfrom)
    • use listMODS to get command numbers
  • -e run from the Exec: block to the end (alias –exec)
  • -f name run from the name: block to the end (alias –fromblock)
  • -b name run only the name: block commands (alias –runblock) 
  • -u run unattended and abort on errors (alias –unattended)