pub fn read_fits_with_pattern(
dir_path: impl AsRef<str>,
pattern: impl AsRef<str>,
experiment_type: ExperimentType,
) -> Result<DataFrame, FitsLoaderError>
Expand description
Reads FITS files matching a pattern in a directory and combines them into a single DataFrame.
§Arguments
dir_path
- Path to the directory containing FITS filespattern
- Glob pattern to match files (e.g., “Y6_refl_*.fits”)experiment_type
- Type of experiment (e.g.,ExperimentType::Xrr
)
§Returns
A Result
containing either the combined DataFrame or a FitsLoaderError
.
§Example
use pyref_core::{read_fits_with_pattern, ExperimentType};
let df = read_fits_with_pattern("path/to/directory", "Y6_refl_*.fits", ExperimentType::Xrr);