ISISComputingGroup / ISISComputingGroup/ibex_bluesky_core

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

Open Beginner friendly
#299 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
4
Forks
0
Avg merge
1d 33m
Merged PRs (30d)
6

Description

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: https://github.com/ISISComputingGroup/ibex_bluesky_core/blob/5de624a00d4236d36f0d2e606afea9c22892e842/src/ibex_bluesky_core/fitting.py#L159
- 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)`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/ibex_bluesky_core/fitting.py around line 159 and read the existing Gaussian-guessing logic and _guess_cen_and_width entry point. Implement the negative-versus-positive selection described in the issue, including inverted-data centre and width, then verify that both tail configurations produce the expected Gaussian guesses.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.