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
ENH: Add high-level predictor fetching utilities #112
Conversation
@jsmentch would you find this useful? |
Yes definitely - I was previously doing resampling to TR manually so the resampling alone would be convenient in the future |
Cool. Also check out this PR: rbroc/neuroscout-encoding-models#2 This is the workflow roberta was working on w/ himalaya. I don't think I'll implement a full workflow for Neuroscout yet, but with this helper function it should be easy for people to use the data as they wish. |
Codecov Report
@@ Coverage Diff @@
## master #112 +/- ##
===========================================
- Coverage 87.10% 75.97% -11.14%
===========================================
Files 17 18 +1
Lines 737 845 +108
===========================================
Hits 642 642
- Misses 95 203 +108
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Adds a
fetch_utils
module, with the functionfetch_predictors
&fetch_images
This helper simplifies using
api.predictor_events
to fetch predictors.After fetching predictors using
predictor_events
, it does the following:duration
, andTR
from API for each unique run (from/api/tasks
), and compute the probablyn_vols
for each. Note: ideally this would be grabbed directly from the volumes, rather than computed, but I didn't record this in the API. I could do this in the future, but need to add this to the API.BIDSVariableCollection
(pybids) from these Predictors, to facilitate resampling toTR
(without reimplementing this logic).BIDSVariableCollection
if the user wants to applyTransformations
(e.g. scale), or can return adf
(resampled or not).The main problem I see here is the
pybids
dependency, but I think this will help users grab TR resampled timeseries.fetch_images
simplifies the process of fetching images from Neuroscout using datalad by: