Skip to content

Commit

Permalink
switch to lz4
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Dec 11, 2024
1 parent 96ae896 commit b947998
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers = [
]
dependencies = [
"asdf >=3.3.0",
"lz4",
"asdf-astropy >=0.5.0",
"gwcs >=0.19.0",
"numpy >=1.24",
Expand Down
2 changes: 1 addition & 1 deletion src/roman_datamodels/datamodels/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def to_asdf(self, init, *args, **kwargs):
asdf_file = self.open_asdf(**kwargs)
asdf_file["roman"] = self._instance
if "all_array_compression" not in kwargs:
kwargs["all_array_compression"] = "zlib"
kwargs["all_array_compression"] = "lz4"
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, all_array_compression="zlib")
af.write_to(filepath, all_array_compression="lz4")

return node

0 comments on commit b947998

Please sign in to comment.