Home
Manual
Packages
Global Index
Keywords
Quick Reference
|
functions in correl.i - D
Dtwoptcor1D
|
returns
the 1+xi, the corrected number of pairs found in the 1D cloud of points
dist= gives the oportunity to specify the distance to be used.
period = allows for periodic boundary conditions (warning period *is* the period)
fun is a function of the vector distance and fx which
returns a scalar weight which is applied to all pairs: the weighting is fun(x,x1,fx,fx1)
// random noise
rrange=span(1e-4,1e-1,50);
cc=[]; for(i=1;i<=5;i++){ pp=2^7; tt=Dtwoptcor1D(random(pp),rrange,period=1); grow,cc,[tt]; }pler,cc-1,mean=1
// GRF
require, "Chris/randfield.i"
cc=[]; for(i=1;i<=15;i++){ tt=Dtwoptcor1D(Dgenrandfield1D(2^10),rrange,period=1); grow,cc,[tt]; }
// check that both ways of measuring a correlation are equivalent
cc=dd=[]; for(i=1;i<=15;i++){ rrange=span(1e-4,0.5,2^7); x=Dgenrandfield1D(2^10,u,pp=2^8);tt=Dtwoptcor1D(x,rrange,period=1); grow,cc,[tt]; grow,dd,[twoptcor1D(u/avg(u)-1,ft=1,iso=1)]; } pler,cc-1,mean=1; pler,dd,mean=1,color=-1;
// test weighting
pp=64; tt=Dtwoptcor1D(random(pp),rrange,fun=__tst_fun_wght1D,fx=random_normal(pp))
interpreted function, defined at contrib/correl.i line 95
|
SEE ALSO:
|
|
Dtwoptcor2D
|
returns
the 1+xi, the corrected excess number of pairs found in the 2D cloud of points
dist= gives the oportunity to specify the distance to be used.
period = allows for periodic boundary conditions (warning period *is* the period)
fun = is a function of the vector distance and which
returns a scalar weight which is applied to all pairs: the weighting is fun(xy,xy2,fxy,fxy2))
EXAMPLE
random noise;
cc=[];pp=1000; for(i=1;i<=15;i++){ u=random(2,pp);tt=Dtwoptcor2D(u,rrange,period=1); grow,cc,[tt];}
gaussian field
require, "Chris/randfield.i";
cc=[]; for(i=1;i<=25;i++){ pp=2^10; xy=Dgenrandfield2D(pp); tt=Dtwoptcor2D(transpose(xy),rrange); grow,cc,[tt]; }
pler,cc-1,mean=1;
// this doesn't seem to work fully well at this stage...
ws;cc=dd=[]; for(i=1;i<=50;i++){ rrange=span(1e-4,0.5,2^7); xy=Dgenrandfield2D(2^12,u,pp=2^8);tt=Dtwoptcor2D(transpose(xy),rrange,period=1); grow,cc,[tt]; grow,dd,[twoptcor2D(u/avg(u)-1,ft=1,iso=1)(1:2^7)]; } pler,cc-1,mean=1; pler,dd,mean=1,color=-1;
pp=64; tt=Dtwoptcor2D(random(2,pp),rrange,fun=__tst_fun_wght2D,fxy=random_normal(pp))
interpreted function, defined at contrib/correl.i line 194
|
SEE ALSO:
|
|
Dtwoptcor3D
|
returns
the 1+xi, the corrected excess number of pairs found in the 2D cloud of points
dist= gives the oportunity to specify the distance to be used.
period = allows for periodic boundary conditions (warning period *is* the period)
fun = is a function of the positions xyz and xyz2 and a (possibly vector) field fxyz and fxyz2 which
returns a scalar weight which is applied to all pairs: the weighting is fun(xyz,xyz2,fxyz,fxyz2)
TODO : deal with log rrange
deal with proper correction for
EXAMPLE
cc=[]; for(i=1;i<=15;i++){ pp=1500; u=random(3,pp);tt=Dtwoptcor3D(u,rrange,period=1); grow,cc,[tt];}
pler,cc,mean=1,color=-1,marker=-1;
// need to account for window;
// might want to consider linear sampling ...
interpreted function, defined at contrib/correl.i line 293
|
SEE ALSO:
|
|
|