Time to sleep for now.

This commit is contained in:
j-hartling
2026-06-18 14:50:08 +02:00
parent 4ec5fdca54
commit b085fb7e07
2 changed files with 88 additions and 78 deletions

View File

@@ -442,6 +442,7 @@ for stage in stages:
# Indicate saturation point(s):
if stage in ['log', 'inv', 'conv', 'feat']:
# Get and plot single curve saturation point:
ind = get_saturation(curve, **plateau_settings)[1]
crit_inds[stage] = ind
scale = scales[ind]
@@ -452,6 +453,13 @@ for stage in stages:
transform=raw_axes[0].get_xaxis_transform())
raw_axes[0].vlines(scale, raw_axes[0].get_ylim()[0], curve[ind],
color=color, **plateau_line_kwargs)
if stage in ['conv', 'feat']:
# Get and log distribution of swarm saturation points:
inds = np.array(get_saturation(measure, **plateau_settings)[1])
if np.isnan(inds).sum():
print('WARNING: Found NaN saturation point(s)!')
inds = inds[~np.isnan(inds)].astype(int)
crit_scales_swarm[stage] = scales[inds]
## NORMALIZED MEASURE:
@@ -476,11 +484,6 @@ for stage in stages:
fill_kwargs = dist_fill_kwargs | dict(color=color)
y_dist(base_insets[i1], measure[-1], nbins=100, log=True,
line_kwargs=line_kwargs, fill_kwargs=fill_kwargs)
# Get and log distribution of saturation points:
inds = np.array(get_saturation(measure, **plateau_settings)[1])
if np.isnan(inds).sum():
inds = inds[~np.isnan(inds)].astype(int)
crit_scales_swarm[stage] = scales[inds]
if stage == 'feat':
# Plot distribution of saturation points on shared bins:
bin_lims = [0.01, 1.1 * max([s.max() for s in crit_scales_swarm.values()])]