[FIX] Make the ea parser work without hardcoded stuff#292
[FIX] Make the ea parser work without hardcoded stuff#292josephmje merged 9 commits intoTIGRLab:masterfrom
Conversation
|
Hello @DESm1th, Thank you for updating!
To test for issues locally, Comment last updated at 2021-01-19 18:50:20 UTC |
Codecov Report
@@ Coverage Diff @@
## master #292 +/- ##
==========================================
- Coverage 32.44% 32.23% -0.22%
==========================================
Files 60 60
Lines 8861 8919 +58
==========================================
Hits 2875 2875
- Misses 5986 6044 +58
Continue to review full report at Codecov.
|
|
@ThomasHMAC if the pandas version is different from the one in |
jerdra
left a comment
There was a problem hiding this comment.
One more comment as I'm trying to run this script for MODSOCCS:
Can you update the script to be able to run participants individually? It's much easier to debug when you don't force a run of all participants. When one subject has an issue w/its EA data the whole script shouldn't have to fail (see comment w/gracefully handling a TypeError)
| combo2["rating_duration"] = combo2["onset"].shift(-1) - combo2[ | ||
| "onset" | ||
| ].where(mask is False) |
There was a problem hiding this comment.
| combo2["rating_duration"] = combo2["onset"].shift(-1) - combo2[ | |
| "onset" | |
| ].where(mask is False) | |
| combo2["rating_duration"] = combo2["onset"].shift(-1) - combo2[ | |
| "onset" | |
| ].where(mask == False) |
I get an error w/pandas 1.0.3 since "mask is False" evaluates to a single element
| log_file = pd.read_csv(path, sep="\t", skiprows=3) | ||
|
|
||
| time_to_subtract=int(log_file.Duration[log_file.Code=='MRI_start']) | ||
| time_to_subtract = int(log_file.Duration[log_file.Code == "MRI_start"]) |
There was a problem hiding this comment.
doesn't gracefully handle TypeError where integer conversion cannot be performed (i.e missing MRI_start event)
| logger.warning( | ||
| "gold standard is shorter than the number of pt " | ||
| "ratings. pt ratings truncated", | ||
| block_name, | ||
| ) |
There was a problem hiding this comment.
| logger.warning( | |
| "gold standard is shorter than the number of pt " | |
| "ratings. pt ratings truncated", | |
| block_name, | |
| ) | |
| logger.warning( | |
| "gold standard is shorter than the number of pt " | |
| f"ratings. pt ratings truncated, block: {block_name}" | |
| ) |
| logger.warning( | ||
| "number of pt ratings is shorter than the number " | ||
| "of gold std, gold std truncated", | ||
| block_name, | ||
| ) |
There was a problem hiding this comment.
| logger.warning( | |
| "number of pt ratings is shorter than the number " | |
| "of gold std, gold std truncated", | |
| block_name, | |
| ) | |
| logger.warning( | |
| "number of pt ratings is shorter than the number " | |
| f"of gold std, gold std truncated, block: {block_name}" | |
| ) |
|
@josephmje i've made some updates to the script to resolve my own comments, can you do a quick review whenever you get the chance? Mostly so we can get it within the code-base for SPN20 QC? This script needs a full re-write eventually, its barely maintainable 🤷 Thanks Dawn/Thomas for dealing with this beast for the most part! |
This contains my and Thomas' updates and fixes a few bugs that were present.