Skip to content

Gaussian guess - guess negative Gaussian if peak 'looks' negative. #299

@Tom-Willemsen

Description

@Tom-Willemsen

If average([y value at minimum x], [y value at maximum x]) > (min(y) + max(y))/2, guess a negative Gaussian instead of a positive one.

Acceptance criteria

  • For a Guassian with tails higher than midpoint of y-values, negative Gaussian is guessed
  • For a Gaussian with tails lower than midpoint of y-values, positive Gaussian is guessed

Notes

  • Relevant code is here:
  • When guessing a negative Gaussian:
    • We still want to guess the centre & width using centre-of-mass - but this will now be centre-of-mass of inverted data. The easiest way to do this will be to guess the centre & width using cen, width = _guess_cen_and_width(x, -y).
    • Background guess is max(y)
    • Amplitude guess is min(y) - max(y)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions