EleFits  5.3.0
A modern C++ API on top of CFITSIO
Loading...
Searching...
No Matches

◆ section()

const PtrRaster< const T, N > section ( long  front,
long  back 
) const

Create a section between given indices.

Parameters
frontThe section front index along the last axis
backThe section back index along the last axis

A section is a maximal slice of dimension N or N-1. For example, a 3D section of a 3D raster of shape (x, y, z) is a 3D raster of shape (x, y, t) where t < z, while a 2D section of it is a 2D raster of shape (x, y).

If needed, section() can be applied recursively, e.g. to get the x-line at z = 4 and y = 2:

auto line = raster.section(4).section(2);
See also
slice()