-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store df input data since creating at runtime is not stable
- Loading branch information
1 parent
65926d1
commit 66d8fec
Showing
4 changed files
with
19 additions
and
13 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
import glob | ||
import os | ||
import tempfile | ||
import zipfile | ||
|
||
import test_df | ||
import test_lsm | ||
import zarr | ||
|
||
import test_df | ||
import test_lsm | ||
from linc_convert.modalities.df import multi_slice | ||
from linc_convert.modalities.lsm import mosaic | ||
|
||
if __name__ == "__main__": | ||
with tempfile.TemporaryDirectory() as tmp_dir: | ||
test_lsm._write_test_data(tmp_dir) | ||
output_zarr = os.path.join(tmp_dir, "output.zarr") | ||
mosaic.convert(tmp_dir, output_zarr) | ||
zarr.copy_all(zarr.open(output_zarr), zarr.open("data/lsm.zarr.zip", "w")) | ||
|
||
with tempfile.TemporaryDirectory() as tmp_dir: | ||
test_df._write_test_data(tmp_dir) | ||
output_zarr = os.path.join(tmp_dir, "output.zarr") | ||
files = glob.glob(os.path.join(tmp_dir, "*.jp2")) | ||
with zipfile.ZipFile("data/df_input.zip", "w") as z: | ||
for file in files: | ||
z.write(file, os.path.basename(file)) | ||
multi_slice.convert(files, output_zarr) | ||
zarr.copy_all(zarr.open(output_zarr), zarr.open("data/df.zarr.zip", "w")) | ||
|
||
with tempfile.TemporaryDirectory() as tmp_dir: | ||
test_lsm._write_test_data(tmp_dir) | ||
output_zarr = os.path.join(tmp_dir, "output.zarr") | ||
mosaic.convert(tmp_dir, output_zarr) | ||
zarr.copy_all(zarr.open(output_zarr), zarr.open("data/lsm.zarr.zip", "w")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
""" """ | ||
|
||
import numpy as np | ||
import zarr | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters