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
= n2f(intf,depths=(10,10)) filtered_intf
CPU times: user 4min 1s, sys: 41 s, total: 4min 42s
Wall time: 4.4 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 )
if is_cuda_available():
= cp.asarray(intf) intf_cp
if is_cuda_available():
= n2f(intf_cp) filtered_intf_cp
CPU times: user 4.52 s, sys: 1.59 s, total: 6.12 s
Wall time: 6.02 s
if is_cuda_available():
= _n2f_np_in_gpu(intf)
filtered_intf_ = 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 )