ccdproc icon indicating copy to clipboard operation
ccdproc copied to clipboard

transform_image wcs update

Open SaOgaz opened this issue 8 years ago • 6 comments

Sorry if this is a silly question, but where in transform_image does the wcs get updated after the transformation is done? I don't see anything in the code that looks like it's doing this, but maybe that's somewhere else in the data class? This isn't really high priority or anything, I was just curious.

http://ccdproc.readthedocs.io/en/latest/_modules/ccdproc/core.html#transform_image

Thanks!

SaOgaz avatar Oct 02 '17 17:10 SaOgaz

Sorry if this is a silly question

I sort of wish it was, because the answer is that it does not transform the WCS at all. I'm not quite sure how to properly fix that, but at the very least we should warn/strip out the WCS if we cannot transform it.

mwcraig avatar Oct 08 '17 01:10 mwcraig

After conversing with @pllim, it might be a straightforward update to the CRPIX... keywords if there is no extra distortion keywords in the WCS solution. Does that sound right @nden?

SaOgaz avatar Oct 10 '17 15:10 SaOgaz

That reminds me: We probably should document which attributes are processed in the functions. There are several functions that simply copy or skip over certain attributes. For example median_filter ignores everything except data and only a handful functions respect the wcs.

For transform_image it's probably impossible to update the WCS because we cannot know what transform_func is used. But maybe we could add more specialized functions for "shift" or "rotate". Could be useful to know in what context you used transform_image. :)

MSeifert04 avatar Oct 18 '17 15:10 MSeifert04

@MSeifert04 I was maybe going to use it as an example replacement for the IRAF shift functions. I don't remember if I've gotten any specific requests for it outside of some questions about it on the astropy mailing list about... a year ago I think?

SaOgaz avatar Oct 19 '17 17:10 SaOgaz

I think we should throw a warning if there is a WCS....

mwcraig avatar Dec 07 '18 04:12 mwcraig

a warning will be added but we should come back to this after modeling and gwcs is updated to see if this can be made to work as a user would expect

crawfordsm avatar Jul 28 '19 16:07 crawfordsm