#!/usr/bin/env python

import jumeg
import os.path

raw_fname = "109925_CAU01A_100715_0842_2_c,rfDC-raw.fif"
if not os.path.isfile(raw_fname):
    print "Please find the test file at the below location on the meg_store2 network drive - \
           cp /data/meg_store2/fif_data/jumeg_test_data/109925_CAU01A_100715_0842_2_c,rfDC-raw.fif ."

#jumeg.jumeg_utils.check_jumeg_standards(raw_fname)

# Filter Functions
#jumeg.jumeg_preprocessing.apply_filter(raw_fname)

fclean = raw_fname.split('-')[0] + ',bp1-45Hz-raw.fif'


# Evoked Functions
#jumeg.jumeg_preprocessing.apply_average(fclean)

# ICA Functions
#jumeg.jumeg_preprocessing.apply_ica(fclean)

fica_name = fclean.strip('-raw.fif') + '-ica.fif'
#jumeg.jumeg_utils.check_jumeg_standards(fica_name)
#jumeg.jumeg_preprocessing.apply_ica_cleaning(fica_name)

# CTPS Functions

#jumeg.jumeg_preprocessing.apply_ctps(fica_name)
fctps_name = '109925_CAU01A_100715_0842_2_c,rfDC,bp1-45Hz,ctps-trigger.npy'
#jumeg.jumeg_preprocessing.apply_ctps_select_ic(fctps_name)

@@ -334,16 +334,74 @@
 fif .%22%0A%0A
+# Function to check and explain the file naming standards%0A
 #jumeg.j
@@ -454,17 +454,17 @@
  Filter 
-F
+f
 unctions
@@ -572,17 +572,16 @@
 w.fif'%0A%0A
-%0A
 # Evoked
@@ -581,17 +581,17 @@
  Evoked 
-F
+f
 unctions
@@ -647,17 +647,17 @@
 %0A%0A# ICA 
-F
+f
 unctions
@@ -702,17 +702,16 @@
 fclean)%0A
-%0A
 fica_nam
@@ -756,48 +756,92 @@
 if'%0A
-#jumeg.jumeg_utils.check_jumeg_standards
+%0A# Perform ECG/EOG rejection using ICA%0A#jumeg.jumeg_preprocessing.apply_ica_cleaning
 (fic
@@ -899,24 +899,41 @@
 ng(fica_name
+, unfiltered=True
 )%0A%0A# CTPS Fu
@@ -930,17 +930,17 @@
 %0A# CTPS 
-F
+f
 unctions
@@ -1122,12 +1122,412 @@
 fctps_name)%0A
+%0A# Function recompose brain response components only%0Afname_ctps_ics = '109925_CAU01A_100715_0842_2_c,rfDC,bp1-45Hz,ctps-trigger-ic_selection.txt'%0A#jumeg.jumeg_preprocessing.apply_ica_select_brain_response(fname_ctps_ics)%0A%0A# Function to process empty file%0Aempty_fname = '109925_CAU01A_100715_0844_2_c,rfDC-empty.fif'%0A#jumeg.jumeg_preprocessing.apply_create_noise_covariance(empty_fname, verbose=True)%0A

Add more functions to example file.