What is "sptool"?
In order to accurately determine the spectral type of an unknown star, it is necessary to be able to visually compare features of the unknown type to spectral standards. However, no tool that I found allows the spectral classifier to easily compare the unknown type to a set of standards So I have written a tool to use a normalized grid of standards that allows you to visually compare the unknown type to any standard you have and to 'flip through' the standards by simply pressing a key.
Requirements
This is written in poorly coded python and it requiresif you can import scipy, numpy, pylab and pyfits you should be fine:
$> python Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>> import scipy >>> import pylab >>> import pyfits
Download and Configuration
The actual program can be downloaded here: sptool
Be sure to put it someplace executable if you are on unix and also make it executable:
$ chmod 755 sptool
You will need to edit the file (sptool) and put the path to your grid of standards. The standards MUST be named like this:
A7.V.fits A8.V.fits A9.V.fits F2.III.fits F2.III-IV.txt F5.IV-V.txt...etc
These files should be your spectral standards obtained with the same instrument as your program spectra. If you have gaps in your standards, I would recommend using spectra from the following projects:
- Nstars program - MK Standard Stars Online
- The Stony Brook/SMARTS Spectral Standards Library
- The Indo-U.S. Library of Coudé Feed Stellar Spectra
- The IRTF Spectral Library (using SpeX)
Please note that some "standard stars" have changed classifications over the years and in general it is best to scrutinize the classification history of each standard star before you adopt it as a standard in your own classifications. See Stellar Spectral Classification by Gray & Corbally - Appendix A contains a modern grid of spectral standards. Also useful is Eric Mamajek's Notes on Spectral Standards.
The luminosity classes it recognizes are
'IA', 'IAB', 'III', 'III-IV', 'IV', 'IV-V', 'V'
Note that this means you cannot use odd luminosity classes like 'Ve' or 'V/IV' or whatever without first modifying the code. If you don't like these luminosity classes please feel free to edit the code - it is under a BSD-style license.
To Use
sptool --sptype F1 file_to_classify.fits
or alternatively:
sptool -sF1 file_to_classify.fits
the sptype flag and the file_to_classify.fits are required
To move around the grid of standards, the keys are:
| Key(s) | Action/Function | |
|---|---|---|
| Page Up | Page Down | move in spectral type space |
| + | - | move in luminosity class space |
| up | down | shift the object spectrum up or down |
| < | > | shifts the spectrum left or right |
| ( | ) | separate/converge the spectral standards |
| q | quits without saving | |
| w | saves the spectral type to the output file and quits | |
Bugs and Comments
There is a matplotlib bug where it won't let you zoom/pan after you have pressed a number key. This is a matplotlib bug and it may affect your ability to remap the keys to use the number pad. In general, I am not happy with the choice of keys to perform the tasks but I had to avoid certain keys because they are already being used by matplotlib (for example, 'g' toggles the grid). There are probably more bugs so if you find any or make any improvements or changes let me know and I'll fix it.
Other Tools
There are other tools that may be helpful in determining spectral types. Some of the more obvious ones are:
- Kevin Covey's "The Hammer" (Don't hurt 'em)!
- Richard Gray's "xmk22"
- Jesus Hernandez's "SPTCLASS"



