[AstroPy] astropy with Princeton Instruments .SPE files

Eliot Young efy303 at gmail.com
Mon May 12 23:19:20 EDT 2014


Hello Sam,

I'm attaching a routine I wrote a few years ago to read a sequence of
images from an .spe file into a 3D numpy array - from when I was first
learning python. I suspect you're far beyond this code, but maybe it's of
some use. You can see that I wrote it before pyfits was subsumed into
astropy.io.fits.

Two routines...
- load_spe(fname): parses one of our movie files into a 3D numpy array.
Virtually no metadata is taken from the header, except for the pixel at a
type, the x,y image dimensions and the number of frames.

- spe2fits():
A wrapper for load_spe() to save a .spe file as a fits file.

Regards,
-Eliot

==========================================
Eliot F. Young, Sc.D., Principal Scientist
Southwest Research Institute
1050 Walnut St
Boulder, CO 80302
720-432-2333 (cell and office)
==========================================


On Thu, May 8, 2014 at 5:25 PM, Samuel Harrold
<harrold at astro.as.utexas.edu>wrote:

> Hello,
>
> Are there any astropy users who also use equipment from Princeton
> Instruments? If so, is there interest in a module that reads in .SPE files
> into an astropy data structure (or into a pandas dataframe then into
> astropy)? (The problem is that exporting from .SPE to .FITS with the tools
> provided by Princeton Instruments and then loading into astropy often loses
> valuable metadata.)
>
> If anyone else would find this useful, please drop me a line. I'm
> interested in joining a collaboration.
>
> For the curious, .SPE file format specification:
>
> ftp://ftp.princetoninstruments.com/Public/Manuals/Princeton%20Instruments/SPE%203.0%20File%20Format%20Specification.pdf
>
> Thank you!
> Sam
> **********
> Samuel Harrold
> PhD Student
> Astronomy Department
> University of Texas at Austin
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
>


-- 
===================================
Eliot F. Young, Sc.D.,
Principal Scientist
Southwest Research Institute
1050 Walnut St
Boulder, CO 80302
720-432-2333
===================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20140512/26fa90f1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winview.py
Type: text/x-python-script
Size: 1563 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/astropy/attachments/20140512/26fa90f1/attachment.bin>


More information about the AstroPy mailing list