cortex.surfinfo.equivolume_areas

cortex.surfinfo.equivolume_areas(outfile, subject, smooth=1.0)[source]

Compute smoothed vertex areas on the white matter and pial surfaces.

These are what the webgl viewer’s equivolume depth sampling needs in order to turn a requested volume fraction through the cortical sheet into a position between the two surfaces. They used to be recomputed in javascript on every viewer load with a uniform “umbrella” smoothing; computing them here instead means they are cached, and lets them be smoothed with the cotangent-weighted operator in cortex.polyutils.Surface.smooth, which respects the varying size of the triangles rather than treating every neighbour equally.

Parameters:
outfilestr

Path where the areas will be saved as an npz file.

subjectstr

Subject in the pycortex database for whom the areas will be computed.

smoothfloat, optional

Amount of smoothing to apply. Default 1.0. Pass 0 for the raw barycentric vertex areas.

Notes

Stored under wm_left / wm_right / pia_left / pia_right; see the note in bumpy_flatmap for why left and right are avoided.

Changing the smoothing operator does move the depths the viewer samples at, slightly: against the five umbrella iterations the javascript used, the depth equivolume sampling picks for a requested fraction of 0.5 shifts by about 0.01 of the cortical thickness at the median on S1. The tail is larger, but it is concentrated where the two areas are nearly equal and the depth is poorly determined either way.