[AstroPy] Help needed - Pix2Sky error

Christian Johnson arcjohns at ucsc.edu
Thu Sep 10 14:44:10 EDT 2015


Nadia,

Thanks for the reply! Unfortunately I get the same error with your
syntax (AttributeError:
'module' object has no attribute 'Pix2Sky_AIT'). I believe my
projections.py file is out of date- there's no AIT class defined in
it, when it should look like this (
https://github.com/astropy/astropy/blob/master/astropy/modeling/projections.py
). I'm using astropy version 1.04 which I believe is the current version,
so I'm confused about why I don't have the updated code?

Thanks,
Christian

On Thu, Sep 10, 2015 at 11:37 AM, Nadezhda Dencheva <dencheva at stsci.edu>
wrote:

> Hi Christian,
>
> It' s best to import models like this:
>
> >>> from astropy.modeling import  models
> >>> ait = models.Pix2Sky_AIT()
> >>> ait(1, 2)
> (1.0004603647362484, 2.000082499873663)
> >>> ait.inverse(1.0004603647362484, 2.000082499873663)
> (1.0, 2.0000000000000004)
>
> Nadia
>
> ------------------------------
> *From:* astropy-bounces at scipy.org [astropy-bounces at scipy.org] on behalf
> of Christian Johnson [arcjohns at ucsc.edu]
> *Sent:* Thursday, September 10, 2015 2:05 PM
> *To:* astropy at scipy.org
> *Subject:* [AstroPy] Help needed - Pix2Sky error
>
> Hi all,
>
> (if this is the wrong list to use for questions like this, please let me
> know!)
>
> I'm attempting to use astropy to get data out of a FITS file in the Aitoff
> projection, and was trying to use the
> astropy.modeling.projections.Pix2Sky_AIT class (that I found here:
> http://astropy.readthedocs.org/en/latest/modeling/index.html). However,
> when I try to use it, I get an error that there is no module of that name ("AttributeError:
> 'module' object has no attribute 'Pix2Sky_AIT'"). I can successfully import
> astropy.modeling.projections.Projection or astropy.modeling.projections.Zenithal
> or a few others, but most throw this error.
>
> Is there something I'm doing wrong, or does some other package need to be
> installed for these modules to work correctly?
>
> Thanks in advance,
> Christian Johnson
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20150910/0742a24f/attachment.html>


More information about the AstroPy mailing list