Repository navigation
Add where_sensor, the pixels of its sensor which an instrument models - #56
Merged
Merged
Conversation
An instrument can now leave pixels of its sensor out of its model, such as the shadow of the storage mask on each sensor of ESIS. Its images are zero there, with no noise, its backprojection takes nothing from them, whatever they hold, and MART leaves them out of the mean chi squared and of the correlation of the residual, which takes a `where` argument for it. The mask is applied around the matrices of the instrument, so assigning another does not assemble them again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StcJvVHMXbjJmyFFwf4Pcn
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #56 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 29 29
Lines 4655 4997 +342
==========================================
+ Hits 4655 4997 +342
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A mask which left out every pixel of a channel gave that channel no merit, so MART could never converge. Such a mask is now refused, by every method which takes it. The operators keep a copy of the mask, so that changing it in place no longer changes them halfway, and so that the compiled code is compiled once for every mask. Assigning only a new mask keeps the factors around the matrices, as well as the matrices. A plain array, whose axes have no names, is refused with an error which says so, and the masks of the tests are built with named arrays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StcJvVHMXbjJmyFFwf4Pcn
roytsmart
added a commit
that referenced
this pull request
Dec 3, 2026
#56 merged, so the roadmap now says how pixels are left out of the fit: an instrument names the pixels of its sensor which it models, and the mask is applied around the matrices instead of by zeroing the weights of each block. A design bullet takes over the account of the shadow of the storage mask from #53, corrected to the mechanism as built, and the table of where things stand gains a row for #56. M8 brings the shadow and the border of 4 pixels, which esis measures, and a new risk says that the widths of the shadow need measuring again. The section on frame 15 no longer says that ctis cannot leave pixels out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StcJvVHMXbjJmyFFwf4Pcn
roytsmart
added a commit
that referenced
this pull request
Dec 3, 2026
Frame 15 of the ESIS flight has been inverted on the host at production size, with the seven spectral lines of the model of tempest untied, and the roadmap now says what that showed, in a new section, "Frame 15 on the host". Of the model: the four channels differ in throughput by up to half, as tempest found; the scene holds a fifth to two fifths of the radiance of the FITS files of tempest; the support of tempest reaches past the field stop of today's model; the images hold light beyond the edges of the field which the model lacks, so both inversions come out red along the edges; a smooth mismatch across each image changes no Doppler shift; the shadow of the storage mask, left in the fit, leaves lines in the scene; and the mean chi squared of a channel counts its blank pixels. Of the Doppler shifts, also on synthetic frames whose O V moves as the quiet Sun seen by SUMER: the first update of MART leaves a ghost, red below every bright feature and blue above it, whose strength the width of the first guess sets; stopping at the mean chi squared of tempest stops inside it; and MART recovers a third to a half of a Doppler shift over 3 arcsec, a fifth to a third over 12, and nothing of its mean over the field. The centroid reads a Doppler shift best. M8 now also brings over the thermal widths of the first guess of tempest, a normalization of each channel of each frame and its stopping rule, and cuts the support to the field stop of its model. The time of the 30 frames on the host uses the 558 iterations tempest recorded, the comparison of the loops no longer says that they differ in exponent, which is out of date since #42, and four new risks cover the recovery of Doppler shifts, the light which the model lacks, the radiance of the distributed product and the throughput of each channel. The roadmap also records `where_sensor` (#56): a row in the table of where things stand, and a design bullet which takes over the account of the shadow of the storage mask from #53, with the mask applied around the matrices, as built. M8 brings the shadow and a border of 4 pixels, which esis measures, and a new risk says that the widths of the shadow need measuring again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StcJvVHMXbjJmyFFwf4Pcn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ESIS leaves some pixels of each sensor out of its Level-4 fit, and ctis had no way to leave a pixel out of an inversion. This adds one:
where_sensor, the pixels of its sensor which an instrument models.Why
The mask over the storage region of each ESIS sensor shades a strip of active columns, which the optical model does not include. Left in the fit, those columns draw lines through the scene, as the first look at frame 15 found (#55). Tempest removed their weights, and those of a border of 4 pixels, before inverting. This is the ctis half of that; esis measures the pixels and passes the mask in M8.
What changes
where_sensor, an abstract property onAbstractInstrumentand a field onIdealInstrumentandOptikaInstrument,Noneby default for every pixel. It is a named array of booleans with the two axes of the sensor and, if it differs between channels, those of the channels. A mask is refused if it has any other axis or another length, if it is not a named array of booleans, or if it leaves out every pixel of a channel, where an inversion would have nothing to fit and MART could never converge.image()gives zero, with an uncertainty of zero, with or without noise, integrated along wavelength or not;backproject()takes nothing, whatever the images hold there, not a number included;snr()counts nothing.MartInverter:where, ofctis.inverters.merit.correlation_residual, whichAbstractIterativeInverter.correlation_residualpasses the mask to, and through the compiled merit of the iteration on the matrices.Checked
snr()leaves those pixels out;image(),backproject()andsnr(), and one which leaves out every pixel of a channel byMartInvertertoo;MartInverterwith a mask takes the same path to the same solution on the matrices as on the methods of the instrument, for anIdealInstrumentand anOptikaInstrument, and the same, bit for bit, whether the images hold zero, not a number or 1e30 where the instrument does not model the sensor.Notes:
🤖 Generated with Claude Code
https://claude.ai/code/session_01StcJvVHMXbjJmyFFwf4Pcn