Skip to content

Say how much time a temporal mean averaged over - #123

Merged
rajeeja merged 1 commit into
mainfrom
rajeeja/temporal-coverage
Sep 6, 2026
Merged

Say how much time a temporal mean averaged over#123
rajeeja merged 1 commit into
mainfrom
rajeeja/temporal-coverage

Conversation

@rajeeja

@rajeeja rajeeja commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

temporal_mean and anomaly both reduce along time and both return a full-length array whatever went in, so an all-NaN variable came back as outcome: complete with a field of NaN and a one-step file came back as an "anomaly" of exactly 0.0 at every element. Results now carry a temporal_coverage block, an empty mean refuses, a one-step baseline refuses on anomaly alone, and uneven per-element sample counts or single-sample groupby bins warn. 870 passed, 18 skipped locally with all pre-commit hooks green.

Both temporal_mean and anomaly reduce along time and both return a
full-length array whatever went in. Measured on a 6-element, 12-step
file: a variable missing at every step came back outcome complete with a
field of NaN, a one-step file came back as an "anomaly" of exactly 0.0
everywhere, and elements holding 1, 2 and 12 usable steps were averaged
into one finite summary.

Results now carry temporal_coverage with n_time, samples_min/max,
n_elements_with_value, n_series_with_data and, under groupby, n_bins
with bin_occupancy_min/max. An empty mean refuses; a one-step baseline
refuses on anomaly alone, since that array reads the same for any data.
A one-step temporal_mean only warns, because the value was measured and
only the word "mean" is wrong.
@rajeeja
rajeeja merged commit a816eb1 into main Sep 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant