plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | jtyuan/deblur-master | mkGaussian.m | .m | deblur-master/denoise/matlabPyrTools/mkGaussian.m | 1,565 | utf_8 | 1f55e73fbc9155a38607b0667da2d7f3 | % IM = mkGaussian(SIZE, COVARIANCE, MEAN, AMPLITUDE)
%
% Compute a matrix with dimensions SIZE (a [Y X] 2-vector, or a
% scalar) containing a Gaussian function, centered at pixel position
% specified by MEAN (default = (size+1)/2), with given COVARIANCE (can
% be a scalar, 2-vector, or 2x2 matrix. Default = (min(size... |
github | jtyuan/deblur-master | factorial.m | .m | deblur-master/denoise/matlabPyrTools/factorial.m | 273 | utf_8 | 370971eae7a2351704973c452848d194 | %% RES = factorial(NUM)
%
% Factorial function that works on matrices (matlab's does not).
% EPS, 11/02
function res = factorial(num)
res = ones(size(num));
ind = find(num > 0);
if ( ~isempty(ind) )
subNum = num(ind);
res(ind) = subNum .* factorial(subNum-1);
end
|
github | jtyuan/deblur-master | entropy2.m | .m | deblur-master/denoise/matlabPyrTools/entropy2.m | 693 | utf_8 | c637630f7ac8912e5cb30f67551aece7 | % E = ENTROPY2(MTX,BINSIZE)
%
% Compute the first-order sample entropy of MTX. Samples of VEC are
% first discretized. Optional argument BINSIZE controls the
% discretization, and defaults to 256/(max(VEC)-min(VEC)).
%
% NOTE: This is a heavily biased estimate of entropy (it is too
% small) when you don't have much... |
github | jtyuan/deblur-master | buildSFpyr.m | .m | deblur-master/denoise/matlabPyrTools/buildSFpyr.m | 3,256 | utf_8 | 84c0a17ac90df74f317c29833c54ffa3 | % [PYR, INDICES, STEERMTX, HARMONICS] = buildSFpyr(IM, HEIGHT, ORDER, TWIDTH)
%
% Construct a steerable pyramid on matrix IM, in the Fourier domain.
% This is similar to buildSpyr, except that:
%
% + Reconstruction is exact (within floating point errors)
% + It can produce any number of orientation bands.
% - ... |
github | jtyuan/deblur-master | spyrLev.m | .m | deblur-master/denoise/matlabPyrTools/spyrLev.m | 668 | utf_8 | 8d25ccc2790a62ab21a20cc3d0772706 | % [LEV,IND] = spyrLev(PYR,INDICES,LEVEL)
%
% Access a level from a steerable pyramid.
% Return as an SxB matrix, B = number of bands, S = total size of a band.
% Also returns an Bx2 matrix containing dimensions of the subbands.
% Eero Simoncelli, 6/96.
function [lev,ind] = spyrLev(pyr,pind,level)
nbands = spyrNumBa... |
github | jtyuan/deblur-master | pgmWrite.m | .m | deblur-master/denoise/matlabPyrTools/pgmWrite.m | 3,119 | utf_8 | 6425008296069df51c5c30ee1c011850 | % RANGE = pgmWrite(MTX, FILENAME, RANGE, TYPE, COMMENT)
%
% Write a MatLab matrix to a pgm (graylevel image) file.
% This format is accessible from the XV image browsing utility.
%
% RANGE (optional) is a 2-vector specifying the values that map to
% black and white, respectively. Passing a value of 'auto' (default)
% ... |
github | jtyuan/deblur-master | modulateFlip.m | .m | deblur-master/denoise/matlabPyrTools/modulateFlip.m | 461 | utf_8 | 92f12f8068fcf49b9863851f106a5aa3 | % [HFILT] = modulateFlipShift(LFILT)
%
% QMF/Wavelet highpass filter construction: modulate by (-1)^n,
% reverse order (and shift by one, which is handled by the convolution
% routines). This is an extension of the original definition of QMF's
% (e.g., see Simoncelli90).
% Eero Simoncelli, 7/96.
function [hfilt] = m... |
github | jtyuan/deblur-master | mkFract.m | .m | deblur-master/denoise/matlabPyrTools/mkFract.m | 843 | utf_8 | f0d97e35133978ade3a5fe34dea5d08a | % IM = mkFract(SIZE, FRACT_DIM)
%
% Make a matrix of dimensions SIZE (a [Y X] 2-vector, or a scalar)
% containing fractal (pink) noise with power spectral density of the
% form: 1/f^(5-2*FRACT_DIM). Image variance is normalized to 1.0.
% FRACT_DIM defaults to 1.0
% Eero Simoncelli, 6/96.
%% TODO: Verify that this m... |
github | jtyuan/deblur-master | mkSquare.m | .m | deblur-master/denoise/matlabPyrTools/mkSquare.m | 2,344 | utf_8 | 7d9553e391552cd91cdd6d81348404e2 | % IM = mkSquare(SIZE, PERIOD, DIRECTION, AMPLITUDE, PHASE, ORIGIN, TWIDTH)
% or
% IM = mkSine(SIZE, FREQ, AMPLITUDE, PHASE, ORIGIN, TWIDTH)
%
% Compute a matrix of dimension SIZE (a [Y X] 2-vector, or a scalar)
% containing samples of a 2D square wave, with given PERIOD (in
% pixels), DIRECTION (radians, CW from ... |
github | jtyuan/deblur-master | spyrNumBands.m | .m | deblur-master/denoise/matlabPyrTools/spyrNumBands.m | 480 | utf_8 | 4a10cb68438c7dfc197ec00066f48fd4 | % [NBANDS] = spyrNumBands(INDICES)
%
% Compute number of orientation bands in a steerable pyramid with
% given index matrix. If the pyramid contains only the highpass and
% lowpass bands (i.e., zero levels), returns 0.
% Eero Simoncelli, 2/97.
function [nbands] = spyrNumBands(pind)
if (size(pind,1) == 2)
nbands ... |
github | jtyuan/deblur-master | reconSpyr.m | .m | deblur-master/denoise/matlabPyrTools/reconSpyr.m | 2,671 | utf_8 | ea9e71a5f8a76eadbe8c1a2472d89344 | % RES = reconSpyr(PYR, INDICES, FILTFILE, EDGES, LEVS, BANDS)
%
% Reconstruct image from its steerable pyramid representation, as created
% by buildSpyr.
%
% PYR is a vector containing the N pyramid subbands, ordered from fine
% to coarse. INDICES is an Nx2 matrix containing the sizes of
% each subband. This is compa... |
github | jtyuan/deblur-master | buildWpyr.m | .m | deblur-master/denoise/Simoncelli_PyrTools/buildWpyr.m | 2,705 | utf_8 | 1c4ff4ecab086742bb93ea70f1e9e015 | % [PYR, INDICES] = buildWpyr(IM, HEIGHT, FILT, EDGES)
%
% Construct a separable orthonormal QMF/wavelet pyramid on matrix (or vector) IM.
%
% HEIGHT (optional) specifies the number of pyramid levels to build. Default
% is maxPyrHt(IM,FILT). You can also specify 'auto' to use this value.
%
% FILT (optional) can ... |
github | jtyuan/deblur-master | pyrBand.m | .m | deblur-master/denoise/Simoncelli_PyrTools/pyrBand.m | 406 | utf_8 | 0cad3c43324c84276383d06f6f6a5b60 | % RES = pyrBand(PYR, INDICES, BAND_NUM)
%
% Access a subband from a pyramid (gaussian, laplacian, QMF/wavelet,
% or steerable). Subbands are numbered consecutively, from finest
% (highest spatial frequency) to coarsest (lowest spatial frequency).
% Eero Simoncelli, 6/96.
function res = pyrBand(pyr, pind, b... |
github | jtyuan/deblur-master | buildFullSFpyr2.m | .m | deblur-master/denoise/Simoncelli_PyrTools/buildFullSFpyr2.m | 3,031 | utf_8 | 4a1191e10f08e0d219040bdc7864a575 | % [PYR, INDICES, STEERMTX, HARMONICS] = buildFullSFpyr2(IM, HEIGHT, ORDER, TWIDTH)
%
% Construct a steerable pyramid on matrix IM, in the Fourier domain.
% Unlike the standard transform, subdivides the highpass band into
% orientations.
function [pyr,pind,steermtx,harmonics] = buildFullSFpyr2(im, ht, order, twidth)
%... |
github | jtyuan/deblur-master | var2.m | .m | deblur-master/denoise/Simoncelli_PyrTools/var2.m | 393 | utf_8 | 46f01727b1895ebb42fea033f942c562 | % V = VAR2(MTX,MEAN)
%
% Sample variance of a matrix.
% Passing MEAN (optional) makes the calculation faster.
function res = var2(mtx, mn)
if (exist('mn') ~= 1)
mn = mean2(mtx);
end
if (isreal(mtx))
res = sum(sum(abs(mtx-mn).^2)) / (prod(size(mtx)) - 1);
else
res = sum(sum(real(mtx-mn).^2)) + i... |
github | jtyuan/deblur-master | reconSFpyrLevs.m | .m | deblur-master/denoise/Simoncelli_PyrTools/reconSFpyrLevs.m | 2,013 | utf_8 | bff5aabf51101f5a06bf4a3a59d0de00 | % RESDFT = reconSFpyrLevs(PYR,INDICES,LOGRAD,XRCOS,YRCOS,ANGLE,NBANDS,LEVS,BANDS)
%
% Recursive function for reconstructing levels of a steerable pyramid
% representation. This is called by reconSFpyr, and is not usually
% called directly.
% Eero Simoncelli, 5/97.
function resdft = reconSFpyrLevs(pyr,pind,lo... |
github | jtyuan/deblur-master | rcosFn.m | .m | deblur-master/denoise/Simoncelli_PyrTools/rcosFn.m | 1,167 | utf_8 | e668c06ae18191dea3d63f2c3035cdcb | % [X, Y] = rcosFn(WIDTH, POSITION, VALUES)
%
% Return a lookup table (suitable for use by INTERP1)
% containing a "raised cosine" soft threshold function:
%
% Y = VALUES(1) + (VALUES(2)-VALUES(1)) *
% cos^2( PI/2 * (X - POSITION + WIDTH)/WIDTH )
%
% WIDTH is the width of the region over which... |
github | jtyuan/deblur-master | vector.m | .m | deblur-master/denoise/Simoncelli_PyrTools/vector.m | 240 | utf_8 | 99db83250fc29065ecdb3bff900669d3 | % [VEC] = vector(MTX)
%
% Pack elements of MTX into a column vector. Same as VEC = MTX(:)
% Previously named "vectorize" (changed to avoid overlap with Matlab's
% "vectorize" function).
function vec = vector(mtx)
vec = mtx(:);
|
github | jtyuan/deblur-master | showIm.m | .m | deblur-master/denoise/Simoncelli_PyrTools/showIm.m | 6,332 | utf_8 | fc722445cecdb4685413ce683c5c414f | % RANGE = showIm (MATRIX, RANGE, ZOOM, LABEL, NSHADES )
%
% Display a MatLab MATRIX as a grayscale image in the current figure,
% inside the current axes. If MATRIX is complex, the real and imaginary
% parts are shown side-by-side, with the same grayscale mapping.
%
% If MATRIX is a string, it should be the n... |
github | jtyuan/deblur-master | upConv.m | .m | deblur-master/denoise/Simoncelli_PyrTools/upConv.m | 2,750 | utf_8 | c396c00dd8d50ee2a930427fead849be | % RES = upConv(IM, FILT, EDGES, STEP, START, STOP, RES)
%
% Upsample matrix IM, followed by convolution with matrix FILT. These
% arguments should be 1D or 2D matrices, and IM must be larger (in
% both dimensions) than FILT. The origin of filt
% is assumed to be floor(size(filt)/2)+1.
%
% EDGES is a string det... |
github | jtyuan/deblur-master | range2.m | .m | deblur-master/denoise/Simoncelli_PyrTools/range2.m | 477 | utf_8 | 4b8ed3c6da04efbf2862f0b36b91d524 | % [MIN, MAX] = range2(MTX)
%
% Compute minimum and maximum values of MTX, returning them as a 2-vector.
% Eero Simoncelli, 3/97.
function [mn, mx] = range2(mtx)
%% NOTE: THIS CODE IS NOT ACTUALLY USED! (MEX FILE IS CALLED INSTEAD)
fprintf(1,'WARNING: You should compile the MEX code for "range2", found in ... |
github | jtyuan/deblur-master | reconFullSFpyr2.m | .m | deblur-master/denoise/Simoncelli_PyrTools/reconFullSFpyr2.m | 3,257 | utf_8 | 447f5204894b159fbb4ea4de2dccf877 | % RES = reconFullSFpyr2(PYR, INDICES, LEVS, BANDS, TWIDTH)
%
% Reconstruct image from its steerable pyramid representation, in the Fourier
% domain, as created by buildSFpyr.
% Unlike the standard transform, subdivides the highpass band into
% orientations.
function res = reconFullSFpyr2(pyr, pind, levs, bands, twidt... |
github | jtyuan/deblur-master | steer2HarmMtx.m | .m | deblur-master/denoise/Simoncelli_PyrTools/steer2HarmMtx.m | 1,874 | utf_8 | 8efc390a04b19bdec63526c7bbd1407e | % MTX = steer2HarmMtx(HARMONICS, ANGLES, REL_PHASES)
%
% Compute a steering matrix (maps a directional basis set onto the
% angular Fourier harmonics). HARMONICS is a vector specifying the
% angular harmonics contained in the steerable basis/filters. ANGLES
% (optional) is a vector specifying the angular positi... |
github | jtyuan/deblur-master | subMtx.m | .m | deblur-master/denoise/Simoncelli_PyrTools/subMtx.m | 441 | utf_8 | 18fe3fa6f65d3fbc8cd38682559c3619 | % MTX = subMtx(VEC, DIMENSIONS, START_INDEX)
%
% Reshape a portion of VEC starting from START_INDEX (optional,
% default=1) to the given dimensions.
% Eero Simoncelli, 6/96.
function mtx = subMtx(vec, sz, offset)
if (exist('offset') ~= 1)
offset = 1;
end
vec = vec(:);
sz = sz(:);
if (size(sz,1) ... |
github | jtyuan/deblur-master | spyrHt.m | .m | deblur-master/denoise/Simoncelli_PyrTools/spyrHt.m | 321 | utf_8 | acae1ee5a657f2e4d75b2e60e954a515 | % [HEIGHT] = spyrHt(INDICES)
%
% Compute height of steerable pyramid with given index matrix.
% Eero Simoncelli, 6/96.
function [ht] = spyrHt(pind)
nbands = spyrNumBands(pind);
% Don't count lowpass, or highpass residual bands
if (size(pind,1) > 2)
ht = (size(pind,1)-2)/nbands;
else
ht = 0;
end
... |
github | jtyuan/deblur-master | spyrBand.m | .m | deblur-master/denoise/Simoncelli_PyrTools/spyrBand.m | 853 | utf_8 | 24b93860a4de0346982a44edcb390ab5 | % [LEV,IND] = spyrBand(PYR,INDICES,LEVEL,BAND)
%
% Access a band from a steerable pyramid.
%
% LEVEL indicates the scale (finest = 1, coarsest = spyrHt(INDICES)).
%
% BAND (optional, default=1) indicates which subband
% (1 = vertical, rest proceeding anti-clockwise).
% Eero Simoncelli, 6/96.
fun... |
github | jtyuan/deblur-master | wpyrBand.m | .m | deblur-master/denoise/Simoncelli_PyrTools/wpyrBand.m | 912 | utf_8 | ec3f9e1a26cc9775110888b67417876a | % RES = wpyrBand(PYR, INDICES, LEVEL, BAND)
%
% Access a subband from a separable QMF/wavelet pyramid.
%
% LEVEL (optional, default=1) indicates the scale (finest = 1,
% coarsest = wpyrHt(INDICES)).
%
% BAND (optional, default=1) indicates which subband (1=horizontal,
% 2=vertical, 3=diagonal).
% Eero ... |
github | jtyuan/deblur-master | innerProd.m | .m | deblur-master/denoise/Simoncelli_PyrTools/innerProd.m | 415 | utf_8 | e759ef690a2e4eadf5f81e0b8282888f | % RES = innerProd(MTX)
%
% Compute (MTX' * MTX) efficiently (i.e., without copying the matrix)
function res = innerProd(mtx)
%% NOTE: THIS CODE SHOULD NOT BE USED! (MEX FILE IS CALLED INSTEAD)
fprintf(1,'WARNING: You should compile the MEX version of "innerProd.c",\n found in the MEX subdirectory of ... |
github | jtyuan/deblur-master | reconSFpyr.m | .m | deblur-master/denoise/Simoncelli_PyrTools/reconSFpyr.m | 3,141 | utf_8 | bb26483e3afdf1b4b46da4b35efaec7b | % RES = reconSFpyr(PYR, INDICES, LEVS, BANDS, TWIDTH)
%
% Reconstruct image from its steerable pyramid representation, in the Fourier
% domain, as created by buildSFpyr.
%
% PYR is a vector containing the N pyramid subbands, ordered from fine
% to coarse. INDICES is an Nx2 matrix containing the sizes of
% each ... |
github | jtyuan/deblur-master | corrDn.m | .m | deblur-master/denoise/Simoncelli_PyrTools/corrDn.m | 2,195 | utf_8 | 61533e2b3b4b039c523120d2ec1363aa | % RES = corrDn(IM, FILT, EDGES, STEP, START, STOP)
%
% Compute correlation of matrices IM with FILT, followed by
% downsampling. These arguments should be 1D or 2D matrices, and IM
% must be larger (in both dimensions) than FILT. The origin of filt
% is assumed to be floor(size(filt)/2)+1.
%
% EDGES is a stri... |
github | jtyuan/deblur-master | maxPyrHt.m | .m | deblur-master/denoise/Simoncelli_PyrTools/maxPyrHt.m | 628 | utf_8 | 00ee02d58475fcdf592ef59a15fa0af3 | % HEIGHT = maxPyrHt(IMSIZE, FILTSIZE)
%
% Compute maximum pyramid height for given image and filter sizes.
% Specifically: the number of corrDn operations that can be sequentially
% performed when subsampling by a factor of 2.
% Eero Simoncelli, 6/96.
function height = maxPyrHt(imsz, filtsz)
imsz = imsz(:)... |
github | jtyuan/deblur-master | buildSFpyrLevs.m | .m | deblur-master/denoise/Simoncelli_PyrTools/buildSFpyrLevs.m | 1,887 | utf_8 | e58fd43a3b9e8101ef5ada17c5116eed | % [PYR, INDICES] = buildSFpyrLevs(LODFT, LOGRAD, XRCOS, YRCOS, ANGLE, HEIGHT, NBANDS)
%
% Recursive function for constructing levels of a steerable pyramid. This
% is called by buildSFpyr, and is not usually called directly.
% Eero Simoncelli, 5/97.
function [pyr,pind] = buildSFpyrLevs(lodft,log_rad,Xrcos,Yrc... |
github | jtyuan/deblur-master | pixelAxes.m | .m | deblur-master/denoise/Simoncelli_PyrTools/pixelAxes.m | 2,053 | utf_8 | 177c4d9d58d2280676a45dd83ef3e50a | % [ZOOM] = pixelAxes(DIMS, ZOOM)
%
% Set the axes of the current plot to cover a multiple of DIMS pixels,
% thereby eliminating screen aliasing artifacts when displaying an
% image of size DIMS.
%
% ZOOM (optional, default='same') expresses the desired number of
% samples displayed per screen pixel. It shoul... |
github | jtyuan/deblur-master | pyrBandIndices.m | .m | deblur-master/denoise/Simoncelli_PyrTools/pyrBandIndices.m | 613 | utf_8 | a5387a946b44f72051b9a72faae6130c | % RES = pyrBandIndices(INDICES, BAND_NUM)
%
% Return indices for accessing a subband from a pyramid
% (gaussian, laplacian, QMF/wavelet, steerable).
% Eero Simoncelli, 6/96.
function indices = pyrBandIndices(pind,band)
if ((band > size(pind,1)) | (band < 1))
error(sprintf('BAND_NUM must be between 1 an... |
github | jtyuan/deblur-master | pointOp.m | .m | deblur-master/denoise/Simoncelli_PyrTools/pointOp.m | 1,159 | utf_8 | 040e1c3bc4afc4f9cfab4aa964e16082 | % RES = pointOp(IM, LUT, ORIGIN, INCREMENT, WARNINGS)
%
% Apply a point operation, specified by lookup table LUT, to image IM.
% LUT must be a row or column vector, and is assumed to contain
% (equi-spaced) samples of the function. ORIGIN specifies the
% abscissa associated with the first sample, and INCREMENT sp... |
github | jtyuan/deblur-master | reconWpyr.m | .m | deblur-master/denoise/Simoncelli_PyrTools/reconWpyr.m | 4,140 | utf_8 | de1ba8ead0f28186c92b026ec2d0631a | % RES = reconWpyr(PYR, INDICES, FILT, EDGES, LEVS, BANDS)
%
% Reconstruct image from its separable orthonormal QMF/wavelet pyramid
% representation, as created by buildWpyr.
%
% PYR is a vector containing the N pyramid subbands, ordered from fine
% to coarse. INDICES is an Nx2 matrix containing the sizes of
% e... |
github | jtyuan/deblur-master | shift.m | .m | deblur-master/denoise/Simoncelli_PyrTools/shift.m | 453 | utf_8 | 3e12f9ab9679c3cc88b56885c167121a | % [RES] = shift(MTX, OFFSET)
%
% Circular shift 2D matrix samples by OFFSET (a [Y,X] 2-vector),
% such that RES(POS) = MTX(POS-OFFSET).
function res = shift(mtx, offset)
dims = size(mtx);
offset = mod(-offset,dims);
res = [ mtx(offset(1)+1:dims(1), offset(2)+1:dims(2)), ...
mtx(offset(1)+1:... |
github | jtyuan/deblur-master | namedFilter.m | .m | deblur-master/denoise/Simoncelli_PyrTools/namedFilter.m | 3,278 | utf_8 | 837312a94d58a44dd9503ab3736cffe7 | % KERNEL = NAMED_FILTER(NAME)
%
% Some standard 1D filter kernels. These are scaled such that
% their L2-norm is 1.0.
%
% binomN - binomial coefficient filter of order N-1
% haar: - Haar wavelet.
% qmf8, qmf12, qmf16 - Symmetric Quadrature Mirror Filters [Johnston80]
% daub2,daub3,... |
github | jtyuan/deblur-master | wpyrHt.m | .m | deblur-master/denoise/Simoncelli_PyrTools/wpyrHt.m | 285 | utf_8 | 5b256ddf8ffadaa7888328a31159035e | % [HEIGHT] = wpyrHt(INDICES)
%
% Compute height of separable QMF/wavelet pyramid with given index matrix.
% Eero Simoncelli, 6/96.
function [ht] = wpyrHt(pind)
if ((pind(1,1) == 1) | (pind(1,2) ==1))
nbands = 1;
else
nbands = 3;
end
ht = (size(pind,1)-1)/nbands;
|
github | jtyuan/deblur-master | buildSFpyr.m | .m | deblur-master/denoise/Simoncelli_PyrTools/buildSFpyr.m | 3,362 | utf_8 | c23de2136a85b1bc58eff471a98d44aa | % [PYR, INDICES, STEERMTX, HARMONICS] = buildSFpyr(IM, HEIGHT, ORDER, TWIDTH)
%
% Construct a steerable pyramid on matrix IM, in the Fourier domain.
% This is similar to buildSpyr, except that:
%
% + Reconstruction is exact (within floating point errors)
% + It can produce any number of orientation bands.
... |
github | jtyuan/deblur-master | modulateFlip.m | .m | deblur-master/denoise/Simoncelli_PyrTools/modulateFlip.m | 480 | utf_8 | 9f2392c42cf1ad73accf1b25c3327ac7 | % [HFILT] = modulateFlipShift(LFILT)
%
% QMF/Wavelet highpass filter construction: modulate by (-1)^n,
% reverse order (and shift by one, which is handled by the convolution
% routines). This is an extension of the original definition of QMF's
% (e.g., see Simoncelli90).
% Eero Simoncelli, 7/96.
function [h... |
github | jtyuan/deblur-master | spyrNumBands.m | .m | deblur-master/denoise/Simoncelli_PyrTools/spyrNumBands.m | 500 | utf_8 | 2173f8841142e73d6f87cb5242a2f9a7 | % [NBANDS] = spyrNumBands(INDICES)
%
% Compute number of orientation bands in a steerable pyramid with
% given index matrix. If the pyramid contains only the highpass and
% lowpass bands (i.e., zero levels), returns 0.
% Eero Simoncelli, 2/97.
function [nbands] = spyrNumBands(pind)
if (size(pind,1) == 2)... |
github | densilcabrera/psysound3-master | psysound3.m | .m | psysound3-master/psysound3.m | 4,819 | utf_8 | b06c7156c86b1eafe92839ee40758bff | function psysound3
% PSYSOUND3
%
% This wrapper function checks to make sure PsySound3 is
% installed and then opens the GUI
% Check to see if PsySound3 is on the path
p = path;
if ~isempty(findstr(p, 'psysound3'))
try
getPsysound3Prefs; % CHECK IF PREFERENCES ARE THERE (May not be if PsySound paths added manu... |
github | densilcabrera/psysound3-master | tsFourier.m | .m | psysound3-master/Objects/CustomObjects/@DAAF/tsFourier.m | 2,039 | utf_8 | bfb98e7824d5ff996517fabd49a4c4fa | function [filematL,filematR] = tsFourier(obj,ax)
% TSFOURIER ESA Fourier Analysis Create graphs and attach callbacks
data = obj.DataPoints;
timedata = obj.TimePoints;
data = data(find(~isnan(data)));
timedata = timedata(find(~isnan(data)));
axes(ax{1}); cla; set(ax{1},'Tag','ESAAxesTop'); hold on;
set(ax{1},'Userda... |
github | densilcabrera/psysound3-master | specav.m | .m | psysound3-master/Objects/CustomObjects/@DAAF/specav.m | 878 | utf_8 | b1d99b66854311d58ee1fd4e7f6b94c2 |
function output =specav(winsize,overlap,s,newLen)
winNum=512;
%s = s(1:480000); % Take only first ten seconds
fs = 44100;
output = zeros(winsize*2,1);
while length(output) < fs*newLen
winsizerand = floor(rand * winsize) + winsize/2; % Choose Random Windowsize
avWindows = zeros(winsizerand,512); % Init
for i = 1... |
github | densilcabrera/psysound3-master | density.m | .m | psysound3-master/Objects/CustomObjects/@DAAF/density.m | 1,585 | utf_8 | 13ece5bb7676a551b6f1449fa4fb4a27 | function obj = hist(obj, decimation, varargin)
% Make density sonification
%
% 1. get frames and associated datapoints
% 2. window frames
% 3. Choose a duration
% 4. Make a data range from max to min (threshold elsewhere)
% 5. Place in appropriate place on duration.
decimation = 10;
% Sort Data
% Window Frames
for i... |
github | densilcabrera/psysound3-master | DAAF.m | .m | psysound3-master/Objects/CustomObjects/@DAAF/DAAF.m | 14,741 | utf_8 | 08579f1cac520a915e591f527e459e91 | function obj = DAAF(varargin)
% DAAF Base class constructor
%
% Inputs:
%
% 1. TimeSeries Object with Data
% 2. AudioFile Object
% 3. Segmentation Type
%
switch(nargin)
case 0
obj.Name = 'DAAF';
obj = class(obj, 'DAAF');
case 1
arg = varargin{1};
if isa(arg, 'DAAF')
% Copy construct... |
github | densilcabrera/psysound3-master | export.m | .m | psysound3-master/Objects/CustomObjects/@DAAF/export.m | 3,452 | utf_8 | 0299d73e160db7d5bfe7db88fbb72f69 | function obj = export(obj,varargin)
% SOUND method for DAAF Object
name = varargin{1};
if strcmp(class(name),'double')
name = ['percentile' num2str(name)];
end
dot = strfind(obj.AudioFilename,'.');
switch nargin
case 1
wavwrite(obj.OutputAudio,obj.FS,[obj.AudioFilename(1:dot-1) name obj.Name '.wav']);
c... |
github | densilcabrera/psysound3-master | FindChord.m | .m | psysound3-master/Objects/CustomObjects/@DAAF/FindChord.m | 10,468 | utf_8 | 1df03fd4ec0e3cb3b231ee8960285f3f | function [chord,R2]= FindChord(chromata)
% finds the octave-spaced chord chroma profile that most closely matches the chroma profile%
% var chroma, intervals: string;
% root: integer;
% rootX: integer;
% i: integer;
% r, SUMx, SUMx2: longreal; %correlation variables%
% rX: longreal;
if sum(chromata) == 0
chord ... |
github | densilcabrera/psysound3-master | findAllInDataSet.m | .m | psysound3-master/Objects/DataStorageObjects/findAllInDataSet.m | 1,137 | utf_8 | 6a20f304c7d5da41991f5ae497a22814 | function dataObjS = findAllInDataSet(varargin)
% FINDALLINDATASET Finds all dataStorage objects that match the P/V pairs
% starting at the root node
p = getPsysound3Prefs;
% Load root object
load(fullfile(p.dataDir, filesep, 'dataInfo.mat'));
if mod(nargin, 2)
error('Even number of property/valu... |
github | densilcabrera/psysound3-master | get.m | .m | psysound3-master/Objects/DataStorageObjects/@dataStorageTree/get.m | 1,227 | utf_8 | 930b225d8a8b98033662338ae1828695 | function val = get(obj, varargin)
% GET Method for the dataStorageTree object
val = [];
ind = 1;
if nargin ==1
val = obj;
elseif nargin == 2
switch lower(varargin{1})
case 'tree'
val = obj.tree;
otherwise
error(['Unknown property specified : ', prop]);
end
elseif nargin > 2
% make comp... |
github | densilcabrera/psysound3-master | dataStorageTree.m | .m | psysound3-master/Objects/DataStorageObjects/@dataStorageTree/dataStorageTree.m | 2,626 | utf_8 | 09c9677a425c976bdbb30d0fbbf914d4 | function obj = dataStorageTree(varargin)
% DATASTORAGETREE object for PsySound3 data files
%
% This object is a container object to act as an array for the
% dataStorage objects and as a method to access (not change) the
% data Objects themselves.
%
% Use get method to get dataobjects of a particular type
switch nar... |
github | densilcabrera/psysound3-master | plot.m | .m | psysound3-master/Objects/DataObjects/@psysnd3tSpectrum/plot.m | 2,709 | utf_8 | cbbcc319c08260597ffa0e5bb9c9e1dd | function varargout = plot(obj, varargin)
% PLOT Plot function for tSpectrum
out = [];
doPlot = true;
time = get(obj, 'Time');
data = get(obj, 'Data');
freq = get(obj, 'Freq');
option = 'image';
if nargin == 2
option = varargin{1};
end
pTitle = '';
if nargin == 3
pTitle = varargin{2};
end
% Switch on opti... |
github | densilcabrera/psysound3-master | psysnd3Stats.m | .m | psysound3-master/Objects/DataObjects/@psysnd3Stats/psysnd3Stats.m | 2,744 | utf_8 | fc47eb6d56a5957417161a76c2d276c2 | function obj = psysnd3Stats(varargin)
% PSYSND3STATS Object to hold data statistics
%
switch(nargin)
case 0
emptyStr = struct('Name','','Unit','','Value',[]);
% Create an empty object - Default constructor
obj = struct('Name', '', ...
'min', [], ...
'max', [], ...
... |
github | densilcabrera/psysound3-master | dataAnalysis.m | .m | psysound3-master/Objects/DataObjects/@psysnd3tSeries/dataAnalysis.m | 5,075 | utf_8 | 04fca5b7b5bf13dd3bf6a868c4dc132a | function out = dataAnalysis(obj, option, varargin)
% DATAANALYSIS Gateway function for data analysis.
%
%
out = [];
% Switch on option
switch(option)
case 'GetList'
out = {'fft', 'downsample', 'difference'};
case 'fft'
out = do_fft(obj);
case 'autocorr'
out = do_autocorr(obj);
case 'crosscorr'
i... |
github | densilcabrera/psysound3-master | process.m | .m | psysound3-master/DataAnalysers/@Threshold/process.m | 1,828 | utf_8 | eae27729e37bfc7af5beda80cd762ba2 | function process(obj, hObj)
% PROCESS This method is called when the Process button is pressed
%
% Get the tree nodes
% Get the tree nodes
panel = get(hObj,'Parent');
[nodes, uit] = getSelectedTreeNodes(obj, panel);
% Bail out if two nodes are not selected
if length(nodes) ~= 2
errordlg('Please select two nodes. T... |
github | densilcabrera/psysound3-master | process.m | .m | psysound3-master/DataAnalysers/@Periodicity/process.m | 5,465 | utf_8 | ba98f413985b070427f81c57056fc187 | function process(obj, hObj)
% PROCESS This method is called when the Process button is pressed
%
% Get the tree nodes
[TSObj, dataObjS, node, uit] = getDataFromNode(obj, hObj, 'tSeries');
% Get the Checkboxes from the ui
panel = get(hObj,'Parent');
pRa = findobj(panel, 'Tag', 'PeriodicityGraphRateExt');
pSm = findob... |
github | densilcabrera/psysound3-master | analyse.m | .m | psysound3-master/DataAnalysers/@Periodicity/analyse.m | 7,980 | utf_8 | 333edad4dc2f9f394586603b1381a615 | function out = analyse(obj, DObj, varargin)
% ANALYSE This method is called when the Process button is pressed - it
% is the actual analysis and the process method is the wrapper around it.
%
if strcmp(class(DObj),'struct')
TSObj = DObj.DataObj;
data = TSObj.data;
elseif strcmp(class(DObj),'tSeries')
TSO... |
github | densilcabrera/psysound3-master | ui.m | .m | psysound3-master/DataAnalysers/@BasicPlot/ui.m | 5,095 | utf_8 | fa99f9aba54ec2812f22273a3a953886 | function obj = ui(obj, panel)
% UI method for Basic Plot
%
% Inputs:
% panel : is the handle to the left panel of the data analyser
bgColor = [0.9 0.9 0.9];
% Add the Graph push-button
uicontrol('Parent', panel, ...
'units', 'normalized', ...
'Position', [0.8 0.64 0.17 0.07], ...
'... |
github | densilcabrera/psysound3-master | updateDataAnalyserPanel.m | .m | psysound3-master/DataAnalysers/@SummaryBasic/updateDataAnalyserPanel.m | 4,358 | utf_8 | 026bd03b042e77c0f70015701662104b | function updateDataAnalyserPanel(obj, panel)
% UPDATEDATAANALYSERPANEL This method is called everytime a tree
% node is clicked.
%
% Fills in the appropriate text box(es)
sNodes = getSelectedTreeNodes(obj, panel);
len = length(sNodes);
resetText();
p = getPsysound3Prefs;
if len > 0
nod... |
github | densilcabrera/psysound3-master | ui.m | .m | psysound3-master/DataAnalysers/@DataExportBasic/ui.m | 9,028 | utf_8 | 21e21354084b645857f3394e6d8368d8 | function obj = ui(obj, panel)
% UI metod for basic data export
%
% Basically a grid
%
% Inputs:
% panel : is the handle to the left panel of the data analyser
bgColor = [0.9 0.9 0.9];
% Data dir info
pos = [0.03 0.03 0.8 0.7];
boxH = uicontrol('Parent', panel, ...
'units', 'normalized', ...
'Position', pos, ...... |
github | densilcabrera/psysound3-master | collapseAndUnLoadTree.m | .m | psysound3-master/DataAnalysers/@DataAnalyser/collapseAndUnLoadTree.m | 2,749 | utf_8 | b8f85c6e084e78398adad8dc506c9454 | function collapseAndUnLoadTree(obj, panel)
% COLLAPSEANDUNLOADTREE Collapses and unloads tree so that
% subsequent expansion results in new
% files/nodes being picked up
%
uit = getTree(obj, panel);
selPath = uit.Tree.getSelectionPath;
uit.Tree.collapseRow(0);
setLoaded(ui... |
github | densilcabrera/psysound3-master | addToDataAnalysisFolder.m | .m | psysound3-master/DataAnalysers/@DataAnalyser/addToDataAnalysisFolder.m | 2,534 | utf_8 | 5151681f1eba0837a1b398a810a83450 | function out = addToDataAnalysisFolder(obj, fullPaths, dataObjS, uit)
% ADDTODATAANALYSISFOLDER Gateway function
%
% eg.
%
% |
% |--obj-- SPL A
% |
% |--obj-- SPL B
% \
% dataInfo.mat
%
% will become ....
%
% |
% |--obj-- SPL A
% | |
% | |--folder-- FFT (say)
% | | |
% | |... |
github | densilcabrera/psysound3-master | FindChord.m | .m | psysound3-master/DataAnalysers/@ChordalAnalysis/private/FindChord.m | 11,420 | utf_8 | 3d334c511592ae7d1bbbe83be7cf8790 | function [chord, R2, root, intervalNum] = FindChord(chromata)
% finds the octave-spaced chord chroma profile that most closely matches the chroma profile%
% var chroma, intervals: string;
% root: integer;
% rootX: integer;
% i: integer;
% r, SUMx, SUMx2: longreal; %correlation variables%
% rX: longreal;
%chromata... |
github | densilcabrera/psysound3-master | updateDataAnalyserPanel.m | .m | psysound3-master/DataAnalysers/@StatisticsBasic/updateDataAnalyserPanel.m | 1,214 | utf_8 | f78cb920b4bb5784077dca37b0d2e49d | function updateDataAnalyserPanel(obj, panel)
% UPDATEDATAANALYSERPANEL This method is called everytime a tree
% node is clicked.
%
%
% Update Enable/Disable state of plot buttons depending on
% the type of objects in listbox4
displayButton = findobj(panel,'Tag','BasicStatisticsDisplay');
sN... |
github | densilcabrera/psysound3-master | displayStatsObject.m | .m | psysound3-master/DataAnalysers/@StatisticsBasic/displayStatsObject.m | 2,321 | utf_8 | d40b5677a9b608f6a8a621a99c5bc943 | function displayStatsObject(obj, hObj)
% DISPLAYSTATSOBJECT Callback for the Display pushbutton
% Initial handle retrieval
p = get(hObj,'Parent');
utb = get(p, 'Parent');
utg = get(utb, 'Parent');
fig = get(utg, 'Parent');
% Get the tree nodes
nodes = getSelectedTreeNodes(obj, p);
% Bail out if empty
if isempty(... |
github | densilcabrera/psysound3-master | BVCallback.m | .m | psysound3-master/DataAnalysers/@ExploratorySoundAnalysis/BVCallback.m | 7,124 | utf_8 | ae8a8fa71d7df032d6c21d596b6fdcc3 | function BVCallback(obj, hObj)
% BVCALLBACK Callback for the Bivariate pushbutton
% % Initial handle retrieval
p = get(hObj,'Parent'); % The uipanel for univariate
uip = get(p,'Parent'); % The uipanel for the DataAnalyser
% Find axes
ax{1} = findobj(uip, 'Type','Axes','Tag','ESAAxesTop');
ax{2} = findobj(uip, 'T... |
github | densilcabrera/psysound3-master | UVCallback.m | .m | psysound3-master/DataAnalysers/@ExploratorySoundAnalysis/UVCallback.m | 8,254 | utf_8 | 694acbbc367f3662fe1f462271cbcbf0 | function UVCallback(obj, hObj, DAAFObj)
% UVCALLBACK Callback for the Univariate pushbutton
% % Initial handle retrieval
p = get(hObj,'Parent'); % The uipanel for univariate
uip = get(p,'Parent'); % The uipanel for the DataAnalyser
% Find axes
ax{1} = findobj(uip, 'Type','Axes','Tag','ESAAxesTop');
ax{2} = findo... |
github | densilcabrera/psysound3-master | updateDataAnalyserPanel.m | .m | psysound3-master/DataAnalysers/@ExploratorySoundAnalysis/updateDataAnalyserPanel.m | 1,494 | utf_8 | a48f5bcb9ccb31375804b9926853366a | function updateDataAnalyserPanel(obj, panel)
% UPDATEDATAANALYSERPANEL This method is called everytime a tree
% node is clicked.
%
%
% Update Enable/Disable state of plot buttons depending on
% the type of objects in listbox4
sNodes = getSelectedTreeNodes(obj, panel);
len = length(sNodes);
... |
github | densilcabrera/psysound3-master | ui.m | .m | psysound3-master/DataAnalysers/@ExploratorySoundAnalysis/ui.m | 11,550 | utf_8 | e3e007da39f468a0f29d81075aafeb5c | function obj = ui(obj, panel)
% UI method for Basic Plot
%
% Inputs:
% panel : is the handle to the left panel of the data analyser
bgColor = [0.9 0.9 0.9];
%%%%%%%%%%%%%%
% Univariate %
%%%%%%%%%%%%%%
univPanel = uipanel('Parent',panel, ...
'Title','Univariate Data', ...
'unit... |
github | densilcabrera/psysound3-master | ESA.m | .m | psysound3-master/DataAnalysers/@ExploratorySoundAnalysis/private/ESA.m | 5,296 | utf_8 | 7fd7758c1e41d655d2011355d3b98767 | function filemat = ESA(varargin)
% Build Soundfile from grains.
obj = varargin{1};
dataObj = varargin{2};
ax = varargin{3};
ax1 = ax{1};
ax2 = ax{2};
axTag1 = get(ax{1},'Tag');
axTag2 = get(ax{2},'Tag');
plotType = varargin{4};
decimateToLength =[];
if length(varargin)>4
decimateToLength = varargin{5};
end
timestep ... |
github | densilcabrera/psysound3-master | 2tsFourier.m | .m | psysound3-master/DataAnalysers/@ExploratorySoundAnalysis/private/2tsFourier.m | 1,200 | utf_8 | 999e0779abf6bfea9627e9a739073947 | function [filematL,filematR] = tsFourier(dataObj,filemat,ax,concatType)
% Create the graphs and attach callbacks
data = dataObj.DataObj.data;
timedata = dataObj.DataObj.time;
axes(ax{1});
cla;
set(ax{1},'Tag','ESAAxesTop');
hold on;
fftdata = fft(data);
freqdata = 1:length(fftdata);
for i = 1:(length(fftdata)/... |
github | densilcabrera/psysound3-master | playchroma.m | .m | psysound3-master/DataAnalysers/@ExploratorySoundAnalysis/private/playchroma.m | 3,387 | utf_8 | c3bb2b9e560a4525db0b7c2f73bdbb1f | function playchroma(method,dataObj,beats,decimation)
% PLAYCHROMA play chroma pattern
chro = dataObj.data;
timePointsAll = dataObj.time;
below1000 = find(timePointsAll <1000);
chro = chro(below1000,:);
timePoints = timePointsAll(below1000);
chroma = [0:11]';
[r,c] = size(chro);
% make 12 tones
note... |
github | densilcabrera/psysound3-master | ui.m | .m | psysound3-master/DataAnalysers/@AnimationPlot/ui.m | 3,710 | utf_8 | 2c83bda3fbc5778461096467af92ee4b | function obj = ui(obj, panel)
% UI method for Animation Plot
%
% Inputs:
% panel : is the handle to the left panel of the data analyser
bgColor = [0.9 0.9 0.9];
% Add the Movie push-button
uicontrol('Parent', panel, ...
'units', 'normalized', ...
'Position', [0.8 0.64 0.17 0.07], ...
... |
github | densilcabrera/psysound3-master | updateDataAnalyserPanel.m | .m | psysound3-master/DataAnalysers/@ComparisonPlot/updateDataAnalyserPanel.m | 1,214 | utf_8 | f78cb920b4bb5784077dca37b0d2e49d | function updateDataAnalyserPanel(obj, panel)
% UPDATEDATAANALYSERPANEL This method is called everytime a tree
% node is clicked.
%
%
% Update Enable/Disable state of plot buttons depending on
% the type of objects in listbox4
displayButton = findobj(panel,'Tag','BasicStatisticsDisplay');
sN... |
github | densilcabrera/psysound3-master | ui.m | .m | psysound3-master/DataAnalysers/@ComparisonPlot/ui.m | 3,139 | utf_8 | de709345d845f5d6ae7afcc5f994d019 | function obj = ui(obj, panel)
% UI metod for basic stats
%
bgColor = [0.9 0.9 0.9];
% Create uicontrols
posGraph = [0.8 0.64 0.17 0.07];
posPopup = [0.8 0.74 0.17 0.07];
set(panel,'Visible','off');
h = uicontrol('Parent', panel, ...
'units', 'normalized', ...
'Position', posGraph, ...
... |
github | densilcabrera/psysound3-master | sonifyData.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/sonifyData.m | 5,105 | utf_8 | 787697a9cfc3cc07a6d1f1b4c9649235 | function signal = sonifyData(tsArray, tVect, minMaxVals, fs, usePinkNoise)
% SONIFY : Sonification workhorse
% tsArray : A cell array of timeseries objects
% tVect : time vector to resample on
% minMaxVals : Structure of min/max value arrays, one for each
% 'freq', 'level', and 'pan'
%
% ... |
github | densilcabrera/psysound3-master | SonifyExportWAV_Callback.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/SonifyExportWAV_Callback.m | 490 | utf_8 | 749728c06877376dc1f77afb7c88c4e3 |
function SonifyExportWAV_Callback(hObject, eventdata, handles)
% Find the sonified signal
p = get(hObject, 'Parent');
h = findobj(p, 'Tag', 'SonifyButton');
dat = get(h, 'UserData');
if ~isempty(dat{1})
% Get the name of the file
[fName, pName] = uiputfile('*.wav', 'Save file as');
% Write wav file
wavwr... |
github | densilcabrera/psysound3-master | SonifyPlayInput_Callback.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/SonifyPlayInput_Callback.m | 1,351 | utf_8 | a5c4beb1dcf8bb855cc3ccfd7a8c07be |
%%%
function SonifyPlayInput_Callback(hObject, eventdata, handles)
% Assume the user has not clicked away in the file panel
strs = get(handles.OutputFilesList, 'String');
val = get(handles.OutputFilesList, 'Value');
str = get(hObject, 'String');
if ~isempty(findstr(str, 'Play'))
% We are asked to play
try
... |
github | densilcabrera/psysound3-master | SonifyUSePinkNoise_Callback.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/SonifyUSePinkNoise_Callback.m | 437 | utf_8 | 3b947bf96360f9d098ca6a7ada56666b | %
function SonifyUSePinkNoise_Callback(hObject, eventdata, handles)
p = get(hObject, 'Parent');
h(1) = findobj(p, 'Tag', 'freqTsObj');
h(2) = findobj(p, 'Tag', 'freqMax');
h(3) = findobj(p, 'Tag', 'freqMin');
val = get(hObject, 'Value');
if val == 0
set(h, 'Enable', 'on');
else
set(h, 'Enable', 'off');
end
... |
github | densilcabrera/psysound3-master | SonifyAddlevel_Callback.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/SonifyAddlevel_Callback.m | 950 | utf_8 | 10ca2baf03d98993df1d63de14700157 |
function SonifyAddlevel_Callback(hObject, eventdata, handles)
p = get(hObject, 'Parent');
DataChoice = get(handles.OutputDataObjectsList,'Value');
DataObjectChoice = get(handles.OutputDataObjectsList,'String');
% Remove some stuff
origStr = DataObjectChoice{DataChoice};
newStr = regexprep(origStr, 'timeserie... |
github | densilcabrera/psysound3-master | SonifyPlayOutput_Callback.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/SonifyPlayOutput_Callback.m | 643 | utf_8 | bd7efdb17f2a268dbb1e0663199c1bc9 |
function SonifyPlayOutput_Callback(hObject, eventdata, handles)
p = get(hObject, 'Parent');
h = findobj(p, 'Tag', 'SonifyButton');
dat = get(h, 'UserData');
if ~isempty(dat{1})
% Get the original string
str = get(hObject, 'String');
% Set to Playing...
set(hObject, 'String', 'Playing...');
pause(0.2);... |
github | densilcabrera/psysound3-master | updateDurScFactor.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/updateDurScFactor.m | 266 | utf_8 | 4e34cbdbda757ea0362c1c5adf45e29f |
% Update duration stuff as soon as an Add is pressed
function updateDurScFactor(p)
% Get scaling factor from the GUI
h = findobj(p, 'Tag', 'outScFactor');
set(h, 'String', '-');
% Get the scaling type
h = findobj(p, 'Tag', 'outScFactorPopup');
set(h, 'Value', 1);
|
github | densilcabrera/psysound3-master | SonifyRemovelevel_Callback.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/SonifyRemovelevel_Callback.m | 309 | utf_8 | 2ddf5c6520047ccd7e3896fd99d46147 |
function SonifyRemovelevel_Callback(hObject, eventdata, handles)
p = get(hObject, 'Parent');
h = findobj(p, 'Tag', 'levelTsObj');
% Clear label and UserData
set(h, 'String', '');
set(h, 'UserData', []);
% Disable both min and max
h = findobj(p, '-regexp', 'Tag', 'level(Min|Max)');
set(h, 'Enable', 'off'); |
github | densilcabrera/psysound3-master | SonifyAddpan_Callback.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/SonifyAddpan_Callback.m | 907 | utf_8 | dbd5a5187cd1b893326ca50337171736 |
function SonifyAddpan_Callback(hObject, eventdata, handles)
p = get(hObject, 'Parent');
DataChoice = get(handles.OutputDataObjectsList,'Value');
DataObjectChoice = get(handles.OutputDataObjectsList,'String');
% Remove some stuff
origStr = DataObjectChoice{DataChoice};
newStr = regexprep(origStr, 'timeseries:... |
github | densilcabrera/psysound3-master | findAllTsObjs.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/findAllTsObjs.m | 1,850 | utf_8 | 0fb30c3f86859ac77f20fdbc4db69a5b |
%%%%%%%%%%%%%%%%%%%
% Local functions %
%%%%%%%%%%%%%%%%%%%
% Retrieves all the timeseries objects for Sonification and
% packages them up in a cell array
function [tsArray, fs, minMax] = findAllTsObjs(p, handles, fName);
% Outputs
fs = [];
tsArray = {};
minMax = struct;
% Results list
resList = get(handles.Ou... |
github | densilcabrera/psysound3-master | SonifyClearAll_Callback.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/SonifyClearAll_Callback.m | 519 | utf_8 | e2938b01642985bfa528289326410f44 |
function SonifyClearAll_Callback(hObject, eventdata, handles)
p = get(hObject, 'Parent');
% All min/max
h = findobj(p, '-regexp', 'Tag', '(freq|level|pan)(Min|Max)');
set(h, 'String', '0');
h = findobj(p, '-regexp', 'Tag', '(freq|level|pan)(TsObj)');
% Clear labels and UserData
set(h, 'String', '');
set(h, 'UserData... |
github | densilcabrera/psysound3-master | Sonify_Callback.m | .m | psysound3-master/DataAnalysers/@AuditoryGraphing/private/Sonify_Callback.m | 1,922 | utf_8 | 45262d8423a7b88a59378bfa9e9c4bf1 |
%%%%%%% Sonify
function Sonify_Callback(hObject, eventdata, handles)
hWait = waitbar(0, 'Sonification in progress. Please wait ...');
p = get(hObject, 'Parent');
% We have a valid time series name, lets figure out which file we
% came from
dataObjS = getDataObjectFromTreeNode(hObject, nodes(1));
% This is the fil... |
github | densilcabrera/psysound3-master | analyse.m | .m | psysound3-master/DataAnalysers/@SpectralIndicators/analyse.m | 2,064 | utf_8 | 232082a1b61c5a516d81b7a5de7f3e15 | function out = analyse(obj, TSObj)
specdata = TSObj.DataObj.Data;
f = TSObj.DataObj.Freq;
t = TSObj.DataObj.Time;
%
[ER, SPR, Alpha, SB] = Spectrality(specdata, f, t);
out = {ER, SPR, Alpha, SB};
function [ER, SPR, Alpha, SB] = Spectrality(specdata, f, t)
% [ER, SPR, Centroid] = Spectrality(signal, Fs, measPer... |
github | densilcabrera/psysound3-master | PostPropGUI.m | .m | psysound3-master/Framework/GUI/PostPropGUI.m | 21,740 | utf_8 | aa5de5b4938df136a293a8b4e48693e5 | function handles = PostPropGUI(handles, varargin)
% POSTPROPGUI Sets up the Post-processing Panel
%
import javax.swing.tree.*;
if nargin > 1
% We want to reset the tree
if varargin{1} == 1
theTree = handles.PostPropTree;
rootNode = theTree.getRoot;
if ~isempty (rootNode)
% Collapse the root node ... |
github | densilcabrera/psysound3-master | runanalysisTest.m | .m | psysound3-master/Framework/GUI/runanalysisTest.m | 15,157 | utf_8 | ba4512519a6e2012ae06fa30e56b4136 | function out = runanalysis(fileHandles, analysers, syncPeriod, wH, varargin)
% RUNANALYSIS Run the specified Analysers for each of the file
% handles given
%
% This is the loop for Estimating how long these files will take to analyse.
%
% Output : TSTR - Structure with times for each file, analyser
% Inpu... |
github | densilcabrera/psysound3-master | PostPropGUIBack.m | .m | psysound3-master/Framework/GUI/PostPropGUIBack.m | 17,350 | utf_8 | 3aac165d8bc408cac315eee9f640d2fa | function handles = PostPropGUI(handles, varargin)
% POSTPROPGUI Sets up the Post-processing Panel
%
if nargin > 1
% We want to reset the tree
if varargin{1} == 1
theTree = handles.PostPropTree;
rootNode = theTree.getRoot;
% Collapse the root node and set the loaded flag to false so
% that th... |
github | densilcabrera/psysound3-master | runanalysisParr.m | .m | psysound3-master/Framework/GUI/runanalysisParr.m | 16,659 | utf_8 | 1841788f0a57803a5c63d117984ba425 | function out = runanalysisParr(fileHandles, analysers, syncPeriod, wH,parOnFiles,varargin)
% RUNANALYSIS Run the specified Analysers for each of the file
% handles given
%
% This is the special runanalysis file for parallell computing feature.
% The value of ParrOnFiles determines whether to do the parfor... |
github | densilcabrera/psysound3-master | PsySoundGUI.m | .m | psysound3-master/Framework/GUI/PsySoundGUI.m | 62,268 | utf_8 | dba177b30231e465ab10b749c88f54fa | function varargout = PsySoundGUI(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @PsySoundGUI_OpeningFcn, ...
'gui_OutputFcn', @PsySoundGUI_OutputFcn, ...
... |
github | densilcabrera/psysound3-master | runanalysisParr_backup.m | .m | psysound3-master/Framework/GUI/runanalysisParr_backup.m | 29,872 | utf_8 | fe86857093814632f22a120cfc6afdb4 | function out = runanalysisParr(fileHandles, analysers, syncPeriod, wH,parOnFiles,varargin)
% RUNANALYSIS Run the specified Analysers for each of the file
% handles given
%
% This is the special runanalysis file for parallell computing feature.
% The value of ParrOnFiles determines whether to do the parfor... |
github | densilcabrera/psysound3-master | runanalysis.m | .m | psysound3-master/Framework/GUI/runanalysis.m | 14,630 | utf_8 | 61542775e349ca9943b6c3a895a61200 | function out = runanalysis(fileHandles, analysers, syncPeriod, wH, varargin)
% RUNANALYSIS Run the specified Analysers for each of the file
% handles given
%
% This is the loop for Estimating how long these files will take to analyse.
%
% Output : TSTR - Structure with times for each file, analyser
% Inpu... |
github | densilcabrera/psysound3-master | changeSelectedFiles.m | .m | psysound3-master/Framework/GUI/private/changeSelectedFiles.m | 2,723 | utf_8 | 3eb2e36953cb0b17478dc02cc59568d1 | function handles = changeSelectedFiles(handles, varargin)
%% displays the Selected Files based on the information in handles.
%
% Controls the main table (handles.Table) and the calibration files list
% box (handles.CalFilesLeft). The display is simply updated with the
% current data, changing the actual data is done ... |
github | densilcabrera/psysound3-master | PostPropGUI_2008.m | .m | psysound3-master/Framework/GUI/2008/PostPropGUI_2008.m | 19,447 | utf_8 | 14335400e9850fa5514514331c74ed47 | function handles = PostPropGUI_R2008b(handles, varargin)
% POSTPROPGUI Sets up the Post-processing Panel
%
import javax.swing.tree.*;
if nargin > 1
% We want to reset the tree
if varargin{1} == 1
theTree = handles.PostPropTree;
rootNode = theTree.getRoot;
% Collapse the root node and set the loa... |
github | densilcabrera/psysound3-master | PostPropGUI_2006.m | .m | psysound3-master/Framework/GUI/2006/PostPropGUI_2006.m | 19,397 | utf_8 | f86b5d6e621eb2b3b53ade2c8dcd1b96 | function handles = PostPropGUI(handles, varargin)
% POSTPROPGUI Sets up the Post-processing Panel
%
import javax.swing.tree.*;
if nargin > 1
% We want to reset the tree
if varargin{1} == 1
theTree = handles.PostPropTree;
rootNode = theTree.getRoot;
% Collapse the root node and set the loaded fla... |
github | densilcabrera/psysound3-master | PostPropGUI_2007.m | .m | psysound3-master/Framework/GUI/2007/PostPropGUI_2007.m | 19,474 | utf_8 | 8a27944aa3f430d3c372ae4399a65174 | function handles = PostPropGUI(handles, varargin)
% POSTPROPGUI Sets up the Post-processing Panel
%
import javax.swing.tree.*;
if nargin > 1
% We want to reset the tree
if varargin{1} == 1
theTree = handles.PostPropTree;
rootNode = theTree.getRoot;
% Collapse the root node and set the loaded fla... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.