Skip to content

Commit

Permalink
Remove unused code and refactor (#79)
Browse files Browse the repository at this point in the history
* Remove unused code

* Move code to brainglobe-utils

* Simplify test structure
  • Loading branch information
adamltyson committed Jan 16, 2024
1 parent 2b19243 commit cd14205
Show file tree
Hide file tree
Showing 28 changed files with 117 additions and 1,479 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,17 @@ def run(args, cells, atlas, downsampled_space):
cell_list.append([cell.z, cell.y, cell.x])
cells = np.array(cell_list)

run_analysis(
logging.info("Transforming points to atlas space")
transformed_cells, points_out_of_bounds = transform_points_to_atlas_space(
cells,
args.signal_planes_paths[0],
args.orientation,
args.voxel_sizes,
atlas,
deformation_field_paths,
downsampled_space,
args.paths.downsampled_points,
args.paths.atlas_points,
args.paths.brainrender_points,
args.brainreg_paths.volume_csv_path,
args.paths.all_points_csv,
args.paths.summary_csv,
)


def run_analysis(
cells,
signal_planes,
orientation,
voxel_sizes,
atlas,
deformation_field_paths,
downsampled_space,
downsampled_points_path,
atlas_points_path,
brainrender_points_path,
volume_csv_path,
all_points_csv_path,
summary_csv_path,
):
logging.info("Transforming points to atlas space")
transformed_cells, points_out_of_bounds = transform_points_to_atlas_space(
cells,
signal_planes,
orientation,
voxel_sizes,
downsampled_space,
atlas,
deformation_field_paths,
downsampled_points_path=downsampled_points_path,
atlas_points_path=atlas_points_path,
downsampled_points_path=args.paths.downsampled_points,
atlas_points_path=args.paths.atlas_points,
)
logging.warning(
f"{len(points_out_of_bounds)} points ignored due to falling outside "
Expand All @@ -75,11 +43,11 @@ def run_analysis(
cells,
transformed_cells,
atlas,
volume_csv_path,
all_points_csv_path,
summary_csv_path,
args.brainreg_paths.volume_csv_path,
args.paths.all_points_csv,
args.paths.summary_csv,
)
logging.info("Exporting data to brainrender")
export_points_to_brainrender(
transformed_cells, atlas.resolution[0], brainrender_points_path
transformed_cells, atlas.resolution[0], args.paths.brainrender_points
)
Empty file.

0 comments on commit cd14205

Please sign in to comment.