Skip to content

Commit

Permalink
fix: map2mask error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jdickerson95 authored Dec 21, 2024
1 parent 77ff638 commit 7f34409
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ttmask/map2mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def mask_from_map(
padding_width: int,
soft_edge_width: int
) -> np.ndarray:

# Create a copy of the input data to make it writable
map_data = map_data.copy()

above_threshold = map_data >= binarization_threshold
below_threshold = map_data < binarization_threshold

Expand All @@ -40,4 +42,4 @@ def map2mask(

with mrcfile.new(output_mask, overwrite=True) as mrc:
mrc.set_data(mask.astype(np.float32))
mrc.voxel_size = pixel_size
mrc.voxel_size = pixel_size

0 comments on commit 7f34409

Please sign in to comment.