I'd prefer to separate the generation of the source space from the writing to disk.

something like make_source_space and setup_source_space.

we would get rid of the fname param that makes API weird to me.

wdyt?