archive-org.com » ORG » C » CHRONUX.ORG

Total: 412

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Description of cohgrampt
    point processes given as times 0003 0004 Usage 0005 0006 C phi S12 S1 S2 t f zerosp confC phistd Cerr cohgrampt data1 data2 movingwin params fscorr 0007 Input 0008 Note units have to be consistent Thus if movingwin is in seconds Fs 0009 has to be in Hz see chronux m for more information 0010 0011 data1 structure array of spike times with dimension trials also accepts 1d array of spike times required 0012 data2 structure array of spike times with dimension trials also accepts 1d array of spike times required 0013 movingwin in the form window winstep required 0014 params structure with fields tapers pad Fs fpass err trialave 0015 optional 0016 tapers precalculated tapers from dpss or in the one of the following 0017 forms 0018 1 A numeric vector TW K where TW is the 0019 time bandwidth product and K is the number of 0020 tapers to be used less than or equal to 0021 2TW 1 0022 2 A numeric vector W T p where W is the 0023 bandwidth T is the duration of the data and p 0024 is an integer such that 2TW p tapers are used In 0025 this form there is no default i e to specify 0026 the bandwidth you have to specify T and p as 0027 well Note that the units of W and T have to be 0028 consistent if W is in Hz T must be in seconds 0029 and vice versa Note that these units must also 0030 be consistent with the units of params Fs W can 0031 be in Hz if and only if params Fs is in Hz 0032 The default is to use form 1 with TW 3 and K 5 0033 Note that T has to be equal to movingwin 1 0034 0035 pad padding factor for the FFT optional can take values 1 0 1 2 0036 1 corresponds to no padding 0 corresponds to padding 0037 to the next highest power of 2 etc 0038 e g For N 500 if PAD 1 we do not pad if PAD 0 we pad the FFT 0039 to 512 points if pad 1 we pad to 1024 points etc 0040 Defaults to 0 0041 Fs sampling frequency optional Default 1 0042 fpass frequency band to be used in the calculation in the form 0043 fmin fmax optional 0044 Default all frequencies between 0 and Fs 2 0045 err error calculation 1 p Theoretical error bars 2 p Jackknife error bars 0046 0 p or 0 no error bars optional Default 0 0047 trialave average over trials when 1 don t average when 0 optional Default 0 0048 fscorr finite size corrections 0 don t use finite size corrections or 0049 1 use finite size corrections optional 0050 available only for spikes Defaults 0 0051 Output 0052 C magnitude of coherency time x frequencies x trials for trialave 0 0053 time x frequency for trialave 1 0054 phi phase

    Original URL path: http://www.chronux.org/Documentation/chronux/spectral_analysis/pointtimes/cohgrampt.html (2015-03-27)
    Open archived version from archive


  • Description of fitted
    values from a locfit object Input arguments fit the locfit fit Author Catherine Loader CROSS REFERENCE INFORMATION This function calls backtr predict Interpolate a fit produced by locfit This function is called by lf censor SOURCE CODE 0001 function y fitted fit 0002 0003 Fitted values from a locfit object 0004 0005 Input arguments 0006 fit the locfit fit 0007 0008 Author Catherine Loader 0009 0010 z predict fit d

    Original URL path: http://www.chronux.org/Documentation/chronux/locfit/m/fitted.html (2015-03-27)
    Open archived version from archive

  • Description of mtspectrumtrigc
    factor for the FFT optional can take values 1 0 1 2 1 corresponds to no padding 0 corresponds to padding to the next highest power of 2 etc e g For N 500 if PAD 1 we do not pad if PAD 0 we pad the FFT to 512 points if pad 1 we pad to 1024 points etc Defaults to 0 Fs sampling frequency optional Default 1 fpass frequency band to be used in the calculation in the form fmin fmax optional Default all frequencies between 0 and Fs 2 err error calculation 1 p Theoretical error bars 2 p Jackknife error bars 0 p or 0 no error bars optional Default 0 trialave average over events when 1 don t average when 0 optional Default 0 Output S triggered spectrum in form frequency x events for trialave 0 or as a function of frequency for trialave 1 f frequencies Serr error bars only for err 1 1 CROSS REFERENCE INFORMATION This function calls createdatamatc Helper function to create an event triggered matrix from univariate mtspectrumc Multi taper spectrum continuous process This function is called by SOURCE CODE 0001 function S f Serr mtspectrumtrigc data E win params 0002 Multi taper event triggered time frequency spectrum continuous process 0003 0004 Usage 0005 0006 S f Serr mtspectrumtrigc data E win params 0007 Input 0008 Note units have to be consistent See chronux m for more information 0009 data single channel required 0010 E event times required 0011 win in the form winl winr i e window around each event 0012 required 0013 Note that units here have 0014 to be consistent with 0015 units of Fs 0016 params structure with fields tapers pad Fs fpass err trialave 0017 optional 0018 tapers precalculated tapers from dpss or in the one of the following 0019 forms 0020 1 A numeric vector TW K where TW is the 0021 time bandwidth product and K is the number of 0022 tapers to be used less than or equal to 0023 2TW 1 0024 2 A numeric vector W T p where W is the 0025 bandwidth T is the duration of the data and p 0026 is an integer such that 2TW p tapers are used In 0027 this form there is no default i e to specify 0028 the bandwidth you have to specify T and p as 0029 well Note that the units of W and T have to be 0030 consistent if W is in Hz T must be in seconds 0031 and vice versa Note that these units must also 0032 be consistent with the units of params Fs W can 0033 be in Hz if and only if params Fs is in Hz 0034 The default is to use form 1 with TW 3 and K 5 0035 0036 pad padding factor for the FFT optional can take values 1 0 1 2 0037 1 corresponds to no padding 0 corresponds to padding 0038 to the next

    Original URL path: http://www.chronux.org/Documentation/chronux/spectral_analysis/continuous/mtspectrumtrigc.html (2015-03-27)
    Open archived version from archive

  • Description of two_group_test_spectrum
    Adz 1 0 for accept reject null hypothesis of equal population 0024 coherences based dz N 0 1 0025 0026 0027 Note all outputs are functions of frequency 0028 0029 References Arvesen Jackkknifing U statistics Annals of Mathematical 0030 Statisitics vol 40 no 6 pg 2076 2100 1969 0031 0032 if nargin 2 error Need four sets of Fourier transforms end 0033 if nargin 4 isempty plt plt n end 0034 0035 Test for matching dimensionalities 0036 0037 m1 size J1 2 number of samples condition 1 0038 m2 size J2 2 number of samples condition 2 0039 dof1 m1 degrees of freedom condition 1 0040 dof2 m2 degrees of freedom condition 2 0041 if nargin 5 isempty f f size J1 1 end 0042 if nargin 3 isempty p p 0 05 end set the default p value 0043 0044 0045 Compute the individual condition spectra coherences 0046 0047 S1 conj J1 J1 spectrum condition 1 0048 S2 conj J2 J2 spectrum condition 2 0049 0050 Sm1 squeeze mean S1 2 mean spectrum condition 1 0051 Sm2 squeeze mean S2 2 mean spectrum condition 2 0052 0053 Compute the statistic dz and the probability of observing the value dz 0054 given an N 0 1 distribution i e under the null hypothesis 0055 0056 bias1 psi dof1 log dof1 bias2 psi dof2 log dof2 bias from Thomson Chave 0057 var1 psi 1 dof1 var2 psi 1 dof2 variance from Thomson Chave 0058 z1 log Sm1 bias1 Bias corrected Fisher z condition 1 0059 z2 log Sm2 bias2 Bias corrected Fisher z condition 2 0060 dz z1 z2 sqrt var1 var2 z statistic 0061 0062 Bug fix 0063 pdz normpdf dz 0 1 probability of observing value dz 0064 pdz 2 normcdf abs dz 0 1 probability of observing value dz 0065 0066 0067 The remaining portion of the program computes Jackknife estimates of the mean mdz and variance vdz of dz 0068 0069 samples1 1 m1 0070 samples2 1 m2 0071 0072 Leave one out of one sample 0073 0074 bias11 psi dof1 1 log dof1 1 var11 psi 1 dof1 1 0075 for i 1 m1 0076 ikeep setdiff samples1 i all samples except i 0077 Sm1 squeeze mean S1 ikeep 2 1 drop mean spectrum data 1 condition 1 0078 z1i i log Sm1 bias11 1 drop bias corrected Fisher z condition 1 0079 dz1i i z1i i z2 sqrt var11 var2 1 drop z statistic condition 1 0080 ps1 i m1 dz m1 1 dz1i i 0081 end 0082 ps1m mean ps1 2 0083 bias21 psi dof2 1 log dof2 1 var21 psi 1 dof2 1 0084 for j 1 m2 0085 jkeep setdiff samples2 j all samples except j 0086 Sm2 squeeze mean S2 jkeep 2 1 drop mean spectrum data 2 condition 2 0087 z2j j log Sm2 bias21 1 drop bias corrected Fisher z condition 2 0088 dz2j j z1 z2j j sqrt var1 var21 1 drop z statistic condition 2 0089 ps2

    Original URL path: http://www.chronux.org/Documentation/chronux/spectral_analysis/statistical_tests/two_group_test_spectrum.html (2015-03-27)
    Open archived version from archive

  • Description of cohmathelper
    S12 confC phierr Cerr cohmathelper J err Nsp 0005 Inputs 0006 J Fourier transforms of data 0007 err 0 p or 0 for no errors 1 p for theoretical confidence level 0008 2 p for Jackknife p p value 0009 Nsp pass the number of spikes in each channel if finite size corrections are desired 0010 0011 Outputs 0012 0013 C coherence 0014 phi phase of coherency 0015 S12 cross spectral matrix 0016 confC confidence level for coherency only for err 1 1 0017 phierr standard deviation for phi note that the routine gives phierr as phierr 1 0018 and phierr 2 in order to incorporate Jackknife eventually 0019 Currently phierr 1 phierr 2 Note that phi 2 phierr 1 and phi 2 0020 phierr 2 will give 95 confidence bands for phi only for err 1 1 0021 Cerr error bars for coherency only for Jackknife estimates only for err 1 2 0022 0023 0024 errtype err 1 0025 trialave 0 0026 nf K Ch size J 0027 clear K 0028 confC zeros Ch Ch 0029 C zeros nf Ch Ch 0030 S12 zeros nf Ch Ch 0031 phi zeros nf Ch Ch 0032 phierr zeros 2 nf Ch Ch 0033 if errtype 2 Cerr zeros 2 nf Ch Ch end 0034 0035 for ch1 1 Ch 0036 J1 squeeze J ch1 0037 C 1 nf ch1 ch1 1 0038 phi 1 nf ch1 ch1 0 0039 if errtype 2 0040 phierr 1 nf ch1 ch1 0 0041 Cerr 1 2 1 nf ch1 ch1 0 0042 elseif errtype 1 0043 phierr 1 2 1 nf ch1 ch1 0 0044 end 0045 s1 squeeze mean conj J1 J1 2 0046 for ch2 1 ch1 1 0047 J2 squeeze J ch2 0048 s12 squeeze mean conj J1 J2 2 0049

    Original URL path: http://www.chronux.org/Documentation/chronux/spectral_analysis/helper/cohmathelper.html (2015-03-27)
    Open archived version from archive

  • Description of ftestc
    SOURCE CODE 0001 function Fval A f sig sd ftestc data params p plt 0002 computes the F statistic for sine wave in locally white noise continuous data 0003 0004 Fval A f sig sd ftestc data params p plt 0005 0006 Inputs 0007 data data in N C i e time x channels trials or a single 0008 vector required 0009 params structure containing parameters params has the 0010 following fields tapers Fs fpass pad 0011 tapers precalculated tapers from dpss or in the one of the following 0012 forms 0013 1 A numeric vector TW K where TW is the 0014 time bandwidth product and K is the number of 0015 tapers to be used less than or equal to 0016 2TW 1 0017 2 A numeric vector W T p where W is the 0018 bandwidth T is the duration of the data and p 0019 is an integer such that 2TW p tapers are used In 0020 this form there is no default i e to specify 0021 the bandwidth you have to specify T and p as 0022 well Note that the units of W and T have to be 0023 consistent if W is in Hz T must be in seconds 0024 and vice versa Note that these units must also 0025 be consistent with the units of params Fs W can 0026 be in Hz if and only if params Fs is in Hz 0027 The default is to use form 1 with TW 3 and K 5 0028 0029 Fs sampling frequency optional Defaults to 1 0030 fpass frequency band to be used in the calculation in the form 0031 fmin fmax optional 0032 Default all frequencies between 0 and Fs 2 0033 pad padding factor for the FFT optional can take values 1 0 1 2 0034 1 corresponds to no padding 0 corresponds to padding 0035 to the next highest power of 2 etc 0036 e g For N 500 if PAD 1 we do not pad if PAD 0 we pad the FFT 0037 to 512 points if pad 1 we pad to 1024 points etc 0038 Defaults to 0 0039 p P value to calculate error bars for optional 0040 Defaults to 0 05 N where N is the number of samples which 0041 corresponds to a false detect probability of approximately 0 05 0042 plt y n for plot and no plot respectively 0043 0044 Outputs 0045 Fval F statistic in frequency x channels trials form 0046 A Line amplitude for X in frequency x channels trials form 0047 f frequencies of evaluation 0048 sig F distribution 1 p confidence level 0049 sd standard deviation of the amplitude C 0050 if nargin 1 error Need data end 0051 if nargin 2 isempty params params end 0052 tapers pad Fs fpass err trialave params getparams params 0053 clear err trialave 0054 data change row to column data 0055 N C size data 0056 if nargin 3 isempty p

    Original URL path: http://www.chronux.org/Documentation/chronux/spectral_analysis/continuous/ftestc.html (2015-03-27)
    Open archived version from archive

  • Description of mtspectrumtrigpb
    g For N 500 if PAD 1 we do not pad if PAD 0 we pad the FFT to 512 points if pad 1 we pad to 1024 points etc Defaults to 0 Fs sampling frequency optional Default 1 fpass frequency band to be used in the calculation in the form fmin fmax optional Default all frequencies between 0 and Fs 2 err error calculation 1 p Theoretical error bars 2 p Jackknife error bars 0 p or 0 no error bars optional Default 0 trialave average over events when 1 don t average when 0 optional Default 0 fscorr finite size corrections 0 don t use finite size corrections or 1 use finite size corrections optional available only for spikes Defaults 0 Output S triggered spectrum in form frequency x events for trialave 0 or as a function of frequency for trialave 1 f frequencies R spike rate Serr error bars only for err 1 1 CROSS REFERENCE INFORMATION This function calls createdatamatpb mtspectrumpb Multi taper spectrum binned point process This function is called by SOURCE CODE 0001 function S f R Serr mtspectrumtrigpb data E win params fscorr 0002 Multi taper event triggered time frequency spectrum binned point process 0003 0004 Usage 0005 0006 S f R Serr mtspectrumtrigpb data E win params fscorr 0007 Input 0008 data single channel data required 0009 E event times required 0010 win in the form winl winr i e window around each event 0011 required 0012 Note that units here have 0013 to be consistent with 0014 units of Fs 0015 params structure with fields tapers pad Fs fpass err trialave 0016 optional 0017 tapers precalculated tapers from dpss or in the one of the following 0018 forms 0019 1 A numeric vector TW K where TW is the 0020 time bandwidth product and K is the number of 0021 tapers to be used less than or equal to 0022 2TW 1 0023 2 A numeric vector W T p where W is the 0024 bandwidth T is the duration of the data and p 0025 is an integer such that 2TW p tapers are used In 0026 this form there is no default i e to specify 0027 the bandwidth you have to specify T and p as 0028 well Note that the units of W and T have to be 0029 consistent if W is in Hz T must be in seconds 0030 and vice versa Note that these units must also 0031 be consistent with the units of params Fs W can 0032 be in Hz if and only if params Fs is in Hz 0033 The default is to use form 1 with TW 3 and K 5 0034 0035 pad padding factor for the FFT optional can take values 1 0 1 2 0036 1 corresponds to no padding 0 corresponds to padding 0037 to the next highest power of 2 etc 0038 e g For N 500 if PAD 1 we do not pad if

    Original URL path: http://www.chronux.org/Documentation/chronux/spectral_analysis/pointbinned/mtspectrumtrigpb.html (2015-03-27)
    Open archived version from archive

  • Description of uispecerr
    This function calls This function is called by SOURCE CODE 0001 function Serrp Serrj uispecerr S J err trialave numsp 0002 Function to compute lower and upper confidence intervals on the spectrum 0003 Usage Serrp Serrj uispecerr S J err trialave numsp 0004 Outputs Serrp Serrp 1 lower confidence level Serrp 2 upper 0005 confidence level similarly for Serrj 0006 0007 Inputs 0008 S spectrum 0009 J tapered fourier transforms 0010 err errtype p errtype 1 asymptotic estimates errchk 2 Jackknife estimates 0011 p p value for error estimates 0012 trialave 0 no averaging over trials channels 0013 1 perform trial averaging 0014 numsp number of spikes in each channel specify only when finite 0015 size correction required and of course only for point 0016 process data 0017 0018 Outputs 0019 Serrp population error estimates Only for err 1 1 0020 Serrj jackknife error estimates Computed only for err 1 2 otherwise 0021 set to zero 0022 if nargin 4 error Need at least 4 input arguments end 0023 if err 1 0 error Need err 1 p or 2 p for error bar calculation Make sure you are not asking for the output of Serr end 0024 nf K C size J 0025 errchk err 1 0026 p err 2 0027 pp 1 p 2 0028 qq 1 pp 0029 0030 if trialave 0031 dim K C 0032 C 1 0033 dof 2 dim 0034 if nargin 5 dof fix 1 1 dof 1 2 sum numsp end 0035 J reshape J nf dim 0036 else 0037 dim K 0038 dof 2 dim ones 1 C 0039 for ch 1 C 0040 if nargin 5 dof ch fix 1 1 dof 1 2 numsp ch end 0041 end 0042 end 0043 Serrp zeros 2 nf C 0044 Serrj zeros

    Original URL path: http://www.chronux.org/Documentation/chronux/test/uispecerr.html (2015-03-27)
    Open archived version from archive



  •