Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

PS water vapor analysis, Nov 2014

First update, 2015 Jan 12, Tyler St. Germaine

I have written a code in Python that runs through a directory of fits files, isolates the spectrum of Polaris, and performs PWV analysis on it.

 

Sample of Images and Spectra

This is a set of what some of the typical spectra look like in the data set:

  • I consider this a "good" image.  Spectrum is there in full, and in focus.  Note that I have the absorption features highlighted as well (O2 A, O2 B, and four H2O features).  This fits image is median-subtracted, meaning I just took the raw median of the whole image and subtracted it.

 

  • This is an image where the filter wheel has the spectrum "chopped up", making it not useful for analysis of absorption features.

              

 

  • I'm not sure what's happening in images like these.  It seems the spectrum just gets cut off halfway, not due to running off the CCD.

              

 

  • Also a little unsure of what happens here.  The background sky seems to be drowning out the starlight, perhaps it's getting too close to sunrise?  It also looks like there may be a cloud?

              

 

When the code runs through all the images, it throws out data that looks like the bottom three cases above, and keeps only the "good" images.  

 

Finding the absorption features

As seen in the spectrum in the case of the "good" image, after isolating the entire Polaris spectrum, the code singles out the six points on the spectrum corresponding to the following features:

FeatureWavelength (nm)
O2 B683
O2 A762
H2O723
H2O822
H2O909
H2O946

To convert the spectrum from pixels to nm, it finds the O2A and O2B features, uses those two as known wavelengths, and calibrates the rest of the spectrum given those two points.

 

To-do, as of 1/12/15

  • Measure equivalent widths of the six features, analyze over time
  • My analysis so far has only been on a subset of all the data, due to the difficulty of not having access to the external drive on my mac.  To do: get another external drive to reformat the original drive, allowing me to analyze all the data at once
  • Cosmic rays may throw off the way my code analyzes the images.  Matt recommended I use cosmics.py to simply remove them from the image before analysis.
  • Temperature data is stored in the headers of the files.  Investigate how the quality of the image changes versus time or temperature (e.g. focal length)

 

Update 25 Jan 2015, Tyler St. Germaine

 

Cosmics.py does not work well with slitless spectrograph images

Cosmics.py is a python module based on the LA Cosmic algorithm.  I downloaded it from here.  It just looks for hot pixels and throws them out, while making sure saturated stars do not get thrown out.  

Perhaps predictably it does not work well with these images, where the objects are dispersed over many pixels.  Example:

    

It's a little hard to see, but some pixels within the Polaris spectrum are removed entirely, which obviously throws off the analysis.

 

Fitting the continuum

I use the python class LSQUnivaraiteSpline to fit a spline to the continuum of the spectrum.  The knots are controlled manually so that they do not lie on the absorption features (right now they only avoid the six features described above, but I should in the future add more features to avoid such as those near 625 and 650 nm).  This continuum is then divided out to give extinction vs wavelength.

    

Left: blue is true spectrum, red is spline fit, green highlights absorption features.  Right: spectrum divided by spline fit, minus 1.  

There's an arbitrary factor in the spline fit, the degree of the smoothing spline, an integer from 1-5.  I chose a fit of 3.  This value is a compromise between basically having a gaussian fit (value of 1), and a spline that perfectly fits the spectrum noise (value of 5).  I may look into how this number impacts the measurements of equivalent width.

 

Measurements of equivalent width

I used the textbook definition of equivalent width: 

Eq Width = ∫ 1 - ( F / F_continuum) dλ    

integrated over the entire feature, where F is the true spectrum and F_continuum is the spline fit.  This equation comes down to integrating over (negative) the feature in the extinction curve above.

This is a plot of the equivalent widths of the 762nm OxA and 822nm water features measured over a sample of ~60 images over a three month period.  The blue is OxA and the red is water.  

The many zero values of water are due to my code not exactly finding the absorption feature correctly, something I will fix.  But it's a start.  I can include the widths of all features, but for this plot I decided only to put these two.  

 

To do 1/25/15

  • Still need to get another external drive so that I may analyze all the data, instead of just this subset
  • I still would like to look at temperature data over time as well

 

 

 

  • No labels