dacapo.gp.reject_if_empty
Module Contents
Classes
Reject batches based on the masked-in vs. masked-out ratio. |
Attributes
- 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 usep (
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()orupdates()to announce the arrays and points provided or changed by this node.
- provide(request)
To be implemented in subclasses.
This function takes a
BatchRequestand should return the correspondingBatch.- Parameters:
request (
BatchRequest) – The request to process.