Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmerk committed Apr 18, 2024
2 parents ffb5516 + ef8b53a commit 89038b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def write_connectome_mat(

if MISSING:
ROI_file = os.path.join(
f"D:\Connectome_RMAP_OUT\whole_brain\ROIs", f"ROI-{i}.nii"
r"D:\Connectome_RMAP_OUT\whole_brain\ROIs", f"ROI-{i}.nii"
)
# copy the ROI file to the following folder:
PATH_ROI_OUT = (
Expand Down
13 changes: 7 additions & 6 deletions py_neuromodulation/nm_stream_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def _handle_data(self, data: np.ndarray | pd.DataFrame) -> np.ndarray:
if not len(names_expected) == data.shape[0]:
raise ValueError(
"If data is passed as an array, the first dimension must"
" match the number of channel names in `nm_channels`. Got:"
f" Data columns: {data.shape[0]}, nm_channels.name:"
f" {len(names_expected)}."
" match the number of channel names in `nm_channels`.\n"
f" Number of data channels (data.shape[0]): {data.shape[0]}\n"
f" Length of nm_channels[\"name\"]: {len(names_expected)}."
)
return data
names_data = data.columns.to_list()
Expand All @@ -100,10 +100,11 @@ def _handle_data(self, data: np.ndarray | pd.DataFrame) -> np.ndarray:
):
raise ValueError(
"If data is passed as a DataFrame, the"
"columns must match the channel names in `nm_channels`. Got:"
f"Data columns: {names_data}, nm_channels.name: {names_data}."
"column names must match the channel names in `nm_channels`.\n"
f"Input dataframe column names: {names_data}\n"
f"Expected (from nm_channels[\"name\"]): : {names_expected}."
)
return data.to_numpy()
return data.to_numpy().transpose()

def _check_settings_for_parallel(self):
"""Check specified settings and raise error if parallel processing is not possible.
Expand Down

0 comments on commit 89038b8

Please sign in to comment.