Skip to content

Fix duplicated variable in baseline noise check#25

Open
robertyoung3 wants to merge 1 commit intoEMSL-Computing:masterfrom
robertyoung3:fix/baseline-noise-none-check
Open

Fix duplicated variable in baseline noise check#25
robertyoung3 wants to merge 1 commit intoEMSL-Computing:masterfrom
robertyoung3:fix/baseline-noise-none-check

Conversation

@robertyoung3
Copy link

Summary

  • MassSpecBase.plot_mz_domain_profile() (line 1094) checks self.baseline_noise_std twice instead of checking self.baseline_noise and self.baseline_noise_std
  • Changed from truthiness check to is not None so valid 0.0 values are not incorrectly treated as missing

Before

if self.baseline_noise_std and self.baseline_noise_std:

After

if self.baseline_noise is not None and self.baseline_noise_std is not None:

Test plan

  • Verified the fix matches the intended logic by inspecting surrounding code (line 1096 uses self.baseline_noise)
  • One-line change, no behavioral impact except correcting the None/zero handling

@kheal kheal self-requested a review March 2, 2026 23:35
Copy link
Collaborator

@kheal kheal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @robertyoung3, thanks for putting in this PR.

Generally speaking, the requested functionality change / bug fix looks good.

However, we don't want to add the extraneous changes (the .claude/, .devcontainer/, openspec/, changes to docker- etc) in this PR. Could you cull this PR to the minimum diff changes needed to repair the functionality you've described? Essentially just the change in MassSpectrumClasses.py module. We'd want this for the other PRs you've put in as well (#26, #27, #28, #29).

Thanks in advance!

@robertyoung3 robertyoung3 force-pushed the fix/baseline-noise-none-check branch from 21e5794 to a19d964 Compare March 3, 2026 00:54
@robertyoung3
Copy link
Author

Hi Katherine,
Sorry about that! The PRs have been culled to the minimum diff changes, and I'll keep it that way in the future.
Cheers,
Robert

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.

2 participants