diff --git a/bin/dm_link.py b/bin/dm_link.py index 756a1201..16f62ad2 100755 --- a/bin/dm_link.py +++ b/bin/dm_link.py @@ -149,7 +149,7 @@ def main(): return try: - lookup = pd.read_csv(lookup_path, sep="\s+", dtype=str) # noqa: W605 + lookup = pd.read_csv(lookup_path, sep=r"\s+", dtype=str) # noqa: W605 except IOError: logger.error("Lookup file {} not found".format(lookup_path)) return diff --git a/bin/dm_mripicture.py b/bin/dm_mripicture.py old mode 100644 new mode 100755 index f60086ad..e01d81f1 --- a/bin/dm_mripicture.py +++ b/bin/dm_mripicture.py @@ -109,6 +109,7 @@ def main(): vmin=100, vmax=1100, threshold="auto", + colorbar=False, ) t1_pic.savefig(outpath, dpi=1000) logger.debug( diff --git a/bin/dm_parse_ea.py b/bin/dm_parse_ea.py index 9cbf8a40..cd99d2ce 100755 --- a/bin/dm_parse_ea.py +++ b/bin/dm_parse_ea.py @@ -217,7 +217,8 @@ def get_ratings(log): def combine_dfs(blocks, ratings): # combines the block rows with the ratings rows and sorts them - combo = blocks.append(ratings).sort_values("onset").reset_index(drop=True) + combo = blocks._append(ratings).sort_values("onset").reset_index(drop=True) + mask = pd.notnull(combo["trial_type"]) combo["space_b4_prev"] = combo["onset"].diff(periods=1) combo["first_button_press"] = combo["duration"].shift() > 0 @@ -240,7 +241,7 @@ def combine_dfs(blocks, ratings): "participant_value": last_block.participant_value, } - combo2 = combo2.append(end_row, ignore_index=True).reset_index(drop=True) + combo2 = combo2._append(end_row, ignore_index=True).reset_index(drop=True) mask = pd.notnull(combo2["trial_type"]) @@ -264,7 +265,7 @@ def combine_dfs(blocks, ratings): "duration": 0, "participant_value": 5, } - combo2 = combo2.append(new_row, ignore_index=True) + combo2 = combo2._append(new_row, ignore_index=True) combo2 = combo2.sort_values(by=["onset", "event_type"], na_position="first").reset_index(drop=True) @@ -470,7 +471,7 @@ def parse_task(ident, combo["block_score"] = np.nan combo["n_button_press"] = np.nan - combo = (combo.append(two_s_chunks).sort_values("onset").reset_index( + combo = (combo._append(two_s_chunks).sort_values("onset").reset_index( drop=True)) test = combo.loc[pd.notnull(combo["stim_file"])] diff --git a/bin/dm_parse_faces.py b/bin/dm_parse_faces.py index 498b4801..51d7dce5 100755 --- a/bin/dm_parse_faces.py +++ b/bin/dm_parse_faces.py @@ -74,7 +74,7 @@ def find_all_data(eprime, tag): def findnum(ln): try: - txtnum = re.findall('(\d+)\r\n', ln) # noqa: W605 + txtnum = re.findall(r'(\d+)\r\n', ln) return float(txtnum[0]) except ValueError: return txtnum[0] diff --git a/datman/utils.py b/datman/utils.py index 7d225b86..cd30ef1c 100644 --- a/datman/utils.py +++ b/datman/utils.py @@ -509,7 +509,7 @@ def _parse_blacklist(blacklist, scan=None, subject=None): # This will mangle any commas in comments, but is the most reliable way # to split the lines - regex = ",|\s" # noqa: W605 + regex = r",|\s" for line in blacklist: fields = re.split(regex, line.strip()) try: diff --git a/pyproject.toml b/pyproject.toml index 65a395a4..86c0a736 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,10 +34,11 @@ classifiers = [ dependencies = [ "docopt == 0.6.2", "dcm2bids==3.1.1", - "nibabel == 5.2.1", - "nilearn == 0.10.3", - "numpy == 1.24.4", - "pandas == 2.0.3", + "matplotlib==3.10.8", + "nibabel == 5.3.3", + "nilearn == 0.12.1", + "numpy == 2.4.1", + "pandas == 3.0.0", "pybids == 0.16.4", "pydicom == 2.4.4", "pysftp == 0.2.9",