Skip to main content

export_density_tiff

Function export_density_tiff 

Source
pub fn export_density_tiff(
    path: &Path,
    data: &Array2<f64>,
    label: &str,
) -> Result<(), IoError>
Expand description

Export a single density map as a 32-bit float TIFF file.

Each pixel stores the density value (atoms/barn) as f32. We use 32-bit rather than 64-bit floats because most image viewers (Preview, GIMP, ImageJ, Fiji) cannot open 64-bit float TIFFs. The f64→f32 conversion preserves roughly 7 significant digits of precision, which is sufficient for typical density values.