[AstroPy] SOLVED: Using oblique SIN projections in astropy

Thomas Robitaille thomas.robitaille at gmail.com
Fri Dec 16 19:18:26 EST 2016


Hi Tim,

Good to hear that you fixed it - could you open an issue in the Astropy
issue tracker with suggestions on how to improve the documentation?

https://github.com/astropy/astropy/issues

Thanks,
Tom


On 16 December 2016 at 18:18, Tim Cornwell <realtimcornwell at gmail.com>
wrote:

> Hi Tom,
>
> I fixed the problem. I was using
>
> pv = [(1, 0, -p), (1, 1, -q)]
> workimage.wcs.wcs.set_pv(pv)
>
> The actual usage should evidently be:
>
> pv = [(0, 0, q), (0, 1, p)]
> workimage.wcs.wcs.set_pv(pv)
>
> So the sign and the order of the obliquity factors are changed from CASA.
>
> Using 0 for the axis should probably be documented!
>
> With this change, project_interp works as needed.
>
> Thanks,
>
> Tim
>
>
> --
> Tim Cornwell
> Sent with Airmail
>
> --
> Tim Cornwell
> Sent with Airmail
>
> On 16 December 2016 at 10:32:12 am, Tim Cornwell (
> realtimcornwell at gmail.com) wrote:
>
> Hi Tom,
>
> Here’s a simple script showing that setting the pv parameters on the WCS
> does nothing. I’ve just used wcs for this so reproject is not implicated.
>
> Thanks,
>
> Tim
>
> --
> Tim Cornwell
> Sent with Airmail
>
> On 15 December 2016 at 7:57:36 pm, Thomas Robitaille (
> thomas.robitaille at gmail.com) wrote:
>
> Hi Tim,
>
> Could you share a minimal example script showing what you have tried, just
> so that we can reproduce the issue?
>
> The correct package to use here is reproject, so it should just be a
> matter of setting the output WCS correctly. If you can provide an example,
> I can investigate why it may not be working.
>
> Thanks,
> Tom
>
>
> On 15 December 2016 at 17:48, Tim Cornwell <realtimcornwell at gmail.com>
> wrote:
>
>> Hi Tom,
>>
>> It’s from an oblique SIN projection to a non-oblique SIN projection. It’s
>> a standard use case for dealing with large fields in radio interferometry.
>> The obliquity varies with time so we reproject a series of snapshot images
>> and add them in non-oblique coordinates.
>>
>> --
>> Tim Cornwell
>> Sent with Airmail
>>
>> On 15 December 2016 at 5:01:01 pm, Thomas Robitaille (
>> thomas.robitaille at gmail.com) wrote:
>>
>> Hi Tim,
>>
>> Just to make sure I understand, you are trying to reproject an image to
>> the -SIN projection? What projection is the image originally in?
>>
>> Cheers,
>> Tom
>>
>>
>> On 15 December 2016 at 11:34, Tim Cornwell <realtimcornwell at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I’m trying to use oblique projections in astropy for the SIN (Slant
>>> Orthographic) projection. This is well-defined in the Greisen/Calabretta
>>> papers and in WCSLIB. I’m confident that casacore can do it but I’d prefer
>>> not to have to build CASA for this purpose (a reference library of
>>> calibration and imaging algorithms).
>>>
>>> In astropy, I can see two different approaches:
>>>
>>> - Use the reproject package
>>> - Use astropy.modelling.projections package
>>>
>>> I’m struggling with the former. The results do not seem correct. Before
>>> diving deeper (which would require building casacore for some comparisons),
>>> I’d like to know if trying the second approach is likely to work. What is
>>> the relationship between the two packages?
>>>
>>> Thanks,
>>> Tim Cornwell
>>>
>>> --
>>> Tim Cornwell
>>> Sent with Airmail
>>>
>>> _______________________________________________
>>> AstroPy mailing list
>>> AstroPy at scipy.org
>>> https://mail.scipy.org/mailman/listinfo/astropy
>>>
>>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at scipy.org
>> https://mail.scipy.org/mailman/listinfo/astropy
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20161217/95a7980d/attachment.html>


More information about the AstroPy mailing list