Science Operations

Spectrophotometric Standard Stars

Two MODS scripts are needed to make a spectroscopic observation:
  1. The acquisition script slews the telescope, positions the guide probe, configures the instrument for imaging and takes the slit and field images needed to center the target in the slit. The script then pauses while the observer runs modsAlign to compute and sent the offset needed to align the target in the slit. The observer resumes the script and a thru-slit confirmatory image is taken.
  2. The observation script moves the grating or prism in the beam and takes the series of spectroscopic exposures.


MODS acquisition scripts must be run with the acqMODS command (monocular) and acqBinoMODS (binocular). acqBinoMODS is a shell script which executes acqMODS on MODS1 and MODS2 with the –bino option which enables synchronous binocular offsets when the syncoffset command is in the script. When syncoffset is not in the script, offsets are executed asynchronously and must be smaller than the copointing limit, 40 arcseconds.


If you are using just one MODS, then, in a terminal window, run the monocular command, acqMODS:

acqMODS –modsN modsNacq.txt 
As each script command is sent and executed, output will be written to the terminal window and and changes will appear on the Dashboard of the MODS GUI.


If you are using both MODS1 and MODS2, then run the binocular wrapper, acqBinoMODS:
acqBinoMODS mods1acq.txt will send the same script, mods1acq.txt, to both MODS1 and MODS2, or
acqBinoMODS mods1acq.txt mods2acq.txt will send the script mods1acq.txt to MODS1 and mods2acq.txt to MODS2.

acqBinoMODS will launch 2 terminal windows, one for each MODS, and, as each script command is sent and executed, output will be written to the terminal window and and changes will appear on the Dashboard of the MODS GUI.

Running modsAlign

Unlike long-slit or MOS acquisition scripts, the spectrophotometric standard star acquisition script will only take a field image. It will pause after this image has been taken. At this point, the observer needs to run modsAlign.

From a separate terminal window, type (note that you can copy/paste the image filenames from the modsDisp or mods2Disp log into the modsAlign command line):

modsAlign -r fieldimage.fits will display the field image in an interactive ds9 window, in which the cursor (a black circle) will be blinking.


Measuring the target centroid

On the field image, position the blinking cursor over the target and click “a” to measure the centroid. If the star is saturated so much that the centroid may not be reliable, then position the cursor carefully over what looks like the center and click “x”. You may type “a” and “x” repeatedly; the last measurement is the one that will be used. When satisfied, click “q” to quit.

Sending the offset

The offset that is required to center the target at the reference position for the 5″ wide slit will be computed as a DETXY relative offset and displayed to the terminal with the query to send it or not (Y/N). The observer must type “y” or “Y” (otherwise nothing will be sent!) after which modsAlign will send the command: 

offsetxy dx dy rel
to the telescope, followed by the updatepointing command which will cause the pointing origin to be updated such that the position of the target after the offset will become the new reference position. Absolute offsets will be made with reference to this new position.
The offset is complete when the prompt reappears in the terminal window and the “Offset” button in the MODS User Interface changes from an amber to grey background.

Taking the confirmatory thru-slit image

After the offset is complete, type <Enter> in the script-running window(s) to resume the script. The mask will be inserted again into the focal plane, and the thru-slit confirmatory image will be taken.

Tweaking the centering

Often the offset sent by modsAlign does not perfectly center the target in the slit. So long as the star is mostly within the 5″ wide slit, running modsAlign -r on the confirmatory image
modsAlign -r 2nd_thruslit.fits
will compute the star centroid (green circle and “+” in the image below), find the slit x-center via edge detection (“+” in the image below) and compute the offset needed to move the star to the slit center.


Now that the object is well-centered on the slit, run the observation script to configure the instrument for grating or prism spectroscopy and take the sequence of spectra.


If you are using just one MODS, then, in a terminal window, run the monocular command, execMODS:

execMODS –modsN modsNobs.txt to send the script modsNobs.txt to MODSN, where N is 1 for MODS1 and 2 for MODS2.


If you are using MODS1 and MODS2, then use the shell script wrapper, execBinoMODS.
execBinoMODS mods1obs.txt will send the script mods1obs.txt to both MODS1 and MODS2, and
execBinoMODS mods1obs.txt mods2obs.txt will send the script, mods1obs.txt to MODS1 and mods2obs.txt to MODS2.

Taking a few more exposures

If a few more exposures are needed, to account for poorer-than-expected seeing or transparency, then it is preferable not to run the entire script again (specifically, not to run the “instconfig” command again), but to take the additional expsoures either:
  • directly from the MODS User Interface, by clicking “Go” on the channel(s) needed, or by sending the “go”, “blue go” or “red go” command from the Command Window; or
  • by running execMODS with the -e option, which will do only the Exec: block, e.g.
    • execMODS –mods1 -e mods1obs.txt; and
    • execMODS –mods2 -e mods2obs.txt

In case the preset is lost…

If the preset is lost, you can save time in re-acquiring the object by incorporating the offset made by modsAlign into the acquisition script. Each time modsAlign is run, it writes (and overwrites) a file called modsN_lastoffset (where N is 1 or 2 for MODS1 or MODS2).
The steps to be taken are covered on the Troubleshooting page, however they are also repeated here for now.
  1. Make a copy of the acquisition script with a different name, e.g. mods1acq_recover.txt.
  2. go into the directory from which the acquisition with modsAlign was done and cat the file mods1_lastoffset (mods2_lastoffset for MODS2). This file contains the last offset command:  offsetxy dx dy rel for long-slit or offsetpointing dtheta dx dy detxy rel for MOS.
  3. Edit mods1acq_recover.txt to replace all of the contents of the Acquire: block with, on the first line, the contents of mods1_lastOffset and on the second, slitGO. The mods1acq_recover.txt script should have an Acquire block like:
                    offsetxy -0.228 10.824 detxy rel
  4. acqMODS –mods1 mods1acq_recover.txt will then execute the preset, followed by the offset that was needed to the do the alignment the last time, and take a thru-slit image.
  5. acqBinoMODS mods1acq_recover.txt mods2acq_recover.txt will execute the binocular preset and take the pair of thru-slit MODS1 and MODS2 images.
  6. copy the observation script to a recovery obs script, e.g. cp mods1obs.txt mods1obs_recover.txt and adjust the exposure time and/or the nimgs as needed to complete the observation sequence.