ProcessPlans

more info coming…

class mosaicpy.processplan.ProcessPlan(llsdir, imps=[], t_range=None, c_range=None)

A class to store the processing plan for a given data directory and set of Imps

The ProcessPlan is responsible for accepting a data direcory, an ordered list of ImgProcessors, and an optional t_range and c_range for processing. It also creates the self.meta dict, which will hold and pass metadata throughout the processing chain.

Parameters:
  • llsdir (LLSdir) – instance of LLSdir, the data directory.
  • imps (list) – A list of 3 or 4-tuples, where each item contains: 1. (ImgProcessor) The image processor class (uninstantiated) 2. (dict) - The params dict that will be passed to ImgProcessor on instantiation 3. (bool) - Whether the ImgProcessor is active or not 4. (bool, optional) - Whether the ImgProcessor is collapsed in the GUI
  • t_range (list) – a list of timepoints to process. Defaults to all timepoints
  • c_range (list) – a list of channels to process. Defaults to all channels
exception PlanError

hard error if the plan cannot be executed as requested

exception PlanWarning

light error, if a plan has ill-advised steps

exception ProcessError(imp, position=None)

error occured during processing

exception SetupError(imp, position=None)
exception TeardownError(imp, position=None)
execute()

executes the processing plan, iterating over timepoints

plan(skip_warnings=False)

This actually instantiates the ImgProcessors (but does not run them).

Unless explicitly skipped, it runs check_sanity() to look for potential problems in the plan. Then in instantiates all active image processors, by calling the ImgProcessor.from_llsdir() class method.

It also creates the self.meta object that will be passed through the processing chain.

Raises:
  • self.PlanWarning – if check_sanity() fails
  • self.PlanError – if ImgProcessor instantiation fails
setup_t(data)

Called before all ImgProcs, at every timepoint.

teardown_t(data)

Called after every ImgProcs, at every timepoint.