| 1 | STEPS FOR PPV PROJECTION: |
|---|
| 2 | |
|---|
| 3 | ; build a projection with no ghost zones, no grids with smaller spacings than 1/256, and no axis swapping |
|---|
| 4 | proj = build_projection(INTERP=0, IMAGE_SIZE=256, /NOSWAPPING) |
|---|
| 5 | |
|---|
| 6 | ; calculate data cube |
|---|
| 7 | n=256 |
|---|
| 8 | data = DBLARR(401,n,n) |
|---|
| 9 | for x=0L,n-1 do for y=0L,n-1 do data[0,x,y] = construct_ppv_projection(PROJ=proj, USE=[1,1,1,1], PT=([x,y]+.5d)/n, /INTEGRATE) |
|---|
| 10 | |
|---|
| 11 | noise = min(data, DIMENSION=1) |
|---|
| 12 | data2 = data - TRANSPOSE(CMREPLICATE(noise, 401), [2,0,1]) |
|---|
| 13 | ; find statistical moments |
|---|
| 14 | x = CMREPLICATE(INDGEN(401),[n,n]) * 40. / 400. - 20. |
|---|
| 15 | tot = REFORM(TOTAL(data2,1)) |
|---|
| 16 | P = data2 / TRANSPOSE(CMREPLICATE(tot, 401), [2,0,1]) |
|---|
| 17 | m = REFORM(TOTAL(x*P,1)) |
|---|
| 18 | v = REFORM(TOTAL((x-TRANSPOSE(CMREPLICATE(m, 401), [2,0,1]))^2 * P,1)) |
|---|
| 19 | sigma = v^.5 |
|---|
| 20 | x = x[*,0,0] |
|---|
| 21 | |
|---|
| 22 | ; plot! e.g. |
|---|
| 23 | loadct, 13 |
|---|
| 24 | tvscl, sigma |
|---|
| 25 | plot, x, data[*,128,128] |
|---|