pub fn read_fits_file(
file_path: impl AsRef<Path>,
experiment_type: ExperimentType,
) -> Result<DataFrame, FitsLoaderError>
Expand description
Reads a FITS file and converts it to a Polars DataFrame.
§Arguments
file_path
- Path to the FITS file to readexperiment_type
- Type of experiment (e.g.,ExperimentType::Xrr
)
§Returns
A Result
containing either the DataFrame or a FitsLoaderError
.
§Example
use pyref_core::{read_fits_file, ExperimentType};
use std::path::Path;
let df = read_fits_file("path/to/file.fits", ExperimentType::Xrr);