I am not aware of onavg recommending that people delete vertices from their surface files. Their python examples do appear to use fewer indices for their data than for their surfaces (when "mask=True", but that also isn't what we mean when we say "mask" - to us, "mask" means "set some data to zero, but don't alter the size of any arrays"), though it isn't clear where they actually store the mapping back to the full surface (which appears to be present in their example's plots, as the medial wall is explicitly drawn with a different color), so it appears that they do not delete the vertices from their surfaces. Our tools don't use their "mask=True" convention, at least not in gifti format, and will not be able to display or operate on such incomplete arrays with the full surfaces. The ability to save such collapsed data into gifti format is a fairly unfortunate hazard. I would imagine that their python code has a function somewhere to
turn the collapsed data back into the full 10242 vertices it logically represents - but please don't put NaNs into the medial wall, just use 0s instead (NaN propagates through any floating point operation, so if a spatial operation doesn't use exactly the right ROI, a bunch of data near the medial wall gets replaced with NaN, which quickly invades the rest of the surface through later steps, even if those steps are fully correct).
The integers in the triangles array refer to the indices of the coordinates array. Removing indices from the coordinates array without very carefully altering the triangle information will make your surface broken, and everything that uses spatial neighbor information will break and give the wrong answer (if it doesn't error first). Even done correctly, altering your surfaces this way will likely make them incompatible with the python code onavg used, and your data will be superficially incompatible with any dataset that used the onavg spheres with preexisting tools outside of python. Our surface-data resampling commands also expect the full sphere surface, and for the data to have the same number of vertices as the sphere. Gifti files are usually internally compressed anyway, so any data file that has zeros in the medial wall may already be using little to no disk space to represent the data values of those vertices.
The cifti format, on the other hand, does in fact (usually) exclude medial wall vertices from its data files (but the .surf.gii files aren't altered, so the cifti header contains the mapping back to the full surfaces, and volume if applicable). Consequently, the way that most spatial cifti processing works...is by expanding it back out to all vertices for one hemisphere at a time, doing the operation, and then recompressing the result, because anything else would be a lot more difficult for minimal efficiency gains. The original intention of cifti was to enable correlation across all brain structures without including voxels and vertices that don't have usable data.
ROI options already exist for all spatial processing of gifti data in wb_command. We even have an roi option for surface-based resampling, but like all the others, this only prevents nonsensical data from being used, it doesn't remove vertices from the output array.
In short, our tools are built around the assumption that the subject data on standard mesh is the same dimension as the standard spheres and other surfaces, without removing any vertices. Using "mask=False" convention when saving onavg python data to gifti format will save you, and those working with your data in the future, a lot of time and effort.
Tim