Skip to content
Snippets Groups Projects
Commit 252915c6 authored by Arin Wongprommoon's avatar Arin Wongprommoon
Browse files

fix(extraction): define candidate channels

WHY IS THIS CHANGE NEEDED?:
- invoked grouper (which used chainer, which in turn is based on
  Signal), encountered AttributeError: 'Chainer' object has no
  attributes 'candidate_channels'

HOW DOES THE CHANGE SOLVE THE PROBLEM?:
- chainer used to rely on av_channels in
  extraction/core/functions/defaults.py, so renamed that to
  candidate_channels
- added a candidate_channels attribute to Signal object to fulfil references
parent c361e004
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,17 @@ class Signal(BridgeH5): ...@@ -33,6 +33,17 @@ class Signal(BridgeH5):
"mother_label", "mother_label",
) )
self.candidate_channels = (
"GFP",
"GFPFast",
"mCherry",
"Flavin",
"Citrine",
"mKO2",
"Cy5",
"pHluorin405",
)
equivalences = { equivalences = {
"m5m": ("extraction/GFP/max/max5px", "extraction/GFP/max/median") "m5m": ("extraction/GFP/max/max5px", "extraction/GFP/max/median")
} }
......
...@@ -17,7 +17,7 @@ def exparams_from_meta( ...@@ -17,7 +17,7 @@ def exparams_from_meta(
"multichannel_ops": {}, "multichannel_ops": {},
} }
av_channels = { candidate_channels = {
"Citrine", "Citrine",
"GFP", "GFP",
"GFPFast", "GFPFast",
...@@ -41,9 +41,9 @@ def exparams_from_meta( ...@@ -41,9 +41,9 @@ def exparams_from_meta(
default_rm = {r: default_metrics for r in default_reductions} default_rm = {r: default_metrics for r in default_reductions}
# default_rm["None"] = ["nuc_conv_3d"] # Uncomment this to add nuc_conv_3d (slow) # default_rm["None"] = ["nuc_conv_3d"] # Uncomment this to add nuc_conv_3d (slow)
av_flch = av_channels.intersection(meta["channels/channel"]).difference( av_flch = candidate_channels.intersection(
{"Brightfield", "DIC", "BrightfieldGFP"} meta["channels/channel"]
) ).difference({"Brightfield", "DIC", "BrightfieldGFP"})
for ch in av_flch: for ch in av_flch:
base["tree"][ch] = default_rm base["tree"][ch] = default_rm
......
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