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
sunhongfu/scripts-master
pad_into_center.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/pad_into_center.m
1,210
utf_8
ab74a76cd16f351c6d2e6238fc95017e
function xpad = pad_into_center(x, npad) %function xpad = pad_into_center(x, npad) % Zero pad an input signal x symmetrically around "0" (image center). % Useful for DFT/FFT of PSF. % todo: replace with matlab's padarray.m % Originally by A. Yendiki, modified by Jeff Fessler, 2005-7-26. if nargin < 1, help(mfilename)...
github
sunhongfu/scripts-master
downsample2.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/downsample2.m
796
utf_8
45fe4dcbfeb45d32d39d0bc20299a641
function y = downsample2(x, m, varargin) %|function y = downsample2(x, m, varargin) %| downsample by averaging by integer factors %| m can be a scalar (same factor for both dimensions) %| or a 2-vector %| in %| x [nx ny] %| option %| 'warn' 0|1 warn if non-integer factor. default: 1 %| out %| y [nx/m ny/m] if nargin...
github
sunhongfu/scripts-master
reshaper.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/reshaper.m
890
utf_8
b1851d49886b11b9ca0b1a4651a16a51
function y = reshaper(x, dim) %|function y = reshaper(x, dim) %| %| reshape function that is more flexible, allowing for "multiples". %| example: reshape(rand(2*3*5,7), [2 3 5]) will become [2 3 5 7] %| %| in %| x [*dim (Ld)] %| dim short row or column %| if dim is '2d' then y is 2d with first n-1 dims collapsed %| ...
github
sunhongfu/scripts-master
fld_write.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/fld_write.m
5,854
utf_8
a537cbf0ff76de352fe949e0e946577d
function fld_write(file, data, varargin) %|function fld_write(file, data, [options]) %| write data into AVS format .fld file %| see ASPIRE user's guide (or AVS online documentation) for file format. %| %| todo: generalize to include 'extent' options and default %| %| options %| 'check' 0|1 1: report error if file ex...
github
sunhongfu/scripts-master
unpadn.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/unpadn.m
818
utf_8
efcd912abfb2bb3205ef2bc3c72ff01c
function out = unpadn(mat, newdim) %|function out = unpadn(mat, newdim) %| pad old to newdim, preserving 'center point' if nargin == 1 && streq(mat, 'test'), unpadn_test, return, end if nargin < 2, error(mfilename), help(mfilename), end olddim = size(mat); if any(newdim > olddim), error('must be smaller'), end idx ...
github
sunhongfu/scripts-master
isvar.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/isvar.m
1,105
utf_8
e6f2c6aa9ef51279a672904d75970008
%|function tf = isvar(name) %| %| determine if "name" is a variable in the caller's workspace. %| %| if argument is of the form 'name.field' or 'name.field1.field2' etc. %| then this uses isfield(st, 'field') recursively as needed %| %| Copyright 2000-01-01, Jeff Fessler, University of Michigan %| modified 2010-04-21 t...
github
sunhongfu/scripts-master
dft_sym_check.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/dft_sym_check.m
1,124
utf_8
2232513db8d14465e04adc59ed9f646e
function dft_sym_check(xk, varargin) %function dft_sym_check(xk) % see if array xk (usually containing DFT coefficients) % obeys the conjugate symmetry conditions expected % for its (inverse) DFT to be real. if nargin == 1 && streq(xk, 'test'), dft_sym_check_test, return, end if nargin < 1, help(mfilename), error(mfi...
github
sunhongfu/scripts-master
dsingle.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/dsingle.m
320
utf_8
131f14ecc3813385227fdb653e79b58b
function [varargout] = dsingle(varargin) %function y = dsingle(x) % truncate a (possibly) double precision value to single precision, % then convert back to "double" using double6: % y = double6(single(x)); for ii=1:nargin varargout{ii} = dsingle1(varargin{ii}); end function y = dsingle1(x) y = double6(single(x));
github
sunhongfu/scripts-master
jf_equal.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/jf_equal.m
1,871
utf_8
53cbc8605bbf1ab3fb4ec2641bc8bf9b
function jf_equal(a, b, varargin) %|function jf_equal(a, b, varargin) %| %| verify that the two arguments are equal. %| if not, print error message. %| See also: equivs %| note: to compare two (e.g. Fatrix) objects, use jf_equal(struct(a), struct(b)) %| option %| 'warn' 0|1 if 0 (default) then fail; if 1 just warn in...
github
sunhongfu/scripts-master
hist_equal.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/hist_equal.m
2,496
utf_8
0d27bae082772372de17cf66a6f14d6b
function [nk, center] = hist_equal(data, ncent, varargin) %|function [nk, center] = hist_equal(data, ncent, varargin) %| %| fast histogram of multidimensional data into equally-spaced bins %| todo: accumarray? %| %| in %| data [N M] data values to be binned (M-dimensional) %| ncent [1 M] # of centroids for each dim...
github
sunhongfu/scripts-master
fwhm1.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/fwhm1.m
1,785
utf_8
521eddf7df2e4bf7dd77c7f89f15d48e
function [fw, hr, hl] = fwhm1(psfs, varargin) %|function [fw, hr, hl] = fwhm1(psfs, options) %| compute fwhm of point-spread function centered at pixel imid %| and half-right width and half-left width (fw = hr + hl) %| in %| psfs [np nc] column psf(s) %| option %| imid [1] which pixel is the middle (default: peak) %|...
github
sunhongfu/scripts-master
ndgrid_jf.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/ndgrid_jf.m
1,825
utf_8
81141c55ae5b933826ba00a65b23fcc3
function out = ndgrid_jf(otype, varargin) %function out = ndgrid_jf('cell', varargin) %function out = ndgrid_jf('mat', varargin) %| version of ndgrid where output is cell array (default) or large matrix %| think: %| [out{1} ... out{M}] = ndgrid_cell(in{1}, ..., in{M}); %| also supported is ndgrid_jf('mat'|'cell', {in1...
github
sunhongfu/scripts-master
kde_pmf_width.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/kde_pmf_width.m
1,573
utf_8
6c684711031188408ae21134004afd70
function dx = kde_pmf_width(x, varargin) %|function dx = kde_pmf_width(x, varargin) %| %| Determine bin width for kde_pmf1,2 %| %| in %| x [N 1] iid realizations of random variable pairs (x,y) %| %| option %| 'type' 'silverman' to choose dx based on rule-of-thumb %| using inter-quartile range (p48 of 1986 book) %|...
github
sunhongfu/scripts-master
arg_get.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/arg_get.m
953
utf_8
0e42582c06b61201a8a9468a8afcce32
function [arg, ii] = arg_get(list, what, default) %function [arg, ii] = arg_get(list, what, default) % extract an argument (e.g., nx or pixel_size, etc.) % from a list (vertically concatenated strings) % e.g., as generated by arg_pair() or strvcat() % the *first* match is used. % Copyright 2005, Jeff Fessler, The Univ...
github
sunhongfu/scripts-master
filtmat.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/filtmat.m
3,758
utf_8
4f6ac3e0ab4e6785b3698d7b1b702542
function [mat, nexp] = filtmat(arg0, arg1, arg2, arg3, arg4) %function mat = filtmat('1d', kernx, nx) % 1d nonperiodic %function mat = filtmat({'1d' 'per'}, kernx, nx) % 1d periodic %function mat = filtmat('2d,mul,sep', kernx, kerny, [nx ny]) % 2d multiplicatively separable nonperiodic %function mat = filtmat('3...
github
sunhongfu/scripts-master
remove_spaces.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/remove_spaces.m
793
utf_8
44dcf5c3a35ebc4ce3ddd6e590aab8a4
function arg = remove_spaces(arg) %|function arg = remove_spaces(arg) %| replace extra spaces at ends of matrix string array with zeros. %| also add extra '0' at end to be sure to null terminate string %| Copyright May 2000, Jeff Fessler, University of Michigan if nargin < 1, help(mfilename), error(mfilename), end ...
github
sunhongfu/scripts-master
interp1_lagrange.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/interp1_lagrange.m
1,111
utf_8
2245c39a0a1bf94677de8caef3c0efe7
function y = interp1_lagrange(xi, yi, x) %function y = interp1_lagrange(xi, yi, x) % Lagrange (1D) interpolation: polynomial of order length(xi) % in: xi [n,1], yi [n,1], x [m,1] % if yi is empty, then "y" is the m,n interpolation matrix % Copyright 2003-5-13 Jeff Fessler The University of Michigan if nargin < 3, int...
github
sunhongfu/scripts-master
arg_pair.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/arg_pair.m
1,517
utf_8
5efeebd0651d931efc4ac151090edec1
function arg = arg_pair(varargin) %|function arg = arg_pair(varargin) %| %| construct AsciiArg pairs from input arguments %| for building arguments akin to .dsc file %| example: arg = arg_pair('system', 2, 'nx', 128, ...) %| %| Copyright May 2000, Jeff Fessler, University of Michigan if nargin == 1 & streq(varargin...
github
sunhongfu/scripts-master
upsample_rep.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/upsample_rep.m
629
utf_8
3db6e5ee1beac6a80b0a8880a17d5c3d
function y = upsample_rep(x, m) %function y = upsample_rep(x, m) % upsample a 2D image a factor of m by simple replication if nargin == 1 && streq(x, 'test'), upsample_rep_test, return, end if nargin < 1, help(mfilename), error(mfilename), end if nargin < 2, m = [2 2]; end y = upsample1_rep(x, m(1)); y = upsample1_r...
github
sunhongfu/scripts-master
max_percent_diff.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/max_percent_diff.m
1,971
utf_8
0b4ab863976402c87de0914aa0e5a0a0
function d = max_percent_diff(s1, s2, varargin) %|function d = max_percent_diff(s1, s2, [options]) %| %| compute the "maximum percent difference" between two signals: s1, s2 %| options %| 1 use both arguments as the normalizer %| string print this %| %| Copyright 2000-9-16, Jeff Fessler, University of Michigan if ...
github
sunhongfu/scripts-master
bspline_1d_coef.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/bspline_1d_coef.m
5,143
utf_8
68fc2ba254910a9aed75f78d9a852b84
function coef = bspline_1d_coef(fn, varargin) %|function coef = bspline_1d_coef(fn, varargin) %| %| Given f[n], uniformly spaced samples of a 1D signal f(t), %| compute the bspline coefficients so that the following model interpolates: %| f(t) = \sum_{k=0}^{N-1} coef[k] b(t - k) %| %| in %| fn [N,(L)] 1d signal(s) of...
github
sunhongfu/scripts-master
downsample1.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/downsample1.m
1,242
utf_8
cde1ae93622ba9447977d20910d44b6d
function y = downsample1(x, down, varargin) %|function y = downsample1(x, down, varargin) %| downsample by factor m along first dimension by averaging %| %| in %| x [n1 (Nd)] %| down integer downsampling factor %| option %| 'warn' 0|1 warn if noninteger multiple (default: 1) %| out %| y [n1/down (Nd)] %| %| Copyri...
github
sunhongfu/scripts-master
fwhm2.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/fwhm2.m
3,918
utf_8
de4664218f9f1cae8bb7f5cd25d64465
function [fw, angle, rad] = fwhm2(psf, varargin) %|function [fw, angle, rad] = fwhm2(psf, [options]) %| %| compute 2d fwhm of point-spread function using contourc() %| %| in %| psf [nx ny] 2D psf image %| %| option %| 'dx' pixel size (default 1) %| 'dy' pixel size (default dx) %| 'level' default 0.5 (for "half" ma...
github
sunhongfu/scripts-master
poisson.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/poisson.m
1,180
utf_8
0265d6eb478b5a47dc8d273d2c07d330
function data = poisson(xm, seed, varargin) %|function data = poisson(xm, seed, [options]) %| %| option %| 'factor' see poisson2.m %| %| Generate Poisson random vector with mean xm. %| For small, use poisson1.m %| For large, use poisson2.m %| see num. rec. C, P. 222 %| %| Copyright 1997-4-29, Jeff Fessler, University ...
github
sunhongfu/scripts-master
nrms.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/nrms.m
1,109
utf_8
042ba79752bcb9662b4db291ca79144b
function n = nrms(x, xtrue, arg) %|function n = nrms(x, xtrue, arg) %| normalized rms error %| in %| x [[Nd] Nrep] multiple x's for one xtrue %| xtrue [[Nd]] %| arg use '2' to do along 2nd dim for same size %| out %| scalar %| vector if x and xtrue have same size and arg = 2 if nargin == 1 && streq(x, 'test'), nrms...
github
sunhongfu/scripts-master
fld_read.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/fld_read.m
12,334
utf_8
4d7e7ee0934f826d43db5b5fe965f388
function [data, coord, dims] = fld_read(file, varargin) %|function [data, coord, dims] = fld_read(file, options) %| Read data from AVS format .fld file. %| %| options %| 'raw' 0|1 1: return raw data class (default), 0: return doubles %| 'slice' int specify which slice to read from 3D file. (0 ... nz-1) %| 'chat' 0|1 ...
github
sunhongfu/scripts-master
outer_sum.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/outer_sum.m
1,339
utf_8
6fcbf93474fbbffdf7eb645159d64f36
function ss = outer_sum(xx,yy) %function ss = outer_sum(xx,yy) % compute an "outer sum" x + y' % that is analogous to the "outer product" x * y' % in % xx [nx,1] % yy [1,ny] % more generally: xx [(dim)] + yy [L,1] -> xx [(dim) LL] % out % ss [nx,ny] ss(i,j) = xx(i) + yy(j) % Copyright 2001, Jeff Fessler, The Universi...
github
sunhongfu/scripts-master
hist_bin_int.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/hist_bin_int.m
3,687
utf_8
2d4d4e6439eba6ef169ea21443b06188
function [nk center] = hist_bin_int(data, varargin) %|function [nk center] = hist_bin_int(data, varargin) %| %| fast histogram of multidimensional data into equally-spaced bins %| todo: time this vs accumarray %| %| in %| data [N M] data values to be binned (M-dimensional) %| must be integer valued >= 1 %| %| opt...
github
sunhongfu/scripts-master
stackpick.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/stackpick.m
1,177
utf_8
94edbe3b375bee1198ac10df6439e535
function y = stackpick(x, ii) %|function y = stackpick(x, ii) %| pick one (or more) of the last "slices" of a multi-dimensional array %| think x(:,:,...,:,ii) %| This is useful in conjunction with stackup(). %| Copyright 2005-6-18, Jeff Fessler, University of Michiga if nargin == 1 && streq(x, 'test'), stackpick_test...
github
sunhongfu/scripts-master
bspline_1d_interp.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/bspline_1d_interp.m
3,926
utf_8
0450bc0a6193efe6e03381d744ef3104
function ft = bspline_1d_interp(fn, ti, varargin) %|function ft = bspline_1d_interp(fn, ti, varargin) %| %| given f[n], the "unit spaced" samples of a continuous signal f(t), %| perform b-spline interpolation at sample locations t_i using the model: %| f(t) = \sum_{k=0}^{N-1} coef_k b(t - k) %| where the coefficients...
github
sunhongfu/scripts-master
ticker.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/ticker.m
3,188
utf_8
d37224bdcbb9b5731efdb04eb3ef9d42
function ticker(varargin) %|function ticker(varargin) %| %| This utility is used in functions that might take a long time %| to provide a status update so the user knows it is working. %| "ticker print" to make output print to command window (default) %| "ticker waitbar" to display using waitbar %| ticker(waittime) to...
github
sunhongfu/scripts-master
downsample3.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/downsample3.m
1,725
utf_8
3c07f350e6c231aa9b3ba83589194f0a
function y = downsample3(x, m) %|function y = downsample3(x, m) %| downsample by averaging by integer factors %| m can be a scalar (same factor for both dimensions) %| or a 3-vector %| in %| x [nx ny nz] %| m [1] or [1 3] %| out %| y [nx/m ny/m nz/m] %| function modified to 3D space by: Taka Masuda if nargin == 1 & ...
github
sunhongfu/scripts-master
embed.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/embed.m
2,247
utf_8
6120e062d8c154359dfcf977a07ce6eb
function ff = embed(x, mask, varargin) %|function ff = embed(x, mask, varargin) %| embed x in nonzero elements of (logical) mask %| in %| x [np (L)] the "nonzero" pixels (lexicographically stacked) %| mask [(Nd)] logical array, np = sum(mask) %| option %| '*dim' {0|1} 0: [(N) (L)] (default); 1: return [(N) *L] %| o...
github
sunhongfu/scripts-master
lloyd_max_hist.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/lloyd_max_hist.m
4,365
utf_8
7c6c53b0980357b7e0752258250dbca4
function centers = lloyd_max_hist(data, centers, MM, tol, max_iter, chat) %|function centers = lloyd_max_hist(data, centers, MM, tol, max_iter, chat) %| %| "improved" version of the lloyd-max algorithm for scalar quantizer design %| that saves computation by histogramming the data first. %| Before using this, try usi...
github
sunhongfu/scripts-master
num2list.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/num2list.m
390
utf_8
0076ebb4ee93b833462e21640099a15d
function varargout = num2list(x) %function varargout = num2list(x) % % convert a numeric vector input into a comma separated list of output values % DOES NOT WORK! if nargin < 1, num2list_test, help(mfilename), error(mfilename), end %nargout %nargout = numel(x) %varargout = cell(size(x)); for ii=1:numel(x) varargou...
github
sunhongfu/scripts-master
cpu.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/cpu.m
1,462
utf_8
9c3b3cf49d0fa8f7180049a943c9356b
function out = cpu(arg, varargin) %|function out = cpu(arg, varargin) %| %| cpu etic %| cpu etoc printarg %| tic/toc elapsed time %| %| cpu etic %| cpu tic %| cpu toc %| cpu toc printarg %| work like tic/toc except they use cpu time instead of wall time. %| %| also: %| If printarg begins with a ':' then caller_name p...
github
sunhongfu/scripts-master
kde_pmf1.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/kde_pmf1.m
4,806
utf_8
014fb3c9ec686832ebae267a27b3f9e7
function [pmf xs] = kde_pmf1(x, varargin) %|function [pmf xs] = kde_pmf1(x, varargin) %| %| Compute an empirical probability mass function (PMF) using interpolation %| that is similar to a kernel density estimate. %| This routine is useful for making PMFs (interpolated / smoothed) histograms %| for computing entropy ...
github
sunhongfu/scripts-master
poly_string.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/poly_string.m
1,452
utf_8
5efc7525a6d221ad41a8e377311fd06c
function [str, d1, d2] = poly_string(order, varargin) %function [str, d1, d2] = poly_string(order, [options]) % make a string with all the terms in a 2d polynomial % up to given order, e.g. [1+0*x x y ...] % also return partial derivatives w.r.t. x and y % in % order % options % maxdegree maximum of sum of degrees (de...
github
sunhongfu/scripts-master
run_mfile_local.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/run_mfile_local.m
1,861
utf_8
10ab734b28bb404cd05ded222b52fe5a
function run_mfile_local(arg, varargin) %|function run_mfile_local(arg) %| run an mfile in a local environment so that workspace variables %| are untouched. useful for tests. %| arg can be a cell with many mfiles to run %| options %| 'draw' 1|0 1 to draw after each test (default: 0) %| 'pause' 1|0 1 to pause after e...
github
sunhongfu/scripts-master
minmax.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/minmax.m
2,324
utf_8
1b60715426dbb9ffeb27f85aa09fff8a
function r = minmax(x, varargin) %function r = minmax(x, dim) % Return mininum and maximum of values of input x. % Default is to examine the entire array. % Specify a dimension dim otherwise. % If dim is a string, print... % Copyright 2003, Jeff Fessler, University of Michigan if nargin < 1, help(mfilename), error(mf...
github
sunhongfu/scripts-master
masker.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/masker.m
884
utf_8
de844e9fcd7044d558d79c5644951dc9
function y = masker(x, mask) %|function y = masker(x, mask) %| extract from x the nonzero elements within (logical) mask %| in %| x [(Nd) (L)] image(s) %| mask [(Nd)] logical array, np = sum(mask) %| out %| y [np (L)] concise columns %| %| See also: embed %| %| Copyright 2004-9-28, Jeff Fessler, University of Michig...
github
sunhongfu/scripts-master
truncate_precision.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/truncate_precision.m
924
utf_8
0f0d50a4e0af0fded1105d0ee262b6d8
function y = truncate_precision(x, digits, varargin) %|function y = truncate_precision(x, digits, [option]) %| %| truncate x to "digits" signficant digits of precision %| option %| 'type' floor (default) | round | ceil %| %| Copyright 2008-11-05, Jeff Fessler, University of Michigan if nargin == 1 && streq(x, 'test...
github
sunhongfu/scripts-master
jf.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/jf.m
4,286
utf_8
4e7f9a86f93ffea5dbd3ef927829d18a
function out = jf(varargin) %|function out = jf(varargin) %| various personalization routines %| 'mv var_old var_new' %| 'ncore' # of cores this machine has %| add optional 2nd argument to over-ride, e.g., jf('ncore', 4) %| 'whos' %| 'clf' %| 'nobar' preclude toolbar and menubar from figures to render faster! %| 'no...
github
sunhongfu/scripts-master
vararg_pair.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/vararg_pair.m
6,046
utf_8
6b4318d95d5b5332f4aaf0ed91d43a86
function [opt, extra] = vararg_pair(opt, varargs, varargin) %function [opt, extra] = vararg_pair(opt, varargs, [options]) % Process name / value pairs, replacing the "default" field values % of the opt structure with the user-specified values. % This allows flexible argument order and "named arguments" somewhat like I...
github
sunhongfu/scripts-master
reshapee.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/reshapee.m
1,254
utf_8
74240ee060a675b89895e56891c7460d
function y = reshapee(x, varargin) %|function y = reshapee(x, varargin) %| %| reshape function that allows possibly one null argument, and all %| other arguments can be vectors, unlike matlab that requires scalars. %| example: reshape(rand(2*3*5,7), [2 3], [], 7) will become [2 3 5 7] %| %| in %| x [(*dim)] %| vararg...
github
sunhongfu/scripts-master
sinc_periodic.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/sinc_periodic.m
1,401
utf_8
6ded04b3754f67a5d4372c05ed651386
function x = sinc_periodic(t, K) %|function x = sinc_periodic(t, K) %| periodic sinc function, obtained by replicates of a sinc: %| x(t) = \sum_l sinc(t - l K) = ... = sin(pi*t) / tan(pi*t/K) / K for K even. %| This function is bandlimited and its samples are an impulse train. %| It is closely related to the Dirichle...
github
sunhongfu/scripts-master
poisson2.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/poisson2.m
1,772
utf_8
3b7335e80615537c281d420af6cce9fa
function data = poisson2(xm, varargin) %|function data = poisson2(xm, [options]) %| %| in %| 'xm' float %| %| option %| 'seed' int seed for 'rand' %| 'factor' double a value < 1 for rejection method %| %| Generate Poisson random column vector with mean xm. %| Uses rejection method - good for large values of xm....
github
sunhongfu/scripts-master
min_cos_quad.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/min_cos_quad.m
3,173
utf_8
096e10676fa8af29d31a265aa6d3c2dc
function t = min_cos_quad(m, p, b, c, niter) %|function t = min_cos_quad(m, p, b, c, niter) %| %| find the minimizer of the sinusoid + quadratic form: %| f(t) = m * (1-cos(t-p)) + b*t + c/2 t^2 %| %| This is useful for certain phase-related optimization transfer problems. %| %| Copyright 2003-11-9, Jeff Fessler, Univ...
github
sunhongfu/scripts-master
kde_pmf2.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/kde_pmf2.m
6,301
utf_8
2d56a911549ea0f282371a9122e09d0f
function [pmf xs ys] = kde_pmf2(x, y, varargin) %|function [pmf xs ys] = kde_pmf2(x, y, varargin) %| %| Compute a 2D empirical joint probability mass function (PMF) %| using interpolation that is similar to a kernel density estimate. %| This joint PMF (interpolated / smoothed histogram) is useful for %| computing joi...
github
sunhongfu/scripts-master
rms.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/rms.m
728
utf_8
0d6bd4bfbbbaefcae75fe8279a34586a
function [rhat, s] = rms(x) %function [rhat, s] = rms(x) % function [r, s] = rms(err) % in: % x: NxM error vectors % out: % r: Mx1 estimate of rms error % s: Mx1 estimate of std. dev. of that estimate if streq(x, 'test'), rms_test, return, end N = nrow(x); if (N==1), error('ERROR: use column vector'), end bs = mean...
github
sunhongfu/scripts-master
stackup.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/stackup.m
1,652
utf_8
cb32cb88cf030cac059a98ae7524b920
function ss = stackup(varargin) %|function ss = stackup(x1, x2, ...) %| %| stack up 2D arrays to make 3D array %| or stack up 3D arrays to make 4D array %| This generalizes how [a; b] "stacks up" 1D vectors to make a 2D array. %| This is useful in conjunction with stackpick(). %| It is akin to cat(ndims(x1)+1, x1, x2...
github
sunhongfu/scripts-master
bspline_1d_synth.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/bspline_1d_synth.m
7,547
utf_8
22d198ab32dbead6b3027041488ae871
function ft = bspline_1d_synth(coef, ti, varargin) %|function ft = bspline_1d_synth(coef, ti, varargin) %| %| Given c[n], the b-spline coefficients for the following model: %| f(t) = \sum_{k=0}^{N-1} coef_k b(t - k), %| and given sorted sample locations ti, synthesize signal samples f(t_i). %| %| in %| coef [N,(L)] ...
github
sunhongfu/scripts-master
strum_test.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/strum_test.m
1,450
utf_8
5f9ccc49384242173e665bfc02436bde
function strum_test %function strum_test % test strum object % Copyright 2006-1-19, Jeff Fessler, University of Michigan dat.a = 'a'; dat.b = 'b'; h0 = @strum_test_fun0; h1 = @(st, arg) [st.a arg]; h2 = @(st, arg) sum(arg); % with comment st = strum(dat, {'fun0', h0, ''; 'fun1', h1, '(arg)'; 'fun2', h2, '(arg)'}) st...
github
sunhongfu/scripts-master
highrate_centers.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/highrate_centers.m
1,973
utf_8
fa074a06d856dfb3fc5ae1f1901a054a
function centers = highrate_centers(data, L, M) %|function centers = highrate_centers(data, L, M) %| According to high-rate scalar quantization theory (Gersho, T-IT, 1979), %| the density of MMSE quantization cell centroids should be f^{k/(k+2)}, %| for k-dimensional data distributed with pdf f. %| This m-file design...
github
sunhongfu/scripts-master
padn.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/padn.m
1,336
utf_8
4822bab375497160ba2c475697fec6a7
function out = padn(mat, newdim) %|function out = padn(mat, newdim) %| pad input matrix to newdim, preserving 'center point' %| todo: replace by matlab's "padarray" if nargin < 1, help(mfilename), error(mfilename), end if streq(mat, 'test'), padn_test, return, end % default: round to next up power of 2 if nargin < ...
github
sunhongfu/scripts-master
reale.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/reale.m
1,973
utf_8
d7514474903cc0261796237d78f5ae02
function y = reale(x, arg2, arg3) %| %| y = reale(x) %| y = reale(x, tol) %| y = reale(x, 'warn', 'message') %| y = reale(x, 'error') %| y = reale(x, 'report') %| y = reale(x, 'prompt') %| y = reale(x, 'disp') %| %| return real part of complex data (with error checking). %| checks that imaginary part is negligible (or ...
github
sunhongfu/scripts-master
equivs.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/equivs.m
1,610
utf_8
f9ca1bd1ae3239b4f775ac31f6874f9a
function out = equivs(var1, var2, varargin) %|function out = equivs(var1, var2, command) %| verify that var1 and var2 are equivalent to within single precision accuracy %| if not, print error message. an alternative to isequal(). %| See also: jf_equal %| option %| 'thresh' threshold (default: 1e-6) %| Copyright 2007...
github
sunhongfu/scripts-master
jf_rm_toolbox.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/private/jf_rm_toolbox.m
686
utf_8
97251af0ce7418ae4ee9e0a24ae04b72
function jf_rm_toolbox % remove matlab toolboxes from path % for testing my toolbox with vanilla matlab rm aero rm aeroblks rm bioinfo rm comm rm commblks rm compiler rm control rm curvefit rm database rm des rm distcomp rm dspblks rm eml rm emlcoder rm filterdesign rm finance rm fixedpoint rm fuzzy rm geoweb rm ident...
github
sunhongfu/scripts-master
jf_prctile.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/private/jf_prctile.m
1,066
utf_8
4f9221f4120fbff5aa6add943c5a1ac9
function y = jf_prctile(pn, x, p, dim) % mimic matlab's prctile which is in the "stats" toolbox if streq(x, 'test'), jf_prctile_test, y = []; return, end if nargin < 3, help(mfilename), error(mfilename), end % work with permuted dimensions if needed if nargin > 3 && ~isempty(dim) order = [dim:ndims(x) 1:dim-1]; x =...
github
sunhongfu/scripts-master
jf_color_order.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/private/jf_color_order.m
984
utf_8
009a5177b58c46e4e5ed781f43bdf930
function out = jf_color_order(pn, varargin) %function out = jf_color_order(pn, varargin) % set color order to start with yellow then cyan etc., for black background if ~length(varargin) out = jf_color_order_bw; return end out = []; switch varargin{1} case 'revert' set(0, 'DefaultAxesColorOrder', 'default') retu...
github
sunhongfu/scripts-master
jf_struct_recurse.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/private/jf_struct_recurse.m
1,824
utf_8
d7849c16991e5a735db1c20c9bfe3a79
function out = jf_struct_recurse(pn, st, varargin) %|function out = jf_struct_recurse(pn, st, varargin) %| %| Recursively descend a structure and examine its (numeric) members %| % Copyright 2010-04-05, Jeff Fessler, University of Michigan if nargin < 1, help(mfilename), error(mfilename), end arg.type = 'minmax_nan...
github
sunhongfu/scripts-master
display.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/@strum/display.m
1,036
utf_8
bf17c2af3d0e12d5ea0fb3c4ae23eeb8
function display(ob) %function display(ob) % "display" method for this class name = inputname(1); printm('"%s" is an object of class "%s":', name, class(ob)) ob = struct(ob); disp(ob) fnames = fieldnames(ob); for ii=1:length(fnames) fname = fnames{ii}; if isstruct(ob.(fname)) printf('%s.%s :', inputname(1), fnam...
github
sunhongfu/scripts-master
mat_write.m
.m
scripts-master/cs-phase/_src/_NUFFT/utilities/arch/mat_write.m
2,626
utf_8
51f2b89c210296ee2a33b698ceaa1ab8
function mat_write(file, data, varargin) %function mat_write(file, data, % ['-check', '-nocheck', '-type', datatype, '-name', varname]) % % Save matlab "data" to "file", first checking if "file" exists! % If file suffix is .fld, then save as AVS .fld file in xdr_float. % % datatype can be 'xdr_float' 'xdr_int' ... % ...
github
sunhongfu/scripts-master
fftn_fast.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/fftn_fast.m
2,536
utf_8
45eea8a7988be9d007556ae10931481b
function Xs = fftn_fast(xs, ns) %|function Xs = fftn_fast(xs, ns) %| %| For some reason, in matlab versions before about 7.4 (R2007a), %| matlab's fftn routine was suboptimal for the case of 2D FFTs, %| at least on some machines. %| The improvement herein was found by Hugo Shi. %| After 7.4, fftn worked fine so this ...
github
sunhongfu/scripts-master
nufft_init.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/nufft_init.m
9,078
utf_8
8404dab6a378286f60e1ec96e8a03af3
function st = nufft_init(om, Nd, Jd, Kd, varargin) %|function st = nufft_init(om, Nd, Jd, Kd, [n_shift,] ...) %| %| Initialize structure for d-dimension NUFFT using KB interpolator, %| particularly the interpolation matrix in sparse format. %| caution: this routine can require a lot of memory! %| in %| om [M d] "digi...
github
sunhongfu/scripts-master
dtft.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/dtft.m
2,364
utf_8
78368b81b43c5297ff33dc20d9dc0974
function X = dtft(x, omega, n_shift, useloop) %|function X = dtft(x, omega, n_shift, useloop) %| Compute d-dimensional DTFT of signal x at frequency locations omega %| in %| x [[Nd] L] signal values %| omega [M dd] frequency locations (radians) %| n_shift [dd 1] use [0:N-1]-n_shift (default [0 0]) %| useloop 1 to...
github
sunhongfu/scripts-master
newfft.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/newfft.m
18,090
utf_8
ebae560263354d06eae466d1a6dd77f9
function st = newfft(om_in, Nd_in, varargin) %|function st = newfft(om, Nd, [options]) %| %| New version of NUFFT (pun intended) that uses real interpolation kernels. %| (The original NUFFT code used complex interpolation needlessly.) %| %| This returns a "strum" object with methods for both forward and adjoint %| d-...
github
sunhongfu/scripts-master
kaiser_bessel.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/kaiser_bessel.m
4,245
utf_8
eb663e2f74fb509c947663fb2c6d4b88
function [kb, alpha, kb_m] = kaiser_bessel(x, J, alpha, kb_m, K_N) %|function [kb, alpha, kb_m] = kaiser_bessel(x, J, alpha, kb_m) %|function [kb, alpha, kb_m] = kaiser_bessel(x, J, 'best', 0, K_N) %| %| generalized Kaiser-Bessel function for x in support [-J/2,J/2] %| shape parameter "alpha" (default 2.34 J) %| orde...
github
sunhongfu/scripts-master
kaiser_bessel_xray.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/kaiser_bessel_xray.m
2,169
utf_8
5d1893ab2d3217a9310948fe67ff7453
function [proj, J, alpha, kb_m, d] = kaiser_bessel_xray(r, J, alpha, kb_m, d) %function [proj, J, alpha, kb_m, d] = kaiser_bessel_xray(r, J, alpha, kb_m, d) % % X-ray transform of generalized Kaiser-Bessel function, % See (A7) in lewitt:90:mdi, JOSA-A, Oct. 1990. % % in % r [?] radial locations in projection space (un...
github
sunhongfu/scripts-master
kaiser_bessel_ft.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/kaiser_bessel_ft.m
2,914
utf_8
13471fc4abc2633a97527aa5e19431f1
function y = kaiser_bessel_ft(u, J, alpha, kb_m, d) %function y = kaiser_bessel_ft(u, J, alpha, kb_m, d) % % Fourier transform of generalized Kaiser-Bessel function, % in dimension d (default 1). % shape parameter "alpha" (default 2.34 J) % order parameter "kb_m" (default 0) % See (A3) in lewitt:90:mdi, JOSA-A, Oct. 1...
github
sunhongfu/scripts-master
ifftn_fast.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/ifftn_fast.m
2,149
utf_8
3749fee0395f552bc7cf2430bba890df
function ys = ifftn_fast(xs) %|function ys = ifftn_fast(xs) %| %| For some reason, matlab's ifftn routine is suboptimal %| for the case of 2D FFTs, at least on some machines. %| The improvement herein was found by Hugo Shi. %| %| Note: matlab's ifft() and ifftn() handle an optional second "N" argument in %| different...
github
sunhongfu/scripts-master
nufft1_build.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/nufft1_build.m
6,859
utf_8
1cd441b39294fac147ef52f7458c84b7
function st = nufft1_build(J, varargin) %function st = nufft1_build(J, [option]) % Build 1D LS-NUFFT interpolation coefficients by brute force. % % in % J neighborhood size: [-J/2,J/2] % option % om [M,1] frequency locations, if not provided build fine table % N # of signal values (default: 2^8) % K # of DFT freque...
github
sunhongfu/scripts-master
nufft_scale.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/nufft_scale.m
1,781
utf_8
478adbf2f70bd98ff5d978defd79cdda
function sn = nufft_scale(Nd, Kd, alpha, beta, Nmid) %function sn = nufft_scale(Nd, Kd, alpha, beta, Nmid) % Compute scaling factors for NUFFT % in % Nd,Kd % alpha {d} % beta {d} % option % Nmid [d] midpoint: floor(Nd/2) or default (Nd-1)/2 % out % sn [[Nd]] scaling factors % % Copyright 2004-7-8, Jeff Fessler, The ...
github
sunhongfu/scripts-master
nufft_sinc.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/nufft_sinc.m
695
utf_8
e6857ad90712d847152c31e539b33d09
function y = nufft_sinc(x) %|function y = nufft_sinc(x) %| %| my version of "sinc" function, because matlab's sinc() is in a toolbox %| %| Copyright 2001-12-8, Jeff Fessler, University of Michigan if nargin < 1, help(mfilename), error(mfilename), end if streq(x, 'test'), nufft_sinc_test, return, end iz = find(x == ...
github
sunhongfu/scripts-master
nufft_diric.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/nufft_diric.m
1,999
utf_8
271ee48427961a368e4e0f64f481e0c1
function f = nufft_diric(k, N, K, use_true_diric) %|function f = nufft_diric(k, N, K, use_true_diric) %| %| "regular fourier" Dirichlet-function WITHOUT phase %| nufft_diric(t) = sin(pi N t / K) / ( N * sin(pi t / K) ) %| \approx sinc(t / (K/N)) %| %| caution: matlab's version is different: sin(N * x / 2) / (N * sin...
github
sunhongfu/scripts-master
dtft_adj.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/dtft_adj.m
2,511
utf_8
6c948619bad55598699158ec924d0363
function x = dtft_adj(X, omega, Nd, n_shift, useloop) %|function x = dtft_adj(X, omega, Nd, n_shift, useloop) %| Compute adjoint of d-dim DTFT for spectrum X at frequency locations omega %| in %| X [M L] dD DTFT values %| omega [M d] frequency locations (radians) %| n_shift [d 1] use [0:N-1]-n_shift (default [0 .....
github
sunhongfu/scripts-master
interp1_table1_import.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/table/interp1_table1_import.m
413
utf_8
0e4818f872ba8ea210db56495b187e58
function interp1_table1_import libname = 'interp1_table1.a'; type11r = ['double[K1] r_ck, double[K1] i_ck, int32 K1, ' ... 'double[J1*L1+1] r_h1, int32 J1, int32 L1, ' ... 'double[M] p_tm, int32 M, double[M] &r_fm, double[M] &i_fm']; myimport(libname, 'interp1_table1_real_per', 'void', type11r); function myimport...
github
sunhongfu/scripts-master
nufft_interp_zn.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/private/nufft_interp_zn.m
2,194
utf_8
19b50f0ee43faa6a8824265f0516a25a
function zn = nufft_interp_zn(alist, N, J, K, func, Nmid) %|function zn = nufft_interp_zn(alist, N, J, K, func, Nmid) %| compute the "zn" terms for a conventional "shift-invariant" interpolator %| as described in T-SP paper. needed for error analysis and for user- %| defined kernels since i don't provide a means to ...
github
sunhongfu/scripts-master
newfft_approx_for.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/private/newfft_approx_for.m
1,794
utf_8
9f6f995e5bc3c9e4502d112ffc5c7b8c
function X = newfft_approx_for(st, x, om) %|function X = newfft_approx_for(st, x, om) %| (approximate) forward NUFFT Nd = st.Nd; Kd = st.Kd; dims = size(x); dd = length(Nd); if ndims(x) < dd, error 'input signal has too few dimensions', end if any(dims(1:dd) ~= Nd), error 'input signal has wrong size', end % % th...
github
sunhongfu/scripts-master
newfft_table_init.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/private/newfft_table_init.m
5,809
utf_8
7d5daa487f47227d1e7c4f7aa4d09e1f
function st = newfft_table_init(st, varargin) %|function st = newfft_table_init(st, varargin) %| %| Initialize structure for d-dimension NUFFT using table-based interpolator, %| This should be called only by newfft for its 'table0' or 'table1' mode! %| Note: default oversample factor is 2^11 or 2^13 %| %| in %| st s...
github
sunhongfu/scripts-master
nufft_offset.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/private/nufft_offset.m
1,160
utf_8
484e73add0ea3fc089c87836e367f318
function k0 = nufft_offset(om, J, K) %|function k0 = nufft_offset(om, J, K) %| offset for NUFFT %| in %| om [M,1] omega (radians), typically in [-pi, pi) (not essential!) %| J # of neighbors used for NUFFT interpolation %| K FFT size %| %| out %| k0 [M,1] prepared for mod(k0 + [1:J], K) (+ 1 for matlab) %| %| Copyri...
github
sunhongfu/scripts-master
nufft2_bilinear.m
.m
scripts-master/cs-phase/_src/_NUFFT/nufft/archive/nufft2_bilinear.m
3,187
utf_8
ea5b3bd8bd47648f7f1c97dcfd1dd051
function X = nufft2_bilinear(omega, x, K1, K2, n_shift) %function X = nufft2_bilinear(omega, x, K1, K2, n_shift) % in: % omega [M 2] frequencies in radians % x [N1 N2] image dimensions % J # of neighbors used % K1,K2 FFT sizes (should be > N1,N2) % n_shift [2] n = 0-n_shift to N-1-n_shift % out: % X [M 1]...
github
sunhongfu/scripts-master
mtimes_block.m
.m
scripts-master/cs-phase/_src/_NUFFT/@Fatrix/mtimes_block.m
1,276
utf_8
11f89a7167f3f66a965c297a8620dcd5
function y = mtimes_block(ob, x, istart, nblock) %function y = mtimes_block(ob, x, istart, nblock) % y = G(i'th block) * x or y = G'(i'th block) * x % in either case the projection data will be "small" % istart is 1,...,nblock % support 'exists' option for seeing if this routine is available if nargin == 2 & ischar(x...
github
sunhongfu/scripts-master
mtimes.m
.m
scripts-master/cs-phase/_src/_NUFFT/@Fatrix/mtimes.m
1,374
utf_8
b01e213ce10f513c5f91f944f5e7d1f4
function y = mtimes(ob, x) %function y = mtimes(ob, x) % y = M * x or x = M' * y if ~isa(ob, 'Fatrix') error 'only multiplication on right is done' end if isa(x, 'Fatrix') % object1 * object2, tested in Gcascade y = Gcascade(ob, x); return end % % partial multiplication? % if ob.is_subref error 'subref not done'...
github
sunhongfu/scripts-master
do_cascade.m
.m
scripts-master/cs-phase/_src/_NUFFT/@Fatrix/private/do_cascade.m
870
utf_8
c5e864c129913ce1841a0ce0b0ddacda
function y = do_cascade(cascade, x, is_transpose, istart, nblock, is_before) %function y = do_cascade(cascade, x, is_transpose, istart, nblock, is_before) % do cascade * x or cascade' * x if isempty(cascade) y = x; elseif isa(cascade, 'function_handle') | isa(cascade, 'inline') if nargin(cascade) == 4 y = feval(...
github
sunhongfu/scripts-master
read_twix_hdr.m
.m
scripts-master/cs-phase/_src/_mapVDVD/read_twix_hdr.m
5,914
utf_8
c62a37e267b68781bba89e01ddf83da4
function [prot,rstraj] = read_twix_hdr(fid) % function to read raw data header information from siemens MRI scanners % (currently VB and VD software versions are supported and tested). % % Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de), Mar/11/2014 nbuffers = fread(fid, 1,'uint32'); prot =...
github
sunhongfu/scripts-master
mapVBVD.m
.m
scripts-master/cs-phase/_src/_mapVDVD/mapVBVD.m
34,998
windows_1250
609b42aff0dc8a0c266c8ef4aab4e389
function twix_obj = mapVBVD(filename,varargin) % Reads Siemens raw .dat file from VB/VD MRI raw data. % requires twix_map_obj.m & read_twix_hdr.m % % % Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de) % % % Philipp Ehses 11.02.07, original version % [..] % Philipp Ehses 22.03.11, port to VD11...
github
sunhongfu/scripts-master
phantom3d.m
.m
scripts-master/YangGao/phantom3d.m
8,305
utf_8
b9b524c7621b925703851eece75cedde
function [p,ellipse]=phantom3d(varargin) %PHANTOM3D Three-dimensional analogue of MATLAB Shepp-Logan phantom % P = PHANTOM3D(DEF,N) generates a 3D head phantom that can % be used to test 3-D reconstruction algorithms. % % DEF is a string that specifies the type of head phantom to generate. % Valid values ar...
github
sunhongfu/scripts-master
recon_all_data.m
.m
scripts-master/AHEAD/tinaroo/recon_all_data.m
10,136
utf_8
1f4230494bdf29cdfbe9e994c3e2f0c7
% recon code for AHEAD sample data function recon_all_data(sub_no) curDir = '/QRISdata/Q1041/AHEAD/AHEAD_v2'; cd(curDir) % for sub_no = 1 : 1 : 105 % load in phase and mag if sub_no < 51 datafolder = 'part1_v2'; else datafolder = 'part2_v2'; e...
github
sunhongfu/scripts-master
phantom_lcurve.m
.m
scripts-master/LN-QSM/phantom_lcurve.m
4,102
utf_8
de2edf5838b6fd782d17c0f8b21a3556
function [Res_term,TV_term,Tik_term] = phantom_lcurve(mask_tissue, field) TIKs={'10.0000e-006', '18.3298e-006', '33.5982e-006', '61.5848e-006', '112.8838e-006', '206.9138e-006', '379.2690e-006', '695.1928e-006', '1.2743e-003', '2.3357e-003', '4.2813e-003', '7.8476e-003', '14.3845e-003', '26.3665e-003', '48.3293e-003',...
github
sunhongfu/scripts-master
normalize_chi.m
.m
scripts-master/LN-QSM/atlas_meas/normalize_chi.m
4,648
utf_8
cf2083aa8bb3fc825f4aabb7179bfe6e
function normalize_chi(seg_dir, chi, refregion) %seg_dir = [master_dir, subjectID, '/QSM_baseline/', 'seg/']; [chi_dir, chi_filename, chi_file_ext] = fileparts(chi); defineMasks; if (strcmp(refregion, 'dwm')) chi_dir = [chi_dir, '/chi_dwm_ref']; if (~exist(chi_dir, 'dir')) mkdir(chi_dir); end ...
github
sunhongfu/scripts-master
tik_qsm_helix.m
.m
scripts-master/HELIX/tik_qsm/tik_qsm_helix.m
7,399
utf_8
b26b1e788eb4ce6b9d6a1c9ca7b455f2
%Tik-QSM helix script function tik_qsm_helix(data_path,erosion) erosion = str2num(erosion); cd(data_path); load('all.mat','mask','R','matrix_size','voxel_size','delta_TE','B0_dir','CF','iMag','N_std','iFreq','tfs','vox','dicom_info','z_prjs'); % apply R mask = mask.*R; % mask_erosion r = 1; [X,Y,Z] = ndgrid(-...
github
sunhongfu/scripts-master
fast_match.m
.m
scripts-master/MRF/recon/_src/fast_match.m
2,367
utf_8
0553bffb21a5aba89df9d74900aadc61
%%-----------------------------------------------------------------------%% % Authors: M.A. Cloos % Martijn.Cloos@nyumc.org % Date: 2019 april 23 % New York University School of Medicine, www.cai2r.net %%-----------------------------------------------------------------------%% function [ maps, fits ] = fast_m...
github
sunhongfu/scripts-master
make_mask.m
.m
scripts-master/MRF/recon/_src/make_mask.m
1,199
utf_8
be32180c308123c70236e66645a8f9b9
%%-----------------------------------------------------------------------%% % Authors: M.A. Cloos % Martijn.Cloos@nyumc.org % Date: 2019 March 3 % New York University School of Medicine, www.cai2r.net %%-----------------------------------------------------------------------%% function [mask] = make_mask(img, ...
github
sunhongfu/scripts-master
mrf_match_cpp.m
.m
scripts-master/MRF/recon/_src/mrf_match_cpp.m
1,329
utf_8
08aa32f48dff6ba7d52f53939d4d4aa0
% MRF_MATCH_CPP: performs the dictionary matching via a exteral c++ program %%-----------------------------------------------------------------------%% % Authors: M.A. Cloos % Martijn.Cloos@nyumc.org % Date: 2016 Oct 4 % New York University School of Medicine, www.cai2r.net %%-------------------------------...
github
sunhongfu/scripts-master
make_im.m
.m
scripts-master/MRF/recon/_src/make_im.m
1,301
utf_8
4af368d0a66197174fd5090e9cb63fb7
%%-----------------------------------------------------------------------%% % Authors: M.A. Cloos % Martijn.Cloos@nyumc.org % Date: 2019 March 3 % New York University School of Medicine, www.cai2r.net %%-----------------------------------------------------------------------%% function [img] = make_im(MrData) ...
github
sunhongfu/scripts-master
opt_comb.m
.m
scripts-master/MRF/recon/_src/opt_comb.m
805
utf_8
726066a1c0e3471e0fdf31cc29553ff9
%%-----------------------------------------------------------------------%% % Authors: M.A. Cloos % Martijn.Cloos@nyumc.org % Date: 2019 March 3 % New York University School of Medicine, www.cai2r.net %%-----------------------------------------------------------------------%% function [opt_img] = opt_comb(img...
github
sunhongfu/scripts-master
make_rx.m
.m
scripts-master/MRF/recon/_src/make_rx.m
2,625
utf_8
11c81b237689886f8c4b3833a00333f2
%%-----------------------------------------------------------------------%% % Authors: M.A. Cloos % Martijn.Cloos@nyumc.org % Date: 2019 March 3 % New York University School of Medicine, www.cai2r.net %%-----------------------------------------------------------------------%% function [I_rx] = make_rx(MrData,...
github
sunhongfu/scripts-master
mapVBVD.m
.m
scripts-master/MRF/recon/_src/_mapVBVD/mapVBVD.m
26,600
utf_8
a53854086a152c018d77f2e6027b0633
function twix_obj = mapVBVD(filename,varargin) % Reads Siemens raw .dat file from VB/VD MRI raw data. % % Requires twix_map_obj.m % % Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de) % % % Philipp Ehses 11.02.07, original version % [..] % Philipp Ehses 22.03.11, port to VD11 % Felix Breuer 31...
github
sunhongfu/scripts-master
twix_map_obj.m
.m
scripts-master/MRF/recon/_src/_mapVBVD/twix_map_obj.m
36,408
utf_8
8ed9b559d38d7c95030609766d195fd5
classdef twix_map_obj < handle % class to hold information about raw data from siemens MRI scanners % (currently VB and VD software versions are supported and tested). % % Author: Philipp Ehses (philipp.ehses@tuebingen.mpg.de), Aug/19/2011 % % % Modified by Wolf Blecher (wolf.blecher@tuebingen.mpg.de), Apr/26/2012 % A...