Compare fitted group rhythms¶
Question¶
Do two groups differ in their fitted rhythm parameters?
See every package-generated example · Read the complete analysis pipeline
When to use¶
Use this to compare fitted rhythm parameters between two independent groups.
Example figure¶
This deterministic example is calculated by the compare_rhythms action and drawn by render_compare_rhythms_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("compare_rhythms", groups=groups)
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("compare_rhythms", groups, config=None, unit='subject')
Arguments and parameters¶
| Name | Type | Required | Default | Units | Meaning |
|---|---|---|---|---|---|
groups |
object | yes | — | - | Recordings grouped by label: {'WT': [spec, ...], 'KO': [...]}. |
config |
object | no | null |
- | Partial scientific settings. Omitted or None values use the shared installed defaults; invalid fresh values are rejected. Run describe_config for names, meanings, units, bounds and choices. Explicitly load old saved mappings with load_saved_settings to report compatibility conversions. |
unit |
string | no | "subject" |
- | Unit of analysis: subject, slice, or cell. |
Every nested config key, default, allowed value, and purpose is listed in the complete configuration reference.
How it works¶
A common rhythm model yields group-level mesor, amplitude and phase contrasts.
$$ \Delta\theta=\theta_B-\theta_A $$
Implementation: differential.py::compare_rhythms.
Outputs and interpretation¶
The result includes fitted group curves, parameter differences, intervals and corrected evidence.
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¶
Subjects, rather than time bins, set the independent sample size; inspect fit and convergence warnings.
Example¶
The figure above is a real package result from a seeded, redistributable synthetic dataset. The flat gallery bundle retains figure_data_compare-fitted-rhythms.csv, a standalone plot_compare-fitted-rhythms.py, source hashes, an editable SVG, and a rendered preview.
Methods text¶
Group rhythm parameters were fitted and compared at the independent-subject level.
See also¶
Compare group rhythms · Compare group peak times · Analysis index · Gallery