pyampp.sfq.utils

Functions

idl_where(→ numpy.ndarray)

IDL-like WHERE: return flat indices; return [-1] if no match.

u_grid(→ dict[str, numpy.ndarray])

Build an IDL-like pixel grid centered at pos.

u_grid_box(→ dict[str, numpy.ndarray])

Build a regular 2D grid from start/extents/sample counts.

u_str_add(s, tags, *values)

Minimal IDL-like struct tag add/update helper.

norm_vec(→ float)

Module Contents

pyampp.sfq.utils.idl_where(mask: numpy.ndarray) numpy.ndarray[source]

IDL-like WHERE: return flat indices; return [-1] if no match.

pyampp.sfq.utils.u_grid(pos: numpy.ndarray, n: tuple[int, int]) dict[str, numpy.ndarray][source]

Build an IDL-like pixel grid centered at pos.

pyampp.sfq.utils.u_grid_box(start: numpy.ndarray, extent: numpy.ndarray, n: numpy.ndarray) dict[str, numpy.ndarray][source]

Build a regular 2D grid from start/extents/sample counts.

pyampp.sfq.utils.u_str_add(s: dict, tags, *values)[source]

Minimal IDL-like struct tag add/update helper.

pyampp.sfq.utils.norm_vec(v: numpy.ndarray) float[source]