import zarr
import numpy as np
import holoviews as hv
'bokeh')
hv.extension(='bottom')
hv.output(widget_locationfrom bokeh.models import WheelZoomTool
from holoviews import opts
dl
Deep learning based operators
n2f
n2f (intf:numpy.ndarray, chunks:tuple=None, depths:tuple=(0, 0), model:str=None)
Type | Default | Details | |
---|---|---|---|
intf | ndarray | interferogram, 2d np.complex64 or cp.complex64 | |
chunks | tuple | None | chunksize, intf.shape by default |
depths | tuple | (0, 0) | width of the boundary |
model | str | None | path to the model in onnx format, use the model comes with this package by default |
Usage:
= zarr.open('../CLI/raw/rslc.zarr/','r')
rslc_zarr = rslc_zarr[:,:,7]*rslc_zarr[:,:,13].conj() intf
intf.shape
(2500, 1834)
= n2f(intf,depths=(10,10),model='../../../noise2fringe_ps_cos/model_saved/noise2fringe_model_depth_4_0712_5/n2f.onnx') filtered_intf
CPU times: user 4min 11s, sys: 43.8 s, total: 4min 55s
Wall time: 4.63 s
= mr.ras_plot(np.angle(intf))
raw_intf_plot = mr.ras_plot(np.angle(filtered_intf))
filtered_intf_plot +filtered_intf_plot).opts(
(raw_intf_plot
opts.Image(='colorwheel',width=600, height=600, colorbar=True,invert_yaxis=True,
cmap=['pan',WheelZoomTool(zoom_on_axis=False),'save','reset','hover'],
default_tools=['wheel_zoom'])
active_tools )
n2fs3d
n2fs3d (adi:numpy.ndarray, intf:numpy.ndarray, chunks:tuple=None, depths:tuple=(0, 0), model:str=None)
Type | Default | Details | |
---|---|---|---|
adi | ndarray | amplitude dispersion index, 2d np.float32 or cp.float32 | |
intf | ndarray | interferogram, 2d np.complex64 or cp.complex64 | |
chunks | tuple | None | chunksize, intf.shape by default |
depths | tuple | (0, 0) | width of the boundary |
model | str | None | path to the model in onnx format, use the model comes with this package by default |
Usage:
import zarr
import numpy as np
import holoviews as hv
'bokeh')
hv.extension(='bottom')
hv.output(widget_locationfrom bokeh.models import WheelZoomTool
from holoviews import opts
= zarr.open('../CLI/raw/rslc.zarr/','r')
rslc_zarr = rslc_zarr[:,:,7]*rslc_zarr[:,:,13].conj()
intf = zarr.open('../CLI/ps/adi.zarr/','r')[:] adi
= n2fs3d(adi,intf,depths=(200,200),model='../../../noise2fringe_ps_cos_adi/model_saved/noise2fringe_model_depth_4_0721_8/n2fs3d.onnx') filtered_intf
CPU times: user 4min 12s, sys: 46.8 s, total: 4min 59s
Wall time: 4.22 s
if is_cuda_available():
= cp.asarray(intf)
intf_cp = cp.asarray(adi)
adi_cp = n2fs3d(adi_cp,intf_cp) filtered_intf_cp
CPU times: user 3.69 s, sys: 625 ms, total: 4.31 s
Wall time: 4.11 s