arista.viz.sigmoid_fits
Sigmoid-fit overlay of the response curves.
One panel per cell type. Within each panel: a light scatter of every
(Δtarget, ΔF/F) point in the response frame, overlaid with one fitted
4PL sigmoid per strain. Per-strain colours come from
arista.constants.STRAIN_COLOURS so the same strain reads the
same across response_curves / gain_comparison / sigmoid_fits panels.
For groups too sparse / flat to fit, the scatter still appears but no curve is drawn — failure is silent, not an exception, so the figure still renders for the full corpus.
Functions
|
One panel per cell type; one fitted sigmoid per strain. |
Classes
|
Callable wrapper holding default styling. |
- class arista.viz.sigmoid_fits.SigmoidFits(cell_types=('CC', 'HC'), figsize=(10, 5), dpi=200, strains=None, n_curve=200, scatter_alpha=0.18, scatter_size=8.0)[source]
Bases:
objectCallable wrapper holding default styling.
Mirrors
arista.viz.response_curves.ResponseCurves.- Parameters:
- plot(data, *, stimulus_name=None, title=None, **overrides)[source]
- Parameters:
data (pd.DataFrame | sqlite3.Connection)
stimulus_name (str | None)
title (str | None)
- Return type:
Figure
- arista.viz.sigmoid_fits.plot_sigmoid_fits(data, *, stimulus_name=None, cell_types=('CC', 'HC'), strains=None, figsize=(10, 5), title=None, n_curve=200, scatter_alpha=0.18, scatter_size=8.0)[source]
One panel per cell type; one fitted sigmoid per strain.
- Parameters:
data (pd.DataFrame | sqlite3.Connection) – Either an already-fetched response frame (output of
fetch_response_data()) or a live SQLite connection.stimulus_name (str | None) – Mandatory when
datais a connection.cell_types (tuple[str, ...]) – Cell types to plot, one panel per.
strains (tuple[str, ...] | None) – Optional strain whitelist.
title (str | None) – Optional figure suptitle (auto from
stimulus_name).n_curve (int) – Number of x-samples in each plotted sigmoid line.
scatter_alpha (float) – Per-point alpha for the underlying scatter.
scatter_size (float) – Per-point marker area for the scatter.
- Returns:
matplotlib.figure.Figure. Caller owns I/O.- Return type:
Figure