braintools.cogtask.initialize2

Contents

braintools.cogtask.initialize2#

braintools.cogtask.initialize2(data, dt, allow_none=False)[source]#

Initialize/resolve a parameter and convert to timesteps.

Parameters:
  • data (int | float | Quantity | Callable) – Duration value to resolve.

  • dt (int | float | Quantity) – Time step for conversion.

  • allow_none (bool) – Whether to allow None values.

Returns:

Number of timesteps.

Return type:

int | None