Skip to content

Commit

Permalink
Packages/doc/dot: Adapt flowcharts for out of range DAScale values
Browse files Browse the repository at this point in the history
  • Loading branch information
t-b committed Nov 26, 2024
1 parent 2a3e811 commit 21d3431
Show file tree
Hide file tree
Showing 7 changed files with 264 additions and 187 deletions.
20 changes: 17 additions & 3 deletions Packages/doc/dot/multi-patch-seq-dascale.dot
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,23 @@ digraph G {
"Prepare DAQ" -> "Enable \"Multidevice DAQ\"";
"Pre Set Event" -> "Enable \"Autobias\"";
"Pre Set Event" -> "Set next DAScale value,\nuse the analysis parameter values as offset\nonto the earlier FastRheoEstimate guess";
"Post Sweep Event" -> "Set next DAScale value,\nuse the analysis parameter values as offset\nonto the earlier FastRheoEstimate guess";
"Post Sweep Event" -> "Mark all active headstages as passed";
n32 [label="Check if setting the DAScale value\n for the next sweep\n would be out of range"];
"Post Sweep Event" -> n32;
"Post Set Event" -> "Read active headstages from labnotebook\nand turn them all on again";
"Enable \"Multidevice DAQ\"" -> "Enable \"Repeated Acquisition\"";
"Enable \"Autobias\"" -> "Enable \"Insert TP\"";
"Mark all active headstages as passed" -> "Mark Sweep as passed";
"Mark set as passed" [label="Are all sweeps passing?"];
"Read active headstages from labnotebook\nand turn them all on again" -> "Mark set as passed";
"Read active headstages from labnotebook\nand turn them all on again" -> "Update Dashboard";
n29 [label="\"Unlocked Indexing\" is active"];
"Enable \"Repeated Acquisition\"" -> n29;
"Enable \"Insert TP\"" -> "Enable \"TP during ITI\"";
"Enable \"Insert TP\"" -> "Force Sampling Multiplier to 1";
"Mark set as passed" -> "Update Dashboard";
n39 [label="Mark set as passed"];
"Mark set as passed" -> n39 [label=Yes];
n40 [label="Mark set as failed"];
"Mark set as passed" -> n40 [label=No];
n29 -> Abort [label=Yes];
"Enable \"TP during ITI\"" -> "Valid Autobias voltage (finite and non-zero)";
"Force Sampling Multiplier to 1" -> "Check if no TTL channels are active";
Expand All @@ -58,4 +63,13 @@ digraph G {
"Turn off active non-IC headstages\nor headstages which have not passed FastRheoEstimate" -> "Check if there is at least\none active IC headstage";
"Check if there is at least\none active IC headstage" -> "All checks passed";
"All checks passed" -> Abort [label=No];
n33 [label="Set DAScale"];
n32 -> n33 [label=No];
n35 [label="Mark headstage as failed, others as passing"];
n32 -> n35 [label=Yes];
n33 -> "Mark all active headstages as passed";
n36 [label="Add \"DAScale out of range\" labnotebook entry"];
n35 -> n36;
n37 [label="Mark Sweep as failed"];
n36 -> n37;
}
31 changes: 22 additions & 9 deletions Packages/doc/dot/multi-patch-seq-fast-rheo-estimate.dot
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ digraph G {
"Write initial stepsize of 100pA into\nlabnotebook for all active IC headstages" -> "Set \"DAScale exceeded\" labnotebook entry\nto false for all active IC headstages";
"Set \"DAScale exceeded\" labnotebook entry\nto false for all active IC headstages" -> "Store active headstages in labnotebook";
"Store active headstages in labnotebook" -> "Turn off active non-IC headstages";
"Turn off active non-IC headstages" -> "Set \"User onset delay\" to 0ms";
"Set \"User onset delay\" to 0ms" -> "Set \"Termination delay\" to 0 ms";
"Set \"Termination delay\" to 0 ms" -> "Disable \"dDAQ\"/\"oodDAQ\"";
"Start DAQ/RA (only call for last active headstage)" -> "Prepare DAQ/Pre Set Event";
"Start DAQ/RA (only call for last active headstage)" -> "Post Sweep Event";
"Start DAQ/RA (only call for last active headstage)" -> "Post DAQ Event";
Expand All @@ -44,22 +47,27 @@ digraph G {
"Post Sweep Event" -> "Iterate over all active headstages";
"Post Sweep Event" -> "Store pulse duration in labnotebook";
"Post DAQ Event" -> "Update Dashboard";
"Post Set Event" -> "Mark set as passed if 1 sweep passed,\nas failure otherwise";
"Post Set Event" -> "Set \"TP during ITI\" to enabled";
n59 [label="Do we have a \"DAScale out of range\" labnotebook entry\n in the SCI"];
"Post Set Event" -> n59;
n60 -> "Enable \"Multidevice DAQ\"";
"Iterate over all active headstages" -> "Active headstages left?";
"Mark set as passed if 1 sweep passed,\nas failure otherwise" -> "Analysis parameter \"PostDAQSetDAScale\" is true";
"Set \"TP during ITI\" to enabled" -> "Set \"TP inserting\" to enabled";
n59 -> "Mark set as passed if 1 sweep passed,\nas failure otherwise" [label=No];
n62 [label="Mark set as failed"];
n59 -> n62 [label=Yes];
"Enable \"Multidevice DAQ\"" -> "Enable \"Repeated Acquisition\"";
"Active headstages left?" -> "Have all headstages passed in one sweep\nof their stimset cycle?" [label=No];
"Active headstages left?" -> "Headstage passed?" [label=Yes];
"Analysis parameter \"PostDAQSetDAScale\" is true" -> "Set DAScale to the stored LBN value taking into account\nthe analysis parameter \"PostDAQDAScaleFactor\"\nand \"PostDAQDAScaleMinOffset\"\
.\nSet it to \"PostDAQDAScaleForFailedHS\" for failed headstages.";
"Mark set as passed if 1 sweep passed,\nas failure otherwise" -> "Analysis parameter \"PostDAQSetDAScale\" is true";
n62 -> "Analysis parameter \"PostDAQSetDAScale\" is true";
n61 [label="Is \"Unlocked indexing\" active"];
"Enable \"Repeated Acquisition\"" -> n61;
"Have all headstages passed in one sweep\nof their stimset cycle?" -> "Mark sweep as failed" [label=No];
"Have all headstages passed in one sweep\nof their stimset cycle?" -> "Mark sweep as passed" [label=Yes];
"Headstage passed?" -> "Headstage exceeded DAScale\n according to labnotebook entry?" [label=No];
"Analysis parameter \"PostDAQSetDAScale\" is true" -> "Set DAScale to the stored LBN value taking into account\nthe analysis parameter \"PostDAQDAScaleFactor\"\nand \"PostDAQDAScaleMinOffset\"\
.\nSet it to \"PostDAQDAScaleForFailedHS\" for failed headstages.";
"Set DAScale to the stored LBN value taking into account\nthe analysis parameter \"PostDAQDAScaleFactor\"\nand \"PostDAQDAScaleMinOffset\"\
.\nSet it to \"PostDAQDAScaleForFailedHS\" for failed headstages." -> "Read active headstages from labnotebook\nand turn them all on again";
n61 -> Abort [label=Yes];
Expand All @@ -76,20 +84,25 @@ digraph G {
"Step size from labnotebook? (2)" -> "Offset DAScale by +10pA" [label="+10pA"];
"Step size from labnotebook? (2)" -> "Offset DAScale by +100pA" [label="+100pA"];
"Store DAScale in labnotebook" -> "Mark headstage as passed";
"Mark headstage as failed" [label="Would the new DAScale value\n for the next sweep be out of range?"];
"Offset DAScale by -50pA" -> "Mark headstage as failed";
"Write step size of -50pA to labnotebook" -> "Offset DAScale by -50pA";
"Write step size of +10pA to labnotebook" -> "Offset DAScale by +10pA";
"Offset DAScale by +10pA" -> "Mark headstage as failed";
"Offset DAScale by +100pA" -> "Mark headstage as failed";
"Mark headstage as passed" -> "Set DAScale to zero";
"Mark headstage as failed" -> "\"MaximumDAScale\" analysis parameter is not NaN?";
n64 [label="Add \"DAScale out of range\" labnotebook entry"];
"Mark headstage as failed" -> n64 [label=Yes];
n68 [label="Set DAScale"];
"Mark headstage as failed" -> n68;
n66 [label="Mark headstage as failed"];
n64 -> n66;
n68 -> n66;
n66 -> "\"MaximumDAScale\" analysis parameter is not NaN?";
"\"MaximumDAScale\" analysis parameter is not NaN?" -> "DAScale is larger than \"MaximumDAScale\"?" [label=Yes];
"Turn off active non-IC headstages" -> "Set \"User onset delay\" to 0ms";
"DAScale is larger than \"MaximumDAScale\"?" -> "Mark headstage as \"DAScale exceeded\"\nin labnotebook" [label=Yes];
"Mark headstage as \"DAScale exceeded\"\nin labnotebook" -> "Set DAScale to zero";
"Disable \"dDAQ\"/\"oodDAQ\"" -> "Set \"TP during ITI\" to disabled";
"Set \"TP during ITI\" to disabled" -> "Set \"ITI\" to 100ms";
"Set \"ITI\" to 100ms" -> "Set \"TP inserting\" to disabled";
"Set \"User onset delay\" to 0ms" -> "Set \"Termination delay\" to 0 ms";
"Set \"Termination delay\" to 0 ms" -> "Disable \"dDAQ\"/\"oodDAQ\"";
"Mark headstage as \"DAScale exceeded\"\nin labnotebook" -> "Set DAScale to zero";
}
45 changes: 27 additions & 18 deletions Packages/doc/dot/multi-patch-seq-spike-control.dot
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,38 @@ on some pulses\n and \"Too Many\" on others."];
n51 -> n52 [label=True];
n53 [label="Mark sweep as failed"];
n51 -> n53 [label=False];
n74 [label="Was spontaneous spiking detected?"];
n88 -> n74 [label=Failed];
n79 [label="Spike Count state?"];
n88 -> n79 [label=Failed];
n94 [label="Spike position passed?"];
n88 -> n94 [label=Passed];
n63 [label="Mark set as passed if all IC headstages\n passed with all set sweep counts."];
n52 -> n63;
n54 [label="Analysis parameter \"Max Trials\" present?"];
n53 -> n54;
n75 [label="Add \"Auto bias baseline modifier\" analysis parameter\n value to autobias target voltage"];
n74 -> n75 [label=Yes];
n81 [label="Decrease DA Scale according to analysis parameters\n \"DaScaleTooManySpikesModifier\" and \"DaScaleTooManySpikesOperator\""];
n79 -> n81 [label="Too Many"];
n82 [label="Warn user in history once\nduring this RA cycle"];
n79 -> n82 [label=Mixed];
n83 [label="Increase DA scale according to analysis parameters\n \"DAScaleModifier\"\n and \"DAScaleOperator\""];
n79 -> n83 [label="Too Few"];
n77 [label="Increase DA scale according to analysis parameters\n \"DAScaleSpikePositionModifier\"\n and \"DAScaleSpikePositionOperator\""];
n94 -> n77 [label=Failed];
n70 [label="Set passed?"];
n63 -> n70;
n55 [label="Check if the current trial count\nof the current set sweep count\n exceeds \"Max Trials\""];
n54 -> n55 [label=Yes];
n56 [label="Skip back one sweep"];
n54 -> n56 [label=No];
n76 [label="Would the new DA scale for the next sweep be out of range?"];
n81 -> n76;
n62 [label="Increase DA scale according to analysis parameters\n \"DAScaleModifier\" and \"DAScaleOperator\""];
n82 -> n62;
n83 -> n76;
n77 -> n76;
n65 [label="Analysis parameter \"Max Trials\" present? [2]"];
n70 -> n65 [label=No];
n68 [label="Skip to end of active set"];
Expand All @@ -142,27 +164,14 @@ on some pulses\n and \"Too Many\" on others."];
n57 [label="Add \"Rerun Trials Exceeded\"\n into numerical labnotebook"];
n55 -> n57 [label=Yes];
n56 -> n63;
n90 [label="Add \"DAScale out of range\" labnotebook entry"];
n76 -> n90 [label=Yes];
n62 -> n76;
n66 [label="Was it reached on all IC headstages?"];
n65 -> n66 [label=Yes];
n67 [label="Mark set as failed"];
n66 -> n67;
n67 -> n68;
n74 [label="Was spontaneous spiking detected?"];
n88 -> n74 [label=Failed];
n79 [label="Spike Count state?"];
n88 -> n79 [label=Failed];
n94 [label="Spike position passed?"];
n88 -> n94 [label=Passed];
n75 [label="Add \"Auto bias baseline modifier\" analysis parameter\n value to autobias target voltage"];
n74 -> n75 [label=Yes];
n81 [label="Decrease DA Scale according to analysis parameters\n \"DaScaleTooManySpikesModifier\" and \"DaScaleTooManySpikesOperator\""];
n79 -> n81 [label="Too Many"];
n82 [label="Warn user in history once\nduring this RA cycle"];
n79 -> n82 [label=Mixed];
n83 [label="Increase DA scale according to analysis parameters\n \"DAScaleModifier\"\n and \"DAScaleOperator\""];
n79 -> n83 [label="Too Few"];
n77 [label="Increase DA scale according to analysis parameters\n \"DAScaleSpikePositionModifier\"\n and \"DAScaleSpikePositionOperator\""];
n94 -> n77 [label=Failed];
n62 [label="Increase DA scale according to analysis parameters\n \"DAScaleModifier\" and \"DAScaleOperator\""];
n82 -> n62;
n96 [label="Mark sweep as failed"];
n90 -> n96;
}
Loading

0 comments on commit 21d3431

Please sign in to comment.