Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Over the last few years I have sometimes coded in Python and have attained a moderate skill level with it.

Programs in this folder include:

  • classify.py - Goes through each exploding star (aka supernova) observation (actually, a spectrum, i.e., a plot a wavelength vs. brightness) in the input directory. First checks to see if there is actual signal in the observation, or if the spectrum is just noise. If there is signal in the observation, the spectrum is run through the SuperNova IDentification code (Blondin, S. & Tonry, J. L. 2007, ApJ, 666, 1024), which is written in C++ and which I have contributed a small amount source code and template files to. SNID is effectively an optimized cross-correlation code that compares the input spectrum with a set comparison template spectra. If SNID finds a "good" match between the templates and the input, then information regarding the observation and its SNID match(es) are written to a text file. Takes various optional inputs describing where the spectral data files are, what kind of files they are, and which set of SNID comparison templates should be used.

  • fit_plat.py - Reads in exploding star (aka supernova) light curves, which are simply the brightness measurements of a given supernova vs. time, stored in three column ASCII files: the first column is the date of the observation, the second column is the brightness measurement of the supernova on that date, and the third column is the uncertainty in the brightness measurement. It then plots one light curve at a time and the user clicks on two places on the plot. It then calculates the mean and maximum brightness between those two clicks and writes these values (along with the name of the supernova currently being viewed) to a text file for later analysis and use.

  • fit_lc.py - Similar to the above code, but slightly cleaner, more robust, and modular. Reads in exploding star (aka supernova) light curves, which are simply the brightness measurements of a given supernova vs. time, stored in three column ASCII files: the first column is the date of the observation, the second column is the brightness measurement of the supernova on that date, and the third column is the uncertainty in the brightness measurement. The data can be read from local text files (with the --files flag) or downloaded from the UC Berkeley Filippenko Group's SuperNova DataBase (SNDB) (with the --sndb flag). It then fits the late-time decline of each light curve with a line using either a starting point chosen by a user click (if the --interactive flag is used) or an inflection point from a modified logistic function fit to the entire light curve. The late-time slopes and their errors (along with the name of the supernova and the light curve filter currently being viewed) are written to a text file for later analysis and use.