Test temperature compensation¶
Question¶
Does period remain stable across temperature?
See every package-generated example · Read the complete analysis pipeline
When to use¶
Use this for period estimates measured at multiple temperatures, with labels when the same biological unit contributes repeatedly.
Example figure¶
This deterministic example is calculated by the temperature_compensation action and drawn by render_compensation_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("temperature_compensation", temperature_points=points)
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("temperature_compensation", temperature_points, config=None)
Arguments and parameters¶
| Name | Type | Required | Default | Units | Meaning |
|---|---|---|---|---|---|
temperature_points |
array | yes | — | - | One entry per unit per temperature: [[20.0, 24.1, 'slice_1'], ...], or objects with temperature_c, period_hours and an optional label. Three slices at each of three temperatures is nine entries, and the labels are what lets the interval be clustered on the slice rather than on the measurement. |
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. |
Every nested config key, default, allowed value, and purpose is listed in the complete configuration reference.
How it works¶
Period is converted to rate and log-rate is regressed on temperature. The slope gives the ten-degree temperature coefficient, with repeated labels kept together for uncertainty.
$$ Q_{10}=\exp!\left(10\frac{d\ln(1/P)}{dT}\right) $$
Implementation: compensation.py::temperature_compensation.
Outputs and interpretation¶
The result reports Q10, interval, slope, predicted periods, temperature range, labels, compensation band, statistical evidence, and compensated/not-compensated 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¶
The result depends on accurate period estimates and temperature coverage. Regressing period directly would not implement the Q10 definition.
Example¶
The figure above is a real package result from a seeded, redistributable synthetic dataset. Its editable SVG embeds the exact plotted data and provenance and is included with a rendered preview in the installed help. The separate authoring bundle retains figure_data_temperature-compensation.csv, a standalone plot_temperature-compensation.py and source hashes; these companion files are not installed application files.
Methods text¶
Circadian rate, the reciprocal of period, was modelled on the log scale against temperature and converted to Q10; repeated measurements were clustered by their supplied biological-unit labels.
See also¶
Score immobility sleep · Measure food anticipation · Find ultradian rhythms · Analysis index · Gallery