calamari.plot.interpolate_family#

calamari.plot.interpolate_family(grid, *, max_gap, n_rows=None)#

Interpolate a map’s family axis: filled colour between the sweeps.

The family-axis counterpart of gridding='interp', and the same bargain: interpolation asserts values between measurements, so max_gap (in family-axis units – K for a temperature family, Oe for a field family) must say how far apart two sweeps may sit before the space between them is a hole rather than a gradient. Rows further apart than that stay NaN, exactly as the row-per-sweep rendering leaves them grey.

Returns a new PlotGrid whose family axis is a dense, evenly spaced grid over the measured range (n_rows rows; default _FAMILY_INTERP_DENSITY per input sweep), with each scan-axis column interpolated independently across the rows where it holds data. A column a sweep did not cover donates nothing across that sweep, so scan-axis holes are never bridged sideways; a column with data in fewer than two sweeps has nothing to interpolate between and stays NaN. Interpolation is linear in the family parameter – for a family spanning decades, the row-per-sweep rendering with family_scale='log' is usually the more honest figure.

The result is manufactured display data, and says so: counts is zero everywhere (no cell aggregates a real point), errors is dropped (a cell standard error has no meaning for an interpolated value), gridding gains a '+family-interp' suffix, and sample_t/sample_h keep every real point so the sample overlay still shows exactly what was measured. For a publication-style figure pass the result to draw_map() with show_samples=False – plot_chi_map() composes all of this in one call via family_gridding='interp'.

Return type:

PlotGrid