Skip to content

Commit

Permalink
Merge branch 'map_ndcube_migration' of github.com:sunpy/sunpy into pr…
Browse files Browse the repository at this point in the history
…/7605
  • Loading branch information
nabobalis committed May 8, 2024
2 parents 0dfe9fd + 6c37fbd commit a87c774
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sunpy/map/mapbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,14 @@ def __init__(self, data, *, wcs=None, uncertainty=None, mask=None, meta,

params = list(inspect.signature(NDCube).parameters)
ndcube_kwargs = {x: kwargs.pop(x) for x in params & kwargs.keys()}
super().__init__(data, wcs=wcs, uncertainty=uncertainty, mask=mask,
super().__init__(data, wcs=None, uncertainty=uncertainty, mask=mask,
meta=MetaDict(meta), unit=unit, copy=copy,
**ndcube_kwargs)
# NDData.__init__ sets self.wcs before it sets self.meta as our wcs
# setter needs self.meta to exist we call the parent __init__ with
# wcs=None and then set self.wcs so that meta is already set before the
# wcs setter is run with the "real" wcs.
self.wcs = wcs

# Validate header
# TODO: This should be a function of the header, not of the map
Expand Down

0 comments on commit a87c774

Please sign in to comment.