Skip to content

Overall idea #1

@znichollscr

Description

@znichollscr

The problem we're trying to solve

Imagine we have two timeseries, the target and the 'harmonisee'. These two timeseries must overlap for at least one point in time. We want to 'harmonise' the harmonisee to the target, that is make a 'harmonised' timeseries such that, at some join point in time, the harmonised timeseries has the same value and gradient as the target before converging back to matching the harmonisee's value and gradient at some other point in time.

Things that need to be true to close this issue

This is quite a long list, so we will likely need to split it into sub-issues.

  • Set up with the copier template (docs here: https://copier-core-python-repository.readthedocs.io/en/latest/getting-started/)
  • Package is released on PyPI
  • Add a test that we can handle harmonisation when the absolute value of the harmonisee at the harmonisation point is lower/the same/higher than the target. Then pass the test.
  • Add a test that we can handle harmonisation when the gradient of the harmonisee at the harmonisation point is lower/the same/higher than the target. Then pass the test.
  • All combinations of the two points above, giving us at least nine test cases to cover. Then pass the test.
  • A sensible error message to be raised if there is no overlap in the target and the harmonisee. Add test, then pass it.
  • Tests for the case where the target is earlier in time than the harmonisee (e.g. the target goes from 1950-2015 and the harmonisee goes from 2015-2100) and where the harmonisee is earlier in time than the target (e.g. the target goes from 2020-2100 and the harmonisee goes from 1950-2020)
  • Tests for different values of the harmonisation time point and the convergence time point
  • Tests for any different harmonisation methods we think make sense (there may be different ways to achieve harmonisation that we think are useful but ultimately it's up to the user to choose between them)
  • Support for timeseries that have units with pint
  • Package is released on conda

Additional context

A very sketchy drawing is below in case it helps jog our memory

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions