|
4 | 4 | from caiman.source_extraction.cnmf import cnmf as cnmf |
5 | 5 | from caiman.source_extraction.cnmf.params import CNMFParams |
6 | 6 | from caiman.paths import decode_mmap_filename_dict |
7 | | -from caiman.base.movies import get_file_size |
8 | 7 | import traceback |
9 | 8 | from pathlib import Path, PurePosixPath |
10 | 9 | from shutil import move as move_file |
|
17 | 16 | ensure_server, |
18 | 17 | save_projections_parallel, |
19 | 18 | save_c_order_mmap_parallel, |
20 | | - estimate_n_pixels_per_process |
21 | 19 | ) |
22 | 20 | else: # when running with local backend |
23 | 21 | from ..batch_utils import set_parent_raw_data_path, load_batch |
24 | 22 | from ..utils import IS_WINDOWS |
25 | | - from ._utils import ensure_server, save_projections_parallel, save_c_order_mmap_parallel, estimate_n_pixels_per_process |
| 23 | + from ._utils import ensure_server, save_projections_parallel, save_c_order_mmap_parallel |
26 | 24 |
|
27 | 25 |
|
28 | 26 | def run_algo(batch_path, uuid, data_path: str = None, dview=None): |
@@ -65,14 +63,6 @@ def run_algo(batch_path, uuid, data_path: str = None, dview=None): |
65 | 63 |
|
66 | 64 | if save_new_mmap: |
67 | 65 | print("making memmap") |
68 | | - dims, T = get_file_size(input_movie_path, var_name_hdf5=cnmfe_params_dict.data['var_name_hdf5']) |
69 | | - assert isinstance(T, int) |
70 | | - print('Movie dims:', dims) |
71 | | - print('N frames:', T) |
72 | | - print('N processes:', n_processes) |
73 | | - print('N pixels per process:', chunk_size := estimate_n_pixels_per_process(n_processes, T, dims)) |
74 | | - print('Columns per chunk:', max(chunk_size // dims[0], 1)) |
75 | | - breakpoint() |
76 | 66 | fname_new = save_c_order_mmap_parallel( |
77 | 67 | input_movie_path, |
78 | 68 | base_name=f"{uuid}_cnmf-memmap_", |
|
0 commit comments