예제 #1
0
                 thininsulatinglayer_max_y, thininsulatinglayer_min_x,
                 thininsulatinglayer_max_x)

Tnoisy = T + np.random.randn(*T.shape) * .022  # 22 mK NETD

# To plot:
# loglog(trange+dt/2,T[20,20,:])
# imshow(T[:,:,200]

# Saturation check not technically necessary on simulated data
(saturation_fraction,
 saturation_map) = greensinversion.saturationcheck(Tnoisy, 0)

(inversioncoeffs, residual, errs,
 tikparams) = greensinversion.performinversionsteps(rowselects, inversions,
                                                    inversionsfull, inverses,
                                                    nresults, Tnoisy, tikparam)

(fig, subplots, images) = greensinversion.plotabstractinverse(
    5, 2, 3, inversioncoeffs, reflectors, -10000.0, 20000.0, y_bnd, x_bnd,
    num_sources_y, num_sources_x)

concreteinverse = greensinversion.buildconcreteinverse(
    inversioncoeffs, reflectors, ygrid[0, :, :], xgrid[0, :, :], y_bnd, x_bnd,
    ny, nx, num_sources_y, num_sources_x)
(cfig, csubplots, cimages) = greensinversion.plotconcreteinverse(
    6, 2, 3, saturation_map, concreteinverse, reflectors, -10000.0, 20000.0,
    y_bnd, x_bnd, num_sources_y, num_sources_x)

(ss_inversioncoeffs, ss_residual,
 ss_errs, ss_tikparams) = greensinversion.performinversionsteps(
예제 #2
0
     ny, nx, dy, dx, reflectors, wfmdict[channel].data)

# Create a data cube for storing the inversion
fullinverse = np.zeros((len(reflectors) + 1, wfmdict[channel].data.shape[1],
                        wfmdict[channel].data.shape[0]),
                       dtype='d')

# Iterate through the tiles
for tile_idx in range(len(minyminx_corners)):
    (yidx, xidx) = minyminx_corners[tile_idx]

    # Perform the inversion on this tile
    (inversioncoeffs, residual, errs,
     tikparams) = greensinversion.performinversionsteps(
         rowselects, inversions, inversionsfull, inverses, nresults,
         wfmdict[channel].data[xidx:(xidx + nx), yidx:(yidx + ny),
                               startframe:].transpose((2, 1, 0)), tikparam
     )  # transpose to convert dataguzzler axis ordering (x,y,t) to greensinversion ordering (t,y,x)

    # Build a concrete reconstruction of the buried heat sources from the inversion coefficients
    concreteinverse = greensinversion.buildconcreteinverse(
        inversioncoeffs, reflectors, ygrid, xgrid, y_bnd, x_bnd, ny, nx)
    # concreteinverse is (len(reflectors)+1,ny,nx)... first layer is surface

    # accumulate weighted contributions of this tile to full inverse
    fullinverse[:, yidx:(yidx + ny),
                xidx:(xidx +
                      nx)] += concreteinverse * contributionprofiles[tile_idx]
    pass

# Create a data cube for storing the single-step inversion