luciTools
LUCI Script Checking and Preparation Tools

Overview

luciTools is a suite of programs for checking and creating LUCI observing scripts. They are implemented in standard Perl 5, and work on Linux and Mac systems (see below).

The core luciTools programs are:

lucierrors - LUCI script logical error checker
makeluciflat - Generate a LUCI flat script from an imaging or spectroscopy script
lucitelluric - Generate LUCI telluric standard spectroscopy scripts
Follow the links above to descripts of the individual scripts and packages including individual downloads.

Download

This tar file

luciTools.tgz - Version 0.4 [2013 Jan 29]
is the current release snapshot of all of the luciTools programs. The archive creates a luciTools/ folder and unpacks the distribution.

Alternatively, you can download the individual programs below.

Current Release

The current public release of luciTools consists of the following:
lucierrors.pl - v0.5.0 [2013 Jan 28]
makeluciflat.pl - v0.2.0 [2013 Jan 4]
lucitelluric.pl - v0.1.0 [2012 Dec 18]

lucierrors - LUCI Script Logical Error Checker

Version: 0.5.0 [2013 Jan 28]

Usage: lucierrors.pl [slit_type]

Options:
   slit_type = one of mask, phot, 2.0, 1.5, 1.0, 0.75, 0.5, and 0.25

Description

lucierrors scans all LUCI scripts in the current working directory and searches for the most common operational or syntax errors. It also produces a program.dark.cal script with all the darks required for the scripts.

lucierrors works assuming that a uniform naming convention has been adopted by all observers (cue laughter). We make the following associations based on the file extension:

    XX.acq -- target acquistion script
    XX.spc/.spec/.obs -- spectroscopic science observation script
    XX.img  -- imaging script
    XX.cal  -- calibration script
    XX.flat -- flat field calibration script
    XX.arc  -- arc (comparison) lamp calibration script
    XX.dark -- dark calibration script
    XX.cal  -- generic calibration script
It is hard to guess all possible naming variations, so at least among the OSU/RC partners we are enforcing a uniform naming convention going forward to try vainly to reduce our observing queue ingestion and script checking workload.

The testing rules as of the current version are:

  • Reports all the possible darks that may be required (this depends on observer religion about darks), creating a LUCI script named program.dark.cal to execute the necessary darks.

    We are also encouraging users to start embedding two comments inside target acquisition scripts:

       # TARGET_MAG   = 13.50 H mag
       # GUIDE_MAG    = 14.80 R mag
    
    These will be used by lucierrors to help better automate sanity checking target and guide star choices. It is essential that they be included as comments with the # character as these are not valid LUCI script commands. For OSU/RC users, these comment keywords will eventually become mandatory for all LUCI acq scripts submitted to the observing queue.

    Example

    In this example your scripts folder has a set of scripts all using the 1.0-arcsec facility long-slit mask:
       lucierrors 1.0
    
    This will sniff all scripts whose names match the above file extensions in the current working directory (NB: it does not crawl through subdirectories) and tests for common errors in logic.

    Download

    The current public release version (v0.5.0 - 2013 Jan 28) is:
    lucierrors.pl [22k Perl Script]
    Install by copying the perl script into "lucierrors" in your public bin directory and making it executable.

    Release Notes

    Version 0.5.0 (2013 Jan 28)
    Fixed error reading posangle

    Version 0.4.0 (2013 Jan 7)
    Added checks for the slitmask specified
    Checks the guide star magnitude (if available) against typical limits.
    Checks the guide star position relative to the guide patrol field and vignetting avoidance regions, and issues errors or warnings as needed.

    Version 0.3.0 (2012 Dec 17)
    Fixed bad name for the 0.5-arcsec slit. Now nags observers with warnings if names are longer than 20 characters or contain special characters (making names hard for observers to type at 3am at 3200m)

    Version 0.2.0 (2012 Dec 7)
    Further errors and warnings related to the name convention. Added dark script generation.

    Version 0.1.0 (2012 Dec 5)
    First beta test version, limited release at OSU and LBTO for testing

    makeluciflats - Generate LUCI flat scripts from .img or .spec scripts

    Usage: makeluciflat script

    Where:
      script - name of LUCI .img or .spec script
    

    The output file will be named script.flat.cal (e.g., derived from script.img or script.spec).

    Description

    This script will parse a LUCI imaging (.img) or spectroscopy (.spec) script and produce a calibration (.cal) script for taking flat fields for the same mode.

    The flat field exposures are based on the count rates published in the LUCI instrument manual. It attempts to automatically assign lamps and integration times. The default script will execute 5 flats in each mode, and aims for a maximum of 20000 counts.

    The output script will be named script.flat.cal, where script is the root name of the img or spec script given on the command line (see the Example below).

    If it cannot estimate the appropriate DIT and LAMPs, it fills in the values with UNKNOWN and warns the user, and appends the file extension ".needsfixes" to alert the user (e.g., output file is script.flat.cal.needsfixes).

    Example

    You want to create a flat-field calibration script corresponding to spectroscopic observation script j1140.spec:
        makeluciflat j1140.spec
    
    Produces output
       Producing a flat for script j1140.spec - output will be j1140.flat.cal 
    
       INFORMATION: defaults to O2DCR read mode and NORMAL save mode
                    with 5 exposures designed to yield 10000 counts each 
                    based on count rates reported in the Lucifer manual
    
       EXTRACTING INFORMATION FROM TARGET SCRIPT j1140.spec
       found PI_NAME DTerndrup
       found PROP_ID OSU_BALQSO_He
       found CAMERA N1.8
       found FILTER HKspec
       found GRATING 200_H+K
       found CENTRAL WAVE 1.93
       found MASK ID990034
       found MASK_POSITION mask_in_fpu
       found ROE_MODE mer
       Appear to have found all the needed parameters, estimating count rate 
    
       Using slitwidth 1 arcsec for slit ID990034
    
       Expected count rate for filter HKspec lamp halo2 camera N1.8 grating 200_H+K is 2800 (ADU/s)
         Will use time DIT=4 to get total counts 11200 in one exposure -- defaulting to making 5 flat exposures
    
    and creates j1140.flat.cal in the current working directory.

    Download

    The current public release version (v0.2.0 - 2013 Jan 4) is:
    makeluciflat.pl [14k Perl Script]
    Install by copying the perl script into "makeluciflat" in your public bin directory and making it executable.

    Release Notes

    Version 0.2.0 (2013 Jan 4)
    Second release - added 200 grating in zJ/HK modes.

    Version 0.1.0 (2012 Dec 9)
    First beta release.

    lucitelluric - Generate LUCI Telluric Scripts

    This is a package that consists of two Perl scripts:
    findlucitelluric.pl
    Make a list of telluric stars within 10° of the coordinates of a science target

    makelucitelluric.pl
    Make LUCI acquisition and spectroscopic scripts for the selected Telluric star.
    It uses two catalog files provided below:
    telluric.v010.cat - Subset of the Gemini Catalog of Telluric stars
    telluric.guide.v020.cat - Catalog of guide stars for each Telluric star
    The scripts are as follows:

    findlucitelluric - find telluric stars near a target

    Usage: findlucitelluric.pl -s acqScript [options]

    Options:

      -s acqScript  Name of the science target acquisition (.acq) script
      -r deg        Search radius in degrees [default: 10°]
      -t hours      Time shift in hours of RA [default: 0 hours]
      -h            Print help
    

    Description

    Searches the catalog of Telluric standard stars (derived from the Gemini Hipparcos Standards) for all Hipparcos stars within 10° of the target coordinates in the .acq script. It produces a list of candidate telluric stars matching your search criteria.

    The search radius can be changed using the -r option. The default is equivalent to -r 10.

    You can shift your search forward or backwards in RA (time) at the same declination by using the -t option. For example, -t 0.5 will shift the target RA by 0.5 hours forward, and search for telluric stars around that position. This would be used, for example, to find telluric stars at the mid-point of a 1-hour science exposure to be executed after the science observations. If instead you want a telluric star to be observed before the science observations, give it a negative value (e.g., -t -0.5).

    A list is printed on the screen. Pick the star you want based on the spectral type, magnitude, and availability of guide stars. These are guide stars it will try to select automatically. If you elect to select guide stars by hand, you may find others nearby that are useful beyond our simple recommendation. Beware that the choices are based on the USNO-B1 catalog, and some "stars" in USNO-B1 are unsuitable on inspection.

    Example:

       findlucitelluric -s j1140.acq
    
    will print
    Will parse script j1140.acq for parameters
    
    Searching for tellurics for j1140.acq within radius 10 degrees and an RA shift of 0 
    hours using findlucitelluric.v010.pl on Tue Dec 18 15:29:51 EST 2012
    
    EXTRACTING INFORMATION FROM TARGET SCRIPT j1140.acq
      found COORD 11 40 43.63 +53 24 38.9
    
    CANDIDATE TELLURIC STARS
    
      dist   name        RA           Dec        Type    Hmag   Nguide
      1.41  HIP56974  11:40:46.35  +51:59:53.4     G0V  8.214      3 
      4.43  HIP54765  11:12:44.45  +54:53:39.4     A4V  6.434      3 
      4.53  HIP59330  12:10:15.88  +54:29:17.3    G0Vm  7.126      2 
      4.62  HIP55485  11:21:49.29  +57:04:29.4    A7Vn  6.023      3 
      ...
      9.98  HIP51697  10:33:43.77  +53:29:50.5     A1V  6.490      5 
    Nguide is the number of guide stars associated with the telluric in /
    home1/webserv/lbtosurc/OSURC/Scripts/telluric.guide.v020.cat
    Closest telluric was at  1.413 degrees
    
    Your name choice becomes one of the inputs for running makelucitelluric to create the acquisition and observing scripts.

    makelucitelluric - Create telluric star .acq and .spec scripts

    Usage: makelucitelluric.pl -s specScript -n telStar [options]

    Options:

      -s specScript  Name of the science target observing (.spec) script
      -n telStar     Use telStar selected previously with findlucitelluric
      -t 'ra dec Hmag' RA, Dec (sexigessimal 00:00:00 -00:00:00), H mag of a telluric star (instead of -n)
      -g 'ra dec Rmag pa' RA, Dec (sexigessimal 00:00:00 -00:00:00), Rmag, and rotator PA for a guide star
      -f fwhm        Assumed seeing FWHM for counts estimation [default: 0.8 arcsec]
      -w width       Slit width to use in arcsec [default: 1.0 arcsec]
      -m             Manually select a guide star from the list
      -h             print help
    

    Description

    The makelucitelluric script builds a telluric script for the spectroscopic script script.spec using a telluric star selected using
    findlucitelluric. If the star is in the telluric files, you are done, otherwise you will have to specify everything about the star (-t option).

    If the telluric star has a guide star, it will automatically assign the guide star which minimizes the change in the rotator angle (a semi-arbitrary choice). If you want a different one from the list of available guide stars you can select it manually (-m option). Otherwise you must specify everything about the guide star (-g option)

    The slit width is determined automatically if possible, otherwise you can specify it with the -w option or you will be prompted for it. A known slit width based on the mask ID###### identification will override the width given by the -w option

    You can change the assumed seeing from the default 0.8 arcsec with the -f option. This scales the peak telluric counts as FWHM*FWHM and the spectral counts by FWHM (along slit) and an error function for the slit width (Note: the LUCI ETC appears to scale spectral counts just as FWHM*FWHM).

    Exposure times are set automatically to try to get between 65000 and 130000 counts in the summed spectrum and 10000 to 20000 peak counts in the acquisition image. The count estimates are included as comments in the generated scripts.

    If there is insufficient information on the guide star, the guide star properties and rotator angle are set to UNKNOWN.

    If the estimated count rates seem to imply that it is impossible to use the telluric star without coming close to saturation, the integration parameters are set to UNKNOWN.

    Example

       makelucitelluric -s j1140.spec -n HIP55485
    
    will build two scripts
       HIP55485.acq.new
       HIP55485.spec.new
    
    with the acquistion and spectroscopy LUCI scripts, respectively. As it creates them you will get a verbose printout of its estimation of the counts, choice of filter for acquisition, etc.

    WARNINGS!

    There are important caveats you should understand before using makelucitelluric:
    1. The estimated counts are close (~50%) to the ETC estimates at the peak of the spectrum, but some approximations are used because the ETC does not supply all necessary information to fully redo the calculation.

    2. The script tries to obtain roughly 100,000 peak counts in the SUMMED telluric spectrum -- this may differ from typical telluric star religion.

    3. These tellurics come with the usual caveats of the Gemini telluric list, namely that you should double check what they are on SIMBAD, etc.
    Please remember: maketelluric is designed to aid you in selecting suitable telluric stars, but it is not a substitute for applying judgment about whether its choices are suitable for your science program.

    Downloads

    The current public release version (v0.1.0 - 2012 Dec 18) is:
    lucitelluric.tgz [2.7Mb gzipped archive]
    This tar archive unpacks into the two scripts and two catalogs, plus a readme file with the installation instructions.

    Release Notes

    Version 0.1.0 (2012 Dec 18):
    First beta release, contains the version v0.1.0 of our copy of the Gemini Telluric Star catalog, and v0.2.0 of the LUCI guide-star catalog for telluric stars. NOTE: There is an error in telluric.guide.v010.cat from pre-release versions. Do not use this older catalog if you have it!

    Updated: 2013 Jan 29 [rwp/osu]