<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Le 16/11/2016 à 16:55, Marcio Melendez
a écrit :<br>
</div>
<blockquote
cite="mid:CAJ0xgiQKeSOG0_BLoxxop83cxQQmoJTSZ=jkZ1kYhBAEJSvsvA@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Simon,
<div>It looks like a very nice software, thanks for sharing. I
started to play around with it but a simple read an image and
then rotate, got me an error (see below). I need to open a
ticket for this issue in the MPDAF webpage, however it seems
very inconvenient as you need to create an account with CRAL
first. <br>
</div>
</div>
</blockquote>
<br>
Yes, sorry about that .. <br>
But we also have a mailing list, I can transfer you email there to
avoid spamming Astropy's list, and try to find the bug (we use
mostly MUSE and HST data so it is possible that some wcs stuff is
not well handled for your data).<br>
<br>
Simon<br>
<br>
<br>
<br>
<blockquote
cite="mid:CAJ0xgiQKeSOG0_BLoxxop83cxQQmoJTSZ=jkZ1kYhBAEJSvsvA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<p class="gmail-p1"><span class="gmail-s1"> File
"<stdin>", line 1, in <module></span></p>
<p class="gmail-p1"><span class="gmail-s1"> File
"/Users/<username>/anaconda/lib/python3.4/site-packages/mpdaf/obj/image.py",
line 1272, in rotate</span></p>
<p class="gmail-p1"><span class="gmail-s1"> cutoff=cutoff)</span></p>
<p class="gmail-p1"><span class="gmail-s1"> File
"/Users/<username>/anaconda/lib/python3.4/site-packages/mpdaf/obj/image.py",
line 1161, in _rotate</span></p>
<p class="gmail-p1"><span class="gmail-s1">
self.wcs.set_cd(newcd)</span></p>
<p class="gmail-p1"><span class="gmail-s1"> File
"/Users/<username>/anaconda/lib/python3.4/site-packages/mpdaf/obj/coords.py",
line 1303, in set_cd</span></p>
<p class="gmail-p1"><span class="gmail-s1">
self.wcs.wcs.crota = image_angle_from_cd(cd, u.deg)</span></p>
<p class="gmail-p1">
</p>
<p class="gmail-p1"><span class="gmail-s1">ValueError: object
of too small depth for desired array</span></p>
</div>
<div><br>
</div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Nov 16, 2016 at 9:13 AM,
Simon Conseil <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:simon@sconseil.fr" target="_blank">simon@sconseil.fr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hi all,</p>
<p>We have some code to rotate an image with a given
angle:<br>
</p>
<p><a moz-do-not-send="true"
class="gmail-m_-8868663239113279397moz-txt-link-freetext"
href="http://mpdaf.readthedocs.io/en/latest/image.html#image-geometrical-manipulation"
target="_blank">http://mpdaf.readthedocs.io/<wbr>en/latest/image.html#image-<wbr>geometrical-manipulation</a></p>
<p><a moz-do-not-send="true"
class="gmail-m_-8868663239113279397moz-txt-link-freetext"
href="http://mpdaf.readthedocs.io/en/latest/api/mpdaf.obj.Image.html#mpdaf.obj.Image.rotate"
target="_blank">http://mpdaf.readthedocs.io/<wbr>en/latest/api/mpdaf.obj.Image.<wbr>html#mpdaf.obj.Image.rotate</a><br>
</p>
<p>It uses scipy.ndimage.affine_<wbr>transform, and
should give the same result as reproject, which uses
scipy.ndimage.map_coordinates (both rely on
ndimage.geometric_transform). It would be interesting
to compare ! <br>
</p>
<p>Cheers,</p>
<p>Simon</p>
<div>
<div class="gmail-h5">
<p><br>
</p>
<br>
<div
class="gmail-m_-8868663239113279397moz-cite-prefix">Le
16/11/2016 à 13:46, Brigitta Sipocz a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr"><br>
<div class="gmail_quote">
<div dir="ltr">
<div>
<div>
<div>Hi Marcio,<br>
<br>
</div>
While it doesn't do exactly what you ask
for, you may want to check out the
affiliated package reproject (<a
moz-do-not-send="true"
href="http://reproject.readthedocs.io/en/stable/"
target="_blank">http://reproject.readthedocs.<wbr>io/en/stable/</a>).
It does flux conserving image
reprojection:<br>
<br>
<a moz-do-not-send="true"
href="http://reproject.readthedocs.io/en/stable/"
target="_blank">http://reproject.readthedocs.i<wbr>o/en/stable/</a><br>
<br>
</div>
Cheers,<br>
</div>
Brigitta<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 15 November 2016
at 14:26, Marcio Melendez <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:marcio.melendez@gmail.com"
target="_blank">marcio.melendez@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div class="gmail_extra">Hi all, </div>
<div class="gmail_extra">Is there a
similar function to IDL's HROT in
python, e.g., a function to rotate
an image and create a new FITS
header with updated astrometry. </div>
<div class="gmail_extra"><br>
Thanks!<span
class="gmail-m_-8868663239113279397m_-719244551868932023HOEnZb"><font
color="#888888"><br clear="all">
<div><br>
</div>
-- <br>
<div
class="gmail-m_-8868663239113279397m_-719244551868932023m_4168192641504486074gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Marcio B.
Melendez, Ph.D</div>
<div><span
style="font-size:12.8px">JWST
ISIM Optics
Support
Scientist</span><br>
<div
style="font-size:12.8px"><span
style="color:rgb(0,0,0);font-family:calibri,sans-serif;font-size:15px">KBRw</span><span
style="font-size:12.8px">yle </span><span style="font-size:12.8px">Science,
Technology and
Engineering
Group</span></div>
<div
style="font-size:12.8px"><span
style="font-size:12.8px">NASA Goddard Space Flight Center Greenbelt,
MD 20771 </span></div>
<div
style="font-size:12.8px"><span
style="font-size:12.8px">Bldg. 29 Rm. T29-10, phone: <a
moz-do-not-send="true"
href="tel:301-286-8517" value="+13012868517" target="_blank">301-286-8517</a></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</font></span></div>
</div>
<br>
______________________________<wbr>_________________<br>
AstroPy mailing list<br>
<a moz-do-not-send="true"
href="mailto:AstroPy@scipy.org"
target="_blank">AstroPy@scipy.org</a><br>
<a moz-do-not-send="true"
href="https://mail.scipy.org/mailman/listinfo/astropy"
rel="noreferrer" target="_blank">https://mail.scipy.org/mailman<wbr>/listinfo/astropy</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
</div>
<br>
</div>
<br>
<fieldset
class="gmail-m_-8868663239113279397mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
AstroPy mailing list
<a moz-do-not-send="true" class="gmail-m_-8868663239113279397moz-txt-link-abbreviated" href="mailto:AstroPy@scipy.org" target="_blank">AstroPy@scipy.org</a>
<a moz-do-not-send="true" class="gmail-m_-8868663239113279397moz-txt-link-freetext" href="https://mail.scipy.org/mailman/listinfo/astropy" target="_blank">https://mail.scipy.org/<wbr>mailman/listinfo/astropy</a>
</pre>
</blockquote>
</div></div></div>
______________________________<wbr>_________________
AstroPy mailing list
<a moz-do-not-send="true" href="mailto:AstroPy@scipy.org">AstroPy@scipy.org</a>
<a moz-do-not-send="true" href="https://mail.scipy.org/mailman/listinfo/astropy" rel="noreferrer" target="_blank">https://mail.scipy.org/<wbr>mailman/listinfo/astropy</a>
</blockquote></div>
<div>
</div>--
<div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Marcio B. Melendez, Ph.D</div>
<div><span style="font-size:12.8px">JWST ISIM Optics Support Scientist</span>
<div style="font-size:12.8px"><span style="color:rgb(0,0,0);font-family:calibri,sans-serif;font-size:15px">KBRw</span><span style="font-size:12.8px">yle </span><span style="font-size:12.8px">Science, Technology and Engineering Group</span></div><div style="font-size:12.8px"><span style="font-size:12.8px">NASA Goddard Space Flight Center Greenbelt, MD 20771 </span></div><div style="font-size:12.8px"><span style="font-size:12.8px">Bldg. 29 Rm. T29-10, phone: 301-286-8517</span></div></div></div></div></div></div></div></div>
</div></div>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre wrap="">_______________________________________________
AstroPy mailing list
<a class="moz-txt-link-abbreviated" href="mailto:AstroPy@scipy.org">AstroPy@scipy.org</a>
<a class="moz-txt-link-freetext" href="https://mail.scipy.org/mailman/listinfo/astropy">https://mail.scipy.org/mailman/listinfo/astropy</a>
</pre>
</blockquote>
</body></html>