Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

run_pipelines.py 2.7 KB

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