Expand description
Adaptive data type wrapper that preserves FITS column precision.
This module wraps HEALPix map data with the appropriate type (f32 or f64) based on the source FITS column, avoiding unnecessary conversions.
§Memory & Performance Impact
By keeping f32 data as f32 instead of converting to f64:
- Time saved: 6.8s (62.4% of FITS reading for large maps)
- Memory saved: 3.2 GB (for 806M pixel maps)
- Precision: Sufficient for visualization (32-bit color depth)
§Usage
ⓘ
use map2fig::data_array::DataArray;
// Generic operations
let min = data.min_value();
let max = data.max_value();
let len = data.len();
// Type-specific operations
let scaled = data.scale_value(val, min_v, max_v);Enums§
- Data
Array - Adaptive array wrapper: holds HEALPix data in the native FITS precision.
Functions§
- to_
f64_ vec - Temporary compatibility wrapper: convert DataArray to
Vec<f64>Used for gradual migration of existing code