Add files via upload
This commit is contained in:
parent
d6839094f8
commit
25efb8b341
2 changed files with 8 additions and 3 deletions
|
@ -83,7 +83,8 @@ def main(*, config_filename: str = "config.json") -> None:
|
|||
display_image = np.nan_to_num(display_image, nan=1.0)
|
||||
|
||||
value_sort = np.sort(image_var.flatten())
|
||||
value_sort_max = value_sort[int(value_sort.shape[0] * 0.95)]
|
||||
value_sort_max = value_sort[int(value_sort.shape[0] * 0.95)] * 3
|
||||
print(value_sort_max)
|
||||
mylogger.info("-==- DONE -==-")
|
||||
|
||||
mylogger.info("Create figure")
|
||||
|
|
|
@ -32,6 +32,7 @@ def main(*, config_filename: str = "config.json") -> None:
|
|||
|
||||
path: str = config["ref_image_path"]
|
||||
use_channel: str = "donor"
|
||||
padding: int = 20
|
||||
|
||||
image_ref_file: str = os.path.join(path, use_channel + ".npy")
|
||||
heartbeat_mask_file: str = os.path.join(path, "heartbeat_mask.npy")
|
||||
|
@ -40,9 +41,11 @@ def main(*, config_filename: str = "config.json") -> None:
|
|||
mylogger.info(f"loading image reference file: {image_ref_file}")
|
||||
image_ref: np.ndarray = np.load(image_ref_file)
|
||||
image_ref /= image_ref.max()
|
||||
image_ref = np.pad(image_ref, pad_width=padding)
|
||||
|
||||
mylogger.info(f"loading heartbeat mask: {heartbeat_mask_file}")
|
||||
mask: np.ndarray = np.load(heartbeat_mask_file)
|
||||
mask = np.pad(mask, pad_width=padding)
|
||||
|
||||
image_3color = np.concatenate(
|
||||
(
|
||||
|
@ -68,6 +71,7 @@ def main(*, config_filename: str = "config.json") -> None:
|
|||
nonlocal mask
|
||||
|
||||
mylogger.info(f"Save mask to: {refined_mask_file}")
|
||||
mask = mask[padding:-padding, padding:-padding]
|
||||
np.save(refined_mask_file, mask)
|
||||
|
||||
exit()
|
||||
|
|
Loading…
Reference in a new issue