spaceml-org / helio_tools

Apache License 2.0
0 stars 2 forks source link

Port Editors #11

Open nkasmanoff opened 8 months ago

jejjohnson commented 8 months ago

Would we be able to follow the same format as the helio_tools package? Try to make all "editors" functional or a data class? For example:

Functional

s_map: Map = transfrom(s_map, *args, **kwargs)

Dataclass

@dataclasses.dataclass
class Function:
   param: int = ...
   param2: float = ...

   def __call__(self, s_map: Map) -> Map:
       data: np.ndarray = s_map.data
        # do something ...
        data: np.ndarray = ....
        return Map(data, s_map.fits_header)