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

Documentation for pulsed repetition/continuous burst stimulation #28

Open
jkosciessa opened this issue Sep 28, 2023 · 1 comment
Open
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jkosciessa
Copy link
Collaborator

jkosciessa commented Sep 28, 2023

Pulsed repetition protocols (e.g., Zeng et al., 2022) are a major simulation scenario, but how to run heating simulations is currently not very intuitive, partly due to variable naming and their associated comments. Let's see whether we can improve that naming and documentation. First, here is how I set up a continuous burst simulation, with the aim of modeling continuous on-off cycles. In my example, I try to model 80 seconds of a 5Hz protocol with 25% duty cycle (i.e., 50 ms on, 150 ms off within a 200 ms cycle). The implementation of calculations can be found in functions/check_thermal_parameters.m.

thermal:

  • duty_cycle: 0.25 # share of the stimulation duration during which the stimulation is on
  • stim_duration: 0.2 # [s] the duration of a complete on-off cycle, not the duration of stimulation on (as determined by the duty cycle) that I would have intuitively expected
  • iti: 0.2 # interval between trials, from the start of one trial to the start of another [s], in the case of continuous burst stimulation, the ITI is equal to the trial duration [stim_duration above]
  • on_off_step_duration: 0.2 # duration of one on+off period [s] (200 ms incl. stim on + off)
  • n_trials: 400 # number of trials to simulate; trial number follows from the total stimulation time (e.g., 80 s) divided by the on_off_step_duration/iti/stim_duration (e.g., 0.2s)
  • sim_time_steps: 0.005 # [s] internal simulation time steps, basically simulation chunks that have to be chosen such that on and off periods can be simulated
  • post_stim_time_step_dur: 0.18 # [s] duration of “off” time-step [appears unused]
  • equal_steps: 0 # on- and off-cycle time steps have unequal duration: if 0, their duration will be calculated based on the specified stim duration * duty cycle

The setup has to fit the following constraints:

  • on_off_step_duration * duty_cycle / stim_time_steps = integer %
  • on_off_step_duration * (1-duty_cycle) / stim_time_steps = integer %
  • cycle_duration / on_off_step_duration = integer

There are currently some checks that could cause problems down the line:

  • I do not understand what is being computed here. The current calculation of on_off_step_duration makes no sense to me, beacuse sim_time_steps - as I understand it - is merely an internal computation metric to chunk the simulation steps. If on_off_step_duration is explicitly specified, this code is not invoked, but unless there is a clear instruction on how to specify the setup only with a duty cycle, we should probably remove this option.
  • There are two routes to compute the number and duration of on- and off-steps, the fundamental parameters that k-Wave will use to model heating. In the case that equal_steps for on- and off-stimulation does not apply, the code actually only needs to model a single on- and a single off-step. If I understand this correctly, this should be the default setting however as any protocol not with a 50% duty cycle will have unequal steps for on- and off-stim. Perhaps I still misunderstand what the step refers to here.
  • This description is misleading, as the duration is NOT the equal step size (parameters.thermal.sim_time_steps) in this scenario.

REFS

Zeng, K. et al. Induction of Human Motor Cortex Plasticity by Theta Burst Transcranial Ultrasound Stimulation. Ann Neurol 91, 238–252 (2022).

@jkosciessa jkosciessa added the documentation Improvements or additions to documentation label Sep 30, 2024
@jkosciessa
Copy link
Collaborator Author

9e902f8 added a brief description of the pulsed heating setup. To implement this, I made some changes to functions/check_thermal_parameters.m. Some parameter definitions and traditional heating setups may thus not be up-to-date anymore.

Given that we are both looking into heating setups @MaCuinea, it may be useful to keep this documentation up to date as well.

@jkosciessa jkosciessa self-assigned this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant