Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Elution Range

Overview of the Data

The data set used here for explanation looks like this.

import numpy as np
import matplotlib.pyplot as plt
from molass.Local import get_local_settings
from molass.DataObjects import SecSaxsData as SSD
local_settings = get_local_settings()
PKS_DATA = local_settings['PKS_DATA']
ssd = SSD(PKS_DATA)
ssd.plot_3d();
<Figure size 1200x500 with 2 Axes>

Trimming in Elution Axis

Trimming by Moment

from molass.Stats import Moment
xr_icurve = ssd.xr.get_icurve()
uv_icurve = ssd.uv.get_icurve()
x = xr_icurve.x
y = xr_icurve.y
mt = Moment(x, y)
mean, std = mt.get_meanstd()
fig, (ax1,ax2) = plt.subplots(ncols=2, figsize=(10,4))
ax1.set_title("Original Data")
ax2.set_title(r"2$\sigma$-Trimmed Data")
ax1.plot(x, y)
wanted_range = np.logical_and(mean-2*std < x, x < mean+2*std)
ax2.plot(x[wanted_range], y[wanted_range])
for p in [mean-2*std, mean-std, mean, mean+std, mean+2*std]:
    for ax in ax1, ax2:
        ax.axvline(p, color='yellow')
<Figure size 1000x400 with 2 Axes>
mt.get_nsigma_points(2)
(np.int64(199), np.int64(1157))