Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/dm_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions bin/dm_mripicture.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def main():
vmin=100,
vmax=1100,
threshold="auto",
colorbar=False,
)
t1_pic.savefig(outpath, dpi=1000)
logger.debug(
Expand Down
9 changes: 5 additions & 4 deletions bin/dm_parse_ea.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"])

Expand All @@ -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)
Expand Down Expand Up @@ -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"])]
Expand Down
2 changes: 1 addition & 1 deletion bin/dm_parse_faces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion datman/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading