PACMAN is separated into different stages, summarized here. Click on the hyperlinks below to see the python script for each stage. For an example of each stage applied to real data, check out Introduction.
read in the _ima_ fits files in the data directory
save important information from the header in a table
create a “work directory” to save all plots and files from the next stages
download the location of HST during the observations to prepare for the barycentric correction
perform the barycentric correction to convert from MJD (which is in the header) to BJD
download or generate a stellar spectrum that matches the spectral type of the host star. Options are: KURUCZ 1993, CASTELLI AND KURUCZ 2004, PHOENIX MODELS and a blackbody spectrum
smooth the stellar spectrum using a gaussian kernel to reduce the stellar spectrum’s resolution
multiply the stellar spectrum by the grism throughput (which is saved in PACMAN/src/data/bandpass) to make a reference spectrum for the wavelength calibration
saves the reference spectrum into the work directory
read in the direct images
fit the position of the star in each direct image
extract the spectra using the optimal extraction routine from Horne 1986
save the white light curve into “lc_white.txt” and the spectroscopic light curve information into “lc_spec.txt”.
bins the spectra in wavelength to create spectroscopic light curves (this step can be skipped if the user is only interested in the broadband light curve).