cleanMEG see also at http://yuval-harpaz.github.com/cleanMEG_BIU/ Professor Abeles' method for cleaning MEG data at Bar Ilan University, Israel. cleans the data of 50Hz + harmonics based on line power recording. cleans the data of building vibrations based on accelerometers recording. cleans the data based on reference channels, applying different sets of weights for different frequencies. cleans the heart bit artifact (does not always work). The code includes pdf4D pack for reading and writing 4D-neuroimaging format data files. to use pdf4D independently see: http://biomag.wikidot.com/msi-matlab pdf4D is copyleft (http://www.gnu.org/copyleft/) and GPLv2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html). Therefore the cleanMEG code is also copyleft and GPLv2. if you used it please cite Cleaning MEG artifacts using external cues, Tal and Abeles 2013 http://www.sciencedirect.com/science/article/pii/S0165027013001325 NEW (Dec 2013) ! try cleaning Heartbeat by correctHB function when createCleanFile fails