├── .codespellrc
├── .github
└── ISSUE_TEMPLATE
│ └── bug_report.md
├── .gitignore
├── .gitmodules
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Contents.m
├── LICENSE
├── README.md
├── eeglab.m
├── eeglab.prj
├── functions
├── @eegobj
│ ├── display.m
│ ├── eegobj.m
│ ├── fieldnames.m
│ ├── horzcat2.m
│ ├── isfield.m
│ ├── isstruct.m
│ ├── length.m
│ ├── orderfields.m
│ ├── rmfield.m
│ ├── simpletest.m
│ ├── subsasgn.m
│ └── subsref.m
├── @memmapdata
│ ├── display.m
│ ├── double.m
│ ├── end.m
│ ├── isnumeric.m
│ ├── length.m
│ ├── memmapdata.m
│ ├── ndims.m
│ ├── reshape.m
│ ├── size.m
│ ├── subsasgn.m
│ ├── subsref.m
│ └── sum.m
├── @mmo
│ ├── binaryopp.m
│ ├── bsxfun.m
│ ├── changefile.m
│ ├── checkcopies_local.m
│ ├── checkworkspace.m
│ ├── ctranspose.m
│ ├── display.m
│ ├── double.m
│ ├── end.m
│ ├── fft.m
│ ├── isnumeric.m
│ ├── length.m
│ ├── mmo.m
│ ├── ndims.m
│ ├── permute.m
│ ├── reshape.m
│ ├── size.m
│ ├── subsasgn.m
│ ├── subsasgn_old.m
│ ├── subsref.m
│ ├── sum.m
│ ├── transpose.m
│ ├── unitaryopp.m
│ └── var.m
├── adminfunc
│ ├── abouteeglab.m
│ ├── biosigpathfirst.m
│ ├── biosigpathlast.m
│ ├── eeg_cache.m
│ ├── eeg_checkchanlocs.m
│ ├── eeg_checkset.m
│ ├── eeg_eval.m
│ ├── eeg_getdatact.m
│ ├── eeg_getversion.m
│ ├── eeg_global.m
│ ├── eeg_helpadmin.m
│ ├── eeg_helpgui.m
│ ├── eeg_helphelp.m
│ ├── eeg_helpmenu.m
│ ├── eeg_helpmisc.m
│ ├── eeg_helppop.m
│ ├── eeg_helpsigproc.m
│ ├── eeg_helpstatistics.m
│ ├── eeg_helpstudy.m
│ ├── eeg_helptimefreq.m
│ ├── eeg_hist.m
│ ├── eeg_options.m
│ ├── eeg_options.txt
│ ├── eeg_optionsbackup.m
│ ├── eeg_optionsbackup.txt
│ ├── eeg_readoptions.m
│ ├── eeg_retrieve.m
│ ├── eeg_store.m
│ ├── eegh.m
│ ├── eeglab_error.m
│ ├── eeglab_execmenu.m
│ ├── eeglab_new.m
│ ├── eeglab_options.m
│ ├── eeglab_update.m
│ ├── eeglab_warning.m
│ ├── error_bc.m
│ ├── gethelpvar.m
│ ├── getkeyval.m
│ ├── gettext.m
│ ├── hlp_argstruct2linearcell.m
│ ├── intersect_bc.m
│ ├── is_sccn.m
│ ├── iseeglabdeployed.m
│ ├── ismatlab.m
│ ├── ismember_bc.m
│ ├── plugin_askinstall.m
│ ├── plugin_extract.m
│ ├── plugin_getweb.m
│ ├── plugin_install.m
│ ├── plugin_menu.m
│ ├── plugin_movepath.m
│ ├── plugin_remove.m
│ ├── plugin_search.m
│ ├── plugin_status.m
│ ├── plugin_uifilter.m
│ ├── plugin_uiupdate.m
│ ├── plugin_urlread.m
│ ├── plugin_urlreadwrite.m
│ ├── plugin_urlsize.m
│ ├── plugin_urlwrite.m
│ ├── pop_delset.m
│ ├── pop_editoptions.m
│ ├── pop_rejmenu.m
│ ├── pop_stdwarn.m
│ ├── removepath.m
│ ├── search-icon.png
│ ├── setdiff_bc.m
│ ├── troubleshooting_data_formats.m
│ ├── union_bc.m
│ ├── unique_bc.m
│ └── vararg2str.m
├── guifunc
│ ├── README.txt
│ ├── errordlg2.m
│ ├── finputcheck.m
│ ├── inputdlg2.m
│ ├── inputgui.m
│ ├── listdlg2.m
│ ├── pophelp.m
│ ├── questdlg2.m
│ ├── supergui.m
│ └── warndlg2.m
├── miscfunc
│ ├── abspeak.m
│ ├── arrow.m
│ ├── averef.m
│ ├── brainstorm2eeglab.m
│ ├── caliper.m
│ ├── chanproj.m
│ ├── cleanvarname.m
│ ├── compareeeglabdistrib.m
│ ├── compdsp.m
│ ├── compheads.m
│ ├── compile_eeglab.m
│ ├── compmap.m
│ ├── compplot.m
│ ├── compsort.m
│ ├── convolve.m
│ ├── corrimage.m
│ ├── covary.m
│ ├── crossfold.m
│ ├── crossfreq.m
│ ├── datlim.m
│ ├── del2map.m
│ ├── dendhier.m
│ ├── dendplot.m
│ ├── detectmalware.m
│ ├── difftopo.m
│ ├── eeg_ms2f.m
│ ├── eeg_time2prev.m
│ ├── eegdraw.m
│ ├── eegdrawg.m
│ ├── eegmovie.m
│ ├── eegplotgold.m
│ ├── eegplotold.m
│ ├── eegplotsold.m
│ ├── envproj.col
│ ├── envproj.m
│ ├── erpregout.m
│ ├── erpregoutfunc.m
│ ├── eucl.m
│ ├── fastregress.m
│ ├── fieldtrip2eeglab.m
│ ├── fillcurves.m
│ ├── findduplicatefunctions.m
│ ├── gabor2d.m
│ ├── gauss.m
│ ├── gauss2d.m
│ ├── gauss3d.m
│ ├── getallmenus.m
│ ├── getallmenuseeglab.m
│ ├── getipsph.m
│ ├── getmfilelist.m
│ ├── gradmap.m
│ ├── gradplot.m
│ ├── headmovie.m
│ ├── help2html2.m
│ ├── helpforexe.m
│ ├── hist2.m
│ ├── hungarian.m
│ ├── icademo.m
│ ├── imagescloglog.m
│ ├── imagesclogy.m
│ ├── kmeans_st.m
│ ├── laplac2d.m
│ ├── lapplot.m
│ ├── loadelec.m
│ ├── loc_subsets.m
│ ├── logimagesc.m
│ ├── loglike.m
│ ├── logspec.m
│ ├── make_timewarp.m
│ ├── makeelec.m
│ ├── makehelpfiles.m
│ ├── makehtml.m
│ ├── mapcorr.m
│ ├── matcorr.m
│ ├── matperm.m
│ ├── means.m
│ ├── nan_std.m
│ ├── numdim.m
│ ├── pcexpand.m
│ ├── pcsquash.m
│ ├── perminv.m
│ ├── plotproj.m
│ ├── promax.m
│ ├── qrtimax.m
│ ├── read_rdf.m
│ ├── readlocsold.m
│ ├── replace_in_all_files.m
│ ├── rmart.m
│ ├── rmsave.m
│ ├── rotatematlab.m
│ ├── runicalowmem.m
│ ├── runicatest.m
│ ├── runpca.m
│ ├── runpca2.m
│ ├── scanfold.m
│ ├── seemovie.m
│ ├── setfont.m
│ ├── shortread.m
│ ├── show_events.m
│ ├── testica.m
│ ├── textgui.m
│ ├── tftopo.m
│ ├── timefrq.m
│ ├── topoimage.m
│ ├── tutorial.m
│ ├── unique_cell_string.m
│ ├── uniquef.m
│ ├── upgma.m
│ ├── varimax.m
│ ├── varsort.m
│ ├── vectdata.m
│ └── zica.m
├── popfunc
│ ├── eeg_addnewevents.m
│ ├── eeg_amplitudearea.m
│ ├── eeg_boundarytype.m
│ ├── eeg_chaninds.m
│ ├── eeg_compare.m
│ ├── eeg_context.m
│ ├── eeg_countepochs.m
│ ├── eeg_decodechan.m
│ ├── eeg_dipselect.m
│ ├── eeg_eegrej.m
│ ├── eeg_emptyset.m
│ ├── eeg_epoch2continuous.m
│ ├── eeg_epochformat.m
│ ├── eeg_eventformat.m
│ ├── eeg_eventhist.m
│ ├── eeg_eventtable.m
│ ├── eeg_eventtypes.m
│ ├── eeg_findboundaries.m
│ ├── eeg_getepochevent.m
│ ├── eeg_getica.m
│ ├── eeg_hedremoveunicode.m
│ ├── eeg_import.m
│ ├── eeg_insertbound.m
│ ├── eeg_insertboundold.m
│ ├── eeg_interp.m
│ ├── eeg_isboundary.m
│ ├── eeg_laplac.m
│ ├── eeg_lat2point.m
│ ├── eeg_latencyur.m
│ ├── eeg_matchchans.m
│ ├── eeg_mergechan.m
│ ├── eeg_mergelocs.m
│ ├── eeg_mergelocs_diffstruct.m
│ ├── eeg_multieegplot.m
│ ├── eeg_oldica.m
│ ├── eeg_point2lat.m
│ ├── eeg_pv.m
│ ├── eeg_pvaf.m
│ ├── eeg_regepochs.m
│ ├── eeg_rejmacro.m
│ ├── eeg_rejsuperpose.m
│ ├── eeg_rereject.m
│ ├── eeg_timeinterp.m
│ ├── eeg_topoplot.m
│ ├── eeg_uniformepochinfo.m
│ ├── eeg_urlatency.m
│ ├── getchanlist.m
│ ├── importevent.m
│ ├── pop_adjustevents.m
│ ├── pop_autorej.m
│ ├── pop_averef.m
│ ├── pop_biosig.m
│ ├── pop_biosig16.m
│ ├── pop_biosig16ying.m
│ ├── pop_chancenter.m
│ ├── pop_chancoresp.m
│ ├── pop_chanedit.m
│ ├── pop_chanevent.m
│ ├── pop_chansel.m
│ ├── pop_comments.m
│ ├── pop_compareerps.m
│ ├── pop_comperp.m
│ ├── pop_copyset.m
│ ├── pop_crossf.m
│ ├── pop_editeventfield.m
│ ├── pop_editeventvals.m
│ ├── pop_editset.m
│ ├── pop_eegfilt.m
│ ├── pop_eegplot.m
│ ├── pop_eegthresh.m
│ ├── pop_envtopo.m
│ ├── pop_epoch.m
│ ├── pop_erpimage.m
│ ├── pop_eventstat.m
│ ├── pop_expevents.m
│ ├── pop_expica.m
│ ├── pop_export.m
│ ├── pop_fileio.m
│ ├── pop_fileiodir.m
│ ├── pop_findmatchingcomps.m
│ ├── pop_fusechanrej.m
│ ├── pop_headplot.m
│ ├── pop_icathresh.m
│ ├── pop_importdata.m
│ ├── pop_importegimat.m
│ ├── pop_importepoch.m
│ ├── pop_importerplab.m
│ ├── pop_importevent.m
│ ├── pop_importpres.m
│ ├── pop_interp.m
│ ├── pop_jointprob.m
│ ├── pop_loadbci.m
│ ├── pop_loadset.m
│ ├── pop_mergeset.m
│ ├── pop_newcrossf.m
│ ├── pop_newset.m
│ ├── pop_newtimef.m
│ ├── pop_plotdata.m
│ ├── pop_plottopo.m
│ ├── pop_prop.m
│ ├── pop_readegi.m
│ ├── pop_readlocs.m
│ ├── pop_readsegegi.m
│ ├── pop_rejchan.m
│ ├── pop_rejchanspec.m
│ ├── pop_rejcont.m
│ ├── pop_rejepoch.m
│ ├── pop_rejkurt.m
│ ├── pop_rejspec.m
│ ├── pop_rejtrend.m
│ ├── pop_reref.m
│ ├── pop_resample.m
│ ├── pop_rmbase.m
│ ├── pop_rmdat.m
│ ├── pop_runica.m
│ ├── pop_runscript.m
│ ├── pop_saveh.m
│ ├── pop_saveset.m
│ ├── pop_select.m
│ ├── pop_selectcomps.m
│ ├── pop_selectevent.m
│ ├── pop_signalstat.m
│ ├── pop_snapread.m
│ ├── pop_spectopo.m
│ ├── pop_subcomp.m
│ ├── pop_timef.m
│ ├── pop_timtopo.m
│ ├── pop_topochansel.m
│ ├── pop_topoplot.m
│ ├── pop_writeeeg.m
│ └── pop_writelocs.m
├── sigprocfunc
│ ├── acsobiro.m
│ ├── axcopy.m
│ ├── binica.m
│ ├── binica.sc
│ ├── biosig2eeglab.m
│ ├── biosig2eeglabevent.m
│ ├── blockave.m
│ ├── cart2topo.m
│ ├── cbar.m
│ ├── celltomat.m
│ ├── chancenter.m
│ ├── changeunits.m
│ ├── compvar.m
│ ├── condstat.m
│ ├── convertlocs.m
│ ├── copyaxis.m
│ ├── coregister.m
│ ├── dipoledensity.m
│ ├── eegfilt.m
│ ├── eegfiltfft.m
│ ├── eegplot.m
│ ├── eegplot2event.m
│ ├── eegplot2trial.m
│ ├── eegplot_readkey.m
│ ├── eegplotlegacy.m
│ ├── eegrej.m
│ ├── eegthresh.m
│ ├── entropy_rej.m
│ ├── env.m
│ ├── envtopo.m
│ ├── epoch.m
│ ├── erpimage.m
│ ├── eventalign.m
│ ├── eventlock.m
│ ├── eyelike.m
│ ├── fastif.m
│ ├── floatread.m
│ ├── floatwrite.m
│ ├── forcelocs.m
│ ├── gettempfolder.m
│ ├── headplot.m
│ ├── icaact.m
│ ├── icadefs.m
│ ├── icaproj.m
│ ├── icavar.m
│ ├── imagesctc.m
│ ├── isscript.m
│ ├── jader.m
│ ├── jointprob.m
│ ├── kmeanscluster.m
│ ├── kurt.m
│ ├── loadtxt.m
│ ├── lookupchantemplate.m
│ ├── matsel.m
│ ├── mattocell.m
│ ├── metaplottopo.m
│ ├── movav.m
│ ├── moveaxes.m
│ ├── mri3dplot.m
│ ├── nan_mean.m
│ ├── parsetxt.m
│ ├── phasecoher.m
│ ├── plotchans3d.m
│ ├── plotcurve.m
│ ├── plotdata.m
│ ├── ploterp.m
│ ├── plotmesh.m
│ ├── plotsphere.m
│ ├── plottopo.m
│ ├── posact.m
│ ├── projtopo.m
│ ├── qqdiagram.m
│ ├── readedf.m
│ ├── readeetraklocs.m
│ ├── readegi.m
│ ├── readegihdr.m
│ ├── readegilocs.m
│ ├── readelp.m
│ ├── readlocs.m
│ ├── readneurodat.m
│ ├── readneurolocs.m
│ ├── readtxtfile.m
│ ├── realproba.m
│ ├── rejkurt.m
│ ├── rejstatepoch.m
│ ├── rejtrend.m
│ ├── reref.m
│ ├── rmbase.m
│ ├── runica.m
│ ├── runica_ml.m
│ ├── runica_ml2.m
│ ├── runica_mlb.m
│ ├── sbplot.m
│ ├── shuffle.m
│ ├── signalstat.m
│ ├── slider.m
│ ├── snapread.m
│ ├── sobi.m
│ ├── spec.m
│ ├── spectopo.m
│ ├── sph2topo.m
│ ├── spher.m
│ ├── spherror.m
│ ├── strmultiline.m
│ ├── textsc.m
│ ├── timefdetails.m
│ ├── timtopo.m
│ ├── topo2sph.m
│ ├── topoplot.m
│ ├── transformcoords.m
│ ├── trial2eegplot.m
│ ├── uigetfile2.m
│ ├── uiputfile2.m
│ ├── white1st.col
│ ├── writeeeg.m
│ └── writelocs.m
├── statistics
│ ├── README.txt
│ ├── anova1_cell.m
│ ├── anova1rm_cell.m
│ ├── anova2_cell.m
│ ├── anova2rm_cell.m
│ ├── concatdata.m
│ ├── corrcoef_cell.m
│ ├── fdr.m
│ ├── stat_surrogate_ci.m
│ ├── stat_surrogate_pvals.m
│ ├── statcond.m
│ ├── statcondfieldtrip.m
│ ├── surrogdistrib.m
│ ├── teststat.m
│ ├── ttest2_cell.m
│ └── ttest_cell.m
├── studyfunc
│ ├── compute_ersp_times.m
│ ├── eeglabciplot.m
│ ├── gethashcode.m
│ ├── neural_net.m
│ ├── optimal_kmeans.m
│ ├── pop_addindepvar.m
│ ├── pop_chanplot.m
│ ├── pop_clust.m
│ ├── pop_clustedit.m
│ ├── pop_dipparams.m
│ ├── pop_erpimparams.m
│ ├── pop_erpparams.m
│ ├── pop_erspparams.m
│ ├── pop_importgroupvar.m
│ ├── pop_limo.m
│ ├── pop_limoresults.m
│ ├── pop_listfactors.m
│ ├── pop_loadstudy.m
│ ├── pop_preclust.m
│ ├── pop_precomp.m
│ ├── pop_savestudy.m
│ ├── pop_specparams.m
│ ├── pop_statparams.m
│ ├── pop_study.m
│ ├── pop_studydesign.m
│ ├── pop_studyerp.m
│ ├── pop_studywizard.m
│ ├── robust_kmeans.m
│ ├── std_addvarlevel.m
│ ├── std_apcluster.m
│ ├── std_builddesignmat.m
│ ├── std_cell2setcomps.m
│ ├── std_cell2table.m
│ ├── std_centroid.m
│ ├── std_changroup.m
│ ├── std_chaninds.m
│ ├── std_chantopo.m
│ ├── std_checkconsist.m
│ ├── std_checkdatasession.m
│ ├── std_checkdesign.m
│ ├── std_checkfiles.m
│ ├── std_checkset.m
│ ├── std_clustmaxelec.m
│ ├── std_combtrialinfo.m
│ ├── std_comppol.m
│ ├── std_createclust.m
│ ├── std_custom.m
│ ├── std_detachplots.m
│ ├── std_dipoleclusters.m
│ ├── std_dipplot.m
│ ├── std_editset.m
│ ├── std_erp.m
│ ├── std_erpimage.m
│ ├── std_erpimageplot.m
│ ├── std_erpplot.m
│ ├── std_ersp.m
│ ├── std_erspplot.m
│ ├── std_figtitle.m
│ ├── std_filecheck.m
│ ├── std_fileinfo.m
│ ├── std_findgroupvars.m
│ ├── std_findoutlierclust.m
│ ├── std_findsameica.m
│ ├── std_getdataset.m
│ ├── std_getindvar.m
│ ├── std_gettrialsind.m
│ ├── std_indvarmatch.m
│ ├── std_interp.m
│ ├── std_itcplot.m
│ ├── std_limo.m
│ ├── std_limodesign.m
│ ├── std_limoerase.m
│ ├── std_limoresults.m
│ ├── std_lm_getvars.m
│ ├── std_lm_seteegfields.m
│ ├── std_loadalleeg.m
│ ├── std_makedesign.m
│ ├── std_maketrialinfo.m
│ ├── std_mergeclust.m
│ ├── std_movecomp.m
│ ├── std_moveoutlier.m
│ ├── std_movie.m
│ ├── std_pac.m
│ ├── std_pacplot.m
│ ├── std_plot.m
│ ├── std_plotcurve.m
│ ├── std_plotdmat.m
│ ├── std_plottf.m
│ ├── std_preclust.m
│ ├── std_precomp.m
│ ├── std_precomp_worker.m
│ ├── std_prepare_neighbors.m
│ ├── std_propplot.m
│ ├── std_pvaf.m
│ ├── std_readcustom.m
│ ├── std_readdata.m
│ ├── std_readeegfield.m
│ ├── std_readerp.m
│ ├── std_readerpimage.m
│ ├── std_readersp.m
│ ├── std_readfile.m
│ ├── std_readfilelimo.m
│ ├── std_readitc.m
│ ├── std_readpac.m
│ ├── std_readspec.m
│ ├── std_readspecgram.m
│ ├── std_readtopo.m
│ ├── std_readtopoclust.m
│ ├── std_rebuilddesign.m
│ ├── std_rejectoutliers.m
│ ├── std_renameclust.m
│ ├── std_renamestudyfiles.m
│ ├── std_reset.m
│ ├── std_rmalldatafields.m
│ ├── std_rmdat.m
│ ├── std_savedat.m
│ ├── std_saveindvar.m
│ ├── std_selcomp.m
│ ├── std_selectdataset.m
│ ├── std_selectdesign.m
│ ├── std_selsubject.m
│ ├── std_serialize.m
│ ├── std_spec.m
│ ├── std_specgram.m
│ ├── std_specplot.m
│ ├── std_stat.m
│ ├── std_substudy.m
│ ├── std_topo.m
│ ├── std_topoplot.m
│ ├── std_uniformfiles.m
│ ├── std_uniformsetinds.m
│ └── toporeplot.m
├── supportfiles
│ ├── EEGBIDS
│ ├── EEGBIDS.bat
│ ├── EEGLAB_compile_splash.jpg
│ ├── EEGLAB_verbose
│ ├── EEGLAB_verbose.bat
│ ├── Standard-10-20-Cap81.ced
│ ├── Standard-10-5-Cap385.sfp
│ ├── Standard-10-5-Cap385_witheog.elp
│ ├── chan_file
│ ├── channel_location_files
│ │ ├── besa_egi
│ │ │ ├── 1ST_README.txt
│ │ │ ├── 32ch_quikcap.sfp
│ │ │ ├── EGI129.elp
│ │ │ ├── EGI65.elp
│ │ │ ├── GSN129.sfp
│ │ │ ├── bti148.elp
│ │ │ └── msep.elp
│ │ ├── eeglab
│ │ │ ├── 1ST_README.txt
│ │ │ ├── EGI-sensorplacement2.xyz
│ │ │ ├── Standard-10-10-Cap33.ced
│ │ │ ├── Standard-10-10-Cap47.ced
│ │ │ ├── Standard-10-20-Cap19.ced
│ │ │ ├── Standard-10-20-Cap25.ced
│ │ │ ├── Standard-10-20-Cap81.ced
│ │ │ ├── chan14_layout.locs
│ │ │ ├── chan31_layout.loc
│ │ │ ├── chan32_layout.locs
│ │ │ ├── chan61fms11_layout.loc
│ │ │ ├── dummy_electrocap71_layout.locs
│ │ │ ├── dummy_quikcap32_layout.locs
│ │ │ └── easycap_montage11_layout.loc
│ │ ├── neuroscan
│ │ │ ├── 1ST_README.txt
│ │ │ ├── Arno.ast
│ │ │ ├── NuAmps 40.3DD
│ │ │ ├── NuAmps40.DAT
│ │ │ ├── cap128.asc
│ │ │ ├── cap128.dat
│ │ │ ├── cap128.map
│ │ │ ├── cap2_64.map
│ │ │ ├── cap64.map
│ │ │ ├── quik128.DAT
│ │ │ └── xyz129.dat
│ │ ├── others
│ │ │ └── galvaniNSL.DAT
│ │ ├── philips_neuro
│ │ │ ├── 0_2AverageNet128_v1.sfp
│ │ │ ├── 0_2AverageNet32_v1.sfp
│ │ │ ├── 0_2AverageNet64_v1.sfp
│ │ │ ├── 2_9AverageNet128_v1.sfp
│ │ │ ├── 2_9AverageNet32_v1.sfp
│ │ │ ├── 2_9AverageNet64_v1.sfp
│ │ │ ├── 9_18AverageNet128_v1.sfp
│ │ │ ├── 9_18AverageNet256_v1.sfp
│ │ │ ├── 9_18AverageNet32_v1.sfp
│ │ │ ├── 9_18AverageNet64_v1.sfp
│ │ │ ├── AdultAverageNet128_v1.sfp
│ │ │ ├── AdultAverageNet256_v1.sfp
│ │ │ ├── AdultAverageNet32_v1.sfp
│ │ │ ├── AdultAverageNet64_v1.sfp
│ │ │ ├── GSN-HydroCel-128.sfp
│ │ │ ├── GSN-HydroCel-129.sfp
│ │ │ ├── GSN-HydroCel-256.sfp
│ │ │ ├── GSN-HydroCel-257.sfp
│ │ │ ├── GSN-HydroCel-32.sfp
│ │ │ ├── GSN-HydroCel-64_1.0.sfp
│ │ │ ├── GSN-HydroCel-65_1.0.sfp
│ │ │ ├── GSN128.sfp
│ │ │ ├── GSN129.sfp
│ │ │ ├── GSN256.sfp
│ │ │ ├── GSN257.sfp
│ │ │ ├── GSN64v2_0.sfp
│ │ │ ├── GSN65v2_0.sfp
│ │ │ ├── egi128_GSN.sfp
│ │ │ ├── egi128_GSN_HydroCel.sfp
│ │ │ ├── egi256_GSN.sfp
│ │ │ ├── egi256_GSN_HydroCel.sfp
│ │ │ ├── egi64_GSN_HydroCel_v1_0.sfp
│ │ │ ├── egi64_GSN_v1_0.sfp
│ │ │ └── egi64_GSN_v2_0.sfp
│ │ └── polhemus
│ │ │ ├── 1ST_README.txt
│ │ │ ├── eetrak124.elc
│ │ │ └── electrocap72.elp
│ ├── colin27headmesh.mat
│ ├── colin27headmesh.xyz
│ ├── colin27headmesh_license.txt
│ ├── eeglab1020.ced
│ ├── head_modelColin27_5003_Standard-10-5-Cap339.mat
│ ├── ica_linux
│ ├── mheadnew.elp
│ ├── mheadnew.mat
│ ├── mheadnew.transform
│ ├── mheadnew.xyz
│ └── test_compiled_version.m
└── timefreqfunc
│ ├── angtimewarp.m
│ ├── bootstat.m
│ ├── correct_mc.m
│ ├── correctfit.m
│ ├── crossf.m
│ ├── dftfilt.m
│ ├── dftfilt2.m
│ ├── dftfilt3.m
│ ├── newcrossf.m
│ ├── newtimef.m
│ ├── newtimefbaseln.m
│ ├── newtimefitc.m
│ ├── newtimefpowerunit.m
│ ├── newtimeftrialbaseln.m
│ ├── pac.m
│ ├── pac_cont.m
│ ├── rsadjust.m
│ ├── rsfit.m
│ ├── rsget.m
│ ├── rspdfsolv.m
│ ├── rspfunc.m
│ ├── timef.m
│ ├── timefreq.m
│ └── timewarp.m
├── sample_data
├── 1ST_README.txt
├── eeglab_chan32.locs
├── eeglab_data.fdt
├── eeglab_data.set
├── eeglab_data_epochs_ica.fdt
├── eeglab_data_epochs_ica.set
├── pnas.adt
├── pnas.flt
├── pnas_chan.locs
├── pnas_chan14.locs
├── scanned72.dat
├── test_data
│ ├── BIDS_test
│ │ ├── CHANGES
│ │ ├── README
│ │ ├── dataset_description.json
│ │ ├── participants.json
│ │ ├── participants.tsv
│ │ └── sub-S1
│ │ │ └── ses-01
│ │ │ └── eeg
│ │ │ ├── sub-S1_ses-01_task-Experiment_run-01_channels.tsv
│ │ │ ├── sub-S1_ses-01_task-Experiment_run-01_eeg.edf
│ │ │ └── sub-S1_ses-01_task-Experiment_run-01_eeg.json
│ ├── eeglab_data_numerical_events.fdt
│ ├── eeglab_data_numerical_events.set
│ ├── test.bdf
│ ├── test.cnt
│ ├── test.edf
│ ├── test.xdf
│ ├── testant.avr
│ ├── testbva.dat
│ ├── testbva.vhdr
│ ├── testbva.vmrk
│ ├── testmff.mff
│ │ ├── Contents
│ │ │ ├── Info.plist
│ │ │ └── PkgInfo
│ │ ├── Events_exported_from_EEGLAB_1.xml
│ │ ├── Events_exported_from_EEGLAB_2.xml
│ │ ├── categories.xml
│ │ ├── epochs.xml
│ │ ├── info.xml
│ │ ├── info1.xml
│ │ ├── sensorLayout.xml
│ │ └── signal1.bin
│ └── testmusemonitor.csv
└── tutorial_eventtable.txt
└── sample_locs
├── 1ST_README.txt
├── GSN-HydroCel-257.sfp
├── GSN-HydroCel-32.sfp
├── GSN128.sfp
├── GSN129.sfp
├── GSN256.sfp
├── GSN257.sfp
├── GSN64v2_0.sfp
├── GSN65v2_0.sfp
├── Standard-10-10-Cap33.ced
├── Standard-10-10-Cap33.locs
├── Standard-10-10-Cap47.ced
├── Standard-10-10-Cap47.locs
├── Standard-10-20-Cap19.ced
├── Standard-10-20-Cap19.locs
├── Standard-10-20-Cap25.ced
├── Standard-10-20-Cap25.locs
├── Standard-10-20-Cap81.ced
└── Standard-10-20-Cap81.locs
/.codespellrc:
--------------------------------------------------------------------------------
1 | [codespell]
2 | ignore-words-list = alls,aussian,childs,datas,dum,ede,espacing,fastr,fo,hist,htmp,leaded,linke,mapp,nd,nwe,ois,ot,otu,pres,ro,ser,strng,sxl,whos
3 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve EEGLAB
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ### Description
11 |
12 | [*Description of the bug or feature
13 | Attach a link to Dropbox or Google Drive with screenshots and your data if possible.*]
14 |
15 |
16 | #### Steps to Reproduce
17 |
18 | 1. [*First Step*]
19 | 2. [*Second Step*]
20 | 3. [*and so on...*]
21 |
22 |
23 |
24 | #### Expected behavior:
25 | [*What you expected to happen*]
26 |
27 |
28 |
29 | #### Actual behavior:
30 | [*What actually happened*]
31 |
32 |
33 |
34 | #### Versions
35 |
36 | | | |
37 | |----| ---- |
38 | | OS version | [*fill in*] |
39 | | Matlab version | [*fill in*] |
40 | | EEGLAB version | [*fill in*] |
41 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # ignore everything in plugin folders, but keep track of plugin submodules
2 | derivative
3 | *.asv
4 | /plugins/**
5 | !/plugins/clean_rawdata
6 | !/plugins/dipfit
7 | !/plugins/firfilt
8 | !/plugins/ICLabel
9 | .DS_Store
10 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "plugins/dipfit"]
2 | path = plugins/dipfit
3 | url = https://github.com/sccn/dipfit.git
4 | [submodule "plugins/clean_rawdata"]
5 | path = plugins/clean_rawdata
6 | url = https://github.com/sccn/clean_rawdata.git
7 | [submodule "plugins/ICLabel"]
8 | path = plugins/ICLabel
9 | url = https://github.com/sccn/ICLabel
10 | [submodule "tutorial_scripts"]
11 | path = tutorial_scripts
12 | url = https://github.com/sccn/eeglab_tutorial_scripts.git
13 | [submodule "plugins/firfilt"]
14 | path = plugins/firfilt
15 | url = https://github.com/sccn/firfilt
16 | [submodule "plugins/EEG-BIDS"]
17 | path = plugins/EEG-BIDS
18 | url = https://github.com/sccn/EEG-BIDS.git
19 |
--------------------------------------------------------------------------------
/Contents.m:
--------------------------------------------------------------------------------
1 | % EEGLAB Toolbox to process EEG data
2 | % Version - see eeg_getversion()
3 | %
4 | % eeglab() - Matlab graphic user interface environment for
5 | % electrophysiological data analysis incorporating the ICA/EEG toolbox
6 | % (Makeig et al.) developed at CNL / The Salk Institute, 1997-2001.
7 | % Released 11/2002- as EEGLAB (Delorme, Makeig, et al.) at the Swartz Center
8 | % for Computational Neuroscience, Institute for Neural Computation,
9 | % University of California San Diego (http://sccn.ucsd.edu/).
10 | % User feedback welcome: email eeglab@sccn.ucsd.edu
11 | %
12 | % Authors: Arnaud Delorme, Scott Makeig, with substantial contributions
13 | % from Colin Humphries, Sigurd Enghoff, Tzyy-Ping Jung, plus contributions
14 | % from Tony Bell, Te-Won Lee, Luca Finelli and other contributors.
15 | %
16 | % Description:
17 | % EEGLAB is Matlab software for processing continuous or event-related
18 | % EEG or other physiological data. It is designed for use by both novice and
19 | % expert Matlab users. In normal use, the EEGLAB graphic interface calls
20 | % graphic functions via pop-up function windows. The EEGLAB history mechanism
21 | % can save the resulting Matlab calls to disk for later incorporation into
22 | % Matlab scripts. A single data structure ('EEG') containing all dataset
23 | % parameters may be accessed and modified directly from the Matlab commandline.
24 | % EEGLAB now recognizes "plugins," sets of EEGLAB functions linked to the EEGLAB
25 | % main menu through an "eegplugin_[name].m" function (Ex. >> help eegplugin_besa.m).
26 | %
27 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | This is the license for the core for the eeglab.m function and
2 | the source code in the "functions" folder. EEGLAB plugins (in the
3 | "plugins" folder) may be released under different licenses.
4 |
5 | BSD 2-Clause License
6 |
7 | Copyright (c) 2024, Swartz Center for Computational Neuroscience
8 |
9 | Redistribution and use in source and binary forms, with or without
10 | modification, are permitted provided that the following conditions are met:
11 |
12 | 1. Redistributions of source code must retain the above copyright notice,
13 | this list of conditions and the following disclaimer.
14 |
15 | 2. Redistributions in binary form must reproduce the above copyright notice,
16 | this list of conditions and the following disclaimer in the documentation
17 | and/or other materials provided with the distribution.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 | THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/functions/@eegobj/display.m:
--------------------------------------------------------------------------------
1 | function display(this);
2 |
3 | disp(inputname(1));
4 | if length(this) == 1
5 | struct(this.EEG)
6 | else
7 | TMP = struct(this);
8 |
9 | TMP2 = TMP(1).EEG;
10 | fieldorder = fieldnames(TMP2);
11 | for index = 2:length(TMP)
12 | TMP2(index) = orderfields(TMP(index).EEG, fieldorder);
13 | end
14 | TMP2
15 | end
16 |
17 |
--------------------------------------------------------------------------------
/functions/@eegobj/eegobj.m:
--------------------------------------------------------------------------------
1 | function this = eegobj(EEG);
2 |
3 | if nargin == 1
4 | if isa(EEG, 'eegobj')
5 | this = EEG;
6 | return;
7 | end
8 | for index = 1:length(EEG)
9 | TMP(index).EEG = EEG(index);
10 | end
11 | else
12 | TMP.EEG = eeg_emptyset;
13 | end
14 | this = class(TMP, 'eegobj');
15 |
--------------------------------------------------------------------------------
/functions/@eegobj/fieldnames.m:
--------------------------------------------------------------------------------
1 | function res = fieldnames(this);
2 |
3 | res = fieldnames(this(1).EEG);
4 |
--------------------------------------------------------------------------------
/functions/@eegobj/horzcat2.m:
--------------------------------------------------------------------------------
1 | function this = horzcat(varargin);
2 | this = varargin{1};
3 | for index = 2:length(varargin)
4 | this.EEG(index) = varargin{index}.EEG;
5 | end
6 |
--------------------------------------------------------------------------------
/functions/@eegobj/isfield.m:
--------------------------------------------------------------------------------
1 | function res = isfield(this, vals);
2 |
3 | res = isfield(struct(this(1).EEG), vals);
4 |
--------------------------------------------------------------------------------
/functions/@eegobj/isstruct.m:
--------------------------------------------------------------------------------
1 | function res = isstruct(this);
2 |
3 | res = 1;
4 |
--------------------------------------------------------------------------------
/functions/@eegobj/length.m:
--------------------------------------------------------------------------------
1 | function res = length(this);
2 |
3 | tmp = struct(this);
4 | %if any(cellfun(@length, { tmp.EEG }) > 1)
5 | % error('EEG structure in object with more than 1 element')
6 | %end
7 | try
8 | res = length(tmp.EEG);
9 | catch
10 | res = length(tmp);
11 | return;
12 | end
13 | if res > 1, error('EEG structure in object with more than 1 element'); end
14 | res = length(tmp);
15 |
--------------------------------------------------------------------------------
/functions/@eegobj/orderfields.m:
--------------------------------------------------------------------------------
1 | function this = orderfields(this, vals);
2 |
3 | for index = 1:length(this)
4 | this(index).EEG = orderfields(this(index).EEG, vals);
5 | end
6 |
--------------------------------------------------------------------------------
/functions/@eegobj/rmfield.m:
--------------------------------------------------------------------------------
1 | function this = rmfield(this, vals);
2 |
3 | this.EEG = rmfield(this.EEG, vals);
4 |
5 |
--------------------------------------------------------------------------------
/functions/@eegobj/simpletest.m:
--------------------------------------------------------------------------------
1 | % simple dataset tests
2 | p = fileparts(which('eeglab'));
3 | EEG = pop_loadset('filename','eeglab_data_epochs_ica.set','filepath',fullfile(p, 'sample_data'));
4 |
5 |
--------------------------------------------------------------------------------
/functions/@eegobj/subsref.m:
--------------------------------------------------------------------------------
1 | % support function for eegobj
2 |
3 | function varargout = subsref(this,s)
4 |
5 | if strcmpi(s(1).type, '()') && length(this) > 1
6 | %if length(s(1).subs{1})
7 | % error('Unsuported object feature - a.field or a([x y]).field is not supported for object arrays');
8 | %end
9 |
10 | % if length(s) == 1
11 | % b = this(s(1).subs{1});
12 | % else
13 | % b = builtin('subsref', this(s(1).subs{1}).EEG, s(2:end));
14 | % end
15 |
16 | if length(s) == 1
17 | varargout{1} = this(s(1).subs{1});
18 | elseif length(s(1).subs{1}) > 1
19 | for index = 1:length(s(1).subs{1})
20 | varargout{1}{index} = builtin('subsref', this(s(1).subs{1}(index)).EEG, s(2:end));
21 | end
22 | else
23 | varargout{1} = builtin('subsref', this(s(1).subs{1}).EEG, s(2:end));
24 | end
25 | elseif strcmpi(s(1).type, '.') && length(this) > 1
26 | for index = 1:length(this)
27 | varargout{index} = builtin('subsref', this(index).EEG, s);
28 | end
29 | %if length(s) > 1 && iscell(s(2).subs) && length(s(2).subs{1})
30 | % error('Unsuported object feature - a.field or a([x y]).field is not supported for object arrays');
31 | %end
32 | else
33 | varargout{1} = builtin('subsref', this.EEG, s);
34 | end
35 |
36 |
37 | % return;
38 | %
39 | % % SUBSREF
40 | % switch s.type
41 | % case '()'
42 | % b = getfield(a.rawbit, s.subs);
43 | % case '.'
44 | % b = getfield(struct(a), s.subs);
45 | % otherwise
46 | % error('Wrong class argument')
47 | % end
48 |
--------------------------------------------------------------------------------
/functions/@memmapdata/display.m:
--------------------------------------------------------------------------------
1 | % DISPLAY - display an EEG data class underlying structure
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function b = display(a)
33 |
34 | i.type = '()';
35 | i.subs = { ':' ':' ':' };
36 | b = subsref(a, i); % note that subsref cannot be called directly
37 | return;
38 |
39 |
40 | %struct(a)
41 | %return;
42 |
43 | if ~strcmpi(a.fileformat, 'transposed')
44 | a.data.data.x;
45 | else
46 | permute(a, [3 1 2]);
47 | end
48 |
--------------------------------------------------------------------------------
/functions/@memmapdata/double.m:
--------------------------------------------------------------------------------
1 | function res = double(a);
2 |
3 | res = double(a.data.data.x);
4 |
--------------------------------------------------------------------------------
/functions/@memmapdata/end.m:
--------------------------------------------------------------------------------
1 | % END - last index to memmapdata array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function s = end(a, k, n);
33 |
34 | s = size(a, k);
35 |
--------------------------------------------------------------------------------
/functions/@memmapdata/isnumeric.m:
--------------------------------------------------------------------------------
1 | % ISNUMERIC - returns 1
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function r = isnumeric(a)
33 |
34 | r = 1;
35 |
--------------------------------------------------------------------------------
/functions/@memmapdata/length.m:
--------------------------------------------------------------------------------
1 | % LENGTH - length of memory mapped underlying array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function s = length(a)
33 |
34 | s = size(a,1);
35 |
--------------------------------------------------------------------------------
/functions/@memmapdata/ndims.m:
--------------------------------------------------------------------------------
1 | % NDIMS - number of dimension of memory mapped underlying array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function s = ndims(a)
33 |
34 | if ~strcmpi(a.fileformat, 'transposed')
35 | if a.data.Format{2}(3) == 1, s = 2;
36 | else s = 3;
37 | end
38 | else
39 | if a.data.Format{2}(2) == 1, s = 2;
40 | else s = 3;
41 | end
42 | end
43 |
--------------------------------------------------------------------------------
/functions/@memmapdata/reshape.m:
--------------------------------------------------------------------------------
1 | % RESHAPE - reshape of memory mapped underlying array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function a = reshape(a,d1,d2,d3)
33 |
34 | % decode length
35 | % -------------
36 | if nargin > 3
37 | d1 = [ d1 d2 d3 ];
38 | elseif nargin > 2
39 | d1 = [ d1 d2 ];
40 | end
41 |
42 | if prod(size(a)) ~= prod(d1)
43 | error('Wrong dimensions for reshaping');
44 | end
45 |
46 | if ~strcmpi(a.fileformat, 'transposed')
47 | a.data.format{2} = d1;
48 | else
49 | if length(d1) == 1
50 | a.data.format{2} = d1;
51 | elseif length(d1) == 2
52 | a.data.format{2} = [d1(2) d1(1)];
53 | else
54 | a.data.format{2} = d1([2 3 1]);
55 | end
56 | end
57 |
--------------------------------------------------------------------------------
/functions/@memmapdata/size.m:
--------------------------------------------------------------------------------
1 | % SIZE - size of memory mapped underlying array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function [s s2 s3] = size(a,dim)
33 |
34 | if isnumeric(a.data),
35 | s = size(a.data)
36 | else
37 | s = a.data.format{2};
38 | if strcmpi(a.fileformat, 'transposed')
39 | if length(s) == 2, s = s([2 1]);
40 | elseif length(s) == 3
41 | s = [s(3) s(1) s(2)];
42 | end
43 | end
44 | end
45 |
46 | if nargin > 1
47 | s = [s 1];
48 | s = s(dim);
49 | end
50 |
51 | if nargout > 2
52 | s3 = s(3);
53 | end
54 | if nargout > 1
55 | s2 = s(2);
56 | s = s(1);
57 | end
58 |
--------------------------------------------------------------------------------
/functions/@mmo/binaryopp.m:
--------------------------------------------------------------------------------
1 | function obj3 = binaryopp(f, obj1, obj2)
2 |
3 | if isa(obj2, 'mmo'), tmpobj = obj2; obj2 = obj1; obj1 = tmpobj; clear tmpobj; end
4 | if ~isequal(size(obj1), size(obj2)) && prod(size(obj2)) ~= 1
5 | error('Matrix dimensions must agree.');
6 | end
7 | data1 = memmapfile(obj1.dataFile, 'writable', obj1.writable, 'format', { 'single' obj1.dimensions 'x' });
8 | if isa(obj2, 'mmo'),
9 | data2 = memmapfile(obj2.dataFile, 'writable', obj2.writable, 'format', { 'single' obj2.dimensions 'x' });
10 | else data2 = obj2;
11 | end
12 |
13 | % make new memory mapped data file (blank)
14 | % --------------------------------
15 | newFileName = mmo.getnewfilename;
16 | fid = fopen(newFileName, 'w');
17 | s1 = size(obj1);
18 | ss.type = '()';
19 | ss.subs(1:length(s1)-1) = { ':' };
20 | for index = 1:s1(end)
21 | ss.subs{length(s1)} = index;
22 | if prod(size(data2)) == 1
23 | tmpdata = f(subsref(data1.Data.x, ss), data2);
24 | else tmpdata = f(subsref(data1.Data.x, ss), subsref(data2.Data.x, ss));
25 | end
26 | fwrite(fid, tmpdata, 'float');
27 | end
28 | fclose(fid);
29 |
30 | % create object
31 | % -------------
32 | obj3 = mmo(newFileName, s1, true, obj1.transposed);
33 | obj3 = updateWorkspace(obj3);
34 |
--------------------------------------------------------------------------------
/functions/@mmo/bsxfun.m:
--------------------------------------------------------------------------------
1 | function obj3 = bsxfun(f, obj1, obj2)
2 |
3 | if isa(obj2, 'mmo'), error('bsxfun does not work yet with the second argument being a memory mapped object'); end
4 | data1 = memmapfile(obj1.dataFile, 'writable', obj1.writable, 'format', { 'single' obj1.dimensions 'x' });
5 | data2 = obj2;
6 |
7 | % make new memory mapped data file (blank)
8 | % --------------------------------
9 | newFileName = mmo.getnewfilename;
10 | fid = fopen(newFileName, 'w');
11 | s1 = size(obj1);
12 | s2 = size(obj2);
13 | ss.type = '()';
14 | ss.subs(1:length(s1)-1) = { ':' };
15 | if length(s1) == length(s2) && s1(end) == s2(end)
16 | error('bsxfun does not work on the last dimension');
17 | end
18 | for index = 1:s1(end) % scan last dimension
19 | ss.subs{length(s1)} = index;
20 | tmpdata = bsxfun(f,subsref(data1.Data.x, ss), data2);
21 | fwrite(fid, tmpdata, 'float');
22 | end
23 | fclose(fid);
24 |
25 | % create object
26 | % -------------
27 | obj3 = mmo(newFileName, s1, true, obj1.transposed);
28 | obj3 = updateWorkspace(obj3);
29 |
--------------------------------------------------------------------------------
/functions/@mmo/changefile.m:
--------------------------------------------------------------------------------
1 | % this function is called when the file is being saved
2 |
3 | function obj = changefile(obj, newfile)
4 |
5 | movefile(obj.dataFile, newfile);
6 | obj.dataFile = newfile;
7 | obj.writable = false;
8 |
--------------------------------------------------------------------------------
/functions/@mmo/checkcopies_local.m:
--------------------------------------------------------------------------------
1 | % subfunction checking the number of local copies
2 | % -----------------------------------------------
3 | function ncopies = checkcopies_local(obj, arg);
4 | ncopies = 0;
5 | if isstruct(arg)
6 | for ilen = 1:length(arg)
7 | for index = fieldnames(arg)'
8 | ncopies = ncopies + checkcopies_local(obj, arg(ilen).(index{1}));
9 | if ncopies > 1, return; end
10 | end
11 | end
12 | elseif iscell(arg)
13 | for index = 1:length(arg(:))
14 | ncopies = ncopies + checkcopies_local(obj, arg{index});
15 | if ncopies > 1, return; end
16 | end
17 | elseif isa(arg, 'mmo') && isequal(obj, arg)
18 | ncopies = 1;
19 | else
20 | ncopies = 0;
21 | end
22 |
--------------------------------------------------------------------------------
/functions/@mmo/ctranspose.m:
--------------------------------------------------------------------------------
1 | function res = ctranspose(obj,useconj);
2 | if nargin == 1
3 | useconj = 1;
4 | end
5 |
6 | if length(obj.dimensions) > 2
7 | error('Cannot transpose array');
8 | end
9 |
10 | % make new memory mapped data file
11 | % --------------------------------
12 | newFileName = mmo.getnewfilename;
13 | copyfile(obj.dataFile, newFileName);
14 |
15 | res = obj;
16 | res.dimensions = [ obj.dimensions(2) obj.dimensions(1) ];
17 | res.dataFile = newFileName;
18 | tmpMMO1 = memmapfile(obj.dataFile, 'writable', obj.writable, 'format', { 'single' obj.dimensions 'x' });
19 | tmpMMO2 = memmapfile(res.dataFile, 'writable', true, 'format', { 'single' res.dimensions 'x' });
20 |
21 | % copy the data
22 | % -------------
23 | if length(obj.dimensions) == 1 || obj.dimensions(1) > obj.dimensions(2)
24 | for index = 1:size(obj,2)
25 | s.type = '()';
26 | s.subs = { ':' index };
27 | if useconj, tmpMMO2.Data.x(index,:) = conj(subsref(tmpMMO1.Data.x,s));
28 | else tmpMMO2.Data.x(:,index) = subsref(tmpMMO1.Data.x,s);
29 | end
30 | end
31 | else
32 | for index = 1:size(obj,1)
33 | s.type = '()';
34 | s.subs = { index ':' };
35 | if useconj, tmpMMO2.Data.x(:,index) = conj(subsref(tmpMMO1.Data.x,s));
36 | else tmpMMO2.Data.x(:,index) = subsref(tmpMMO1.Data.x,s);
37 | end
38 | end
39 | end
40 |
41 |
--------------------------------------------------------------------------------
/functions/@mmo/display.m:
--------------------------------------------------------------------------------
1 | % DISPLAY - display an EEG data class underlying structure
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function display(obj);
33 |
34 | tmpMMO = memmapfile(obj.dataFile, 'writable', obj.writable, 'format', { 'single' obj.dimensions 'x' });
35 | if obj.transposed, disp('Warning: data does not display properly for memory mapped file which have been transposed'); end
36 | disp(tmpMMO.data.x);
37 |
38 |
--------------------------------------------------------------------------------
/functions/@mmo/double.m:
--------------------------------------------------------------------------------
1 | function a = double(a);
2 |
3 | return;
4 |
--------------------------------------------------------------------------------
/functions/@mmo/end.m:
--------------------------------------------------------------------------------
1 | % END - last index to memmapdata array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function s = end(a, k, n);
33 |
34 | s = size(a, k);
35 |
--------------------------------------------------------------------------------
/functions/@mmo/fft.m:
--------------------------------------------------------------------------------
1 | function obj2 = fft( obj1, varargin )
2 |
3 | obj2 = unitaryopp(@fft, obj1, varargin{:});
4 |
--------------------------------------------------------------------------------
/functions/@mmo/isnumeric.m:
--------------------------------------------------------------------------------
1 | % ISNUMERIC - returns 1
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function r = isnumeric(a)
33 |
34 | r = 1;
35 |
--------------------------------------------------------------------------------
/functions/@mmo/length.m:
--------------------------------------------------------------------------------
1 | % LENGTH - length of memory mapped underlying array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function s = length(a)
33 |
34 | s = size(a,1);
35 |
--------------------------------------------------------------------------------
/functions/@mmo/ndims.m:
--------------------------------------------------------------------------------
1 | % NDIMS - number of dimension of memory mapped underlying array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function res = ndims(obj)
33 |
34 | if length(obj.dimensions) <= 2 || all(obj.dimensions(3:end) == 1), res = 2;
35 | else res = length(obj.dimensions);
36 | end
37 |
--------------------------------------------------------------------------------
/functions/@mmo/reshape.m:
--------------------------------------------------------------------------------
1 | % RESHAPE - reshape of memory mapped underlying array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function obj = reshape(obj,d1,d2,d3)
33 |
34 | % decode length
35 | % -------------
36 | if nargin > 3
37 | d1 = [ d1 d2 d3 ];
38 | elseif nargin > 2
39 | d1 = [ d1 d2 ];
40 | end
41 |
42 | if prod(size(obj)) ~= prod(d1)
43 | error('Wrong dimensions for reshaping');
44 | end
45 |
46 | if obj.transposed
47 | d1 = [d1(2:end) d1(1)];
48 | end
49 |
50 | obj.dimensions = d1;
51 |
--------------------------------------------------------------------------------
/functions/@mmo/sum.m:
--------------------------------------------------------------------------------
1 | % SUM - sum of memory mapped underlying array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function sumval = sum(obj,dim)
33 |
34 | if nargin < 2
35 | dim = 1;
36 | end
37 |
38 | s1 = size(obj);
39 | ss.type = '()';
40 | ss.subs(1:length(s1)) = { ':' };
41 | for index = 1:s1(dim)
42 | ss.subs{dim} = index;
43 | if index == 1
44 | sumval = subsref(obj, ss);
45 | else sumval = sumval + subsref(obj, ss);
46 | end
47 | end
48 |
--------------------------------------------------------------------------------
/functions/@mmo/transpose.m:
--------------------------------------------------------------------------------
1 | function res = transpose(obj);
2 |
3 | res = ctranspose(obj, 0);
4 |
5 |
6 |
--------------------------------------------------------------------------------
/functions/@mmo/unitaryopp.m:
--------------------------------------------------------------------------------
1 | % support function for mmo object
2 |
3 | function obj2 = unitaryopp(f, obj1, varargin);
4 |
5 | % make new memory mapped data file (blank)
6 | % ----------------------------------------
7 | newFileName = mmo.getnewfilename;
8 | data = memmapfile(obj1.dataFile, 'writable', obj1.writable, 'format', { 'single' obj1.dimensions 'x' });
9 | fid = fopen(newFileName, 'w');
10 | if obj1.dimensions(end) == 1, obj1.dimensions(end) = []; end
11 | ss.type = '()';
12 | ss.subs(1:length(obj1.dimensions)-1) = { ':' };
13 | for index = 1:obj1.dimensions(end)
14 | ss.subs{length(obj1.dimensions)} = index;
15 | tmpdata = f(subsref(data.Data.x, ss), varargin{:});
16 | fwrite(fid, tmpdata, 'float');
17 | end
18 | fclose(fid);
19 |
20 | % copy the data
21 | % -------------
22 | obj2 = mmo(newFileName, obj1.dimensions, true, obj1.transposed);
23 | obj2 = updateWorkspace(obj2);
24 |
25 |
--------------------------------------------------------------------------------
/functions/@mmo/var.m:
--------------------------------------------------------------------------------
1 | % VAR - variance of memory mapped underlying array
2 | %
3 | % Author: Arnaud Delorme, SCCN, INC, UCSD, Nov. 2008
4 |
5 | % Copyright (C) 2008 Arnaud Delorme, SCCN, INC, UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function sumval = var(obj,flag,dim)
33 |
34 | if nargin < 2
35 | flag = 0;
36 | end
37 | if nargin < 3
38 | dim = 1;
39 | end
40 |
41 | meanvalsq = mean(obj,dim).^2;
42 |
43 | sumval = 0;
44 | s1 = size(obj);
45 | ss.type = '()';
46 | ss.subs(1:length(s1)) = { ':' };
47 | for index = 1:s1(dim)
48 | ss.subs{dim} = index;
49 | tmpdata = subsref(obj, ss);
50 | sumval = sumval + tmpdata.*tmpdata - meanvalsq;
51 | end
52 | if isempty(flag) || flag == 0
53 | sumval = sumval/(size(obj,dim)-1);
54 | else sumval = sumval/size(obj,dim);
55 | end
56 |
--------------------------------------------------------------------------------
/functions/adminfunc/abouteeglab.m:
--------------------------------------------------------------------------------
1 | % script for compiled EEGLAB version about button
2 |
3 | tmptmptext = strvcat(' EEGLAB (compiled version)', ...
4 | ' ', ...
5 | ' ', ...
6 | 'The EEGLAB electrophysiological data analysis software is an open source research', ...
7 | 'project developed at the Swartz Center for Computational Neuroscience, Institute', ...
8 | 'for Neural Computation at the University of California San Diego in collaboration', ...
9 | 'with The Salk Institute (La Jolla) and the CERCO laboratory (Toulouse) where part', ...
10 | 'of the core code was developed.', ...
11 | ' ', ...
12 | 'EEGLAB incorporates several third party suites of functions, Fieldtrip for source ', ...
13 | 'localization, and BIOSIG for binary file import. A list of plugins is also included', ...
14 | 'in this compiled release. See https://sccn.ucsd.edu/eeglab/plugin_uploader/plugin_list_all.php', ...
15 | 'for more information.', ...
16 | ' ', ...
17 | 'The EEGLAB software, its source code, and the source code of all additional third', ...
18 | 'party functions it includes is protected by the BSD open source license.', ...
19 | ' ');
20 |
21 | warndlg2(tmptmptext);
22 | clear tmptmptext;
23 |
--------------------------------------------------------------------------------
/functions/adminfunc/biosigpathfirst.m:
--------------------------------------------------------------------------------
1 | function biosigpathfirst()
2 | % Add BIOSIG at the beginning of the path
3 |
4 | str2doublepath = fileparts( which('str2double') );
5 | sopenpath = fileparts( which('sopen') );
6 | if ~strcmp(str2doublepath,sopenpath)
7 | addpath(sopenpath,'-begin');
8 | end
9 |
10 |
11 |
--------------------------------------------------------------------------------
/functions/adminfunc/biosigpathlast.m:
--------------------------------------------------------------------------------
1 | function biosigpathlast()
2 | % Add BIOSIG at the end of the path to avoid overloading Matlab functions
3 |
4 | str2doublepath = fileparts( which('str2double') );
5 | str2numpath = fileparts( which('str2num') );
6 | if ~strcmp(str2doublepath,str2numpath)
7 | addpath(str2numpath,'-begin');
8 | end
9 |
10 |
--------------------------------------------------------------------------------
/functions/adminfunc/eeg_helpgui.m:
--------------------------------------------------------------------------------
1 | %Graphic interface builder functions (guifunc folder):
2 | % errordlg2 - Makes a popup dialog box with the specified message and (optional)...
3 | % finputcheck - Check Matlab function {'key','value'} input argument pairs...
4 | % inputdlg2 - Inputdlg function clone with coloring and help for...
5 | % inputgui - A comprehensive gui automatic builder. This function helps...
6 | % listdlg2 - Listdlg function clone with coloring and help for...
7 | % pophelp - Same as matlab HTHELP but does not crash under windows.
8 | % questdlg2 - Questdlg function clone with coloring and help for...
9 | % supergui - A comprehensive gui automatic builder. This function help...
10 | % warndlg2 - Same as warndlg for EEGLAB...
11 |
--------------------------------------------------------------------------------
/functions/adminfunc/eeg_helpstatistics.m:
--------------------------------------------------------------------------------
1 | %EEGLAB statistics functions (statistics folder):
2 | % anova1_cell - Compute F-values in cell array using ANOVA.
3 | % anova1rm_cell - Compute F-values in cell array using repeated measure...
4 | % anova2_cell - Compute F-values in cell array using ANOVA.
5 | % anova2rm_cell - Compute F-values in cell array using repeated measure...
6 | % concatdata - Concatenate data stored into a cell array into a single...
7 | % corrcoef_cell - Compute pairwise correlations using arrays and...
8 | % fdr - Compute false detection rate mask...
9 | % stat_surrogate_ci - Vals under the null hypothesis that observed samples...
10 | % stat_surrogate_pvals - Vals under the null hypothesis that observed samples...
11 | % statcond - Compare two or more data conditions statistically using...
12 | % statcondfieldtrip - Same as statcond except that it uses the fieldtrip...
13 | % surrogdistrib - Build surrogate distribution...
14 | % teststat - EEGLAB statistical testing function...
15 | % ttest2_cell - Compute unpaired t-test. Allow fast computation of...
16 | % ttest_cell - Compute paired t-test. Allow fast computation of...
17 |
--------------------------------------------------------------------------------
/functions/adminfunc/eeg_hist.m:
--------------------------------------------------------------------------------
1 | % EEG_HIST - history for EEGLAB dataset.
2 | %
3 | % Usage:
4 | % >> EEGOUT = eeg_hist( EEGIN, command );
5 | %
6 | % Inputs:
7 | % EEGIN - input dataset
8 | % command - [string] eeglab command
9 | %
10 | % Author: Arnaud Delorme, SCCN/INC/UCSD, Dec 2003
11 | %
12 | % See also: EEGH, EEGLAB
13 |
14 | % Copyright (C) 2003 Arnaud Delorme, SCCN/INC/UCSD, arno@salk.edu
15 | %
16 | % This file is part of EEGLAB, see http://www.eeglab.org
17 | % for the documentation and details.
18 | %
19 | % Redistribution and use in source and binary forms, with or without
20 | % modification, are permitted provided that the following conditions are met:
21 | %
22 | % 1. Redistributions of source code must retain the above copyright notice,
23 | % this list of conditions and the following disclaimer.
24 | %
25 | % 2. Redistributions in binary form must reproduce the above copyright notice,
26 | % this list of conditions and the following disclaimer in the documentation
27 | % and/or other materials provided with the distribution.
28 | %
29 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
33 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
39 | % THE POSSIBILITY OF SUCH DAMAGE.
40 |
41 | function EEG = eeg_hist( EEG, command )
42 |
43 | if nargin < 2
44 | help eeg_hist;
45 | end
46 |
47 | if ~isfield(EEG, 'history')
48 | EEG.history = '';
49 | end
50 |
51 | if ~isempty(command) && isempty(strfind(command, 'pop_loadset'))
52 | try
53 | EEG.history = [ EEG.history 10 command ];
54 | catch
55 | EEG.history = strvcat(EEG.history, command);
56 | end
57 | end
58 |
--------------------------------------------------------------------------------
/functions/adminfunc/eeg_options.m:
--------------------------------------------------------------------------------
1 | % EEG_OPTIONS - eeglab option script
2 | %
3 | % Note: DO NOT EDIT, instead use POP_EDITOPTIONS or the menu
4 | % /File/Maximize memory in EEGLAB gui
5 |
6 | % STUDY options (set these checkboxes if you intend to work with studies)
7 | option_storedisk = 0 ; % If set, keep at most one dataset in memory. This allows processing hundreds of datasets within studies.
8 | option_savetwofiles = 1 ; % If set, save not one but two files for each dataset (header and data). This allows faster data loading in studies.
9 | % Memory options
10 | option_single = 1 ; % If set, use single precision under Matlab 7.x. This saves RAM but can lead to rare numerical imprecisions.
11 | option_memmapdata = 0 ; % If set, use memory mapped array under Matlab 7.x. This may slow down some computation.
12 | % ICA options
13 | option_computeica = 0 ; % If set, precompute ICA activations. This requires more RAM but allows faster plotting of component activations.
14 | option_scaleicarms = 1 ; % If set, scale ICA component activities to RMS (Root Mean Square) in microvolt (recommended).
15 | % Folder options
16 | option_rememberfolder = 1 ; % If set, when browsing to open a new dataset assume the folder/directory of previous dataset.
17 |
--------------------------------------------------------------------------------
/functions/adminfunc/eeg_options.txt:
--------------------------------------------------------------------------------
1 | % eeg_options.txt - eeglab option script for the EEGLAB compiled version
2 | %
3 | % Note: DO NOT EDIT, instead use pop_editoptions() or the menu
4 | % /File/Maximize memory in EEGLAB gui
5 |
6 | % STUDY options (set these checkboxes if you intend to work with studies)
7 | option_storedisk = 0 ; % If set, keep at most one dataset in memory. This allows processing hundreds of datasets within studies.
8 | option_savetwofiles = 1 ; % If set, save not one but two files for each dataset (header and data). This allows faster data loading in studies.
9 | % Memory options
10 | option_single = 1 ; % If set, use single precision under Matlab 7.x. This saves RAM but can lead to rare numerical imprecisions.
11 | option_memmapdata = 0 ; % If set, use memory mapped array under Matlab 7.x. This may slow down some computation.
12 | % ICA options
13 | option_computeica = 0 ; % If set, precompute ICA activations. This requires more RAM but allows faster plotting of component activations.
14 | option_scaleicarms = 1 ; % If set, scale ICA component activities to RMS (Root Mean Square) in microvolt (recommended).
15 | % Folder options
16 | option_rememberfolder = 1 ; % If set, when browsing to open a new dataset assume the folder/directory of previous dataset.
17 |
--------------------------------------------------------------------------------
/functions/adminfunc/eeg_optionsbackup.txt:
--------------------------------------------------------------------------------
1 | % eeg_optionsbackup - eeglab option script for the EEGLAB compiled version
2 | %
3 | % Note: DO NOT EDIT, instead use pop_editoptions() or the menu
4 | % /File/Maximize memory in EEGLAB gui
5 |
6 | % STUDY and file options (set these checkboxes if you intend to work with studies)
7 | option_storedisk = 0 ; % If set, keep at most one dataset in memory. This allows processing hundreds of datasets within studies.
8 | option_savetwofiles = 1 ; % If set, save not one but two files for each dataset (header and data). This allows faster data loading in studies.
9 | option_saveversion6 = 1 ; % If set, write Matlab files in Matlab v6.5 (max compatibility). If not, write files in Matlab v7.3 (larger than 2Gb).
10 | % Memory options
11 | option_single = 1 ; % If set, use single precision number (32-bit instead of 64-bit) in memory.
12 | option_memmapdata = 0 ; % If set, use memory mapped array under Matlab 7.x. This may slow down some computation (beta).
13 | option_eegobject = 0 ; % If set, use the EEGLAB EEG object instead of the standard EEG structure (beta).
14 | % ICA options
15 | option_computeica = 1 ; % If set, precompute ICA activations. This requires more RAM but allows faster plotting of component activations.
16 | option_scaleicarms = 1 ; % If set, scale ICA component activities to RMS (Root Mean Square) in microvolt (recommended).
17 | % Folder options
18 | option_rememberfolder = 1 ; % If set, when browsing to open a new dataset assume the folder/directory of previous dataset.
19 | % Toolbox options
20 | option_donotusetoolboxes = 0 ; % If set, do not use Matlab additional toolboxes functions even if they are present (need to restart EEGLAB).
21 | % EEGLAB connectivity and support
22 | option_checkversion = 1 ; % If set, check for new version of EEGLAB at startup.
23 | option_chat = 0 ; % If set, enable EEGLAB chat - currently UCSD only - restart EEGLAB after changing that option.
24 | option_cachesize = 100 ; % Size of cache in Mbytes for EEGLAB STUDY cache in RAM.
25 |
--------------------------------------------------------------------------------
/functions/adminfunc/eeglab_warning.m:
--------------------------------------------------------------------------------
1 | % EEGLAB_WARNING - generate warning disabling backtrace
2 | %
3 | % Usage: >> eeglab_warning(msg);
4 | %
5 | % Inputs: msg, a string of character.
6 | %
7 | % Author: Arnaud Delorme, SCCN, INC, UCSD, 2024-
8 | %
9 | % see also: EEGLAB
10 |
11 | % Copyright (C) 2024 Arnaud Delorme, UCSD
12 | %
13 | % This file is part of EEGLAB, see http://www.eeglab.org
14 | % for the documentation and details.
15 | %
16 | % Redistribution and use in source and binary forms, with or without
17 | % modification, are permitted provided that the following conditions are met:
18 | %
19 | % 1. Redistributions of source code must retain the above copyright notice,
20 | % this list of conditions and the following disclaimer.
21 | %
22 | % 2. Redistributions in binary form must reproduce the above copyright notice,
23 | % this list of conditions and the following disclaimer in the documentation
24 | % and/or other materials provided with the distribution.
25 | %
26 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
36 | % THE POSSIBILITY OF SUCH DAMAGE.
37 |
38 | function eeglab_warning(msg)
39 |
40 | if nargin < 1
41 | error('eeglab_warning needs at least one argument');
42 | end
43 |
44 | res = warning('backtrace');
45 | warning('backtrace', 'off');
46 | warning(msg)
47 | warning('backtrace', res.state);
48 |
--------------------------------------------------------------------------------
/functions/adminfunc/error_bc.m:
--------------------------------------------------------------------------------
1 | function res = error_bc()
2 | res = false;
3 |
--------------------------------------------------------------------------------
/functions/adminfunc/is_sccn.m:
--------------------------------------------------------------------------------
1 | function bool = is_sccn()
2 | % IS_SCCN - returns 1 if computer is located at SCCN (Swartz Center
3 | % for computational Neuroscience) and 0 otherwise
4 |
5 | bool = 0;
6 | domnane = ' ';
7 | try
8 | eval([ 'if isunix, [tmp domname] = unix(''hostname'');' ...
9 | 'end;' ...
10 | 'bool = findstr(domname(1:end-1), ''ucsd.edu'');' ...
11 | 'if isempty(bool), bool=0; else bool=1; end;' ], '');
12 | catch
13 | end
14 |
15 |
--------------------------------------------------------------------------------
/functions/adminfunc/iseeglabdeployed.m:
--------------------------------------------------------------------------------
1 | function val = iseeglabdeployed()
2 | % iseeglabdeployed - true for EEGLAB compile version and false otherwise
3 | try
4 | val = isdeployed;
5 | catch
6 | val = 0;
7 | end
8 |
--------------------------------------------------------------------------------
/functions/adminfunc/ismatlab.m:
--------------------------------------------------------------------------------
1 | function res = ismatlab()
2 | % true if called from Matlab; false if called from Octave
3 | res = exist('OCTAVE_VERSION','builtin') == 0;
4 |
--------------------------------------------------------------------------------
/functions/adminfunc/ismember_bc.m:
--------------------------------------------------------------------------------
1 | % ismember_bc - ismember backward compatible with Matlab versions prior to 2013a
2 |
3 | % Copyright (C) 2013 Arnaud Delorme
4 | %
5 | % This file is part of EEGLAB, see http://www.eeglab.org
6 | % for the documentation and details.
7 | %
8 | % Redistribution and use in source and binary forms, with or without
9 | % modification, are permitted provided that the following conditions are met:
10 | %
11 | % 1. Redistributions of source code must retain the above copyright notice,
12 | % this list of conditions and the following disclaimer.
13 | %
14 | % 2. Redistributions in binary form must reproduce the above copyright notice,
15 | % this list of conditions and the following disclaimer in the documentation
16 | % and/or other materials provided with the distribution.
17 | %
18 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 | % THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | function [C,IA] = ismember_bc(A,B,varargin)
31 |
32 | errorFlag = error_bc;
33 |
34 | v = version;
35 | indp = find(v == '.');
36 | v = str2num(v(1:indp(2)-1));
37 | if v > 7.19, v = floor(v) + rem(v,1)/10; end
38 |
39 | if nargin > 2
40 | ind = strmatch('legacy', varargin);
41 | if ~isempty(ind)
42 | varargin(ind) = [];
43 | end
44 | end
45 |
46 | if v >= 7.14
47 | [C,IA] = ismember(A,B,varargin{:},'legacy');
48 | if errorFlag
49 | [C2,IA2] = ismember(A,B,varargin{:});
50 | if (~isequal(C, C2) || ~isequal(IA, IA2))
51 | warning('backward compatibility issue with call to ismember function');
52 | end
53 | end
54 | else
55 | [C,IA] = ismember(A,B,varargin{:});
56 | end
57 |
--------------------------------------------------------------------------------
/functions/adminfunc/plugin_extract.m:
--------------------------------------------------------------------------------
1 | % deprecated function to install plugin - use plugin_menu instead
2 |
3 | % Copyright (C) 2012- Arnaud Delorme
4 | %
5 | % This file is part of EEGLAB, see http://www.eeglab.org
6 | % for the documentation and details.
7 | %
8 | % Redistribution and use in source and binary forms, with or without
9 | % modification, are permitted provided that the following conditions are met:
10 | %
11 | % 1. Redistributions of source code must retain the above copyright notice,
12 | % this list of conditions and the following disclaimer.
13 | %
14 | % 2. Redistributions in binary form must reproduce the above copyright notice,
15 | % this list of conditions and the following disclaimer in the documentation
16 | % and/or other materials provided with the distribution.
17 | %
18 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 | % THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | function restartEeglabFlag = plugin_extract(type, pluginlist, page)
31 |
32 | disp('The function plugin_extract has been deprecated and calls the plugin_menu function instead');
33 | plugin_menu(pluginlist);
34 |
--------------------------------------------------------------------------------
/functions/adminfunc/plugin_remove.m:
--------------------------------------------------------------------------------
1 | % Plugin support function to remove plugin
2 |
3 | % Copyright (C) 2012- Arnaud Delorme
4 | %
5 | % This file is part of EEGLAB, see http://www.eeglab.org
6 | % for the documentation and details.
7 | %
8 | % Redistribution and use in source and binary forms, with or without
9 | % modification, are permitted provided that the following conditions are met:
10 | %
11 | % 1. Redistributions of source code must retain the above copyright notice,
12 | % this list of conditions and the following disclaimer.
13 | %
14 | % 2. Redistributions in binary form must reproduce the above copyright notice,
15 | % this list of conditions and the following disclaimer in the documentation
16 | % and/or other materials provided with the distribution.
17 | %
18 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 | % THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | function plugin_remove(foldername)
31 |
32 | % get plugin path
33 | % ---------------
34 | fullpluginfolder = fullfile(fileparts(which('eeglab.m')), 'plugins', foldername);
35 | if ~exist(fullpluginfolder)
36 | error([ 'Could not find folder ' foldername ' in plugins folder' ]);
37 | end
38 |
39 | disp([ 'Removing plugin folder ' foldername ]);
40 | try
41 | rmpath(fullpluginfolder);
42 | warning off;
43 | rmdir(fullpluginfolder, 's');
44 | warning on;
45 | catch
46 | eeglab_error;
47 | end
48 |
--------------------------------------------------------------------------------
/functions/adminfunc/removepath.m:
--------------------------------------------------------------------------------
1 | % remove all path with a given parent path
2 | % varargin contains a list of path to exclude
3 |
4 | % Copyright (C) 2006 Arnaud Delorme
5 | %
6 | % This file is part of EEGLAB, see http://www.eeglab.org
7 | % for the documentation and details.
8 | %
9 | % Redistribution and use in source and binary forms, with or without
10 | % modification, are permitted provided that the following conditions are met:
11 | %
12 | % 1. Redistributions of source code must retain the above copyright notice,
13 | % this list of conditions and the following disclaimer.
14 | %
15 | % 2. Redistributions in binary form must reproduce the above copyright notice,
16 | % this list of conditions and the following disclaimer in the documentation
17 | % and/or other materials provided with the distribution.
18 | %
19 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29 | % THE POSSIBILITY OF SUCH DAMAGE.
30 |
31 | function removepath(parentpath, varargin)
32 |
33 | if isempty(parentpath), return; end
34 | folder = path;
35 | if ispc, sep = ';'; else sep = ':'; end
36 | indSep = find(folder == sep);
37 |
38 | indSep = [ 0 indSep length(folder)+1 ];
39 | for iSep = 1:length(indSep)-1
40 | curPath = folder(indSep(iSep)+1:indSep(iSep+1)-1);
41 | if ~isempty(strfind(curPath, parentpath)) && ~any(strmatch(curPath, varargin, 'exact'))
42 | rmpath(curPath);
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/functions/adminfunc/search-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/adminfunc/search-icon.png
--------------------------------------------------------------------------------
/functions/adminfunc/setdiff_bc.m:
--------------------------------------------------------------------------------
1 | % setdiff_bc - setdiff backward compatible with Matlab versions prior to 2013a
2 |
3 | % Copyright (C) 2013 Arnaud Delorme
4 | %
5 | % This file is part of EEGLAB, see http://www.eeglab.org
6 | % for the documentation and details.
7 | %
8 | % Redistribution and use in source and binary forms, with or without
9 | % modification, are permitted provided that the following conditions are met:
10 | %
11 | % 1. Redistributions of source code must retain the above copyright notice,
12 | % this list of conditions and the following disclaimer.
13 | %
14 | % 2. Redistributions in binary form must reproduce the above copyright notice,
15 | % this list of conditions and the following disclaimer in the documentation
16 | % and/or other materials provided with the distribution.
17 | %
18 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 | % THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | function [C,IA] = setdiff_bc(A,B,varargin)
31 |
32 | errorFlag = error_bc;
33 |
34 | v = version;
35 | indp = find(v == '.');
36 | v = str2num(v(1:indp(2)-1));
37 | if v > 7.19, v = floor(v) + rem(v,1)/10; end
38 |
39 | if nargin > 2
40 | ind = strmatch('legacy', varargin);
41 | if ~isempty(ind)
42 | varargin(ind) = [];
43 | end
44 | end
45 |
46 | if v >= 7.14
47 | [C,IA] = setdiff(A,B,varargin{:},'legacy');
48 | if errorFlag
49 | [C2,IA2] = setdiff(A,B,varargin{:});
50 | if (~isequal(C, C2) || ~isequal(IA, IA2))
51 | warning('backward compatibility issue with call to setdiff function');
52 | end
53 | end
54 | else
55 | [C,IA] = setdiff(A,B,varargin{:});
56 | end
57 |
--------------------------------------------------------------------------------
/functions/adminfunc/troubleshooting_data_formats.m:
--------------------------------------------------------------------------------
1 | %Several EEGLAB plugins (not included by default) are available to import
2 | %specific data formats. To download these plugins use EEGLAB menu
3 | %
4 | %File > Manage EEGLAB extensions
5 | %
6 | %The FILEIO and BIOSIG toolboxes interface also allow to import in EEGLAB a wide variety
7 | %of EEG/MEG data file formats -- including those imported using EEGLAB native menus
8 | %
9 | %For EEGLAB, FILEIO and BIOSIG supported data formats
10 | %http://sccn.ucsd.edu/wiki/A01:_Importing_Continuous_and_Epoched_Data
11 | %
12 | %For FILEIO see in addition
13 | %http://www.fieldtriptoolbox.org/development/fileio
14 | %
15 | %For BIOSIG see in addition
16 | %http://biosig.sourceforge.net/SupportedSystems.html
17 |
--------------------------------------------------------------------------------
/functions/adminfunc/unique_bc.m:
--------------------------------------------------------------------------------
1 | % unique_bc - unique backward compatible with Matlab versions prior to 2013a
2 |
3 | % Copyright (C) 2013 Arnaud Delorme
4 | %
5 | % This file is part of EEGLAB, see http://www.eeglab.org
6 | % for the documentation and details.
7 | %
8 | % Redistribution and use in source and binary forms, with or without
9 | % modification, are permitted provided that the following conditions are met:
10 | %
11 | % 1. Redistributions of source code must retain the above copyright notice,
12 | % this list of conditions and the following disclaimer.
13 | %
14 | % 2. Redistributions in binary form must reproduce the above copyright notice,
15 | % this list of conditions and the following disclaimer in the documentation
16 | % and/or other materials provided with the distribution.
17 | %
18 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 | % THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | function [C,IA,IB] = unique_bc(A,varargin)
31 |
32 | errorFlag = error_bc;
33 |
34 | v = version;
35 | indp = find(v == '.');
36 | v = str2num(v(1:indp(2)-1));
37 | if v > 7.19, v = floor(v) + rem(v,1)/10; end
38 |
39 | if nargin > 2
40 | ind = strmatch('legacy', varargin);
41 | if ~isempty(ind)
42 | varargin(ind) = [];
43 | end
44 | end
45 |
46 | if v >= 7.14
47 | [C,IA,IB] = unique(A,varargin{:},'legacy');
48 | if errorFlag
49 | [C2,IA2] = unique(A,varargin{:});
50 | if ~isequal(C, C2) || ~isequal(IA, IA2) || ~isequal(IB, IB2)
51 | warning('backward compatibility issue with call to unique function');
52 | end
53 | end
54 | else
55 | [C,IA,IB] = unique(A,varargin{:});
56 | end
57 |
--------------------------------------------------------------------------------
/functions/guifunc/errordlg2.m:
--------------------------------------------------------------------------------
1 | % ERRORDLG2 - Makes a popup dialog box with the specified message and (optional)
2 | % title.
3 | %
4 | % Usage:
5 | % errordlg2(Prompt, Title);
6 | %
7 | % Example:
8 | % errordlg2('Explanation of error','title of error');
9 | %
10 | % Input:
11 | % Prompt - A text string explaining why the user is seeing this error message.
12 | % Title _ A text string that appears in the title bar of the error message.
13 | %
14 | % Author: Arnaud Delorme, CNL / Salk Institute, 12 August 2002
15 | %
16 | % See also: INPUTDLG2, QUESTDLG2
17 |
18 | % Copyright (C) Arnaud Delorme, CNL / Salk Institute, arno@salk.edu
19 | %
20 | % This file is part of EEGLAB, see http://www.eeglab.org
21 | % for the documentation and details.
22 | %
23 | % Redistribution and use in source and binary forms, with or without
24 | % modification, are permitted provided that the following conditions are met:
25 | %
26 | % 1. Redistributions of source code must retain the above copyright notice,
27 | % this list of conditions and the following disclaimer.
28 | %
29 | % 2. Redistributions in binary form must reproduce the above copyright notice,
30 | % this list of conditions and the following disclaimer in the documentation
31 | % and/or other materials provided with the distribution.
32 | %
33 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
34 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
37 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
38 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
39 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
40 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
41 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
42 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
43 | % THE POSSIBILITY OF SUCH DAMAGE.
44 |
45 | function errordlg2(Prompt, Title);
46 |
47 | if exist('beep') == 5
48 | beep;
49 | else
50 | disp(char(7));
51 | end
52 | if nargin <2
53 | Title = 'Error';
54 | end
55 | questdlg2(Prompt, Title, 'OK', 'OK');
56 |
--------------------------------------------------------------------------------
/functions/guifunc/warndlg2.m:
--------------------------------------------------------------------------------
1 | % WARNDLG2 - same as warndlg for EEGLAB
2 | %
3 | % Author: Arnaud Delorme, CNL / Salk Institute, 12 August 2002
4 | %
5 | % See also: INPUTDLG2, QUESTDLG2
6 |
7 | % Copyright (C) Arnaud Delorme, CNL / Salk Institute, arno@salk.edu
8 | %
9 | % This file is part of EEGLAB, see http://www.eeglab.org
10 | % for the documentation and details.
11 | %
12 | % Redistribution and use in source and binary forms, with or without
13 | % modification, are permitted provided that the following conditions are met:
14 | %
15 | % 1. Redistributions of source code must retain the above copyright notice,
16 | % this list of conditions and the following disclaimer.
17 | %
18 | % 2. Redistributions in binary form must reproduce the above copyright notice,
19 | % this list of conditions and the following disclaimer in the documentation
20 | % and/or other materials provided with the distribution.
21 | %
22 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
26 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 | % THE POSSIBILITY OF SUCH DAMAGE.
33 |
34 | function warndlg2(Prompt, Title, modal)
35 |
36 | if nargin <2
37 | Title = 'Warning';
38 | end
39 | if nargin > 2 && ischar(modal) && strcmpi(modal, 'non-modal')
40 | warndlg(Prompt, Title, 'non-modal')
41 | else
42 | questdlg2(Prompt, Title, 'OK', 'OK');
43 | end
44 |
--------------------------------------------------------------------------------
/functions/miscfunc/arrow.m:
--------------------------------------------------------------------------------
1 | function varargout = arrow( varargin )
2 |
3 | disp('The arrow function was removed from EEGLAB')
4 | disp('because of lack of compatibility with Matlab 2019')
5 | disp('An updated version of the function is available at')
6 | disp('https://www.mathworks.com/matlabcentral/fileexchange/278-arrow')
7 |
--------------------------------------------------------------------------------
/functions/miscfunc/cleanvarname.m:
--------------------------------------------------------------------------------
1 | function nameout = cleanvarname(namein)
2 |
3 | % Routine to remove unallowed characters from strings
4 | % nameout can be use as a variable or field in a structure
5 | % Cyril Pernet & Arnaud Delorme
6 |
7 | % custom change
8 | if strcmp(namein,'#')
9 | namein = 'nb';
10 | end
11 |
12 | % 1st change space to underscore (keeps readability)
13 | for l=1:length(namein)
14 | if isspace(namein(l))
15 | namein(l) = '_';
16 | end
17 | end
18 |
19 | % keep letters, numbers and underscore
20 | keep = isstrprop(namein, 'alpha') + isstrprop(namein, 'digit');
21 | underscores = zeros(1,size(namein,2));
22 | underscores(strfind(namein,'_')) = 1;
23 | keep = keep + underscores;
24 | nameout = namein(logical(keep));
25 |
26 | % remove usual suspects JIC isstrprop did not work
27 | stringcheck = [strfind(nameout,'('), ...
28 | strfind(nameout,')') ...
29 | strfind(nameout,'[') ...
30 | strfind(nameout,']') ...
31 | strfind(nameout,'{') ...
32 | strfind(nameout,'}') ...
33 | strfind(nameout,'-') ...
34 | strfind(nameout,'+') ...
35 | strfind(nameout,'*') ...
36 | strfind(nameout,'/') ...
37 | strfind(nameout,'#') ...
38 | strfind(nameout,'%') ...
39 | strfind(nameout,'&') ...
40 | strfind(nameout,'@') ...
41 | ];
42 |
43 | if ~isempty(stringcheck)
44 | nameout(stringcheck) = [];
45 | end
46 |
47 | % No number in position 1
48 | nb_check = 1;
49 | while nb_check
50 | if isletter(nameout(1))
51 | nb_check = 0;
52 | elseif strcmp(nameout(1),'_')
53 | nameout(1) = [];
54 | elseif isnumeric(eval(nameout(1)))
55 | nameout(1) = [];
56 | end
57 | end
58 |
59 | % last check
60 | if ~isvarname(nameout)
61 | error('the variable name to use is still invalid, check chars to remove')
62 | end
63 |
--------------------------------------------------------------------------------
/functions/miscfunc/covary.m:
--------------------------------------------------------------------------------
1 | % COVARY - For vectors, covary(X) returns the variance of X.
2 | % For matrices, covary(X)is a row vector containing the
3 | % variance of each column of X.
4 | %
5 | % Notes:
6 | % covary(X) normalizes by N-1 where N is the sequence length.
7 | % This makes covary(X) the best unbiased estimate of the
8 | % covariance if X are from a normal distribution.
9 | % Does not require the Matlab Signal Processing Toolbox
10 | %
11 | % Author: Scott Makeig, SCCN/INC/UCSD, La Jolla, 2000
12 |
13 | % Copyright (C) 2000 Scott Makeig, SCCN/INC/UCSD, scott@sccn.ucsd.edu
14 | %
15 | % This file is part of EEGLAB, see http://www.eeglab.org
16 | % for the documentation and details.
17 | %
18 | % Redistribution and use in source and binary forms, with or without
19 | % modification, are permitted provided that the following conditions are met:
20 | %
21 | % 1. Redistributions of source code must retain the above copyright notice,
22 | % this list of conditions and the following disclaimer.
23 | %
24 | % 2. Redistributions in binary form must reproduce the above copyright notice,
25 | % this list of conditions and the following disclaimer in the documentation
26 | % and/or other materials provided with the distribution.
27 | %
28 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
32 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
38 | % THE POSSIBILITY OF SUCH DAMAGE.
39 |
40 | % 01-25-02 reformated help & license -ad
41 |
42 | function covout = covary(data)
43 |
44 | data = data - mean(mean(data));
45 | if size(data,1) == 1
46 | data = data'; % make column vector
47 | end
48 | covout = sum(data.*data)/(size(data,1)-1);
49 |
50 |
51 |
--------------------------------------------------------------------------------
/functions/miscfunc/datlim.m:
--------------------------------------------------------------------------------
1 | % DATLIM - return min and max of a matrix
2 | %
3 | % Usage:
4 | % >> limits_vector = datlim(data);
5 | %
6 | % Input:
7 | % data - numeric array
8 | % Outputs:
9 | % limits_vector = [minval maxval]
10 | %
11 | % Author: Scott Makeig, SCCN/INC/UCSD, May 28, 2005
12 |
13 | % Copyright (C) Scott Makeig, SCCN/INC/UCSD, May 28, 2005
14 | %
15 | % This file is part of EEGLAB, see http://www.eeglab.org
16 | % for the documentation and details.
17 | %
18 | % Redistribution and use in source and binary forms, with or without
19 | % modification, are permitted provided that the following conditions are met:
20 | %
21 | % 1. Redistributions of source code must retain the above copyright notice,
22 | % this list of conditions and the following disclaimer.
23 | %
24 | % 2. Redistributions in binary form must reproduce the above copyright notice,
25 | % this list of conditions and the following disclaimer in the documentation
26 | % and/or other materials provided with the distribution.
27 | %
28 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
32 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
38 | % THE POSSIBILITY OF SUCH DAMAGE.
39 |
40 | function [limits_vector] = datlim(data)
41 |
42 | if ~isnumeric(data)
43 | error('data must be a numeric array')
44 | return
45 | end
46 |
47 | limits_vector = [ min(data(:)) max(data(:)) ]; % thanks to Arno Delorme
48 |
49 | % minval = squeeze(min(data)); maxval = squeeze(max(data));
50 | % while numel(minval) > 1
51 | % minval = squeeze(min(minval)); maxval = squeeze(max(maxval));
52 | % end
53 | % limits_vector = [minval maxval];
54 |
55 |
56 |
--------------------------------------------------------------------------------
/functions/miscfunc/dendhier.m:
--------------------------------------------------------------------------------
1 | function [links,topology,node] = dendhier(links,topology,node)
2 | % DENDHIER: Recursive algorithm to find links and distance coordinates on a
3 | % dendrogram, given the topology matrix.
4 | %
5 | % Usage: [links,topology,node] = dendhier(links,topology,node)
6 | %
7 | % links = 4-col matrix of descendants, ancestors, descendant
8 | % distances, and ancestor distances; pass to
9 | % function as null vector []
10 | % topology = dendrogram topology matrix
11 | % node = current node; pass as N-1
12 | %
13 |
14 | % RE Strauss, 7/13/95
15 |
16 | n = size(topology,1)+1; % Number of OTUs
17 |
18 | c1 = topology(node,1);
19 | c2 = topology(node,2);
20 | clst = topology(node,3);
21 | dist = topology(node,4);
22 |
23 | if (c1 <= n)
24 | links = [links; c1 clst 0 dist];
25 | else
26 | prevnode = find(topology(:,3)==c1);
27 | prevdist = topology(prevnode,4);
28 | links = [links; c1 clst prevdist dist];
29 | [links,topology,node] = dendhier(links,topology,prevnode);
30 | end
31 |
32 | if (c2 <= n)
33 | links = [links; c2 clst 0 dist];
34 | else
35 | prevnode = find(topology(:,3)==c2);
36 | prevdist = topology(prevnode,4);
37 | links = [links; c2 clst prevdist dist];
38 | [links,topology,node] = dendhier(links,topology,prevnode);
39 | end
40 |
41 | return;
42 |
--------------------------------------------------------------------------------
/functions/miscfunc/eeg_ms2f.m:
--------------------------------------------------------------------------------
1 | % EEG_MS2F - convert epoch latency in ms to nearest epoch frame number
2 | %
3 | % Usage:
4 | % >> outf = eeg_ms2f(EEG,ms);
5 | % Inputs:
6 | % EEG - EEGLAB data set structure
7 | % ms - epoch latency in milliseconds
8 | % Output:
9 | % outf - nearest epoch frame to the specified epoch latency
10 | %
11 | % Author: Scott Makeig, SCCN/INC, 12/05
12 |
13 | % Copyright (C) Scott Makeig, SCCN/INC, 12/05
14 | %
15 | % This file is part of EEGLAB, see http://www.eeglab.org
16 | % for the documentation and details.
17 | %
18 | % Redistribution and use in source and binary forms, with or without
19 | % modification, are permitted provided that the following conditions are met:
20 | %
21 | % 1. Redistributions of source code must retain the above copyright notice,
22 | % this list of conditions and the following disclaimer.
23 | %
24 | % 2. Redistributions in binary form must reproduce the above copyright notice,
25 | % this list of conditions and the following disclaimer in the documentation
26 | % and/or other materials provided with the distribution.
27 | %
28 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
32 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
38 | % THE POSSIBILITY OF SUCH DAMAGE.
39 |
40 | function outf = eeg_ms2f(EEG,ms)
41 | ms = ms/1000;
42 | if ms < EEG.xmin || ms > EEG.xmax
43 | error('time out of range');
44 | end
45 | outf = 1+round((EEG.pnts-1)*(ms-EEG.xmin)/(EEG.xmax-EEG.xmin));
46 | % else
47 | % [tmp outf] = min(abs(EEG.times-ms));
48 |
--------------------------------------------------------------------------------
/functions/miscfunc/envproj.col:
--------------------------------------------------------------------------------
1 | w..
2 | r..
3 | g..
4 | b..
5 | m..
6 | c..
7 | r..
8 | g..
9 | b..
10 | m..
11 | c..
12 | r..
13 | g..
14 | b..
15 | m..
16 | c..
17 | r..
18 | g..
19 | b..
20 | m..
21 | c..
22 | r..
23 | g..
24 | b..
25 | m..
26 | c..
27 | r..
28 | g..
29 | b..
30 | m..
31 | c..
32 | r..
33 | g..
34 | b..
35 | m..
36 | c..
37 | r..
38 | g..
39 | b..
40 | m..
41 | c..
42 | r..
43 | g..
44 | b..
45 | m..
46 | c..
47 | r..
48 | g..
49 | b..
50 | m..
51 | c..
52 | r..
53 | g..
54 | b..
55 | m..
56 | c..
57 | r..
58 | g..
59 | b..
60 | m..
61 | c..
62 | r..
63 | g..
64 | b..
65 |
--------------------------------------------------------------------------------
/functions/miscfunc/erpregoutfunc.m:
--------------------------------------------------------------------------------
1 | % ERPREGOUTFUNC - sub function of ERPREGOUT used to regress
2 | % out the ERP from the data
3 | %
4 | % Usage:
5 | % totdiff = erpregout(fact, data, erp);
6 | %
7 | % Inputs:
8 | % fact - factor
9 | % data - [float] 1-D data (time points).
10 | % erp - [float] 1-D data (time points).
11 | %
12 | % Outputs:
13 | % totdif - residual difference
14 | %
15 | % Author: Arnaud Delorme, Salk, SCCN, UCSD, CA, April 29, 2004
16 |
17 | %123456789012345678901234567890123456789012345678901234567890123456789012
18 |
19 | % Copyright (C) 2004 Arnaud Delorme
20 | %
21 | % This file is part of EEGLAB, see http://www.eeglab.org
22 | % for the documentation and details.
23 | %
24 | % Redistribution and use in source and binary forms, with or without
25 | % modification, are permitted provided that the following conditions are met:
26 | %
27 | % 1. Redistributions of source code must retain the above copyright notice,
28 | % this list of conditions and the following disclaimer.
29 | %
30 | % 2. Redistributions in binary form must reproduce the above copyright notice,
31 | % this list of conditions and the following disclaimer in the documentation
32 | % and/or other materials provided with the distribution.
33 | %
34 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
35 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
38 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
41 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
42 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
44 | % THE POSSIBILITY OF SUCH DAMAGE.
45 |
46 | function totdiff = erpregoutfunc(fact, data, erp);
47 |
48 | totdiff = mean(abs(data - fact*erp));
49 |
50 |
--------------------------------------------------------------------------------
/functions/miscfunc/gauss.m:
--------------------------------------------------------------------------------
1 | function outvec = gauss(frames,sds)
2 | % GAUSS - return a smooth Gaussian window
3 | %
4 | % Usage:
5 | % >> outvector = gauss(frames,sds);
6 | %
7 | % Inputs:
8 | % frames = window length
9 | % sds = number of +/-std. deviations = steepness
10 | % (~0+ -> flat; >>10 -> spike)
11 |
12 | outvec = [];
13 | if nargin < 2
14 | help gauss
15 | return
16 | end
17 | if sds <=0 || frames < 1
18 | help gauss
19 | return
20 | end
21 |
22 | incr = 2*sds/(frames-1);
23 | outvec = exp(-(-sds:incr:sds).^2);
24 |
--------------------------------------------------------------------------------
/functions/miscfunc/getmfilelist.m:
--------------------------------------------------------------------------------
1 | % recursively get the list of Matlab file in
2 | % a given directory
3 | %
4 | % A. Delorme, 2017
5 |
6 | % Copyright (C) A. Delorme, 2017
7 | %
8 | % This file is part of EEGLAB, see http://www.eeglab.org
9 | % for the documentation and details.
10 | %
11 | % Redistribution and use in source and binary forms, with or without
12 | % modification, are permitted provided that the following conditions are met:
13 | %
14 | % 1. Redistributions of source code must retain the above copyright notice,
15 | % this list of conditions and the following disclaimer.
16 | %
17 | % 2. Redistributions in binary form must reproduce the above copyright notice,
18 | % this list of conditions and the following disclaimer in the documentation
19 | % and/or other materials provided with the distribution.
20 | %
21 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 | % THE POSSIBILITY OF SUCH DAMAGE.
32 |
33 | function fileList = getmfilelist(folder)
34 |
35 | fileList = {};
36 | if nargin < 1
37 | folder = pwd;
38 | end
39 |
40 | allFiles = dir(folder);
41 |
42 | for iFile = 1:length(allFiles)
43 |
44 | if ~isequal(allFiles(iFile).name, '..') && ~isequal(allFiles(iFile).name, '.')
45 |
46 | if exist(fullfile(folder, allFiles(iFile).name), 'dir')
47 | fileList2 = getmfilelist(fullfile(folder, allFiles(iFile).name));
48 | fileList = [ fileList fileList2 ];
49 | elseif isequal(allFiles(iFile).name(end-1:end), '.m')
50 | fileList{end+1} = fullfile(folder, allFiles(iFile).name);
51 | end
52 |
53 | end
54 | end
55 |
56 |
57 |
--------------------------------------------------------------------------------
/functions/miscfunc/loglike.m:
--------------------------------------------------------------------------------
1 | function f=loglike(W, S)
2 | % LOGLIKE - log likehood function to estimate dependence between components
3 | %
4 | % Usage: f = loglike(W, S);
5 | %
6 | % Computation of the log-likelihood function under the model
7 | % that the ICs are 1/cosh(s) distributed (according to the tanh
8 | % nonlinearity in ICA). It does not exactly match for the logistic
9 | % nonlinearity, but should be a decent approximation
10 | %
11 | % negative log likelihood function
12 | % f = -( log(abs(det(W))) - sum(sum(log( cosh(S) )))/N - M*log(pi) );
13 | %
14 | % With these meanings:
15 | % W: total unmixing matrix, ie, icaweights*icasphere
16 | % S: 2-dim Matrix of source estimates
17 | % N: number of time points
18 | % M: number of components
19 | %
20 | % Author: Arnaud Delorme and Jorn Anemuller
21 |
22 | W = double(W);
23 | S = double(S);
24 | % normalize activities
25 | stds = std(S, [], 2);
26 | S = S./repmat(stds, [1 size(S,2)]);
27 | W = W./repmat(stds, [1 size(W,2)]);
28 |
29 | M = size(W,1);
30 | if ndims(S) == 3
31 | S = reshape(S, size(S,1), size(S,3)*size(S,2));
32 | end
33 | N = size(S,2);
34 |
35 | % detect infinite and remove them
36 | tmpcoh = log( cosh(S) );
37 | tmpinf = find(isinf(tmpcoh));
38 | tmpcoh(tmpinf) = [];
39 | N = (N*M-length(tmpinf))/M;
40 |
41 | f=-( log(abs(det(W))) - sum(sum(tmpcoh))/N - M*log(pi) );
42 |
43 |
--------------------------------------------------------------------------------
/functions/miscfunc/nan_std.m:
--------------------------------------------------------------------------------
1 | % NAN_STD - std, not considering NaN values
2 | %
3 | % Usage: std across the first dimension
4 |
5 | % Author: Arnaud Delorme, CNL / Salk Institute, Sept 2003
6 |
7 | % Copyright (C) 2003 Arnaud Delorme, Salk Institute, arno@salk.edu
8 | %
9 | % This file is part of EEGLAB, see http://www.eeglab.org
10 | % for the documentation and details.
11 | %
12 | % Redistribution and use in source and binary forms, with or without
13 | % modification, are permitted provided that the following conditions are met:
14 | %
15 | % 1. Redistributions of source code must retain the above copyright notice,
16 | % this list of conditions and the following disclaimer.
17 | %
18 | % 2. Redistributions in binary form must reproduce the above copyright notice,
19 | % this list of conditions and the following disclaimer in the documentation
20 | % and/or other materials provided with the distribution.
21 | %
22 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
26 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 | % THE POSSIBILITY OF SUCH DAMAGE.
33 |
34 | function out = nan_std(in)
35 |
36 | if nargin < 1
37 | help nan_std;
38 | return;
39 | end
40 |
41 | nans = find(isnan(in));
42 | in(nans) = 0;
43 |
44 | nonnans = ones(size(in));
45 | nonnans(nans) = 0;
46 | nonnans = sum(nonnans);
47 | nononnans = find(nonnans==0);
48 | nonnans(nononnans) = NaN;
49 |
50 | out = sqrt((sum(in.^2)-sum(in).^2./nonnans)./(nonnans-1));
51 | out(nononnans) = NaN;
52 |
--------------------------------------------------------------------------------
/functions/miscfunc/perminv.m:
--------------------------------------------------------------------------------
1 | % PERMINV - returns the inverse permutation vector
2 | %
3 | % Usage: >> [invvec] = perminverse(vector);
4 | %
5 | % Author: Scott Makeig, SCCN/INC/UCSD, La Jolla, 11-30-96
6 |
7 | % Copyright (C) 11-30-96 Scott Makeig, SCCN/INC/UCSD, scott@sccn.ucsd.edu
8 | %
9 | % This file is part of EEGLAB, see http://www.eeglab.org
10 | % for the documentation and details.
11 | %
12 | % Redistribution and use in source and binary forms, with or without
13 | % modification, are permitted provided that the following conditions are met:
14 | %
15 | % 1. Redistributions of source code must retain the above copyright notice,
16 | % this list of conditions and the following disclaimer.
17 | %
18 | % 2. Redistributions in binary form must reproduce the above copyright notice,
19 | % this list of conditions and the following disclaimer in the documentation
20 | % and/or other materials provided with the distribution.
21 | %
22 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
26 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 | % THE POSSIBILITY OF SUCH DAMAGE.
33 |
34 | % 4-4-97 shortened name to PERMINV -sm
35 | % 4-7-97 allowed row vector, added tests -sm
36 | % 01-25-02 reformated help & license -ad
37 |
38 | function [invvec]=perminv(vector)
39 |
40 | [n,c] = size(vector);
41 | if n>1 && c>1,
42 | fprintf('perminv(): input must be a vector.\n');
43 | return
44 | end
45 | transpose=0;
46 | if c>1
47 | vector = vector';
48 | transpose =1;
49 | end
50 |
51 | invvec = zeros(size(vector));
52 | for i=1:length(vector)
53 | invvec(vector(i)) = i;
54 | end
55 |
56 | if transpose==1,
57 | invvec = invvec';
58 | end
59 |
--------------------------------------------------------------------------------
/functions/miscfunc/replace_in_all_files.m:
--------------------------------------------------------------------------------
1 | % Replace XXXX by XXXXX for better documentation in MATLAB
2 | % allFiles = dir('*.m')
3 | % for iFile = 1:length(allFiles)
4 | % replace_in_all_files(allFiles(iFile).name);
5 | % disp(allFiles(iFile).name);
6 | % end
7 |
8 | function replace_in_all_files(fileName)
9 |
10 | fid = fopen(fileName, 'r');
11 | if fid == -1
12 | error('File not found');
13 | end
14 |
15 | allStrs = {};
16 | count = 1;
17 | expression1 = '[_A-Za-z0-9]+\(\)'; % + means at least 1
18 | expression2 = '[A-Za-z0-9]\(\)';
19 | while ~feof(fid)
20 | strTmp = fgetl(fid);
21 |
22 | if length(strTmp) > 0 && strTmp(1) == '%'
23 | pos1 = regexp(strTmp, expression1);
24 | pos2 = regexp(strTmp, expression2)+1;
25 |
26 | if length(pos1) ~= length(pos2)
27 | error('Issue with length of regular expressions')
28 | end
29 | for iPos = length(pos1):-1:1
30 | strTmp(pos2(iPos):pos2(iPos)+1) = [];
31 | strTmp(pos1(iPos):pos2(iPos)-1) = upper(strTmp(pos1(iPos):pos2(iPos)-1));
32 | end
33 | end
34 |
35 | allStrs{count} = strTmp;
36 | count = count+1;
37 | end
38 | fclose(fid);
39 |
40 | % write new file
41 | fid = fopen(fileName, 'w');
42 | for iRow = 1:length(allStrs)
43 | fprintf(fid, '%s\n', allStrs{iRow});
44 | end
45 | fclose(fid);
46 |
47 | function [twoLines, content] = replace_txt(twoLines, pattern1, pattern2)
48 |
49 | indB1 = strfind(twoLines, pattern1{1}); indPat1 = 1;
50 | indB2 = strfind(twoLines, pattern2{1}); indPat2 = 1;
51 | content = '';
52 | if isempty(indB1), indB1 = strfind(twoLines, pattern1{2}); indPat1 = 2; end
53 | if isempty(indB2), indB2 = strfind(twoLines, pattern2{2}); indPat2 = 2; end
54 | if ~isempty(indB1) && ~isempty(indB2)
55 | content = twoLines(indB1+length(pattern1{indPat1}):indB2-1);
56 | fprintf('Found: %s\n', content);
57 | twoLines = [ twoLines(1:indB1-1) '[' content '](http://sccn.ucsd.edu/eeglab/locatefile.php?file=' content ')' twoLines(indB2+length(pattern2{indPat2}):end) ];
58 | end
59 |
--------------------------------------------------------------------------------
/functions/miscfunc/rotatematlab.m:
--------------------------------------------------------------------------------
1 | function rotatematlab(varargin)
2 | % This function calls the Matlab rotate function
3 | % This prevents the issue with the function in the private folder of Dipfit
4 |
5 | rotate(varargin{:});
6 |
--------------------------------------------------------------------------------
/functions/miscfunc/unique_cell_string.m:
--------------------------------------------------------------------------------
1 | function uniqueStrings = unique_cell_string(c)
2 | % unique string from a cell-array containing only strings, ignores all
3 | % non-strings.
4 |
5 | nonStringCells = [];
6 | for i=1:length(c) % remove non-string cells
7 | if ~strcmp(class(c{i}),'char')
8 | nonStringCells = [nonStringCells i];
9 | end
10 | end
11 | c(nonStringCells) = [];
12 |
13 | uniqueStrings = {};
14 | for i=1:length(c) % remove non-string cells
15 | if ~isAlreadyEncountered(c{i}, uniqueStrings);
16 | uniqueStrings{end+1} = c{i};
17 | end
18 | end
19 |
20 | function result = isAlreadyEncountered(s, u)
21 | result = false;
22 | for i=1:length(u)
23 | if strcmp(u{i}, s)
24 | result = true;
25 | end
26 | end
27 |
28 |
29 |
--------------------------------------------------------------------------------
/functions/popfunc/pop_runscript.m:
--------------------------------------------------------------------------------
1 | % POP_RUNSCRIPT - Run Matlab script
2 | %
3 | % Usage: >> pop_runscript;
4 | % >> pop_runscript( filename );
5 | %
6 | % Input:
7 | % filename - [string] name of the file.
8 | %
9 | % Author: Arnaud Delorme, SCCN / INC / UCSD, August 2009
10 |
11 | % Copyright (C) Arnaud Delorme, August 2009
12 | %
13 | % This file is part of EEGLAB, see http://www.eeglab.org
14 | % for the documentation and details.
15 | %
16 | % Redistribution and use in source and binary forms, with or without
17 | % modification, are permitted provided that the following conditions are met:
18 | %
19 | % 1. Redistributions of source code must retain the above copyright notice,
20 | % this list of conditions and the following disclaimer.
21 | %
22 | % 2. Redistributions in binary form must reproduce the above copyright notice,
23 | % this list of conditions and the following disclaimer in the documentation
24 | % and/or other materials provided with the distribution.
25 | %
26 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
36 | % THE POSSIBILITY OF SUCH DAMAGE.
37 |
38 | function com = pop_runscript(filename)
39 |
40 | com = [];
41 | if nargin <1
42 | [filename, filepath] = uigetfile('*.*', 'Please select input script -- pop_runscript()');
43 |
44 | if filename(1) == 0, return; end
45 |
46 | filename = fullfile(filepath, filename);
47 | end
48 |
49 | str = readtxtfile(filename);
50 | try
51 | evalin('base', str);
52 | catch
53 | lasterr
54 | end
55 | com = sprintf('pop_runscript(''%s'');', filename);
56 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/celltomat.m:
--------------------------------------------------------------------------------
1 | % CELLTOMAT - convert cell array to matrix
2 | %
3 | % Usage: >> M = celltomat( C );
4 | %
5 | % Author: Arnaud Delorme, CNL / Salk Institute, Jan 25 2002
6 | %
7 | % Note: This function overloads the neuralnet toolbox function CELLTOMAT,
8 | % but does not have all its capacities. Delete this version if you have
9 | % the toolbox.
10 |
11 | % Copyright (C) Jan 25 2002 Arnaud Delorme, CNL / Salk Institute
12 | %
13 | % This file is part of EEGLAB, see http://www.eeglab.org
14 | % for the documentation and details.
15 | %
16 | % Redistribution and use in source and binary forms, with or without
17 | % modification, are permitted provided that the following conditions are met:
18 | %
19 | % 1. Redistributions of source code must retain the above copyright notice,
20 | % this list of conditions and the following disclaimer.
21 | %
22 | % 2. Redistributions in binary form must reproduce the above copyright notice,
23 | % this list of conditions and the following disclaimer in the documentation
24 | % and/or other materials provided with the distribution.
25 | %
26 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
36 | % THE POSSIBILITY OF SUCH DAMAGE.
37 |
38 | function M = celltomat( C, varargin );
39 |
40 | if nargin < 1
41 | help celltomat;
42 | return;
43 | end
44 |
45 | M = zeros(size(C));
46 | for i=1:size(C,1)
47 | for j=1:size(C,2)
48 | M(i,j) = C{i,j};
49 | end
50 | end;
51 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/eegplot_readkey.m:
--------------------------------------------------------------------------------
1 | function eegplot_readkey(src,evnt)
2 | % eegplot helper function to read key strokes
3 |
4 | if strcmp(evnt.Key, 'rightarrow')==1
5 | eegplot('drawp',4);
6 | elseif strcmp(evnt.Key, 'leftarrow')==1
7 | eegplot('drawp',1);
8 | end
9 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/eventalign.m:
--------------------------------------------------------------------------------
1 | % eventalign - function called by POP_IMPORTEVENT to find the best
2 | % sampling rate ratio to align 2 arrays of data events.
3 | %
4 | % Author: Arnaud Delorme, SCCN/INC/UCSD, Dec 2003
5 |
6 | % Copyright (C) Arnaud Delorme, CNL / Salk Institute, 9 Feb 2002, arno@salk.edu
7 | %
8 | % This file is part of EEGLAB, see http://www.eeglab.org
9 | % for the documentation and details.
10 | %
11 | % Redistribution and use in source and binary forms, with or without
12 | % modification, are permitted provided that the following conditions are met:
13 | %
14 | % 1. Redistributions of source code must retain the above copyright notice,
15 | % this list of conditions and the following disclaimer.
16 | %
17 | % 2. Redistributions in binary form must reproduce the above copyright notice,
18 | % this list of conditions and the following disclaimer in the documentation
19 | % and/or other materials provided with the distribution.
20 | %
21 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 | % THE POSSIBILITY OF SUCH DAMAGE.
32 |
33 | function mindiff = eventalign(factor, a, b, measure)
34 |
35 | if length(factor) == 2
36 | diffarray = abs(factor(1)*a-b+factor(2))';
37 | else
38 | diffarray = abs(factor*a-b)';
39 | end
40 | allmins = min(diffarray);
41 |
42 | if strcmpi(measure, 'mean')
43 | mindiff = mean(allmins);
44 | else
45 | mindiff = median(allmins);
46 | end
47 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/eyelike.m:
--------------------------------------------------------------------------------
1 | function [eyelikeres, S, P]= eyelike(E)
2 | % EYELIKE - calculate a permutation matrix P and a scaling (diagonal) maxtrix S
3 | % such that S*P*E is eyelike (so permutation acts on the rows of E).
4 | % E must be a square matrix.
5 | % Usage:
6 | % >> [eyelike, S, P] = eyelike(E);
7 | %
8 | % Author: Benjamin Blankertz (blanker@first.gmd.de) 3/2/00
9 |
10 | [N, M]= size(E);
11 | if N ~= M
12 | fprintf('eyeLike(): input matrix must be square.\n');
13 | return
14 | end
15 |
16 | R= E./repmat(sum(abs(E),2),1,N);
17 | Rabs= abs(R);
18 | P= zeros(N);
19 | for n=1:N
20 | [so, si]= sort(-Rabs(:));
21 | [chosenV, chosenH]= ind2sub([N N], si(1));
22 | P(chosenH,chosenV)= 1;
23 | Rabs(chosenV,:)= repmat(-inf, 1, N);
24 | Rabs(:,chosenH)= repmat(-inf, N, 1);
25 | end
26 | S= diag(1./diag(P*E));
27 |
28 | eyelikeres= S*P*E;
29 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/fastif.m:
--------------------------------------------------------------------------------
1 | % FASTIF - fast if function.
2 | %
3 | % Usage:
4 | % >> res = fastif(test, s1, s2);
5 | %
6 | % Input:
7 | % test - logical test with result 0 or 1
8 | % s1 - result if 1
9 | % s2 - result if 0
10 | %
11 | % Output:
12 | % res - s1 or s2 depending on the value of the test
13 | %
14 | % Author: Arnaud Delorme, CNL / Salk Institute, 2001
15 |
16 | % Copyright (C) 2001 Arnaud Delorme, Salk Institute, arno@salk.edu
17 | %
18 | % This file is part of EEGLAB, see http://www.eeglab.org
19 | % for the documentation and details.
20 | %
21 | % Redistribution and use in source and binary forms, with or without
22 | % modification, are permitted provided that the following conditions are met:
23 | %
24 | % 1. Redistributions of source code must retain the above copyright notice,
25 | % this list of conditions and the following disclaimer.
26 | %
27 | % 2. Redistributions in binary form must reproduce the above copyright notice,
28 | % this list of conditions and the following disclaimer in the documentation
29 | % and/or other materials provided with the distribution.
30 | %
31 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
35 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
39 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
41 | % THE POSSIBILITY OF SUCH DAMAGE.
42 |
43 | function res = fastif(s1, s2, s3);
44 |
45 | if s1
46 | res = s2;
47 | else
48 | res = s3;
49 | end
50 | return;
51 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/isscript.m:
--------------------------------------------------------------------------------
1 | % function checking if a specific file is a script or a function
2 |
3 | % Copyright (C) 2006 Arnaud Delorme
4 | %
5 | % This file is part of EEGLAB, see http://www.eeglab.org
6 | % for the documentation and details.
7 | %
8 | % Redistribution and use in source and binary forms, with or without
9 | % modification, are permitted provided that the following conditions are met:
10 | %
11 | % 1. Redistributions of source code must retain the above copyright notice,
12 | % this list of conditions and the following disclaimer.
13 | %
14 | % 2. Redistributions in binary form must reproduce the above copyright notice,
15 | % this list of conditions and the following disclaimer in the documentation
16 | % and/or other materials provided with the distribution.
17 | %
18 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 | % THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | function bool = isscript(fileName)
31 |
32 | fid = fopen(fileName, 'r');
33 | cont = true;
34 | while cont && ~feof(fid)
35 | l = strtok(fgetl(fid));
36 |
37 | if ~isempty(l) && l(1) ~= '%'
38 | if strcmpi(l, 'function')
39 | bool = false; return;
40 | else
41 | bool = true; return;
42 | end
43 | end
44 | end
45 | bool = true; return;
46 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/mattocell.m:
--------------------------------------------------------------------------------
1 | % MATTOCELL - convert matrix to cell array
2 | %
3 | % Usage: >> C = mattocell( M );
4 | %
5 | % Author: Arnaud Delorme, CNL / Salk Institute, Jan 25 2002
6 | %
7 | % Note: this function overload the nnet toolbox function mattocell,
8 | % but does not have all its capacities. You can delete the current
9 | % function if you have the toolbox.
10 |
11 | % Copyright (C) Jan 25 2002 Arnaud Delorme, CNL / Salk Institute
12 | %
13 | % This file is part of EEGLAB, see http://www.eeglab.org
14 | % for the documentation and details.
15 | %
16 | % Redistribution and use in source and binary forms, with or without
17 | % modification, are permitted provided that the following conditions are met:
18 | %
19 | % 1. Redistributions of source code must retain the above copyright notice,
20 | % this list of conditions and the following disclaimer.
21 | %
22 | % 2. Redistributions in binary form must reproduce the above copyright notice,
23 | % this list of conditions and the following disclaimer in the documentation
24 | % and/or other materials provided with the distribution.
25 | %
26 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
36 | % THE POSSIBILITY OF SUCH DAMAGE.
37 |
38 | function C = mattocell( M, varargin );
39 |
40 | if nargin < 1
41 | help mattocell;
42 | return;
43 | end
44 | if isempty(M)
45 | C = [];
46 | return;
47 | end
48 | C = cell(size(M));
49 | for i=1:size(M,1)
50 | for j=1:size(M,2)
51 | C{i,j} = M(i,j);
52 | end
53 | end;
54 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/nan_mean.m:
--------------------------------------------------------------------------------
1 | % NAN_MEAN - Average, not considering NaN values
2 | %
3 | % Usage: same as MEAN
4 |
5 | % Author: Arnaud Delorme, CNL / Salk Institute, 16 Oct 2002
6 |
7 | % Copyright (C) 2001 Arnaud Delorme, Salk Institute, arno@salk.edu
8 | %
9 | % This file is part of EEGLAB, see http://www.eeglab.org
10 | % for the documentation and details.
11 | %
12 | % Redistribution and use in source and binary forms, with or without
13 | % modification, are permitted provided that the following conditions are met:
14 | %
15 | % 1. Redistributions of source code must retain the above copyright notice,
16 | % this list of conditions and the following disclaimer.
17 | %
18 | % 2. Redistributions in binary form must reproduce the above copyright notice,
19 | % this list of conditions and the following disclaimer in the documentation
20 | % and/or other materials provided with the distribution.
21 | %
22 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
26 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 | % THE POSSIBILITY OF SUCH DAMAGE.
33 |
34 | function out = nan_mean(in, dim)
35 |
36 | if nargin < 1
37 | help nan_mean;
38 | return;
39 | end
40 | if nargin < 2
41 | if size(in,1) ~= 1
42 | dim = 1;
43 | elseif size(in,2) ~= 1
44 | dim = 2;
45 | else
46 | dim = 3;
47 | end
48 | end
49 | tmpin = in;
50 | tmpin(find(isnan(in(:)))) = 0;
51 | denom = sum(~isnan(in),dim);
52 | denom(find(~denom)) = nan;
53 | out = sum(tmpin, dim) ./ denom;
54 |
55 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/spher.m:
--------------------------------------------------------------------------------
1 | % SPHER - return the sphering matrix for given input data
2 | %
3 | % Usage:
4 | % >> sphere_matrix = spher(data);
5 | %
6 | % Reference: T. Bell (1996)
7 |
8 | % Copyright (C) S. Makeig CNL / Salk Institute, La Jolla CA 7-17-97
9 | %
10 | % This file is part of EEGLAB, see http://www.eeglab.org
11 | % for the documentation and details.
12 | %
13 | % Redistribution and use in source and binary forms, with or without
14 | % modification, are permitted provided that the following conditions are met:
15 | %
16 | % 1. Redistributions of source code must retain the above copyright notice,
17 | % this list of conditions and the following disclaimer.
18 | %
19 | % 2. Redistributions in binary form must reproduce the above copyright notice,
20 | % this list of conditions and the following disclaimer in the documentation
21 | % and/or other materials provided with the distribution.
22 | %
23 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33 | % THE POSSIBILITY OF SUCH DAMAGE.
34 |
35 | function sphere = spher(data)
36 |
37 |
38 | if nargin<1 || size(data,1)<1
39 | help spher
40 | return
41 | end
42 |
43 | sphere = 2.0*inv(sqrtm(cov(data'))); % return the "sphering" matrix
44 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/spherror.m:
--------------------------------------------------------------------------------
1 | % SPHERROR - CHANCENTER sub function to compute minimum distance
2 | % of Cartesian coordinates to a sphere
3 | %
4 | % Author: Scott Makeig, CNL / Salk Institute, 2000
5 |
6 | % Copyright (C) Scott Makeig, CNL / Salk Institute, 2000
7 | %
8 | % This file is part of EEGLAB, see http://www.eeglab.org
9 | % for the documentation and details.
10 | %
11 | % Redistribution and use in source and binary forms, with or without
12 | % modification, are permitted provided that the following conditions are met:
13 | %
14 | % 1. Redistributions of source code must retain the above copyright notice,
15 | % this list of conditions and the following disclaimer.
16 | %
17 | % 2. Redistributions in binary form must reproduce the above copyright notice,
18 | % this list of conditions and the following disclaimer in the documentation
19 | % and/or other materials provided with the distribution.
20 | %
21 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 | % THE POSSIBILITY OF SUCH DAMAGE.
32 |
33 | function wobble = spherror(center,x,y,z)
34 |
35 | % 03/14/02 corrected wobble calculation -lf
36 |
37 | x = x - center(1); % center the points at (0,0,0)
38 | y = y - center(2);
39 | z = z - center(3);
40 | radius = (sqrt(x.^2+y.^2+z.^2)); % distances from the center
41 | wobble = std(radius-mean(radius)); % test if xyz values are on a sphere
42 |
--------------------------------------------------------------------------------
/functions/sigprocfunc/white1st.col:
--------------------------------------------------------------------------------
1 | w..
2 | r..
3 | g..
4 | b..
5 | m..
6 | c..
7 | r..
8 | g..
9 | b..
10 | m..
11 | c..
12 | r..
13 | g..
14 | b..
15 | m..
16 | c..
17 | r..
18 | g..
19 | b..
20 | m..
21 | c..
22 | r..
23 | g..
24 | b..
25 | m..
26 | c..
27 | r..
28 | g..
29 | b..
30 | m..
31 | c..
32 | r..
33 | g..
34 | b..
35 | m..
36 | c..
37 | r..
38 | g..
39 | b..
40 | m..
41 | c..
42 | r..
43 | g..
44 | b..
45 | m..
46 | c..
47 | r..
48 | g..
49 | b..
50 | m..
51 | c..
52 | r..
53 | g..
54 | b..
55 | m..
56 | c..
57 | r..
58 | g..
59 | b..
60 | m..
61 | c..
62 | r..
63 | g..
64 | b..
65 |
--------------------------------------------------------------------------------
/functions/studyfunc/eeglabciplot.m:
--------------------------------------------------------------------------------
1 | function eeglabciplot(lower,upper,x,colour, alphaval)
2 | % eeglabciplot(lower,upper)
3 | % eeglabciplot(lower,upper,x)
4 | % eeglabciplot(lower,upper,x,colour)
5 | %
6 | % Plots a shaded region on a graph between specified lower and upper confidence intervals (L and U).
7 | % l and u must be vectors of the same length.
8 | % Uses the 'fill' function, not 'area'. Therefore multiple shaded plots
9 | % can be overlaid without a problem. Make them transparent for total visibility.
10 | % x data can be specified, otherwise plots against index values.
11 | % colour can be specified (eg 'k'). Defaults to blue.
12 |
13 | % Author: Raymond Reynolds 24/11/06
14 | % Modified by Ramon Martinez Cancino
15 |
16 | if length(lower)~=length(upper)
17 | error('lower and upper vectors must be same length')
18 | end
19 |
20 | if nargin<5
21 | alphaval = 1;
22 | end
23 | if nargin<4
24 | colour= 'r';
25 | end
26 |
27 | if nargin<3
28 | x=1:length(lower);
29 | end
30 |
31 | % convert to row vectors so fliplr can work
32 | if find(size(x)==(max(size(x))))<2
33 | x=x'; end
34 | if find(size(lower)==(max(size(lower))))<2
35 | lower=lower'; end
36 | if find(size(upper)==(max(size(upper))))<2
37 | upper=upper'; end
38 |
39 | hdl_tmp = fill([x fliplr(x)],[upper fliplr(lower)],colour,'FaceAlpha', alphaval, 'EdgeColor', 'none');
40 |
--------------------------------------------------------------------------------
/functions/studyfunc/gethashcode.m:
--------------------------------------------------------------------------------
1 | % GETHASHCODE - get hash code for input array
2 | %
3 | % Usage:
4 | % >> md5code = gethashcode(array);
5 | %
6 | % Inputs:
7 | % array - array of number. gets converted to double.
8 | %
9 | % Output:
10 | % md5code - MD5 output code
11 | %
12 | % Author: Arnaud Delorme, 2015-
13 |
14 | % Copyright (C) Arnaud Delorme, arno@salk.edu
15 | %
16 | % This file is part of EEGLAB, see http://www.eeglab.org
17 | % for the documentation and details.
18 | %
19 | % Redistribution and use in source and binary forms, with or without
20 | % modification, are permitted provided that the following conditions are met:
21 | %
22 | % 1. Redistributions of source code must retain the above copyright notice,
23 | % this list of conditions and the following disclaimer.
24 | %
25 | % 2. Redistributions in binary form must reproduce the above copyright notice,
26 | % this list of conditions and the following disclaimer in the documentation
27 | % and/or other materials provided with the distribution.
28 | %
29 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
33 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
39 | % THE POSSIBILITY OF SUCH DAMAGE.
40 |
41 | function res= gethashcode(str)
42 |
43 | md = javaMethod('getInstance', 'java.security.MessageDigest', 'MD5');
44 | javastr = javaObject('java.lang.String', str);
45 | hash = md.digest(javastr.getBytes('UTF-8'));
46 | bi = javaObject('java.math.BigInteger', 1, hash);
47 | res = char(bi.toString(16));
48 |
--------------------------------------------------------------------------------
/functions/studyfunc/neural_net.m:
--------------------------------------------------------------------------------
1 | % NEURAL_NET - computes clusters using Matlab Neural Net toolbox.
2 | % Alternative clustering algorithm to KMEANS.
3 | % This is a helper function called from POP_CLUST.
4 |
5 | % Copyright (C) 2006 UCSD
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function [IDX,C] = neural_net(clustdata,clus_num)
33 |
34 | nmin = min(clustdata);
35 | nmax = max(clustdata);
36 | net = newc([nmin ;nmax].',clus_num);
37 | net = train(net,(clustdata).');
38 | Y = sim(net,(clustdata).');
39 | IDX = vec2ind(Y);
40 | C = zeros(clus_num,size(clustdata,2));
41 | for k = 1:clus_num
42 | C(k,:) = sum(clustdata(find(IDX == k),:));
43 | end
44 |
--------------------------------------------------------------------------------
/functions/studyfunc/optimal_kmeans.m:
--------------------------------------------------------------------------------
1 | function [IDX, C, sumd, D] = optimal_kmeans(clustdata, clusnum)
2 | % THe aim of this function is to find the optimal number of clusters based
3 | % on the "clusdata" and the "clusnum" range.
4 | % INPUT:
5 | % clustdata: the data matrix for the componenets. It is the same
6 | % varuable used in EEGLAB pop_clus.m
7 | % clusnum: number of cluster is a [1 x 2] vector specifying the lower
8 | % and upper bound of the optimal kmeans search.
9 | %
10 | % NOTE: This fucntion uses MALTAB's Statistics and Machine Learning
11 | % Toolbox, and can't run without that.
12 | %
13 | % Created by Seyed Yahya Shirazi @ UCF 2019
14 |
15 | %% intialize
16 | if size(clusnum,2) ~= 2
17 | error('when using OPTIMAL_KMEANS, clusnum shoub be a 1x2 vector')
18 | end
19 |
20 | % try
21 | % clust = parcluster;
22 | % clust.NumWorkers = clust.NumWorkers - 2;
23 | % parpool(clust);
24 | % catch
25 | % end
26 |
27 | %% evaluate
28 | disp('Finding optimal number of clusters. please be patient \n')
29 | tic
30 | eva = evalclusters(clustdata,@par_kmeans,'silhouette','KList',clusnum(1):clusnum(2));
31 | toc
32 | [IDX,C, sumd, D] = kmeans(clustdata,eva.OptimalK,'Replicates',10);
33 |
34 | end % end of the main funtion
35 |
36 | function C = par_kmeans(DATA,K)
37 | % if gpuDeviceCount
38 | % disp('using GPU for kmeans')
39 | % X = gpuArray(DATA);
40 | % gC = kmeans(X,K,'Replicates',10);
41 | % C = gather(gC);
42 | % else
43 | % disp('using parpool for kmeans')
44 | C = kmeans(DATA,K,'Replicates',5); % ,'Options',statset('UseParallel',1)
45 | % end
46 | end % end of function
47 |
--------------------------------------------------------------------------------
/functions/studyfunc/std_findoutlierclust.m:
--------------------------------------------------------------------------------
1 | % STD_FINDOUTLIERCLUST - determine whether an outlier cluster already exists
2 | % for a specified cluster. If so, return the outlier cluster index.
3 | % If not, return zero. This helper function is called by
4 | % POP_CLUSTEDIT, STD_MOVEOUTLIER, STD_RENAMECLUST.
5 |
6 | % Copyright (C) 2006 UCDS
7 | %
8 | % This file is part of EEGLAB, see http://www.eeglab.org
9 | % for the documentation and details.
10 | %
11 | % Redistribution and use in source and binary forms, with or without
12 | % modification, are permitted provided that the following conditions are met:
13 | %
14 | % 1. Redistributions of source code must retain the above copyright notice,
15 | % this list of conditions and the following disclaimer.
16 | %
17 | % 2. Redistributions in binary form must reproduce the above copyright notice,
18 | % this list of conditions and the following disclaimer in the documentation
19 | % and/or other materials provided with the distribution.
20 | %
21 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 | % THE POSSIBILITY OF SUCH DAMAGE.
32 |
33 | function outlier_clust = std_findoutlierclust(STUDY,clust)
34 | outlier_clust = 0;
35 | outlier_name = [ 'Outliers ' STUDY.cluster(clust).name ' ' ];
36 | for k = 1:length(STUDY.cluster)
37 | if strncmpi(outlier_name,STUDY.cluster(k).name,length(outlier_name))
38 | outlier_clust = k;
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/functions/studyfunc/std_plot.m:
--------------------------------------------------------------------------------
1 | % STD_PLOT - This function is outdated. Use STD_PLOTTF to plot time/
2 | % frequency decompositions and function STD_PLOTCURVE to
3 | % plot erp and spectrum.
4 |
5 | % Copyright (C) 2006 Arnaud Delorme
6 | %
7 | % This file is part of EEGLAB, see http://www.eeglab.org
8 | % for the documentation and details.
9 | %
10 | % Redistribution and use in source and binary forms, with or without
11 | % modification, are permitted provided that the following conditions are met:
12 | %
13 | % 1. Redistributions of source code must retain the above copyright notice,
14 | % this list of conditions and the following disclaimer.
15 | %
16 | % 2. Redistributions in binary form must reproduce the above copyright notice,
17 | % this list of conditions and the following disclaimer in the documentation
18 | % and/or other materials provided with the distribution.
19 | %
20 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 | % THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | function [pgroup, pcond, pinter] = std_plot(allx, data, varargin)
33 |
34 | help std_plot;
35 | return;
36 |
--------------------------------------------------------------------------------
/functions/studyfunc/std_readitc.m:
--------------------------------------------------------------------------------
1 | % STD_READITC - load ITC measures for data channels or
2 | % for all components of a specified cluster.
3 | % Usage:
4 | % >> [STUDY, itcdata, times, freqs] = ...
5 | % std_readitc(STUDY, ALLEEG, varargin);
6 | %
7 | % Note: this function is a helper function that contains a call to the
8 | % std_readersp function that reads all 2-D data matrices for EEGLAB STUDY.
9 | % See the std_readersp help message for more information.
10 | %
11 | % Author: Arnaud Delorme, CERCO, 2006-
12 |
13 | % Copyright (C) Arnaud Delorme, SCCN, INC, UCSD, October 11, 2004, arno@sccn.ucsd.edu
14 | %
15 | % This file is part of EEGLAB, see http://www.eeglab.org
16 | % for the documentation and details.
17 | %
18 | % Redistribution and use in source and binary forms, with or without
19 | % modification, are permitted provided that the following conditions are met:
20 | %
21 | % 1. Redistributions of source code must retain the above copyright notice,
22 | % this list of conditions and the following disclaimer.
23 | %
24 | % 2. Redistributions in binary form must reproduce the above copyright notice,
25 | % this list of conditions and the following disclaimer in the documentation
26 | % and/or other materials provided with the distribution.
27 | %
28 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
32 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
38 | % THE POSSIBILITY OF SUCH DAMAGE.
39 |
40 | function [STUDY, erspdata, alltimes, allfreqs, erspbase] = std_readersp(STUDY, ALLEEG, varargin);
41 |
42 | [STUDY, erspdata, alltimes, allfreqs] = std_readersp(STUDY, ALLEEG, 'infotype','itc', varargin{:});
43 |
--------------------------------------------------------------------------------
/functions/studyfunc/std_uniformsetinds.m:
--------------------------------------------------------------------------------
1 | % STD_UNIFORMSETINDS - Check uniform channel distribution across datasets
2 | %
3 | % Usage:
4 | % >> boolval = std_uniformsetinds(STUDY);
5 | % Inputs:
6 | % STUDY - EEGLAB STUDY
7 | %
8 | % Outputs:
9 | % boolval - [0|1] 1 if uniform
10 | %
11 | % Authors: Arnaud Delorme, SCCN/UCSD, CERCO/CNRS, 2010-
12 |
13 | % Copyright (C) Arnaud Delorme
14 | %
15 | % This file is part of EEGLAB, see http://www.eeglab.org
16 | % for the documentation and details.
17 | %
18 | % Redistribution and use in source and binary forms, with or without
19 | % modification, are permitted provided that the following conditions are met:
20 | %
21 | % 1. Redistributions of source code must retain the above copyright notice,
22 | % this list of conditions and the following disclaimer.
23 | %
24 | % 2. Redistributions in binary form must reproduce the above copyright notice,
25 | % this list of conditions and the following disclaimer in the documentation
26 | % and/or other materials provided with the distribution.
27 | %
28 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
32 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
38 | % THE POSSIBILITY OF SUCH DAMAGE.
39 |
40 | function uniformchannels = std_uniformsetinds( STUDY );
41 |
42 | uniformchannels = 1;
43 | for c = 1:length(STUDY.changrp(1).setinds(:))
44 | tmpind = cellfun(@(x)(length(x{c})), { STUDY.changrp(:).setinds });
45 | if length(unique(tmpind)) ~= 1
46 | uniformchannels = 0;
47 | end
48 | end
49 |
--------------------------------------------------------------------------------
/functions/supportfiles/EEGBIDS:
--------------------------------------------------------------------------------
1 | # Define the folder path
2 | echo
3 | echo "*****************************************"
4 | echo "Please wait while EEG-BIDS is starting..."
5 | echo "*****************************************"
6 | echo
7 |
8 | folder_path="/Applications/MATLAB/MATLAB_Runtime/R2022b/"
9 | script_dir=$(dirname "$0")
10 |
11 | # Check if the folder exists
12 | if [ ! -d "$folder_path" ]; then
13 | # Folder does not exist, show a pop-up window using AppleScript
14 | osascript -e 'tell app "System Events" to display dialog "The folder '"$folder_path"' is not present. You need to install the MATLAB R2022b runtime engine." buttons {"OK"} default button 1'
15 | else
16 | echo "The folder $folder_path exists."
17 | fi
18 |
19 | "$script_dir/run_EEGLAB.sh" $folder_path "bids_exporter;"
20 |
--------------------------------------------------------------------------------
/functions/supportfiles/EEGBIDS.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | echo Please wait while EEG-BIDS is starting...
3 | echo This can take several minutes the first time (pop up window may appear behind this window)...
4 | eeglab "bids_exporter;"
5 |
--------------------------------------------------------------------------------
/functions/supportfiles/EEGLAB_compile_splash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/EEGLAB_compile_splash.jpg
--------------------------------------------------------------------------------
/functions/supportfiles/EEGLAB_verbose:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd "$(dirname "$0")" # this chdir to this script folder, usually not writable if not admin
3 |
4 | # Define the folder path
5 | echo
6 | echo "***************************************************************************"
7 | echo "Please wait while EEGLAB is starting..."
8 | echo "See https://eeglab.org/others/Compiled_EEGLAB.html if you encounter issues"
9 | echo "***************************************************************************"
10 | echo
11 |
12 | folder_path="/Applications/MATLAB/MATLAB_Runtime/R2022b/"
13 | script_dir=$(dirname "$0")
14 |
15 | # Check if the folder exists
16 | if [ ! -d "$folder_path" ]; then
17 | # Folder does not exist, show a pop-up window using AppleScript
18 | osascript -e 'tell app "System Events" to display dialog "The folder '"$folder_path"' is not present. You need to install the MATLAB R2022b runtime engine." buttons {"OK"} default button 1'
19 | else
20 | echo "The folder $folder_path exists."
21 | fi
22 |
23 | "$script_dir/run_EEGLAB.sh" $folder_path
24 |
--------------------------------------------------------------------------------
/functions/supportfiles/EEGLAB_verbose.bat:
--------------------------------------------------------------------------------
1 | eeglab
2 |
--------------------------------------------------------------------------------
/functions/supportfiles/chan_file:
--------------------------------------------------------------------------------
1 | 1 -18 .352 Fp1.
2 | 2 18 .352 Fp2.
3 | 3 -39 .231 F3..
4 | 4 39 .231 F4..
5 | 5 -90 .181 C3..
6 | 6 90 .181 C4..
7 | 7 -90 .500 A1..
8 | 8 90 .500 A2..
9 | 9 -142 .231 P3..
10 | 10 142 .231 P4..
11 | 11 -162 .352 O1..
12 | 12 162 .352 O2..
13 | 13 -54 .352 F7..
14 | 14 54 .352 F8..
15 | 15 -90 .352 T3..
16 | 16 90 .352 T4..
17 | 17 -126 .352 T5..
18 | 18 126 .352 T6..
19 | 19 0 .181 Fz..
20 | 20 0 0 Cz..
21 | 21 180 .181 Pz..
22 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/besa_egi/1ST_README.txt:
--------------------------------------------------------------------------------
1 | If you have BESA, the folder c:\besa\montages\channels
2 | contain a variety of channel location files that can
3 | be imported in EEGLAB.
4 |
5 | See also EGI ftpsite ftp://ftp.egi.com/pub/software/besa/
6 |
7 | Both 3-D spherical ".elp" files and 3-D cartesian ".sfp" files
8 | can be imported in EEGLAB.
9 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/besa_egi/32ch_quikcap.sfp:
--------------------------------------------------------------------------------
1 | FP1 -3.022797 10.470795 7.084885
2 | FP2 2.276825 10.519913 7.147003
3 | F3 -5.633652 5.912506 11.180359
4 | F4 5.379196 5.914627 11.524002
5 | C3 -7.339218 -0.774994 11.782791
6 | C4 6.977783 -1.116196 12.059814
7 | P3 -5.804962 -7.072357 9.087418
8 | P4 5.292053 -7.234375 9.136627
9 | O1 -2.681717 -9.658279 3.634674
10 | O2 2.647095 -9.638092 3.818619
11 | F7 -7.269882 5.574890 5.625870
12 | F8 7.076645 5.823456 5.879044
13 | T7 -8.619843 0.221771 4.454773
14 | T8 8.414825 0.247040 4.476944
15 | P7 -7.177689 -5.466278 3.646164
16 | P8 7.306992 -5.374619 3.843689
17 | CZ -0.743439 -1.409561 15.183792
18 | FZ -0.510071 6.315979 13.461945
19 | PZ -0.371292 -8.086029 11.162399
20 | FCZ -0.647705 2.354965 14.967178
21 | CPZ -0.415268 -5.098053 14.238602
22 | CP3 -6.987549 -4.255463 10.877975
23 | CP4 6.642838 -4.295868 11.109009
24 | FC3 -6.140747 2.453873 14.967041
25 | FC4 6.140747 2.588272 11.988113
26 | TP7 -8.117645 -2.742508 4.016159
27 | TP8 8.194855 -2.698288 4.304276
28 | OZ -0.163513 -9.988556 3.524826
29 | FT7 -8.015945 3.198151 5.242661
30 | FT8 7.801422 3.046738 5.450699
31 | VEOG 3.092224 9.353470 3.887360
32 | HEOG -3.092224 9.353470 3.887360
33 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/besa_egi/EGI65.elp:
--------------------------------------------------------------------------------
1 | EEG E1 99.14 58.71
2 | EEG E2 82.00 69.16
3 | EEG E3 59.72 77.02
4 | EEG E4 41.15 89.79
5 | EEG E5 -26.70 -65.20
6 | EEG E6 97.30 80.89
7 | EEG E7 77.42 89.87
8 | EEG E8 -59.69 -77.33
9 | EEG E9 -46.81 -59.44
10 | EEG E10 109.62 89.86
11 | EEG E11 -97.30 -81.14
12 | EEG E12 -81.99 -69.41
13 | EEG E13 -68.39 -56.19
14 | EEG E14 -99.16 -58.96
15 | EEG E15 -86.40 -44.66
16 | EEG E16 -64.36 -33.03
17 | EEG E17 -41.58 -22.42
18 | EEG E18 -18.87 5.89
19 | EEG E19 -109.15 -31.70
20 | EEG E20 -86.01 -18.26
21 | EEG E21 -66.37 -4.20
22 | EEG E22 -43.58 15.29
23 | EEG E23 -128.70 -8.65
24 | EEG E24 -85.53 10.76
25 | EEG E25 -66.83 20.39
26 | EEG E26 -103.47 29.73
27 | EEG E27 -84.92 36.02
28 | EEG E28 -63.03 42.42
29 | EEG E29 -39.14 55.86
30 | EEG E30 17.62 -89.53
31 | EEG E31 -103.91 51.05
32 | EEG E32 -82.71 58.56
33 | EEG E33 -60.63 67.89
34 | EEG E34 41.03 -89.79
35 | EEG E35 -118.16 62.27
36 | EEG E36 -100.10 72.03
37 | EEG E37 -80.69 79.57
38 | EEG E38 63.70 -89.85
39 | EEG E39 101.34 -89.87
40 | EEG E40 80.70 -79.30
41 | EEG E41 60.68 -67.59
42 | EEG E42 39.27 -55.49
43 | EEG E43 19.15 -5.80
44 | EEG E44 100.09 -71.77
45 | EEG E45 82.73 -58.32
46 | EEG E46 63.13 -42.20
47 | EEG E47 43.79 -15.18
48 | EEG E48 103.87 -50.81
49 | EEG E49 84.94 -35.84
50 | EEG E50 66.95 -20.27
51 | EEG E51 103.41 -29.56
52 | EEG E52 85.55 -10.70
53 | EEG E53 66.50 4.17
54 | EEG E54 41.80 22.24
55 | EEG E55 26.81 64.61
56 | EEG E56 86.04 18.15
57 | EEG E57 64.48 32.84
58 | EEG E58 46.91 59.10
59 | EEG E59 128.51 8.59
60 | EEG E60 109.06 31.51
61 | EEG E61 86.41 44.44
62 | EEG E62 68.45 55.93
63 | EEG E63 138.82 57.90
64 | EEG E64 -138.92 -58.21
65 | REF Cz 8.39 88.98
66 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/besa_egi/msep.elp:
--------------------------------------------------------------------------------
1 | NECK 150 -90
2 | PO7' -90 60
3 | PO8' 90 -60
4 | Pz' 45 -90
5 | P3' -67 60
6 | P4' 67 -60
7 | P7' -90 30
8 | P8' 90 -30
9 | CP5' -67 30
10 | CP6' 67 -30
11 | E11 -45 45
12 | E12 45 -45
13 | CPz' 22 -90
14 | Cz' 0 0
15 | C3' -45 0
16 | C4' 45 0
17 | T7' -90 0
18 | T8' 90 0
19 | C5' -67 0
20 | C6' 67 0
21 | FCz' 22 90
22 | E22 -45 -45
23 | E23 45 45
24 | F3' -67 -60
25 | F4' 67 60
26 | F7' -90 -30
27 | F8' 90 30
28 | AF7' -90 -60
29 | AF8' 90 60
30 | FC5' -67 -30
31 | FC6' 67 30
32 | POz' 67 -90
33 | Fz' 45 90
34 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/1ST_README.txt:
--------------------------------------------------------------------------------
1 | EEGLAB channel location formats are
2 | - ".loc" for polar coordinates
3 | - ".xyz" for 3-D cartesian coordinates
4 | - ".sph" for 3-D spherical coordinates
5 | - ".txt" for all coordinate formats
6 | (see help readlocs under Matlab for a description of these formats)
7 |
8 | Upon reading a file, all coordinate frames are converted into one
9 | another (polar, 3-D spherical, 3-D cartesian). Polar coordinates
10 | can for instance be converted to 3-D spherical (assuming radius one),
11 | then to 3-D cartesian.
12 |
13 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/Standard-10-10-Cap33.ced:
--------------------------------------------------------------------------------
1 | Number labels theta radius X Y Z sph_theta sph_phi sph_radius
2 | 1 Fp1 -18 0.511 0.95 0.309 -0.0349 18 -2 1
3 | 2 Fp2 18 0.511 0.95 -0.309 -0.0349 -18 -2 1
4 | 3 F9 -55 0.639 0.52 0.742 -0.423 55 -25 1
5 | 4 F7 -54 0.511 0.587 0.809 -0.0349 54 -2 1
6 | 5 F3 -39 0.333 0.673 0.545 0.5 39 30 1
7 | 6 Fz 0 0.256 0.719 -0 0.695 -0 44 1
8 | 7 F4 39 0.333 0.673 -0.545 0.5 -39 30 1
9 | 8 F8 54 0.511 0.587 -0.809 -0.0349 -54 -2 1
10 | 9 F10 55 0.639 0.52 -0.742 -0.423 -55 -25 1
11 | 10 FC5 -69 0.394 0.339 0.883 0.326 69 19 1
12 | 11 FC1 -45 0.178 0.375 0.375 0.848 45 58 1
13 | 12 FC2 45 0.178 0.375 -0.375 0.848 -45 58 1
14 | 13 FC6 69 0.394 0.339 -0.883 0.326 -69 19 1
15 | 14 T9 -90 0.639 5.55e-17 0.906 -0.423 90 -25 1
16 | 15 T7 -90 0.511 6.12e-17 0.999 -0.0349 90 -2 1
17 | 16 C3 -90 0.256 4.4e-17 0.719 0.695 90 44 1
18 | 17 Cz 90 0 3.75e-33 -6.12e-17 1 -90 90 1
19 | 18 C4 90 0.256 4.4e-17 -0.719 0.695 -90 44 1
20 | 19 T8 90 0.511 6.12e-17 -0.999 -0.0349 -90 -2 1
21 | 20 T10 90 0.639 5.55e-17 -0.906 -0.423 -90 -25 1
22 | 21 CP5 -111 0.394 -0.339 0.883 0.326 111 19 1
23 | 22 CP1 -135 0.178 -0.375 0.375 0.848 135 58 1
24 | 23 CP2 135 0.178 -0.375 -0.375 0.848 -135 58 1
25 | 24 CP6 111 0.394 -0.339 -0.883 0.326 -111 19 1
26 | 25 P9 -126 0.639 -0.533 0.733 -0.423 126 -25 1
27 | 26 P7 -126 0.511 -0.587 0.809 -0.0349 126 -2 1
28 | 27 P3 -141 0.333 -0.673 0.545 0.5 141 30 1
29 | 28 Pz 180 0.256 -0.719 -8.81e-17 0.695 -180 44 1
30 | 29 P4 141 0.333 -0.673 -0.545 0.5 -141 30 1
31 | 30 P8 126 0.511 -0.587 -0.809 -0.0349 -126 -2 1
32 | 31 P10 126 0.639 -0.533 -0.733 -0.423 -126 -25 1
33 | 32 O1 -162 0.511 -0.95 0.309 -0.0349 162 -2 1
34 | 33 O2 162 0.511 -0.95 -0.309 -0.0349 -162 -2 1
35 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/Standard-10-20-Cap19.ced:
--------------------------------------------------------------------------------
1 | Number labels theta radius X Y Z sph_theta sph_phi sph_radius
2 | 1 Fp1 -18 0.511 0.95 0.309 -0.0349 18 -2 1
3 | 2 Fp2 18 0.511 0.95 -0.309 -0.0349 -18 -2 1
4 | 3 F7 -54 0.511 0.587 0.809 -0.0349 54 -2 1
5 | 4 F3 -39 0.333 0.673 0.545 0.5 39 30 1
6 | 5 Fz 0 0.256 0.719 -0 0.695 -0 44 1
7 | 6 F4 39 0.333 0.673 -0.545 0.5 -39 30 1
8 | 7 F8 54 0.511 0.587 -0.809 -0.0349 -54 -2 1
9 | 8 T7 -90 0.511 6.12e-17 0.999 -0.0349 90 -2 1
10 | 9 C3 -90 0.256 4.4e-17 0.719 0.695 90 44 1
11 | 10 Cz 90 0 3.75e-33 -6.12e-17 1 -90 90 1
12 | 11 C4 90 0.256 4.4e-17 -0.719 0.695 -90 44 1
13 | 12 T8 90 0.511 6.12e-17 -0.999 -0.0349 -90 -2 1
14 | 13 P7 -126 0.511 -0.587 0.809 -0.0349 126 -2 1
15 | 14 P3 -141 0.333 -0.673 0.545 0.5 141 30 1
16 | 15 Pz 180 0.256 -0.719 -8.81e-17 0.695 -180 44 1
17 | 16 P4 141 0.333 -0.673 -0.545 0.5 -141 30 1
18 | 17 P8 126 0.511 -0.587 -0.809 -0.0349 -126 -2 1
19 | 18 O1 -162 0.511 -0.95 0.309 -0.0349 162 -2 1
20 | 19 O2 162 0.511 -0.95 -0.309 -0.0349 -162 -2 1
21 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/Standard-10-20-Cap25.ced:
--------------------------------------------------------------------------------
1 | Number labels theta radius X Y Z sph_theta sph_phi sph_radius
2 | 1 Fp1 -18 0.511 0.95 0.309 -0.0349 18 -2 1
3 | 2 Fp2 18 0.511 0.95 -0.309 -0.0349 -18 -2 1
4 | 3 F9 -55 0.639 0.52 0.742 -0.423 55 -25 1
5 | 4 F7 -54 0.511 0.587 0.809 -0.0349 54 -2 1
6 | 5 F3 -39 0.333 0.673 0.545 0.5 39 30 1
7 | 6 Fz 0 0.256 0.719 -0 0.695 -0 44 1
8 | 7 F4 39 0.333 0.673 -0.545 0.5 -39 30 1
9 | 8 F8 54 0.511 0.587 -0.809 -0.0349 -54 -2 1
10 | 9 F10 55 0.639 0.52 -0.742 -0.423 -55 -25 1
11 | 10 T9 -90 0.639 5.55e-17 0.906 -0.423 90 -25 1
12 | 11 T7 -90 0.511 6.12e-17 0.999 -0.0349 90 -2 1
13 | 12 C3 -90 0.256 4.4e-17 0.719 0.695 90 44 1
14 | 13 Cz 90 0 3.75e-33 -6.12e-17 1 -90 90 1
15 | 14 C4 90 0.256 4.4e-17 -0.719 0.695 -90 44 1
16 | 15 T8 90 0.511 6.12e-17 -0.999 -0.0349 -90 -2 1
17 | 16 T10 90 0.639 5.55e-17 -0.906 -0.423 -90 -25 1
18 | 17 P9 -126 0.639 -0.533 0.733 -0.423 126 -25 1
19 | 18 P7 -126 0.511 -0.587 0.809 -0.0349 126 -2 1
20 | 19 P3 -141 0.333 -0.673 0.545 0.5 141 30 1
21 | 20 Pz 180 0.256 -0.719 -8.81e-17 0.695 -180 44 1
22 | 21 P4 141 0.333 -0.673 -0.545 0.5 -141 30 1
23 | 22 P8 126 0.511 -0.587 -0.809 -0.0349 -126 -2 1
24 | 23 P10 126 0.639 -0.533 -0.733 -0.423 -126 -25 1
25 | 24 O1 -162 0.511 -0.95 0.309 -0.0349 162 -2 1
26 | 25 O2 162 0.511 -0.95 -0.309 -0.0349 -162 -2 1
27 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/chan14_layout.locs:
--------------------------------------------------------------------------------
1 | 1 0 .181 Fz..
2 | 2 0 0 Cz..
3 | 3 180 .181 Pz..
4 | 4 180 .352 Oz..
5 | 5 -39 .231 F3..
6 | 6 39 .231 F4..
7 | 7 -90 .181 C3..
8 | 8 90 .181 C4..
9 | 9 -90 .352 T3..
10 | 10 90 .352 T4..
11 | 11 -142 .231 P3..
12 | 12 142 .231 P4..
13 | 13 0 .352 Fpz.
14 | 14 0 .501 EOG.
15 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/chan31_layout.loc:
--------------------------------------------------------------------------------
1 | 1 -18 0.34074074 FP1.
2 | 2 18 0.34074074 FP2.
3 | 3 -39 0.22222222 F3..
4 | 4 39 0.22222222 F4..
5 | 5 -90 0.17037037 C3..
6 | 6 90 0.17037037 C4..
7 | 7 -141 0.22222222 P3..
8 | 8 141 0.22222222 P4..
9 | 9 -162 0.34074074 O1..
10 | 10 162 0.34074074 O2..
11 | 11 -54 0.34074074 F7..
12 | 12 54 0.34074074 F8..
13 | 13 -90 0.34074074 T3..
14 | 14 90 0.34074074 T4..
15 | 15 -126 0.34074074 T5..
16 | 16 126 0.34074074 T6..
17 | 17 0 0.17037037 FZ..
18 | 18 180 0.17037037 PZ..
19 | 19 -108 0.34074074 T5'.
20 | 20 108 0.34074074 T6'.
21 | 21 -144 0.34074074 O1'.
22 | 22 144 0.34074074 O2'.
23 | 23 -151 0.27407407 P3".
24 | 24 151 0.27407407 P4".
25 | 25 180 0.25555556 PZ".
26 | 26 180 0.34074074 OZ..
27 | 27 180 0.42592593 I...
28 | 28 -162 0.42592593 CB1"
29 | 29 162 0.42592593 CB2"
30 | 30 -144 0.42592593 CB1.
31 | 31 144 0.42592593 CB2.
32 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/chan32_layout.locs:
--------------------------------------------------------------------------------
1 | 1 0 0.46 FPz
2 | 2 10 0.499 EOG1
3 | 3 -33 0.31 F3
4 | 4 0 0.225 Fz
5 | 5 33 0.31 F4
6 | 6 -20 0.499 EOG2
7 | 7 -69 0.36 FC5
8 | 8 -45 0.16 FC1
9 | 9 45 0.16 FC2
10 | 10 69 0.36 FC6
11 | 11 -90 0.46 T7
12 | 12 -90 0.225 C3
13 | 13 90 0.225 C4
14 | 14 90 0 Cz
15 | 15 90 0.46 T8
16 | 16 -111 0.36 CP5
17 | 17 -135 0.15 CP1
18 | 18 135 0.15 CP2
19 | 19 111 0.36 CP6
20 | 20 -126 0.46 P7
21 | 21 -147 0.31 P3
22 | 22 180 0.225 Pz
23 | 23 147 0.31 P4
24 | 24 126 0.46 P8
25 | 25 -144 0.46 PO7
26 | 26 -155 0.37 PO3
27 | 27 180 0.345 POz
28 | 28 155 0.37 PO4
29 | 29 144 0.46 PO8
30 | 30 -162 0.46 O1
31 | 31 180 0.46 Oz
32 | 32 162 0.46 O2
33 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/chan61fms11_layout.loc:
--------------------------------------------------------------------------------
1 | 1 -18 0.415 FP1
2 | 2 0 0.4 FPZ
3 | 3 18 0.415 FP2
4 | 4 -35 0.405 AF7
5 | 5 -22 0.32 AF3
6 | 6 0 0.3 AFz
7 | 7 22 0.32 AF4
8 | 8 35 0.405 AF8
9 | 9 -53.5 0.412 F7
10 | 10 -47 0.338 F5
11 | 11 -38 0.27 F3
12 | 12 -21 0.219 F1
13 | 13 0 0.2 FZ
14 | 14 21 0.219 F2
15 | 15 38 0.27 F4
16 | 16 47 0.338 F6
17 | 17 53.5 0.412 F8
18 | 18 -70 0.4 FT7
19 | 19 -67 0.3 FC5
20 | 20 -59 0.215 FC3
21 | 21 -41 0.138 FC1
22 | 22 0 0.1 FCZ
23 | 23 41 0.138 FC2
24 | 24 59 0.215 FC4
25 | 25 67 0.3 FC6
26 | 26 70 0.4 FT8
27 | 27 -90 0.4 T7
28 | 28 -90 0.3 C5
29 | 29 -90 0.2 C3
30 | 30 -90 0.1 C1
31 | 31 -90 0 Cz
32 | 32 90 0.1 C2
33 | 33 90 0.2 C4
34 | 34 90 0.3 C6
35 | 35 90 0.4 T8
36 | 36 -110 0.4 TP7
37 | 37 -113 0.3 CP5
38 | 38 -121 0.215 CP3
39 | 39 180 0.1 CPz
40 | 40 -139 0.138 CP1
41 | 41 139 0.138 CP2
42 | 42 121 0.215 CP4
43 | 43 113 0.3 CP6
44 | 44 110 0.4 TP8
45 | 45 -126.5 0.412 P7
46 | 46 -133 0.338 P5
47 | 47 -142 0.27 P3
48 | 48 -159 0.219 P1
49 | 49 180 0.2 Pz
50 | 50 159 0.219 P2
51 | 51 142 0.27 P4
52 | 52 133 0.338 P6
53 | 53 126.5 0.412 P8
54 | 54 -145 0.405 PO7
55 | 55 -158 0.32 PO3
56 | 56 180 0.3 POz
57 | 57 158 0.32 PO4
58 | 58 145 0.405 PO8
59 | 59 -162 0.415 O1
60 | 60 180 0.4 Oz
61 | 61 162 0.415 O2
62 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/dummy_electrocap71_layout.locs:
--------------------------------------------------------------------------------
1 | 1 -34.725270 0.788443 LEYE
2 | 2 -34.725270 0.788443 REYE
3 | 3 178.207328 0.368312 OZ..
4 | 4 162.455749 0.376674 O2..
5 | 5 -15.879563 0.425553 FP1.
6 | 6 -2.823417 0.417502 FPZ.
7 | 7 11.870925 0.419950 FP2.
8 | 8 -29.378127 0.430499 AF7.
9 | 9 -26.492388 0.369777 AF3.
10 | 10 -2.623954 0.333075 AFZ.
11 | 11 21.663460 0.354516 AF4.
12 | 12 29.675318 0.419691 AF8.
13 | 13 -52.750119 0.494574 F9..
14 | 14 -47.105645 0.441968 F7..
15 | 15 -43.531582 0.376944 F5..
16 | 16 -38.574506 0.315310 F3..
17 | 17 -23.129951 0.267459 F1..
18 | 18 -3.871021 0.249176 FZ..
19 | 19 16.553199 0.258101 F2..
20 | 20 34.612754 0.286614 F4..
21 | 21 41.807533 0.354569 F6..
22 | 22 47.267805 0.425391 F8..
23 | 23 53.500253 0.484686 F10.
24 | 24 -66.559541 0.517003 FT9.
25 | 25 -64.890370 0.430357 FT7.
26 | 26 -63.136735 0.344081 FC5.
27 | 27 -57.079650 0.258708 FC3.
28 | 28 -40.383096 0.165307 FC1.
29 | 29 3.033533 0.127895 FCZ.
30 | 30 40.680341 0.163266 FC2.
31 | 31 58.408078 0.242792 FC4.
32 | 32 64.627997 0.329499 FC6.
33 | 33 66.582877 0.422641 FT8.
34 | 34 68.805030 0.521319 FT10
35 | 35 -87.140643 0.428948 T7..
36 | 36 -86.986493 0.321930 C5..
37 | 37 -86.767948 0.218632 C3..
38 | 38 -84.106411 0.105210 C1..
39 | 39 27.092627 0.014595 CZ..
40 | 40 79.435908 0.115278 C2..
41 | 41 85.892653 0.214625 C4..
42 | 42 86.654055 0.315149 C6..
43 | 43 87.166427 0.424522 T8..
44 | 44 -109.385041 0.471349 TP9.
45 | 45 -107.805835 0.394177 TP7.
46 | 46 -110.500972 0.308052 CP5.
47 | 47 -116.545549 0.227868 CP3.
48 | 48 -138.401622 0.131027 CP1.
49 | 49 171.967400 0.096081 CPZ.
50 | 50 130.389376 0.148105 CP2.
51 | 51 116.698621 0.226750 CP4.
52 | 52 109.997081 0.320078 CP6.
53 | 53 108.447815 0.408370 TP8.
54 | 54 111.684032 0.485967 TP10
55 | 55 -128.419583 0.389577 P7..
56 | 56 -131.784302 0.321582 P5..
57 | 57 -140.004936 0.253792 P3..
58 | 58 -158.341015 0.212947 P1..
59 | 59 176.354756 0.194046 PZ..
60 | 60 153.763944 0.214862 P2..
61 | 61 136.232553 0.259532 P4..
62 | 62 130.390087 0.329584 P6..
63 | 63 125.426297 0.398099 P8..
64 | 64 -143.335958 0.447516 PO9.
65 | 65 -146.119026 0.376665 PO7.
66 | 66 -154.076096 0.308348 PO3.
67 | 67 178.141661 0.281925 POZ.
68 | 68 150.374396 0.315756 PO4.
69 | 69 143.934638 0.380725 PO8.
70 | 70 142.249040 0.451450 PO10
71 | 71 -165.045704 0.369739 O1..
72 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/dummy_quikcap32_layout.locs:
--------------------------------------------------------------------------------
1 | 1 162.455749 0.376674 O2..
2 | 2 -165.045704 0.369739 O1..
3 | 3 178.207328 0.368312 OZ..
4 | 4 176.354756 0.194046 PZ..
5 | 5 136.232553 0.259532 P4..
6 | 6 116.698621 0.226750 CP4.
7 | 7 125.426297 0.398099 P8..
8 | 8 85.892653 0.214625 C4..
9 | 9 108.447815 0.408370 TP8.
10 | 10 87.166427 0.424522 T8..
11 | 11 -128.419583 0.389577 P7..
12 | 12 -140.004936 0.253792 P3..
13 | 13 -116.545549 0.227868 CP3.
14 | 14 171.967400 0.096081 CPZ.
15 | 15 27.092627 0.014595 CZ..
16 | 16 58.408078 0.242792 FC4.
17 | 17 66.582877 0.422641 FT8.
18 | 18 -107.805835 0.394177 TP7.
19 | 19 -86.767948 0.218632 C3..
20 | 20 3.033533 0.127895 FCZ.
21 | 21 -3.871021 0.249176 FZ..
22 | 22 34.612754 0.286614 F4..
23 | 23 47.267805 0.425391 F8..
24 | 24 -87.140643 0.428948 T7..
25 | 25 -64.890370 0.430357 FT7.
26 | 26 -57.079650 0.258708 FC3.
27 | 27 -38.574506 0.315310 F3..
28 | 28 11.870925 0.419950 FP2.
29 | 29 -47.105645 0.441968 F7..
30 | 30 -15.879563 0.425553 FP1.
31 | 31 34.725270 0.788443 HEOG
32 | 32 -34.725270 0.788443 VEOG
33 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/eeglab/easycap_montage11_layout.loc:
--------------------------------------------------------------------------------
1 | 1 -18 0.415 FP1
2 | 2 0 0.4 FPz
3 | 3 18 0.415 FP2
4 | 4 -35 0.405 AF7
5 | 5 -22 0.32 AF3
6 | 6 0 0.3 AFz
7 | 7 22 0.32 AF4
8 | 8 35 0.405 AF8
9 | 9 -53.5 0.412 F7
10 | 10 -47 0.338 F5
11 | 11 -38 0.27 F3
12 | 12 -21 0.219 F1
13 | 13 0 0.2 Fz
14 | 14 21 0.219 F2
15 | 15 38 0.27 F4
16 | 16 47 0.338 F6
17 | 15 53.5 0.412 F8
18 | 18 -70 0.4 FT7
19 | 19 -67 0.3 FC5
20 | 20 -59 0.215 FC3
21 | 21 -41 0.138 FC1
22 | 22 0 0.1 FCz
23 | 23 41 0.138 FC2
24 | 24 59 0.215 FC4
25 | 25 67 0.3 FC6
26 | 24 70 0.4 FT8
27 | 27 -90 0.4 T7
28 | 28 -90 0.3 C5
29 | 29 -90 0.2 C3
30 | 30 -90 0.1 C1
31 | 31 -90 0 Cz
32 | 32 90 0.1 C2
33 | 33 90 0.2 C4
34 | 34 90 0.3 C6
35 | 35 90 0.4 T8
36 | 36 -110 0.4 TP7
37 | 37 -113 0.3 CP5
38 | 38 -121 0.215 CP3
39 | 39 180 0.1 CPz
40 | 40 -139 0.138 CP1
41 | 41 139 0.138 CP2
42 | 42 121 0.215 CP4
43 | 43 113 0.3 CP6
44 | 44 110 0.4 TP8
45 | 45 -126.5 0.412 P7
46 | 46 -133 0.338 P5
47 | 47 -142 0.27 P3
48 | 48 -159 0.219 P1
49 | 49 180 0.2 Pz
50 | 50 159 0.219 P2
51 | 51 142 0.27 P4
52 | 52 133 0.338 P6
53 | 53 126.5 0.412 P8
54 | 54 -145 0.405 PO7
55 | 55 -158 0.32 PO3
56 | 56 180 0.3 POz
57 | 57 158 0.32 PO4
58 | 58 145 0.405 PO8
59 | 59 -162 0.415 O1
60 | 60 180 0.4 Oz
61 | 61 162 0.415 O2
62 | 62 0 1 HEOG
63 | 63 0 1 VEOG
64 | 64 180 1 Limb
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/neuroscan/1ST_README.txt:
--------------------------------------------------------------------------------
1 | Warning: only ".asc" files can be imported in EEGLAB at present.
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/neuroscan/Arno.ast:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/channel_location_files/neuroscan/Arno.ast
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/neuroscan/NuAmps 40.3DD:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/channel_location_files/neuroscan/NuAmps 40.3DD
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/neuroscan/NuAmps40.DAT:
--------------------------------------------------------------------------------
1 | Nasion -0.12485 8.515992 0
2 | Left -6.426228 0 0
3 | Right 6.426228 0 0
4 | HEOL -5.411962 4.108895 -0.123371
5 | HEOR 5.381735 4.454741 -0.307032
6 | Fp1 -2.802587 9.330921 4.6707
7 | Fp2 2.696228 9.448804 4.677342
8 | VEOU -2.66093 8.523378 1.448107
9 | VEOL -2.593116 6.546016 -2.204167
10 | F7 -5.999841 5.746086 3.140928
11 | F3 -5.116601 6.051271 8.254199
12 | Fz -0.259045 6.631912 10.341355
13 | F4 4.96315 6.190979 8.731788
14 | F8 6.171143 5.454206 3.712217
15 | FT7 -6.828875 2.996554 3.250777
16 | FC3 -6.000988 2.985599 9.005468
17 | FCz -0.248763 3.623693 12.060288
18 | FC4 6.064796 2.80167 9.328594
19 | FT8 6.874833 2.87325 3.780432
20 | T3 -7.055173 0.137488 3.253574
21 | C3 -5.828779 0.415834 10.047568
22 | Cz -0.197171 0.570599 12.841794
23 | C4 5.924782 -0.138374 10.036207
24 | T4 7.144936 0.231845 3.668653
25 | TP7 -7.109682 -3.31025 3.954188
26 | CP3 -5.655722 -2.55958 10.247721
27 | CPz 0.032651 -3.166574 12.64157
28 | CP4 5.464266 -3.334608 10.168788
29 | TP8 6.895125 -2.910123 3.47571
30 | A1 -6.541707 -2.814476 -2.35632
31 | T5 -6.25921 -5.626043 4.19118
32 | P3 -4.886766 -5.594592 9.232394
33 | Pz -0.253571 -6.300022 11.14916
34 | P4 5.164994 -6.004103 8.513229
35 | T6 6.50382 -5.355898 3.701145
36 | A2 6.100113 -2.529696 -2.48468
37 | O1 -2.109576 -9.103417 4.407414
38 | Oz 0.468197 -9.707411 4.186213
39 | O2 2.79836 -9.493185 3.792289
40 | FT9 -6.765418 2.180018 0.902877
41 | FT10 6.568807 2.769748 0.146621
42 | PO1 -1.468091 -8.37479 7.656717
43 | PO2 1.435805 -8.550255 7.522937
44 | Centroid 0 0 0
45 | REF. 6.426228 0 0
46 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/neuroscan/cap128.map:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/channel_location_files/neuroscan/cap128.map
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/neuroscan/cap2_64.map:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/channel_location_files/neuroscan/cap2_64.map
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/neuroscan/cap64.map:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/channel_location_files/neuroscan/cap64.map
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/philips_neuro/0_2AverageNet32_v1.sfp:
--------------------------------------------------------------------------------
1 | FidNz 0.000000 6.838336 -3.009477
2 | FidT9 -6.123542 0.747224 -3.926945
3 | FidT10 6.123542 0.747224 -3.926945
4 | E1 -3.046817 6.721332 0.706841
5 | E2 3.046817 6.721332 0.706841
6 | E3 -3.932690 4.612004 3.483515
7 | E4 3.932690 4.612004 3.483515
8 | E5 -4.517003 0.430296 5.227275
9 | E6 4.517003 0.430296 5.227275
10 | E7 -4.929426 -3.423424 3.943411
11 | E8 4.929426 -3.423424 3.943411
12 | E9 -2.168311 -6.836919 0.364159
13 | E10 2.168311 -6.836919 0.364159
14 | E11 -5.879631 2.823794 0.039586
15 | E12 5.879631 2.823794 0.039586
16 | E13 -6.323692 -0.738761 -0.238111
17 | E14 6.323692 -0.738761 -0.238111
18 | E15 -5.246913 -4.214550 0.207031
19 | E16 5.246913 -4.214550 0.207031
20 | E17 0.000000 6.003403 3.906164
21 | E18 0.000000 7.553496 -1.393847
22 | E19 0.000000 -5.006915 5.260076
23 | E20 0.000000 -7.160241 0.552916
24 | E21 -5.598832 2.488656 -3.640789
25 | E22 5.598832 2.488656 -3.640789
26 | E23 -5.415082 -1.815154 -3.783694
27 | E24 5.415082 -1.815154 -3.783694
28 | E25 -3.513019 -5.270419 -3.553947
29 | E26 3.513019 -5.270419 -3.553947
30 | E27 0.000000 7.430576 1.017840
31 | E28 0.000000 3.274966 6.020099
32 | E29 -3.169021 5.385971 -4.736838
33 | E30 3.169021 5.385971 -4.736838
34 | E31 -4.994067 4.037405 -3.378824
35 | E32 4.994067 4.037405 -3.378824
36 | Cz 0.000000 0.000000 6.956184
37 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/philips_neuro/2_9AverageNet32_v1.sfp:
--------------------------------------------------------------------------------
1 | FidNz 0.000000 7.926657 -4.312593
2 | FidT9 -6.968103 0.443528 -3.787631
3 | FidT10 6.968103 0.443528 -3.787631
4 | E1 -3.332548 8.069517 0.350254
5 | E2 3.332548 8.069517 0.350254
6 | E3 -4.751560 5.337039 3.469044
7 | E4 4.751560 5.337039 3.469044
8 | E5 -5.378257 0.303402 5.652789
9 | E6 5.378257 0.303402 5.652789
10 | E7 -5.480129 -4.186982 4.321821
11 | E8 5.480129 -4.186982 4.321821
12 | E9 -2.238941 -8.066373 0.410356
13 | E10 2.238941 -8.066373 0.410356
14 | E11 -6.569311 3.048704 -0.459669
15 | E12 6.569311 3.048704 -0.459669
16 | E13 -6.993473 -1.604333 -0.674569
17 | E14 6.993473 -1.604333 -0.674569
18 | E15 -5.646270 -5.394131 0.163082
19 | E16 5.646270 -5.394131 0.163082
20 | E17 0.000000 7.223629 4.271071
21 | E18 0.000000 8.314384 -3.253600
22 | E19 0.000000 -6.042277 5.679317
23 | E20 0.000000 -8.356281 0.633193
24 | E21 -6.251114 2.139084 -4.620724
25 | E22 6.251114 2.139084 -4.620724
26 | E23 -5.840476 -2.630069 -4.837502
27 | E24 5.840476 -2.630069 -4.837502
28 | E25 -3.695747 -6.275858 -4.296455
29 | E26 3.695747 -6.275858 -4.296455
30 | E27 0.000000 8.906775 0.484609
31 | E28 0.000000 3.724535 6.886899
32 | E29 -4.771434 4.154577 -6.920240
33 | E30 4.771434 4.154577 -6.920240
34 | E31 -5.958529 3.783707 -4.762794
35 | E32 5.958529 3.783707 -4.762794
36 | Cz 0.000000 0.000000 7.979398
37 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/philips_neuro/9_18AverageNet32_v1.sfp:
--------------------------------------------------------------------------------
1 | FidNz 0.000000 8.693865 -3.872880
2 | FidT9 -7.627040 0.378298 -4.101077
3 | FidT10 7.627040 0.378298 -4.101077
4 | E1 -3.444885 8.466627 0.115020
5 | E2 3.444885 8.466627 0.115020
6 | E3 -5.138550 5.716433 3.445657
7 | E4 5.138550 5.716433 3.445657
8 | E5 -5.912695 0.208920 5.694602
9 | E6 5.912695 0.208920 5.694602
10 | E7 -5.872277 -4.457713 4.249060
11 | E8 5.872277 -4.457713 4.249060
12 | E9 -2.421870 -8.470051 0.079215
13 | E10 2.421870 -8.470051 0.079215
14 | E11 -7.099503 2.893690 -1.036108
15 | E12 7.099503 2.893690 -1.036108
16 | E13 -7.429502 -1.813842 -1.088343
17 | E14 7.429502 -1.813842 -1.088343
18 | E15 -5.970535 -5.554185 -0.339850
19 | E16 5.970535 -5.554185 -0.339850
20 | E17 0.000000 7.845370 4.368780
21 | E18 0.000000 8.893330 -2.795645
22 | E19 0.000000 -6.797045 5.982025
23 | E20 0.000000 -8.667891 0.262205
24 | E21 -6.791807 0.482008 -6.737195
25 | E22 6.791807 0.482008 -6.737195
26 | E23 -6.065513 -2.970895 -5.522557
27 | E24 6.065513 -2.970895 -5.522557
28 | E25 -3.902087 -6.628718 -4.691195
29 | E26 3.902087 -6.628718 -4.691195
30 | E27 0.000000 9.271425 0.198815
31 | E28 0.000000 3.979885 7.154220
32 | E29 -5.153428 3.461888 -8.513168
33 | E30 5.153428 3.461888 -8.513168
34 | E31 -6.412945 2.827507 -5.641603
35 | E32 6.412945 2.827507 -5.641603
36 | Cz 0.000000 0.000000 8.315320
37 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/philips_neuro/AdultAverageNet32_v1.sfp:
--------------------------------------------------------------------------------
1 | FidNz 0.000000 11.331284 -1.453877
2 | FidT9 -7.519939 1.473186 -2.591040
3 | FidT10 7.519939 1.473186 -2.591040
4 | E1 -3.025958 10.157802 2.764800
5 | E2 3.025958 10.157802 2.764800
6 | E3 -4.849240 6.892101 5.558394
7 | E4 4.849240 6.892101 5.558394
8 | E5 -5.899916 0.739714 7.393921
9 | E6 5.899916 0.739714 7.393921
10 | E7 -6.319019 -4.057660 5.683964
11 | E8 6.319019 -4.057660 5.683964
12 | E9 -2.681173 -8.433656 0.938253
13 | E10 2.681173 -8.433656 0.938253
14 | E11 -6.588220 5.241136 0.152379
15 | E12 6.588220 5.241136 0.152379
16 | E13 -7.493498 -0.541125 -0.222036
17 | E14 7.493498 -0.541125 -0.222036
18 | E15 -6.430412 -5.281598 0.674316
19 | E16 6.430412 -5.281598 0.674316
20 | E17 0.000000 8.677280 6.979633
21 | E18 0.000000 10.904202 -0.720131
22 | E19 0.000000 -6.451514 7.596752
23 | E20 0.000000 -8.823216 1.182459
24 | E21 -6.575742 3.983536 -5.785482
25 | E22 6.575742 3.983536 -5.785482
26 | E23 -6.268773 -1.212133 -5.851119
27 | E24 6.268773 -1.212133 -5.851119
28 | E25 -3.487977 -5.920014 -4.802984
29 | E26 3.487977 -5.920014 -4.802984
30 | E27 0.000000 10.873174 3.056107
31 | E28 0.000000 4.562773 9.493018
32 | E29 -4.093812 8.626609 -5.661520
33 | E30 4.093812 8.626609 -5.661520
34 | E31 -6.101149 6.060231 -4.896878
35 | E32 6.101149 6.060231 -4.896878
36 | Cz 0.000000 0.000000 10.265399
37 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/philips_neuro/GSN-HydroCel-32.sfp:
--------------------------------------------------------------------------------
1 | FidNz 0 9.071585155 -2.359754454
2 | FidT9 -6.711765 0.040402876 -3.251600355
3 | FidT10 6.711765 0.040402876 -3.251600355
4 | E1 -2.695405558 8.884820317 1.088308144
5 | E2 2.695405558 8.884820317 1.088308144
6 | E3 -4.459387187 6.021159964 4.365321482
7 | E4 4.459387187 6.021159964 4.365321482
8 | E5 -5.47913021 0.284948655 6.38332782
9 | E6 5.47913021 0.284948655 6.38332782
10 | E7 -5.831241498 -4.494821698 4.955347697
11 | E8 5.831241498 -4.494821698 4.955347697
12 | E9 -2.738838019 -8.607966849 0.239368223
13 | E10 2.738838019 -8.607966849 0.239368223
14 | E11 -6.399087198 4.127248875 -0.356852241
15 | E12 6.399087198 4.127248875 -0.356852241
16 | E13 -7.304625099 -1.866238006 -0.629182006
17 | E14 7.304625099 -1.866238006 -0.629182006
18 | E15 -6.034746843 -5.755782196 0.051843011
19 | E16 6.034746843 -5.755782196 0.051843011
20 | E17 0 7.96264703 5.044718001
21 | E18 0 9.271139705 -2.211516434
22 | E19 0 -6.676694032 6.465208258
23 | E20 0 -8.996686498 0.487952047
24 | E21 -6.518995129 2.417299399 -5.253637073
25 | E22 6.518995129 2.417299399 -5.253637073
26 | E23 -6.174969392 -2.458138877 -5.637380998
27 | E24 6.174969392 -2.458138877 -5.637380998
28 | E25 -3.784983913 -6.401014415 -5.260040689
29 | E26 3.784983913 -6.401014415 -5.260040689
30 | E27 0 9.087440894 1.333345013
31 | E28 0 3.806770224 7.891304964
32 | E29 -3.743504949 6.649204911 -6.530243068
33 | E30 3.743504949 6.649204911 -6.530243068
34 | E31 -6.118458137 4.523870113 -4.409174427
35 | E32 6.118458137 4.523870113 -4.409174427
36 | Cz 0 0 8.899186843
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/philips_neuro/egi64_GSN_HydroCel_v1_0.sfp:
--------------------------------------------------------------------------------
1 | spmnas 1 85 -41
2 | spmlpa -83 -20 -65
3 | spmrpa 83 -20 -65
4 | E1 68.5906 48.6073 -37.5117
5 | E2 46.0261 63.8596 33.7454
6 | E3 34.5545 54.5356 56.0385
7 | E4 1.4443 9.0167 85.5752
8 | E5 31.2079 81.7591 12.4047
9 | E6 -0.2208 63.3768 58.5488
10 | E7 -27.8277 2.1992 81.6885
11 | E8 -0.9099 79.9103 37.2617
12 | E9 -34.5952 52.8992 57.007
13 | E10 -33.7614 80.2216 13.3147
14 | E11 -47.1137 61.6555 35.0499
15 | E12 -53.6017 40.0645 47.9406
16 | E13 -68.5116 35.4908 28.9458
17 | E14 -66.1684 17.0747 48.1362
18 | E15 -55.9907 -2.9176 65.4973
19 | E16 -42.4099 -25.5733 78.2886
20 | E17 -70.914 45.306 -35.5579
21 | E18 -77.4629 24.7888 -11.2772
22 | E19 -81.7076 6.1819 20.1259
23 | E20 -63.988 -32.0669 62.6018
24 | E21 -44.3231 -55.4585 75.8015
25 | E22 -81.2598 -42.4581 39.7354
26 | E23 -82.7074 -4.0013 -54.1566
27 | E24 -86.879 -46.5569 -24.4087
28 | E25 -86.2396 -56.7529 10.8567
29 | E26 -78.7522 -68.0965 30.9721
30 | E27 -76.4574 -85.4182 11.1183
31 | E28 -67.2875 -86.8374 37.6121
32 | E29 -78.1533 -64.7678 -55.864
33 | E30 -70.4258 -93.7599 -23.0039
34 | E31 -46.136 -105.7354 39.5996
35 | E32 -63.4033 -90.0323 -58.4423
36 | E33 -18.4449 -120.283 35.3594
37 | E34 3.6117 -88.9242 74.7464
38 | E35 -29.9259 -127.1785 -26.0962
39 | E36 3.799 -124.5369 27.8486
40 | E37 3.2343 -131.4524 -24.2415
41 | E38 26.018 -119.2308 34.7367
42 | E39 36.0903 -125.6162 -27.0208
43 | E40 53.0974 -103.3871 38.2097
44 | E41 49.9201 -53.2283 74.4815
45 | E42 73.2672 -83.5113 35.6435
46 | E43 66.8555 -86.9498 -60.2667
47 | E44 75.0342 -90.3176 -25.0412
48 | E45 81.6156 -81.6774 8.9043
49 | E46 83.6422 -64.2535 28.6976
50 | E47 80.4598 -61.0143 -58.0855
51 | E48 90.0194 -52.5818 8.388
52 | E49 85.1778 -38.5194 37.4043
53 | E50 68.0795 -28.9415 60.752
54 | E51 46.6652 -23.4654 77.0411
55 | E52 89.1898 -42.3903 -26.8747
56 | E53 58.796 -0.2013 63.8896
57 | E54 30.8859 3.5886 80.8661
58 | E55 82.1795 -0.0993 -56.4659
59 | E56 82.7754 10.0743 17.8221
60 | E57 67.5271 20.2386 46.2637
61 | E58 76.779 28.4389 -13.4375
62 | E59 68.459 38.7322 27.0274
63 | E60 53.8862 42.6081 46.4351
64 | E61 72.4574 39.8592 -61.104
65 | E62 42.8459 68.0927 -82.4673
66 | E63 -47.3866 65.9574 -81.2035
67 | E64 -75.0203 36.3692 -59.0385
68 | E65 2.8165 -23.3292 101.2672
69 | Cz 2.8165 -23.3292 101.2672
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/philips_neuro/egi64_GSN_v1_0.sfp:
--------------------------------------------------------------------------------
1 | spmnas 1 85 -41
2 | spmlpa -83 -20 -65
3 | spmrpa 83 -20 -65
4 | E1 46.8606 78.9276 -6.5954
5 | E2 37.304 75.7964 35.6438
6 | E3 21.6096 56.6606 66.0984
7 | E4 -0.5145 31.9637 82.738
8 | E5 -18.1259 -4.3764 87.2468
9 | E6 1.1439 91.0605 -27.9644
10 | E7 0.5681 93.3886 10.6806
11 | E8 0.0471 82.8412 45.5304
12 | E9 -22.126 56.6665 65.4465
13 | E10 -36.3397 26.1709 72.283
14 | E11 -45.1927 78.9401 -7.9675
15 | E12 -36.9004 75.8065 34.5377
16 | E13 -52.9114 48.0976 43.9995
17 | E14 -67.3488 45.4054 11.2803
18 | E15 -70.4938 17.4539 36.4852
19 | E16 -56.9631 -14.8227 65.9902
20 | E17 -33.539 -42.2035 80.4834
21 | E18 -69.0735 31.5272 -27.5846
22 | E19 -80.1939 3.7704 2.0407
23 | E20 -79.7573 -18.9484 29.8622
24 | E21 -67.1664 -52.4395 57.8125
25 | E22 -72.6864 10.1646 -60.409
26 | E23 -79.6192 -12.9141 -32.9508
27 | E24 -86.1729 -33.8403 0.9913
28 | E25 -82.3604 -54.0371 24.2507
29 | E26 -79.3433 -73.3883 -9.5253
30 | E27 -65.62 -90.6777 31.4284
31 | E28 -40.7116 -87.8804 62.0892
32 | E29 -0.4976 -73.8719 80.6335
33 | E30 -66.0561 -70.5058 -76.8333
34 | E31 -67.9655 -87.4206 -43.7078
35 | E32 -59.8629 -110.4035 -5.2083
36 | E33 -35.4059 -116.1704 29.1424
37 | E34 -0.1224 -110.2171 55.1365
38 | E35 -35.8618 -125.011 -43.878
39 | E36 -22.2994 -135.0631 -7.0329
40 | E37 0.3667 -129.3749 22.1508
41 | E38 1.4408 -132.3752 -49.9242
42 | E39 23.8912 -135.0693 -6.3444
43 | E40 35.9187 -116.1801 30.2056
44 | E41 40.2476 -87.8914 63.296
45 | E42 32.5423 -42.2125 81.4683
46 | E43 38.5486 -125.0211 -42.7689
47 | E44 61.3903 -110.42 -3.4009
48 | E45 66.0581 -90.6956 33.3912
49 | E46 66.8278 -52.4577 59.8097
50 | E47 70.6432 -87.4395 -41.6418
51 | E48 81.0009 -73.4101 -7.1353
52 | E49 83.015 -54.0596 26.7157
53 | E50 69.7267 -70.5243 -74.8094
54 | E51 87.5247 -33.8639 3.5803
55 | E52 80.2554 -18.9701 32.2473
56 | E53 56.3955 -14.8381 67.6798
57 | E54 16.9447 -4.3811 87.7695
58 | E55 81.9914 -12.936 -30.542
59 | E56 81.5273 3.7485 4.4513
60 | E57 70.8085 17.4347 38.5913
61 | E58 35.6049 26.1611 73.3554
62 | E59 75.8865 10.1444 -58.1944
63 | E60 71.3025 31.5081 -25.4922
64 | E61 68.4239 45.387 13.3041
65 | E62 53.0183 48.0832 45.5784
66 | E63 44.8303 66.7561 -71.7549
67 | E64 -41.2244 66.7678 -73.0376
68 | E65 2.8165 -23.3292 101.2672
69 | Cz 2.8165 -23.3292 101.2672
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/philips_neuro/egi64_GSN_v2_0.sfp:
--------------------------------------------------------------------------------
1 | spmnas 1 85 -41
2 | spmlpa -83 -20 -65
3 | spmrpa 83 -20 -65
4 | E1 55.3459 70.4967 -6.951
5 | E2 40.2962 74.7109 27.878
6 | E3 23.2854 55.8323 65.5038
7 | E4 2.025 27.0789 83.8932
8 | E5 -17.4443 -3.9658 85.8937
9 | E6 19.0794 93.1408 1.7385
10 | E7 1.535 83.3324 41.08
11 | E8 -19.6453 55.8519 66.0249
12 | E9 -37.0219 24.1791 73.2026
13 | E10 0.7704 91.4233 -22.3104
14 | E11 -16.9481 93.1572 2.1758
15 | E12 -37.5439 74.7465 28.8228
16 | E13 -52.2933 46.8042 45.0351
17 | E14 -53.4382 70.5464 -5.6305
18 | E15 -67.495 43.018 11.0001
19 | E16 -69.6467 13.3724 38.8428
20 | E17 -57.8962 -15.6549 63.9432
21 | E18 -30.7142 -48.4362 78.4877
22 | E19 -72.6453 30.5213 -29.3654
23 | E20 -80.8802 3.7689 0.6584
24 | E21 -81.5758 -24.1637 24.5254
25 | E22 -65.423 -57.055 53.3553
26 | E23 -75.4618 6.0566 -68.1931
27 | E24 -85.4143 -38.2692 -9.5794
28 | E25 -80.5887 -59.5398 16.1157
29 | E26 -79.2786 -58.9127 -44.9053
30 | E27 -75.8265 -76.4809 -18.271
31 | E28 -66.3413 -91.9934 16.7612
32 | E29 -36.5819 -96.0694 53.2265
33 | E30 1.8688 -77.1821 75.4731
34 | E31 -63.39 -90.0695 -56.5428
35 | E32 -54.4058 -110.8195 -22.4274
36 | E33 -34.6122 -118.7477 16.2084
37 | E34 1.5113 -110.1051 47.4013
38 | E35 -48.3546 -94.6965 -89.2098
39 | E36 -34.5593 -118.4169 -59.2149
40 | E37 -19.6623 -130.6042 -23.245
41 | E38 1.0315 -128.1188 8.611
42 | E39 0.1533 -124.1363 -63.9753
43 | E40 20.944 -130.6228 -23.7379
44 | E41 36.8586 -118.7804 15.3409
45 | E42 39.749 -96.1043 52.2999
46 | E43 34.5451 -48.4659 77.6956
47 | E44 34.977 -118.4486 -60.059
48 | E45 55.7176 -110.8698 -23.7641
49 | E46 68.6195 -92.055 15.123
50 | E47 68.6252 -57.1162 51.7281
51 | E48 63.8935 -90.1276 -58.0878
52 | E49 77.2685 -76.5508 -20.1294
53 | E50 82.8808 -59.6144 14.1315
54 | E51 80.0919 -58.9854 -46.8399
55 | E52 87.1039 -38.3479 -11.6735
56 | E53 84.1083 -24.2393 22.5142
57 | E54 61.4004 -15.7093 62.4952
58 | E55 21.5048 -3.9836 85.4209
59 | E56 82.863 3.6942 -1.3292
60 | E57 72.5688 13.3075 37.1165
61 | E58 40.7982 24.1436 72.2579
62 | E59 75.7789 5.9876 -70.0289
63 | E60 73.9302 30.4544 -31.1446
64 | E61 69.7733 42.9554 9.3339
65 | E62 55.4054 46.7551 43.7278
66 | E63 43.1232 70.059 -85.993
67 | E64 -43.1364 70.0984 -84.9459
68 | E65 2.8165 -23.3292 101.2672
69 | Cz 2.8165 -23.3292 101.2672
--------------------------------------------------------------------------------
/functions/supportfiles/channel_location_files/polhemus/1ST_README.txt:
--------------------------------------------------------------------------------
1 | Polhemus files contain digitize coordinates.
2 | These files should not be used as template.
--------------------------------------------------------------------------------
/functions/supportfiles/colin27headmesh.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/colin27headmesh.mat
--------------------------------------------------------------------------------
/functions/supportfiles/colin27headmesh.xyz:
--------------------------------------------------------------------------------
1 | 1 -91.2500 0.0846 -40.0000 NZ
2 | 2 14.9323 -85.0000 -40.0000 LPA
3 | 3 15.0677 85.0000 -40.0000 RPA
4 |
--------------------------------------------------------------------------------
/functions/supportfiles/colin27headmesh_license.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 1993–2009 Louis Collins, McConnell Brain Imaging Centre, Montreal Neurological Institute, McGill University. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies. The authors and McGill University make no representations about the suitability of this software for any purpose. It is provided “as is” without express or implied warranty. The authors are not responsible for any data loss, equipment damage, property loss, or injury to subjects or patients resulting from the use or misuse of this software package.
2 |
3 |
4 |
--------------------------------------------------------------------------------
/functions/supportfiles/head_modelColin27_5003_Standard-10-5-Cap339.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/head_modelColin27_5003_Standard-10-5-Cap339.mat
--------------------------------------------------------------------------------
/functions/supportfiles/ica_linux:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/ica_linux
--------------------------------------------------------------------------------
/functions/supportfiles/mheadnew.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/functions/supportfiles/mheadnew.mat
--------------------------------------------------------------------------------
/functions/supportfiles/mheadnew.transform:
--------------------------------------------------------------------------------
1 | 0 -3 -53.000 -0.200 0 -1.6 1000.0000 1000.0000 1000.0000
2 |
3 | Original file is /data/common1/stern/eeg/jo74/jo74.elp
4 | Nazion, LPA, RPA, REYE, slightly modified manually to appear on mesh
5 |
--------------------------------------------------------------------------------
/functions/timefreqfunc/rspfunc.m:
--------------------------------------------------------------------------------
1 | % RSPFUNC - sub-function used by RSGET
2 | %
3 | % Usage: res = rspfunc(pval, l, rval)
4 | %
5 | % Input:
6 | % pval - p-value to optimize
7 | % l - [l1 l2 l3 l4] l-values for Ramberg-Schmeiser distribution
8 | % rval - expected r-value
9 | %
10 | % Output:
11 | % res - residual
12 | %
13 | % Author: Arnaud Delorme, SCCN, 2003
14 | %
15 | % See also: RSGET
16 | %
17 | % Reference: Ramberg, J.S., Tadikamalla, P.R., Dudewicz E.J., Mykkytka, E.F.
18 | % A probability distribution and its uses in fitting data.
19 | % Technimetrics, 1979, 21: 201-214.
20 |
21 | % Copyright (C) 2003 Arnaud Delorme, SCCN, arno@salk.edu
22 | %
23 | % This file is part of EEGLAB, see http://www.eeglab.org
24 | % for the documentation and details.
25 | %
26 | % Redistribution and use in source and binary forms, with or without
27 | % modification, are permitted provided that the following conditions are met:
28 | %
29 | % 1. Redistributions of source code must retain the above copyright notice,
30 | % this list of conditions and the following disclaimer.
31 | %
32 | % 2. Redistributions in binary form must reproduce the above copyright notice,
33 | % this list of conditions and the following disclaimer in the documentation
34 | % and/or other materials provided with the distribution.
35 | %
36 | % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
37 | % AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38 | % IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
39 | % ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
40 | % LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
41 | % CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
42 | % SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
43 | % INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
44 | % CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
45 | % ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
46 | % THE POSSIBILITY OF SUCH DAMAGE.
47 |
48 | function rp = rspfunc( pval, l, rval);
49 |
50 | % for fiting rp with fminsearch
51 | % -----------------------------
52 | rp = l(1) + (pval.^l(3) - (1-pval).^l(4))/l(2);
53 | rp = abs(rval-rp);
54 |
--------------------------------------------------------------------------------
/sample_data/1ST_README.txt:
--------------------------------------------------------------------------------
1 | This directory contains sample data for EEGLAB.
2 | The sample data file for the tutorial can be obtained from
3 | http://sccn.ucsd.edu/eeglab/download/eeglab_data.set
4 | (this file may not be included in the EEGLAB distribution because of its size).
5 |
--------------------------------------------------------------------------------
/sample_data/eeglab_chan32.locs:
--------------------------------------------------------------------------------
1 | 1 0 0.50669 FPz
2 | 2 23 0.71 EOG1
3 | 3 -39.947 0.34459 F3
4 | 4 0 0.25338 Fz
5 | 5 39.897 0.3445 F4
6 | 6 -43 0.65 EOG2
7 | 7 -69.332 0.40823 FC5
8 | 8 -44.925 0.18118 FC1
9 | 9 44.925 0.18118 FC2
10 | 10 69.332 0.40823 FC6
11 | 11 -90 0.53318 T7
12 | 12 -90 0.26669 C3
13 | 13 90 0.26667 C4
14 | 14 0 0 Cz
15 | 15 90 0.53318 T8
16 | 16 -110.67 0.40823 CP5
17 | 17 -135.07 0.18118 CP1
18 | 18 135.07 0.18118 CP2
19 | 19 110.67 0.40823 CP6
20 | 20 -126.09 0.52808 P7
21 | 21 -140.05 0.34459 P3
22 | 22 180 0.25338 Pz
23 | 23 140.1 0.3445 P4
24 | 24 126.13 0.52807 P8
25 | 25 -144.11 0.52233 PO7
26 | 26 -157.54 0.42113 PO3
27 | 27 180 0.37994 POz
28 | 28 157.54 0.42113 PO4
29 | 29 144.14 0.52231 PO8
30 | 30 -162.07 0.51499 O1
31 | 31 180 0.50669 Oz
32 | 32 162.07 0.51499 O2
33 |
--------------------------------------------------------------------------------
/sample_data/eeglab_data.fdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/eeglab_data.fdt
--------------------------------------------------------------------------------
/sample_data/eeglab_data.set:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/eeglab_data.set
--------------------------------------------------------------------------------
/sample_data/eeglab_data_epochs_ica.fdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/eeglab_data_epochs_ica.fdt
--------------------------------------------------------------------------------
/sample_data/eeglab_data_epochs_ica.set:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/eeglab_data_epochs_ica.set
--------------------------------------------------------------------------------
/sample_data/pnas.flt:
--------------------------------------------------------------------------------
1 | -9.8132702405876546e-03 -1.6564081383952081e-03 9.7893636917227109e-03 1.9453563627893026e-02 2.1761877079657117e-02 1.3318297346893189e-02 -4.8278141361586552e-03 -2.6471677510898992e-02 -4.1709525588446594e-02 -4.0287280150142324e-02 -1.5696917162002055e-02 3.1587852122769593e-02 9.3159120347067512e-02 1.5462064930532377e-01 1.9992195989899980e-01 2.1658703166222329e-01 1.9992195989899980e-01 1.5462064930532377e-01 9.3159120347067512e-02 3.1587852122769593e-02 -1.5696917162002055e-02 -4.0287280150142324e-02 -4.1709525588446594e-02 -2.6471677510898992e-02 -4.8278141361586552e-03 1.3318297346893189e-02 2.1761877079657117e-02 1.9453563627893026e-02 9.7893636917227109e-03 -1.6564081383952081e-03 -9.8132702405876546e-03
2 |
--------------------------------------------------------------------------------
/sample_data/pnas_chan.locs:
--------------------------------------------------------------------------------
1 | 1 10 0.499 EOG1
2 | 2 -33 0.31 F3..
3 | 3 0 0.225 Fz..
4 | 4 33 0.31 F4..
5 | 5 -20 0.499 EOG2
6 | 6 -69 0.36 FC5.
7 | 7 -45 0.16 FC1.
8 | 8 45 0.16 FC2.
9 | 9 69 0.36 FC6.
10 | 10 -90 0.46 T7..
11 | 11 -90 0.225 C3..
12 | 12 90 0.225 C4..
13 | 13 90 0 Cz..
14 | 14 90 0.46 T8..
15 | 15 -111 0.36 CP5.
16 | 16 -135 0.15 CP1.
17 | 17 135 0.15 CP2.
18 | 18 111 0.36 CP6.
19 | 19 -126 0.46 P7..
20 | 20 -147 0.31 P3..
21 | 21 180 0.225 Pz..
22 | 22 147 0.31 P4..
23 | 23 126 0.46 P8..
24 | 24 -144 0.46 PO7.
25 | 25 -155 0.37 PO3.
26 | 26 180 0.345 POz.
27 | 27 155 0.37 PO4.
28 | 28 144 0.46 PO8.
29 | 29 -162 0.46 O1..
30 | 30 180 0.46 Oz..
31 | 31 162 0.46 O2..
32 |
--------------------------------------------------------------------------------
/sample_data/pnas_chan14.locs:
--------------------------------------------------------------------------------
1 | 1 0 .181 Fz..
2 | 2 0 0 Cz..
3 | 3 180 .181 Pz..
4 | 4 180 .352 Oz..
5 | 5 -39 .231 F3..
6 | 6 39 .231 F4..
7 | 7 -90 .181 C3..
8 | 8 90 .181 C4..
9 | 9 -90 .352 T3..
10 | 10 90 .352 T4..
11 | 11 -142 .231 P3..
12 | 12 142 .231 P4..
13 | 13 0 .352 Fpz.
14 | 14 0 .501 EOG.
15 |
--------------------------------------------------------------------------------
/sample_data/test_data/BIDS_test/CHANGES:
--------------------------------------------------------------------------------
1 | test
--------------------------------------------------------------------------------
/sample_data/test_data/BIDS_test/README:
--------------------------------------------------------------------------------
1 | test
--------------------------------------------------------------------------------
/sample_data/test_data/BIDS_test/dataset_description.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "",
3 | "License": "CC0",
4 | "Authors": [""],
5 | "ReferencesAndLinks": [""],
6 | "BIDSVersion": "1.1.1"
7 | }
--------------------------------------------------------------------------------
/sample_data/test_data/BIDS_test/participants.json:
--------------------------------------------------------------------------------
1 | {
2 | "participant_id": {
3 | "Description": "Unique participant label"
4 | },
5 | "Gender": {
6 | "Description": "Participant gender",
7 | "Levels": {
8 | "M": "Male",
9 | "MF": "Female"
10 | }
11 | },
12 | "Age": {
13 | "Description": "Participant age (years)",
14 | "Units": "years"
15 | }
16 | }
--------------------------------------------------------------------------------
/sample_data/test_data/BIDS_test/participants.tsv:
--------------------------------------------------------------------------------
1 | participant_id Gender Age
2 | sub-S1 M 32
3 |
--------------------------------------------------------------------------------
/sample_data/test_data/BIDS_test/sub-S1/ses-01/eeg/sub-S1_ses-01_task-Experiment_run-01_channels.tsv:
--------------------------------------------------------------------------------
1 | name type units
2 | Fp1 EEG microV
3 | AF7 EEG microV
4 | AF3 EEG microV
5 | F1 EEG microV
6 | F3 EEG microV
7 | F5 EEG microV
8 | F7 EEG microV
9 | FT7 EEG microV
10 | FC5 EEG microV
11 | FC3 EEG microV
12 | FC1 EEG microV
13 | C1 EEG microV
14 | C3 EEG microV
15 | C5 EEG microV
16 | T7 EEG microV
17 |
--------------------------------------------------------------------------------
/sample_data/test_data/BIDS_test/sub-S1/ses-01/eeg/sub-S1_ses-01_task-Experiment_run-01_eeg.edf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/BIDS_test/sub-S1/ses-01/eeg/sub-S1_ses-01_task-Experiment_run-01_eeg.edf
--------------------------------------------------------------------------------
/sample_data/test_data/BIDS_test/sub-S1/ses-01/eeg/sub-S1_ses-01_task-Experiment_run-01_eeg.json:
--------------------------------------------------------------------------------
1 | {
2 | "Instructions": "test",
3 | "TaskDescription": "test",
4 | "TaskName": "Experiment",
5 | "EEGChannelCount": 64,
6 | "MiscChannelCount": 11,
7 | "EEGReference": "common",
8 | "RecordingType": "continuous",
9 | "RecordingDuration": 758,
10 | "SamplingFrequency": 32,
11 | "EOGChannelCount": 0,
12 | "ECGChannelCount": 0,
13 | "EMGChannelCount": 0,
14 | "PowerLineFrequency": 0,
15 | "SoftwareFilters": "n/a"
16 | }
--------------------------------------------------------------------------------
/sample_data/test_data/eeglab_data_numerical_events.fdt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/eeglab_data_numerical_events.fdt
--------------------------------------------------------------------------------
/sample_data/test_data/eeglab_data_numerical_events.set:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/eeglab_data_numerical_events.set
--------------------------------------------------------------------------------
/sample_data/test_data/test.bdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/test.bdf
--------------------------------------------------------------------------------
/sample_data/test_data/test.cnt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/test.cnt
--------------------------------------------------------------------------------
/sample_data/test_data/test.edf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/test.edf
--------------------------------------------------------------------------------
/sample_data/test_data/test.xdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/test.xdf
--------------------------------------------------------------------------------
/sample_data/test_data/testbva.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/testbva.dat
--------------------------------------------------------------------------------
/sample_data/test_data/testbva.vhdr:
--------------------------------------------------------------------------------
1 | Brain Vision Data Exchange Header File Version 1.0
2 | ; Data created from history path: BrainVision_Dataformat_01/Raw Data
3 |
4 | [Common Infos]
5 | DataFile=testbva.dat
6 | MarkerFile=testbva.vmrk
7 | DataFormat=BINARY
8 | ; Data orientation: VECTORIZED=ch1,pt1, ch1,pt2..., MULTIPLEXED=ch1,pt1, ch2,pt1 ...
9 | DataOrientation=MULTIPLEXED
10 | DataType=TIMEDOMAIN
11 | NumberOfChannels=32
12 | DataPoints=2112
13 | ; Sampling interval in microseconds if time domain (convert to Hertz:
14 | ; 1000000 / SamplingInterval) or in Hertz if frequency domain:
15 | SamplingInterval=5000
16 |
17 | [Binary Infos]
18 | BinaryFormat=IEEE_FLOAT_32
19 |
20 | [Channel Infos]
21 | ; Each entry: Ch=,,
22 | ; ,=,,
60 | Ch1=1,-92,-72
61 | Ch2=1,92,72
62 | Ch3=1,-60,-51
63 | Ch4=1,60,51
64 | Ch5=1,-46,0
65 | Ch6=1,46,0
66 | Ch7=1,-60,51
67 | Ch8=1,60,-51
68 | Ch9=1,-92,72
69 | Ch10=1,92,-72
70 | Ch11=1,-92,-36
71 | Ch12=1,92,36
72 | Ch13=1,-92,0
73 | Ch14=1,92,0
74 | Ch15=1,-92,36
75 | Ch16=1,92,-36
76 | Ch17=1,46,90
77 | Ch18=1,0,0
78 | Ch19=1,46,-90
79 | Ch20=1,-32,-45
80 | Ch21=1,32,45
81 | Ch22=1,-32,45
82 | Ch23=1,32,-45
83 | Ch24=1,-72,-21
84 | Ch25=1,72,21
85 | Ch26=1,-72,21
86 | Ch27=1,72,-21
87 | Ch28=1,-120,20
88 | Ch29=1,120,-20
89 | Ch30=0,0,0
90 | Ch31=0,0,0
91 | Ch32=0,0,0
92 |
--------------------------------------------------------------------------------
/sample_data/test_data/testbva.vmrk:
--------------------------------------------------------------------------------
1 | Brain Vision Data Exchange Marker File, Version 1.0
2 | ; Data created from history path: BrainVision_Dataformat_01/Raw Data
3 | ; The channel numbers are related to the channels in the exported file.
4 |
5 | [Common Infos]
6 | DataFile=testbva.dat
7 |
8 | [Marker Infos]
9 | ; Each entry: Mk=,,,
10 | ; , ,
11 | ;
12 | ; Fields are delimited by commas, some fields might be omitted (empty).
13 | ; Commas in type or description text are coded as "\1".
14 | Mk1=New Segment,,1,1,0,20030924105038119829
15 | Mk2=Stimulus,S 4,108,1,0
16 | Mk3=Stimulus,S 1,265,1,0
17 | Mk4=Stimulus,S 4,282,1,0
18 | Mk5=Stimulus,S 4,455,1,0
19 | Mk6=Stimulus,S 4,629,1,0
20 | Mk7=Stimulus,S 4,803,1,0
21 | Mk8=Stimulus,S 2,811,1,0
22 | Mk9=Stimulus,S 4,977,1,0
23 | Mk10=Stimulus,S 4,1151,1,0
24 | Mk11=Stimulus,S 4,1325,1,0
25 | Mk12=Stimulus,S 3,1357,1,0
26 | Mk13=Stimulus,S 4,1499,1,0
27 | Mk14=Stimulus,S 4,1673,1,0
28 | Mk15=Stimulus,S 4,1847,1,0
29 | Mk16=Stimulus,S 1,1903,1,0
30 | Mk17=Stimulus,S 4,2021,1,0
31 |
--------------------------------------------------------------------------------
/sample_data/test_data/testmff.mff/Contents/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/testmff.mff/Contents/Info.plist
--------------------------------------------------------------------------------
/sample_data/test_data/testmff.mff/Contents/PkgInfo:
--------------------------------------------------------------------------------
1 | MFFrNETs
--------------------------------------------------------------------------------
/sample_data/test_data/testmff.mff/epochs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0
5 | 1200000
6 | 1
7 | 1
8 |
9 |
10 | 1200000
11 | 2400000
12 | 2
13 | 2
14 |
15 |
--------------------------------------------------------------------------------
/sample_data/test_data/testmff.mff/info.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3
4 | 2015-07-01T16:24:33.641960-07:00
5 |
--------------------------------------------------------------------------------
/sample_data/test_data/testmff.mff/info1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | HydroCel GSN 256 1.0 Average Reference
8 | Average Reference
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sample_data/test_data/testmff.mff/signal1.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sccn/eeglab/1825fbc8a74bd79c91a08ff91c60e182d42d79f5/sample_data/test_data/testmff.mff/signal1.bin
--------------------------------------------------------------------------------
/sample_data/tutorial_eventtable.txt:
--------------------------------------------------------------------------------
1 | Latency Type Position
2 | 1 target 1
3 | 2.3047 response 1
4 | 3 target 2
5 | 4.7707 response 2
6 | 5 target 1
7 | 6.5979 response 1
8 | 7 target 1
9 | 8.4367 response 1
10 | 9 target 2
11 | 10.3136 response 2
12 | 11 target 1
13 | 12.7613 response 1
14 | 13 target 2
15 | 14.6907 response 2
16 | 15 target 2
17 | 16.3534 response 2
18 | 17 target 2
19 | 18.5697 response 2
20 | 19 target 1
21 | 20.6131 response 1
22 | 21 target 2
23 | 22.5991 response 2
24 | 23 target 1
25 | 24.5273 response 1
26 | 25 target 1
27 | 26.4222 response 1
28 | 27 target 1
29 | 28.3912 response 1
30 | 29 target 2
31 | 30.4814 response 2
32 | 31 target 1
33 | 32.5853 response 1
34 | 33 target 1
35 | 34.6527 response 1
36 | 35 target 2
37 | 36.4148 response 2
38 | 37 target 1
39 | 38.4608 response 1
40 | 39 target 2
41 | 40.4373 response 2
42 | 41 target 2
43 | 42.5778 response 2
44 | 43 target 2
45 | 44.6871 response 2
46 | 45 target 1
47 | 46.3559 response 1
48 | 47 target 2
49 | 48.6695 response 2
50 | 49 target 1
51 | 50.7648 response 1
52 | 51 target 1
53 | 52.46 response 1
54 | 53 target 1
55 | 54.7444 response 1
56 | 55 target 2
57 | 56.5685 response 2
58 | 57 target 1
59 | 58.3038 response 1
60 | 59 target 1
61 | 60.5293 response 1
62 | 61 target 2
63 | 62.6455 response 2
64 | 63 target 1
65 | 64.4656 response 1
66 | 65 target 2
67 | 66.7404 response 2
68 | 67 target 2
69 | 68.7532 response 2
70 | 69 target 2
71 | 70.6971 response 2
72 | 71 target 1
73 | 72.6612 response 1
74 | 73 target 2
75 | 74.5186 response 2
76 | 75 target 1
77 | 76.6668 response 1
78 | 77 target 1
79 | 78.3139 response 1
80 | 79 target 1
81 | 80.7384 response 1
82 | 81 target 2
83 | 82.785 response 2
84 | 83 target 1
85 | 84.306 response 1
86 | 85 target 1
87 | 86.3696 response 1
88 | 87 target 2
89 | 88.6319 response 2
90 | 89 target 1
91 | 90.6019 response 1
92 | 91 target 2
93 | 92.6735 response 2
94 | 93 target 2
95 | 94.5582 response 2
96 | 95 target 2
97 | 96.3136 response 2
98 | 97 target 1
99 | 98.6383 response 1
100 | 99 target 2
101 | 100.5575 response 2
102 |
--------------------------------------------------------------------------------
/sample_locs/1ST_README.txt:
--------------------------------------------------------------------------------
1 | This directory contains sample electrode location files for the standard
2 | 10-20 and 10-10 Systems in EEGLAB format. Copy these files,
3 | then delete and/or add channels to match your electrode caps. You may
4 | other standard electrode cap location files at the EEGLAB website.
5 | ".locs" files contain polar coordinates. ".ced" files contain electrode
6 | positions in polar, 3-D cartesian and 3-D spherical coordinate frames.
7 |
8 | These files can also be converted to other formats (e.g., BESA, etc.)
9 | using the EEGLAB channel editor: Under Matlab, move to this directory
10 | (folder) and type
11 |
12 | >> pop_chanedit(readlocs('Standard-10-20-Cap81.ced'));
13 |
14 | Then, in the resulting pop-up window, press the button "Save others"
15 | (Note: You may need to start
16 |
17 | >> eeglab
18 |
19 | first to allow Matlab to find the channel editing function).
20 |
--------------------------------------------------------------------------------
/sample_locs/GSN-HydroCel-32.sfp:
--------------------------------------------------------------------------------
1 | FidNz 0 9.071585155 -2.359754454
2 | FidT9 -6.711765 0.040402876 -3.251600355
3 | FidT10 6.711765 0.040402876 -3.251600355
4 | E1 -2.695405558 8.884820317 1.088308144
5 | E2 2.695405558 8.884820317 1.088308144
6 | E3 -4.459387187 6.021159964 4.365321482
7 | E4 4.459387187 6.021159964 4.365321482
8 | E5 -5.47913021 0.284948655 6.38332782
9 | E6 5.47913021 0.284948655 6.38332782
10 | E7 -5.831241498 -4.494821698 4.955347697
11 | E8 5.831241498 -4.494821698 4.955347697
12 | E9 -2.738838019 -8.607966849 0.239368223
13 | E10 2.738838019 -8.607966849 0.239368223
14 | E11 -6.399087198 4.127248875 -0.356852241
15 | E12 6.399087198 4.127248875 -0.356852241
16 | E13 -7.304625099 -1.866238006 -0.629182006
17 | E14 7.304625099 -1.866238006 -0.629182006
18 | E15 -6.034746843 -5.755782196 0.051843011
19 | E16 6.034746843 -5.755782196 0.051843011
20 | E17 0 7.96264703 5.044718001
21 | E18 0 9.271139705 -2.211516434
22 | E19 0 -6.676694032 6.465208258
23 | E20 0 -8.996686498 0.487952047
24 | E21 -6.518995129 2.417299399 -5.253637073
25 | E22 6.518995129 2.417299399 -5.253637073
26 | E23 -6.174969392 -2.458138877 -5.637380998
27 | E24 6.174969392 -2.458138877 -5.637380998
28 | E25 -3.784983913 -6.401014415 -5.260040689
29 | E26 3.784983913 -6.401014415 -5.260040689
30 | E27 0 9.087440894 1.333345013
31 | E28 0 3.806770224 7.891304964
32 | E29 -3.743504949 6.649204911 -6.530243068
33 | E30 3.743504949 6.649204911 -6.530243068
34 | E31 -6.118458137 4.523870113 -4.409174427
35 | E32 6.118458137 4.523870113 -4.409174427
36 | Cz 0 0 8.899186843
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/sample_locs/Standard-10-10-Cap33.ced:
--------------------------------------------------------------------------------
1 | Number labels theta radius X Y Z sph_theta sph_phi sph_radius
2 | 1 Fp1 -18 0.511 0.95 0.309 -0.0349 18 -2 1
3 | 2 Fp2 18 0.511 0.95 -0.309 -0.0349 -18 -2 1
4 | 3 F9 -55 0.639 0.52 0.742 -0.423 55 -25 1
5 | 4 F7 -54 0.511 0.587 0.809 -0.0349 54 -2 1
6 | 5 F3 -39 0.333 0.673 0.545 0.5 39 30 1
7 | 6 Fz 0 0.256 0.719 -0 0.695 -0 44 1
8 | 7 F4 39 0.333 0.673 -0.545 0.5 -39 30 1
9 | 8 F8 54 0.511 0.587 -0.809 -0.0349 -54 -2 1
10 | 9 F10 55 0.639 0.52 -0.742 -0.423 -55 -25 1
11 | 10 FC5 -69 0.394 0.339 0.883 0.326 69 19 1
12 | 11 FC1 -45 0.178 0.375 0.375 0.848 45 58 1
13 | 12 FC2 45 0.178 0.375 -0.375 0.848 -45 58 1
14 | 13 FC6 69 0.394 0.339 -0.883 0.326 -69 19 1
15 | 14 T9 -90 0.639 5.55e-17 0.906 -0.423 90 -25 1
16 | 15 T7 -90 0.511 6.12e-17 0.999 -0.0349 90 -2 1
17 | 16 C3 -90 0.256 4.4e-17 0.719 0.695 90 44 1
18 | 17 Cz 90 0 3.75e-33 -6.12e-17 1 -90 90 1
19 | 18 C4 90 0.256 4.4e-17 -0.719 0.695 -90 44 1
20 | 19 T8 90 0.511 6.12e-17 -0.999 -0.0349 -90 -2 1
21 | 20 T10 90 0.639 5.55e-17 -0.906 -0.423 -90 -25 1
22 | 21 CP5 -111 0.394 -0.339 0.883 0.326 111 19 1
23 | 22 CP1 -135 0.178 -0.375 0.375 0.848 135 58 1
24 | 23 CP2 135 0.178 -0.375 -0.375 0.848 -135 58 1
25 | 24 CP6 111 0.394 -0.339 -0.883 0.326 -111 19 1
26 | 25 P9 -126 0.639 -0.533 0.733 -0.423 126 -25 1
27 | 26 P7 -126 0.511 -0.587 0.809 -0.0349 126 -2 1
28 | 27 P3 -141 0.333 -0.673 0.545 0.5 141 30 1
29 | 28 Pz 180 0.256 -0.719 -8.81e-17 0.695 -180 44 1
30 | 29 P4 141 0.333 -0.673 -0.545 0.5 -141 30 1
31 | 30 P8 126 0.511 -0.587 -0.809 -0.0349 -126 -2 1
32 | 31 P10 126 0.639 -0.533 -0.733 -0.423 -126 -25 1
33 | 32 O1 -162 0.511 -0.95 0.309 -0.0349 162 -2 1
34 | 33 O2 162 0.511 -0.95 -0.309 -0.0349 -162 -2 1
35 |
--------------------------------------------------------------------------------
/sample_locs/Standard-10-10-Cap33.locs:
--------------------------------------------------------------------------------
1 | 1 -18 0.51111 Fp1
2 | 2 18 0.51111 Fp2
3 | 3 -55 0.63889 F9
4 | 4 -54 0.51111 F7
5 | 5 -39 0.33333 F3
6 | 6 0 0.25556 Fz
7 | 7 39 0.33333 F4
8 | 8 54 0.51111 F8
9 | 9 55 0.63889 F10
10 | 10 -69 0.39444 FC5
11 | 11 -45 0.17778 FC1
12 | 12 45 0.17778 FC2
13 | 13 69 0.39444 FC6
14 | 14 -90 0.63889 T9
15 | 15 -90 0.51111 T7
16 | 16 -90 0.25556 C3
17 | 17 90 0 Cz
18 | 18 90 0.25556 C4
19 | 19 90 0.51111 T8
20 | 20 90 0.63889 T10
21 | 21 -111 0.39444 CP5
22 | 22 -135 0.17778 CP1
23 | 23 135 0.17778 CP2
24 | 24 111 0.39444 CP6
25 | 25 -126 0.63889 P9
26 | 26 -126 0.51111 P7
27 | 27 -141 0.33333 P3
28 | 28 180 0.25556 Pz
29 | 29 141 0.33333 P4
30 | 30 126 0.51111 P8
31 | 31 126 0.63889 P10
32 | 32 -162 0.51111 O1
33 | 33 162 0.51111 O2
34 |
--------------------------------------------------------------------------------
/sample_locs/Standard-10-10-Cap47.locs:
--------------------------------------------------------------------------------
1 | 1 0 0.53644 Fpz
2 | 2 0 0.275 Fz
3 | 3 0 0.00055556 Cz
4 | 4 180 0.27389 Pz
5 | 5 180 0.5355 Oz
6 | 6 180 0.66056 Iz
7 | 7 -18 0.53644 Fp1
8 | 8 18 0.53644 Fp2
9 | 9 -42 0.66111 AF9
10 | 10 -33 0.46978 AF5
11 | 11 -11 0.40778 AF1
12 | 12 11 0.40778 AF2
13 | 13 33 0.46978 AF6
14 | 14 42 0.66111 AF10
15 | 15 -54 0.53628 F7
16 | 16 -39 0.35611 F3
17 | 17 39 0.35611 F4
18 | 18 54 0.53628 F8
19 | 19 -72 0.66111 FT9
20 | 20 -69 0.41889 FC5
21 | 21 -44.9 0.19222 FC1
22 | 22 44.9 0.19222 FC2
23 | 23 69 0.41889 FC6
24 | 24 72 0.66111 FT10
25 | 25 -90 0.536 T7
26 | 26 -89.9 0.27444 C3
27 | 27 89.9 0.27444 C4
28 | 28 90 0.536 T8
29 | 29 -110 0.66056 TP9
30 | 30 -111 0.41833 CP5
31 | 31 -135 0.19167 CP1
32 | 32 135 0.19167 CP2
33 | 33 111 0.41833 CP6
34 | 34 110 0.66056 TP10
35 | 35 -126 0.53572 P7
36 | 36 -141 0.35556 P3
37 | 37 141 0.35556 P4
38 | 38 126 0.53572 P8
39 | 39 -145 0.66056 PO9
40 | 40 -147 0.46894 PO5
41 | 41 -169 0.40667 PO1
42 | 42 169 0.40667 PO2
43 | 43 147 0.46894 PO6
44 | 44 145 0.66056 PO10
45 | 45 -162 0.53556 O1
46 | 46 162 0.53556 O2
47 | 47 0 0.66111 Nz
48 |
--------------------------------------------------------------------------------
/sample_locs/Standard-10-20-Cap19.ced:
--------------------------------------------------------------------------------
1 | Number labels theta radius X Y Z sph_theta sph_phi sph_radius
2 | 1 Fp1 -18 0.511 0.95 0.309 -0.0349 18 -2 1
3 | 2 Fp2 18 0.511 0.95 -0.309 -0.0349 -18 -2 1
4 | 3 F7 -54 0.511 0.587 0.809 -0.0349 54 -2 1
5 | 4 F3 -39 0.333 0.673 0.545 0.5 39 30 1
6 | 5 Fz 0 0.256 0.719 -0 0.695 -0 44 1
7 | 6 F4 39 0.333 0.673 -0.545 0.5 -39 30 1
8 | 7 F8 54 0.511 0.587 -0.809 -0.0349 -54 -2 1
9 | 8 T7 -90 0.511 6.12e-17 0.999 -0.0349 90 -2 1
10 | 9 C3 -90 0.256 4.4e-17 0.719 0.695 90 44 1
11 | 10 Cz 90 0 3.75e-33 -6.12e-17 1 -90 90 1
12 | 11 C4 90 0.256 4.4e-17 -0.719 0.695 -90 44 1
13 | 12 T8 90 0.511 6.12e-17 -0.999 -0.0349 -90 -2 1
14 | 13 P7 -126 0.511 -0.587 0.809 -0.0349 126 -2 1
15 | 14 P3 -141 0.333 -0.673 0.545 0.5 141 30 1
16 | 15 Pz 180 0.256 -0.719 -8.81e-17 0.695 -180 44 1
17 | 16 P4 141 0.333 -0.673 -0.545 0.5 -141 30 1
18 | 17 P8 126 0.511 -0.587 -0.809 -0.0349 -126 -2 1
19 | 18 O1 -162 0.511 -0.95 0.309 -0.0349 162 -2 1
20 | 19 O2 162 0.511 -0.95 -0.309 -0.0349 -162 -2 1
21 |
--------------------------------------------------------------------------------
/sample_locs/Standard-10-20-Cap19.locs:
--------------------------------------------------------------------------------
1 | 1 -18 0.51111 Fp1
2 | 2 18 0.51111 Fp2
3 | 3 -54 0.51111 F7
4 | 4 -39 0.33333 F3
5 | 5 0 0.25556 Fz
6 | 6 39 0.33333 F4
7 | 7 54 0.51111 F8
8 | 8 -90 0.51111 T7
9 | 9 -90 0.25556 C3
10 | 10 90 0 Cz
11 | 11 90 0.25556 C4
12 | 12 90 0.51111 T8
13 | 13 -126 0.51111 P7
14 | 14 -141 0.33333 P3
15 | 15 180 0.25556 Pz
16 | 16 141 0.33333 P4
17 | 17 126 0.51111 P8
18 | 18 -162 0.51111 O1
19 | 19 162 0.51111 O2
20 |
--------------------------------------------------------------------------------
/sample_locs/Standard-10-20-Cap25.ced:
--------------------------------------------------------------------------------
1 | Number labels theta radius X Y Z sph_theta sph_phi sph_radius
2 | 1 Fp1 -18 0.511 0.95 0.309 -0.0349 18 -2 1
3 | 2 Fp2 18 0.511 0.95 -0.309 -0.0349 -18 -2 1
4 | 3 F9 -55 0.639 0.52 0.742 -0.423 55 -25 1
5 | 4 F7 -54 0.511 0.587 0.809 -0.0349 54 -2 1
6 | 5 F3 -39 0.333 0.673 0.545 0.5 39 30 1
7 | 6 Fz 0 0.256 0.719 -0 0.695 -0 44 1
8 | 7 F4 39 0.333 0.673 -0.545 0.5 -39 30 1
9 | 8 F8 54 0.511 0.587 -0.809 -0.0349 -54 -2 1
10 | 9 F10 55 0.639 0.52 -0.742 -0.423 -55 -25 1
11 | 10 T9 -90 0.639 5.55e-17 0.906 -0.423 90 -25 1
12 | 11 T7 -90 0.511 6.12e-17 0.999 -0.0349 90 -2 1
13 | 12 C3 -90 0.256 4.4e-17 0.719 0.695 90 44 1
14 | 13 Cz 90 0 3.75e-33 -6.12e-17 1 -90 90 1
15 | 14 C4 90 0.256 4.4e-17 -0.719 0.695 -90 44 1
16 | 15 T8 90 0.511 6.12e-17 -0.999 -0.0349 -90 -2 1
17 | 16 T10 90 0.639 5.55e-17 -0.906 -0.423 -90 -25 1
18 | 17 P9 -126 0.639 -0.533 0.733 -0.423 126 -25 1
19 | 18 P7 -126 0.511 -0.587 0.809 -0.0349 126 -2 1
20 | 19 P3 -141 0.333 -0.673 0.545 0.5 141 30 1
21 | 20 Pz 180 0.256 -0.719 -8.81e-17 0.695 -180 44 1
22 | 21 P4 141 0.333 -0.673 -0.545 0.5 -141 30 1
23 | 22 P8 126 0.511 -0.587 -0.809 -0.0349 -126 -2 1
24 | 23 P10 126 0.639 -0.533 -0.733 -0.423 -126 -25 1
25 | 24 O1 -162 0.511 -0.95 0.309 -0.0349 162 -2 1
26 | 25 O2 162 0.511 -0.95 -0.309 -0.0349 -162 -2 1
27 |
--------------------------------------------------------------------------------
/sample_locs/Standard-10-20-Cap25.locs:
--------------------------------------------------------------------------------
1 | 1 -18 0.51111 Fp1
2 | 2 18 0.51111 Fp2
3 | 3 -55 0.63889 F9
4 | 4 -54 0.51111 F7
5 | 5 -39 0.33333 F3
6 | 6 0 0.25556 Fz
7 | 7 39 0.33333 F4
8 | 8 54 0.51111 F8
9 | 9 55 0.63889 F10
10 | 10 -90 0.63889 T9
11 | 11 -90 0.51111 T7
12 | 12 -90 0.25556 C3
13 | 13 90 0 Cz
14 | 14 90 0.25556 C4
15 | 15 90 0.51111 T8
16 | 16 90 0.63889 T10
17 | 17 -126 0.63889 P9
18 | 18 -126 0.51111 P7
19 | 19 -141 0.33333 P3
20 | 20 180 0.25556 Pz
21 | 21 141 0.33333 P4
22 | 22 126 0.51111 P8
23 | 23 126 0.63889 P10
24 | 24 -162 0.51111 O1
25 | 25 162 0.51111 O2
26 |
--------------------------------------------------------------------------------