Skip to content

[FEATURE] Relative Amplitude #71

Description

@emstanyer

Would it be possible to include a "Relative Amplitude" metric please?

A function to compute Relative Amplitude (RA) for a time series (e.g., activity or light). RA quantifies the day-night amplitude by comparing average level in the brightest contiguous X hours to the darkest contiguous Y hours. Typical default for activity for example - X = 10 hours and Y = 5 hours (M10 / L5 for activity; B10 / D5 for light). Higher RA = stronger day/night contrast (theoretical range 0–1).

Definition & formula:

Let M10_mean be the mean value of the time series over the most active contiguous X hours (default X = 10).

Let L5_mean be the mean value over the least active contiguous Y hours (default Y = 5).

Amplitude (AMP) = M10_mean - L5_mean.

Relative Amplitude (RA) = AMP / (M10_mean + L5_mean) = (M10_mean - L5_mean) / (M10_mean + L5_mean).

RA is bounded in theory between 0 and 1 when values are non-negative and M10_mean >= L5_mean.

Many thanks in advance,

Emily

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions