# Add deprecation warnings for to-be-removed distorted WCS functions

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
1
• Sprint:
AP F19-5 (October)
• Team:

#### Description

The changes in DM-20154 should result in some code being deprecate-able. makeDistortedTanWcs and computePixelToDistortedPixel are the first ones that comes to mind, but there may be others (e.g. in ip_isr). We should use the deprecation decorators so we can remove that code later.

#### Activity

Hide
John Swinbank added a comment -

Hey John Parejko — this ticket is blocking release 19.0.0, which is now coming up. Any chance you'd be able to take a quick look at it soonish?

Show
John Swinbank added a comment - Hey John Parejko — this ticket is blocking release 19.0.0, which is now coming up. Any chance you'd be able to take a quick look at it soonish?
Hide
John Parejko added a comment -

obs_subaru/bin/showCamera.py calls computePixelToDistortedPixel, but everything is inside one giant main block and there are no tests. There's also displayCamera.py in the same directory that uses the native cameraGeom.utils.showCamera code, but I don't know what is different between "displayCamera" vs. "showCamera" and their docstrings are unhelpful.

Can we also deprecate/remove showCamera as part of this, so I don't have to figure out how to update it?

Show
John Parejko added a comment - obs_subaru/bin/showCamera.py calls computePixelToDistortedPixel , but everything is inside one giant main block and there are no tests. There's also displayCamera.py in the same directory that uses the native cameraGeom.utils.showCamera code, but I don't know what is different between "displayCamera" vs. "showCamera" and their docstrings are unhelpful. Can we also deprecate/remove showCamera as part of this, so I don't have to figure out how to update it?
Hide
John Parejko added a comment -

Separately, I think the two functions listed in the description are the only ones that need deprecation warnings: it looks like I caught everything for deprecation in ip_isr during the work on DM-20154.

Show
John Parejko added a comment - Separately, I think the two functions listed in the description are the only ones that need deprecation warnings: it looks like I caught everything for deprecation in ip_isr during the work on DM-20154 .
Hide
John Swinbank added a comment -

I suggest asking on #dm-science-pipelines and/or #subaru-hsc to what extent they're reliant on this code.

Show
John Swinbank added a comment - I suggest asking on #dm-science-pipelines and/or #subaru-hsc to what extent they're reliant on this code.
Hide
John Swinbank added a comment -

Per discussion of 2019-11-04 with John Parejko and Eric Bellm — given that these functions are still being used, we don't think it is appropriate to deprecate them. Closing as "Won't Fix".

Show
John Swinbank added a comment - Per discussion of 2019-11-04 with John Parejko and Eric Bellm — given that these functions are still being used, we don't think it is appropriate to deprecate them. Closing as "Won't Fix".
Hide
John Parejko added a comment -

I'm going to "well, actually" this: makeDistortedTanWcs can be deprecated, and probably should be since it's the biggest potential source of confusion. computePixelToDistortedPixel is the one being used by obs_hsc/show_camera.py (which will probably break in exciting ways given how we're now handling the raw images, but it's not tested, so who knows?).

I'll deprecate the former and leave the latter untouched.

Show
John Parejko added a comment - I'm going to "well, actually" this: makeDistortedTanWcs can be deprecated, and probably should be since it's the biggest potential source of confusion. computePixelToDistortedPixel is the one being used by obs_hsc/show_camera.py (which will probably break in exciting ways given how we're now handling the raw images, but it's not tested, so who knows?). I'll deprecate the former and leave the latter untouched.
Hide
John Swinbank added a comment -

.

As part of this work, can you please add a blocking ticket on DM-20564 to remove the now-deprecated functions before the 20.0.0 release?

Show
John Swinbank added a comment - . As part of this work, can you please add a blocking ticket on DM-20564 to remove the now-deprecated functions before the 20.0.0 release?
Hide
John Parejko added a comment -

Filed DM-22114 for the removal prior to v20.

Show
John Parejko added a comment - Filed DM-22114 for the removal prior to v20.

#### People

Assignee:
John Parejko
Reporter:
John Parejko
Reviewers:
Chris Morrison [X] (Inactive)
Watchers:
Chris Morrison [X] (Inactive), Gabriele Comoretto [X] (Inactive), Jim Bosch, John Parejko, John Swinbank, Lauren MacArthur, Yusra AlSayyad