Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pjarosik committed Nov 13, 2021
1 parent f6d7c49 commit c8ba292
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion api/python/arrus/ops/imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ def __post_init__(self):
super().__post_init__()
if self.tx_focus <= 0 or np.isinf(self.tx_focus):
raise ValueError("TX focus has to be a positive value.")
assert_is_scalar("angles", self.angles)


@dataclasses.dataclass(frozen=True)
Expand Down
7 changes: 1 addition & 6 deletions api/python/arrus/utils/imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,6 @@ def prepare(self, const_metadata):
lambd = c / fc
max_tang = abs(math.tan(
math.asin(min(1, 2 / 3 * lambd / probe_model.pitch))))
print(f"MAX TANG: {max_tang}")

self.fc = cp.float32(fc)
self.fs = cp.float32(fs)
Expand Down Expand Up @@ -829,15 +828,11 @@ def process(self, data):
data = self.num_pkg.ascontiguousarray(data)
params = (
self.output_buffer, data,
self.delays,
self.n_tx, self.n_rx, self.n_samples,
self.tx_angles,
self.init_delay, self.start_time,
self.c, self.fs, self.fc, self.max_tang)
self._kernel(self.grid_size, self.block_size, params)
# import matplotlib.pyplot as plt
# plt.imshow(self.delays.get())
# plt.show()
return self.output_buffer


Expand Down Expand Up @@ -1242,7 +1237,7 @@ def _process_phased_array(self, data):
(self.radGridIn, self.azimuthGridIn), data, method="linear",
bounds_error=False, fill_value=0)
result = self.interpolator(self.dst_points).reshape(self.dst_shape)
return self.num_pkg.asarray(result)
return self.num_pkg.asarray(result).astype(np.float32)


class LogCompression(Operation):
Expand Down
1 change: 0 additions & 1 deletion api/python/arrus/utils/rx_beamforming.cu
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ __constant__ float xElemConst[256]; // [m]
// to the center of TX/RX aperture
extern "C"
__global__ void beamformPhasedArray(complex<float> *output, const complex<float> *input,
float* delays, // DEBUG
const unsigned nTx, const unsigned nRx, const unsigned nSamples,
const float *txAngles, // [rad]
const float initDelay, const float startTime,
Expand Down

0 comments on commit c8ba292

Please sign in to comment.