5.48. group_by¶
Groups the FitsArray by the given header.
- FitsArray.group_by(groups: str | List[str]) Dict[Any, Self]¶
Groups the
FitsArrayby the given header.Parameters
groupsUnion[str, List[str]]Header keys to group by.
Returns
Dict[Any, FitsArray]A dictionary mapping header keys to
FitsArraypairs.
5.48.1. Example:¶
from myraflib import FitsArray
import math
fa = FitsArray.sample()
groped_fa = fa.group_by("IMAGETYP")