bbfrederick/rapidtide

Issue finishing happy using external cardiacfile in happy V2.0alpha12

NigelCol opened this issue · 7 comments

Describe the bug
I'm using the happy function using the fredericklab/rapidtide_dev:v2.0alpha12 version. I want to use happy providing an external cardiac text file through --cardiacfile. The function stops and gives me an error 'data dimensions not compatible with existing dimensions'. The --cardiacfreq and --cardiacstart argument values were taken from a physlog.json file. The cardiacfreq is 496 which is the frequency the PPU is sampled at for wireless philips scanners.

To Reproduce

docker run \
    --volume=INPUTDIRECTORY:/data_in,OUTPUTDIRECTORY:/data_out \
    fredericklab/rapidtide_dev:v2.0alpha12 \
        happy \
            /data_in/sub-08_task-rest_run-MB6_bold.nii.gz \
            /data_in/slice_timing.txt \
            /data_out/outputname \
           --cardiacfile=/data_in/cardiac_series.txt \
           --cardiacfreq=496
           --cardiacstart=-69.68548387096774

Error:

data dimensions not compatible with existing dimensions
25.0 25.0
0.0 0.0
['pleth'] ['cardiacfromfmri_25.0Hz', 'normcardiac_25.0Hz', 'envelope_25.0Hz', 'normcardiacfromfmri_dlfiltered25.0Hz', 'cardiacfromfmri_dlfiltered25.0Hz']
(5, 6373) (1, 8120)

Expected behavior
Expected happy to finish without an error.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):
Desktop Ubuntu 16.04, running the docker image from rapidtide_dev:v2.0alpha12

Additional context
Attatch the cardiac text file used for the --cardiacfile argument and the phsylog.json file were I took the values for the --cardiacfreq and --cardiacstart arguments. The fMRI nifti is too large to upload here, but it should be the same one as in the shared dropbox.
happy_issue.zip

This should now be fixed in 2.0alpha13. Please let me know if it is not.

Hi, still having the same issue with the same data, using the 2.0alpha13 dev happy version.

Would it be possible to put the data somewhere where I could try this out? I'm having a hard time figuring out exactly what's going on here.

I uploaded the data to a repository that you can find here : https://github.com/NigelCol/rapidtide_test. The data is under the data folder, I used the --cardiacfile command on the .tsv file using 'cardiac' as column selection.

Ok, I got the data. I'll see what I can learn.

By the way - I just noticed that you don't have a continuation character on "--cardiacfreq=496" line, so happy will never see the cardiac start argument.

EDIT: That's not the problem - I'm getting the same result you are. Just an observation.

Ok, I'm pretty sure I've fixed it now in 2.0alpha14. It was something totally different than what I thought - you were the first person to use a cardiac regressor file that didn't start at time 0 - my code read in the start time, then ignored it :-).

The dataset you sent works now.

I guess someone has to be the first :-). Closing because the issue is fixed!

Thanks.