calamari.plot.PlotGrid#

class calamari.plot.PlotGrid(t_k, h_oe, values, counts, errors, value_label, family_axis, frequency_hz, sample_t, sample_h, gridding, outliers=())#

Bases: object

A resolved 2-D map on the T-H plane, in fixed orientation.

The 2-D counterpart of PlotSeries, and like it the unit of exchange between resolution (chi_map_grid(), moment_map_grid()) and drawing (draw_map()). The array orientation is fixed – values[i, j] belongs to t_k[i] and h_oe[j] – whichever parameter the input sweeps held fixed; family_axis records which axis carries one row per sweep (real sampling) and which was gridded, as provenance rather than as something a consumer must branch on.

values uses NaN for cells holding no data – deliberately a plain array, not a masked array (masked arrays surprise downstream arithmetic and do not round-trip through numpy.save); the drawing layer masks at render time. counts says how many real points each cell aggregates, so “one point, taken on trust” and “twenty points, averaged” stay distinguishable. errors (bin mode, and only when every sweep supplied per-point errors) is the standard error of each cell mean, propagated with the same conversions as the values. sample_t/sample_h are the coordinates of every real point that entered the grid, for draw_map()’s sample overlay and for auditing any gridding decision after the fact. outliers lists every point the glitch check flagged (see chi_map_grid()’s outliers=), each saying whether it was dropped or kept.