@@ -75,8 +75,7 @@ def __init__(self, sampling_rate=5, plot_dir=None, voltage=np.array([]),
75
75
n_sweeps = None , removal_time = 5 ):
76
76
# TODO docstring
77
77
78
- if plot_dir is not None :
79
- self .plot_dir = plot_dir
78
+ self ._plot_dir = plot_dir
80
79
81
80
self ._n_qc = 16
82
81
@@ -134,8 +133,15 @@ def __init__(self, sampling_rate=5, plot_dir=None, voltage=np.array([]),
134
133
135
134
self ._debug = True
136
135
137
- def set_trace (self , before , after , qc_vals_before ,
138
- qc_vals_after , n_sweeps ):
136
+ @property
137
+ def plot_dir (self ):
138
+ return self ._plot_dir
139
+
140
+ @plot_dir .setter
141
+ def plot_dir (self , path ):
142
+ self ._plot_dir = path
143
+
144
+ def set_trace (self , before , after , qc_vals_before , qc_vals_after , n_sweeps ):
139
145
self ._before = before
140
146
self ._qc_vals_before = qc_vals_before
141
147
self ._after = after
@@ -154,7 +160,7 @@ def run_qc(self, voltage_steps, times,
154
160
@param before is the before-drug current trace
155
161
@param after is the post-drug current trace
156
162
@param qc_vals_before is an array of values for each pre-drug sweep where each row is (Rseal, Cm, Rseries)
157
- @param qc_vals_before is an array of values for each post-drug sweep where each row is (Rseal, Cm, Rseries)
163
+ @param qc_vals_after is an array of values for each post-drug sweep where each row is (Rseal, Cm, Rseries)
158
164
@n_sweeps is the number of sweeps to be considered
159
165
"""
160
166
@@ -241,7 +247,7 @@ def run_qc(self, voltage_steps, times,
241
247
QC ['qc6.1.subtracted' ].append (qc6_1 )
242
248
QC ['qc6.2.subtracted' ].append (qc6_2 )
243
249
244
- if self ._debug :
250
+ if self .plot_dir and self . _debug :
245
251
fig = plt .figure (figsize = (8 , 5 ))
246
252
ax = fig .subplots ()
247
253
ax .plot (times , (before - after ).T , label = 'subtracted' )
0 commit comments