Skip to content

Commit

Permalink
MAINT: Name all keys in metadata dict equal to attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
jwboth committed Oct 9, 2023
1 parent 409d330 commit c77cd6b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/darsia/image/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(
"""Original dtype at construction of the object."""

# ! ---- Spatial meta information
self.space_dim: int = kwargs.get("dim", 2)
self.space_dim: int = kwargs.get("space_dim", 2)
"""Dimension of the spatial domain."""

self.space_num: int = np.prod(self.shape[: self.space_dim])
Expand Down Expand Up @@ -417,7 +417,7 @@ def metadata(self) -> dict:
"""
metadata = {
"dim": self.space_dim,
"space_dim": self.space_dim,
"indexing": self.indexing,
"dimensions": self.dimensions,
"origin": self.origin,
Expand Down Expand Up @@ -1499,11 +1499,11 @@ def __init__(
"""
# Define metadata specific for optical images
optical_metadata = {
"dim": 2,
"space_dim": 2,
"indexing": "ij",
"scalar": False,
}
kwargs.pop("dim", None)
kwargs.pop("space_dim", None)
kwargs.pop("indexing", None)
kwargs.pop("scalar", None)

Expand Down

0 comments on commit c77cd6b

Please sign in to comment.