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-22605: Update camera for as installed values #153
Conversation
a0c726e
to
40843ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments about the values might be fair to consider outside the scope, but on the other hand, if they're active already then I think some of them might need tweaking. And having said that actually, we shouldn't be merging things that we wouldn't allow if active just because they're not yet, because if they ever will be we're just shooting our future selves. Hit me up for a chat if you want to discuss with words.
C14 : { gain : 0.958300, readNoise : 6.323832, saturation : 188266.328125 } | ||
C15 : { gain : 0.964008, readNoise : 6.311374, saturation : 179974.562500 } | ||
C16 : { gain : 0.966000, readNoise : 6.678541, saturation : 190406.250000 } | ||
C17 : { gain : 0.000000, readNoise : 0.000000, saturation : 0.000000 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the C17 values are zero. That seems likely to cause problems. I get that this is likely a bad amp, and therefore the values might be undefined, but this seems a bad way of dealing with it. Off the top of my head, I'd probably do gain of 1, a readNoise of 100 and a saturation of 0.001, with the saturation level likely being the most functional of those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
C05 : { gain : 0.913768, readNoise : 7.457952, saturation : 209321.250000 } | ||
C06 : { gain : 0.906671, readNoise : 6.933922, saturation : 205319.265625 } | ||
C07 : { gain : 0.912890, readNoise : 6.244426, saturation : 205120.796875 } | ||
C10 : { gain : 0.844099, readNoise : 6.202470, saturation : 137353.203125 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This saturation value seems implausible. If these are now being used we need to be careful. Can you confirm if this is now actually used to set the level at which SAT bits are set, or if these are currently decorative/for other things, with the SAT level used in isr still coming from a more high-level place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that value will be used. Specifically here. I also don't know if that value is meant to be ADU or electrons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe reusing that for full well values is not the right thing to do. Unfortunately, the amp objects are not trivial to extend to add new attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I know there are bits of the code where saturation is relevant, I meant I wasn't sure if that value actually propagated through to there. It used to be set in a single place (until quite recently, on the order of weeks ago), and so I wasn't sure if the code had been updated to make this a per-amplifier value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the code I linked to uses the per amp value. Do you disagree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mfisherlevine which values are implausible? The saturations?
@SimonKrughoff If you read these from the fw in the pickle file, these are in electrons. If the DM experts believe there are problems with these values I will let Steve Ritz take a look and see what he thinks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bxin Yes, it was the saturations I meant.
@SimonKrughoff I'd have to actually run stuff to check that it's picked up by ISR properly. I can do that if you like though. Either way, I think it's legit to get this stuff in so that it can be used, even if it's not at present (and I'm not saying it's not, just that I haven't checked), so it's not a comment against merging this, just asking if you'd checked whether the values are picked up and used or not.
C05 : { gain : 0.935021, readNoise : 7.222823, saturation : 204248.843750 } | ||
C06 : { gain : 0.942203, readNoise : 6.780437, saturation : 203891.296875 } | ||
C07 : { gain : 0.950371, readNoise : 6.599936, saturation : 199214.656250 } | ||
C10 : { gain : 0.908633, readNoise : 9.134522, saturation : 133038.125000 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, very low saturation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They do indeed look to be consistent with that plot, but they're just as implausible in graphical form, no? Given that this is a property of the silicon and the gain, and that the gain is nowhere near as different as the saturation value is, do you really feel like such a sharp drop for one amp is physically plausible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it's very odd that it's always the same amp. I suspect this is some sort of artifact of the data/processing, and isn't the true value, but I'd love to hear more from someone who actually knows how this was measured/that plot was made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bxin Where did these saturation levels come from? If from EOTest, I think that they are meaningless (they're the point at which the variance drops due to total charge delocalisation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes from EOTest.
C05 : { gain : 0.939575, readNoise : 6.882386, saturation : 210176.796875 } | ||
C06 : { gain : 0.945924, readNoise : 6.381833, saturation : 207313.468750 } | ||
C07 : { gain : 0.939708, readNoise : 5.870911, saturation : 205092.906250 } | ||
C10 : { gain : 0.922850, readNoise : 6.051341, saturation : 128881.054688 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, low saturation.
C11 : { gain : 0.949116, readNoise : 6.602373, saturation : 195133.875000 } | ||
C12 : { gain : 0.947612, readNoise : 7.270852, saturation : 198097.000000 } | ||
C13 : { gain : 0.947605, readNoise : 6.832442, saturation : 197303.546875 } | ||
C14 : { gain : 0.933952, readNoise : 16.432356, saturation : 194102.609375 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very high noise, though I'm least concerned about this compared to other comments about values.
This just in: all those gains are garbage! Turns out all the 0.9ish ones are before the bias-shift gain-mitigation gain change, or so I was just told. I take it that these numbers came from a source that is quite old, right? |
Before this merges please ensure that the spurious merge commit (54e4c56) on the branch is removed. A normal rebase should deal with that. |
53f5f52
to
751be17
Compare
642593c
to
3b2d3e4
Compare
@SimonKrughoff yes, looks fine now. |
tests/xtest_assemble.py
Outdated
for root, did, expected in zip(self.roots, self.ids, self.expecteds): | ||
butler = Butler(root) | ||
raw = butler.get("raw", dataId=did) | ||
assembled = task.assembleCcd(raw) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure that's right, I'm just surprised it's run-like method isn't called .run()
😱
tests/xtest_assemble.py
Outdated
butler = Butler(root) | ||
raw = butler.get("raw", dataId=did) | ||
assembled = task.assembleCcd(raw) | ||
count = numpy.sum(expected['expected'].read().array - assembled.getImage().array) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably fine, but does this work with float-type images, or only ints? Should this be assertAlmostEqual instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have manually constructed both the input images and the expected images, so I have pretty tight control and would like to keep the assertEqual
since it's more stringent.
I haven't been able to track down why it's failing, but need to get other work done in the mean time.
3b2d3e4
to
bccf4fb
Compare
This pull request serves to update several key pieces of camera information based on the as installed sensors:
This also includes an update to the camera geometry to correctly assemble sensor grids including a unit test that uses measured spot projector data to confirm the assembly for both sensor vendors.