<br><br><div class="gmail_quote">On Mon, Apr 6, 2009 at 20:46, Cohen-Tanugi Johann <span dir="ltr"><<a href="mailto:cohen@lpta.in2p3.fr">cohen@lpta.in2p3.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
the main thing missing when using matplotlib is the correct use of<br>
astronomical coordinate information, and that is a pretty big plus of ds9.<br>
<font color="#888888">J<br>
</font><div><div></div><div class="h5"></div></div></blockquote><div><br>I'm not sure if I posted this reply already to this thread, or if it was the same topic on a different thread:<br><br>You can also try pysao to comminicate with ds9, the interface is nicer (although the implementation might not, I don't know). <br>
<a href="http://code.google.com/p/python-sao/">http://code.google.com/p/python-sao/</a><br><pre class="prettyprint"><span class="pun">>>></span><span class="pln"> </span><span class="kwd">import</span><span class="pln"> pysao<br>
</span><span class="com"># run new instance of ds9</span><span class="pln"><br></span><span class="pun">>>></span><span class="pln"> ds9 </span><span class="pun">=</span><span class="pln"> pysao</span><span class="pun">.</span><span class="pln">ds9</span><span class="pun">()</span><span class="pln"></span><span class="pln"><br>
</span><span class="pun">>>></span><span class="pln"> </span><span class="kwd">import</span><span class="pln"> pyfits<br></span><span class="pun">>>></span><span class="pln"> f </span><span class="pun">=</span><span class="pln"> pyfits</span><span class="pun">.</span><span class="pln">open</span><span class="pun">(</span><span class="str">'test.fits'</span><span class="pun">)</span><span class="pln"><br>
</span><span class="com"># display first extension of fits file</span><span class="pln"><br></span><span class="pun">>>></span><span class="pln"> ds9</span><span class="pun">.</span><span class="pln">view</span><span class="pun">(</span><span class="pln">f</span><span class="pun">[</span><span class="lit">0</span><span class="pun">])</span><span class="pln"><br>
</span></pre><br><br>Note also, that there is the kapteyn package which uses matplotlib (pylab) to display the data from fits files according to the wcs (World Coordinate System) contained in most fits files in the correct way. <a href="http://www.astro.rug.nl/software/kapteyn/">http://www.astro.rug.nl/software/kapteyn/</a><br>
<br>Cheers, <br>Stefan<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="h5"><br>
Phil Hodge wrote:<br>
>> The question is whether ds9 is a module that can be used within a Python<br>
>> program? I really do not know, but indications are that it is not.<br>
>><br>
><br>
><br>
> ds9 is not a Python module, it's a stand-alone program that you run from<br>
> Unix.  However, there is an interface for displaying images to it, and<br>
> the Python module numdisplay uses that interface.  The advantage of ds9<br>
> is that it is so powerful.  imshow in matplotlib is pretty good, though,<br>
> and you may want to use matplotlib anyway for plotting.<br>
><br>
> Phil<br>
><br>
> _______________________________________________<br>
> AstroPy mailing list<br>
> <a href="mailto:AstroPy@scipy.org">AstroPy@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/astropy" target="_blank">http://mail.scipy.org/mailman/listinfo/astropy</a><br>
><br>
_______________________________________________<br>
AstroPy mailing list<br>
<a href="mailto:AstroPy@scipy.org">AstroPy@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/astropy" target="_blank">http://mail.scipy.org/mailman/listinfo/astropy</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Institut für Astronomie und Astrophysik <br>Eberhard Karls Universität Tübingen<br>Sand 1   -  D-72076 Tübingen<br><a href="mailto:schwarz@astro.uni-tuebingen.de">schwarz@astro.uni-tuebingen.de</a><br>
<a href="mailto:stefan.schwarzburg@googlemail.com">stefan.schwarzburg@googlemail.com</a><br><br>Tel.: 07071/29-78605<br>-----------------------------------------------------------------------<br>