Skip to content

fix(inference): honor explicit g_max reference in noise models - #835

Closed
PabloCarmona wants to merge 4 commits into
masterfrom
fix/830-noise-model-g-max-reference
Closed

PabloCarmona wants to merge 4 commits into
masterfrom
fix/830-noise-model-g-max-reference

Conversation

@PabloCarmona

Copy link
Copy Markdown
Collaborator

Related issues

Fixes #830

Description

An explicit coeff_g_max_reference / prog_coeff_g_max_reference raised an AttributeError in ReRamWan2022NoiseModel, PCMLikeNoiseModel (and so CustomDriftPCMLikeNoiseModel) and HermesNoiseModel when custom coefficients were used, and was silently overwritten by the default reference otherwise. An explicit value now always takes precedence.

ReRamWan2022NoiseModel also never applied the 40 uS reference of its default coefficients, so noise is now scaled by g_max / 40 as documented.

Details

N/A

An explicit coeff_g_max_reference / prog_coeff_g_max_reference raised an AttributeError in ReRamWan2022NoiseModel, PCMLikeNoiseModel (and so CustomDriftPCMLikeNoiseModel) and HermesNoiseModel when custom coefficients were used, and was silently overwritten by the default reference otherwise. An explicit value now always takes precedence.

ReRamWan2022NoiseModel also never applied the 40 uS reference of its default coefficients, so noise is now scaled by g_max / 40 as documented (Fixes #830).

Signed-off-by: Pablo Carmona Gonzalez <pablocarmonagonzalez@gmail.com>
@PabloCarmona PabloCarmona self-assigned this Oct 30, 2026
…model

Restore the elif for the single-device case instead of a catch-all else, so each supported num_devices value is handled explicitly. The default reference falls back to g_max, so no branch leaves it undefined.

Signed-off-by: Pablo Carmona Gonzalez <pablocarmonagonzalez@gmail.com>
The reference is now inferred as float, which conflicts with the legacy loader assigning the optional g_max to it.

Signed-off-by: Pablo Carmona Gonzalez <pablocarmonagonzalez@gmail.com>
Signed-off-by: Pablo Carmona Gonzalez <pablocarmonagonzalez@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReRamWan2022NoiseModel: explicit coeff_g_max_reference raises AttributeError; 40 µS reference unused?

1 participant