<br><br><div class="gmail_quote">On Mon, Apr 6, 2009 at 20:46, Cohen-Tanugi Johann <span dir="ltr">&lt;<a href="mailto:cohen@lpta.in2p3.fr">cohen@lpta.in2p3.fr</a>&gt;</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&#39;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&#39;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">&gt;&gt;&gt;</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">&gt;&gt;&gt;</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">&gt;&gt;&gt;</span><span class="pln"> </span><span class="kwd">import</span><span class="pln"> pyfits<br></span><span class="pun">&gt;&gt;&gt;</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">&#39;test.fits&#39;</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">&gt;&gt;&gt;</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>
&gt;&gt; The question is whether ds9 is a module that can be used within a Python<br>
&gt;&gt; program? I really do not know, but indications are that it is not.<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; ds9 is not a Python module, it&#39;s a stand-alone program that you run from<br>
&gt; Unix.  However, there is an interface for displaying images to it, and<br>
&gt; the Python module numdisplay uses that interface.  The advantage of ds9<br>
&gt; is that it is so powerful.  imshow in matplotlib is pretty good, though,<br>
&gt; and you may want to use matplotlib anyway for plotting.<br>
&gt;<br>
&gt; Phil<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; AstroPy mailing list<br>
&gt; <a href="mailto:AstroPy@scipy.org">AstroPy@scipy.org</a><br>
&gt; <a href="http://mail.scipy.org/mailman/listinfo/astropy" target="_blank">http://mail.scipy.org/mailman/listinfo/astropy</a><br>
&gt;<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>