# Implement afw.image.Filter replacement(s)

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
8
• Sprint:
AP F20-5 (October)
• Team:
• Urgent?:
No

#### Description

Implement the filter class design put forth in RFC-624 or RFC-730, whichever takes precedence.

#### Activity

Hide
Meredith Rawls added a comment -

I ran into a problem related to this when trying to have Butlers for two different cameras in the same notebook. The error was

RuntimeError: afw Filters were already defined on [insert long list of FilterDefinitions here]

In sum, I was told "don't do that" as well as "here is one workaround but it's dangerous to go around resetting filters willy-nilly" and "this ticket should address the issue." Thus, I am documenting my problem here instead of opening a new ticket.

Instructions to reproduce: https://lsstc.slack.com/archives/C3UCAEW3D/p1584386101034300

Temporary workaround to reset filters: https://lsstc.slack.com/archives/C3UCAEW3D/p1584386779038000

Show
Meredith Rawls added a comment - I ran into a problem related to this when trying to have Butlers for two different cameras in the same notebook. The error was RuntimeError: afw Filters were already defined on [insert long list of FilterDefinitions here]  In sum, I was told "don't do that" as well as "here is one workaround but it's dangerous to go around resetting filters willy-nilly" and "this ticket should address the issue." Thus, I am documenting my problem here instead of opening a new ticket. Instructions to reproduce: https://lsstc.slack.com/archives/C3UCAEW3D/p1584386101034300   Temporary workaround to reset filters: https://lsstc.slack.com/archives/C3UCAEW3D/p1584386779038000
Hide
Tim Jenness added a comment -

John Swinbank has there been any progress on finding someone who can work on this longstanding problem? As gen2 deprecation approaches and people consider using LATISS and BOT data or BOT and ImSim or Hsc or whatever in the same python process we are going to run into this more and more. Resetting filters allows things to function but it leaves people wide open to getting the wrong filter because they forgot to run reset.

Show
Tim Jenness added a comment - John Swinbank has there been any progress on finding someone who can work on this longstanding problem? As gen2 deprecation approaches and people consider using LATISS and BOT data or BOT and ImSim or Hsc or whatever in the same python process we are going to run into this more and more. Resetting filters allows things to function but it leaves people wide open to getting the wrong filter because they forgot to run reset.
Hide
Tim Jenness added a comment -

As an additional note, in DM-26119 I learned that when you use pipetask in multiprocessing mode you never get the filters defined because there is no Instrument object instantiated. In single process mode it works fine because at some point pipetask does need to create an Instrument.

Show
Tim Jenness added a comment - As an additional note, in DM-26119 I learned that when you use pipetask in multiprocessing mode you never get the filters defined because there is no Instrument object instantiated. In single process mode it works fine because at some point pipetask does need to create an Instrument .
Hide
Andy Salnikov added a comment -

Looks good, few comments on PR.

Show
Andy Salnikov added a comment - Looks good, few comments on PR.

#### People

Assignee:
Krzysztof Findeisen
Reporter:
Jim Bosch
Reviewers:
Andy Salnikov
Watchers:
Andy Salnikov, Jim Bosch, John Parejko, John Swinbank, Krzysztof Findeisen, Meredith Rawls, Tim Jenness