Skip to content

Commit

Permalink
Replace jupyter notebooks with example scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
tibuch committed Dec 13, 2023
1 parent 3dfe0e4 commit a0d5f8e
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 1,871 deletions.
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
import shutil
from pathlib import Path

from faim_hcs.hcs.acquisition import TileAlignmentOptions
from faim_hcs.hcs.cellvoyager import StackAcquisition
from faim_hcs.hcs.converter import ConvertToNGFFPlate, NGFFPlate
from faim_hcs.hcs.plate import PlateLayout
from faim_hcs.stitching import stitching_utils


def main():
# Remove existing zarr.
shutil.rmtree("cv-stack.zarr", ignore_errors=True)

# Parse CV plate acquisition.
plate = StackAcquisition(
acquisition_dir="/home/tibuch/Gitrepos/faim-hcs/resources/CV8000"
"/CV8000-Minimal-DataSet-2C-3W-4S-FP2-stack_20230918_135839/CV8000-Minimal-DataSet-2C-3W-4S-FP2-stack",
acquisition_dir=Path(__file__).parent.parent
/ "resources"
/ "CV8000"
/ "CV8000-Minimal-DataSet-2C-3W-4S-FP2-stack_20230918_135839"
/ "CV8000-Minimal-DataSet-2C-3W-4S-FP2-stack",
alignment=TileAlignmentOptions.GRID,
)
shutil.rmtree("cv-test-plate.zarr", ignore_errors=True)

# Create converter.
converter = ConvertToNGFFPlate(
ngff_plate=NGFFPlate(
root_dir=".",
name="cv-test-plate",
name="cv-stack",
layout=PlateLayout.I384,
order_name="order",
barcode="barcode",
),
yx_binning=2,
dask_chunk_size_factor=2,
warp_func=stitching_utils.translate_tiles_2d,
fuse_func=stitching_utils.fuse_mean,
)

# Run conversion.
converter.run(
plate_acquisition=plate,
well_sub_group="0",
Expand Down
Loading

0 comments on commit a0d5f8e

Please sign in to comment.