5.3. from_pattern¶
Create a FitsArray from patterns.
- FitsArray.from_pattern(cls, pattern: str, logger: Logger | None = None, verbose: bool = False) Self¶
Create a
FitsArrayfrom patterns.Notes
This method uses a specified pattern to locate and combine FITS files into a single
FitsArrayobject.Parameters
patternstrThe pattern that can be interpreted by glob to find FITS files.
loggerOptional[Logger]An optional logger for logging messages during the operation.
verbosebool, optional, default=FalseIf set to
True, additional information will be displayed during processing.
Returns
FitsArrayThe
FitsArraycreated from the files matching the pattern.
Raises
NumberOfElementErrorRaised when the number of FITS files found is 0.
5.3.1. Example:¶
from myraflib import FitsArray
fa = FitsArray.from_pattern("PATH/TO/FILES*.fits")