If True, use float64 precision; otherwise float32. Transforms all arrays in state to correct precision and set jax config jax_enable_x64. Default is True.
If True, model returns an updated initial conditions TimeSeries along with simulation output for continuing simulations. Changes output from result to [result, initial_conditions].
If True, applies performance optimization replacing dot product with matmul in coupling term. Only works with scalar-only pre expressions, no delays, and when pre expression has single x_j occurrence.
If True, BOLD monitor uses FFT convolution instead of dot product. Faster for most cases, time doesn’t scale with BOLD period. Dot product can be faster for large period values.
A tuple containing (model_function, state_collection) where model_function takes state_collection and returns simulation results. Usage: result = model_function(state_collection)
Source Code
# jaxify { #tvboptim.jaxify }```pythonjaxify(experiment, enable_x64=True, **kwargs)```Convert TVBO SimulationExperiment to JAX-compatible model function and a state.## Parameters {.doc-section .doc-section-parameters}| Name | Type | Description | Default ||----------------------------|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|| experiment | TVBO SimulationExperiment | TVBO SimulationExperiment to convert. | _required_ || enable_x64 |[bool](`bool`)| If True, use float64 precision; otherwise float32. Transforms all arrays in state to correct precision and set jax config *jax_enable_x64*. Default is True. |`True`|| replace_temporal_averaging |[bool](`bool`)| If False, BOLD uses TemporalAverage monitor as TVB does. If True, uses faster SubSample monitor with similar results. | _required_ || return_new_ics |[bool](`bool`)| If True, model returns an updated initial conditions TimeSeries along with simulation output for continuing simulations. Changes output from result to [result, initial_conditions]. | _required_ || scalar_pre |[bool](`bool`)| If True, applies performance optimization replacing dot product with matmul in coupling term. Only works with scalar-only pre expressions, no delays, and when pre expression has single x_j occurrence. | _required_ || bold_fft_convolve |[bool](`bool`)| If True, BOLD monitor uses FFT convolution instead of dot product. Faster for most cases, time doesn't scale with BOLD period. Dot product can be faster for large period values. | _required_ || small_dt |[bool](`bool`)| Uses full history storage for faster simulations at small dt. Can cause memory explosion under jax.grad transformation. | _required_ || **kwargs |[dict](`dict`)| Additional keyword arguments passed to downstream functions. |`{}`|## Returns {.doc-section .doc-section-returns}| Name | Type | Description ||--------|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|||[tuple](`tuple`)| A tuple containing (model_function, state_collection) where model_function takes state_collection and returns simulation results. Usage: result = model_function(state_collection) |