Open
Conversation
NRM step always has undefined demagType, causing the magnetization graph to show "mT" instead of "°C" for thermal demagnetization data.
…nd NaN Display values using toPrecision(12) to eliminate IEEE 754 artifacts (e.g., 38.599999999999994 → 38.6). Keep raw string in state during editing so intermediate values like "." or "," don't produce NaN. Parse to number only on apply, with comma-to-dot replacement for Russian locale support.
Labels like "406c.squid" now become "406c". The parentFile field retains the full filename with extension for traceability.
Users now see why a file was skipped (e.g., "no data lines"), not just the filename.
The || 0 fallback used JavaScript falsy coercion which masks NaN as zero without distinction. isFinite() explicitly catches NaN and Infinity while preserving legitimate zero values.
Files with only a header line were silently accepted with 0 steps, bypassing the alert mechanism. Now throws before returning empty steps.
Math.max() on empty array returns -Infinity, displayed as "Mmax = -INFINITY A/m". Now defaults to 0 when no steps are present.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Off-by-one indexing in sortEigenvectors() used [1,2,3] instead of [0,1,2] to find the middle eigenvalue index. When numeric.eig returned eigenvalues with the middle one at index 0, the filter produced index 3 (out of bounds) → undefined → NaN → MAD=0 via isFinite guard. Also removed no-op vectors.push(...vectors) in PCA0 path — TMatrix normalizes by array length, so doubling had no mathematical effect.
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.
Summary
A batch of bug fixes addressing issues reported by users, focused on data parsing robustness, display correctness, and editor usability.
Bug fixes
Chore