<div dir="ltr">Yes, that would be great. Once there is a solution to the problem, I can post an update with the solution so other Astropy users can benefit. </div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 16, 2016 at 11:16 AM, Simon Conseil <span dir="ltr"><<a href="mailto:simon@sconseil.fr" target="_blank">simon@sconseil.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span class="">
    <p><br>
    </p>
    <br>
    <div class="m_808210594898354505moz-cite-prefix">Le 16/11/2016 à 16:55, Marcio Melendez
      a écrit :<br>
    </div>
    <blockquote 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></span>
    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).<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Simon</font></span><div><div class="h5"><br>
    <br>
    <br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <p class="m_808210594898354505gmail-p1"><span class="m_808210594898354505gmail-s1">  File
              "<stdin>", line 1, in <module></span></p>
          <p class="m_808210594898354505gmail-p1"><span class="m_808210594898354505gmail-s1">  File
"/Users/<username>/anaconda/<wbr>lib/python3.4/site-packages/<wbr>mpdaf/obj/image.py",
              line 1272, in rotate</span></p>
          <p class="m_808210594898354505gmail-p1"><span class="m_808210594898354505gmail-s1">    cutoff=cutoff)</span></p>
          <p class="m_808210594898354505gmail-p1"><span class="m_808210594898354505gmail-s1">  File
"/Users/<username>/anaconda/<wbr>lib/python3.4/site-packages/<wbr>mpdaf/obj/image.py",
              line 1161, in _rotate</span></p>
          <p class="m_808210594898354505gmail-p1"><span class="m_808210594898354505gmail-s1">   
              self.wcs.set_cd(newcd)</span></p>
          <p class="m_808210594898354505gmail-p1"><span class="m_808210594898354505gmail-s1">  File
"/Users/<username>/anaconda/<wbr>lib/python3.4/site-packages/<wbr>mpdaf/obj/coords.py",
              line 1303, in set_cd</span></p>
          <p class="m_808210594898354505gmail-p1"><span class="m_808210594898354505gmail-s1">   
              self.wcs.wcs.crota = image_angle_from_cd(cd, u.deg)</span></p>
          <p class="m_808210594898354505gmail-p1">
          </p>
          <p class="m_808210594898354505gmail-p1"><span class="m_808210594898354505gmail-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 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 class="m_808210594898354505gmail-m_-8868663239113279397moz-txt-link-freetext" href="http://mpdaf.readthedocs.io/en/latest/image.html#image-geometrical-manipulation" target="_blank">http://mpdaf.readthedocs.io/en<wbr>/latest/image.html#image-geome<wbr>trical-manipulation</a></p>
                <p><a class="m_808210594898354505gmail-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/en<wbr>/latest/api/mpdaf.obj.Image.ht<wbr>ml#mpdaf.obj.Image.rotate</a><br>
                </p>
                <p>It uses scipy.ndimage.affine_transform<wbr>, 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="m_808210594898354505gmail-h5">
                    <p><br>
                    </p>
                    <br>
                    <div class="m_808210594898354505gmail-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 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 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 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="m_808210594898354505gmail-m_-8868663239113279397m_-719244551868932023HOEnZb"><font color="#888888"><br clear="all">
                                        <div><br>
                                        </div>
                                        -- <br>
                                        <div class="m_808210594898354505gmail-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 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 href="mailto:AstroPy@scipy.org" target="_blank">AstroPy@scipy.org</a><br>
                                <a 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="m_808210594898354505gmail-m_-8868663239113279397mimeAttachmentHeader"></fieldset>
                      <br>
                      <pre>______________________________<wbr>_________________
AstroPy mailing list
<a class="m_808210594898354505gmail-m_-8868663239113279397moz-txt-link-abbreviated" href="mailto:AstroPy@scipy.org" target="_blank">AstroPy@scipy.org</a>
<a class="m_808210594898354505gmail-m_-8868663239113279397moz-txt-link-freetext" href="https://mail.scipy.org/mailman/listinfo/astropy" target="_blank">https://mail.scipy.org/mailman<wbr>/listinfo/astropy</a>
</pre>
    </blockquote>
    

  </div></div></div>


______________________________<wbr>_________________

AstroPy mailing list

<a href="mailto:AstroPy@scipy.org" target="_blank">AstroPy@scipy.org</a>

<a href="https://mail.scipy.org/mailman/listinfo/astropy" rel="noreferrer" target="_blank">https://mail.scipy.org/mailman<wbr>/listinfo/astropy</a>


</blockquote></div>

<div>
</div>-- 
<div class="m_808210594898354505gmail_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: <a href="tel:301-286-8517" value="+13012868517" target="_blank">301-286-8517</a></span></div></div></div></div></div></div></div></div>
</div></div>


<fieldset class="m_808210594898354505mimeAttachmentHeader"></fieldset>
<pre>______________________________<wbr>_________________
AstroPy mailing list
<a class="m_808210594898354505moz-txt-link-abbreviated" href="mailto:AstroPy@scipy.org" target="_blank">AstroPy@scipy.org</a>
<a class="m_808210594898354505moz-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><br>______________________________<wbr>_________________<br>
AstroPy mailing list<br>
<a href="mailto:AstroPy@scipy.org">AstroPy@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/astropy" rel="noreferrer" target="_blank">https://mail.scipy.org/<wbr>mailman/listinfo/astropy</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="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.8000001907349px">JWST ISIM Optics Support Scientist</span><br><div style="font-size:12.8000001907349px"><span style="color:rgb(0,0,0);font-family:Calibri,sans-serif;font-size:15px">KBRw</span><span style="font-size:12.8000001907349px">yle </span><span style="font-size:12.8000001907349px">Science, Technology and Engineering Group</span></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">NASA Goddard Space Flight Center  Greenbelt, MD  20771  </span></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Bldg. 29 Rm. T29-10, phone: 301-286-8517</span></div></div></div></div></div></div></div></div>
</div>