gastropy.proportion_normogastric

gastropy.proportion_normogastric#

gastropy.proportion_normogastric(cycle_durations, dur_min=15.0, dur_max=30.0)[source]#

Compute the proportion of cycles in the normogastric range.

Normogastric cycles have durations between 15 and 30 seconds (corresponding to 2-4 cycles per minute).

Parameters:
  • cycle_durations (array_like) – Array of cycle durations in seconds.

  • dur_min (float, optional) – Minimum normogastric cycle duration (seconds). Default is 15.0.

  • dur_max (float, optional) – Maximum normogastric cycle duration (seconds). Default is 30.0.

Returns:

Proportion of cycles within the normogastric range (0 to 1). NaN if no cycles provided.

Return type:

float

Examples

>>> from gastropy.metrics import proportion_normogastric
>>> proportion_normogastric([20.0, 22.0, 10.0, 35.0])
0.5