5.41. flat_combine¶
Combines FitsArray to a Fits optimized for flat combining.
- FitsArray.flat_combine(method: str = 'median', clipping: str | None = None, weights: List[str] | List[float | int] | None = None, output: str | None = None, override: bool = False) Fits¶
Combines
FitsArrayto aFitsoptimized for flat combining.Parameters
methodstrMethod of combination. Either “average”, “mean”, or “median”.
clippingstr, optionalClipping method (same as rejection in IRAF). Either “sigmaclip” or “minmax”.
weightsUnion[List[str], List[Union[float, int]]], optionalWeights to be applied before combining. If None, [1, …] will be used.
outputstr, optionalNew path to save the files.
overridebool, default=FalseIf True, delete the already existing file.
Returns
FitsThe combined
Fits.
Raises
ValueErrorWhen the number of weights is not equal to the number of FITS files.
ValueErrorWhen the method is not either “average”, “mean”, “median”, or “sum”.
ValueErrorWhen the clipping is not either “sigmaclip” or “minmax”.
5.41.1. Example:¶
from myraflib import FitsArray
fa = FitsArray.sample()
combined = fa.flat_combine()