Skip to content

Clarify interaction between center_data and fit_mean in LombScargle #17038

Open

Description

@anntzer

Description

The documentation regarding LombScargle's fit_mean, center_data, and model_parameters is a bit confusing to me. If I understand correctly, the formula in model_parameters should be something like

  • The general case: y(t) = offset + y0 + (oscillating terms) where offset is defined as the weighted mean y.
  • If center_data is False: offset is instead defined as being equal to zero; y0 is still fitted.
  • If fit_mean is False: offset is still the mean y; y0 is not included in the model anymore and in fact not even returned by model_parameters(), i.e. the coefficient at index zero is y1, not y0.

If my understanding is correct, I would guess it may be enough to include such a clarification in the documentation of model_parameters() and point to that docs in the documentation for the fit_mean and center_data parameters.

Expected behavior

No response

How to Reproduce

N/A

Versions

Documentation for Astropy 6.1.3 (https://docs.astropy.org/en/v6.1.3/api/astropy.timeseries.LombScargle.html)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions