Skip to content

Complete action reference

This page is generated from the live registry and documents all 70 callable actions. The signature and parameter tables are therefore the contract enforced by the runner, not a parallel handwritten list.

All successful actions return data, warnings, provenance, and an equivalent replay script. File-writing actions place files under root; source recordings remain read-only.

inspect

Grounding snapshot: actions, defaults, and optional recording metadata.

cw.call("inspect", recording, config=None)
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.

Config: all keys and defaults.

describe_config

Every config key, default, and enum domain.

cw.call("describe_config")

This action has no parameters.

normalize_config

Clamp and complete a partial config.

cw.call("normalize_config", config=None)
Name Type Required Default Units Meaning
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.

Config: all keys and defaults.

normalization_methods

Every value-normalisation method, formula, alias and requirement.

cw.call("normalization_methods")

This action has no parameters.

normalize

Normalise one selected trace with an explicit, reproducible method.

cw.call("normalize", recording, config=None, normalization_method='minmax', target_min=-1.0, target_max=1.0, reference_value=None, reference_start_hours=None, reference_end_hours=None, reference_statistic='mean', standard_deviation_ddof=0, detrended=False, envelope_floor_fraction=0.1)
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.
normalization_method string no "minmax" - Transformation to apply. Canonical choices are none, mean_center, median_center, zscore, robust_zscore, robust_scale, own_mean, own_daily_total, minmax, max_abs, reference_delta, fold_change, delta_over_reference, log2_fold_change, percent_of_reference, percent_change, envelope and pre_treatment_cycle. Aliases include range for minmax, extreme or to_extreme for max_abs, z for zscore, dff for delta_over_reference, and fold for fold_change.
target_min float no -1.0 normalised units Lower output bound for minmax range scaling; ignored by other methods.
target_max float no 1.0 normalised units Upper output bound for minmax range scaling; must exceed target_min.
reference_value float no null recording units Explicit baseline for reference_delta, fold_change, delta_over_reference, log2_fold_change, percent_of_reference, percent_change or pre_treatment_cycle. Use this or a reference time window, never both.
reference_start_hours float no null hours Inclusive start of the baseline window, in hours from the selected recording start. Must be paired with reference_end_hours.
reference_end_hours float no null hours Inclusive end of the baseline window used to calculate the reference. Must exceed and be paired with reference_start_hours.
reference_statistic string no "mean" - How a reference time window is reduced: mean or median.
standard_deviation_ddof integer no 0 - Degrees of freedom removed from the z-score standard-deviation divisor: 0 for a population, 1 for a sample.
detrended boolean no false - Whether inputs are already baseline-subtracted.
envelope_floor_fraction float no 0.1 fraction For envelope normalisation, return missing values after the fitted oscillation envelope falls below this fraction of its starting amplitude. Must lie from 0 inclusive to 1 exclusive.

Config: all keys and defaults.

load_recording

Import a recording and return metadata.

cw.call("load_recording", recording)
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.

list_output

List files written under the output root.

cw.call("list_output")

This action has no parameters.

set_group_colours

Fix the colour a named group is drawn in, overriding the house cycle.

cw.call("set_group_colours", colours=None)
Name Type Required Default Units Meaning
colours object no null - Group label to colour: {'WT': 'circadian_teal', 'KO': '#ff00aa'}. A house colour name, a matplotlib name, or a literal hex. Omit to read the current table; pass {} to clear it. Applies to every figure drawn afterwards, so a group keeps its colour regardless of what order the groups arrive in.

summary

Headline read on one recording: period, rhythm, quality, metrics.

cw.call("summary", recording, config=None)
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.

Config: all keys and defaults.

analyze

Full analysis with selectable sections.

cw.call("analyze", recording, config=None, sections=None)
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.
sections array of string no null - Analysis sections to return; use ['all'] for full output.

Config: all keys and defaults.

quality

Data-quality metrics for the selected window.

cw.call("quality", recording, config=None)
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.

Config: all keys and defaults.

rhythm

Rhythmic/arrhythmic verdict for the configured periodogram.

cw.call("rhythm", recording, config=None)
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.

Config: all keys and defaults.

periodograms

Lomb-Scargle, chi-square and F periodograms.

cw.call("periodograms", recording, config=None)
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.

Config: all keys and defaults.

daily_measures

Daily onset, offset, alpha and phase markers.

cw.call("daily_measures", recording, config=None)
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.

Config: all keys and defaults.

onset_fits

Regression fits through daily onsets and offsets.

cw.call("onset_fits", recording, config=None)
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.

Config: all keys and defaults.

profile

Folded average-day activity profile.

cw.call("profile", recording, config=None)
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.

Config: all keys and defaults.

peak_aligned_profile

Align an average-cycle profile to a participant morning or evening peak.

cw.call("peak_aligned_profile", recording, config=None, peak_period, anchor_amplitude=None, peak_options=None)
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.
peak_period string yes - Peak to detect and align: morning (07:00-14:00) or evening (17:00-22:00).
anchor_amplitude float no null activity amplitude Optional established participant peak amplitude. When supplied, the unsmoothed aligned profile is scaled so time zero equals this value.
peak_options object no null - Peak-alignment options: alignment_window_hours, smoothing_window_bins, polynomial_order, minimum_peak_distance_hours, active_window_hours, and allow_window_max_fallback.

Config: all keys and defaults.

cosinor

Cosinor fit at the configured period.

cw.call("cosinor", recording, config=None)
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.

Config: all keys and defaults.

period_methods

Which period methods are available, and what each one can report.

cw.call("period_methods")

This action has no parameters.

estimate_period

Period, phase and amplitude by one named method.

cw.call("estimate_period", recording, config=None, method=None)
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.
method string no null - Which period method to run: lomb, chi_square, f, fft_nlls, mesa, mfourfit, spectrum_resampling, jtk or ejtk. Omit to use the config's period_method (default lomb). Run period_methods for what each one can and cannot report -- MESA and mFourFit give no error bar and no significance measure, and FFT-NLLS is the only one that yields RAE.

Config: all keys and defaults.

compare_periods

Run several period methods over one record and return one comparison table.

cw.call("compare_periods", recording, config=None, methods=None)
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.
methods array of strings no null - Which period methods to compare, as a list of registry keys. Omit to use the config's period_methods. BioDare2's advice is to pair any method that cannot test significance (MESA, mFourFit, FFT-NLLS) with one that can (lomb), and discard the rest if the Lomb-Scargle periodogram rejects the record.

Config: all keys and defaults.

rhythmicity

JTK / eJTK rhythmicity test across sparsely sampled series, corrected together.

cw.call("rhythmicity", recordings, config=None, rhythmicity_method=None)
Name Type Required Default Units Meaning
recordings array of recording specs yes - Recordings to pool into one group trace.
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.
rhythmicity_method string no null - jtk for classic JTK_CYCLE or ejtk for the permutation null (default). eJTK is the one to use; classic JTK is kept for comparability with published work and is known to be anti-conservative. Both are for sparsely sampled, omics-like data -- a densely sampled record is binned down to jtk_max_points before either sees it.

Config: all keys and defaults.

nonparametric

IS, IV, RA, L5 and M10 metrics.

cw.call("nonparametric", recording, config=None)
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.

Config: all keys and defaults.

bouts

Activity bout detection and summary statistics.

cw.call("bouts", recording, config=None)
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.

Config: all keys and defaults.

fft

FFT amplitude or power spectrum.

cw.call("fft", recording, config=None)
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.

Config: all keys and defaults.

autocorrelation

Autocorrelation function and best period.

cw.call("autocorrelation", recording, config=None)
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.

Config: all keys and defaults.

wavelet

Continuous wavelet transform power and ridge.

cw.call("wavelet", recording, config=None)
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.

Config: all keys and defaults.

actogram

Actogram matrix and display levels (the numbers behind the plot).

cw.call("actogram", recording, config=None)
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.

Config: all keys and defaults.

time_series

Binned time series for every measurement channel.

cw.call("time_series", recording, config=None)
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.

Config: all keys and defaults.

select_frame

Selected sample window as records, with truncation metadata.

cw.call("select_frame", recording, config=None, limit=200)
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.
limit integer no 200 rows Maximum rows returned by select_frame.

Config: all keys and defaults.

methods_paragraph

Publication-ready Methods paragraph for the actual analysis.

cw.call("methods_paragraph", recording, config=None)
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.

Config: all keys and defaults.

analysis_script

Generate (but do not save) a runnable Python script that reproduces this analysis.

cw.call("analysis_script", recording, config=None)
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.

Config: all keys and defaults.

write_analysis_script

Write the replay script under root/scripts.

cw.call("write_analysis_script", recording, config=None)
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.

Config: all keys and defaults.

render_actogram

Render actogram SVG under root/figures.

cw.call("render_actogram", recording, config=None, options=None, individual_layers=False)
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.
options object no null - Actogram export options.
individual_layers boolean no false - Also write one SVG per measurement channel.

Config: all keys and defaults.

render_figures

Render the full figure set under root/figures.

cw.call("render_figures", recording, config=None, interface_state=None)
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.
interface_state object no null - Figure-selection state from the UI.

Config: all keys and defaults.

detrend

Baseline subtract, smooth, optionally exclude transients, and fit damping.

cw.call("detrend", recording, config=None, detrend_method='running_mean', window_hours=24.0, polynomial_degree=3, min_valid_fraction=0.5, bandwidth_hours=None, low_cut_hours=45.0, high_cut_hours=4.0, filter_order=2, lowess_fraction=None, lowess_iterations=3, asls_smoothness=1000000.0, asls_asymmetry=0.01, asls_iterations=10, smooth_window_hours=0.0, exclude_hours=None)
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.
detrend_method string no "running_mean" - Baseline removal method: none, linear, robust_linear/Huber, first_difference, running_mean, moving_median, lowess/loess, savitzky_golay, polynomial (including cubic/bicubic and poly6), kernel/baseline, amp_baseline, asymmetric_least_squares/asls, or frequency.
window_hours float no 24.0 hours Baseline window.
polynomial_degree integer no 3 - Polynomial baseline degree; poly6/degree6 force 6 and cubic/poly3/bicubic force 3.
min_valid_fraction float no 0.5 - Minimum finite share of a local smoothing window.
bandwidth_hours float no null hours Gaussian kernel standard deviation; omitted uses one quarter of window_hours.
low_cut_hours float no 45.0 hours Longest period retained by frequency detrending.
high_cut_hours float no 4.0 hours Shortest period retained by frequency detrending.
filter_order integer no 2 - Butterworth frequency-filter order.
lowess_fraction float no null - Fraction of finite samples in each LOWESS local fit; omitted derives it from window_hours.
lowess_iterations integer no 3 passes LOWESS robust residual-reweighting passes after the initial local fit; 0 disables reweighting.
asls_smoothness float no 1000000.0 - Positive second-difference penalty for asymmetric least squares; larger is smoother.
asls_asymmetry float no 0.01 - Weight in (0, 0.5) for points above the asymmetric baseline; smaller excludes positive peaks more strongly.
asls_iterations integer no 10 passes Asymmetric least-squares reweighting passes, from 1 to 100.
smooth_window_hours float no 0.0 hours Centred smoothing window; zero disables smoothing.
exclude_hours float no null hours Leading hours to discard before fitting.

Config: all keys and defaults.

group_profile

Pool recordings into a mean +/- SEM group trace.

cw.call("group_profile", recordings, config=None, normalize='own_mean', time_axis='clock_time', pool_order='profile_then_pool', statistic='mean', within_recording_reducer='mean', detrended=False)
Name Type Required Default Units Meaning
recordings array of recording specs yes - Recordings to pool into one group trace.
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.
normalize string no "own_mean" - Value normalisation before pooling. Accepts none, mean_center, median_center, zscore, robust_zscore, robust_scale, own_mean, own_daily_total, minmax, max_abs, reference_delta, fold_change, delta_over_reference, log2_fold_change, percent_of_reference, percent_change, envelope or pre_treatment_cycle. Reference-based methods require reference metadata on each profile; use normalization_methods for formulas.
time_axis string no "clock_time" - clock_time, tau_scaled, or onset_aligned.
pool_order string no "profile_then_pool" - profile_then_pool or virtual_animal.
statistic string no "mean" - mean or median.
within_recording_reducer string no "mean" - How each recording contributes at each phase bin before pooling: mean averages selected cycles; max retains the largest observed binned value across the selected recording.
detrended boolean no false - Whether inputs are already baseline-subtracted.

Config: all keys and defaults.

phase_response_curve

Circadian time of a stimulus, per-animal shift, the cohort PRC and its type.

cw.call("phase_response_curve", animals, config=None)
Name Type Required Default Units Meaning
animals array of objects yes - One entry per animal in the pulse experiment. Either a record to score -- {'recording': spec, 'stimulus': '2026-01-08 18:00', 'label': 'm01', 'config': {...}} -- or a point already scored elsewhere: {'circadian_time': 15.2, 'shift_hours': -1.4, 'label': 'm01'}. A record needs fit1_start/fit1_end before the pulse and fit2_start/fit2_end after it in its config, and 'stimulus' is the wall-clock time the pulse landed (or hours from the start of the record's first day). An animal whose pre-stimulus fit is too short is dropped with a warning rather than failing the cohort.
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.

Config: all keys and defaults.

compare_phase_response_curves

Fit two cohorts' phase response curves with one model and test each difference.

cw.call("compare_phase_response_curves", shift_cohorts, config=None, unit='subject')
Name Type Required Default Units Meaning
shift_cohorts object yes - Two labelled cohorts of pulsed animals, to test whether their phase response curves differ: {'WT': [animal, ...], 'KO': [...]}. Each animal takes the same shape phase_response_curve's animals does -- a record to score, or a point already scored. Exactly two cohorts: which contrast is meant is a decision about the experiment.
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.
unit string no "subject" - Unit of analysis: subject, slice, or cell.

Config: all keys and defaults.

instantaneous_phase

Hilbert phase, instantaneous period and amplitude envelope over time.

cw.call("instantaneous_phase", recording, config=None)
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.

Config: all keys and defaults.

phase_comparison

Circular summary and between-group test for phase.

cw.call("phase_comparison", phases, config=None, period_hours=None)
Name Type Required Default Units Meaning
phases object yes hours Phase values grouped by label: {'WT': [6.1, 5.8, ...], 'KO': [...]}. These are phases the caller already has -- onset hours from daily_measures, phase_hours from estimate_period, or their own scoring. This action does not compute phases, so the numbers may come from anywhere as long as they are clock hours on one shared period.
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.
period_hours float no null hours The cycle the phases live on. Omit to use the config's period_hours (24 h by default). A free-running cohort should pass its own tau, so that 'one cycle' means one of the animals' cycles rather than one solar day. splitting uses it for a second purpose that is the same idea: the period the resolution element P**2/T is worked out at, which sets how far apart two components must be before that record can show them to differ.

Config: all keys and defaults.

phase_summary

Circular mean, concentration and Rayleigh test for one set of phases.

cw.call("phase_summary", phase_values, config=None, period_hours=None, label='')
Name Type Required Default Units Meaning
phase_values array yes hours Phase values for one group or tissue, expressed on one shared cycle.
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.
period_hours float no null hours The cycle the phases live on. Omit to use the config's period_hours (24 h by default). A free-running cohort should pass its own tau, so that 'one cycle' means one of the animals' cycles rather than one solar day. splitting uses it for a second purpose that is the same idea: the period the resolution element P**2/T is worked out at, which sets how far apart two components must be before that record can show them to differ.
label string no "" - Readable name returned with the single-group phase summary.

Config: all keys and defaults.

synchrony

Kuramoto coherence over single cells, and whether damping is desynchrony or amplitude loss.

cw.call("synchrony", traces, hours, config=None)
Name Type Required Default Units Meaning
traces object yes recording units Single-cell traces on one shared time grid: {'roi_1': [values], ...}. Per-ROI output from a slice recording.
hours array yes hours The shared time grid the traces are sampled on, in hours from the start of the recording.
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.

Config: all keys and defaults.

period_dispersion

Whether a population lost coherence because its cells' periods diverged or because their phases were displaced.

cw.call("period_dispersion", traces, hours, config=None)
Name Type Required Default Units Meaning
traces object yes recording units Single-cell traces on one shared time grid: {'roi_1': [values], ...}. Per-ROI output from a slice recording.
hours array yes hours The shared time grid the traces are sampled on, in hours from the start of the recording.
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.

Config: all keys and defaults.

phase_angle

How far the animal's daily marker sits from the light transition, and whether that angle held.

cw.call("phase_angle", recording, cohorts=None, config=None, marker=None)
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.
cohorts object no null - Recordings grouped by label, to test whether the groups hold different angles of entrainment: {'WT': [spec, ...], 'KO': [...]}. One angle per animal, so the unit of analysis is the animal. Omit it and only the focal recording is answered for.
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.
marker string no null - Which daily marker the angle of entrainment is measured from: onset, offset or acrophase. Defaults to the entrainment_marker config key, and is never guessed from the data.

Config: all keys and defaults.

reentrainment

How many cycles the animal took to catch up with a shifted schedule, and at what rate.

cw.call("reentrainment", recording, config=None, shift_day=None)
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.
shift_day string no null - The date the light schedule moved, as YYYY-MM-DD. Omit it and the date is read out of the schedule itself; supply it when the schedule in the config does not carry the move. The shift date belongs to neither side: the first full day on the new schedule is day 1.

Config: all keys and defaults.

masking

Whether a light pulse changed activity while it was on, which is not the same finding as a phase shift.

cw.call("masking", recording, pulse_start, pulse_hours, config=None)
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.
pulse_start string yes - When the light pulse began, as an ISO date-time (2026-05-11T22:00). The same clock window on the days before it becomes the control.
pulse_hours float yes hours How long the pulse lasted. Must be greater than zero.
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.

Config: all keys and defaults.

sleep

Sleep scored as sustained immobility, split by light and dark, with bouts and fragmentation.

cw.call("sleep", recording, config=None)
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.

Config: all keys and defaults.

food_anticipation

Whether the animal became active before a declared mealtime, and whether that anticipation survived a fast.

cw.call("food_anticipation", recording, config=None)
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.

Config: all keys and defaults.

two_process_fit

Fit the two-process model of sleep regulation to a scored record, and report which of its parameters the record does not separate.

cw.call("two_process_fit", sleep_result, period_hours=None, acrophase_hours=None, config=None)
Name Type Required Default Units Meaning
sleep_result object yes - An immobility_sleep result, whole. A record it refused to score is refused here for the same reason rather than re-derived.
period_hours float no null hours The cycle the phases live on. Omit to use the config's period_hours (24 h by default). A free-running cohort should pass its own tau, so that 'one cycle' means one of the animals' cycles rather than one solar day. splitting uses it for a second purpose that is the same idea: the period the resolution element P**2/T is worked out at, which sets how far apart two components must be before that record can show them to differ.
acrophase_hours number no null hours The circadian term's acrophase, in hours, from the package's own measurement. It is echoed back unchanged: a model that re-fitted it would compete with the measurement it came from.
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.

Config: all keys and defaults.

two_process_predict

Run the fitted sleep model forward under a proposed cycle length, once per parameter set the record cannot rule out.

cw.call("two_process_predict", fit, schedule, config=None)
Name Type Required Default Units Meaning
fit object yes - A two_process_fit result, whole. A fit with no parameters -- a record the model refused -- is refused here rather than run with defaults.
schedule object yes - The proposed schedule: days, period_hours, and optionally acrophase_hours and label. The acrophase defaults to the one the record was fitted under, which assumes the animal holds the same phase angle; where it would not, entrainment_range predicts the new one and it should be passed here.
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.

Config: all keys and defaults.

entrainment_range

Which zeitgeber periods a measured phase response curve predicts this animal can entrain to, and the phase angle it would sit at.

cw.call("entrainment_range", curve, tau_hours, config=None)
Name Type Required Default Units Meaning
curve object yes - A phase_response_curve result, whole. Its fit is what is iterated; a curve with no fit -- too few animals -- is refused rather than predicted from.
tau_hours number yes hours The animal's own free-running period, in hours. The cohort curve does not carry it because a cohort has one per animal.
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.

Config: all keys and defaults.

predicted_reentrainment

How many cycles the same curve predicts a schedule shift will take, and the transient on the way.

cw.call("predicted_reentrainment", curve, tau_hours, shift_hours, t_hours=24.0, config=None)
Name Type Required Default Units Meaning
curve object yes - A phase_response_curve result, whole. Its fit is what is iterated; a curve with no fit -- too few animals -- is refused rather than predicted from.
tau_hours number yes hours The animal's own free-running period, in hours. The cohort curve does not carry it because a cohort has one per animal.
shift_hours number yes hours How far the schedule moved, in hours, POSITIVE for an advance -- the transition arriving earlier -- which is the phase response curve's own sign convention.
t_hours number no 24.0 hours The zeitgeber period the animal is being shifted within, in hours.
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.

Config: all keys and defaults.

paired_measures

The same subjects measured in two epochs: what moved, by how much, and whether pairing bought any precision.

cw.call("paired_measures", epochs, config=None, circular_measures=None)
Name Type Required Default Units Meaning
epochs object yes - The epochs of one study, each a list of subject entries: {"baseline": [{"subject_id": "m01", "measures": {"period_hours": 23.8}}, ...], "treatment": [...]}. Pairing is by subject_id, so a subject missing from any epoch is dropped and named. paired_measures takes exactly two and longitudinal_measures three or more; each refuses the other's shape by name.
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.
circular_measures array no null - Which measure names are clock times rather than plain numbers, e.g. ["acrophase_hours"]. Those are differenced round the circle -- 23.5 h to 00.5 h is +1 h, not -23 h -- and tested with a Rayleigh test. Nothing is inferred from a name.

Config: all keys and defaults.

longitudinal_measures

The same subjects measured at three or more ordered visits: the omnibus across visits, the linear trend along them, and the pairs.

cw.call("longitudinal_measures", epochs, config=None, circular_measures=None, order=None)
Name Type Required Default Units Meaning
epochs object yes - The epochs of one study, each a list of subject entries: {"baseline": [{"subject_id": "m01", "measures": {"period_hours": 23.8}}, ...], "treatment": [...]}. Pairing is by subject_id, so a subject missing from any epoch is dropped and named. paired_measures takes exactly two and longitudinal_measures three or more; each refuses the other's shape by name.
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.
circular_measures array no null - Which measure names are clock times rather than plain numbers, e.g. ["acrophase_hours"]. Those are differenced round the circle -- 23.5 h to 00.5 h is +1 h, not -23 h -- and tested with a Rayleigh test. Nothing is inferred from a name.
order array no null - The epoch labels in study order, e.g. ["baseline", "6_months", "12_months"]. The linear trend is fitted along this axis, so it decides what rising and falling mean. Without it the order the epochs arrived in is used and said to have been assumed.

Config: all keys and defaults.

channel_comparison

The lag between two measurement channels of one subject, with each channel's own period so the lag is not misread as a phase angle.

cw.call("channel_comparison", recording, channels, config=None)
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.
channels array yes - Exactly two measurement channel keys from this recording, e.g. ["activity", "body_temperature"]. Use inspect to list what a recording carries.
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.

Config: all keys and defaults.

splitting

Two circadian components running at once, or the reason the record carries one.

cw.call("splitting", recording, config=None, period_hours=None)
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.
period_hours float no null hours The cycle the phases live on. Omit to use the config's period_hours (24 h by default). A free-running cohort should pass its own tau, so that 'one cycle' means one of the animals' cycles rather than one solar day. splitting uses it for a second purpose that is the same idea: the period the resolution element P**2/T is worked out at, which sets how far apart two components must be before that record can show them to differ.

Config: all keys and defaults.

ultradian

The strongest component faster than a day, and how large it is beside the daily one.

cw.call("ultradian", recording, config=None)
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.

Config: all keys and defaults.

dose_response

Phase shift against stimulus dose at one circadian time: the half-maximal dose, the saturating maximum, and what was withheld.

cw.call("dose_response", dose_points, config=None, dose_unit=None)
Name Type Required Default Units Meaning
dose_points array yes - The phase shifts of one dose series, as [[dose, shift_hours, label, circadian_time], ...] or as objects with "dose", "shift_hours", an optional "label" naming the animal and an optional "circadian_time". One entry per animal per dose. The dose is in whatever unit the stimulus was measured in and the package never guesses which; the shift follows the Aschoff sign convention the rest of the package uses, advance positive.
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.
dose_unit string no null - What the dose was measured in -- lux, uW/cm2, mg, photons. A label and nothing else: it is printed wherever a dose is printed and no arithmetic is done with it. Omit it and no unit appears anywhere, which is the honest output for a package that was not told what was measured.

Config: all keys and defaults.

temperature_compensation

Q10 for the period across a temperature series, and whether the clock is compensated.

cw.call("temperature_compensation", temperature_points, config=None)
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 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.

Config: all keys and defaults.

phase_map

Phase against position across regions: whether there is a wave, and which way and how fast it travels.

cw.call("phase_map", points, config=None, period_hours=None, position_units='um')
Name Type Required Default Units Meaning
points array yes hours and position units One entry per region, each carrying a phase and a position: [{'label': 'left', 'phase_hours': 6.2, 'x': 120, 'y': 340}, ...]. A list of [label, phase_hours, x, y] arrays works too. The phases are ones the caller already measured -- acrophases from a cosinor, peak times, onsets -- and the positions are region centroids in whatever unit position_units names. Six regions is the floor; below it the plane is fitted but never tested.
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.
period_hours float no null hours The cycle the phases live on. Omit to use the config's period_hours (24 h by default). A free-running cohort should pass its own tau, so that 'one cycle' means one of the animals' cycles rather than one solar day. splitting uses it for a second purpose that is the same idea: the period the resolution element P**2/T is worked out at, which sets how far apart two components must be before that record can show them to differ.
position_units string no "um" - What the x and y in points are measured in: 'um', 'px', 'mm'. It travels through to the reported speed, which comes back in these units per hour. Nothing is converted -- this is a label, so pass the unit the positions are actually in.

Config: all keys and defaults.

coupling

How far one named trace leads another, whether that lag is a number, and whether it held.

cw.call("coupling", series_a, series_b, hours, config=None)
Name Type Required Default Units Meaning
series_a object yes recording units The first trace: {'label': 'left lobe', 'values': [...]} on the shared hours grid. A [label, values] array works too. The label is reported back as the one that leads or lags, so make it the name you would use in a figure.
series_b object yes recording units The second trace, same shape as series_a and on the same hours grid. The reported lag is negative when series_a peaks first.
hours array yes hours The shared time grid the traces are sampled on, in hours from the start of the recording.
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.

Config: all keys and defaults.

sample_size

How many units a difference needs, or what power a given n has, by simulating the test that will actually be run.

cw.call("sample_size", question='phase_difference', difference, resultant_length=0.8, n_per_group=None, target_power=0.8, config=None)
Name Type Required Default Units Meaning
question string no "phase_difference" - Which power question to answer: 'phase_difference' for two groups of phases compared on the circle, or 'mesor', 'amplitude' or 'rhythm_phase' for a cosinor parameter compared between two cohorts. 'observed' asks for post-hoc observed power and is refused with the reason, because it is a restatement of the p-value you already have.
difference float yes hours or recording units The smallest difference worth detecting, in the parameter's own units: hours for a phase, recording units for a mesor or an amplitude. Not the difference you observed -- the one that would change your mind.
resultant_length float no 0.8 - How tightly the phases within a group cluster, from 0 (scattered) to just under 1 (identical). This is the R that phase_comparison reports, so a pilot's number goes straight in. Only used by the phase_difference question.
n_per_group integer no null units per group Give it to ask 'what power do I have at this n'. Leave it out to ask 'how many do I need', which searches over n instead.
target_power float no 0.8 - The power the search aims for when n_per_group is not given. 0.8 by convention; the returned n is the smallest whose interval clears it, not whose point estimate does.
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.

Config: all keys and defaults.

compare_rhythms

Fit one cosinor to two groups and test which rhythm parameter differs.

cw.call("compare_rhythms", groups, config=None, unit='subject')
Name Type Required Default Units Meaning
groups object yes - Recordings grouped by label: {'WT': [spec, ...], 'KO': [...]}.
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.
unit string no "subject" - Unit of analysis: subject, slice, or cell.

Config: all keys and defaults.

group_comparison

Two-way mixed RM ANOVA with pointwise post-hoc across groups.

cw.call("group_comparison", groups, config=None, alpha=0.05, correction='sidak', unit='subject', sphericity='greenhouse_geisser')
Name Type Required Default Units Meaning
groups object yes - Recordings grouped by label: {'WT': [spec, ...], 'KO': [...]}.
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.
alpha float no 0.05 - Group-comparison significance threshold.
correction string no "sidak" - sidak, bonferroni, or none.
unit string no "subject" - Unit of analysis: subject, slice, or cell.
sphericity string no "greenhouse_geisser" - greenhouse_geisser, huynh_feldt, or none.

Config: all keys and defaults.

render_group_figure

Render the group overlay and optional significance bar to SVG.

cw.call("render_group_figure", groups, config=None, normalize='own_mean', time_axis='clock_time', pool_order='profile_then_pool', statistic='mean', within_recording_reducer='mean', detrended=False, alpha=0.05, correction='sidak', unit='subject', sphericity='greenhouse_geisser', statistics=True, figure_options=None)
Name Type Required Default Units Meaning
groups object yes - Recordings grouped by label: {'WT': [spec, ...], 'KO': [...]}.
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.
normalize string no "own_mean" - Value normalisation before pooling. Accepts none, mean_center, median_center, zscore, robust_zscore, robust_scale, own_mean, own_daily_total, minmax, max_abs, reference_delta, fold_change, delta_over_reference, log2_fold_change, percent_of_reference, percent_change, envelope or pre_treatment_cycle. Reference-based methods require reference metadata on each profile; use normalization_methods for formulas.
time_axis string no "clock_time" - clock_time, tau_scaled, or onset_aligned.
pool_order string no "profile_then_pool" - profile_then_pool or virtual_animal.
statistic string no "mean" - mean or median.
within_recording_reducer string no "mean" - How each recording contributes at each phase bin before pooling: mean averages selected cycles; max retains the largest observed binned value across the selected recording.
detrended boolean no false - Whether inputs are already baseline-subtracted.
alpha float no 0.05 - Group-comparison significance threshold.
correction string no "sidak" - sidak, bonferroni, or none.
unit string no "subject" - Unit of analysis: subject, slice, or cell.
sphericity string no "greenhouse_geisser" - greenhouse_geisser, huynh_feldt, or none.
statistics boolean no true - Whether to compute and render group statistics.
figure_options object no null - Optional group SVG presentation options: colors/color_map, x_bounds, x_ticks or x_tick_step, x_tick_label_offset, x_label, y_label, title, margin, legend, text_scale, title_scale, axis_scale, tick_scale, legend_scale, show_grid, group_order/order, style/house_style. style defaults to 'pyflash' for PyFLASH-compatible typography, outward ticks, frameless legends and left/bottom spines.

Config: all keys and defaults.

diagnosis_groups

Resolve cohort metadata into diagnosis-labelled recording groups.

cw.call("diagnosis_groups", cohort)
Name Type Required Default Units Meaning
cohort object yes - Metadata-driven cohort spec. Requires metadata_csv plus either a recording_column or recording_pattern; groups rows by diagnosis_column, defaulting to a diagnosis/condition/group-like column. Optional exclude_subjects removes participant IDs without editing source metadata. Optional mask_csv supplies one start/end analysis interval per subject; mask_subject_column, mask_start_column, and mask_end_column override its inferred columns.

study_report

One document for a whole study: the named analyses run on every recording of a cohort, the scalar table they produce, the group and paired comparisons, and every recording's checksum.

cw.call("study_report", cohort, analyses, config=None, epoch_column=None)
Name Type Required Default Units Meaning
cohort object yes - Metadata-driven cohort spec. Requires metadata_csv plus either a recording_column or recording_pattern; groups rows by diagnosis_column, defaulting to a diagnosis/condition/group-like column. Optional exclude_subjects removes participant IDs without editing source metadata. Optional mask_csv supplies one start/end analysis interval per subject; mask_subject_column, mask_start_column, and mask_end_column override its inferred columns.
analyses array yes - Action names to run on every recording of the study, e.g. ["cosinor", "sleep"]. Each is dispatched through this same registry, so a number in the report is the number that action returns on its own; run discover for the list of names.
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.
epoch_column string no null - Metadata column naming which epoch each recording belongs to, e.g. "epoch" holding baseline/treatment. Where it names exactly two epochs and subjects appear in both, the report runs the paired comparison; where it does not, the report says which of those it was. Omit it for a study with one epoch.

Config: all keys and defaults.

render_diagnosis_profile

Render a diagnosis-condition average activity profile overlay from cohort metadata.

cw.call("render_diagnosis_profile", cohort, config=None, normalize='own_mean', time_axis='clock_time', pool_order='profile_then_pool', statistic='mean', within_recording_reducer='mean', detrended=False, alpha=0.05, correction='sidak', unit='subject', sphericity='greenhouse_geisser', statistics=True, figure_options=None)
Name Type Required Default Units Meaning
cohort object yes - Metadata-driven cohort spec. Requires metadata_csv plus either a recording_column or recording_pattern; groups rows by diagnosis_column, defaulting to a diagnosis/condition/group-like column. Optional exclude_subjects removes participant IDs without editing source metadata. Optional mask_csv supplies one start/end analysis interval per subject; mask_subject_column, mask_start_column, and mask_end_column override its inferred columns.
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.
normalize string no "own_mean" - Value normalisation before pooling. Accepts none, mean_center, median_center, zscore, robust_zscore, robust_scale, own_mean, own_daily_total, minmax, max_abs, reference_delta, fold_change, delta_over_reference, log2_fold_change, percent_of_reference, percent_change, envelope or pre_treatment_cycle. Reference-based methods require reference metadata on each profile; use normalization_methods for formulas.
time_axis string no "clock_time" - clock_time, tau_scaled, or onset_aligned.
pool_order string no "profile_then_pool" - profile_then_pool or virtual_animal.
statistic string no "mean" - mean or median.
within_recording_reducer string no "mean" - How each recording contributes at each phase bin before pooling: mean averages selected cycles; max retains the largest observed binned value across the selected recording.
detrended boolean no false - Whether inputs are already baseline-subtracted.
alpha float no 0.05 - Group-comparison significance threshold.
correction string no "sidak" - sidak, bonferroni, or none.
unit string no "subject" - Unit of analysis: subject, slice, or cell.
sphericity string no "greenhouse_geisser" - greenhouse_geisser, huynh_feldt, or none.
statistics boolean no true - Whether to compute and render group statistics.
figure_options object no null - Optional group SVG presentation options: colors/color_map, x_bounds, x_ticks or x_tick_step, x_tick_label_offset, x_label, y_label, title, margin, legend, text_scale, title_scale, axis_scale, tick_scale, legend_scale, show_grid, group_order/order, style/house_style. style defaults to 'pyflash' for PyFLASH-compatible typography, outward ticks, frameless legends and left/bottom spines.

Config: all keys and defaults.

clear_output

Delete generated files under the output root after confirmation.

cw.call("clear_output", confirm=False)
Name Type Required Default Units Meaning
confirm boolean no false - Explicit confirmation for a destructive action.