-
Notifications
You must be signed in to change notification settings - Fork 15
Requirements to Run PyHammer
PyHammer is written in and should be run with Python 3. It will not work in Python 2.
PyHammer relies on several core Python modules as well as third party modules. It is suggested that Python be installed with Anaconda, which comes packaged with all required modules. The table below lists all third party modules as well as suggested minimum versions. Modules can be upgraded through the commands pip install --upgrade <module_name> or else conda update <module_name> if Anaconda is installed.
| Module | Minimum Version | Command to Check Version1 |
|---|---|---|
| NumPy | 1.11 | import numpy; numpy.__version__ |
| SciPy | 0.18 | import scipy; scipy.__version__ |
| Matplotlib | 1.5 | import matplotlib; matplotlib.__version__ |
| TkInter | 8 | import tkinter; tkinter.TkVersion |
| AstroPy | 1.2.1 | import astropy; astropy.__version__ |
| tqdm | 4.46.0 | import tqdm; tqdm._version.version_info |
1Commands are run in Python environment
To run the program, you need an input file to specify which spectrum will be classified. The input file can be created either beforehand as a text or csv file and choosing that file (by clicking Browse in the GUI), or else created in the program itself (by clicking Create in the GUI). Primarily, the input file format should be to list the filenames of the spectra you want to classify. PyHammer accepts many different types of file formats and will automatically attempt to figure out which format your file matches. However, if you want to speed things up, you can specify the spectrum file type after the filename. You can separate the filename and the file type with either a space or a comma. The spectrum filenames can have the full path specified or a common path for all spectra files can be specified during execution.
The example input file in the test_case directory is defined below for reference.
test_case/spec-0618-52049-0372.fits SDSSdr12
test_case/spec-1079-52621-0509.fits SDSSdr12
test_case/spec-1123-52882-0065.fits SDSSdr12
test_case/spec-4068-55445-0924.fits SDSSdr12
test_case/spec-4961-55719-0378.fits SDSSdr12
test_case/spec-7332-56683-0788.fits SDSSdr12
test_case/spec-7454-56751-0770.fits SDSSdr12
test_case/spec-5047-55833-0936.fits SDSSdr12
test_case/spec-3764-55514-0972.fits SDSSdr12
All the spectra need to be in Angstroms, and must cover part (but not necessarily all) of the region between 3650 and 10200 Angstroms. The following spectrum data types are accepted.
-
SDSSdr7– Fits files given by the Sloan Digital Sky Survey's Early Data Release through Data Release 8 -
SDSSdr12– Fits files given by Sloan Digital Sky Survey's Data Release 9 through Data Release 13. -
fits– Fits files created with IRAF or PyRAF. -
txt– Files must have at least two columns containing wavelength (in Angstroms) in the first column and flux in the second column. An optional third column can be provided containing the error. If this is not provided, it will be calculated. -
csv– Files should have the same format as thetxtfiles with columns separated by commas rather than spaces, first having wavelength, then flux, and an optional error in the third column.