- About WIYN
- Observing at WIYN
At the Telescope
- Internal Use
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)
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.
- which perl
(The blue print represents the output you should see after entering the command shown in bold into the terminal.)
- perl -v
The output after running this command should look something like the following:
- This is perl 5, version 12, subversion 3 (v5.12.3) built for
- Copyright 1987-2010, Larry Wall
- Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.
- Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
The version of perl you are running is not critical. Also, you will need to ensure that ds9 is installed.
- which ds9
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:
- perl SPSK_setup_v3.0.pl
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:
- name_cache.txt - a file containing the coordinates of the central fiber and the offsets to a nearby check star
- name_final.reg - contains a region fils of the final fiber bundle placement
- name_final_finders.fits - a fits image centered around the final central coordinate.
- name_final_finders.jpg - a jpg image showing the final optimized field.
Last modified: 23-Sep-2015 13:44:34 MST
- Observing at WIYN