MneExperiment.clear_cache(self, level=1)

Remove cached files.

level : int

Level up to which to clear the cache (see notes below). The default is 1, which deletes all cached files.


Each lower level subsumes the higher levels:

Delete all cached files.
Epoched files - these need to be cleared when anything about the epoch definition changes (tmin, tmax, event inclusion, …). Note that you might also have to manually update epoch rejection files with the MneExperiment.make_epoch_selection() method.
tests - these need to be cleared when the members of the relevant subject groups change.


To delete only test files, after adding raw data for a new subject to the experiment:

>>> e.clear_cache(5)

To delete cached data files after changing the selection criteria for a secondary epoch:

>>> e.clear_cache(2)

If criteria on a primary epoch are changed, the trial rejection has to be re-done in addition to clearing the cache.

To delete all cached files and clear up hard drive space:

>>> e.clear_cache(1)