Skip to content

Commit

Permalink
Move all map metadata properties onto a Mixin class
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Apr 3, 2024
1 parent 0886efa commit e902500
Show file tree
Hide file tree
Showing 9 changed files with 838 additions and 764 deletions.
802 changes: 44 additions & 758 deletions sunpy/map/mapbase.py

Large diffs are not rendered by default.

Empty file added sunpy/map/mixins/__init__.py
Empty file.
783 changes: 783 additions & 0 deletions sunpy/map/mixins/mapmeta.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sunpy/map/sources/gong.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

__all__ = ['GONGSynopticMap', 'GONGHalphaMap']

from sunpy.map.mapbase import SpatialPair
from sunpy.map.mixins.mapmeta import SpatialPair

_SITE_NAMES = {
'LE': 'Learmonth',
Expand Down
3 changes: 2 additions & 1 deletion sunpy/map/sources/iris.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

import astropy.units as u

from sunpy.map.mapbase import GenericMap, SpatialPair
from sunpy.map.mapbase import GenericMap
from sunpy.map.mixins.mapmeta import SpatialPair

__all__ = ['SJIMap']

Expand Down
3 changes: 2 additions & 1 deletion sunpy/map/sources/rhessi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import astropy.units as u

from sunpy.map.mapbase import GenericMap, SpatialPair
from sunpy.map.mapbase import GenericMap
from sunpy.map.mixins.mapmeta import SpatialPair

__all__ = ['RHESSIMap']

Expand Down
3 changes: 2 additions & 1 deletion sunpy/map/sources/sdo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from astropy.visualization import AsinhStretch
from astropy.visualization.mpl_normalize import ImageNormalize

from sunpy.map.mapbase import GenericMap, SpatialPair
from sunpy.map.mapbase import GenericMap
from sunpy.map.mixins.mapmeta import SpatialPair
from sunpy.map.sources.source_type import source_stretch

__all__ = ['AIAMap', 'HMIMap', 'HMISynopticMap']
Expand Down
3 changes: 2 additions & 1 deletion sunpy/map/sources/soho.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from astropy.visualization.mpl_normalize import ImageNormalize

from sunpy import log
from sunpy.map.mapbase import GenericMap, SpatialPair
from sunpy.map.mapbase import GenericMap
from sunpy.map.mixins.mapmeta import SpatialPair
from sunpy.map.sources.source_type import source_stretch
from sunpy.time import parse_time

Expand Down
3 changes: 2 additions & 1 deletion sunpy/map/sources/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from astropy.visualization import LogStretch
from astropy.visualization.mpl_normalize import ImageNormalize

from sunpy.map.mapbase import GenericMap, SpatialPair
from sunpy.map.mapbase import GenericMap
from sunpy.map.mixins.mapmeta import SpatialPair
from sunpy.map.sources.source_type import source_stretch

__all__ = ['TRACEMap']
Expand Down

0 comments on commit e902500

Please sign in to comment.