Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baseline Offset is dependent on Number of Spin Systems #31

Open
mgiammar opened this issue Aug 7, 2021 · 2 comments
Open

Baseline Offset is dependent on Number of Spin Systems #31

mgiammar opened this issue Aug 7, 2021 · 2 comments

Comments

@mgiammar
Copy link
Collaborator

mgiammar commented Aug 7, 2021

Steps to reproduce:

  1. Create a new document
  2. Add BlochDecaySpectrum for 1H
  3. Go to Methods tab and add Constant Baseline Offset of 1 under Signal Processing
  4. Go to Spin Systems tab
  5. Add new 1H spin system
  6. Observe baseline on the spectrum
  7. Repeat from step 5 for desired number of spin systems

Expected behavior:
The spectrum always shows a baseline at 1

Observed behavior:
The spectrum baseline is dependent on the number of spin systems. For n>1 spin systems and a defined baseline offset of b the observed offset is n*b

@mgiammar
Copy link
Collaborator Author

mgiammar commented Aug 7, 2021

The issue stems from these lines of code

if decompose == "none":
for mth in sim.methods:
mth.simulation = add_csdm_dvs(mth.simulation)

The individual spin systems have the signal processor operations applied before being combined into a spectrum. When each of n spin systems each have a baseline offset of b applied then adding them together will result in a spectrum baseline offset of n*b

mgiammar referenced this issue in mgiammar/mrsimulator-app Aug 7, 2021
@mgiammar mgiammar mentioned this issue Aug 7, 2021
@mgiammar
Copy link
Collaborator Author

Root of issue lies deeper within mrsimulator app. The fix in #21 is temporary. Further discussion on how to proceed is necessary. Also see #32

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

No branches or pull requests

1 participant