You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applying the presented workflow leads to insufficient results regarding this data set (chromatogram1.csv). I already tried to manipulate the data (chromatogram1_mod.csv) so that all values are positive; however, the peaks and the corresponding areas look strange to me. Modifying specific parameters, such as the window in the baseline, only limited improved the result. Consequently, it would be great to get some help selecting the parameters to improve the result.
I am looking forward to any help.
Hi @sebastian-hogeweg. Thanks for the issue. This is something that's known for very large-valued time dimensions (see #15). I think I know what the issue is, but it will take me some time to rework how the windowing and inference operates.
In the mean time, you can work on manually adjusting the fitting parameter bounds (see param_bounds on deconvolve_peaks). I suspect broadening the location and amplitude bounds will help.
Additionally, you will need to adjust approx_peak_width in the call to fit_peaks for the background subtraction. The default value there is 2, where in your case it should be something more like 500 since your time dimension is large.
Hi @sebastian-hogeweg, hope you're doing well! Sorry for the late response on this. I've now taken a stab at addressing this issue, which should now be functional in in #20 with hplc-py v0.2.7.
Running some default script like this on your modified chromatogram data yields this:
I modified the default bounding for the parameters to be more permissive of very large signal intensities, such as that present in your chromatogram.
Also note that the approximate peak width is set to 500 rather than the default of 2. This is important when you have large time dimension in your chromatograms. I've put in a new check that will yell if your peak width is too small, which would result in a blank chromatogram.
If you're still having problems after updating, feel free to reopen the issue.
Applying the presented workflow leads to insufficient results regarding this data set (chromatogram1.csv). I already tried to manipulate the data (chromatogram1_mod.csv) so that all values are positive; however, the peaks and the corresponding areas look strange to me. Modifying specific parameters, such as the window in the baseline, only limited improved the result. Consequently, it would be great to get some help selecting the parameters to improve the result.
I am looking forward to any help.
Example code:
`
chromatogram = load_chromatogram('chromatogram1_mod.csv', cols=['time', 'signal'])
chrom = Chromatogram(chromatogram)
chrom.show()
plt.savefig("chromatogram.svg", bbox_inches="tight", transparent = False)
plt.close()
chrom = Chromatogram(chromatogram)
chrom.correct_baseline()
chrom.show()
plt.savefig("chromatogram_baseline_correction.svg", bbox_inches="tight", transparent = False)
plt.close()
peaks = chrom.fit_peaks(correct_baseline=False, prominence=0.01)
chrom.show()
plt.savefig("chromatogram_peaks.svg", bbox_inches="tight", transparent = False)
plt.show()
`
The text was updated successfully, but these errors were encountered: