pysecs.SECS.from_observations#

classmethod SECS.from_observations(obs_loc: ndarray, r_shell: float, spacing: float | tuple[float, float] | None = None, padding: float | None = None, min_distance: float | None = None, df: bool = True, cf: bool = False) SECS#

Build a SECS with an automatically generated grid.

Lays out a regular divergence-free and/or curl-free grid covering the given observation locations with pysecs.make_grid() and constructs a SECS on it. This is a convenience constructor for the common case of a single grid at a single shell radius; call pysecs.make_grid() directly for more control (e.g. independent df/cf grids, or an additional image shell via pysecs.make_image_grid()).

Parameters:
  • obs_loc (ndarray (nobs, 3 [lat, lon, r])) – The observation locations the grid should cover.

  • r_shell (float) – The radius of the SEC shell.

  • spacing – Passed to pysecs.make_grid().

  • padding – Passed to pysecs.make_grid().

  • min_distance – Passed to pysecs.make_grid().

  • df (bool) – Whether to place divergence-free SECs on the grid. Default: True

  • cf (bool) – Whether to place curl-free SECs on the grid. Default: False

Returns:

A SECS constructed on the generated grid.

Return type:

SECS