How to Observe with MODS

New in 2016B:

  1. The AGw unit of MODS1 is now identical to that of MODS2. Poor collimation due to vignetting of the pupil from guide stars near the bottom of the patrol field should no longer be a problem. In the new AGw, the guide star remains near the center of the guide camera field of view and therefore the shadow of the pickoff mirror extends symmetrically above and below the guide star. PIs and observers should check their older acquisition scripts with the --shadow option in the latest version, v2.1.2, of modsView (, to insure that the shadow of the pickoff mirror will not vignette any targets. The figure in illustrates this change.
  2. MODS1+MODS2 binocular observing is now supported for MOS, long-slit and imaging observations of the same target and using the same PA and guide star. Note that all offsets, including blind offsets, are done asynchronously, so they must not exceed co-pointing limit (i.e. the left and right sides cannot point to positions separated by more than 40″). The two options supported at this time are:
    1. Identical Twinning (the same script on both sides); and
    2. Fraternal Twinning (same base configuration but different scripts, e.g. the same base position, position angle and guide star but different MOS masks or different configurations on each side (a 1″ long-slit observation using MODS1 blue-only acquisition and spectroscopy and MODS2 red-only acquisition and spectroscopy.
  3. The monocular script engines, acqMODS and execMODS must now be followed by --mods1 or --mods2 to indicate which MODS will be used. (acqMODS2 and execMODS2 are obsolete and acqMODS or execMODS will return an error, prompting for a --modsN). Binocular observing will use the wrappers, acqBinoMODS and execBinoMODS which take one (for identical twinning) or two scripts (for fraternal twinning) as arguments. See examples in Section 10.
  4. modsAlign has been rewritten to work almost automatically and simultaneously for both MODS1 and MODS2, thereby making binocular MODS1+2 observing more efficient. For more information, see section 5 Object Acquisition.

As a consequence of these upgrades, observing with MODS2 is almost like observing with MODS1. The few operational differences are summarized at

1) Software Start-Up

2) Start of the Night

3) Pointing and Collimating

4) Running MODS Scripts

5) Object Acquisition

6) Recovery of Observations

7) Calibrations

8) MODS End of Night

9) Basic MODS Troubleshooting

10) Binocular MODS1+MODS2 Observing

11) Quick Look Reduction (MODS1 only)

Software Start-Up

The following *may* be completed beforehand by the ISA, TO, or Instrument Tech on duty. Regardless, whenever you (the observer) are about to use the instrument you should go through these instructions CAREFULLY to make sure the instrument is indeed ready to go. Report any problems to the ISA or TO:

  • Log into LBTO workstation, obs2, using the correct partner account (INAF,LBTB,OSURC,AZ). You could login to obs3 or obs4, but obs2 is just next to the operator’s console and the most obvious choice for setting up instrument control.

  • Open a terminal window and type mods1 status or mods2 status. You will see a status panel. Everything listed but the modsN gui should be open and owned by mods. If not ask the ISA or TO to follow the instructions here

  • In the terminal window type mods1 start gui or mods2 start gui. This should launch the MODS Control Panel.

  • In the MODS Control Panel, click on the Setup icon on the left sidebar to display the MODS Instrument Setup screen

    • Click “GetDate” on the right side of the Instrument Setup Screen to update the UT date in the image file names. Make sure it is the correct UT date for the night. If it is early in the afternoon in may still get yesterdays UT. Click “Apply”.

    • Check the sequence numbers (e.g. mods1b.20130915.0001.fits) to ensure the numbers are as expected.

      • If you or someone else has taken files earlier during the same UT day, you may have to manually adjust the sequence number to reflect this.

      • When in doubt, check /newdata on a summit machine to verify that the sequence number you are starting with is unique and correct (i.e. if 0003 already exists for mods1r, start with 0004 for mods1r in the setup tab!)

  • Open another terminal window and type modsDisp (or mods2Disp). This will launch two read-only ds9 windows to display the most recent Blue and Red images, while the terminal window will display a table of the images as they arrive on the /newdata disk.

  • Run execMODS --mods1 or execMODS --mods2 mods2Wake.prolocated in the /home/modseng/modsScripts/Support.

  • Take a test image with mods. Run execMODS --mods1 (or --mods2) — located in the /home/modseng/modsScripts/Support. Check that the image displays properly and appears in /newdata.

  • Put MODS into Observing Mode and Home the guider stage. If the first preset is sent with the calibration unit in, the guider stage will not initialize correctly and the preset will not move the guide probe. (Once MODS is in observing mode a GCS restart will clear this.)

Start of the Night

These steps should be completed by the observer to prepare MODS for observing:

  • In the MODS Control Panel, click on the Setup icon on the left sidebar to display the MODS Instrument Setup screen.

    • While many scripts will configure the Observer and Project values in this screen automatically it is important to enter default values for data taken “by hand” or for scripts in which it is not specified:
      • Observer Names (can be separated by commas and spaces). This goes into headers as the value for the keyword, OBSERVER.
      • Enter the Partner Name: OSURC, AZ, INAF, LBTB, LBTO. The name entered here goes into the headers as PARTNER and determines how the data will be archived. (Multiple partners can be listed, separated by commas but no spaces.)
      • Enter PropID
      • Enter PI Name, Support (SUPPORT), Telescope Operator (TELOPS) and a Comment describing the run.
      • Once all the necessary updates have been made, click Apply, then Save.
      • The Partner, PropID and PI Name will be overridden later by the parameters in the Archive: blocks of subsequent MODS observing scripts.
    • Check the UT date in the image file names
  • Click on the MODS1 or MODS2 icon to switch to the MODS1 or MODS2 Dashboard. This will be the screen to watch during observing.
  • Open a third terminal window and cd into the directory which contains your observing scripts.
  • Open a terminal window in which you will run modsAlign.
    • If you are working alone, you should open the modsAlign xterm on your current workstation (likely obs2) AFTER ensuring that all other instances of ds9 NOT associated with MODS (i.e. RB_Science or iraf) are closed.
    • If you are working with a partner who wishes to run modsAlign, you may choose to open the terminal window on a separate mountain workstation and designate that as the “acquisition station”. Ensure that all other instances of ds9 NOT associated with MODS (i.e. RB_Science or iraf) are closed.
    • Regardless of which machine you choose for running modsAlign, you MUST run the command from a writeable directory (i.e. not /newdata or /home). If you are doing MOS, you MUST be in the directory where your mms files are located.
  • Open a terminal window and type “IIFGUI &” to bring up the IIF GUI display. This GUI will allow you to keep track of the position of the telescope and will help confirm when commands to the mount & mirrors are completed.
  • Open a terminal window and type “GCSGUI left &” to bring up the GCS display GUI for SX/MODS1. For DX/MODS2, type “GCSGUI right &”. This GUI will show you the the guide stars on both the guider and wavefront sensor and give you a measure of the seeing and collimation.
  • Open a terminal window and type “LBTplot” to bring up the LBTPlot script. Click  the “SX(DX) guide” button to track the seeing (top panel; the guide star FWHM), transparency (middle panel; the guide star flux converted to magnitude around r band) and the guide corrections (bottom panel) for the SX(DX) side.

Pointing and Collimation Check

  • Provide the OSA with the coordinates of your first target before the start of the night, preferably at or before sunset.

  • Once it is dark enough, they will use the coordinates provided to slew to a nearby bright star to correct pointing and collimation

Running Scripts

  • The script engines to run monocular acquisition or observation scripts are:

    • acqMODS --mods1 or acqMODS --mods2 to run object acquisition scripts

    • execMODS --mods1 or execMODS --mods2 to run spectroscopic and imaging scripts.

  • Binocular observing is done using the following wrappers, where the optional second argument is the script, different from the one for MODS1, to be sent to MODS2.
    • acqBinoMODS script1.acq [script2.acq]
    • execBinoMODS script1.obs [script2.obs] or
    • execBinoMODS script1.img [script2.img]
  • To run imaging scripts

    • Imaging scripts preset the telescope, lock on a guide star, then pause until you think the WFS is sufficiently converged (the WFE reported on the GCSGUI <~ 800 nm) to proceed

    • Template .img scripts can be created with the mkMODSImg program (part of modsTools), and then edited to add filter and dithering sequences as needed.

  • To run a spectroscopic script follow the procedure for Acquisition below

Object Acquisition

Object acquisition uses the script modsAlign. modsAlign was rewritten in December 2016 to make binocular alignments more efficient. Both the algorithms for computing the field-to-mask offsets and the object centroids are now more robust, and the source of the sign error that was sometimes seen in MOS alignments is gone. Type modsAlign followed by a carriage return to see the available options.

Highlights of the new modsAlign are:

  • it uses dedicated ds9 displays for each MODS, thereby allowing simultaneous acquisitions with MODS1 and MODS2.
  • for MOS alignments, the routine will automatically find and centroid on the boxes, then find and centroid on the alignment stars, so there is no longer any need to click on boxes or stars and unless you want to override the selections. By default, the observer is prompted to verify the selections, but a --turbo option will bypass this.
  • for long-slit alignments, there is a -y dy  option which determines automatically the x-center of the slit at a distance dy arcseconds from the mask center. The observer will still need to select the target with “a” (to centroid) or “x” (to use the cursor position).
  • for spectroscopic standard star alignments, a final adjustment can be done on the thru-slit confirmatory image, on which both the slit center and the star centroid are accurately determined.
  • -B By default, a “quick-bias” subtraction is done on both the slit and field images. -B allows you to turn this off. “Quick-bias” subtraction is helpful for centroiding on faint targets because it effectively removes the even-odd column striping, but is not recommended for fields with diffuse emission extending over a significant fraction of a quadrant.

To acquire spectroscopic targets:

  • In the xterm, type acqMODS --modsN scriptname.acq to run the acquisition script:

    • For science targets, this acquisition script will take first a slit image (SlitGO), second, a field image (AcqGO), and then pause to allow the observer to run modsAlign. For spectrophotometric standards, the acquisition script will take only a field image (AcqGO) before pausing for modsAlign.

  • If a long-slit acquisition:

    • modsAlign -y 7 <slitimage.fits> <fieldimage.fits> will compute the offset needed to center the target in the slit at a distance of 7 arcseconds above the slit center. The distance may of course depend on the type of target or targets, but 7 arcsec is high enough that a spectrum of a point-source will clear quadrant boundaries.  Send the offset by answering “Y” at the prompt.

    • modsAlign -l <slitimage.fits> <fieldimage.fits> will display, first, the slit image and the user should position cursor on the slit where they want to target to be and click “x”, then “q”. The slit center in X will be determined and the slit position will be drawn on the second (field) image. On this field image, position the cursor on the target and click “a” (if a centroid can be reliably determined; i.e. star is not saturated) or “x” to take the cursor position. “q” will exit and compute the offset needed. You will see a green cross on the object and a red cross marking the slit center. If these and the offset look reasonable, send the offset.

    • Once the offset is made, continue the script to obtain a confirmatory thru-slit image.

    • ASIDE: If a blind offset is indicated, finishing the script is critical. In some cases, the last step of the acquisition includes the offset that will place the actual science target in the slit. When in doubt, double check your script and readme files for indications that the acquisition includes a blind offset.

  • If a 5″ long-slit spectrophotometric standard star acquisition: run modsAlign -r <fieldimage.fits> or, now as of December 2016, it can also be run on the thru-slit confirmatory image: modsAlign -r <slitimage.fits>

    •  The image given will be displayed:

      • If it is a field image: Position the cursor on the star and click “a” (if a centroid can be measured) or “x” to take the cursor position (if the star is saturated, e.g.), then “q” to exit and compute the offset required to position the star and the reference position for the 5″ slit center: (501.2,620) for MODS1 Red, and (508, 590) for MODS2 Red. Answer “Y” to send the offset and continue the script to take a thru-slit confirmatory image, which may show that further adjustment is needed.

      • If it is a thru-slit confirmatory image, the slit center and the star centroid will both be automatically measured from the image and the observer will be prompted to: accept the auto-centroid measurement (a); reject the auto-centroid and measure the star manually (m); or abort (!). If any further images are needed, these can be taken by clicking the “Go!” button on the MODS GUI.
  • If multi-object acquisition: run modsAlign <mmsfile.mms> <slitimage.fits> <fieldimage.fits>

    • The MMS file must be in the directory from which modsAlign is run.

    • The order of all three arguments to modsAlign does not matter.
    • The slitmask image will be displayed first, and initial fits for the box centroids, which are determined by a two-step process: first using the mms file to estimate the box positions, and second, using a Sobel mean-square fitting algorithm to measure the box edges. The observer will be given the option to either accept these centroids (a), reject them and select the boxes manually (m) or abort (!). If the observer chooses the option “m”, then he or she should position the cursor on each box and type “a”. This will determine the center of the nearest box, so long as it is within the box width of the cursor; “x” on the other hand will put a box at the cursor position. Once all boxes are marked, type “q” to save the box centroids and continue.

    • The field image is then displayed and a regions file depicting the box positions will be overlaid. The centroids of the alignment stars will be automatically determined and shown in green. Type “a” to accept these centroids, or “e” to delete or add stars followed by “q”.

    • The offset in x, y and rotation will be printed and you will be queried whether to send or not. If reasonable, send with “Y” or “y”. Note that no answer (hitting “enter”) will be interpreted as a negative reply and will not send the offsets.

    • Once the offset is made, continue the script to obtain a confirmatory thru-slit image

  • Once the alignment is made, start the observation with execMODS --modsN scriptname.obs.

Recovery of Observations:

If the shell goes into RIP state but preset is not lost:

  • Pause the current integration by typing “pause” in the Command line box at the bottom of the MODS Dashboard, or by clicking the Pause button(s) for the red and/or blue channels.

  • The OSA will recover the shell and the preset should normally not be canceled.

  • Once collimated, resume the integration by typing “resume” in the Command line box or by clicking the Resume button(s).

If the preset is canceled (difficult recovery from shell RIP or guide star lost):

  • Stop the current integration. This will readout and save the exposure that was in progress, writing the correct, shorter-than-requested exposure time in the header.

  • Copy the acquisition script into a recovery script, e.g. cp yourtarget.acq recover.acq

  • Go into the directory from which the acquisition with modsAlign was done and cat the file mods_lastOffset. This file contains the last offset command: offsetpointing dtheta dx dy detxy rel for MOS or offsetxy dx dy rel for long-slit

  • Edit recover.acq to replace all of the contents of the Acquire: block with, on the first line, the contents of mods_lastOffset,and on the second line, slitGO, e.g.:



offsetpointing -0.2807 -0.228 -0.824 detxy rel


  • acqMODS --modsN recover.acq 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.
  • Copy the observation script to a recovery obs script, e.g. cp yourtarget.obs recover.obs and adjust the exposure time and/or the nimgs as needed to complete the observation sequence


  • Calibrations can be done at the end of the night or during a cloudy night. Calibrations are stable and need only be taken once per run per program/set-up

  • Flats and biases require the telescope at zenith and the dome dark. Comparison lamp calibrations can tolerate a lit dome.

  • We strongly encourage PIs to prepare scripts for calibrations to be included with their script submission for the observing block.

  • A detailed summary of standard calibration requirements and templates may be found on the MODS Instrument Calibration web page.

  • Template scripts for biases and flats can also be found, for MODS1, in /home/modseng/modsScripts/modsCalib, and for MODS2, in /home/modseng/modsScripts/mods2Calib. Scripts for spectrophotometric standards may be found in /home/modseng/modsScripts/modsSpecPhot. Scripts cannot be edited in situ; copy templates to your own script directories to make changes.

End of the Night

  • Run execMODS –mods1 or execMODS –mods2 Both scripts are located in /home/modseng/modsScripts/Support/.

Basic MODS Troubleshooting

Basic errors are listed below, along with procedures to recover from these. If these don’t work or the error you encounter is not among this set, please consult the internal pages (you must ask the TO or ISA because these are password-protected). If the problem is described in neither the external nor internal pages, or if you have any doubt about it, please consult the ISA on duty.

1) New images not appearing in modsDisp

2) Exposure control hangs on “Exposure Done, Cleaning up…”

3) IMCSlock fails

4) Any issues while running modsAlign

5) Can modsAlign’s default scaling be changed from ‘zscale’?…

6) GCS fails to acquire guide star

7) Mask selection error

8) Why does the image have a strange filename, like 020101M8.08q.fits?

9) Why are MODS commands, like modsDisp and modsAlign, not recognized?

10) During an exposure, the countdown timer hangs or does not work.

11) Exposure and readout counters stop updating but status window shows the exposure countdown timers working.



1) New images not appearing in modsDisp.

Are the images in /newdata? (ls -ltr /newdata will list the latest files at the end). On the MODS dashboard, check the filenames of the “Last File” and the “Next File” for the relevant channel. Is the index number of the “Next File” greater than that of the “Last File” by more than 1?

If the images are not in /newdata and the index number of the “Next File” is more than 1 above the “Last File”, the file transfer between the CCD control PC and the mods1data computer has stalled. You need to run fitsflush for the appropriate channel.

In the command window of the MODS dashboard, type red fitsflush or blue fitsflush. Do not try to transfer images while the detector will be reading out, so type this either during a long exposure (count on a few seconds to transfer each image) or when the exposure is paused or the script is done, but do not let the number of files not yet transferred build up to more than just a few.

After giving the fitsflush command, you should see the “Last File” index number incrementing as the new images are displayed by modsDisp. (You may note that once all the files are transferred, the “Last Image” index number returns to the value it had before running fitsflush and that image is again displayed. Don’t worry – this is normal. You can confirm that all the images have been successfully transferred with ls -ltr /newdata).



2) Exposure control hangs on “Exposure Done, Cleaning up…”

Most likely, there was a communication glitch and the “Exposure Done” signal was not successfully passed from the CCD control PC to the mods computer. Check whether the image on which it hung is in /newdata (ls -ltr /newdata). If it is, then in the command window of the MODS Dashboard, type red expdone or blue expdone (depending on which channel hung). This should cause the exposure control to become active again, and, subsequent exposures, if indicated in the script, will be taken.



3) IMCSlock fails

If IMCSlock fails, the IMCSlock button on the MODS Dashboard will turn red and the script will pause with some messages about the IMCS lock fail and a query to either “a” (abort), “r” (retry) or “i” (ignore). Before typing any response:

  • check the laser power by typing irlaser in the command window of the MODS Dashboard. The irlaser should be “enabled” and power output “1.1mW” (this is for MODS1, the power output is slightly different for MODS2).
    • If “enabled” and power output 1.1mW, hit “r” to retry. Sometimes the IMCS is slow to lock after a change of configuration and at certain elevation/rotator angles and exceeds the 150-sec timeout threshold. Hitting “r” to retry should cause it to lock in a few seconds.
    • If not “enabled”, did you wake up MODS?
    • If “enabled”, but the power output is lower than 1.0mW, then you should ask the ISA or OSA to follow further troubleshooting procedures documented on the internal web.



4) Any issues while running modsAlign

modsAlign was rewritten in December 2016. One issue noticed while testing is that the image is not displayed in ds9 and a popup box appears with the message: An internal error has been detected invalid command name “”, as shown here. If this happens, acknowledge the popup by clicking “OK” and then repeat the command.



5) Can modsAlign’s default scaling be changed from ‘zscale’?…

modsAlign was rewritten in December 2016 and no longer uses an iraf-based display task. The scaling can be adjusted using the ds9 buttons.

The following text is now obsolete: By default, modsAlign displays images in ds9 using ‘zscale’. This can make it impossible to distinguish point sources from a bright background, e.g. SN in a galaxy or the nuclei of galaxies. There is a command-line option to modsAlign which can help. If you have run modsAlign already and exited ungracefully, check for and delete the log file which may have been left behind (rm _modsalign.log). Then using the up-arrow key, repeat your modsAlign command, but this time append “-B“. So, for a long-slit alignment for example, modsAlign -l myslitimage.fits myfieldimage.fits -B. This will display the field image with zscale turned off and reasonable choices for z1 and z2.



6) GCS fails to acquire guide star

If conditions are good and the guide star has R<~16-16.5, it should be easily detected. If it is not, then check the following:

  • Is the AGw working with the default (clear) filter? Through B-Bessel, sensitivity is reduced by about 1 magnitude.
  • Did you home the guide probe at the start of the night?
  • If neither of these suggestions helps, consult the OSA and ISA. It may be necessary to shut down GCS, cycle power to the guider or WFS controller, and then restart GCS.



7) Mask selection error

Sometimes, the selection of masks in the top four positions which are allocated for custom masks, slots 13-16, will fail. So far, this has happened only at low elevations (elevation <40-45 degrees) and certain rotator angles, but the orientation-dependence is not confirmed. If a mask selection error occurs, you will see that, on the MODS Dashboard, the selected mask will be blank and both mask IN and OUT buttons will be orange, not grey, and, in the script-running window, there will be errors like: *** ERROR: MSELECT MSELECT=FAULT Mechanism out-of-position, in-position sensor not asserted. Reset MSELECT to recover. Errors in the log may look like:

2012-11-14T10:02:57.162316 M1.IE>MC1 STATUS: MSELECT Selecting mask 16
2012-11-14T10:02:57.165169 MC1>ACQ STATUS: MSELECT Selecting mask 16
2012-11-14T10:03:19.457404 M1.IE>MC1 ERROR: MSELECT MSELECT=0 Move Fault, position at end of move 0 but requested position 16.000000
2012-11-14T10:03:19.462097 MC1>ACQ ERROR: MSELECT MSELECT=0 Move Fault, position at end of move 0 but requested position 16.000000

If you encounter this error: MODS Dashboard shows no mask, IN and OUT buttons orange, MSELECT error message in the script running window, telescope at low elevation (<45 deg) and desired mask in slots 13-16 of the cassette, please consult the OSA and possibly also the ISA. The OSA should slew to zenith, and, at zenith, you should select the desired mask using the mask drop-down menu on the MODS Dashboard. The background of the mask button will turn from grey to orange while the cassette is moving, and, once the mask is selected, the button will turn black-on-grey again. Once the mask is selected (it doesn’t matter whether you choose to put it IN the focal plane or OUT), you can run the acquisition script again to slew, configure the instrument and take the sequence of acquisition images. This should now work since the mask selection, which is where the problem lies, has been done already.



8) Why does the image have a strange filename, like 020101M8.08q.fits?

Occasionally the image readout will not have the expected filename mods#x.YYYYMMDD.NNNN.fits, but instead something like 020101M8.08q.fits (which we call a “unique name”). This happens when the expected name will clash with the name of a file already in the raw data directory on the mods data computer but also for other reasons. Files on the mods data computer are copied automatically to /newdata, and will be in /newdata or in the subdirectory of /Repository which corresponds to the UTdate on which they were taken.

Common mistakes which result in “unique names” are (1) to forget to update the date information on the Setup page of the MODS GUI or (2) to reset the counter to 1 without realizing that some technical images had been taken earlier in the afternoon.

If you notice a “unique name” file:

  • Determine what the file should be called using the command gethead to list the value of the FITS header keyword, FILENAME:

                gethead uniquenamefile.fits filename

  • Check whether any files with the expected filename are already in /newdata or /Repository/UTdate.
    • If the date is not correct, stop the script and edit the Setup information to avoid the filename conflict.
    • If the date is correct, and especially if there is a series of unique named images, there may be a deeper problem and contacting the ISA is in order.
  • After a potential name-conflict, please notify the ISA by email, so they can insure both sets of images will be written to the archive with reasonable names.



9) Why are MODS commands, like modsDisp and modsAlign, not recognized?

Check that the users are running under tcsh. At least one partner account used to come up with bash terminals by default, but a “tcsh” at the command line makes all the necessary connections.


10) During an exposure, the countdown timer hangs or does not work.

If, during the exposure, the countdown timer is not working, this is a symptom of a communication glitch, where the CCD controller probably failed to tell the GUI that it had started the exposure. The recovery is to:

  • Abort the exposure, or wait until it finishes;
  • Refresh the GUI (Click the “Update” button at the bottom left of the Dashboard.) This clears all exposure and configuration state flags, then asks the instrument to report its current state; and
  • Type ‘red reset’ and/or ‘blue reset’ in the MODS Dashboard GUI Command window, depending on which channel has the problem.



11) Exposure and readout counters stop updating but status window shows the exposure countdown timers working.

The most likely explanation is that there was a communication glitch, and one of the messages from the CCD controller noting that the exposure had started was dropped. To recover:

  • Wait until current exposure is done and insure it is saved.
  • Refresh the GUI. (Click the “Update” button at the lower left of the MODS Dashboard.) This clears all exposure and configuration state flags, then asks the instrument to report its current state.
  • Type “red reset” or “blue reset” in MODS Dashboard Command window, depending on which channel has the problem.
  • Abort the script with Cntl-C.

Binocular MODS1+MODS2 observing

Since the spring of 2016, MODS1 and MODS2 may be used simultaneously, but with the following constraints:

  • that it not be used for MOS mode (only long-slit or imaging); and
  • that the same script be run on both sides.

Also, the observers/PI should be aware that the detector on the MODS2 Red Channel has elevated pattern noise.

There are two commands to launch scripts simultaneously on both MODS1 and MODS2. They will open two xterm windows, one to run the MODS1 script and the other to run the MODS2 script. When the script is complete, the xterm window is closed. If there is an error, a message will be printed in the xterm window to prompt the user to either enter <CR> or abort/retry/ignore.

  • acqBinoMODS  <modsscript.acq>
    • to run modsscript.acq on MODS1 and MODS2.
  • execBinoMODS <modsscript.obs>
    •  to run modsscript.obs on MODS1 and MODS2.
  • execBinoMODS <> <>
    • to run on MODS1 and on MODS2. Different calibration scripts are needed for MODS1 and MODS2 because the lamps are of different intensities.

Acquisitions are done with the commands modsAlign; the latest version which allows simultaneous alignment of MODS1 and MODS2.

Quick Look Reduction (MODS1 only)

There is an IDL-based quick reduction tool which outputs sky-subtracted, wavelength-calibrated spectra. It available from all partner accounts on the mountain obsN workstations.

To run the quick reduce software:

  • open IDL in a directory with the MODS file (e.g. mods1r.20160629.0002.fits) you wish to process.
  • run: mods_quickreduce,’mods1r.20160629.0002.fits’

There are two main options you can use.

  1. add a /calwave to use the wavelength calibration in the modsIDL library. This will only work for longslit.
  2. add apertures=[1] to only reduce slit aperture number 1 (the central segment). You could also do aperture=[1,2] to reduce slits 1 & 2 or any other combination of valid slits.
  3. For most long-slit spectroscopy where the target is in the central slit segment, the following command syntax is all that is needed:

mods_quickreduce, ‘mods1C.YYYYMMDD.NNNN.fits’, /calwave, apertures=[1]

If you are looking at a MOS field you also need the mms file in the directory. Note that the sky subtraction may have trouble if there are objects on the edges of the apertures.

Once the file is processed, you can view (outside of IDL) the resultant x2d file using the python script, dispMODSx2d: e.g. to display the output from the example above, run (don’t append an ‘&’ to run it in the background):

dispMODSx2d mods1C.YYYYMMDD.NNNN_x2d.fits

  • in dispMODSx2d, to change the scaling, put the cursor on the image and type “s”. Then the low and high values you want, separated by a space “ “ . This is confusing as the current values are displayed within parenthesis and separated by a comma, i.e. (min,max), but this is not correct syntax for input.
  • The output *_x2d.fits file, for long-slit mode at least, has 6 extensions:
    • 0 = OTF
    • 1 = sky subtracted
    • 2 = variance
    • 3 = sky
    • 4 = wavelength image
    • 5 = slit mask
    • 6 = Slit BinTable

You can also view the 6 extensions in ds9, using the command line option (memf), but be aware that the object spectra will not use the wavelength scale.

  • ds9 -memf *_x2d.fits

Note that the Long-Slit segments are numbered from top to bottom: