ISISComputingGroup/ibex_bluesky_core
Gaussian guess - guess negative Gaussian if peak 'looks' negative.
开放
#299 创建于 2025年12月16日
good first issue
仓库指标
- 星标
- (4 个星标)
- PR 合并指标
- (PR 指标待抓取)
描述
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)
- 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