torchbox.imaging package
Submodules
torchbox.imaging.backprojection module
- torchbox.imaging.backprojection.bp_ct()
- torchbox.imaging.backprojection.bp_sar(Src, traj, grid, dr, fc, dcpmode=1, ftshift=False, batchsize=128)
FMCW SAR backprojection imaging
- Parameters:
Src (tensor) – range compressed signal, .. math:: {mathbb R}^{N_a time N_r}
traj (tensor) – radar trajectory .. math:: {mathbb R}^{N_a}
grid (tensor) – imaging grids at x, y, z axis, with size
(..., 3)dr (float) – range cell resolution
fc (float) – carrier frequency
dcpmode (int, optional) – dechirp mode, by default 1
ftshift (bool, optional) – fft shifting flag, by default False
batchsize (int, optional) – processing batch size in azimuth, by default 128
- Returns:
imaging results
- Return type:
tensor
- torchbox.imaging.backprojection.bp_sar_fmcw(Sif, traj, grid, dr, fc, ups=None, dcpmode=1, ftshift=False, batchsize=128)
FMCW SAR backprojection imaging
- Parameters:
Sif (tensor) – intermediate frequency signal, .. math:: {mathbb R}^{N_a time N_r}
traj (tensor) – radar trajectory .. math:: {mathbb R}^{N_a}
grid (tensor) – imaging grids at x, y, z axis, with size
(..., 3)dr (float) – range cell resolution
fc (float) – carrier frequency
ups (str or None, optional) –
'fftA'upsampled by fft with upsampling rate A, by default None (linear interpolation)dcpmode (int, optional) – dechirp mode, by default 1
ftshift (bool, optional) – fft shifting flag, by default False
batchsize (int, optional) – processing batch size in azimuth, by default 128
- Returns:
imaging results
- Return type:
tensor
- torchbox.imaging.backprojection.imaging_grid(xgi=None, ygi=None, zgi=None, order='xy', device='cpu')
generates grids for imaging
- Parameters:
xgi (list, tuple or None, optional) – x grid information,
[xmin, xmax, Nx], by default None (not generated)ygi (list, tuple or None, optional) – y grid information,
[ymin, ymax, Ny], by default None (not generated)zgi (list, tuple or None, optional) – z grid information,
[zmin, zmax, Nz], by default None (not generated)order (str, optional) – output order, by default
'xy'device (str, optional) – device string, by default
'cpu'
- Returns:
imaging grids: gx, gy, gz
- Return type:
- Raises:
ValueError – Only support 3D grid, i.e. ‘’x’`,
'y','z'inorder.
Examples
grid = imaging_grid(xgi=[-3, 3, 10], ygi=[0, 5, 5], zgi=None, order='yx', device='cpu') print(grid[0].shape, grid[1].shape, grid[0].device, grid[1].device) grid = imaging_grid(xgi=[-3, 3, 10], ygi=[0, 5, 5], zgi=[-2, 2, 6], order='xyz', device='cpu') print(grid[0].shape, grid[1].shape, grid[2].shape, grid[0].device, grid[1].device, grid[2].device) # output torch.Size([10, 5]) torch.Size([10, 5]) cpu cpu torch.Size([5, 10, 6]) torch.Size([5, 10, 6]) torch.Size([5, 10, 6]) cpu cpu cpu