[Spice_discussion] Python Interface
Bridgman, William T.
William.T.Bridgman at nasa.gov
Wed Dec 16 08:26:39 PST 2009
I have have been attempting to build a lightweight Python wrapper for
SPICE using SWIG.
I've got an interface file that seems to work but the compiler
settings have been elusive for building under MacOS X 10.5. I had one
complete build that segfaults when I attempt to load the module.
I too am using this with a rendering system, using cgkit & RenderMan
(see http://svs.gsfc.nasa.gov/Gallery/NASAsHeliophysicsGallery.html, http://cgkit.sourceforge.net/users.html)
For other packages (CCMCs Derived, Tachyon renderer, etc.), I've
usually generated a minimal interface and then written a higher-
level .py file to design a more friendly interface. I suspect one can
eventually integrate that into the .i file to build it directly in SWIG.
If anyone on the list is a little more familiar with SWIG and/or
compiler options, we might be able to collaborate on getting at least
a minimal wrapper to work. Would that be useful?
On Dec 16, 2009, at 8:05 AM, K.-Michael Aye wrote:
> Dear all,
> I would like to renew my call for a Python interface for SPICE, and
> I think, this time, I even have very good arguments! ;)
> The available software libraries for doing scientific data analysis
> with Python are quite complete, I would say.
> The libraries numpy and scipy (http://www.scipy.org/) bring fast-
> processable multi-dimensional data arrays (numpy) and a huge set of
> scientific libraries (scipy) for
> • Astronomy
> • Artificial intelligence & machine learning
> • Bayesian Statistics
> • Biology (including Neuroscience)
> • Dynamical systems
> • Economics and Econometrics
> • Electromagnetics
> • Geosciences
> • Molecular modeling
> • Signal processing
> • Symbolic math, number theory, etc.
> Via the GDAL library (a translator library for raster geospatial
> data formats), I have access to basically all data formats that can
> be worked with in a GIS-way, e.g. currently I am working with
> gigabyte-sized HiRISE data cubes, that have been produced with the
> ISIS environment.
> Additionally, the super-easy to use Visual Python library (http://vpython.org/
> ) makes it very easy, for example, to visualize the progress of a
> simulation environment, or to design a maybe complex geological (or
> optical) situation in a planetary observation, that then can be
> looked at, interactively, from all sides to understand the available
> So, with all these free and openly available tools to work with
> Python on solar system science data, there is now only one little,
> but important thing missing, and that is SPICE.
> Imagine how easy it would be, to render 3-D results out of SPICE
> into an interactive controllable 3-D scene with VPython? Any complex
> set of reference systems of scientific instruments could be built
> into VPython to help for operation and observation planning.
> Additionally, the combinatorial ways of GIS processing make this way
> of planetary data processing increasingly popular. The addition of
> SPICE calculations as another dimension into a GIS data cube would
> only benefit these kind of analyses.
> I don't have anything against Java personally, but I strongly doubt,
> that it has such a good position in terms of what SPICE is made for:
> "to assist in planning and interpreting scientific observations from
> space-based instruments."
> Therefore, I quite don't see, how it makes sense to give the same
> amount of attention to a Java and a Python interface to SPICE by an
> understaffed NAIF team.
> What's your and the readers' opinion, don't I sound convincing? ;)
> Best regards, happy holidays and a happy new year!
> I was shocked, by the way, by Charles' message that his funding was
> cut or not extended. Charles, I don't know if that would help you,
> but maybe I can make some noise in the European labs about your
> situation? Maybe we could put together a letter of appreciation of
> the European planetary scientists working with SPICE? Let me know,
> if you would appreciate these kind of activities or not.)
> Spice_discussion mailing list
> Spice_discussion at naif.jpl.nasa.gov
Dr. William T."Tom" Bridgman Scientific Visualization
Global Science & Technology, Inc. NASA/Goddard Space Flight
Email: William.T.Bridgman at nasa.gov Code 610.3
Phone: 301-286-1346 Greenbelt, MD 20771
FAX: 301-286-1634 http://svs.gsfc.nasa.gov/
More information about the Spice_discussion