fzhu2e / cfr

A Python package for Climate Field Reconstruction
https://fzhu2e.github.io/cfr
BSD 3-Clause "New" or "Revised" License
13 stars 6 forks source link

Warning on z-score calculation for proxy composites #7

Open khider opened 1 year ago

khider commented 1 year ago

The proxy composite scores really only make sense by proxy type (not even archive type). If a user is trying to calculate a z-score across proxies, should throw a warning.

The problem is that proxy may have a positive or negative relationship with their common variables (e.g., coral d18O and coral Sr/Ca vs temperature) and so they may need to be flipped prior to calculating the z-score. This is done automatically when calibrating against instrumental records.

Preferred solution: the LiPD files have an interpretation field indicating the direction. We could use it to automatically figure out when to flip the axis. But it would require changes to the API to create a ProxyDatabase and the pickle file would no longer be valid.

Looping @CommonClimate in that discussion.

fzhu2e commented 1 year ago

Can we modify make_composite() and flip the sign for specific proxy types? I suppose there are limited number of them.