Repository navigation
Conversation
A Wavelength stage in the processing bar opens a calibration dialog. Spektra detects the peaks of the spectrum on screen, matches them to the lines of the chosen source (fluorescent light, mercury-argon, neon, a laser line or the user's own lines) and fits a correction on top of the factory calibration: offset for one line, linear for two or three, quadratic from four. Each line shows its error and can be unticked or edited; lines far off the fit, saturated or weak are marked. The correction is kept per instrument in the browser, applied on connect and written to the CSV header and the PNG footer. Nothing is written to the instrument. The simulated HDX reports slightly drifted wavelengths and has argon lines, so the feature can be tried without hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 5 tasks
Broad bands, such as the phosphor of a white LED, and noise ripples on top of them could be detected as peaks and paired with a reference line by chance. Peaks wider than 5 nm FWHM are no longer considered, and the message for no match mentions that a white LED has no narrow lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What and why
Corrects the instrument's factory wavelength calibration with a lamp of known lines, in two clicks: choose the source, check the matched lines, Apply.
factory/±10 pm); its popover shows the calibration in use, Calibrate… and Use factory. On phones the tile shows λ.src/analysis/calibration.js, pure): every peak–line pair proposes a shift (±5 nm, ±10 nm for one line); the shift pairing the most lines wins, then the pairing is refined with the fitted correction; lines far off the fit are rejected.How it was tested
npm testpasses; newtests/test_web_calibration.mjs(Hg-Ar and fluorescent spectra through a drifted axis, outlier rejection, edge cases)Checklist
🤖 Generated with Claude Code