dacapo.gp.reject_if_empty

Module Contents

Classes

RejectIfEmpty

Reject batches based on the masked-in vs. masked-out ratio.

Attributes

logger

dacapo.gp.reject_if_empty.logger
class dacapo.gp.reject_if_empty.RejectIfEmpty(gt=None, p=0.5, background=0)

Reject batches based on the masked-in vs. masked-out ratio.

Parameters:
  • gt (ArrayKey, optional) – The gt array to use

  • p (float, optional) – The probability that we reject until gt is nonempty

setup()

To be implemented in subclasses.

Called during initialization of the DAG. Callees can assume that all upstream providers are set up already.

In setup, call provides() or updates() to announce the arrays and points provided or changed by this node.

provide(request)

To be implemented in subclasses.

This function takes a BatchRequest and should return the corresponding Batch.

Parameters:

request (BatchRequest) – The request to process.