WIYN Observatory

SPARSEPAK OPTIMIZATION TOOL

The Sparsepak Optimization tool (SPSK_setup_v3.0.zip) is now available (July 2011). This script works in concert with a script written by Eric Hooper, taking an observer through optimizing the sparsepak fiber bundle placement on a target. It creates a list containing the central fiber coordinates and any necessary rotator offsets in a form compatible with the cache submission form. This code also determines offsets to a nearby check star. In the latest version I have fixed a few things (such as offsets near zero RA and DEC, and any rounding errors). As well this version now outputs a fits and a jpeg image of the final optimized field providing the observer with a finders chart of the field.

Check back here for updates. Instructions for downloading, installing, and running the script are given below.

Written by: Jenny Power (For questions, contact Eric Hooper: ehooper at noao.edu)

Prerequisites:

To run this code you need to have xpa in your path (if you don't have it installed, check out http://hea-www.harvard.edu/saord/xpa/INSTALL), and you'll need to be connected to the internet to have access to the online catalogs.

You will need to have perl installed on your machine. Perl is generally installed by default on all Unix systems. To check if your machine is set up to run the perl script, do the tests outlined below at a command-line. On Macs do this in the Terminal.app, not the X11 xterm.

(The blue print represents the output you should see after entering the command shown in bold into the terminal.)

The output after running this command should look something like the following:

The version of perl you are running is not critical. Also, you will need to ensure that ds9 is installed.

How to set up and run:

To use this code, unzip Sparsepak_v3.0.zip. This will create a folder called SparsePak_v3.0/ containing 2 perl scripts (SPSK_setup_v3.0.pl and mk_ifu_reg_3.1.pl) and one text file (sparsepak_astrometry_table.txt). These files are necessary to perform the optimization. Go into the directory SparsePak_v3.0/ and from there type:

From there, text in the terminal will guide the user through the optimization of the fiberbundle.

First the user will be prompted for the approximate RA and DEC of their target. This input is ito be entered in sexagesimal form. Accepted in the formats include: dd mm ss.ss (separated by spaces), dd:mm:ss.ss (separated by colons), ##h##m##.##s or ##d##m##.##s (separated by the characters 'h' or 'd', 'm', and 's' where the  ## denote digits.

The user is then prompted for the name of their target. The name of the target will be leant to the output file names. Any spaces will be concatenated out. Be careful, if you select the same name as an existing setup the old files will be over written.

The user will then be asked whether they have an image of their field, or whether they would like to use an SAO image of their field. This image will be displayed with a region file depicting the fiber bundle placed over it. If the user has their own image they will be prompted to enter the name iclufing the directory structure. The user can then optimize the fiber bundle placement by clicking on the fiber bundle and translating it, or by rotating the entire bundle with some rotational offset entered in to the Composite window that came up with the image.

Once satisfied that the fiber bundle has been optimized over the target, the observer hits return. The central fiber coordinates and any rotational offsets are then written to a file. This "cache" document is compatible with the KPNO cache submission form.

To ensure that when on-sky the optimal pointing is achieved, the observer is then requested to select a suitable check star. The telescope operator will use this offset star to refine the pointing. This is particularly important for very faint targets.

Depending on the wavelength region that one is observing in, it can be better to use either the R-mag or B-mag when selecting suitable check stars and when calculating those offsets. The user is prompted for the approximate central wavelength that they plan to observe in. This does not need to be exact, it is just used as a rough guide.

At this point, a ds9 window displaying an SAO image centered on the central fiber coordinates will pop up along with a catalog tool.

Stars with appropriate magnitudes for check stars are circles with green overlays. When one clicks on one of these stars, that entry will be highlighted in the associated Catalog tool. As well when one clicks on a listing in the Catalog tool, the associated star will be highlighted in the DS9 image. The user is asked to select a check star from this window. Ideally one would like to select one as close to center as possible to minimize the movement of the telescope. The user is asked to enter the RA and DEC in degrees as listed in the Catalog Tool. The offsets from the central fiber to the check star is then calculated. The check star is also placed in the cache text file.

Finally, a fits and jpg of the final field is then displayed and saved. Overall the following is output from the script:

NSF University of Wisconsin Indiana University Purdue University Pennsylvania State University Princeton University

Last modified: 03-Apr-2020 16:07:22 MST