[AstroPy] Data Analysis and Programming in Python

Wayne Watson sierra_mtnview at sbcglobal.net
Wed Apr 8 07:38:20 EDT 2009

Hi, Warren. 
   I'm picking up on the part of the thread above that you branched off 
on here, because I'd like to highlight and clarify what I'm after 
without having it buried in that long thread.

Well, I took a peek at the data analysis pdf file. My impression is that 
this is for people who want to do interactive data analysis, and 
probably know little about Python. What I'm doing is modifying a 2000+ 
line of Python code to add new features that will do analysis of meteor 
images. To collect images, it uses a special hardware box. Ultimately, 
the user sees these images in a non-standard file format, which only the 
app understands.   I would like to, for one of many things, allow users 
to convert these images to fits. Suppose I do that and stop there. It 
_might_ be possible to convince the users to use the data analysis 
program. It's doubtful though, since they are pretty much neophytes. 
They do understand how to operate the program in the present form, which 
basically provides no analytic capabilities. If I can add fits and 
analyticd features to the program, there is a good chance they will use 
them. I think sending them off to the data analysis tool here would not 
work. Not yet anyway.

To put it simply, I'm looking for some capability to add features that 
will allow the program to both read and write fits format files. Adding 
analytic capabilites is important, but not the point here.  It appears 
that, at least, one can use pyfits to read fits files, and one can embed 
this code in a Python program.  I posted the coding aspects of doing 
this in a thread above, and finally got someone to respond with code 
that looks like:

    from matplotlib import pyplot as plt
    import pyfits

    image = pyfits.getdata('mpl51.fits')

    fig = plt.figure()
    ax = fig.add_subplot(111)

This is close to what I'm looking for. Right now I'm lacking away to 
read, say, a jpg, fits, or gif file, and convert it to fits. I'm also 
lacking a way to convert the internal image format to fits. The latter 
is very important.


           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)****

          "Less than all cannot satisfy Man." -- William Blake

More information about the AstroPy mailing list