Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting of maximum signal value #16

Closed
flo-kr opened this issue Apr 29, 2024 · 2 comments · Fixed by #17
Closed

Reporting of maximum signal value #16

flo-kr opened this issue Apr 29, 2024 · 2 comments · Fixed by #17
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@flo-kr
Copy link

flo-kr commented Apr 29, 2024

I noticed that when calling the value for 'Amplitude', the value always seems to be lower than the actual maximal values that can be called through chrom.unmixed_chromatograms() and also lower than the max values recorded in the original chromatogram in the first place.

To my understanding, 'amplitude' would be the difference between the baseline and the maximal value. Is this the intended idea?

Best

Florian

@gchure
Copy link
Member

gchure commented May 7, 2024

Hi Florian,

Thanks for opening an issue. As described here, the amplitude is not the maximum value--it's a weight applied to a skew normal distribution during the fitting.

For example, these are plots of an amplitude-weighed skew-normal distribution with the same amplitude parameter, but varying skew (alpha):
Screenshot 2024-05-07 at 12 40 21

If you want to know the maximum value of peaks that are not overlapping, you'd be better off either a) using scipy.signal.find_peaks and then use those indices to extract the signal value of those indices, or b) you could get these indices from hplc-py by looking at the attribute Chromatogram._peak_indices.

It would be pretty simple to add a height or maximum value in quantities returned by fit_peaks. I will look at that as soon as I have a chance, but you (or anyone else) are welcome to submit a pull request with the change.

@gchure gchure added help wanted Extra attention is needed enhancement New feature or request labels May 7, 2024
@gchure gchure changed the title Amplitude values to low Reporting of maximum signal value May 29, 2024
@gchure gchure linked a pull request May 29, 2024 that will close this issue
@gchure
Copy link
Member

gchure commented May 29, 2024

Hi @flo-kr , I've added reporting of the maximum signal value a new statistic reported when fit_peaks is called. Please let me know if this solves your problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants