diff --git a/prose/core/image.py b/prose/core/image.py index 699fce8..6e7c244 100644 --- a/prose/core/image.py +++ b/prose/core/image.py @@ -70,6 +70,10 @@ def __post_init__(self): self.catalogs = {} if self.computed is None: self.computed = {} + + # backward compatibility + self.header = self.computed.get("fits_header", None) + if self.header is None: self.header = Header() if isinstance(self._sources, dict): @@ -261,7 +265,7 @@ def fov(self): @property def fits_header(self): """Same as :code:`header` (backward compatibility)""" - return self.header + return self.computed.get("fits_header", self.header) @property def date(self): diff --git a/prose/core/source.py b/prose/core/source.py index 692f30d..1487cec 100644 --- a/prose/core/source.py +++ b/prose/core/source.py @@ -501,10 +501,13 @@ class Sources: """List of sources""" type: Literal["PointSource", None] = None """Source type""" + source_type: Literal["PointSource", None] = None + """Legacy source type""" def __post_init__(self): if self.sources is None: self.sources = [] + self.type = self.source_type if isinstance(self.sources, np.ndarray): if self.sources.dtype != object: diff --git a/pyproject.toml b/pyproject.toml index 0eda31a..52dacbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "prose" -version = "3.2.8" +version = "3.2.9" description = "Modular image processing pipelines for Astronomy" authors = ["Lionel Garcia"] license = "MIT"