Changeset 40758
- Timestamp:
- May 30, 2019, 6:05:51 AM (7 years ago)
- Location:
- branches/eam_branches/ohana.20190329/src/opihi/cmd.data
- Files:
-
- 2 added
- 4 edited
-
Makefile (modified) (2 diffs)
-
init.c (modified) (2 diffs)
-
medimage_calc.c (added)
-
medimage_commands.c (modified) (2 diffs)
-
mgaussdev.c (added)
-
test/medimage.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20190329/src/opihi/cmd.data/Makefile
r40752 r40758 95 95 $(SRC)/mcreate.$(ARCH).o \ 96 96 $(SRC)/medacc.$(ARCH).o \ 97 $(SRC)/mgaussdev.$(ARCH).o \ 97 98 $(SRC)/mget.$(ARCH).o \ 98 99 $(SRC)/mget3d.$(ARCH).o \ … … 101 102 $(SRC)/medimage.$(ARCH).o \ 102 103 $(SRC)/medimage_commands.$(ARCH).o \ 104 $(SRC)/medimage_calc.$(ARCH).o \ 103 105 $(SRC)/mset.$(ARCH).o \ 104 106 $(SRC)/needles.$(ARCH).o \ -
branches/eam_branches/ohana.20190329/src/opihi/cmd.data/init.c
r40752 r40758 85 85 int mcreate PROTO((int, char **)); 86 86 int medacc PROTO((int, char **)); 87 int mgaussdev PROTO((int, char **)); 87 88 int mget PROTO((int, char **)); 88 89 int mget3d PROTO((int, char **)); … … 273 274 {1, "imcreate", mcreate, "create an image"}, 274 275 {1, "medacc", medacc, "accumulate vector values in another vector"}, 276 {1, "mgaussdev", mgaussdev, "generate a gaussian deviate image"}, 275 277 {1, "mget", mget, "extract a vector from an image"}, 276 278 {1, "mget3d", mget3d, "extract a vector from a 3D image"}, -
branches/eam_branches/ohana.20190329/src/opihi/cmd.data/medimage_commands.c
r40755 r40758 1 1 # include "data.h" 2 3 float weight_cauchy_square_flt (float x2);4 float irls_mean (float *val, float *wgt, int N);5 6 # define IRLS_TOLERANCE 1e-47 2 8 3 int medimage_list (int argc, char **argv) { … … 85 80 return TRUE; 86 81 } 87 88 enum {CALC_MEDIAN, CALC_MEAN, CALC_IRLS, CALC_WTMEAN};89 int medimage_calc (int argc, char **argv) {90 91 int ix, iy, n, N;92 Buffer *output;93 94 int mode = CALC_MEDIAN;95 if ((N = get_argument (argc, argv, "-mean"))) {96 mode = CALC_MEAN;97 remove_argument (N, &argc, argv);98 }99 if ((N = get_argument (argc, argv, "-irls"))) {100 if (mode != CALC_MEDIAN) { gprint (GP_ERR, "supply only one of -mean, -irls, -wtmean\n"); return FALSE; }101 mode = CALC_IRLS;102 remove_argument (N, &argc, argv);103 }104 if ((N = get_argument (argc, argv, "-wtmean"))) {105 if (mode != CALC_MEDIAN) { gprint (GP_ERR, "supply only one of -mean, -irls, -wtmean\n"); return FALSE; }106 mode = CALC_WTMEAN;107 remove_argument (N, &argc, argv);108 }109 110 Buffer *variance = NULL;111 if ((N = get_argument (argc, argv, "-variance"))) {112 remove_argument (N, &argc, argv);113 if ((variance = SelectBuffer (argv[N], ANYBUFFER, TRUE)) == NULL) return (FALSE);114 remove_argument (N, &argc, argv);115 }116 117 if (argc != 3) {118 gprint (GP_ERR, "USAGE: medimage calc (name) (output) [-mean,-irls,-wtmean]\n");119 gprint (GP_ERR, " calculate the median image for the median image set\n");120 return FALSE;121 }122 123 MedImageType *median = FindMedImage (argv[1]);124 if (!median) {125 gprint (GP_ERR, "median image %s not found\n", argv[1]);126 return FALSE;127 }128 129 if ((output = SelectBuffer (argv[2], ANYBUFFER, TRUE)) == NULL) return (FALSE);130 131 int Ninput = median->Ninput;132 int Nx = median->Nx;133 int Ny = median->Ny;134 135 ALLOCATE_PTR (val, float, Ninput);136 ALLOCATE_PTR (wgt, float, Ninput);137 138 gfits_free_matrix (&output->matrix);139 gfits_free_header (&output->header);140 if (!CreateBuffer (output, Nx, Ny, -32, 0.0, 1.0)) return FALSE;141 142 float *outvalue = (float *) output->matrix.buffer;143 144 for (iy = 0; iy < Ny; iy++) {145 for (ix = 0; ix < Nx; ix++) {146 147 int N = 0;148 int Npix = ix + Nx*iy;149 for (n = 0; n < Ninput; n++) {150 float v = median->flx[n][Npix];151 if (!isfinite(v)) continue;152 val[N] = v;153 wgt[N] = 1.0;154 if (median->var[n]) {155 float s = median->var[n][Npix];156 if (!isfinite(s)) continue;157 if (fabs(s) < 2*FLT_MIN) s = 2*FLT_MIN;158 wgt[N] = 1.0 / s;159 }160 N++;161 }162 if (N == 0) continue;163 164 switch (mode) {165 case CALC_MEDIAN:166 fsort (val, N);167 outvalue[Npix] = val[(int)(0.5*N)];168 break;169 case CALC_MEAN: {170 float sum = 0.0;171 for (n = 0; n < N; n++) {172 sum += val[n];173 }174 outvalue[Npix] = sum / (float) N;175 break;176 }177 case CALC_WTMEAN: {178 float S1 = 0.0, S2 = 0.0;179 for (n = 0; n < N; n++) {180 S1 += wgt[n] * val[n];181 S2 += wgt[n];182 }183 outvalue[Npix] = S1 / S2;184 break;185 }186 case CALC_IRLS:187 outvalue[Npix] = irls_mean (val, wgt, N);188 }189 }190 }191 return TRUE;192 }193 194 float irls_mean (float *val, float *wgt, int N) {195 196 // calculate weighted mean197 float S1 = 0.0, S2 = 0.0;198 for (int n = 0; n < N; n++) {199 S1 += wgt[n] * val[n];200 S2 += wgt[n];201 }202 float Value = S1 / S2;203 204 int converged = FALSE;205 for (int i = 0; (i < 10) && !converged; i++) {206 float ValueLast = Value;207 208 float S1 = 0.0, S2 = 0.0;209 210 // calculate weight modification based on distances (squared).211 // use modifier to calculate new weighted mean212 for (int n = 0; n < N; n++) {213 float dV = (val[n] - Value);214 float d2 = SQ(dV) * wgt[n];215 216 float Mod = weight_cauchy_square_flt (d2);217 S1 += Mod * wgt[n] * val[n];218 S2 += Mod * wgt[n];219 }220 Value = S1 / S2;221 222 float delta = fabs(Value - ValueLast);223 if (delta < Value * IRLS_TOLERANCE) converged = TRUE;224 }225 return Value;226 }227 228 // exp(-(x^2/s^2)/2) = (1/2)229 // -(x^2/s^2)/2 = ln(1/2)230 // (x^2/s^2)/2 = ln(2)231 // (x^2/s^2) = 2ln(2)232 // (x /s) = sqrt(2ln(2)) : half-width at half-max233 // FWHM = 2sqrt(2ln(2))234 235 // R2 = (X / 2.385)^2 = (X^2 / 2.385^2)236 237 # define CAUCY_FACTOR 1.0238 239 float weight_cauchy_square_flt (float x2) {240 float r2 = x2 / CAUCY_FACTOR;241 return (1.0 / (1.0 + r2));242 }243 244 82 245 83 /* -
branches/eam_branches/ohana.20190329/src/opihi/cmd.data/test/medimage.sh
r36679 r40758 1 1 2 macro go 3 mcreate a 30 30 4 for i 0 40 5 set a$i = zero(a) + $i 6 end 7 8 for i 0 40 9 medimage add t1 a$i 10 end 11 end 2 macro test.mean 3 4 $Nsample = 16 5 medimage delete -q t1 6 for i 0 $Nsample 7 mgaussdev t 50 50 0.0 1.0 8 medimage add t1 t 9 imhist -q t x y -range -10 10 -delta 0.1 10 11 $C0 = 0 12 $C1 = 1.5 13 $C2 = 400 14 $C3 = 0 15 vgauss -q x y con yf 16 # echo $C1 17 end 18 19 medimage calc t1 T -mean 20 21 imhist -q T x y -range -10 10 -delta 0.1 22 lim -n 1 x y; clear; box; plot -x hist x y 23 $C0 = 0 24 $C1 = 1.5 25 $C2 = 400 26 $C3 = 0 27 vgauss -q x y con yf 28 echo "expect {1/sqrt($Nsample)} : $C1" 29 plot -c red -x line x yf 30 end 31 32 macro test.median 33 34 $Nsample = 16 35 medimage delete -q t1 36 for i 0 $Nsample 37 mgaussdev t 50 50 0.0 1.0 38 medimage add t1 t 39 imhist -q t x y -range -10 10 -delta 0.1 40 41 $C0 = 0 42 $C1 = 1.5 43 $C2 = 400 44 $C3 = 0 45 vgauss -q x y con yf 46 end 47 48 # note that median of a gaussian distributed variable is not distributed with sigma' = sigma / sqrt(N) 49 # (somewhat higher scatter) 50 medimage calc t1 T 51 52 imhist -q T x y -range -10 10 -delta 0.1 53 lim -n 1 x y; clear; box; plot -x hist x y 54 $C0 = 0 55 $C1 = 1.5 56 $C2 = 400 57 $C3 = 0 58 vgauss -q x y con yf 59 echo "expect {1/sqrt($Nsample)} : $C1 (actually should be a bit higher)" 60 plot -c red -x line x yf 61 end 62 63 macro test.wtmean 64 65 $Nsample = 8 66 $sig1 = 1.0 67 $sig2 = 3.0 68 69 medimage delete -q t1 70 for i 0 $Nsample 71 mgaussdev t 50 50 0.0 $sig1 72 set v = $sig1^2 + zero(t) 73 medimage add t1 t -variance v 74 imhist -q t x y -range -10 10 -delta 0.1 75 76 $C0 = 0 77 $C1 = 1.5 78 $C2 = 400 79 $C3 = 0 80 vgauss -q x y con yf 81 # echo $C1 82 end 83 84 for i 0 $Nsample 85 mgaussdev t 50 50 0.0 $sig2 86 set v = $sig2^2 + zero(t) 87 medimage add t1 t -variance v 88 imhist -q t x y -range -10 10 -delta 0.1 89 90 $C0 = 0 91 $C1 = 1.5 92 $C2 = 400 93 $C3 = 0 94 vgauss -q x y con yf 95 # echo $C1 96 end 97 98 # note that median of a gaussian distributed variable is not distributed with sigma' = sigma / sqrt(N) 99 # (somewhat higher scatter) 100 medimage calc t1 T -wtmean 101 102 imhist -q T x y -range -10 10 -delta 0.1 103 lim -n 1 x y; clear; box; plot -x hist x y 104 $C0 = 0 105 $C1 = 1.5 106 $C2 = 400 107 $C3 = 0 108 vgauss -q x y con yf 109 $S1 = $Nsample / $sig1^2 + $Nsample / $sig2^2 110 echo "expect {1/sqrt($S1)} : $C1" 111 plot -c red -x line x yf 112 end 113 114 macro test.irls 115 medimage delete -q t1 116 $Nsample = 16 117 $sig = 1.0 118 for i 0 $Nsample 119 mgaussdev t 50 50 0.0 $sig 120 set v = $sig^2 + zero(t) 121 122 set bad = (rnd(t) < 0.05) ? 10*rnd(t) + 5 : zero(t) 123 set ts = t + bad 124 125 medimage add t1 ts -variance v 126 imhist -q t x y -range -10 10 -delta 0.1 127 128 $C0 = 0 129 $C1 = 1.5 130 $C2 = 400 131 $C3 = 0 132 vgauss -q x y con yf 133 # echo $C1 134 end 135 136 # get stats for straight mean: 137 medimage calc t1 Tm -mean 138 139 imhist -q Tm x y -range -10 10 -delta 0.1 140 lim -n 1 x y; clear; box; plot -x hist x y 141 $C0 = 0 142 $C1 = 1.5 143 $C2 = 400 144 $C3 = 0 145 vgauss -q x y con yf 146 echo "sigma from straight stdev: $C1" 147 # stats Tm 148 149 plot -c red -x line x yf 150 151 # get stats for irls 152 medimage calc t1 Ti -irls 153 154 imhist -q Ti x y -range -10 10 -delta 0.1 155 lim -n 2 x y; clear; box; plot -x hist x y 156 $C0 = 0 157 $C1 = 1.5 158 $C2 = 400 159 $C3 = 0 160 vgauss -q x y con yf 161 echo "sigma from irls: $C1 (ideal is {$sig/sqrt($Nsample)})" 162 # stats Ti 163 164 plot -c red -x line x yf 165 end 166 167 168 ###################33 169 170 171 macro test.mean.var 172 173 $Nsample = 64 174 $sig = 2.0 175 medimage delete -q t1 176 for i 0 $Nsample 177 mgaussdev t 100 100 0.0 $sig 178 medimage add t1 t 179 imhist -q t x y -range -10 10 -delta 0.1 180 181 $C0 = 0 182 $C1 = 1.5 183 $C2 = 400 184 $C3 = 0 185 vgauss -q x y con yf 186 # echo $C1 187 end 188 189 medimage calc t1 T -mean -variance Tv 190 191 imhist -q T x y -range -10 10 -delta 0.1 192 lim -n 1 x y; clear; box; plot -x hist x y 193 $C0 = 0 194 $C1 = 1.5 195 $C2 = 400 196 $C3 = 0 197 vgauss -q x y con yf 198 plot -c red -x line x yf 199 200 imhist Tv xv yv -range -1 4 -delta 0.1 201 lim -n 2 xv yv; clear; box; plot xv yv -x hist 202 203 stat Tv 204 echo "$C1 vs {sqrt($MEDIAN)} : expect {$sig/sqrt($Nsample)}" 205 end 206 207 macro test.median.var 208 209 $Nsample = 64 210 $sig = 2.0 211 medimage delete -q t1 212 for i 0 $Nsample 213 mgaussdev t 50 50 0.0 $sig 214 medimage add t1 t 215 imhist -q t x y -range -10 10 -delta 0.1 216 217 $C0 = 0 218 $C1 = 1.5 219 $C2 = 400 220 $C3 = 0 221 vgauss -q x y con yf 222 # echo $C1 223 end 224 225 # note that median of a gaussian distributed variable is not distributed with sigma' = sigma / sqrt(N) 226 # (somewhat higher scatter) 227 medimage calc t1 T -variance Tv 228 229 imhist -q T x y -range -10 10 -delta 0.1 230 lim -n 1 x y; clear; box; plot -x hist x y 231 $C0 = 0 232 $C1 = 1.5 233 $C2 = 400 234 $C3 = 0 235 vgauss -q x y con yf 236 plot -c red -x line x yf 237 238 imhist Tv xv yv -range -1 4 -delta 0.1 239 lim -n 2 xv yv; clear; box; plot xv yv -x hist 240 241 stat Tv 242 echo "$C1 vs {sqrt($MEDIAN)} : expect {$sig/sqrt($Nsample)}" 243 end 244 245 macro test.wtmean.var 246 247 $Nsample = 32 248 $sig1 = 1.0 249 $sig2 = 1.0 250 251 medimage delete -q t1 252 for i 0 $Nsample 253 mgaussdev t 50 50 0.0 $sig1 254 set v = $sig1^2 + zero(t) 255 medimage add t1 t -variance v 256 imhist -q t x y -range -10 10 -delta 0.1 257 258 $C0 = 0 259 $C1 = 1.5 260 $C2 = 400 261 $C3 = 0 262 vgauss -q x y con yf 263 # echo $C1 264 end 265 266 for i 0 $Nsample 267 mgaussdev t 50 50 0.0 $sig2 268 set v = $sig2^2 + zero(t) 269 medimage add t1 t -variance v 270 imhist -q t x y -range -10 10 -delta 0.1 271 272 $C0 = 0 273 $C1 = 1.5 274 $C2 = 400 275 $C3 = 0 276 vgauss -q x y con yf 277 # echo $C1 278 end 279 280 # note that median of a gaussian distributed variable is not distributed with sigma' = sigma / sqrt(N) 281 # (somewhat higher scatter) 282 medimage calc t1 T -wtmean -variance Tv 283 284 imhist -q T x y -range -10 10 -delta 0.1 285 lim -n 1 x y; clear; box; plot -x hist x y 286 $C0 = 0 287 $C1 = 1.5 288 $C2 = 400 289 $C3 = 0 290 vgauss -q x y con yf 291 plot -c red -x line x yf 292 293 stat -q Tv 294 $S1 = $Nsample / $sig1^2 + $Nsample / $sig2^2 295 echo $C1 vs {sqrt($MEDIAN)} : expect {1/sqrt($S1)} 296 end 297 298 macro test.irls.var 299 300 $Nsample = 16 301 $sig = 1.0 302 303 medimage delete -q t1 304 for i 0 $Nsample 305 mgaussdev t 50 50 0.0 $sig 306 set v = $sig^2 + zero(t) 307 308 set bad = (rnd(t) < 0.05) ? 10*rnd(t) + 5 : zero(t) 309 set ts = t + bad 310 311 medimage add t1 ts -variance v 312 imhist -q t x y -range -10 10 -delta 0.1 313 314 $C0 = 0 315 $C1 = 1.5 316 $C2 = 400 317 $C3 = 0 318 vgauss -q x y con yf 319 # echo $C1 320 end 321 322 # get stats for straight mean: 323 medimage calc t1 Tm -mean -variance Tv 324 325 imhist -q Tm x y -range -10 10 -delta 0.1 326 lim -n 1 x y; clear; box; plot -x hist x y 327 $C0 = 0 328 $C1 = 1.5 329 $C2 = 400 330 $C3 = 0 331 vgauss -q x y con yf 332 echo "sigma from straight stdev: $C1" 333 # stats Tm 334 335 plot -c red -x line x yf 336 337 # get stats for irls 338 medimage calc t1 Ti -irls -variance Tv 339 340 imhist -q Ti x y -range -10 10 -delta 0.1 341 lim -n 2 x y; clear; box; plot -x hist x y 342 $C0 = 0 343 $C1 = 1.5 344 $C2 = 400 345 $C3 = 0 346 vgauss -q x y con yf 347 echo "sigma from irls: $C1 (ideal is {$sig/sqrt($Nsample)})" 348 # stats Ti 349 350 plot -c red -x line x yf 351 352 set dTv = sqrt(Tv) 353 imhist dTv xv yv -range -1 4 -delta 0.02; lim -n 3 xv yv; clear; box; plot xv yv -x hist 354 355 stat -q Tv 356 echo $C1 vs {sqrt($MEDIAN)} (ideal is {$sig/sqrt($Nsample)})" 357 end 358 359 macro test.irls.boot.var 360 361 $Nsample = 64 362 $sig = 1.0 363 364 medimage delete -q t1 365 for i 0 $Nsample 366 mgaussdev t 200 200 0.0 $sig 367 set v = $sig^2 + zero(t) 368 369 set bad = (rnd(t) < 0.05) ? 10*rnd(t) + 5 : zero(t) 370 set ts = t + bad 371 372 mgaussdev noise 200 200 0.0 0.5 373 set ts = ts + noise 374 375 medimage add t1 ts -variance v 376 imhist -q t x y -range -10 10 -delta 0.1 377 378 $C0 = 0 379 $C1 = 1.5 380 $C2 = 400 381 $C3 = 0 382 vgauss -q x y con yf 383 # echo $C1 384 end 385 386 # get stats for straight mean: 387 medimage calc t1 Tm -mean -variance Tv 388 389 imhist -q Tm x y -range -10 10 -delta 0.02 390 lim -n 1 x y; clear; box; plot -x hist x y 391 peak -q x y 392 $C0 = $peakpos 393 $C1 = 1.5*$sig / sqrt($Nsample) 394 $C2 = $peakval 395 $C3 = 0 396 vgauss -q x y con yf 397 echo "sigma from straight stdev: $C1" 398 # stats Tm 399 400 plot -c red -x line x yf 401 402 # get stats for irls 403 date 404 medimage calc t1 Ti -irls -variance Tv -bootstrap-iter 100 405 date 406 407 imhist -q Ti x y -range -10 10 -delta 0.02 408 lim -n 2 x y; clear; box; plot -x hist x y 409 peak -q x y 410 $C0 = $peakpos 411 $C1 = 1.5*$sig / sqrt($Nsample) 412 $C2 = $peakval 413 $C3 = 0 414 vgauss -q x y con yf 415 echo "sigma from irls: $C1 (ideal is {$sig/sqrt($Nsample)})" 416 # stats Ti 417 418 plot -c red -x line x yf 419 420 set dTv = sqrt(Tv) 421 imhist dTv xv yv -range 0 {5*$sig/sqrt($Nsample)} -delta 0.02; lim -n 3 xv yv; clear; box; plot xv yv -x hist 422 423 stat -q Tv 424 echo $C1 vs {sqrt($MEDIAN)} (ideal is {$sig/sqrt($Nsample)})" 425 end 426 427 ############################## 428 macro test.irls.boot.test 429 430 $Nsample = 100 431 $sig1 = 1.0 432 433 medimage delete -q t1 434 for i 0 $Nsample 435 mgaussdev t 100 100 0.0 $sig1 436 set v = $sig1^2 + zero(t) 437 438 medimage add t1 t -variance v 439 end 440 441 # get stats for irls 442 medimage calc t1 Ti -irls -variance Tv -bootstrap 443 444 imhist -q Ti x y -range {-10*$sig1/sqrt($Nsample)} {10*$sig1/sqrt($Nsample)} -delta 0.01 445 lim -n 2 x y; clear; box; plot -x hist x y 446 peak -q x y 447 $C0 = $peakpos 448 $C1 = 1.5*$sig1/sqrt($Nsample) 449 $C2 = $peakval 450 $C3 = 0 451 vgauss x y con yf 452 echo "sigma from irls: $C1 (ideal is {$sig1/sqrt($Nsample)})" 453 # stats Ti 454 455 plot -c red -x line x yf 456 457 set dTv = sqrt(Tv) 458 imhist dTv xv yv -range 0 {5*$sig1/sqrt($Nsample)} -delta 0.02; lim -n 3 xv yv; clear; box; plot xv yv -x hist 459 460 stat -q irls_npt 461 $Npix = $MEAN 462 463 stat -q Tv 464 echo "sigma of irls average: $C1, sqrt(mean) of irls variance: {sqrt($MEAN)}, (ideal is {$sig1/sqrt($Npix)})" 465 end 466 467 macro test.irls.range.var 468 medimage delete -q t1 469 for i 0 8 470 mgaussdev t 50 50 0.0 1.0 471 set v = 1.0 + zero(t) 472 473 set bad = (rnd(t) < 0.05) ? 10*rnd(t) + 5 : zero(t) 474 set ts = t + bad 475 476 medimage add t1 ts -variance v 477 imhist -q t x y -range -10 10 -delta 0.1 478 479 $C0 = 0 480 $C1 = 1.5 481 $C2 = 400 482 $C3 = 0 483 vgauss -q x y con yf 484 echo $C1 485 end 486 487 for i 0 8 488 mgaussdev t 50 50 0.0 3.0 489 set v = 3.0 + zero(t) 490 491 set bad = (rnd(t) < 0.05) ? 10*rnd(t) + 5 : zero(t) 492 set ts = t + bad 493 494 medimage add t1 ts -variance v 495 imhist -q t x y -range -10 10 -delta 0.1 496 497 $C0 = 0 498 $C1 = 1.5 499 $C2 = 400 500 $C3 = 0 501 vgauss -q x y con yf 502 echo $C1 503 end 504 505 # get stats for straight mean: 506 medimage calc t1 Tm -mean -variance Tv 507 508 imhist -q Tm x y -range -10 10 -delta 0.1 509 lim -n 1 x y; clear; box; plot -x hist x y 510 $C0 = 0 511 $C1 = 1.5 512 $C2 = 400 513 $C3 = 0 514 vgauss -q x y con yf 515 echo $C1 516 stats Tm 517 518 plot -c red -x line x yf 519 520 # get stats for irls 521 medimage calc t1 Ti -irls -variance Tv 522 523 imhist -q Ti x y -range -10 10 -delta 0.1 524 lim -n 2 x y; clear; box; plot -x hist x y 525 $C0 = 0 526 $C1 = 1.5 527 $C2 = 400 528 $C3 = 0 529 vgauss -q x y con yf 530 echo $C1 531 stats Ti 532 533 plot -c red -x line x yf 534 535 stat -q Tv 536 echo $C1 vs {sqrt($MEDIAN)} 537 538 set dTv = sqrt(Tv) 539 imhist dTv xv yv -range -1 4 -delta 0.02; lim -n 3 xv yv; clear; box; plot xv yv -x hist 540 end
Note:
See TracChangeset
for help on using the changeset viewer.
