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

Simulate pulse and then simulate steady-state without needing to reinitialize scenario #108

Open
charlesbmi opened this issue Jul 7, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@charlesbmi
Copy link
Contributor

Describe the new feature or enhancement

As someone visualizing tFUS simulations, I would like to be able to easily visualize both a pulse simulation and a steady-state simulation.

Currently, the scenario needs to be reinitialized in order to run both simulations. For example:

import neurotechdevkit as ndk

scenario = ndk.make("scenario-0-v0")
result = scenario.simulate_pulse()
result.render_pulsed_simulation_animation()

(Pulsed animation is shown)

result = scenario.simulate_steady_state()
Estimated time to complete simulation: 44 seconds. Memory required is 8 GB (available 68.719476736 GB). These values are approximated.
...
... (Additional backtrace)
File ~/mambaforge/envs/neurotechdevkit/lib/python3.10/site-packages/stride/problem/acquisitions.py:824, in Acquisitions.add(self, item)
    811 """
    812 Add a new shot to the Acquisitions.
    813 
   (...)
    821 
    822 """
    823 if item.id in self._shots.keys():
--> 824     raise ValueError('Shot with ID "%d" already exists in the Acquisitions' % item.id)
    826 self._shots[item.id] = item
    827 item._acquisitions = self

ValueError: Shot with ID "0" already exists in the Acquisitions

Describe your proposed implementation

Some possible ideas:

  • Add a .clear() method that clears a previous Acquisitions
  • Use a randomly generated hash (e.g., 49c2965) instead of "0" for the Shot ID to prevent conflict between new Shots

Describe possible alternatives

  • Could just clear the previous data when running a simulation, but we may want to keep it for further analysis.

Additional comments

image
@charlesbmi charlesbmi added the enhancement New feature or request label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant