azonenberg changed the topic of #scopehal to: ngscopeclient, libscopehal, and libscopeprotocols development and testing | https://github.com/ngscopeclient/scopehal-apps | Logs: https://libera.irclog.whitequark.org/scopehal
nelgau_ has joined #scopehal
nelgau_ has quit [Remote host closed the connection]
nelgau has quit [Read error: Connection reset by peer]
nelgau has joined #scopehal
Degi has quit [Ping timeout: 260 seconds]
Degi has joined #scopehal
<d1b2> <azonenberg> Ok sooo i'm puzzling over how to architect calibration for the aseq spectrometers
<d1b2> <azonenberg> So far i've just been outputting raw ccd counts for preliminary tests
<d1b2> <azonenberg> To correct for detector response I need to subtract a dark frame (which i've been doing manually in the filter graph for now, but ideally this would be slightly more automated), then divide by a wavelength-specific coefficient. This gives intensity in arbitrary units, but with flat response
<d1b2> <azonenberg> Then if the unit has absolute irradiance calibration I can then multiply by another wavelength specific coefficient, divide by a global coefficient, and divide by the integration time in microseconds to get uW/cm^2/nm
<d1b2> <azonenberg> (with cal plane at the end of the cosine corrector on the fiber input... not ideal but that's how the data is provided)
<d1b2> <azonenberg> anyway, so the question is how to fit this into our model. specifically the dark frame. which has to be measured dynamically as it can vary not only from unit to unit but with temperature, integration time, etc
<d1b2> <azonenberg> There's three different possible flows I'm thinking of
<d1b2> <azonenberg> 1) have a scpi command on the bridge to measure a dark frame, do all flatness correction server side in the bridge, return corrected counts to the driver
<d1b2> <azonenberg> 2) have a virtual input channel on the spectrometer that you hook to the output and loop back through a memory filter to measure a dark frame, then a second output to return flatness corrected counts (and perhaps a third for absolute irradiance)
<d1b2> <azonenberg> 3) add some way (new API or just additional channel) for the instrument to expose the cal coefficients then just do the flatness correction in a filter
<d1b2> <azonenberg> I'm leaning towards option 2 right now
<d1b2> <azonenberg> So in that flow we'd have one output channel for raw counts, one for flatness corrected counts, one (only present if you have the cal data option) for absolute irradiance, and an input channel for the dark frame
<d1b2> <azonenberg> and the typical flow would be raw counts -> (optional average filter) -> memory filter -> dark frame input
<d1b2> <azonenberg> then use either the flatness corrected or absolute output, or both
<Degi> "uW/cm^2/nm" What kind of irradiation angle does that assume? As in more like an integration sphere or a laser pointed at the fibers end? Or does the cosine corrector account for that?
<azonenberg> AIUI that's what the cosine corrector is for
<azonenberg> it assumes a diffuse-ish illumination that's fairly even across the input
<azonenberg> I should then be able to specify a wavelength range and integrate total uW/cm^2
nelgau has quit [Read error: Connection reset by peer]
<azonenberg> and then probably apply perceptual weighting of some sort to get lux
<azonenberg> but i havent looked at that math yet
nelgau has joined #scopehal
<Degi> nice
<Degi> I see, its a piece of diffusor
<azonenberg> yeah pretty much
<azonenberg> Just a particularly well characterized one
bvernoux has joined #scopehal
<_whitenotifier-3> [scopehal] azonenberg pushed 2 commits to master [+2/-0/±8] https://github.com/ngscopeclient/scopehal/compare/af44efca9395...8318d30b48f6
<_whitenotifier-3> [scopehal] azonenberg 6eebc86 - Minor optimizations to FilterGraphExecutor
<_whitenotifier-3> [scopehal] azonenberg 8318d30 - Initial work on ASEQ dark frame correction and flatness normalization
sgstair_ has joined #scopehal
sgstair has quit [Ping timeout: 252 seconds]
bvernoux has quit [Read error: Connection reset by peer]
sgstair_ is now known as sgstair
<d1b2> <johnsel> azonenberg is there some debug functionality somewhere to make filters output e.g. how long they took to execute?
<_whitenotifier-3> [scopehal-apps] Johnsel pushed 1 commit to master [+0/-0/±1] https://github.com/ngscopeclient/scopehal-apps/compare/7f029ab74887...a5f68637cd92
<_whitenotifier-3> [scopehal-apps] Johnsel a5f6863 - ci: update build-debian-selfhosted.yml Modified run command to instead use a local script for the terraform actions