Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-36994: Add additional metrics to ip_isr #245

Merged
merged 5 commits into from Jan 5, 2023
Merged

DM-36994: Add additional metrics to ip_isr #245

merged 5 commits into from Jan 5, 2023

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Dec 8, 2022

Add banding metrics, full amplifier projection extraction, and projection FFTs.

Copy link
Contributor

@mfisherlevine mfisherlevine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All very minor comments.

python/lsst/ip/isr/isrStatistics.py Outdated Show resolved Hide resolved
python/lsst/ip/isr/isrStatistics.py Outdated Show resolved Hide resolved
python/lsst/ip/isr/isrStatistics.py Outdated Show resolved Hide resolved
python/lsst/ip/isr/isrStatistics.py Outdated Show resolved Hide resolved
python/lsst/ip/isr/isrStatistics.py Show resolved Hide resolved
python/lsst/ip/isr/isrStatistics.py Outdated Show resolved Hide resolved
python/lsst/ip/isr/isrStatistics.py Show resolved Hide resolved
python/lsst/ip/isr/isrStatistics.py Outdated Show resolved Hide resolved

if self.config.bandingUseHalfDetector:
fullLength = len(outputStats['AMP_BANDING'])
outputStats['DET_BANDING'] = float(np.median(outputStats['AMP_BANDING'][0:fullLength//2]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we need a nanmedian for the case of bad amps?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the amps do iterate in order, right? If not, cutting this list in half like that doesn't necessarily give a physical half of the chip.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cut here yields the "upper" amplifiers C10-C17. nanmedian makes sense, and I consistently forget it exists.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure it does, my worry was that it needn't necessarily. I'm sure it's fine for now though, as is that other loop without an amp id.

def test_bandingStatistics(self):
"""Look at the banding on a raw mock image.

The value obtained is far larger than we expect in real data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'll say! Do you know where that comes from? This is with MEDIAN_PER_ROW on as well... I guess we put some really weird stuff in the mocks? I'm guessing you ran this code on those images we were playing with (the ones Dan took). Do you have the results to hand by any chance?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a large gradient added to the input on the mock image, which isn't removed by the overscan (as it's "astronomical"). The tests I ran on actual images matched the supplied values for those exposures.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, if the numbers matched that's perfect. Kind of interested as to why the overscan doesn't take out the gradient though, even if it is "astronomical"...

@czwa czwa merged commit 16a4483 into main Jan 5, 2023
@czwa czwa deleted the tickets/DM-36994 branch January 5, 2023 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants