Skip to content

Commit

Permalink
by default compress all arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Dec 5, 2024
1 parent 313bedd commit 96ae896
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/roman_datamodels/datamodels/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ def to_asdf(self, init, *args, **kwargs):
with validate.nuke_validation(), _temporary_update_filename(self, Path(init).name):
asdf_file = self.open_asdf(**kwargs)
asdf_file["roman"] = self._instance
if "all_array_compression" not in kwargs:
kwargs["all_array_compression"] = "zlib"
asdf_file.write_to(init, *args, **kwargs)

def get_primary_array_name(self):
Expand Down
2 changes: 1 addition & 1 deletion src/roman_datamodels/maker_utils/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ def save_node(node, filepath=None):

af = asdf.AsdfFile()
af.tree = {"roman": node}
af.write_to(filepath)
af.write_to(filepath, all_array_compression="zlib")

return node

0 comments on commit 96ae896

Please sign in to comment.