Skip to content

Commit

Permalink
added duration_of_port_entry from medpc files for fiber photometry se…
Browse files Browse the repository at this point in the history
…ssions
  • Loading branch information
pauladkisson committed May 9, 2024
1 parent 2a0044c commit 84c404f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lerner_lab_to_nwb/seiler_2024/seiler_2024behaviorinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@ def add_to_nwbfile(self, nwbfile: NWBFile, metadata: dict) -> None:
session_dict[dict_name] = np.trim_zeros(session_df[csv_name].dropna().values, trim="b")
else:
session_dict = self.source_data["session_dict"]
msn = metadata["Behavior"]["msn"]
medpc_name_to_dict_name = metadata["Behavior"]["msn_to_medpc_name_to_dict_name"][msn]
dict_name_to_type = {dict_name: np.ndarray for dict_name in medpc_name_to_dict_name.values()}
medpc_session_dict = read_medpc_file(
file_path=self.source_data["file_path"],
medpc_name_to_dict_name=medpc_name_to_dict_name,
dict_name_to_type=dict_name_to_type,
session_conditions=self.source_data["session_conditions"],
start_variable=self.source_data["start_variable"],
)
if "duration_of_port_entry" in medpc_session_dict:
session_dict["duration_of_port_entry"] = medpc_session_dict["duration_of_port_entry"]

# Add behavior data to nwbfile
behavior_module = nwb_helpers.get_module(
Expand Down

0 comments on commit 84c404f

Please sign in to comment.