3.2.3. pypago.sections.extract_grid_sections

pypago.sections.extract_grid_sections(grid, sectionslist)

Extract a list of GridSection objects from a grid object (containing coordinates and scale factors) and a list of section endpoints.

Parameters:
  • grid (pypago.grid.Grid) – Input grid containing the coordinates, mask and scale factors.
  • sectionslist (list) – List of pypago.sections.Section objects, containing section endpoints definitions.
Returns:

A tuple containing the section in the model world (pypago.sections.GridSection objects) and the indexes of the discarded sections (i.e. sections out of the domain)