Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions cellfinder/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

def main(
signal_array: types.array,
background_array: types.array,
voxel_sizes: Tuple[float, float, float],
background_array: Optional[types.array] = None,
start_plane: int = 0,
end_plane: int = -1,
trained_model: Optional[os.PathLike] = None,
Expand Down Expand Up @@ -55,10 +55,11 @@ def main(
----------
signal_array : numpy.ndarray or dask array
3D array representing the signal data in z, y, x order.
background_array : numpy.ndarray or dask array
3D array representing the signal data in z, y, x order.
voxel_sizes : 3-tuple of floats
Size of your voxels in the z, y, and x dimensions (microns).
background_array : numpy.ndarray or dask array, optional
3D array representing the background data in z, y, x order.
Required when skip_classification=False. Defaults to None.
start_plane : int
First plane index to process (inclusive, to process a subset of the
data).
Expand Down Expand Up @@ -224,6 +225,11 @@ def main(
detect_finished_callback(points)

if not skip_classification:
if background_array is None:
raise ValueError(
"background_array is required when "
"skip_classification=False"
)
install_path = None
model_weights = prep.prep_model_weights(
model_weights, install_path, model
Expand Down
Loading