Skip to content
Snippets Groups Projects
Commit 0d3bb03f authored by pswain's avatar pswain
Browse files

fix(pipeline): baby.errors.BadOutput caught

parent d6e76266
No related branches found
No related tags found
No related merge requests found
...@@ -386,7 +386,11 @@ class Pipeline(ProcessABC): ...@@ -386,7 +386,11 @@ class Pipeline(ProcessABC):
result = babyrunner.run_tp(i) result = babyrunner.run_tp(i)
except baby.errors.Clogging: except baby.errors.Clogging:
self.log( self.log(
"WARNING:Clogging threshold exceeded in BABY." "WARNING: Clogging threshold exceeded in BABY."
)
except baby.errors.BadOutput:
self.log(
"WARNING: Bud has been assigned as its own mother."
) )
baby_writer.write( baby_writer.write(
data=result, data=result,
...@@ -471,7 +475,8 @@ def check_earlystop(filename: str, es_parameters: dict, tile_size: int): ...@@ -471,7 +475,8 @@ def check_earlystop(filename: str, es_parameters: dict, tile_size: int):
) )
# find tiles with cells covering too great a fraction of the tiles' area # find tiles with cells covering too great a fraction of the tiles' area
traps_above_athresh = ( traps_above_athresh = (
cells_used.groupby("trap").sum().apply(np.mean, axis=1) / tile_size**2 cells_used.groupby("trap").sum().apply(np.mean, axis=1)
/ tile_size**2
> es_parameters["thresh_trap_area"] > es_parameters["thresh_trap_area"]
) )
return (traps_above_nthresh & traps_above_athresh).mean() return (traps_above_nthresh & traps_above_athresh).mean()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment