From 21d3431da7ab2a3ab75f08a5e272354f0add3d91 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Tue, 5 Nov 2024 13:15:45 +0100 Subject: [PATCH] Packages/doc/dot: Adapt flowcharts for out of range DAScale values --- Packages/doc/dot/multi-patch-seq-dascale.dot | 20 +- .../multi-patch-seq-fast-rheo-estimate.dot | 31 ++- .../doc/dot/multi-patch-seq-spike-control.dot | 45 ++-- Packages/doc/dot/patch-seq-chirp.dot | 209 +++++++++--------- Packages/doc/dot/patch-seq-dascale.dot | 95 ++++---- Packages/doc/dot/patch-seq-rheobase.dot | 29 ++- Packages/doc/dot/patch-seq-squarepulse.dot | 22 +- 7 files changed, 264 insertions(+), 187 deletions(-) diff --git a/Packages/doc/dot/multi-patch-seq-dascale.dot b/Packages/doc/dot/multi-patch-seq-dascale.dot index d83ffebae5..700880dee4 100644 --- a/Packages/doc/dot/multi-patch-seq-dascale.dot +++ b/Packages/doc/dot/multi-patch-seq-dascale.dot @@ -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"; @@ -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; } diff --git a/Packages/doc/dot/multi-patch-seq-fast-rheo-estimate.dot b/Packages/doc/dot/multi-patch-seq-fast-rheo-estimate.dot index 60e4b63705..4831efeb4f 100644 --- a/Packages/doc/dot/multi-patch-seq-fast-rheo-estimate.dot +++ b/Packages/doc/dot/multi-patch-seq-fast-rheo-estimate.dot @@ -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"; @@ -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]; @@ -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"; } diff --git a/Packages/doc/dot/multi-patch-seq-spike-control.dot b/Packages/doc/dot/multi-patch-seq-spike-control.dot index 032a94deb4..7bd77060eb 100644 --- a/Packages/doc/dot/multi-patch-seq-spike-control.dot +++ b/Packages/doc/dot/multi-patch-seq-spike-control.dot @@ -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"]; @@ -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; } diff --git a/Packages/doc/dot/patch-seq-chirp.dot b/Packages/doc/dot/patch-seq-chirp.dot index ffc466bd10..d7b47afe89 100644 --- a/Packages/doc/dot/patch-seq-chirp.dot +++ b/Packages/doc/dot/patch-seq-chirp.dot @@ -31,147 +31,156 @@ digraph G { "Start DAQ/RA" -> "Prepare DAQ/Pre Set Event"; "Mid Sweep Event" -> "BL QC passed?"; "Mid Sweep Event" -> "\"Inside Bounds\" labnotebook\n entry present?"; - n63 [label="Is \"SpikeCheck\" enabled?\n (Given by optional analysis parameter\n \"SpikeCheck\" defaulting to 1)"]; + n63 [label="Is \"SpikeCheck\" enabled?\n (Given by optional analysis parameter\n \"SpikeCheck\" defaulting to 1)"]; "Mid Sweep Event" -> n63; - n91 [URL="../_static/images/async-qc-channels.svg", + n91 [URL="../_static/images/async-qc-channels.svg", label="Standard AsyncQCChannels handling", target=_graphviz]; "Pre Sweep Config Event" -> n91; "Post DAQ Event" -> "Update Dashboard"; "Post Set Event" -> "Update Dashboard"; - "Post Set Event" -> "Has three passing sweeps in set\n with the same DAScale value? [1]"; - n84 [label="Set \"Delay onset user\" back from labnotebook entry"]; + n84 [label="Set \"Delay onset user\" back from labnotebook entry"]; "Post Set Event" -> n84; - n97 [label="Read analysis parameter\n \"AmpBesselFilterRestore\",\n defaulting to true."]; + n97 [label="Read analysis parameter\n \"AmpBesselFilterRestore\",\n defaulting to true."]; "Post Set Event" -> n97; - n92 [URL="../_static/images/async-qc-channels.svg", + n92 [URL="../_static/images/async-qc-channels.svg", label="Standard AsyncQCChannels handling", target=_graphviz]; "Post Sweep Event" -> n92; "Prepare DAQ/Pre Set Event" -> "Enable \"Autobias\""; "Prepare DAQ/Pre Set Event" -> "Valid Autobias voltage (finite and non-zero)"; - n95 [label="Store amplifier setting\n LPF primary output in labnotebook"]; + n95 [label="Store amplifier setting\n LPF primary output in labnotebook"]; "Prepare DAQ/Pre Set Event" -> n95; - "BL QC passed?" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=No]; - "Calculate number of cycles\n in chirp, store in labnotebook" [label="Add stimset QC entry\nwhich denotes if the stimset is suitable"]; - "\"Inside Bounds\" labnotebook\n entry present?" -> "Calculate number of cycles\n in chirp, store in labnotebook" [label=No]; - n64 [label="Store Spike check in labnotebook"]; + "BL QC passed?" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=No]; + "Calculate number of cycles\n in chirp, store in labnotebook" [label="Add stimset QC entry\nwhich denotes if the stimset is suitable"]; + "\"Inside Bounds\" labnotebook\n entry present?" -> "Calculate number of cycles\n in chirp, store in labnotebook" [label=No]; + n64 [label="Store Spike check in labnotebook"]; n63 -> n64; - n65 [label="Spike QC labnotebook entry found?"]; + n65 [label="Spike QC labnotebook entry found?"]; n63 -> n65; - "Has three passing sweeps in set\n with the same DAScale value? [1]" -> "Mark set as failed\n in labnotebook" [label=No]; - "Has three passing sweeps in set\n with the same DAScale value? [1]" -> "Mark set as passed\n in labnotebook" [label=Yes]; - n98 [label="Set amplifier setting\n LPF primary output\n from labnotebook entry"]; - n97 -> n98 [label=True]; - n73 [label="\"Spike Check\" labnotebook entry is true?"]; + n98 [label="Set amplifier setting\n LPF primary output\n from labnotebook entry"]; + n97 -> n98 [label=True]; + n73 [label="\"Spike Check\" labnotebook entry is true?"]; n92 -> n73; "Enable \"Autobias\"" -> "Enable \"TP during ITI\""; "Valid Autobias voltage (finite and non-zero)" -> "Check if no TTL channels are active"; - n96 [label="Use \"AmpBesselFilter\" analysis parameter\n (defaulting to 10e3 if not present)\n as LPF primary output"]; + n96 [label="Use \"AmpBesselFilter\" analysis parameter\n (defaulting to 10e3 if not present)\n as LPF primary output"]; n95 -> n96; - "Grab next completely acquired chunk\n(500ms) of stimset baseline" -> "Chunk already evaluated?" [label="Have one"]; - "Grab next completely acquired chunk\n(500ms) of stimset baseline" -> "Last chunk?" [label="None left"]; - n99 [label="Early sweep stop\nand jump to end of set"]; - "Calculate number of cycles\n in chirp, store in labnotebook" -> n99 [label=Failed]; - n100 [labell="Add user epoch for chirp evaluation cycles"]; - "Calculate number of cycles\n in chirp, store in labnotebook" -> n100 [label=Passed]; - n66 [label="Has acquired data in chirp region?"]; - n65 -> n66 [label=No]; - n87 [label="Read analysis parameter \"UseTrueRestingMembranePotentialVoltage\",\n defaulting to true."]; + "Grab next completely acquired chunk\n(500ms) of stimset baseline" -> "Chunk already evaluated?" [label="Have one"]; + "Grab next completely acquired chunk\n(500ms) of stimset baseline" -> "Last chunk?" [label="None left"]; + n99 [label="Early sweep stop\nand jump to end of set"]; + "Calculate number of cycles\n in chirp, store in labnotebook" -> n99 [label=Failed]; + n100 [labell="Add user epoch for chirp evaluation cycles"]; + "Calculate number of cycles\n in chirp, store in labnotebook" -> n100 [label=Passed]; + n66 [label="Has acquired data in chirp region?"]; + n65 -> n66 [label=No]; + "Has three passing sweeps in set\n with the same DAScale value? [1]" -> "Mark set as failed\n in labnotebook" [label=No]; + "Has three passing sweeps in set\n with the same DAScale value? [1]" -> "Mark set as passed\n in labnotebook" [label=Yes]; + n87 [label="Read analysis parameter \"UseTrueRestingMembranePotentialVoltage\",\n defaulting to true."]; "Mark set as passed\n in labnotebook" -> n87; - n73 -> "Has BL QC and \"Inside Bounds\"\n entries being true in labnotebook?" [label=No]; - n74 [label="Spike QC passed?"]; - n73 -> n74 [label=Yes]; + n73 -> "Has BL QC and \"Inside Bounds\"\n entries being true in labnotebook?" [label=No]; + n74 [label="Spike QC passed?"]; + n73 -> n74 [label=Yes]; "Enable \"TP during ITI\"" -> "Enable \"Multidevice DAQ\""; "Check if no TTL channels are active" -> "Stimset is large enough"; - "Chunk already evaluated?" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=Yes]; - "Chunk already evaluated?" -> "Baseline chunk type" [label=No]; - "Last chunk?" -> "Mark Sweep as failed" [label=Yes]; - "Acquired requested number of cycles?\n(Given by optional analysis parameter\n\"NumberOfChirpCycles\" defaulting to 1.)" -> "Calculate min/max of AD data during these cycles" [label=Yes]; - n68 [label="Has spike in AD data of acquired chirp region?\nUses \"FailedLevel\" analysis parameter for spike search."]; - n66 -> n68 [label=Yes]; - n80 [label="Is the analysis parameter \"AutobiasTargetVAtSetEnd\" present?\n If yes, set the autobias target voltage to it."]; - n87 -> n80 [label=False]; - n88 [label="Find passing set with PSQ_TrueRestingMembranePotential\n analysis function"]; - n87 -> n88 [label=True]; - "Has BL QC and \"Inside Bounds\"\n entries being true in labnotebook?" -> "Mark sweep as failed\n in labnotebook" [label=No]; - n76 [label="Read \"SamplingFrequency\" analysis parameter\n (defaulting to 50kHz) if not present"]; - "Has BL QC and \"Inside Bounds\"\n entries being true in labnotebook?" -> n76 [label=Yes]; - n74 -> "Has BL QC and \"Inside Bounds\"\n entries being true in labnotebook?" [label=Yes]; - n74 -> "Mark sweep as failed\n in labnotebook" [label=No]; - "Mark sweep as failed\n in labnotebook" -> "Has three passing sweeps in set\n with the same DAScale value? [2]"; - n85 [label="Check if the acquired data\n has that sampling interval"]; - n76 -> n85; + "Chunk already evaluated?" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=Yes]; + "Chunk already evaluated?" -> "Baseline chunk type" [label=No]; + "Last chunk?" -> "Mark Sweep as failed" [label=Yes]; + n100 -> "Acquired requested number of cycles?\n(Given by optional analysis parameter\n\"NumberOfChirpCycles\" defaulting to 1.)"; + n68 [label="Has spike in AD data of acquired chirp region?\nUses \"FailedLevel\" analysis parameter for spike search."]; + n66 -> n68 [label=Yes]; + n80 [label="Is the analysis parameter \"AutobiasTargetVAtSetEnd\" present?\n If yes, set the autobias target voltage to it."]; + n87 -> n80 [label=False]; + n88 [label="Find passing set with PSQ_TrueRestingMembranePotential\n analysis function"]; + n87 -> n88 [label=True]; + "Has BL QC and \"Inside Bounds\"\n entries being true in labnotebook?" -> "Mark sweep as failed\n in labnotebook" [label=No]; + n76 [label="Read \"SamplingFrequency\" analysis parameter\n (defaulting to 50kHz) if not present"]; + "Has BL QC and \"Inside Bounds\"\n entries being true in labnotebook?" -> n76 [label=Yes]; + n74 -> "Has BL QC and \"Inside Bounds\"\n entries being true in labnotebook?" [label=Yes]; + n74 -> "Mark sweep as failed\n in labnotebook" [label=No]; "Enable \"Multidevice DAQ\"" -> "Disable \"dDAQ\"/\"oodDAQ\""; "Stimset is large enough" -> "Check if mode is IC"; - "Baseline chunk type" -> "Check RMS short" [label="pre pulse"]; - "Baseline chunk type" -> "Check target voltage [2]" [label="post pulse"]; - "Calculate min/max of AD data during these cycles" -> "Determine bounds state and action\n from min/max values and table\n store in labnotebook"; - n69 [label="Add Spike QC failed labnotebook entry"]; - n68 -> n69 [label=Yes]; - n71 [label="Has acquired past the end of chirp?"]; - n68 -> n71 [label=No]; - n88 -> n80 [label=None]; - n90 [label="Read full average voltage from labnotebook\n from that sweep and set it as autobias target voltage."]; - n88 -> n90 [label=Found]; - "Has three passing sweeps in set\n with the same DAScale value? [2]" -> "Skip to end of set" [label=Yes]; - "Has three passing sweeps in set\n with the same DAScale value? [2]" -> "Read analysis parameter \"NumberOfFailedSweeps\",\n if not present use 3.\n Have that many sweeps failed?" [label=No]; - n85 -> "Mark sweep as failed\n in labnotebook" [label=No]; - n85 -> "Skip to end of DAQ" [label=No]; - n93 [label="Has Async Channels QC\n labnotebook entry passed?"]; - n85 -> n93 [label=Yes]; + "Baseline chunk type" -> "Check RMS short" [label="pre pulse"]; + "Baseline chunk type" -> "Check target voltage [2]" [label="post pulse"]; + "Acquired requested number of cycles?\n(Given by optional analysis parameter\n\"NumberOfChirpCycles\" defaulting to 1.)" -> "Calculate min/max of AD data during these cycles" [label=Yes]; + n69 [label="Add Spike QC failed labnotebook entry"]; + n68 -> n69 [label=Yes]; + n71 [label="Has acquired past the end of chirp?"]; + n68 -> n71 [label=No]; + n88 -> n80 [label=None]; + n90 [label="Read full average voltage from labnotebook\n from that sweep and set it as autobias target voltage."]; + n88 -> n90 [label=Found]; + "Mark sweep as failed\n in labnotebook" -> "Has three passing sweeps in set\n with the same DAScale value? [2]"; + n85 [label="Check if the acquired data\n has that sampling interval"]; + n76 -> n85; "Disable \"dDAQ\"/\"oodDAQ\"" -> "Enable \"Repeated Acquisition\""; "Check if mode is IC" -> "Check if only one headstage is active"; - "Check RMS short" -> "Check RMS long" [label=Passed]; - "Check RMS short" -> "Add BL QC failed labnotebook entry" [label=Failed]; + "Check RMS short" -> "Check RMS long" [label=Passed]; + "Check RMS short" -> "Add BL QC failed labnotebook entry" [label=Failed]; "Check target voltage [2]" -> "Mark chunk as passed/failed [2]"; - "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Store \"Inside Bounds\" as true in labnotebook" [label=PASS]; - "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Store \"Inside Bounds\" as false in labnotebook" [label=RERUN]; - "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Store \"Inside Bounds\" as false in labnotebook" [label=INCREASE]; - "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Store \"Inside Bounds\" as false in labnotebook" [label=DECREASE]; - "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Abort Sweep" [label=RERUN]; - "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Calculate scaling factor\n to be inside the bounds" [label=INCREASE]; - "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Calculate scaling factor\n to be inside the bounds" [label=DECREASE]; - n67 [label="Increase DA scale according to analysis parameters\n \"DAScaleModifier\" and \"DAScaleOperator\""]; + "Calculate min/max of AD data during these cycles" -> "Determine bounds state and action\n from min/max values and table\n store in labnotebook"; + "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Store \"Inside Bounds\" as true in labnotebook" [label=PASS]; + "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Store \"Inside Bounds\" as false in labnotebook" [label=RERUN]; + "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Store \"Inside Bounds\" as false in labnotebook" [label=INCREASE]; + "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Store \"Inside Bounds\" as false in labnotebook" [label=DECREASE]; + "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Abort Sweep" [label=RERUN]; + "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Calculate scaling factor\n to be inside the bounds" [label=INCREASE]; + "Determine bounds state and action\n from min/max values and table\n store in labnotebook" -> "Calculate scaling factor\n to be inside the bounds" [label=DECREASE]; + n67 [label="Increase DA scale according to analysis parameters\n \"DAScaleModifier\" and \"DAScaleOperator\""]; n69 -> n67; - n72 [label="Add Spike QC passed labnotebook entry"]; - n71 -> n72 [label=Yes]; - "Read analysis parameter \"NumberOfFailedSweeps\",\n if not present use 3.\n Have that many sweeps failed?" -> "Skip to end of DAQ" [label=Yes]; - "Read analysis parameter \"NumberOfFailedSweeps\",\n if not present use 3.\n Have that many sweeps failed?" -> "Set can still pass?" [label=No]; - n93 -> "Mark sweep as failed\n in labnotebook" [label=No]; - n93 -> "Mark sweep as passed\n in labnotebook" [label=Yes]; + n72 [label="Add Spike QC passed labnotebook entry"]; + n71 -> n72 [label=Yes]; + "Has three passing sweeps in set\n with the same DAScale value? [2]" -> "Skip to end of set" [label=Yes]; + "Has three passing sweeps in set\n with the same DAScale value? [2]" -> "Read analysis parameter \"NumberOfFailedSweeps\",\n if not present use 3.\n Have that many sweeps failed?" [label=No]; + n85 -> "Mark sweep as failed\n in labnotebook" [label=No]; + n85 -> "Skip to end of DAQ" [label=No]; + n106 [label="Do we have a \"DAScale out of range\" labnotebook entry\n in the SCI"]; + n85 -> n106 [label=Yes]; + "Read analysis parameter \"NumberOfFailedSweeps\",\n if not present use 3.\n Have that many sweeps failed?" -> "Skip to end of DAQ" [label=Yes]; + "Read analysis parameter \"NumberOfFailedSweeps\",\n if not present use 3.\n Have that many sweeps failed?" -> "Set can still pass?" [label=No]; + n106 -> "Mark sweep as failed\n in labnotebook" [label=Yes]; + n106 -> "Skip to end of DAQ" [label=Yes]; + n93 [label="Has Async Channels QC\n labnotebook entry passed?"]; + n106 -> n93 [label=No]; "Enable \"Repeated Acquisition\"" -> "Enable \"Insert TP\""; "Check if only one headstage is active" -> "All checks passed"; - "Check RMS long" -> "Add BL QC failed labnotebook entry" [label=Failed]; - "Check RMS long" -> "Check target voltage [1]" [label=Passed]; + "Check RMS long" -> "Add BL QC failed labnotebook entry" [label=Failed]; + "Check RMS long" -> "Check target voltage [1]" [label=Passed]; "Add BL QC failed labnotebook entry" -> "Early Sweep stop"; - "Mark chunk as passed/failed [2]" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=Failed]; - "Mark chunk as passed/failed [2]" -> "Add BL QC passed labnotebook entry" [label=Passed]; - "Calculate scaling factor\n to be inside the bounds" -> "Adjust DAScale (rounded to full pA)\n according to scaling factor"; - n75 [label="Abort sweep"]; - n67 -> n75; - "Set can still pass?" -> "Skip to end of DAQ" [label=No]; + "Mark chunk as passed/failed [2]" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=Failed]; + "Mark chunk as passed/failed [2]" -> "Add BL QC passed labnotebook entry" [label=Passed]; + "Calculate scaling factor\n to be inside the bounds" -> "Calculate DAScale (rounded to full pA)\n according to scaling factor"; + n101 [label="Would the next DAScale value be out of range?"]; + n67 -> n101; + "Set can still pass?" -> "Skip to end of DAQ" [label=No]; + n93 -> "Mark sweep as failed\n in labnotebook" [label=No]; + n93 -> "Mark sweep as passed\n in labnotebook" [label=Yes]; "Mark sweep as passed\n in labnotebook" -> "Has three passing sweeps in set\n with the same DAScale value? [2]"; - n89 [label="Use \"SamplingMultiplier\" analysis parameter\n (defaulting to 4 if not present) and set it."]; + n89 [label="Use \"SamplingMultiplier\" analysis parameter\n (defaulting to 4 if not present) and set it."]; "Enable \"Insert TP\"" -> n89; - "All checks passed" -> Abort [label=No]; - "All checks passed" -> "Look for an existing and passing PSQ_DAScale sweep\n in subthreshold mode" [label=Yes]; + "All checks passed" -> Abort [label=No]; + "All checks passed" -> "Look for an existing and passing PSQ_DAScale sweep\n in subthreshold mode" [label=Yes]; "Check target voltage [1]" -> "Mark chunk as passed/failed [1]"; "Add BL QC passed labnotebook entry" -> "Early Sweep stop"; - "Adjust DAScale (rounded to full pA)\n according to scaling factor" -> "Abort Sweep"; - n78 [label="Is the analysis parameter \"AutobiasTargetV\" present?\n If yes, set the autobias target voltage to it."]; + "Calculate DAScale (rounded to full pA)\n according to scaling factor" -> n101; + n102 [label="Add \"DAScale out of range\" labnotebook entry"]; + n101 -> n102 [label=Yes]; + n103 [label="SetDAScale value"]; + n101 -> n103 [label=No]; + n78 [label="Is the analysis parameter \"AutobiasTargetV\" present?\n If yes, set the autobias target voltage to it."]; n89 -> n78; - "Look for an existing and passing PSQ_DAScale sweep\n in subthreshold mode" -> Abort [label="Not found"]; - "Look for an existing and passing PSQ_DAScale sweep\n in subthreshold mode" -> "Get DeltaI/DeltaV from labnotebook" [label=Found]; - "Mark chunk as passed/failed [1]" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=Passed]; - "Mark chunk as passed/failed [1]" -> "Early sweep stop, repurpose ITI and add 10s to ITI" [label=Failed]; - n82 [label="Store \"Delay onset user\" in labnotebook"]; + "Look for an existing and passing PSQ_DAScale sweep\n in subthreshold mode" -> Abort [label="Not found"]; + "Look for an existing and passing PSQ_DAScale sweep\n in subthreshold mode" -> "Get DeltaI/DeltaV from labnotebook" [label=Found]; + "Mark chunk as passed/failed [1]" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=Passed]; + "Mark chunk as passed/failed [1]" -> "Early sweep stop, repurpose ITI and add 10s to ITI" [label=Failed]; + n82 [label="Store \"Delay onset user\" in labnotebook"]; n78 -> n82; "Get DeltaI/DeltaV from labnotebook" -> "Calculate Resistance from it\n store in labnotebook"; - n83 [label=" Is the analysis parameter \"UserOnsetDelay\" present?\n If yes, set it."]; + n83 [label=" Is the analysis parameter \"UserOnsetDelay\" present?\n If yes, set it."]; n82 -> n83; "Calculate Resistance from it\n store in labnotebook" -> "Calculate initial DAScale\n store in labnotebook"; n83 -> "All checks passed"; "Calculate initial DAScale\n store in labnotebook" -> "Set DAScale"; - n100 -> "Acquired requested number of cycles?\n(Given by optional analysis parameter\n\"NumberOfChirpCycles\" defaulting to 1.)"; + n105 [label="Jump to end of active set"]; + n102 -> n105; } diff --git a/Packages/doc/dot/patch-seq-dascale.dot b/Packages/doc/dot/patch-seq-dascale.dot index c400a1bee4..874e6a172c 100644 --- a/Packages/doc/dot/patch-seq-dascale.dot +++ b/Packages/doc/dot/patch-seq-dascale.dot @@ -45,6 +45,7 @@ digraph G { "Prepare DAQ/Pre Set Event" -> "Enable \"Autobias\""; "Prepare DAQ/Pre Set Event" -> "Valid Autobias voltage (finite and non-zero)"; "BL QC passed?" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=No]; + "Mark set as passed if $NUM_DA_SCALES\nsweeps passed, as failure otherwise" [label="Do we have a \"DAScale out of range\" labnotebook entry\n in the SCI"]; "Get OperationMode [2]" -> "Mark set as passed if $NUM_DA_SCALES\nsweeps passed, as failure otherwise" [label=Sub]; "Get OperationMode [2]" -> "Labnotebook has fI-Slope reached entry?" [label=Supra]; n79 [label="Do we have measured all\n required DAScales?"]; @@ -57,6 +58,9 @@ digraph G { "Valid Autobias voltage (finite and non-zero)" -> "Check if no TTL channels are active"; "Grab next completely acquired chunk\n(500ms) of stimset baseline" -> "Chunk already evaluated?" [label="Have one"]; "Grab next completely acquired chunk\n(500ms) of stimset baseline" -> "Last chunk?" [label="None left"]; + "Mark set as passed if $NUM_DA_SCALES\nsweeps passed, as failure otherwise" -> "Mark set as failed" [label=Yes]; + n126 [label="Mark set as passed if $NUM_DA_SCALES\nsweeps passed, as failure otherwise"]; + "Mark set as passed if $NUM_DA_SCALES\nsweeps passed, as failure otherwise" -> n126 [label=No]; "Labnotebook has fI-Slope reached entry?" -> "Mark set as passed if $NUM_DA_SCALES\nsweeps passed, as failure otherwise" [label=No]; "Labnotebook has fI-Slope reached entry?" -> "Reached?" [label=Yes]; n79 -> "Mark set as failed" [label=No]; @@ -85,23 +89,37 @@ QC and f-I slope QC passing?"]; n72 -> "Check if the Set can still pass"; n76 [label="Check if the acquired data\n has that sampling interval"]; n75 -> n76; + n87 -> n90 [label=Failure]; + n88 [label="Write the AP frequency to the labnotebook"]; + n87 -> n88 [label=Sucess]; + n93 [labe="Fetch sweeps with passing BL QC from SCI\ and append their AP frequency\n DAScale data to the supra data", + label="Fetch AP frequency and DAScale data\n from passing sweeps of this SCI"]; + n90 -> n93; + "Enable \"Multidevice DAQ\"" -> "Disable \"dDAQ\"/\"oodDAQ\""; + "Stimset is large enough" -> "Check if mode is IC"; + "Baseline chunk type" -> "Check RMS short" [label="pre pulse"]; + "Baseline chunk type" -> "Check target voltage [2]" [label="post pulse"]; + n132 -> "Mark set as failed" [label=No]; + n132 -> n81 [label=Yes]; "Check if the Set can still pass" -> "Skip to end" [label=No]; n76 -> n72 [label=No]; n76 -> "Skip to end" [label=No]; n77 [label="Has Async Channels QC\n labnotebook entry passed?"]; n76 -> n77 [label=Yes]; - "Enable \"Multidevice DAQ\"" -> "Disable \"dDAQ\"/\"oodDAQ\""; - "Stimset is large enough" -> "Check if mode is IC"; - "Baseline chunk type" -> "Check RMS short" [label="pre pulse"]; - "Baseline chunk type" -> "Check target voltage [2]" [label="post pulse"]; - n77 -> n72 [label=No]; - n86 [label="Mark sweep as passed"]; - n77 -> n86; + n88 -> n90; + n94 [label="Do overshoot correction:\n This means we want to ensure that all acquired AP frequency DAScale data\n has a stepwidth of smaller \ +than MaxFrequencyChangePercent.\n If this is not the case we add DAScale values to the future DAScale list"]; + n93 -> n94 [label="Do we have passing sweeps in this SCI?"]; + n104 [label="Determine if we have more than two\n points to fit and write the\ result into the labnotebook"]; + n93 -> n104; "Disable \"dDAQ\"/\"oodDAQ\"" -> "Enable \"Repeated Acquisition\""; "Check if mode is IC" -> "Check if only one headstage is active"; "Check RMS short" -> "Check RMS long" [label=Passed]; "Check RMS short" -> "Add BL QC failed labnotebook entry" [label=Failed]; "Check target voltage [2]" -> "Mark chunk as passed/failed [2]"; + n77 -> n72 [label=No]; + n86 [label="Mark sweep as passed"]; + n77 -> n86; n86 -> "Calculate TP-like properties\nand store them in the\nlabnotebook" [label=Supra]; n86 -> "Search for spikes\n(x range: pulse onset to end of pulse\ny condition: max above 0.01mV)" [label=Sub]; "Enable \"Repeated Acquisition\"" -> "Enable \"Insert TP\""; @@ -120,24 +138,22 @@ QC and f-I slope QC passing?"]; "All checks passed" -> "Get OperationMode" [label=Yes]; "Check target voltage [1]" -> "Mark chunk as passed/failed [1]"; "Add BL QC passed labnotebook entry" -> "Early Sweep stop"; - n88 [label="Write the AP frequency to the labnotebook"]; - n87 -> n88 [label=Sucess]; - n87 -> n90 [label=Failure]; - n88 -> n90; - n93 [labe="Fetch sweeps with passing BL QC from SCI\ and append their AP frequency\n DAScale data to the supra data", - label="Fetch AP frequency and DAScale data\n from passing sweeps of this SCI"]; - n90 -> n93; + "Check if $NUM_DA_SCALES\nsweeps passed from RA cycle" -> "Skip to end of active set" [label=Yes]; + "Use next DAScale value" [label="Would the next DAScale value be out of range?"]; + "Check if $NUM_DA_SCALES\nsweeps passed from RA cycle" -> "Use next DAScale value" [label=No]; + "Optional parameter ShowPlot\nis true or missing" -> "Plot the resistance (Sub)\nor fI (Supra)" [label=Yes]; + "Write number of spikes\ninto labnotebook" -> "Analysis parameters MinimumSpikeCount,\n MaximumSpikeCount,\n DAScaleModifier\n present?"; + "Write number of spikes\ninto labnotebook" -> "Determine pulse duration\nand write it into the labnotebook"; "Get OperationMode" -> "Look for a rheobase sweep with passing set QC,\n pulse duration longer than 500ms\n and having spiked" [label=Supra]; "Get OperationMode" -> "Use the DAScale values\nfrom the analysis parameters" [label=Sub]; n110 [label="Look for a supra SCI with passing set QC\n and a long rheobase SCI with passing set QC"]; "Get OperationMode" -> n110 [label="Adaptive Supra"]; "Mark chunk as passed/failed [1]" -> "Grab next completely acquired chunk\n(500ms) of stimset baseline" [label=Passed]; "Mark chunk as passed/failed [1]" -> "Early sweep stop, repurpose ITI and add 10s to ITI" [label=Failed]; - "Check if $NUM_DA_SCALES\nsweeps passed from RA cycle" -> "Skip to end of active set" [label=Yes]; - "Check if $NUM_DA_SCALES\nsweeps passed from RA cycle" -> "Use next DAScale value" [label=No]; - "Optional parameter ShowPlot\nis true or missing" -> "Plot the resistance (Sub)\nor fI (Supra)" [label=Yes]; - "Write number of spikes\ninto labnotebook" -> "Analysis parameters MinimumSpikeCount,\n MaximumSpikeCount,\n DAScaleModifier\n present?"; - "Write number of spikes\ninto labnotebook" -> "Determine pulse duration\nand write it into the labnotebook"; + n122 [label="Add \"DAScale out of range\" labnotebook entry"]; + "Use next DAScale value" -> n122 [label=Yes]; + n123 [label="Set DAScale"]; + "Use next DAScale value" -> n123 [label=No]; "Analysis parameters MinimumSpikeCount,\n MaximumSpikeCount,\n DAScaleModifier\n present?" -> "Use next DAScale value" [label=No]; "Analysis parameters MinimumSpikeCount,\n MaximumSpikeCount,\n DAScaleModifier\n present?" -> "Spike count relative to\nMin and Max?" [label=Yes]; "Determine pulse duration\nand write it into the labnotebook" -> "Create spike frequency vs DAScale (fI) data\nand peform linear regression"; @@ -148,6 +164,13 @@ QC and f-I slope QC passing?"]; n133 [label="Add all passing sweeps from the previous SCI\n if all of the following conditions are met:\n- DAScale adaptive suprathreshold was \ run\n- failing set QC\n-all analysis parameters are the same\n- same targetV autobias value"]; n110 -> n133 [label=Found]; + n94 -> n104; + n95 [label="Fit the last two AP frequency\n and DAScale data from RhSuAd plus this SCI\n ignoring entries with the same AP frequency\n as their \ +right neighbour"]; + n104 -> n95 [label=Yes]; + "Use the DAScale value of that sweep\n as offset to the DAScale values from the analysis parameters" -> "Use first DAScale value"; + n134 [label="Store list of passing RhSuAd sweeps\n in the labnotebook"]; + n133 -> n134; "Spike count relative to\nMin and Max?" -> "Use next DAScale value" [label="In-between"]; "Spike count relative to\nMin and Max?" -> "Adapt DAScale\n by a factor of 1 - Modifier" [label=Above]; "Spike count relative to\nMin and Max?" -> "Adapt DAScale\n by a factor of 1 + Modifier" [label=Below]; @@ -156,25 +179,16 @@ run\n- failing set QC\n-all analysis parameters are the same\n- same targetV aut "Adapt DAScale\n by a factor of 1 - Modifier" -> "Use next DAScale value"; "Adapt DAScale\n by a factor of 1 + Modifier" -> "Use next DAScale value"; "Write fI-Slope into labnotebook" -> "Optional FinalSlopePercent\nparameter present?"; - "Use the DAScale value of that sweep\n as offset to the DAScale values from the analysis parameters" -> "Use first DAScale value"; n114 [label="Gather AP frequency and DAScale data\n from all RhSuAd sweeps\n but using the adaptive E1 epoch length for evaluations"]; - n116 [label="Store frequency and DAScale data\n in the labnotebook"]; - n114 -> n116; - n134 [label="Store list of passing RhSuAd sweeps\n in the labnotebook"]; - n133 -> n134; n134 -> n114; "Optional FinalSlopePercent\nparameter present?" -> "Add labnotebook entry if the\ndesired fI-Slope was reached or not" [label=Yes]; - n132 -> "Mark set as failed" [label=No]; - n132 -> n81 [label=Yes]; - n94 [label="Do overshoot correction:\n This means we want to ensure that all acquired AP frequency DAScale data\n has a stepwidth of smaller \ -than MaxFrequencyChangePercent.\n If this is not the case we add DAScale values to the future DAScale list"]; - n93 -> n94 [label="Do we have passing sweeps in this SCI?"]; - n104 [label="Determine if we have more than two\n points to fit and write the\ result into the labnotebook"]; - n93 -> n104; - n94 -> n104; - n95 [label="Fit the last two AP frequency\n and DAScale data from RhSuAd plus this SCI\n ignoring entries with the same AP frequency\n as their \ -right neighbour"]; - n104 -> n95 [label=Yes]; + n116 [label="Store frequency and DAScale data\n in the labnotebook"]; + n114 -> n116; + n117 [label="Fit the AP frequency and DAScale data\n ignoring entries with the same AP frequency\n as their right neighbour"]; + n116 -> n117; + n117 -> Abort [label=Failure]; + n118 [label="Store the fit slope and offset\n in the labnotebook"]; + n117 -> n118 [label=Success]; n97 [label="Write fit slope and offset to the labnotebook"]; n95 -> n97 [label="Sucess?"]; n98 [label="Mark the fit slope as invalid in the labnotebook"]; @@ -209,16 +223,12 @@ QC and f-I slope QC passing?"]; n109 -> n100 [label=Yes]; n103 [label="Measured all future DAScale values?"]; n100 -> n103 [label=Yes]; - n106 [label="Calculate new DAScale value by\n extrapolating fit slope and offset\n and using MaximumChangePercent - 2 as frequency distance.\n Uses the fit slopes and offsets from the\n passing sweep with the highest DAScale searching from the back."]; + n106 [label="Calculate new DAScale value by\n extrapolating fit slope and offset\n and using MaximumChangePercent - 2 as frequency distance.\n \ +Uses the fit slopes and offsets from the\n passing sweep with the highest DAScale searching from the back."]; n103 -> n106 [label=Yes]; n108 [label="Use the next DAScale value"]; n103 -> n108 [label=No]; n106 -> n108; - n117 [label="Fit the AP frequency and DAScale data\n ignoring entries with the same AP frequency\n as their right neighbour"]; - n116 -> n117; - n117 -> Abort [label=Failure]; - n118 [label="Store the fit slope and offset\n in the labnotebook"]; - n117 -> n118 [label=Success]; n119 [label="Calculate the maximum fit slope\n and store it in the labnotebook"]; n118 -> n119; n128 [label="Calculate the normalized minimum and maximum\n DAScale step witdths and store them in the labnotebook"]; @@ -226,6 +236,7 @@ QC and f-I slope QC passing?"]; n131 [label="Plot AP frequency and f-I slope both versus DAScale"]; n128 -> n131; n120 [label="Do overshoot correction"]; + n131 -> n120; n121 [label="Determine if the fit slopes are valid\n and store that in the labnotebook"]; n120 -> n121 [label=Needed]; n135 [label="Do we have at least NumSweepsWithSaturation\n sweeps which are adjacent, ignoring sweeps with failed sweep QC,\n and have sweep \ @@ -236,5 +247,5 @@ QC and f-I slope QC passing?"]; n135 -> n136 [label=Yes]; n137 [label="Reuse already set DAScale value"]; n136 -> n137; - n131 -> n120; + n122 -> "Skip to end of active set"; } diff --git a/Packages/doc/dot/patch-seq-rheobase.dot b/Packages/doc/dot/patch-seq-rheobase.dot index 4612f22012..12a94a2ee8 100644 --- a/Packages/doc/dot/patch-seq-rheobase.dot +++ b/Packages/doc/dot/patch-seq-rheobase.dot @@ -45,21 +45,21 @@ digraph G { "BL QC passed? [1]" -> "Grab next completely acquired chunk\n (500ms) of stimset baseline" [label=No]; "Mark set as failed if it has not yet passed" -> "Skip to end" [label=Failure]; n91 -> "First Sweep?"; - "First Sweep?" -> "Store final DAScale of last sweep\n from previous RAC as initial DAScale" [label=Yes]; - n60 [label="Read \"SamplingFrequency\" analysis parameter\n (defaulting to 50kHz) if not present"]; - "First Sweep?" -> n60 [label=No]; "Stimset is large enough" -> "Check if only one headstage is active"; "Set \"Repeat Sets\" to 1" -> "Enable \"Autobias\""; "Grab next completely acquired chunk\n (500ms) of stimset baseline" -> "Chunk already evaluated?" [label="Have one"]; "Grab next completely acquired chunk\n (500ms) of stimset baseline" -> "Last chunk?" [label="None left"]; - "Store final DAScale of last sweep\n from previous RAC as initial DAScale" -> "Store DAScale stepsize of 10pA in LBN"; - n61 [label="Check if the acquired data\n has that sampling interval"]; - n60 -> n61; + "First Sweep?" -> "Store final DAScale of last sweep\n from previous RAC as initial DAScale" [label=Yes]; + n60 [label="Read \"SamplingFrequency\" analysis parameter\n (defaulting to 50kHz) if not present"]; + "First Sweep?" -> n60 [label=No]; "Check if only one headstage is active" -> "Valid Autobias voltage (finite and non-zero)"; "Enable \"Autobias\"" -> "Set \"TP during ITI\""; "Chunk already evaluated?" -> "Grab next completely acquired chunk\n (500ms) of stimset baseline" [label=Yes]; "Chunk already evaluated?" -> "Baseline chunk type" [label=No]; "Last chunk?" -> "Mark BL QC as failed" [label=Yes]; + "Store final DAScale of last sweep\n from previous RAC as initial DAScale" -> "Store DAScale stepsize of 10pA in LBN"; + n61 [label="Check if the acquired data\n has that sampling interval"]; + n60 -> n61; "Store DAScale stepsize of 10pA in LBN" -> n60; n61 -> "BL QC passed? [2]" [label=Yes]; n61 -> "Mark set as failed" [label=No]; @@ -76,19 +76,20 @@ digraph G { "Check RMS short" -> "Mark BL QC as failed" [label=Failed]; "Check RMS short" -> "Check RMS long" [label=Passed]; "Check target voltage [2]" -> "Mark chunk as passed/failed [2]"; - "Spike detected?\n(x range: pulse onset to end of sweep\ny condition: max above 0.01mV)\nStore result in labnotebook" -> "Previous sweep has opposite spike result\nand same step size?"; + n65 -> "Spike detected?\n(x range: pulse onset to end of sweep\ny condition: max above 0.01mV)\nStore result in labnotebook" [label=Yes]; "All required analysis parameters present?\nSamplingMultiplier: variable" -> "Search for final DAScale in one of the existing sweeps"; "Disable \"dDAQ\"/\"oodDAQ\"" -> "Enable \"Repeated Acquisition\""; "Check RMS long" -> "Mark BL QC as failed" [label=Failed]; "Check RMS long" -> "Check target voltage [1]" [label=Passed]; "Mark chunk as passed/failed [2]" -> "Grab next completely acquired chunk\n (500ms) of stimset baseline" [label=Failed]; "Mark chunk as passed/failed [2]" -> "Mark BL QC as passed" [label=Passed]; - "Previous sweep has opposite spike result\nand same step size?" -> "DAScale larger than 50pA\nor stepsize is 2pA" [label=Yes]; - "Previous sweep has opposite spike result\nand same step size?" -> "Spike detected? (queried from labnotebook)" [label=No]; + "Spike detected?\n(x range: pulse onset to end of sweep\ny condition: max above 0.01mV)\nStore result in labnotebook" -> "Previous sweep has opposite spike result\nand same step size?"; "Search for final DAScale in one of the existing sweeps" -> "All checks passed"; "Enable \"Repeated Acquisition\"" -> "Set \"ITI\" to 4s"; "Check target voltage [1]" -> "Mark chunk as passed/failed [1]"; "Mark BL QC as passed" -> "Early sweep stop"; + "Previous sweep has opposite spike result\nand same step size?" -> "DAScale larger than 50pA\nor stepsize is 2pA" [label=Yes]; + "Previous sweep has opposite spike result\nand same step size?" -> "Spike detected? (queried from labnotebook)" [label=No]; "DAScale larger than 50pA\nor stepsize is 2pA" -> "Mark set as passed" [label=Yes]; "DAScale larger than 50pA\nor stepsize is 2pA" -> "Store DAScale stepsize of 2pA in LBN" [label=No]; "Spike detected? (queried from labnotebook)" -> "Offset DAScale by minus\nstepsize from LBN" [label=Yes]; @@ -103,11 +104,17 @@ digraph G { "Offset DAScale by minus\nstepsize from LBN" -> "DAScale is zero?"; "Offset DAScale by plus\nstepsize from LBN" -> "DAScale is zero?"; "DAScale is zero?" -> "Stepsize?" [label=Yes]; - "DAScale is zero?" -> "Difference to initial DAScale larger than 60pA?" [label=No]; + n66 [label="Would the new DA scale for the next sweep be out of range?"]; + "DAScale is zero?" -> n66 [label=No]; "Stepsize?" -> "Set DAScale and stepsize to 2pA" [label="10pA"]; "Stepsize?" -> "Add \"limited resolution\"\nlabnotebook entry" [label="2pA"]; "Difference to initial DAScale larger than 60pA?" -> "Set \"range exceeded\" labnotebook\nentry to true for sweep" [label=Yes]; "Add \"limited resolution\"\nlabnotebook entry" -> "Mark set as failed"; "Set \"range exceeded\" labnotebook\nentry to true for sweep" -> "Mark set as failed"; - n65 -> "Spike detected?\n(x range: pulse onset to end of sweep\ny condition: max above 0.01mV)\nStore result in labnotebook" [label=Yes]; + n68 [label="Set DAScale"]; + n66 -> n68 [label=No]; + n69 [label="Add \"DAScale out of range\" labnotebook entry"]; + n66 -> n69 [label=Yes]; + n68 -> "Difference to initial DAScale larger than 60pA?"; + n69 -> "Mark set as failed"; } diff --git a/Packages/doc/dot/patch-seq-squarepulse.dot b/Packages/doc/dot/patch-seq-squarepulse.dot index f98abfbcbc..83a5fbd24c 100644 --- a/Packages/doc/dot/patch-seq-squarepulse.dot +++ b/Packages/doc/dot/patch-seq-squarepulse.dot @@ -41,6 +41,8 @@ digraph G { target=_graphviz]; "Pre Sweep Config Event" -> n92; "Post Set Event" -> "Mark set as passed if 1 sweep passed,\nas failure otherwise"; + n48 [label="Do we have a \"DAScale out of range\" labnotebook entry\n in the SCI"]; + "Post Set Event" -> n48; "Enable \"Multidevice DAQ\"" -> "Disable \"dDAQ\"/\"oodDAQ\""; "Check if mode is IC" -> "Check if no TTL channels are active"; n37 [label="Read \"SamplingFrequency\" analysis parameter\n (defaulting to 50kHz) if not present"]; @@ -49,17 +51,18 @@ digraph G { n91 -> n43; "Spike detected?\n(x range: pulse onset to end of sweep\ny condition: max above 0.01mV)\nStore result in labnotebook" -> "DAScale is zero" [label=Yes]; "Spike detected?\n(x range: pulse onset to end of sweep\ny condition: max above 0.01mV)\nStore result in labnotebook" -> "Step Size from labnotebook?" [label=No]; - n38 [label="Check if the acquired data\n has that sampling interval"]; - n37 -> n38; "Mark set as passed if 1 sweep passed,\nas failure otherwise" -> "Skip to end" [label=Failure]; "Disable \"dDAQ\"/\"oodDAQ\"" -> "Set \"TP inserting\" to disabled"; "Check if no TTL channels are active" -> "Check if only one headstage is active"; + n38 [label="Check if the acquired data\n has that sampling interval"]; + n37 -> n38; + n39 [label="Mark Sweep as failure"]; + n43 -> n39 [label=No]; "DAScale is zero" -> "Step size from labnotebook?" [label=No]; "DAScale is zero" -> "Add labnotebook entry\ndocumenting this case" [label=Yes]; "Step Size from labnotebook?" -> "Write step size of\n+10pA to labnotebook" [label="-50pA"]; "Step Size from labnotebook?" -> "Offset DAScale\nby +10pA" [label="+10pA"]; "Step Size from labnotebook?" -> "Offset DAScale\nby +100pA" [label="+100pA"]; - n39 [label="Mark Sweep as failure"]; n38 -> n39 [label=No]; "Set \"TP inserting\" to disabled" -> "Set \"TP during ITI\" to disabled"; "Check if only one headstage is active" -> "All checks passed"; @@ -68,6 +71,7 @@ digraph G { "Step size from labnotebook?" -> "Write step size of\n-50pA to labnotebook" [label="+100pA"]; "Add labnotebook entry\ndocumenting this case" -> "Mark sweep as failure [2]"; "Write step size of\n+10pA to labnotebook" -> "Offset DAScale\nby +10pA"; + "Mark sweep as failed [1]" [label="Would the new DA scale for the next sweep be out of range?"]; "Offset DAScale\nby +10pA" -> "Mark sweep as failed [1]"; "Offset DAScale\nby +100pA" -> "Mark sweep as failed [1]"; n39 -> "Skip to end of active set"; @@ -78,9 +82,19 @@ digraph G { "Offset DAScale\nby -50pA" -> "Mark sweep as failed [1]"; "Write step size of\n-50pA to labnotebook" -> "Offset DAScale\nby -50pA"; "Mark sweep as failure [2]" -> "Three sweeps exist with\nthis labnotebook entry?"; + n44 [label="Add \"DAScale out of range\" labnotebook entry"]; + "Mark sweep as failed [1]" -> n44 [label=Yes]; + n46 [label="Set DAScale"]; + "Mark sweep as failed [1]" -> n46 [label=No]; "Set \"ITI\" to 100ms" -> "Enable \"Repeated Acquisition\""; "Set DAScale to 100pA" -> "Write initial stepsize of 100pA into labnotebook"; "Mark sweep as passed" -> "Skip to end of active set"; "Three sweeps exist with\nthis labnotebook entry?" -> "Skip to end of active set" [label=Yes]; - n43 -> n39 [label=No]; + n45 [label="Mark sweep as failed"]; + n44 -> n45; + n46 -> n45; + n47 [label="Mark set as failure"]; + n47 -> "Skip to end"; + n48 -> "Mark set as passed if 1 sweep passed,\nas failure otherwise" [label=No]; + n48 -> n47 [label=Yes]; }