Currently, baseline subtraction is based simply on minimum data values; implement polynomial fit or other solution.
Initial thought: divide regressed data into overlapping windows, use Anderson-Darling test for normality to identify peak location, remove peak window and do polynomial fit to remaining baseline.
|
############################################### |
|
# Absolute Max/Min Peak Height Extraction ### |
|
############################################### |
|
# -- If the user selects 'Absolute Max/Min' in the 'Peak Height |
|
# Extraction Settings' |
|
# -- within the Settings toolbar this analysis method will be used for PHE |
|
fit_half = round(len(eval_regress) / 2) |
|
|
|
min1 = min(eval_regress[:fit_half]) |
|
min2 = min(eval_regress[fit_half:]) |
|
max1 = max(eval_regress[:fit_half]) |
|
max2 = max(eval_regress[fit_half:]) |
|
|
|
################################################################ |
|
# If the user selected Peak Height Extraction, analyze PHE ### |
|
################################################################ |
|
Peak_Height = max(max1, max2) - min(min1, min2) |
|
if cg.SelectedOptions == "Peak Height Extraction": |
|
data = Peak_Height |
|
|
Currently, baseline subtraction is based simply on minimum data values; implement polynomial fit or other solution.
Initial thought: divide regressed data into overlapping windows, use Anderson-Darling test for normality to identify peak location, remove peak window and do polynomial fit to remaining baseline.
SACMES/sacmes/animation.py
Lines 638 to 657 in e88ad78