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

Serialization of Simulator.config.decompose_spectrum #32

Open
mgiammar opened this issue Aug 8, 2021 · 0 comments
Open

Serialization of Simulator.config.decompose_spectrum #32

mgiammar opened this issue Aug 8, 2021 · 0 comments

Comments

@mgiammar
Copy link
Collaborator

mgiammar commented Aug 8, 2021

Steps to reproduce:

  1. Create a new file in the mrsimulator-app
  2. Add two spin_systems to the file
  3. Add a method to the file
  4. Under Signal Processing add two convolutions
  5. Have the first convolution apply only to spin_system 0 and second convolution only apply to spin_system 1
  6. Apply the processor
  7. Download the simulation as a .mrsim file
  8. Replacing PATHNAME with downloaded file pathname run the following code
import mrsimulator

sim, processors, _ = mrsimulator.load("PATHNAME")
# sim.config.decompose_spectrum = "spin_system"
sim.run()

for processor, method in zip(processors, sim.methods):
    processed_data = processor.apply_operations(method.simulation).real

Expected behavior:
Downloaded data is simulated and processed without error

Observed behavior:
The last line throws IndexError: list index out of range error

Note: If line 4 is uncommented then the code runs without error

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