# Remove disabled code in obs_lsst

XMLWordPrintable

## Details

• Type: Improvement
• Status: Invalid
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Team:
Data Release Production

## Description

All if False blocks in obs_lsst should be removed.

## Activity

Hide
Tim Jenness added a comment -

I will add that I'm not sure that the code in bypass_raw_visitInfo will work. I don't think that the constructor will be able to take a raw header and do the right thing in general. obs_base has MakeRawVisitInfo for a reason. Is this method used?

Finally, there are three if False lines in obs_lsst that need cleaning up. lsstCamMapper also does this:

  setWcsFromBoresight = True # Construct the initial WCS from the boresight/rotation?  if setWcsFromBoresight: 

which is a bit odd. We can always try to create the WCS and just not do it if the RA/Dec is not defined.

Show
Tim Jenness added a comment - I will add that I'm not sure that the code in bypass_raw_visitInfo will work. I don't think that the constructor will be able to take a raw header and do the right thing in general. obs_base has MakeRawVisitInfo for a reason. Is this method used? Finally, there are three if False lines in obs_lsst that need cleaning up. lsstCamMapper also does this: setWcsFromBoresight = True # Construct the initial WCS from the boresight/rotation? if setWcsFromBoresight: which is a bit odd. We can always try to create the WCS and just not do it if the RA/Dec is not defined.
Hide
John Swinbank added a comment -

Tim Jenness — I've tweaked this issue to refer to all “if False” blocks in obs_lsst. If there are other things you think need fixing or looking at, could you please file new tickets to describe them? Thanks!

Show
John Swinbank added a comment - Tim Jenness — I've tweaked this issue to refer to all “ if False ” blocks in obs_lsst. If there are other things you think need fixing or looking at, could you please file new tickets to describe them? Thanks!
Hide
Tim Jenness added a comment -

I included the setWcsFromBoresight issue on this ticket on the basis that that is effectively an "if True" so seemed related to the "if False". I can file it as a different ticket if that is the preference.

Show
Tim Jenness added a comment - I included the setWcsFromBoresight issue on this ticket on the basis that that is effectively an "if True" so seemed related to the "if False". I can file it as a different ticket if that is the preference.
Hide
Robert Lupton added a comment -

That code is basically there until we get a real boresight in the headers coming from the simulators;  I'm OK with removing it.  I'll include it in the cleanup to do with the globals.

Show
Robert Lupton added a comment - That code is basically there until we get a real boresight in the headers coming from the simulators;  I'm OK with removing it.  I'll include it in the cleanup to do with the globals.
Hide
John Swinbank added a comment -

I included the setWcsFromBoresight issue on this ticket on the basis that that is effectively an "if True" so seemed related to the "if False". I can file it as a different ticket if that is the preference.

Fair dos; let's just leave it here (or on the globals ticket, as long as it's clear where it's been addressed).

Show
John Swinbank added a comment - I included the setWcsFromBoresight issue on this ticket on the basis that that is effectively an "if True" so seemed related to the "if False". I can file it as a different ticket if that is the preference. Fair dos; let's just leave it here (or on the globals ticket, as long as it's clear where it's been addressed).
Hide
Tim Jenness added a comment -

The disabled code has all been removed. This mostly happened in DM-17292 as part of adding tests and looking at test coverage.

Show
Tim Jenness added a comment - The disabled code has all been removed. This mostly happened in DM-17292 as part of adding tests and looking at test coverage.

## People

• Assignee:
Unassigned
Reporter:
Wil O'Mullane
Watchers:
Colin Slater, John Swinbank, Leanne Guy, Robert Lupton, Tim Jenness, Wil O'Mullane