From Barrett at stsci.edu Fri Aug 6 11:52:17 1999 From: Barrett at stsci.edu (Paul Barrett) Date: Fri, 6 Aug 1999 11:52:17 -0400 (EDT) Subject: [AstroPy] Proposed BoF for "Python in Astronomy" Message-ID: <14250.63436.739592.432064@nem-srvr.stsci.edu> Paul Barrett (Barrett at STScI.Edu) proposes the following BoF: "Python in Astronomy" This BoF will be chaired by Paul Barrett, and will begin with an introduction to Python in astronomy, be followed by reports of current Python projects, and conclude with a discussion about the current state of Python in astronomy. The introduction will give a brief overview of the language, highlighting modules, resources, and aspects of the language that are important to scientific programming and astronomical data analysis. The closing discussion will provide an opportunity for questions and comments. _____________________________________________________ AstroPy mailing list - astropy at stsci.edu http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/ From Barrett at stsci.edu Tue Aug 24 10:57:10 1999 From: Barrett at stsci.edu (Paul Barrett) Date: Tue, 24 Aug 1999 10:57:10 -0400 (EDT) Subject: [AstroPy] Module suggestions? Message-ID: <14274.43038.903517.54646@nem-srvr.stsci.edu> I'm trying to compile a list of Python modules and enhancements to current modules that the AstroPy community would like to see developed. Examples of such modules and enhancements are: - Record, a module to access multi-dimensional arrays of structures (currently under development), - PyFITS, an IO module for FITS files (currently under painfully slow development by me), - SLAlib, a wrapper module, with some enhancements, for the StarLink Astronomical library, - Numeric enhancements, such as memory mapping of large arrays, no up-casting during array operations, no temporaries during array operations, scatter/gather behavior using arrays, a module of useful astronomical methods (e.g. min, max, etc), etc. My intention is not to create applications, but to develop a useful set of basic modules that developers can use to develop applications. For example, once the PyFITS module is complete or nearly so, someone can use this and other modules to develop a graphical application for browsing FITS files. I will compile this list and try to keep it updated on a regular basis. So let the AstroPy community know what you think needs to be developed and its relative importance. Hope to hear from all of you soon. Cheers, Paul _____________________________________________________ AstroPy mailing list - astropy at stsci.edu http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/ From bridgman at wyeth.gsfc.nasa.gov Tue Aug 24 12:30:51 1999 From: bridgman at wyeth.gsfc.nasa.gov (W.T. Bridgman) Date: Tue, 24 Aug 1999 12:30:51 -0400 Subject: [AstroPy] Module suggestions? References: <14274.43038.903517.54646@nem-srvr.stsci.edu> Message-ID: <37C2C8BB.7E0D55E3@wyeth.gsfc.nasa.gov> Paul Barrett wrote: > > I'm trying to compile a list of Python modules and enhancements to > current modules that the AstroPy community would like to see > developed. Examples of such modules and enhancements are: > > - Record, a module to access multi-dimensional arrays of structures > (currently under development), > - PyFITS, an IO module for FITS files (currently under painfully slow > development by me), > - SLAlib, a wrapper module, with some enhancements, for the StarLink > Astronomical library, I'm told there is a C version of SLAlib but the person responsible is reluctant to release it. I believe Pavlos' PyAstro module has some versions of these routines. > - Numeric enhancements, such as memory mapping of large arrays, no > up-casting during array operations, no temporaries during array > operations, scatter/gather behavior using arrays, a module of > useful astronomical methods (e.g. min, max, etc), etc. Considering the number of other scientific libraries out there, many of these may already be available. I'm working on a more generic TimeSeries class. To populate this class, I'm developing a wrapper class for Paul's PyFITS module that can extract the time series data from FITS files generated for specific instruments. I think I can make this interface sufficiently general that, in principle, one could design one to extract timing data for any instrument. It would facilitate multi-wavelenght timing analysis. Also, I've heard no feedback from the AstroPy list on the PyFITS documentation I wrote (come on, I know it's abysmal). Suggestions please! Tom -- Dr. William T."Tom" Bridgman Scientific Visualization Studio Raytheon ITSS NASA/Goddard Space Flight Center Email: bridgman at wyeth.gsfc.nasa.gov Code 935 Phone: 301-286-1346 Greenbelt, MD 20771 FAX: TBD http://svs.gsfc.nasa.gov/ _____________________________________________________ AstroPy mailing list - astropy at stsci.edu http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/ From ptak at snooker.phys.cmu.edu Tue Aug 24 12:48:58 1999 From: ptak at snooker.phys.cmu.edu (ptak at snooker.phys.cmu.edu) Date: Tue, 24 Aug 1999 12:48:58 -0400 (EDT) Subject: [AstroPy] Module suggestions? In-Reply-To: <37C2C8BB.7E0D55E3@wyeth.gsfc.nasa.gov> Message-ID: I would like to see a pure-Python FITS header keyword reading module. The last time I checked, PyFITS used some C code. Some problems I am interested in only require the values of some keywords (like the total number of counts, often in TOTCTS), and full-fledged fits i/o is overkill. BTW, right now I am debugging a fairly large Python application that does 2-D fitting of images, optionally including a PSF (and it can generate PSF images on the fly for ROSAT). It is modeled after the X-ray spectral tool XSPEC, particularly in the sense that it allows using the C statistic for fitting of images with small numbers of counts/pixel. I have played around with fitting models to optical images (using chi^2 in that case). Another interesting feature is that a mask image can be read in to exclude parts of the images from the fitting, and model parameters can be tied to each other. It uses the Numeric and fftw modules, and a C++ fits image library. Cheers, Andy Ptak _____________________________________________________ AstroPy mailing list - astropy at stsci.edu http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/ From bridgman at wyeth.gsfc.nasa.gov Tue Aug 24 12:56:37 1999 From: bridgman at wyeth.gsfc.nasa.gov (W.T. Bridgman) Date: Tue, 24 Aug 1999 12:56:37 -0400 Subject: [AstroPy] Module suggestions? References: Message-ID: <37C2CEC5.C3FB81EF@wyeth.gsfc.nasa.gov> Andy, Why is it a problem using the PyFITS module and just not accessing the table stuff? I've found header access fairly straightforward. Perhaps my documentation needs some improvement? Tom ptak at snooker.phys.cmu.edu wrote: > > I would like to see a pure-Python FITS header keyword reading module. The > last time I checked, PyFITS used some C code. Some problems I am > interested in only require the values of some keywords (like the total > number of counts, often in TOTCTS), and full-fledged fits i/o is overkill. > -- Dr. William T."Tom" Bridgman Scientific Visualization Studio Raytheon ITSS NASA/Goddard Space Flight Center Email: bridgman at wyeth.gsfc.nasa.gov Code 935 Phone: 301-286-1346 Greenbelt, MD 20771 FAX: TBD http://svs.gsfc.nasa.gov/ _____________________________________________________ AstroPy mailing list - astropy at stsci.edu http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/ From ptak at snooker.phys.cmu.edu Tue Aug 24 13:48:48 1999 From: ptak at snooker.phys.cmu.edu (ptak at snooker.phys.cmu.edu) Date: Tue, 24 Aug 1999 13:48:48 -0400 (EDT) Subject: [AstroPy] Module suggestions? In-Reply-To: <37C2CEC5.C3FB81EF@wyeth.gsfc.nasa.gov> Message-ID: Tom, Well, honestly, it was several months ago (like around Feb.) that I needed that, and at that time I just assumed that you needed the compiled parts, and the Linux version wasn't working. I'll be revisiting it shortly and I'll let you know how it goes. Cheers, Andy On Tue, 24 Aug 1999, W.T. Bridgman wrote: > Andy, > > Why is it a problem using the PyFITS module and just not accessing the > table stuff? I've found header access fairly straightforward. > > Perhaps my documentation needs some improvement? > > Tom > _____________________________________________________ AstroPy mailing list - astropy at stsci.edu http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/ From npirzkal at hq.eso.org Tue Aug 24 13:55:09 1999 From: npirzkal at hq.eso.org (Norbert Pirzkal) Date: Tue, 24 Aug 1999 17:55:09 +0000 Subject: [AstroPy] Module suggestions? References: Message-ID: <37C2DC7D.8CE47360@hq.eso.org> ptak at snooker.phys.cmu.edu wrote: > > I would like to see a pure-Python FITS header keyword reading module. The > last time I checked, PyFITS used some C code. Some problems I am > interested in only require the values of some keywords (like the total > number of counts, often in TOTCTS), and full-fledged fits i/o is overkill. > > BTW, right now I am debugging a fairly large Python application that does > 2-D fitting of images, optionally including a PSF (and it can generate > PSF images on the fly for ROSAT). It is modeled after the X-ray spectral > tool XSPEC, particularly in the sense that it allows using the C statistic > for fitting of images with small numbers of counts/pixel. I have played > around with fitting models to optical images (using chi^2 in that case). > Another interesting feature is that a mask image can be read in to exclude > parts of the images from the fitting, and model parameters can be tied to > each other. It uses the Numeric and fftw modules, and a C++ fits image > library. > > Cheers, > Andy Ptak > > _____________________________________________________ > AstroPy mailing list - astropy at stsci.edu > http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/ I have a working read/write pure python header access code if you are interested. I am planning to release a pure python version that handles fits images within a few weeks. The header stuff is running already and is being tested right now. Let me know if you want to have an early look at what I have... Cheers, Nor _____________________________________________________ AstroPy mailing list - astropy at stsci.edu http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/ From loredo at spacenet.tn.cornell.edu Tue Aug 24 14:04:06 1999 From: loredo at spacenet.tn.cornell.edu (Tom Loredo) Date: Tue, 24 Aug 1999 14:04:06 -0400 (EDT) Subject: [AstroPy] Module suggestions? Message-ID: <199908241804.OAA21088@laplace.tn.cornell.edu> FYI: I'm working on some modules to do various Bayesian statistical analyses, including analyses of photon counting spectra and arrival time series. The plan is to have some fairly generic capability to do Bayesian things like marginalize over nuisance parameters, calculate contour levels that bound credible regions, and calculate odds ratios, using techniques ranging from Laplace approximations to adaptive quadrature and Markov Chain Monte Carlo. But it's mostly just ideas now (it all exists in FORTRAN, but...), so I make no promises as to how far it will go. As I'm still a Python newbie, I don't expect to have anything fit for public consumption for some months yet, but I thought I'd let you know it's underway (barely!). -Tom Loredo _____________________________________________________ AstroPy mailing list - astropy at stsci.edu http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/ From Barrett at stsci.edu Tue Aug 24 14:59:06 1999 From: Barrett at stsci.edu (Paul Barrett) Date: Tue, 24 Aug 1999 14:59:06 -0400 (EDT) Subject: [AstroPy] Module suggestions? In-Reply-To: <37C2DC7D.8CE47360@hq.eso.org> References: <37C2DC7D.8CE47360@hq.eso.org> Message-ID: <14274.58481.277447.823115@nem-srvr.stsci.edu> ptak at snooker.phys.cmu.edu wrote: > > I would like to see a pure-Python FITS header keyword reading module. The > last time I checked, PyFITS used some C code. Some problems I am > interested in only require the values of some keywords (like the total > number of counts, often in TOTCTS), and full-fledged fits i/o is overkill. > Andy, I am rather surprised by this request, since most of PyFITS is _written_ in Python, namely the Header class. The C code that is associated with PyFITS is for the data part of the header-data unit, namely the Numeric module for images and the Record module for binary tables. As far as I am aware, there is no efficient and easy way to access binary table data using a pure-Python implementation. I hope to have a new and more useable version of PyFITS out before the ADASS meeting. This version uses lazy instantiation of the data attribute, that is, initially, it only reads the header, skipping the data. Only when data are requested, are they read. In any case, you may want to go back to the PyFITS module and extract that Python code which you find useful, for example the Header class. Though I hate to admit it, this code has not changed much for more than a year. It's the rest of the code that I've been struggling with, mainly because of reasons of efficiency. Norbert Pirzkal writes: > > I have a working read/write pure python header access code if you are > interested. I am planning to release a pure python version that handles > fits images within a few weeks. The header stuff is running already and > is being tested right now. Let me know if you want to have an early look > at what I have... > Norbert, I'd be interested to see your code. I'm hoping we can manage to keep some of our code in the two implementations the same. If not, then maybe I can steal some of your good ideas. -- Paul _____________________________________________________ AstroPy mailing list - astropy at stsci.edu http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/