pub struct CubeMeta {
pub path: PathBuf,
pub nx: usize,
pub ny: usize,
pub nfreq: usize,
pub nstokes: usize,
pub dx_deg: f64,
pub dy_deg: f64,
pub crpix_freq: i64,
pub beams: Vec<Option<Beam>>,
pub is_4d: bool,
pub unit: BrightnessUnit,
pub dtype: PixelType,
}Expand description
Metadata for a FITS spectral cube (3D or 4D).
Fields§
§path: PathBuf§nx: usizeFastest-varying spatial axis size (RA/x pixels).
ny: usizeSlower spatial axis size (Dec/y pixels).
nfreq: usizeNumber of frequency channels.
nstokes: usizeNumber of Stokes planes (1 for most ASKAP data).
dx_deg: f64|CDELT1| in degrees.
dy_deg: f64|CDELT2| in degrees.
crpix_freq: i64FITS 1-based CRPIX for the spectral axis (used as the header reference channel).
beams: Vec<Option<Beam>>Per-channel beams. None means the channel is masked / has no valid beam.
is_4d: boolTrue for 4D input (has a Stokes axis in the header).
unit: BrightnessUnitBrightness unit from BUNIT (defaults to Jy/beam if absent).
dtype: PixelTypeWorking pixel precision, derived from FITS BITPIX.
Implementations§
Source§impl CubeMeta
impl CubeMeta
Sourcepub fn channel_range(&self, chan: usize) -> (usize, usize)
pub fn channel_range(&self, chan: usize) -> (usize, usize)
Flat element range [start, end) of frequency channel chan (Stokes 0)
in the primary data unit. For 3D [nfreq, ny, nx] and 4D
[nstokes=1, nfreq, ny, nx] cubes the offset is chan * ny * nx.
Sourcepub fn beamlog_path(&self) -> PathBuf
pub fn beamlog_path(&self) -> PathBuf
Beamlog path co-located with the FITS file.