Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

un codespell throughout fixing few left typos automagically #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

Expand Down
2 changes: 1 addition & 1 deletion spacetop_prep/datalad/remove_longerevents.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Examples: participant squeeze emergency ball towards the end of the run, reporting equipment failure.
Scan was aborted 41 seconds earlier than expected. Stimulu PC behavioral data was collected entirely

This code will remove the extra rows from the events.tsv file , which will match the legnth of the bOLD data
This code will remove the extra rows from the events.tsv file , which will match the length of the bOLD data
and resolve the bids-validator errors of "SUSPICIOUSLY_LONG_EVENT_DESIGN"
"""

Expand Down
4 changes: 2 additions & 2 deletions spacetop_prep/events/DEP_bidsify_cue_pain.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def is_equivalent(val1, val2, tolerance=1):
stim['onset_ttl4'] = (stim['onset_ttl3'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['rampdown'])).round(2)

stim['stim_file'] = beh_df['event03_stimulus_type'].map(temperature_map)
stim['stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
stim['stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")


# outcome __________________________________________________________________
Expand All @@ -343,7 +343,7 @@ def is_equivalent(val1, val2, tolerance=1):
outcome['onset_ttl3'] = "n/a"
outcome['onset_ttl4'] = "n/a"
outcome['stim_file'] = 'task-pain_scale.png'
outcome['stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
outcome['stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")

events = pd.concat([cue, expect, stim, outcome], ignore_index=True)
events_sorted = events.sort_values(by='onset')
Expand Down
4 changes: 2 additions & 2 deletions spacetop_prep/events/DEP_bidsify_dryrun_social.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def is_equivalent(val1, val2, tolerance=1):
stim['pain_onset_ttl2'] = (stim['pain_onset_ttl1'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['rampup'])).round(2)
stim['pain_onset_ttl3'] = (stim['pain_onset_ttl2'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['plateau'])).round(2)
stim['pain_onset_ttl4'] = (stim['pain_onset_ttl3'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['rampdown'])).round(2)
stim['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
stim['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")
stim['cognitive_correct_response'] = "n/a"
stim['cognitive_participant_response'] = "n/a"
stim['cognitive_response_accuracy'] = "n/a"
Expand Down Expand Up @@ -737,7 +737,7 @@ def is_equivalent(val1, val2, tolerance=1):
outcome['pain_onset_ttl2'] = "n/a"
outcome['pain_onset_ttl3'] = "n/a"
outcome['pain_onset_ttl4'] = "n/a"
outcome['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
outcome['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")
outcome['cognitive_correct_response'] = "n/a"
outcome['cognitive_participant_response'] = "n/a"
outcome['cognitive_response_accuracy'] = "n/a"
Expand Down
4 changes: 2 additions & 2 deletions spacetop_prep/events/bidsify_social.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def is_equivalent(val1, val2, tolerance=1):
stim['pain_onset_ttl2'] = (stim['pain_onset_ttl1'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['rampup'])).round(2)
stim['pain_onset_ttl3'] = (stim['pain_onset_ttl2'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['plateau'])).round(2)
stim['pain_onset_ttl4'] = (stim['pain_onset_ttl3'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['rampdown'])).round(2)
stim['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
stim['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")
stim['cognitive_correct_response'] = "n/a"
stim['cognitive_participant_response'] = "n/a"
stim['cognitive_response_accuracy'] = "n/a"
Expand Down Expand Up @@ -713,7 +713,7 @@ def is_equivalent(val1, val2, tolerance=1):
outcome['pain_onset_ttl2'] = "n/a"
outcome['pain_onset_ttl3'] = "n/a"
outcome['pain_onset_ttl4'] = "n/a"
outcome['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
outcome['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")
outcome['cognitive_correct_response'] = "n/a"
outcome['cognitive_participant_response'] = "n/a"
outcome['cognitive_response_accuracy'] = "n/a"
Expand Down
4 changes: 2 additions & 2 deletions spacetop_prep/events/bidsify_social_ENH.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def parse_args():
stim['pain_onset_ttl2'] = (stim['pain_onset_ttl1'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['rampup'])).round(2)
stim['pain_onset_ttl3'] = (stim['pain_onset_ttl2'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['plateau'])).round(2)
stim['pain_onset_ttl4'] = (stim['pain_onset_ttl3'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['rampdown'])).round(2)
stim['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
stim['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")
stim['cognitive_correct_response'] = "n/a"
stim['cognitive_participant_response'] = "n/a"
stim['cognitive_response_accuracy'] = "n/a"
Expand All @@ -783,7 +783,7 @@ def parse_args():
outcome['pain_onset_ttl2'] = "n/a"
outcome['pain_onset_ttl3'] = "n/a"
outcome['pain_onset_ttl4'] = "n/a"
outcome['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
outcome['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")
outcome['cognitive_correct_response'] = "n/a"
outcome['cognitive_participant_response'] = "n/a"
outcome['cognitive_response_accuracy'] = "n/a"
Expand Down
4 changes: 2 additions & 2 deletions spacetop_prep/events/bidsify_social_factorize_ENH.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def process_behavioral_data(cue, expect, stim, outcome, beh_df, traj_df, trigger
stim['pain_onset_ttl2'] = (stim['pain_onset_ttl1'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['rampup'])).round(2)
stim['pain_onset_ttl3'] = (stim['pain_onset_ttl2'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['plateau'])).round(2)
stim['pain_onset_ttl4'] = (stim['pain_onset_ttl3'] + beh_df['event03_stimulus_type'].apply(lambda x: stimulus_times[x]['rampdown'])).round(2)
stim['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
stim['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")

if task_name == 'cognitive':
stim['cognitive_correct_response'] = beh_df['event03_C_stim_match']
Expand Down Expand Up @@ -390,7 +390,7 @@ def process_behavioral_data(cue, expect, stim, outcome, beh_df, traj_df, trigger
outcome['stimulusintensity'] = beh_df['event03_stimulus_type']
outcome['stim_file'] = f'task-social/outcomerating/task-{task_name}_scale.png'
if task_name == "pain":
outcome['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Recieved: TRIGGER_AND_Response: RESULT_OK" else "fail")
outcome['pain_stimulus_delivery_success'] = beh_df['event03_stimulus_P_trigger'].apply(lambda x: "success" if x == "Command Received: TRIGGER_AND_Response: RESULT_OK" else "fail")
else:
outcome['pain_stimulus_delivery_success'] = "n/a"

Expand Down
Loading