Skip to content

prf Analyze: how to edit json file

Garikoitz Lerma-Usabiaga edited this page Mar 28, 2020 · 3 revisions

In this page we will add notes to the default json file explaining how a real file would be edited. It is important to maintain the json structure after the edits, otherwise the analysis will fail.

There is a difference if synthetic or real is used.

  • If synthetic is used, the system will read required information about the stimuli in the json file in BIDS/derivatives/prfsynth
  • If real data is used, more parameters will need to be passed in this config file.

This is the default json file coming from the Docker container, with notes (json files do not accept comments, the comments after the // are only for illustrative purposes):

{
    "subjectName": "01",               // The same subject name used in prfsynth  
    "sessionName": "01",               // The same session name used in prfsynth 
    "solver": "vista",                 // The name of the tool to be used: 
    "options": {                       //     options are specific to each tool. When the default config file is  
        "model": "one gaussian",       //     downloaded, it will contain the required parameters. Refer to 
        "grid": false,                 //     each tool's manual to understand all the parameters. 
        "wsearch": "coarse to fine",
        "detrend": 1,
        "keepAllPoints": false,
        "numberStimulusGridPoints": 50
    }
}

For real data, a boolean(isPRFSynthData) and a new section called stimulus is required:

{
    "subjectName": "01",               // The same subject name used in prfsynth  
    "sessionName": "01",               // The same session name used in prfsynth 
    "solver": "vista",                 // The name of the tool to be used.
    "isPRFSynthData": false,           // Required boolean to tell the framework that it is real data
    "options": {                       // Same tool dependent options
        "model": "one oval gaussian",
        "grid": false,
        "wsearch": "coarse sample",
        "detrend": 1,
        "keepAllPoints": false,
        "numberStimulusGridPoints": 50
    },
    "stimulus": {                      // New option to provide the values required by the tool.
        "stimulus_diameter": 24        
    }
}