Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARRUS-115: Implemented a support for vermon 3d probe and us4OEMs with 8 modules. #250

Merged
merged 8 commits into from
Jan 11, 2022
10 changes: 7 additions & 3 deletions api/python/arrus/utils/imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -1963,12 +1963,16 @@ def prepare(self, const_metadata: arrus.metadata.ConstMetadata):
# TODO constant memory
self._frame_offsets = cp.asarray(frame_offsets)
# For each us4OEM, get number of physical frames this us4OEM gathers.
# Note: this is the max number of us4OEM IN USE.
# Note: this is the max number of us4OEMs IN USE.
n_us4oems = cp.max(self._fcm_us4oems).get()+1
n_frames_us4oems = []
for us4oem in range(n_us4oems):
n_frames_us4oem = cp.max(self._fcm_frames[self._fcm_us4oems == us4oem])
n_frames_us4oems.append(n_frames_us4oem)
us4oem_frames = self._fcm_frames[self._fcm_us4oems == us4oem]
if us4oem_frames.size == 0:
n_frames_us4oems.append(0)
else:
n_frames_us4oem = cp.max(us4oem_frames).get().item()
n_frames_us4oems.append(n_frames_us4oem)

# TODO constant memory
self._n_frames_us4oems = cp.asarray(n_frames_us4oems, dtype=cp.uint32)+1
Expand Down
Loading