<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Greetings <br>
<br>
SWIG will indeed do a job for you. However, it will simply create
wrappers of the C code for Python. Note that the C code itself is a
conversion of the original FORTRAN code in which SPICE was designed.
Hence, you are essentially calling SPICE from PYTHON using Fortran
conventions. <br>
<br>
I am doing much the same in JAVA, but instead of simply writing
wrappers, I am building proper JAVA calls, using object orientated
conventions. For example, SPICE errors are raised as JAVA Exceptions.
It takes more time, but then I don't need all the SPICE function calls
! <br>
<br>
It should be possible to do a simpler job for PYTHON. <br>
<br>
<br>
Now waiting for a more powerful CPU from Father Christmas !<br>
<br>
Adrian <br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:spice_discussion-request@naif.jpl.nasa.gov">spice_discussion-request@naif.jpl.nasa.gov</a> wrote:
<blockquote cite="mid:200912161820.nBGIKMB9014651@naif.jpl.nasa.gov"
 type="cite">
  <pre wrap="">Send Spice_discussion mailing list submissions to
        <a class="moz-txt-link-abbreviated" href="mailto:spice_discussion@naif.jpl.nasa.gov">spice_discussion@naif.jpl.nasa.gov</a>

To subscribe or unsubscribe via the World Wide Web, visit
        <a class="moz-txt-link-freetext" href="http://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion">http://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion</a>
or, via email, send a message with subject or body 'help' to
        <a class="moz-txt-link-abbreviated" href="mailto:spice_discussion-request@naif.jpl.nasa.gov">spice_discussion-request@naif.jpl.nasa.gov</a>

You can reach the person managing the list at
        <a class="moz-txt-link-abbreviated" href="mailto:spice_discussion-owner@naif.jpl.nasa.gov">spice_discussion-owner@naif.jpl.nasa.gov</a>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Spice_discussion digest..."


Today's Topics:

   1. Python Interface (K.-Michael Aye)
   2. Re: Python Interface (Bridgman, William T.)
   3. Re: Python Interface (Acton, Charles H (343N))
   4. Re: Python Interface (Bridgman, William T.)
   5. RE: Python Interface (Reid, Michael R.)


----------------------------------------------------------------------

Message: 1
Date: Wed, 16 Dec 2009 14:05:11 +0100
From: "K.-Michael Aye" <a class="moz-txt-link-rfc2396E" href="mailto:kmichael.aye@googlemail.com">&lt;kmichael.aye@googlemail.com&gt;</a>
Subject: [Spice_discussion] Python Interface
To: <a class="moz-txt-link-abbreviated" href="mailto:spice_discussion@naif.jpl.nasa.gov">spice_discussion@naif.jpl.nasa.gov</a>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:2BC0B9AF-D78D-49F9-8380-06676A6EC91F@googlemail.com">&lt;2BC0B9AF-D78D-49F9-8380-06676A6EC91F@googlemail.com&gt;</a>
Content-Type: text/plain; charset=windows-1252

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 (<a class="moz-txt-link-freetext" href="http://www.scipy.org/">http://www.scipy.org/</a>) bring fast-processable multi-dimensional data arrays (numpy) and a huge set of scientific libraries (scipy) for
        &#8226; Astronomy
        &#8226; Artificial intelligence &amp; machine learning
        &#8226; Bayesian Statistics
        &#8226; Biology (including Neuroscience)
        &#8226; Dynamical systems
        &#8226; Economics and Econometrics
        &#8226; Electromagnetics
        &#8226; Geosciences
        &#8226; Molecular modeling
        &#8226; Signal processing
        &#8226; 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 (<a class="moz-txt-link-freetext" href="http://vpython.org/">http://vpython.org/</a>) 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 data.

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!
Michael

PS.:
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.)
 




------------------------------

Message: 2
Date: Wed, 16 Dec 2009 11:26:39 -0500
From: "Bridgman, William T." <a class="moz-txt-link-rfc2396E" href="mailto:William.T.Bridgman@nasa.gov">&lt;William.T.Bridgman@nasa.gov&gt;</a>
Subject: Re: [Spice_discussion] Python Interface
To: <a class="moz-txt-link-rfc2396E" href="mailto:spice_discussion@naif.jpl.nasa.gov">&lt;spice_discussion@naif.jpl.nasa.gov&gt;</a>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:7C73B940-EE49-4418-9EC4-7F3FB86E9D70@nasa.gov">&lt;7C73B940-EE49-4418-9EC4-7F3FB86E9D70@nasa.gov&gt;</a>
Content-Type: text/plain; charset="WINDOWS-1252"; format=flowed;
        delsp=yes

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 &amp; RenderMan  
(see <a class="moz-txt-link-freetext" href="http://svs.gsfc.nasa.gov/Gallery/NASAsHeliophysicsGallery.html">http://svs.gsfc.nasa.gov/Gallery/NASAsHeliophysicsGallery.html</a>, <a class="moz-txt-link-freetext" href="http://cgkit.sourceforge.net/users.html">http://cgkit.sourceforge.net/users.html</a>) 
.

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?

Tom


On Dec 16, 2009, at 8:05 AM, K.-Michael Aye wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">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 (<a class="moz-txt-link-freetext" href="http://www.scipy.org/">http://www.scipy.org/</a>) bring fast- 
processable multi-dimensional data arrays (numpy) and a huge set of  
scientific libraries (scipy) for
        &#8226; Astronomy
        &#8226; Artificial intelligence &amp; machine learning
        &#8226; Bayesian Statistics
        &#8226; Biology (including Neuroscience)
        &#8226; Dynamical systems
        &#8226; Economics and Econometrics
        &#8226; Electromagnetics
        &#8226; Geosciences
        &#8226; Molecular modeling
        &#8226; Signal processing
        &#8226; 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 (<a class="moz-txt-link-freetext" href="http://vpython.org/">http://vpython.org/</a> 
) 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  
data.

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!
Michael

PS.:
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
<a class="moz-txt-link-abbreviated" href="mailto:Spice_discussion@naif.jpl.nasa.gov">Spice_discussion@naif.jpl.nasa.gov</a>
<a class="moz-txt-link-freetext" href="http://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion">http://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->
--
Dr. William T."Tom" Bridgman               Scientific Visualization  
Studio
Global Science &amp; Technology, Inc.          NASA/Goddard Space Flight  
Center
Email: <a class="moz-txt-link-abbreviated" href="mailto:William.T.Bridgman@nasa.gov">William.T.Bridgman@nasa.gov</a>         Code 610.3
Phone: 301-286-1346                        Greenbelt, MD 20771
FAX:   301-286-1634                        <a class="moz-txt-link-freetext" href="http://svs.gsfc.nasa.gov/">http://svs.gsfc.nasa.gov/</a>







------------------------------

Message: 3
Date: Wed, 16 Dec 2009 08:47:45 -0800
From: "Acton, Charles H (343N)" <a class="moz-txt-link-rfc2396E" href="mailto:charles.h.acton@jpl.nasa.gov">&lt;charles.h.acton@jpl.nasa.gov&gt;</a>
Subject: Re: [Spice_discussion] Python Interface
To: spice_discussion <a class="moz-txt-link-rfc2396E" href="mailto:spice_discussion@naif.jpl.nasa.gov">&lt;spice_discussion@naif.jpl.nasa.gov&gt;</a>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:C74E4F31.174F7%Charles.H.Acton@jpl.nasa.gov">&lt;C74E4F31.174F7%Charles.H.Acton@jpl.nasa.gov&gt;</a>
Content-Type: text/plain; charset="iso-8859-1"

On 12/16/09 5:05 AM, "K.-Michael Aye" <a class="moz-txt-link-rfc2396E" href="mailto:kmichael.aye@googlemail.com">&lt;kmichael.aye@googlemail.com&gt;</a> 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! ;)


Dear SPICE Users--

Based on user requests, development of a Python interface to SPICE has been on the NAIF work list for some time. And funding specifically for this, as well as a JNI interface to SPICE, has been provided by NASA's Advanced Multi-Mission Operations System (AMMOS) program office.

NAIF's decision to build the JNI interface first, followed by the Python interface, was based on the relative number of requests for both of these capabilities.

The Alpha-test release of a very substantial JNI interface will become available to interested users in January. (If you'd like to participate in this testing and have not already advised NAIF of this, please do so now.)

While a good deal of work has already been accomplished on the Python interface, the continuation of this work will be limited in the near future because of more pressing demands on NAIF:  completion of an extension to the shape model subsystem that will add both a tessellated shape model and a digital elevation model capability; teaching two SPICE classes; and more.

There is a great deal of backlogged work awaiting the attention of NAIF; unfortunately the small size of the NAIF Team makes progress slow.

The NAIF Team is pleased there are many folks who have found SPICE helpful, and we are always happy to hear comments that can help guide our future work.

Charles Acton



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <a class="moz-txt-link-freetext" href="http://naif.jpl.nasa.gov/pipermail/spice_discussion/attachments/20091216/8039f3c9/attachment-0001.html">http://naif.jpl.nasa.gov/pipermail/spice_discussion/attachments/20091216/8039f3c9/attachment-0001.html</a>

------------------------------

Message: 4
Date: Wed, 16 Dec 2009 11:52:11 -0500
From: "Bridgman, William T." <a class="moz-txt-link-rfc2396E" href="mailto:William.T.Bridgman@nasa.gov">&lt;William.T.Bridgman@nasa.gov&gt;</a>
Subject: Re: [Spice_discussion] Python Interface
To: spice_discussion <a class="moz-txt-link-rfc2396E" href="mailto:spice_discussion@naif.jpl.nasa.gov">&lt;spice_discussion@naif.jpl.nasa.gov&gt;</a>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:C360366D-7CA1-487E-AF89-B47D9BB754D4@nasa.gov">&lt;C360366D-7CA1-487E-AF89-B47D9BB754D4@nasa.gov&gt;</a>
Content-Type: text/plain; charset="WINDOWS-1252"; format=flowed;
        delsp=yes

Would it be worthwhile to make the python interface a open source  
project?

Tom
On Dec 16, 2009, at 11:47 AM, Acton, Charles H (343N) wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">On 12/16/09 5:05 AM, "K.-Michael Aye" <a class="moz-txt-link-rfc2396E" href="mailto:kmichael.aye@googlemail.com">&lt;kmichael.aye@googlemail.com&gt;</a>  
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! ;)


Dear SPICE Users--

Based on user requests, development of a Python interface to SPICE  
has been on the NAIF work list for some time. And funding  
specifically for this, as well as a JNI interface to SPICE, has been  
provided by NASA&#8217;s Advanced Multi-Mission Operations System (AMMOS)  
program office.

NAIF&#8217;s decision to build the JNI interface first, followed by the  
Python interface, was based on the relative number of requests for  
both of these capabilities.

The Alpha-test release of a very substantial JNI interface will  
become available to interested users in January. (If you&#8217;d like to  
participate in this testing and have not already advised NAIF of  
this, please do so now.)

While a good deal of work has already been accomplished on the  
Python interface, the continuation of this work will be limited in  
the near future because of more pressing demands on NAIF:   
completion of an extension to the shape model subsystem that will  
add both a tessellated shape model and a digital elevation model  
capability; teaching two SPICE classes; and more.

There is a great deal of backlogged work awaiting the attention of  
NAIF; unfortunately the small size of the NAIF Team makes progress  
slow.

The NAIF Team is pleased there are many folks who have found SPICE  
helpful, and we are always happy to hear comments that can help  
guide our future work.

Charles Acton



&lt;ATT00001.txt&gt;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
--
Dr. William T."Tom" Bridgman               Scientific Visualization  
Studio
Global Science &amp; Technology, Inc.          NASA/Goddard Space Flight  
Center
Email: <a class="moz-txt-link-abbreviated" href="mailto:William.T.Bridgman@nasa.gov">William.T.Bridgman@nasa.gov</a>         Code 610.3
Phone: 301-286-1346                        Greenbelt, MD 20771
FAX:   301-286-1634                        <a class="moz-txt-link-freetext" href="http://svs.gsfc.nasa.gov/">http://svs.gsfc.nasa.gov/</a>







------------------------------

Message: 5
Date: Wed, 16 Dec 2009 13:22:49 -0500
From: "Reid, Michael R." <a class="moz-txt-link-rfc2396E" href="mailto:Mike.Reid@jhuapl.edu">&lt;Mike.Reid@jhuapl.edu&gt;</a>
Subject: RE: [Spice_discussion] Python Interface
To: <a class="moz-txt-link-rfc2396E" href="mailto:spice_discussion@naif.jpl.nasa.gov">"spice_discussion@naif.jpl.nasa.gov"</a>
        <a class="moz-txt-link-rfc2396E" href="mailto:spice_discussion@naif.jpl.nasa.gov">&lt;spice_discussion@naif.jpl.nasa.gov&gt;</a>
Message-ID:
        <a class="moz-txt-link-rfc2396E" href="mailto:329D879C76FDD04AAAE84BB1D89B397003725223D9@aplesfreedom.dom1.jhuapl.edu">&lt;329D879C76FDD04AAAE84BB1D89B397003725223D9@aplesfreedom.dom1.jhuapl.edu&gt;</a>
        
Content-Type: text/plain; charset="us-ascii"

Hi Michael,

I agree with you. Python is an excellent language for many of the kinds of applications in which one might use SPICE. I use Python extensively.

It is possible to import cspice functions into Python programs using SWIG (<a class="moz-txt-link-freetext" href="http://www.swig.org/">http://www.swig.org/</a>) and the Python distutils. Basically, you bind the SPICE functions into a shared object and effectively extend the language. I've done it successfully with individual SPICE functions on a Linux system. I haven't tried it on other platforms.

A true Python interface to SPICE as you suggest would be far better, but SWIG does work. Since NAIF apparently doesn't have the funding to create a true Python interface right now, SWIG might provide you with a workable, albeit somewhat cumbersome, way to use SPICE from within Python.

Good luck with this,

Mike Reid

-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:spice_discussion-bounces@naif.jpl.nasa.gov">spice_discussion-bounces@naif.jpl.nasa.gov</a> [<a class="moz-txt-link-freetext" href="mailto:spice_discussion-bounces@naif.jpl.nasa.gov">mailto:spice_discussion-bounces@naif.jpl.nasa.gov</a>] On Behalf Of K.-Michael Aye
Sent: Wednesday, December 16, 2009 8:05 AM
To: <a class="moz-txt-link-abbreviated" href="mailto:spice_discussion@naif.jpl.nasa.gov">spice_discussion@naif.jpl.nasa.gov</a>
Subject: [Spice_discussion] Python Interface

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 (<a class="moz-txt-link-freetext" href="http://www.scipy.org/">http://www.scipy.org/</a>) bring fast-processable multi-dimensional data arrays (numpy) and a huge set of scientific libraries (scipy) for
        * Astronomy
        * Artificial intelligence &amp; 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 (<a class="moz-txt-link-freetext" href="http://vpython.org/">http://vpython.org/</a>) 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 data.

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!
Michael

PS.:
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
<a class="moz-txt-link-abbreviated" href="mailto:Spice_discussion@naif.jpl.nasa.gov">Spice_discussion@naif.jpl.nasa.gov</a>
<a class="moz-txt-link-freetext" href="http://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion">http://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion</a>



------------------------------

_______________________________________________
Spice_discussion mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spice_discussion@naif.jpl.nasa.gov">Spice_discussion@naif.jpl.nasa.gov</a>
<a class="moz-txt-link-freetext" href="http://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion">http://naif.jpl.nasa.gov/mailman/listinfo/spice_discussion</a>


End of Spice_discussion Digest, Vol 39, Issue 2
***********************************************
  </pre>
</blockquote>
</body>
</html>