Skip to content

Commit

Permalink
better handling of partial data loads
Browse files Browse the repository at this point in the history
  • Loading branch information
pbmanis committed Feb 17, 2025
1 parent e90a231 commit 917147f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ephys/ephys_analysis/iv_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(
file_out_path: Union[Path, str],
decorate=True,
allow_partial: bool = False,
record_list: Union[list, None] = None,
record_list: list = [],
):
self.df_summary = df_summary
self.experiment = experiment
Expand Down Expand Up @@ -243,7 +243,7 @@ def plot_one_iv(self, protocol, pubmode=False, allprots: list = None) -> Union[N
)
validivs, additional_ivs, additional_iv_records = res[0][0], res[0][1], res[0][2]
self.allow_partial = False
self.record_list = None
self.record_list = []
# print("getting data for protocol: ", protocol)
if (
additional_iv_records is not None
Expand Down Expand Up @@ -272,7 +272,7 @@ def plot_one_iv(self, protocol, pubmode=False, allprots: list = None) -> Union[N
# print("\n\nSpike current array: ", spike_dict["FI_Curve"][0]*1e9, "\n\n")
traces = np.argsort(spike_dict["FI_Curve"][0]) # sort by current level
# print("spike array: \n", np.array(spike_dict["FI_Curve"]).shape)
if self.allow_partial:
if self.allow_partial and len(self.record_list) > 0:
traces = np.argsort(spike_dict["FI_Curve"][0][self.record_list])
valid_traces = traces
# print("protocol: ", protocol, "traces: ", traces, 'valid_traces: ', valid_traces)
Expand Down

0 comments on commit 917147f

Please sign in to comment.