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

[prfanalyze-vista] Unrecognized variable name 'stimulus_diameter'. #97

Open
Gilles86 opened this issue Jan 30, 2025 · 5 comments
Open

Comments

@Gilles86
Copy link

Hey guys,

I'm trying some packages to fit synthesized data from prfsynth.

I created data using

docker run --rm -it \
    --platform linux/amd64 \
    -v "$script_dir/$json_file:/flywheel/v0/input/config.json" \
    -v "$basedir:/flywheel/v0/output" \
    garikoitz/prfsynth

With the json-file basically the default-config of prfsynth.

I then get the following error when I try to fit:

./fit_mrvista.sh verysmall
Running with identifier: verysmall
Using config file: /home/ubuntu/git/paper_braincoder/prfsynth/fit/mrvista/configs/prfanalyze-vista-verysmall.json
WARNING: Using temporary output directory: /flywheel/v0/output/BIDS/derivatives/prfanalyze-vista_temp001
[base/run.py] Using real data, not coming from prfsynthesize.
[base/run.py] This is the temp file with stim info:
/tmp/tmpzu447l.json
[base/run.py] This is the content:
{u'fieldofviewHorz': 20, 'isPRFSynthData': False}
------------------------------------------
Setting up environment variables
---
LD_LIBRARY_PATH is .:/opt/mcr/v95//runtime/glnxa64:/opt/mcr/v95//bin/glnxa64:/opt/mcr/v95//sys/os/glnxa64:/opt/mcr/v95//sys/opengl/lib/glnxa64
This is the config.json file being read: /running/out/options.json
These are the contents of the json file:

tmp =

  struct with fields:

               keepAllPoints: 0
              coarseDecimate: 2
          prfprepareAnalysis: '01'
    numberStimulusGridPoints: 50
                     detrend: 1
                     wsearch: 'coarse to fine'
                        grid: 0
                       model: 'one gaussian'
                         hrf: {0x1 cell}

================================================================================
/flywheel/v0/input/BIDS/sub-verysmall/ses-1/func/sub-verysmall_ses-1_task-prf_acq-normal_run-01_bold.nii.gz
/tmp/tmpzu447l.json
/flywheel/v0/input/BIDS/stimuli/sub-verysmall_ses-1_task-prf_apertures.nii.gz
/running/out/options.json
--------------------------------------------------------------------------------
This is the options file comming in:

allOptions =

  struct with fields:

    vista: [1x1 struct]
     aprf: [1x1 struct]
     afni: [1x1 struct]
      mlr: [1x1 struct]

Error using pmModelFit (line 128)
Unrecognized variable name 'stimulus_diameter'.

Error in prfanalyze_vista (line 96)

MATLAB:table:UnrecognizedVarName

real    0m15.149s
user    0m12.074s
sys     0m2.320s
<ERROR>      An error occurred during execution of the Matlab executable. Exiting!

Note that prfsynth/aprf, prfsynth/popeye, prfsynth/afni can all fit this data out-of-the-box.

Cheers,
Gilles

@garikoitz
Copy link
Contributor

garikoitz commented Jan 30, 2025 via email

@Gilles86
Copy link
Author

@garikoitz
Copy link
Contributor

garikoitz commented Jan 30, 2025 via email

@Gilles86
Copy link
Author

Hey @garikoitz ,

Yes. That was the issue. When I use this config:

{
    "subjectName"    : "verysmall",
    "sessionName"    : "1",
    "solver"         : "vista",
    "tasks"          : "[all]",
    "isPRFSynthData" : true,
    "options": {
    	"prfprepareAnalysis" : "01",
        "hrf": [],
        "model"              : "one gaussian",
        "grid"               :  false,
        "wsearch"            : "coarse to fine",
        "detrend"            : 1,
        "keepAllPoints"      : false,
        "numberStimulusGridPoints": 50,
        "coarseDecimate": 2
    },
    "stimulus": {
    	"fieldofviewHorz":20,
        "stimulus_diameter":20
    }
}

That works!

Note that the stimulus_diameter is missing from your default config file

One more note: When I try to run your package as a singularity container, I get the following error:

CONFIG_FILE=$PWD/configs/prfanalyze-vista-${IDENTIFIER}.json
OUTPUT_DIR=/shares/zne.uzh/gdehol/ds-prfsynth
SIF_IMAGE=/shares/zne.uzh/containers/prfanalyze-vista.sif

echo "Running with identifier: $IDENTIFIER"
echo "Using config file: $CONFIG_FILE"

# Run Singularity with writable-tmpfs
singularity exec --cleanenv --writable-tmpfs \
    --bind "$OUTPUT_DIR:/flywheel/v0/input" \
    --bind "$OUTPUT_DIR:/flywheel/v0/output" \
    --bind $CONFIG_FILE:/flywheel/v0/input/config.json \
    "$SIF_IMAGE" \
    /flywheel/v0/run.sh
Running with identifier: verysmall
Using config file: /home/gdehol/git/paper_braincoder/prfsynth/fit/mrvista/configs/prfanalyze-vista-verysmall.json
INFO:    Mounting image with FUSE.
Preparing solver "prfanalyze-vista":
[base/run.py] Using synthetic data coming from prfsynthesize.
  Subject: verysmall
  Session: 1
  Options: {'prfprepareAnalysis': '01', 'hrf': [], 'model': 'one gaussian', 'grid': False, 'wsearch': 'coarse to fine', 'detrend': 1, 'keepAllPoints': False, 'numberStimulusGridPoints': 50, 'coarseDecimate': 2}
WARNING: Using temporary output directory: /flywheel/v0/output/BIDS/derivatives/prfanalyze-vista_temp006
Output BIDS directory: /flywheel/v0/output/BIDS/derivatives/prfanalyze-vista_temp006/sub-verysmall/ses-1
Beginning os.wait() for /solve.sh, run=01 (child pid is 3991966)
Failed to exec /solve.sh script!
No estimates.json file found.

Again, it works fine with afni and popeye (but not prfanalyze-aprf!)

This makes it impossible to run this stuff on our cluster. Is this a known issue? Do you want me to open a new one for that?

@garikoitz
Copy link
Contributor

garikoitz commented Jan 30, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants