Search
Text Size:
Smaller Text Normal Text Larger Text

Facebook page

Twitter profile

YouTube channel

NOTCam SEQUENCER Script Reference

NOTCam SEQUENCER commands

NOTCam imaging scripts
NOTCam spectroscopy scripts
Postprocess scripts
STAFF scripts

NOTCam imaging scripts (notcam.script in scripts)
Optional flag '-e' will show the script on standard output instead of executing the commands.

  • setup-ima [-e] camera filter-ID [stop]
    Setup script for imaging mode that allows for camera (WF or HR) and filter selection ( NOTCam filter ID number). As an optional third parameter you can give the number (in mm) of the cold stop to use in case you want a smaller stop than the default 15mm stop. This can be useful to avoid saturation of very bright stars. Depending on the camera selected (WF or HR), the correct internal camera focus is set, and the aperture wheel is set to OPEN Large (WF) or HR imaging mask (HR).
    Since Feb 2010 the tcs.focus-delta is set, accounting for the filter focus offsets, including the offset for the HR-camera. All offsets are with respect to the focus-position for the WF-camera and Ks band. NB! The telescope reference focus tcs.focus-position is NOT touched.
  • clean3 [-e]
    Cleaning the array by performing 3 consecutive notcam.clear commands and thereafter taking a dark 0 to show the result. The dark image is stored with the header keyword COMMENT "Zero dark after 3 clear commands." Useful when the detector has been passive for a while or after having saturated.

  • skyflat [-e] t
    Takes 8 images with exptime t and with 10 arcsec random telescope dither after each image. It is intended for twilight imaging skyflats, any filter, both cameras. Goes back to initial position.

    Switches on autosave and remsave with rempath /data/service/calib/ and switches remsave off when ended while leaving autosave on. Sets image type to FLAT and resets to OBJECT when script ends.

    Does not do any instrument setup! Assumes that the user selects which filter and camera to use. If filter and camera is set using the task notcam.setup-ima then the telescope focus is adjusted.

  • setup-focpyr [-e] camera
    Setup script for focusing in imaging mode using the focus pyramid. User selects camera (WF or HR). The corresponing internal focus and aperture mask is put in, as well as the focus pyramid. Per default the Ks band is used for focusing since the pyramid has been calibrated for this filter. The offsets between filters are well known.
  • 5point [-e] [-nowakeup] [-std] rmode t N "obj" step skew Ncycles
    Makes a 5 point dither (dice) observation. Useful for standard stars and other relatively bright sources. Can be run Ncycles times. Time to reach rotator limit is checked (updated Sep 2014).

      [-nowakeup] = no astrowakeup at the end of script
      [-std] = standard star observation
      rmode = readout mode (exp, mexp, frame)
      t = readout mode parameter t
      N = readout mode parameter N (must be given, but is ignored if rmode=exp)
      obj = object name
      step = dither step size (in arc seconds)
      skew = additional step (in arc seconds) to make a skewed grid, i.e. the grid is tilted by the amount given in both x and y direction.
      Ncycles = number of times to run dither
  • 9point [-e] [-nowakeup] rmode t N "obj" step skew Ncycles
    Makes a 9 point dither (3x3 grid) observation. Same input parameters as for 5point above. Useful for point sources and marginally extended targets. Setting skew to some few arc seconds produces a skew grid where the same source falls on the dead column only once, compared to possibly 3 times for non-skewed grids. Time to reach rotator limit is checked (updated Sep 2014).
  • beamswitch [-e] [-nowakeup] rmode t N "obj" dir beam step skew
    A beamswitch script that takes alternatingly 9 ON target and 9 OFF target images. Intended for target fields with extended emission. See also 9point above for comments. Time to reach rotator limit is checked (updated Sep 2014).

      [-nowakeup] = no astrowakeup at the end of script
      rmode = readout mode (exp, mexp, frame)
      t = readout mode parameter t
      N = readout mode parameter N (must be given, but is ignored if rmode=exp)
      obj = object name
      dir = direction for beamswitch offset (S-posX,N-negX,E-negY,W-posY), i.e. OFF field
      beam = beamswitch offset step (in arc seconds), i.e. separation between ON and OFF field
      step = dither step size (in arc seconds), both the ON and OFF fields consist of 9point dithers
      skew = additonal step (in arc seconds) to make a skewed grid

    NB! When using beamswitch mode make sure you use the correct guide area corresponding to your beamswitch direction to allow for autoguiding during beam-switching. The areas to use are called correspondingly NOTCAM-S-posX, NOTCAM-N-negX, NOTCAM-E-negY, NOTCAM-W-posY. See the NOTCam Cookbook under section ''Autoguiding'' for details.

    NB! Note that S,N,E,W refer to the direction you move the telescope for taking sky, while posX, negX, negY, posY refer to the direction your target moves on the detector! The first is valid only for default field-rotation (field-r -90). The latter is always valid!

  • loop-exp [-e] t
    Makes exposures in staring mode using reset-read-read mode exp t repeatedly until the script is aborted with Ctrl-C.
  • loop-frame [-e] t N
    Makes exposures in staring mode using ramp-sampling mode frames t N repeatedly until the script is aborted with Ctrl-C.
  • notcam-calibs [-e] date-string
    To be run at the end of the night when observations have ended and all lights are off. Checks the data base for all the exposure modes used during the night, and takes 6 darks in each of the modes used. To be left running. May take several hours. The date-string is the 6-character fits file prefix, such as "NCwg22".

    NB! notcam-calibs differs from alfosc-calibs in that it only takes darks, no arcs, nor halogen lamps. In the case of notcam spectroscopy, due to flexure, arcs should be taken when pointing to the target, and due to fringing, a few halogen flats should be taken in situ, too. See below under Spectroscopy mode.

  • darks [-e] [-nowakeup] rmode t N "obj" Ndarks
    Takes a sequence of Ndarks dark integrations using a specific readmode rmode with its parameters t and N and an object name obj to be specified.
 

 


NOTCam spectroscopy scripts (notcam.script in scripts)
Optional flag '-e' will show the script on standard output instead of executing the commands.

  • setup-spec [-e] camera filter-ID slit grism
    Setup script for spectroscopy. Sets the camera, the filter and the internal focus corresponding to the setup selected.
    Slit 128 is the 0.6'' slit for WF spectroscopy and slit 44 is the 0.2'' slit for HR cam spectoscopy

    NB! This script never moves the slit or grism! This is in order to avoid unnecessary moving and repositioning of these elements, as they normally stay the same, while the wavelength region is changed, or switching between target and lamp. The slit and grism items are handled by the acquisition script.

      camera = wf, hr
      filter-ID = 208, 203, 201 etc.
      slit = 128, 44
      grism = 1

  • acquisition [-e] -c -q -noslitim cam slit filter expotime
    Interactive slit acquisition script for NOTCam spectroscopy.

      -c = make a slitview exposures of target on slit
      -q = query the user
      -noslitim = optionally do not take a slit image first (only if you know what you are doing!)
      cam = camera (WF or HR)
      slit = 128, 44
      filter = filter ID (Z=237, Y=236, J=201, H=203, Ks=207, or K=208)
      expotime = exposure time for acquisition image

    The normal procedure is to take a slit image at every new pointing and measure the slit position (due to flexure). If you know what you are doing and trust the previous measured slit position (stored in a logfile), you can use -noslitim. Note that for very bright stars, the acquisition image may saturate, which will produce memory effects in your spectra. To avoid this, the program reminds you to add a narrow-band filter within the same wave-length range, if this is the case. If your target is fainter than the sky, you can request sky-subtraction of the acquisition image.

  • abba [-e] [-nowakeup] t N "obj" step
    Makes an ABBA dither along the slit for spectroscopy. Position B in the ABBA mode is shifted step arcseconds along the slit (positive value means increasing X), while position A is the initial acquisition position. The readout mode is ramp-sampling, and t is the time between reads while N is the number of reads. The object name is set with the string obj (NB! must not contain space.) Use the option -nowakeup if you don't want to be notified when the script is finished, for instance if you use this script repeatedly in a macro and only wish to be notified at the very end. Time to reach rotator limit is checked (updated Sep 2014).
  • ab3 [-e] [-nowakeup] t N "obj" step
    Makes an ABABAB dither along the slit for spectroscopy. Position B in the ABABAB mode is shifted step arcseconds along the slit (positive value means increasing X), while position A is the initial acquisition position. The readout mode is ramp-sampling, and t is the time between reads while N is the number of reads. The object name is set with the string obj (NB! must not contain space.) Use the option -nowakeup if you don't want to be notified when the script is finished, for instance if you use this script repeatedly in a macro and only wish to be notified at the very end. Time to reach rotator limit is checked. This script gives better data than ABBA since for NOTCam one has to discard the first image.
  • ab3-beamswitch [-e] [-nowakeup] t N "obj" dir beam step

      [-nowakeup] = no astrowakeup at the end of script
      t = time between reads in ramp-sampling mode
      N = number of reads N in ramp-sampling mode (exptime = t * N)
      obj = object name
      dir = direction for beamswitch offset (S-posX,N-negX,E-negY,W-posY), i.e. OFF field
      beam = beamswitch offset step (in arc seconds), i.e. separation between ON and OFF field
      step = dither step size (in arc seconds) along slit, both the ON and OFF fields

    Makes ON and OFF target beamswitching with a small step dithering along the slit, intended for extended target spectroscopy.

    The sequence is B1,A1,B2,A2,B3,A3. Position A1 is the position of the target as aligned with the notcam.acquisition script. Because the first image in a sequence usually is thrown away due to non-stabilized counts and reset-anomaly, the script first moves to the OFF target position (B1). This differs from the ab3 script.

    The beamswitch step size is beam arcseconds, either along the slit (in the x-direction) or orthogonal to the slit (y-direction), as given by the dir parameter. The direction is with respect to target position (A). Small-step dithering along the slit is made such that A1 is the initial central position and A2 is +step arc seconds and A3 at -step arc seconds. This is useful to filter out bad pixels and the dead column.

    The object name is set with the string obj (NB! must not contain space.) Time to reach rotator limit is checked.

    NB! When using beamswitch mode make sure you use the correct guide area corresponding to your beamswitch direction to allow for autoguiding during beam-switching. The areas to use are called correspondingly NOTCAM-S-posX, NOTCAM-N-negX, NOTCAM-E-negY, NOTCAM-W-posY. See the NOTCam Cookbook under section ''Autoguiding'' for details.

    NB! Note that S,N,E,W refer to the direction you move the telescope for taking sky, while posX, negX, negY, posY refer to the direction your target moves on the detector! The first is valid only for default field-rotation (field-r -90). The latter is always valid!

  • easy-calib fid1 [fid2] [fid3] [fid4] [fid5]
    Makes in-situ default spectroscopy calibration lamp exposures (i.e. 1 Argon, 1 Xenon, and 3 Halogen images) of the wavelength region(s) requested. Minimum one wavelength region (defined by the use of the broadband filters ZYJHK, selected by filter ID number). Checks what camera and slit is used. Uses the default exposure times. Due to the slowness of the Argon lamp, it is programmed to take the Argon lamp for all wavelength regions first. Then it does region by region, Xenon and Halogen. This script uses setup-spec and calibexp. The time needed is typically 2 minutes per wavelength region plus 1.5 minutes for mirror cover closing and opening.
  • calibexp [-e] [-n Nexp] [-o "Object Name"] [-LeaveMirrorClosed] [-lmc] [-llo] lampID exptime
    NOTCam calibration expsoure script. Sets up the telescope for NOTCam spectroscopy calibration using the baffle lamps (mounted on the inside of the baffle lid). Due to flexure, wavelength calibrations should be obtained with the telescope pointing at your target. Thus, running the script at night when your science exposure is done, this involves switching off autoguiding and the TV, closing the mirror covers, switching on the selected lamp, taking the exposure(s), switching off the lamp, and by default opening the mirror covers again and get back on the sky. If the option [-LeaveMirrorClosed] or [-lmc] is used, then the mirror covers are left closed, and you can run the script again using another lamp, or for instance another wavelength setup. If the option -llo is selected (Leave Lamp On), the lamp is left switched on when you exit the script (unless you are going back to sky). This is a useful option for the problematic Argon lamp, that comes on very slowly. If the script is run when the upper hatch is not open, then the mirror covers will be left closed. Opening/closing the mirror covers takes about 45 seconds.
 

 


NOTCam Postprocessing control scripts (notcam.script in scripts)

  • display-start
    Starts an empty NOTCAM DS9 display.
  • display [file]
    Loads an image into the NOTCAM DS9 display. If no file is specified, the last image obtained will be loaded. If no DS9 display exists, one will be started.
  • overlay [yes|no]
    Toggles seeing information and saturated objects markers on loaded DS9 image.
  • setdisplay [X server]
    Set the X server on which the DS9 window will be displayed. If no X server is specified, the server from which the command is issued will be used.
    Note that the X server must allow for remote connections (use 'xhost').
  • focuspyr-auto [file]
    Computes the required telescope focus offset from a Focus Pyramid image. If no input file is given (full path), the last image in the data directory will be used. Sky subtraction depends on the 'setskysub' value.
  • focuspyr
    Interactively examine a focus pyramid image to determine the focus offset required to bring the telescope in focus. The estimated best focus offset determined by the focuspyr-auto script will be presented on screen for comparison (the automatic script will use the raw image displayed as input, i.e. the value of 'setskysub' is ignored).
  • killdisplay
    Terminates all instances of the NOTCAM DS9 display.
  • killimexam
    Terminates all NOTCAM sequencer scripts related to imexam and the NOTCAM DS9 display.
  • setskysub <filename|number|no>
    Subtracts a sky image prior to displaying where the sky image can be:
       filename: Image with specified filename.
       number: Sky image set to the n'th last image. '1' is the previous image. Valid range: 1- 49
       no: No sky subtraction.
  • imexam
    Initiates an IRAF imexam session on the image currently loaded into the NOTCAM DS9.
    While active in the imexam session, no further commands can be issued from the sequencer window.

    CURSOR KEY COMMANDS:

    ?       Print help
    a       Aperture radial photometry measurement (see above for output)
    c       Column plot
    e       Contour plot
    f       Redraw the last graph
    j       Fit 1D gaussian to image lines
    k       Fit 1D gaussian to image columns
    l       Line plot
    m       Statistics
                image[section] npixels mean median stddev min max
    q       Quit
    r       Radial profile plot (see above for output)
    s       Surface plot
    x       Print coordinates
                col line pixval [xorign yorigin dx dy r theta]
    
  • hicut value
    Applies a minmax scaling of the loaded image and sets the highcut to the value specified.
  • locut value
    Applies a minmax scaling of the loaded image and sets the lowcut to the value specified.
  • log-comment "Comment in quotes" [file1 file2 file3 ...]
    Adds a remark to the FITS headers of an existing data file, in the LOGCOMME keyword.

    When invoked with just the comment, it will be applied to the latest available image with a prefix for the current night (which starts at noon) and the sequencer's instrument.

    If image names are provided, the program will test the existence of ALL them before applying the change.

    Eg.

            $ notcam.log-comment "This is a comment"
    
            $ notcam.log-comment "Comment for two" NCug170154 NCug170155
    
    
    Notice that there's no need to add the ".fits" after each image's name

    If no arguments are provided, a usage message is displayed
  • restore-uparm
    Populates the iraf uparm directory, used by the pyraf based sequencer scripts, with some known working parameter files.
  • wcs-align [yes|no]
    Display the loaded image using world coordinates such that North is up. Called with the 'no' option, the image is aligned according to orientation on the detector.
  • zscale
    Sets the upper and lower limits of the loaded image based on the IRAF ZScale algorithm. (Displays the image values near the median image value).
  • quickspec [file]
    Extracts spectra on an NOTCAM spectroscopic image.
    If no file is specified, spectral extraction from the last image written to disk will be attempted.
  • quickspec-config [options]
    Use this command to set the configuration options for the quickspec script:

       auto=[yes|no] : Automatically run quickspec on incoming images
       kill=[yes|no] : Automatically remove previous quickspec windows
       skysub=<filename|number|no> : As in the 'setskysub' command
       default: loads default values

    Below parameters are specific for the 'apall' iraf task

       background=[none|average|median|minimum|fit]
       weights=[none|variance]
       clean=[yes|no]
       edit=[yes|no]
       nfind=<1-10>

    The skysub option performs a sky subtraction on the image prior to extracting the spectra by subtracting previous image. Highly recommended.
    If quickspec-config is issued without any options, current parameter settings will be listed.

  • slitoff [uselog | <x> <y>]
    Calculates the telescope offset required to bring a target onto a given pixel position and performs the required telescope offset.
    Rather than specifying the pixel position on the command line x y, it is also possible to refer to the last measured position from an imexam session by using the argument uselog.
    The script uses the currently loaded DS9 image and assumes this corresponds to an acquisition image of the field the telescope currently is pointed at.
    The target is identified interactively by the user through an imexam session.
  • slitrot
    Uses the currently loaded DS9 image to compute the TCS field rotation angle required to align two objects along a slit.
    The targets are identified interactively by the user through an imexam session.
 

 


NOTCam staff scripts (notcam.script in scripts)
Optional flag '-e' will show the script on standard output instead of executing the commands.

  • as05-jhk [-e]
    The photometric standard field AS05 is observed with the WF-camera in the JHKs filters in a 5-point (dice) dither pattern with teloffset steps of 15". Target is acquired by the script. A finding chart pops up on the screen.

    Identical scripts, but with OBJECT names set and exposure times optimized are available for all the standard fields used in our JHKs photometric ZP monitoring: as05, as16, as19, as26, as33, as40, serstd. For more details and a visibility plot for today, see here .

    Switches on remsave with rempath /data/service/calib/ and switches remsave off when script ends. Sets image type to STD and resets to OBJECT when script ends.

  • lintest [-e]
    Starts the NOTCam detector quality control script for both readout modes. Checks instrument setup. NB! The mirror covers must be opened and the lamp switched on and tuned manually before starting the script.
  • lintest-rrr [-e]
    As above for the reset-read-read readout mode only.
  • lintest-rs [-e]
    As above for the ramp-sampling readout mode only.
  • lintest-analyse <rs|rrr> <filename>
    Analyses the detector quality images taken by the command 'lintest'. The script is run for each mode, and the filename refers to the first filename in the sequence. Results are stored in the QC database.
  • pinholePosition [-e]
    Does the instrument setup and takes the images needed to find the pinhole position for both cameras. Interactive.
  • rotation-centre [-e] exptime
    Takes images at field-r -90 and field-r +90 for both cameras. Make sure that you have field-r = -90 (default) first and go to a focus star high in the sky. Then start the script. Give a useful exptime for this star with the WF camera and J-band (~ 15 seconds). In a future version the rotation centre will be calculcated within the script and entered to the database, but for the time being it has to be done manually.
  • through-focus [-e] exptime
    Makes through focus (+- 150 units) images with and without the focus pyramid. The user must setup the instrument first. Use the Ks filter.

    NB! The initial telescope focus tcs.focus-position should be set to the best/guess/default value for the camera chosen. And set tcs.focus-delta to zero. (If you use the HR camera you here have to up the telescope focus by ~ 136 units. This is contrary to normal behaviour, where the telescope focus is set to the value for WF-camera and K-band, and the offsets are applied in the notcam.setup-ima scripts.) Remember to reset back the tcs.focus-position when finished.

    The exptime should be suitable (good S/N, but peak value below 25000 adu) for the camera and star used, without the pyramid in the beam, (exptime is 4*exptime when the pyramid is in). The script takes about 30 minutes for an exptime of 10 seconds.
  • volt_newpcb_max [-e] A script that sets the various voltages for each quadrant. Useful if the dc offsets need adjustment (copy this script and edit it). For more details see comments in the script.
  • killpostprocess
    Terminates all processes related to the NOTCAM postprocessing tasks and the NOTCAM DS9 display. Note that this will terminate any running observing scripts.

Back to top Last modified: December 12 2022