SOAR
Published on SOAR (http://www.ctio.noirlab.edu/soar)

Home > SOAR Adaptive Optics Module (SAM) > SAM User Guides and Documentation

SAM User Guides and Documentation

As explained in the Observing with SAM page [1], the observer is in charge of operating the SAM Imager (SAMI), which entails selection of the binning, selecting and changing filters, setting the exposure time, applying dithers if needed,  and setting up the object name. The observer is also reponsible for taking the bias and flat-field calibrations before the observations. Sky flats are strongly preferred over dome flats, because the latter do not correct well the shadows of the dust particles.

The Adaptive Optics system and Laser are operated by the SAM Support Astronomer, but we provide here the respective manual so the user can refer to it to gain a better understanding of how the system works, and to get familiar with the AO module GUI. The safety document for normal operations is also appended; users who will be present at the telescope should read this.

We expect the user to at least read the SAMI Instrument manual to learn how to use the imager interface.
 

  • SAMI Instrument Manual (Mar 13, 2013) [361K, PDF] [2]

 

  • SAM user guide, V.1.1 (Dec 3, 2019) [542K, PDF] [3]
  • Laser safety, normal operations V2 (Dec. 2015)  [268K, PDF] [4]
  • Paper describing the SAM instrument: Tokovinin et al. (2016) [5]

 

  •  Our web page with a guide for reducing SAM data [6]

Preparing to Observe with SAM

 
Advantages offered by SAM. It  can reach exceptionally good resolution of 0.3" or 0.4" (if the atmospheric conditions allow it) at visible and near-infrared wavelengths in a 3-arcminute field, as though the 4-m SOAR telescope was lifted halfway into space (see SAM performance) [7]. SAM is ideally suited for imaging deep-space faint targets (or narrow-band imaging) where the 4-m aperture matters. It has complete sky coverage. Compared to SOI, SAM has no gaps between CCDs and does not need mosaicing to get the continuous image. Its guiders are more sensitive than the standard SOAR guiders. SAM can be also used in open loop, without laser.

Limitations of SAM. UV light is not transmitted to the science imager, so SAM is "blind" in the U band. The correction in the B band is not so good, while the sky background in B is contaminated by the faint UV leakage of the B-filter. The SAM imager has a distortion that might affect image recombination if large dithers are used. Targets for laser operation must be defined in advance, reducing the flexibility. SAM can deliver poor resolution under unfavorable conditions.
 

Planning your observations
The list of targets for SAM (name and J2000 coordinates) must be sent to soarnight@ctio.noao.edu [8] no later than 2 weeks before the scheduled night, so we can submit the laser propagation target file to the Space Command Laser Clearing House. Last-minute additions are not possible (better include extra "maybe" targets in the list, just in case). However, SAM can observe in open loop (without laser, at seeing-limited resolution) any target, e.g. photometric standards. It is a good idea to get in touch with the SAM support scientists Andrei Tokovinin (atokovinin@ctio.noao.edu [9]) and Cesar Briceno (cbriceno@ctio.noao.edu [10])  for planning your observations with SAM.

The instrument setup form [11] must be filled to define the filters, one week before the run. SAM+SAMI have a filter wheel with 7 slots for the 3-inch square filters (normally loaded with Bessell B,V.R,I filters) and can also use the SOI filter wheel that has 5 positions for 4-inch square filters (e.g. Sloan g',r', i', z' or narrow-band). Any filters used at SOI can be also used with SAM. However, SAM has only one filter wheel, filters can be changed only during the day.

Think about the strategy. Do you need dithers? There are pros, cons, and restrictions (contact the support scientists to learn more). What is the worst acceptable image quality needed to reach your science goals?  Do you need photometric standards? They can be observed rapidly in open loop. What binning to use in SAMI (usually 2x2, pixel 0.091 arcsec)? Think about a backup program (using SAM or other SOAR instrument) for the case of poor seeing or technical problems. Fill the instrument setup forms for your backup program, too.
 

Observations
Like other SOAR instruments, SAM+SAMI can be used classically or remotely.  During observations, the Adaptive Optics (AO) system is operated by the Support Scientist, while the observer is in charge of operating the imager SAMI (selection of the binning, filters, exposure time, dithering,  and object name). The observer is also reponsible for taking the bias and flat-field calibrations before the observations. Sky flats are strongly preferred over dome flats, because the latter do not correct well the shadows of the dust particles. See   SAMI User Manual [2]  and   SAMI Software manual [12]
 
Data reduction
Standard reduction of SAMI data (bias subtraction, division by the flat field, and combination of the multi-extension FITS file into a single image) can be done at CTIO using the pyraf pipeline developed by L.Fraga, provided that bias and flat-field calibrations are taken. In this page [6] you will find a step-by-step guide on how use the SAM PyRAF software to reduce your SAM data.
 

Think -► propose -► prepare -► observe -► reduce the data -► publish!

 

Reducing your SAM images

SAMI Data Reduction

(Updated: May 25, 2020, by C. Briceño)

There are several ways in which you can reduce the SAM Imager (SAMI) data. You can use the various tools in the MSCRED package in IRAF, or you can run the PyIRAF-based PySOAR pipeline described here, developed by Luciano Fraga (now at LNA, Brasil [13]). Additional information on running PySOAR can be found in Luciano's  SAMI Data Reduction Cookbook [14].
At this moment PySOAR is running only on the soarpd1 computer. In order to use it, you must follow the steps outlined below: login into soarpd1, transfer the data to soarpd1, and run the pipepline.

1) Log in to access your data and get setup for running the image reduction.
There are two ways of doing this: via a VNC viewer or using ssh. In either case, unless you are within the CTIO network, that is either working from our La Serena headquarters or at Cerro Pachón, you will need to install a VPN client in your computer. Please contact your scientific support staff (Andrei Tokovinin or César Briceño for NOIRLab and Chile users; Luciano Fraga - lfraga at lna.br. - for Brazil users) for VPN passwords and usernames (indicated below as "USER").
 

1.1) Using SSH: 
  • Once you are running your VPN client, you can ssh into the soarpd1 machine: 
ssh -X observer@soarpd1.ctio.noao.edu [15]
  • It is important you use the -X option which enables X11 forwarding. Otherwise, the sami PyRAF script will not run, because it requires an available display (even though it does not open any graphics or GUI when run from the command line in ssh)
  • Go to the data directory: /home/observer/data/  and create a folder for your data. We use the sintaxis YYYY-MM-DD, were the day (DD) corresponds to the local evening of the particular observing night (e.g. 2015-02-14 for the data taken the night of Feb 14-15, 2015).
  • Now, from within the folder you just created, copy over the data from the SAMI computer soarhrc, where your data is still located type in the command line the following:  scp -pr USER@soarhrc.ctio.noao.edu [16]:/home2/images/20150215/\* , where the USER name and corresponding password will be provide by your Support Scientist (Andrei Tokovinin [17] or César Briceño [18], for NOIRLab and Chile programs, Luciano Fraga (flfraga at lna.br.) or Brazil programs).  We suggest you create a subfolder called RED, and copy there your data, so you can run your reduction there and still keep your original raw files.
     
1.2)  Using VNC:
If your are at La Serena or Cerro Pachon, just type the following command in a terminal or shell in your Linux or Mac computer:
  • vncviewer -Shared soarpd1.ctio.noao.edu:9 &
 
or:
 
vncviewer -Shared 139.229.13.231:9 &
 
The vnc password should be requested from one of the support scientists (Andrei Tokovinin [17] or César Briceño [18])
  • When you have successfully connected into soarpd1:9 you will see a desktop like this:
If you are outside the CTIO network, run your VPN client, and then follow the above instructions.

 

  • Transfering the data via the VNC connection.
During observing, the SAMI data is written to /home2/images/ on soarhrc. The folder should have been created by you when you set up your observing night, with a name corresponding to the local date of the observation: yyyy-mm-dd (e.g. 2015-01-20). To transfer the data from soarhrc to soarpd1 you must either click on the top-right icon: 


 

or type in a terminal windown the following command:   data_transfer.py   

You will be presented with this window:

Click on the right hand menu to select the right instrument: SAM. Then type in the appropriate source directory in the soarhrc computer (e.g. /home2/images/yyyy-mm-dd/) and the destination directory in soarpd1, e.g. /home/observer/data/yyyy-mm-dd)

 

2) Starting PyRAF (only necessary if using VNC): To start PyRAF (and the ds9 at the same time) click on the top-left icon.

You will be presented with the PyRAF terminal and a DS9 display window.

3) Running the pipeline script  samipipe.py
Either in your ssh window, or if using VNC, from a terminal window, go to the data directory (e.g. cd /home/observer/data/2012-03-01).
Important! The calibration frames (biases and flat-fields) and the science frames must be in the same directory. If you already have the master bias and master flats, just copy both to the same directory. Also, at this moment the pipeline does not handle dark frames, so do not include them in the directory in which you will run the pipeline command, otherwise you will get an error after the pipeline is done with the overscan and trimming parts of the reduction.
We suggest that you use the following naming convention when creating your data at the telescope (or rename your files after the fact): Call bias frames as bias2x2.001.fits; sky flats as sflat_V.001.fits, and science frames as soar20150214.001.fits (etc). This will make it easier to run the pipeline.

Run the pipeline with the command line:

samipipe.py

As shown here:

When prompted for the images names, just type *.fits.  The data processing will run.  your images will be corrected for overscan, bias-subtracted, and flatfielded.
When the script is finished you are going to end up with various files with the following nomenclature:
    
NSFLAT2x2g.fits         
NSFLAT2x2i.fits         
NSFLAT2x2r.fits        
NSFLAT2x2z.fits                            
ZERO2x2.fits

which are the amplifier-merged, combined flat fields for each filter (in this case the data were obtained in 2x2 binning, the default for SAM), and the combined bias frame. You will also have a series of text files which list your raw fits frames per type:

0SAMIList_Zero2x2
2SAMIList_SFlat2x2g
2SAMIList_SFlat2x2r
2SAMIList_SFlat2x2i
2SAMIList_SFlat2x2z
4SAMIList_OBJ2x2g
4SAMIList_OBJ2x2r
4SAMIList_OBJ2x2i
4SAMIList_OBJ2x2z

You will also see that a folder "Raw" was created, which contains your raw, unprocessed images.

If your science frames were named soar20141022.*  (the naming convention we have recommended above), you will end up with files mzfsoar20141022.*
Thus, for a raw science frame named image.001.fits, the reduced frame will be like mzfimage.001.fits. The prefix z means zero subtract, f means flat-field divided and m means that the file has been converted from multi-extend fits to single fits.

4) Run the quick astrometry
Now you can run a Python script created to determine the offset and angle of SAMI images by referencing to a star catalog. This tool is intended to provide first order "astrometry", good to ~0.3". The script is called samiqastrometry.py, and is run on the reduced mzfsoar20141022.* files with the following parameters:

samiqastrometry.py mzfsoar20141022.026.fits -px 0.091 -c tmc 

In case your images were obtained in 2x2 binning mode.

If you want to know about the samiqastrometry.py options, type: samiqastrometry.py -help

For a list of examples on running samiqastrometry, type:
samiqastrometry.py -example

And if you want to find out about catalog options, type:
samiqastrometry.py -catalog

For more information and details on samiqastrometry.py and SAMI data reduction, see the SAMI Manual [19].


Source URL: http://www.ctio.noirlab.edu/soar/content/sam-user-guides-and-documentation

Links
[1] http://www.ctio.noirlab.edu/soar/content/observing-sam
[2] http://www.ctio.noirlab.edu/soar/sites/default/files/SAM/archive/sami-manual.pdf
[3] http://www.ctio.noirlab.edu/soar/sites/default/files/SAM/archive/guide_0.pdf
[4] http://www.ctio.noirlab.edu/soar/sites/default/files/Normal_Operations_SAM_Laser_2015.pdf
[5] http://adsabs.harvard.edu/abs/2016PASP..128l5003T
[6] http://www.ctio.noirlab.edu/soar/content/reducing-your-sam-images
[7] http://www.ctio.noirlab.edu/soar/content/performance
[8] mailto:soarnight@ctio.noao.edu
[9] mailto:atokovinin@ctio.noao.edu
[10] mailto:cbriceno@ctio.noao.edu
[11] http://www.ctio.noao.edu/SOAR/Forms/INST/setup.php
[12] http://www.ctio.noao.edu/new/Telescopes/SOAR/Instruments/SAM/archive/sami-sw.pdf
[13] http://lnapadrao.lna.br/
[14] http://www.ctio.noao.edu/~fraga/pysoar/tasks/sami/doc/cookbook.html
[15] mailto:observer@soarpd1.ctio.noao.edu
[16] mailto:USER@soarhrc.ctio.noao.edu
[17] mailto:atokovinin_at_ctio.noao.edu
[18] mailto:cbriceno_at_ctio.noao.edu
[19] http://www.ctio.noirlab.edu/soar/sites/default/files/documents/Instruments/SAM/sami-manual.pdf