vistalab / vistasoft

VISTASOFT is the main software repository of the VISTA lab at Stanford University.
http://vistalab.stanford.edu
147 stars 142 forks source link

pRF mapping. Changing model parameters: outcomes are almost identical #140

Closed avandenbroucke closed 8 years ago

avandenbroucke commented 9 years ago

Dear users,

I've started using mrVista to try to estimate pRF. I've succeeded in making the model run, however, it didn't look very good. I'm using it mainly for polar mapping (and I have experience in travelling wave analyses, so know what the maps should look like). Dorsally, the borders of V1/V2/V3 are very clear, but ventrally, I almost can't distinguish them. One problem might be that the stimulusSize might be incorrect. I think the calculation from screen resolution to visual angle went wrong, because I entered 10 visual degrees with Stimulus Size in the retMenu, it was displayed bigger on the screen. When I recalculated afterwards, the actual visual angle is 18 degrees. I tried to correct for that in my moving_bar_params by changing params.stimSize and params.radius to 18. The model did make different calculations according to the comments in Matlab (see below), however, the outcome is almost identical. To estimate the pRF, I don't use the mrVista GUI, only Matlab scripting. I did check that my stimulus sequence is what I presented using mrVista GUI.

I have 3 questions: -Are there more things I should change except for params.stimSize and params.radius to change the visual angle settings of the model? -Does the params variable from moving_bars_stimulus overwrite the information entered in dataTYPES.retinotopyModelParams (I entered moving_bars_params and images as imFile and paramsFile in this struct). -Do you have any advice on what else I can do to make the polar maps in ventral areas better?

Thank you very much in advance. Annelinde

MATLAB COMMENTS WHEN RUNNING MODEL For stimsize and radius = 10.

[rmDefineParameters]:Resetting parameter: coarse to fine, decimate,. [rmDefineParameters]:Stimulus size: 10.00deg. [rmDefineParameters]:Scan 1:HRF type: [two gammas (spm style)]; parameters: [ 5.40 5.20 10.80 7.35 0.35]. (22-Jul-2015 13:38:03) [rmDefineParameters]:Resetting parameter: coarse to fine, decimate,. [rmDefineParameters]:Not a Gray view (Inplane): ABANDONING coarse-to-fine approach (that means no initial smoothing of the data). [rmDefineParameters]:PRF size spacing: from 0.20 to 10.00 deg (24). [rmDefineParameters]:Stimulus sample size: 0.20 deg. [rmDefineParameters]:Minimimal pRF position spacing in triangular grid: 0.47 deg. [rmDefineParameters]:Number of [x,y,s] models for grid search: 97560. [rmDefineParameters]:Resetting parameter: coarse to fine, decimate,. [rmDefineParameters]:Resetting parameter: coarse to fine, decimate,. makeStimFromScan: Loading images: /home/despo/avanden/WM_pilot/Data/S99/pRF_July2015/recon_data/Session/Stimuli/image.mat... makeStimFromScan: Loading images for scan 1... makeStimFromScan: Filtering images... makeStimFromScan: Downsampling images to stimulus grid... makeStimFromScan: Averaging images within a TR...

[rmMain]:Three stage coarse-to-fine fit. [rmGridFit]:Making 97560 model samples:..........Done[2 min]. (22-Jul-2015 13:39:57)

For stimsize and radius = 18

[rmDefineParameters]:Resetting parameter: coarse to fine, decimate,. [rmDefineParameters]:Stimulus size: 18.00deg. [rmDefineParameters]:Scan 1:HRF type: [two gammas (spm style)]; parameters: [ 5.40 5.20 10.80 7.35 0.35]. (22-Jul-2015 17:01:24) [rmDefineParameters]:Resetting parameter: coarse to fine, decimate,. [rmDefineParameters]:Not a Gray view (Inplane): ABANDONING coarse-to-fine approach (that means no initial smoothing of the data). [rmDefineParameters]:PRF size spacing: from 0.20 to 18.00 deg (24). [rmDefineParameters]:Stimulus sample size: 0.36 deg. [rmDefineParameters]:Minimimal pRF position spacing in triangular grid: 0.72 deg. [rmDefineParameters]:Number of [x,y,s] models for grid search: 110952. [rmDefineParameters]:Resetting parameter: coarse to fine, decimate,. [rmDefineParameters]:Resetting parameter: coarse to fine, decimate,. makeStimFromScan: Loading images: /home/despo/avanden/WM_pilot/Data/S99/pRF_July2015/recon_data/Session/Stimuli/image.mat... makeStimFromScan: Loading images for scan 1... makeStimFromScan: Filtering images... makeStimFromScan: Downsampling images to stimulus grid... makeStimFromScan: Averaging images within a TR...

[rmMain]:Three stage coarse-to-fine fit. [rmGridFit]:Making 110952 model samples:..........Done[4 min]. (22-Jul-2015 17:05:08)

JWinawer commented 9 years ago

A few points.

Some of your comments seem to be about the vistadisp repository, which is for showing stimuli. Some of your comments are about the vistasoft repository, which is used for analyzing data. I will try to respond to these separately as they are separate issues.

One problem might be that the stimulusSize might be incorrect. I think the calculation from screen resolution to visual angle went wrong, because I entered 10 visual degrees with Stimulus Size in the retMenu, it was displayed bigger on the screen. When I recalculated afterwards, the actual visual angle is 18 degrees. I tried to correct for that in my moving_bar_params by changing params.stimSize and params.radius to 18

This appears to be a comment about your experiment using vistadisp. If you want vistadisp to control your stimulus size, then you need to tell it how big your display is. The way to do that is to create a calibration file for your display. Some example calibration files are included in the software, such as '3T_Back_Bore_800x600'. Most likely none of these will work for your display. If you create one that is appropriate for your display, then hopefully the code will create a stimulus at the size you tell it, in units of degrees of visual angle. If not, then consider posting a comment on the vistadisp github page.

When solving pRF models in vistasoft, you can use the outputs of files created from vistadisp. This is what you did, since your code output indicates that the experiment choice in the prf params is 'stimFromScan'. You will notice when you use the 'stimFromScan' option, most fields in the rmEditStimParams GUI get greyed out (if you open the GUI), because these parameters are read from the params and images files, and not determined by the GUI. The 'Radius' field does not get grayed out however, and hence should be filled in correctly to match what the subject actually saw, irrespective of how you called the 'ret' function in vistadisp when running the experiment, and irrespective of what is in the stim params file. If you don't use the GUI, then I think that dataTYPES.retinotopyModelParams.stimSize should be set to the stimulus radius, in degrees of visual angle. This is equivalent to changing the radius in the GUI.

Note that if you change the Radius field in the rmEditStimParams GUI, all your pRF solutions will change by the same scale factor. This should not affect how your maps look, only the units of eccentricity. So if you double the Radius field, all your pRF solutions should look about the same, except the eccentricity will be double. This is approximately true, not exactly true, since the x-y-sigma grid might not scale up exactly with the radius.

Are there more things I should change except for params.stimSize and params.radius to change the visual angle settings of the model?

When you use the stimFromScan option, the code will get the images from your image file, and will convert them into units of visual angle from the Radius field in 'rmEditStimParams' GUI (or the stimSize field in the dataTYPES.retinotopyModelParams). It makes no difference what values of stimulus size are specified in the params file created by visatdisp and used as input to the pRF model solutions.

Does the params variable from moving_bars_stimulus overwrite the information entered in dataTYPES.retinotopyModelParams (I entered moving_bars_params and images as imFile and paramsFile in this struct).

The parameters in dataTYPES.retinotopyModelParams are used to populate fields in the rmEditStimParams GUI, which are in turn used to make the stimulus representation for solving the model. These fields include the image and parameters files, if you choose to define the stimulus from files (stimFromScan). If you open the GUI and change the parameters, you can choose to save them to dataTYPES by clicking 'save to dataTYPES' in the GUI, or not. If you do not save them to dataTYPES, they will nonetheless populate fields in the view structure and remain there until you close the GUI. Fields in the GUI that are grayed out when you choose 'StimFromScan' are ignored, as far as I know (such as num cycles). At least that was the intention in graying them out. FIelds which are not grayed out, such as Radius and Detrending Max, are used for solving the models.

Do you have any advice on what else I can do to make the polar maps in ventral areas better?

I have no specific ideas. There are many things which can contribute to bad data, such as a subject that doesn't fixate or falls asleep, or part of the screen being occluded during the experiment, or poor gray-white segmentation, or poor alignment between inplane and volume anatomy, or signal dropout from large vessels, and so on. Diagnosing bad model fits requires time examining all stages of the pipeline, from experiment through analysis.

avandenbroucke commented 9 years ago

Thank you for your quick and thorough reply.

Indeed, I thought I adjusted the calibration file for use in our scanner, but apparently this went wrong. Although the stimulus size was what I intended it to be during stimulus presentation, the calculation to visual angles was incorrect. I'll check why this went wrong and if I find something in the script, I'll post it.

Thank you for the explanation on how to change stimulusSize. You are right that eccentricity values almost double when I implement the model using a radius of 18 degrees, but not the polar angle.

I can rule out bad data due to the subject or an occluded screen (I was the subject myself), but gray-white matter segmentation, poor alignment or signal drop-out could contribute. Thank you for the suggestions.