Skip to content

Add ttest#3133

Draft
FranziskaWinterstein wants to merge 6 commits into
mainfrom
add_ttest
Draft

Add ttest#3133
FranziskaWinterstein wants to merge 6 commits into
mainfrom
add_ttest

Conversation

@FranziskaWinterstein

Copy link
Copy Markdown
Contributor

Description

This new preprocessor function calculates a t-test and adds the resulted p-value as an Ancillary Variable to the model cubes. This p-value can later be used for hatching non-significant values when plotting the bias of model and reference. It is planned to add such in monitor/multi_datasets.py.

Link to documentation:

Closes #3132 3132


Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


@CLAassistant

CLAassistant commented Jun 24, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@FranziskaWinterstein FranziskaWinterstein marked this pull request as draft June 24, 2026 09:44
@FranziskaWinterstein

FranziskaWinterstein commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Currently the processing fails with

  File "/work/bd1132/b309109/conda_envs/envs/esmvaltool/lib/python3.13/site-packages/numpy/_core/fromnumeric.py", line 86, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
      ^^^^^^^^^^^^^^^^^
numpy.exceptions.AxisError: <exception str() failed>

see also attached main_log_debug.txt

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.08696% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.03%. Comparing base (d7e7586) to head (2beb91e).

Files with missing lines Patch % Lines
esmvalcore/preprocessor/_compare_with_refs.py 24.44% 34 Missing ⚠️

❌ Your patch check has failed because the patch coverage (26.08%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3133      +/-   ##
==========================================
- Coverage   96.23%   96.03%   -0.21%     
==========================================
  Files         273      273              
  Lines       16132    16174      +42     
==========================================
+ Hits        15525    15532       +7     
- Misses        607      642      +35     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Adding ttest as a preprocessor function

2 participants