Closed austinchkuo closed 1 year ago
I think we talked about revisiting this in Metal, with the functionality we have to set a texture as a rendering target, and to read texture data back into Matlab.
The best example we have of this right now should be the metal rendering tests: https://github.com/justingardner/mgl/blob/metal/mgllib/mglTestMetal/mglRunRenderingTests.m#L65
This is the same as the issue that Eli raised. I have a fix for it that Eli is going to test. So will close this one.
pRFGetStimImageFromStimfile takes a stimfile and is supposed to extract the stimuli used
Function throws errors with stimfiles generated by mglMetal and crashes Matlab with stimfiles generated by mgl 2.0
When using stimfiles generated through mglMetal (e.g. mglRetintopy with mglMetal; use attached file): 220608_stim01_aborted0003.mat.zip
When using mgl2.0 generated stimfiles (use attached file): 170324_stim11.mat.zip
Correct output using mgl2.0 should be a struct containing fields t, x, y, and im (documentation for pRFGetStimImageFromStimfile.m) Pass in a stimfile (can be either a string filename, or a strucutre with myscreen/task) created by mglRetinotopy (make sure this is a stimfile created with a version of mglRetinotopy past 10/2011 which has the proper variables stored to enable reconstruction). Will create a volume of dimensions x,y,t with the stimulus image (load in mlrVol to view). stim.x and stim.y are the X and Y coordinates in degrees of every point. stim.t is the array of times at which image is taken.
Example output (for 170324_stim11.mat.zip): test = t: [1x168 double] x: [80x60 double] y: [80x60 double] im: [80x60x168 single]