Find ultradian rhythms¶
Question¶
Is there a repeatable rhythm faster than one day?
See every package-generated example · Read the complete analysis pipeline
When to use¶
Use this when a reproducible component shorter than the circadian cycle is suspected.
Example figure¶
This deterministic example is calculated by the ultradian action and drawn by render_ultradian_svg, the same renderer used for publication export. Empty or withheld elements are therefore visible exactly as they are in a real result.
import circadian_workbench as cw
cw.call("ultradian", recording={"path": "mouse01.awd"})
Required inputs and controls¶
The public function is the registered action below. settings= is accepted as a friendlier alias for config= by cw.call; the calculation stores the complete normalized config in provenance.
Function reference¶
cw.call("ultradian", recording, config=None)
Arguments and parameters¶
| Name | Type | Required | Default | Units | Meaning |
|---|---|---|---|---|---|
recording |
recording spec | yes | — | - | The record to analyse: {'path': 'data/m01.awd'} (a bare path string also works), {'demo': true} for the built-in deterministic record, {'inline': {'filename': ..., 'text': ...}} for tabular text, {'trace': {'hours': [...], 'values': [...], 'name': ...}} for one elapsed-time trace, or {'channels': {'hours': [...], 'values': {'reporter_a': [...], 'reporter_b': [...]}}} for several measurements from one subject. |
config |
object | no | null |
- | Partial analysis config. Missing keys fall back to analysis.DEFAULT_CONFIG and out-of-range values are clamped silently — run describe_config for every key, its default and its allowed values, or normalize_config to see what a given config actually becomes. |
Every nested config key, default, allowed value, and purpose is listed in the complete configuration reference.
How it works¶
The configured circadian cosinor is removed first, then the residual is searched over the ultradian band. Resolution, samples per cycle, relative amplitude, and harmonic guards decide whether the peak is reportable.
$$ \delta P=\frac{P_{\mathrm{fast}}^2}{T},\qquad A_{\mathrm{rel}}=\frac{A_{\mathrm{fast}}}{A_{\mathrm{circadian}}} $$
Implementation: ultradian.py::ultradian_component.
Outputs and interpretation¶
The result includes the candidate period, power and significance, reconstructed component, relative amplitude, resolution, harmonic relation, samples per cycle, guards, and verdict.
cw.call returns a Result: use .data for calculated values, .warnings for scientific qualifications, .provenance for version and input identity, .script for an equivalent replay script, and .files for saved outputs.
Limitations¶
Short records and circadian harmonics can mimic ultradian structure. A spectral peak is withheld when resolution, sampling, amplitude, or harmonic guards fail.
Example¶
The figure above is a real package result from a seeded, redistributable synthetic dataset. Its audited project bundle retains figure_data.csv, a standalone plot.py, source hashes, an editable SVG, and a rendered preview.
Methods text¶
The circadian component was removed before searching the declared ultradian band; candidates were required to pass resolution, sampling, relative-amplitude, and harmonic guards.
See also¶
Score immobility sleep · Measure food anticipation · Test temperature compensation · Analysis index · Gallery