-
Notifications
You must be signed in to change notification settings - Fork 5
Description
As far as I know, there isn't yet a builtin way of visually comparing spectra.* I think this would be particularly useful for comparing the spectrum of an unknown mixture to the spectrum of a known compound, and seeing if important spectral features are present. As suggested by @laserkelvin, such a function likely best belongs in the analysis module.
Here is what I envisage for this function:
analysis.plot_experiments(experiments,inttype=None,overlay=True,xsync=True)
Parameters:
- experiments (tuple-like) -
AssignmentSessionobjects to be compared. inttype (str, optional) - In accordance with Enhancing AssignmentSession.plot_spectrum() #19, choose whether to plot "Intensity" or "SNR". DefaultSee Enhancing AssignmentSession.plot_spectrum() #19 discussion.Noneis to plot "SNR" if available, else "Intensity".- overlay (bool, optional) - If
True, spectral traces of each experiment are added to the same plot. IfFalse, a subplot of each experiment is created in vertical stacking. - xsync (bool, optional) - When
True, synchronizes the x-axes of all subplots so that when one is changed, all are changed. Otherwise each x-axis is independent of the others. This option is not applied whenoverlay = True, as there is only one x-axis in that case.
*There is a correlate_experiments() function and corresponding plot wrapper functions in the analysis module, but as I understand it, this doesn't have the desired functionality since it only returns coincident frequencies. Also, encountered error in trying to use this function, see #20.