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

DJS/remove period from csdm dimension for simulations #348

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

deepanshs
Copy link
Owner

@deepanshs deepanshs commented May 19, 2024

Bug fix where dimensions were returned as periodic dimensions.

from mrsimulator import Simulator, SpinSystem, Site
from mrsimulator.method.lib import BlochDecaySpectrum
import matplotlib.pyplot as plt

H_site = Site(isotope="1H", shielding_symmetric={"zeta": 13.89, "eta": 0.25})
spin_system = SpinSystem(sites=[H_site])

static = BlochDecaySpectrum(channels=["1H"])
mas = BlochDecaySpectrum(channels=["1H"], rotor_frequency=1000)  # in Hz

sim = Simulator(spin_systems=[spin_system], methods=[static, mas])
sim.run()

print(sim.methods[0].simulation.x[0].period)

return period as np.inf Hz

@deepanshs deepanshs linked an issue May 19, 2024 that may be closed by this pull request
@deepanshs
Copy link
Owner Author

@mccarthy677 can you check if this fixes the baseline offset you saw related to fft?

@deepanshs deepanshs merged commit dc7c9e8 into master Jun 1, 2024
15 checks passed
@deepanshs deepanshs deleted the djs/fix_period_bug branch June 1, 2024 17:10
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.

Mrsimulator returns spectra with periodic dimensions
2 participants