Recent Changes - Search:

Home?

RunningExperiments

AnalysingData

MEG Group

Administrative info

Computers and network

Meetings

How to improve this site

AnalysisWithNeuromag

 To run MaxFilter for a given subject on all the runs at once, you can find a tcsh script entitled 
 MF_v1 under the following directory:
 /neurospin/unicog/protocols/MEG/Pipeline_misc_2009/script_tests/

 Copy and paste it in your analysis directory.

 Make it executable by typing: chmod 755 MF_v1

 Edit the script in order to insert your own variables and directories!!! 

 Here is the script:

 #!/bin/tcsh
 ###################################################################################
 # Anytime you see this :  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! you HAVE to edit the parameters 
 # 
 # This script 
 # 1. takes the files in your original data folder or raw_dir
 # 2. copy them to your analysis folder or analysis_dir
 # 3. applies maxfilter (sss) on the raw data
 ##################################################################################

 # set working directories | 
 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! PUT IN YOUR OWN DIRECTORIES
 set study_dir = /neurospin/local/neuromag/data/hierarchie/
 set raw_dir = /neurospin/local/neuromag/data/hierarchie/hc_080251/090206/
 set analysis_dir = /neurospin/unicog/protocols/MEG/Pipeline_misc_2009/script_tests/vv_misc/

 #  == go to DATA dir/fetch & copy raw data to analysis_dir
 #  == runs MAXFILTER on RAW data files
 cd $raw_dir
 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! use the proper var names / wildcards 
 # e.g. raw*.fif will use all files starting with raw
 # if your folder already contain sss data, the program will stop
 # to avoid this use e.g. raw*run?.fif, it will use the files starting with raw and finishing with run +1 character 

 foreach f(`ls raw*.fif`) 

	#if ($f == *sss*) then
	#	echo "The raw data directory already contains sss files!"
	#	echo "Please, place your raw data in a different folder"
	#	exit 1
	#endif

	# copy raw data to analysis directory
	cd $raw_dir
	echo "Copying" $f "to analysis directory"
	cp $f $analysis_dir
	# change permissions of files
	cd $analysis_dir
	echo "Changing" $f "permissions in analysis directory"
	chmod 666 *	

	# maxfilter - see documentation	
	# insure you have the correct  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	print "Maxfiltering on" $f "with autobad on!"
	maxfilter -v -f $f -autobad 20 -frame head -origin 0 0 40
 end
Edit - History - Print - Recent Changes - Search
Page last modified on March 26, 2009, at 05:15 PM