pttools.analysis.parallel

Utilities for parallel simulation of bubbles

Functions

pttools.analysis.parallel.create_bubble(params, model, post_func=None, post_func_return_multiple=False, use_bag_solver=False, bubble_kwargs=None, allow_bubble_failure=False, *args, **kwargs)

Create a single bubble and apply post-processing functions to retrieve results from it

Parameters:
  • params (ndarray)

  • model (Model)

  • post_func (callable)

  • post_func_return_multiple (bool)

  • use_bag_solver (bool)

  • bubble_kwargs (Dict[str, any])

  • allow_bubble_failure (bool)

Return type:

Bubble | None | Tuple[Bubble | None, Any]

pttools.analysis.parallel.create_bubbles(model, v_walls, alpha_ns, func=None, log_progress_percentage=10, max_workers=options.MAX_WORKERS_DEFAULT, single_thread=False, allow_bubble_failure=False, kwargs=None, bubble_kwargs=None, bubble_func=create_bubble)

Create multiple bubbles in parallel

Parameters:
  • model (Model)

  • v_walls (ndarray)

  • alpha_ns (ndarray)

  • func (callable)

  • log_progress_percentage (float)

  • max_workers (int)

  • single_thread (bool)

  • allow_bubble_failure (bool)

  • kwargs (Dict[str, any])

  • bubble_kwargs (Dict[str, any])

  • bubble_func (callable)

Return type:

ndarray | Tuple[ndarray, ndarray, …]

pttools.analysis.parallel.create_spectra(model, v_walls, alpha_ns, func=None, log_progress_percentage=5, max_workers=options.MAX_WORKERS_DEFAULT, single_thread=False, allow_bubble_failure=False, kwargs=None, bubble_kwargs=None, spectrum_kwargs=None)

Create multiple spectra in parallel

Parameters:
  • model (Model)

  • v_walls (ndarray)

  • alpha_ns (ndarray)

  • func (callable)

  • log_progress_percentage (float)

  • max_workers (int)

  • single_thread (bool)

  • allow_bubble_failure (bool)

  • kwargs (Dict[str, any])

  • bubble_kwargs (Dict[str, any])

  • spectrum_kwargs (Dict[str, any])

Return type:

ndarray

pttools.analysis.parallel.create_spectrum(params, model, post_func=None, post_func_return_multiple=False, use_bag_solver=False, bubble_kwargs=None, spectrum_kwargs=None, allow_bubble_failure=False, *args, **kwargs)

Create a single spectrum and apply post-processing functions to retrieve results from it

Parameters:
  • params (ndarray)

  • model (Model)

  • post_func (callable)

  • post_func_return_multiple (bool)

  • use_bag_solver (bool)

  • bubble_kwargs (Dict[str, any])

  • spectrum_kwargs (Dict[str, any])

  • allow_bubble_failure (bool)

pttools.analysis.parallel.solve_bubble(bubble)
Parameters:

bubble (Bubble)

Return type:

None

pttools.analysis.parallel.solve_bubbles(bubbles, max_workers=options.MAX_WORKERS_DEFAULT)

Solve multiple existing bubbles in parallel

Parameters:
  • bubbles (ndarray)

  • max_workers (int)

Return type:

None