12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- from view.python_core.processing_pipelines import PipelineManager
- # this tells view all settings including the folder structure of your project
- # On Windows, if you copy paths from the file explorer, make sure the string below is always of the form r"......"
- ymlfile = r"/home/aj/SharedWithWindows/view_test_data/MS_LSM/usage_lsm.yml"
- # specify the pipeline definition file to use
- pipelines_definition_file \
- = r"/home/aj/SharedWithWindows/view_test_data/MS_LSM/progs/pipelines_settings/processing_pipelines.yml"
- # specify the animals whose data is to be processed; and their corresponding pipelines
- animals = {
- # "<animal name>": ['pipeline1', 'pipeline2', 'pipeline3'],
- # "2020_02_06_OK107_GCaMP6f": ['pipeline1', 'pipeline2', 'pipeline3', 'pipeline4', 'pipeline5'],
- "2020_02_06_OK107_GCaMP6f": ['pipeline1', 'pipeline2', 'pipeline3'],
- }
- # ----------------------------------------------------------------------------------------------------------------------
- # visualization flags
- # These flags control some aspects of the graphs and plots of evaluation reports
- # -----------------------------------------------------------------------------------------------------------------------
- # Specifies a threshold that is used when creating and drawing contours of detected components
- # from their spatial footprints. Footprints are normalized by dividing by their maximum before being thresholded.
- # NOTE: Since this flag is also used when overlaying ROI information in TIF on overviews and movies,
- # please set for consistency the flag "RM_ROIThreshold" in your project YML file.
- roi_threshold = 0.75 # a float value between 0 and 1, like 0.75
- # A maximum-correlation summary image is created from the data and used as the background for showing
- # detected components. Maximum-correlation summary image is created by binning frames into non-overlapping bins, and the
- # size of these bins are controlled by this flag
- frame_bin_size = 200 # an integer value, like 200
- # ----------------------------------------------------------------------------------------------------------------------
- # required on windows when code spawns subprocesses
- # https://stackoverflow.com/questions/18204782/runtimeerror-on-windows-trying-python-multiprocessing
- if __name__ == '__main__':
- for animal, pipelines in animals.items():
- visualization_flags = {
- "roi_threshold": roi_threshold,
- "frame_bin_size": frame_bin_size
- }
- pipline_manager = PipelineManager(
- project_yml_file=ymlfile, animal=animal, pipelines_config_file=pipelines_definition_file,
- pipeline_names=pipelines, visualization_flags=visualization_flags)
- pipline_manager.run_all_pipelines(analyse_value_to_use=(1,))
|