Skip to content

Is it possible to add WCS constructor. #6371

Open

Description

@fockez

There are different wcs definitions especially for polynomial. There is Sip class for constructing tan-sip programmatically, but for TPV TPD or anything else, seems that no way to build an empty wcs with parameters initialized, even I could not find a way to modify the TPV parameters.

Activity

  1. fockez commented on Jul 23, 2017

    @fockez
    ContributorAuthor

    I see that astropy expose the wcsprm and tabprm struct of wcslib to python, but no disprm and dpkey, is that why astropy can initial TPV only from header.

  2. nden commented on Jul 23, 2017

    @nden
    Contributor

    @fockez TL;DR It's not possible currently to create a TPV distortion programmatically.

    To give some background on this. wcslib did not implement distortions until early 5.x. astropy.wcs had an implementaiton of SIP and LookupTable distortion long before that. This was done as a layer on top of wcslib. When wcslib implemented distortions an attempt was made to start using SIP from wcslib. However there were issues with inverse and roundtripping of coefficients which needed to be fixed in wcslib. So this aproach was abandoned and astropy.wcs continued using Sip from the python layer. As far as I can tell from the wcslib Change log this issue has not been worked out. Meanwhile TPV and the rest of the polynomials are implemented in wcslib only. Hence there's a difference in what can be done with Sip and the rest of the polynomials. Some of the relevant PRs are #3751, #3845, #3878.

  3. fockez commented on Jul 27, 2017

    @fockez
    ContributorAuthor

    I understand the difference between Sip and other polynomials. I mean, the base wcs Wcsprm is implemented, can the disprm be implemented as well? Or scheduled.

  4. nden commented on Jul 27, 2017

    @nden
    Contributor

    I think this was attempted in #3845 and did not quite work. I'm setting the milestone to Future in case someone has the time to do it.

  5. added this to the Future milestone on Jul 27, 2017
  6. removed this from the Future milestone on Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions