Repository navigation
docs(investigate): significant-figure and float-noise findings (DIE-403) - #156
Open
jirhiker wants to merge 4 commits into
Conversation
…gs (DIE-403) Trace the long trailing decimals in OGC products to the CLI retirement: the CLI's CSV path rounded via BaseRecord._get_sigfig_formatted_value, the Dagster path reads raw attributes. Lists affected sources/fields, where the digits are introduced (unit conversion, length conversion, CABQ stickup, summary mean), and recommends a data-level rounding policy plus follow-ups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RzW3G3NuggiZgMwKDeKLab
|
Your pull request is automatically being deployed to Dagster Cloud.
|
…cimals (DIE-403) Fixed decimals would zero out low analyte concentrations after ug/L to mg/L conversion. The converter already receives the raw source value, so sig-fig rounding can be centralized there without connector changes. Separate float noise from repeating-decimal means in the findings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RzW3G3NuggiZgMwKDeKLab
jirhiker
marked this pull request as ready for review
November 18, 2026 23:04
chasetmartin
requested changes
Nov 19, 2026
chasetmartin
left a comment
Contributor
There was a problem hiding this comment.
Looking good, answered a couple outstanding questions in order to help refine the recommendations.
… examples (DIE-403) Water levels summary min/mean/max is where users saw the issue; explain why mean is always affected and min/max only for meter-reporting sources. Drop the optional 2-decimal cap per review and fix the mean example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RzW3G3NuggiZgMwKDeKLab
…tput (DIE-403) Replace the significant-figures recommendation with the rule agreed in review: count source decimals at ingest, shift by the conversion factor's order of magnitude, carry them on records and round once when output features are built. Add a comparison table and update follow-ups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RzW3G3NuggiZgMwKDeKLab
jacob-a-brown
approved these changes
Nov 20, 2026
chasetmartin
approved these changes
Nov 20, 2026
chasetmartin
left a comment
Contributor
There was a problem hiding this comment.
lgtm, I will added the necessary tickets to Jira after merge
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
Investigation for DIE-403: why output products show long trailing decimals (
70.44800000000001) and inconsistent precision across sources. Addsdocs/precision-investigation.md. No code changes; fixes are proposed as follow-up tickets.Findings
Where users saw it: the
nm_waterlevels_summaryattribute table, inmin/mean/max.Root cause: the CLI's CSV writer rounded via
BaseRecord.to_row()→_get_sigfig_formatted_value()(backend/record.py:55). That path was deleted with the CLI (e836103). The Dagster/OGC path builds features withgetattr(record, k)inogc_features.py, so nothing rounds anymore.Two effects: binary float noise from multiplying by conversion factors, and false precision (more digits than measured) from both conversions and summary means.
Where the digits come from:
converter.py:125)transformer.py:107-110)mean(source.py:136)Summary min/max inherit the conversion artifacts.
Affected: NMBGMR and ST2 site elevations (reported in m), any analyte with a non-1.0 conversion factor, and summary means. Derived products already round.
Recommendation (agreed in review)
max(0, decimals_in - floor(log10(factor))).Conversion factors are treated as exact, which has to be documented. The doc has a comparison table against the CLI's 2 decimals and against source significant figures.
Proposed follow-ups (not created in Jira)
Testing
Docs only. The example values in the doc were checked numerically against the current conversion code.
tests/test_product_docs.pyhas 3 failures that also happen onmainwithout this change.🤖 Generated with Claude Code
https://claude.ai/code/session_01RzW3G3NuggiZgMwKDeKLab