openlifu.plan.solution_analysis.get_beam_bounds¶
- openlifu.plan.solution_analysis.get_beam_bounds(da: DataArray, focus, dim, cutoff: float, origin=array([0., 0., 0.]), min_offset: float | None = None, max_offset: float | None = None) Tuple[float, float][source]¶
Determine how far along a focal coordinate system axis a DataArray’s value stays above a certain cutoff.
See get_focus_matrix for the meaning of “focal coordinate system.”
- Parameters:
da – DataArray whose values will be considered (presumably defined on transducer coordinates).
focus – A 3D point describing the focus location in the coordinates of da
dim – The name of the dimension of da whose corresponding focal coordinate system axis should be sampled along. For example, the “axial” dimension of a transducer corresponds to the focal axis (z-axis) in the focal coordinate system, that is, the ray from the transducer’s “effective origin” (see Transducer.get_effective_origin) to the focus center.
cutoff – The threshold against which da values are compared.
origin – A 3D point describing the “effective origin” in the coordinates of da (see Transducer.get_effective_origin for the meaning of this).
min_offset – How far along the negative focal dim direction to sample. By default samples as far as the coordinate grid allows.
max_offset – How far along the positive focal dim direction to sample. By default samples as far as the coordinate grid allows.
- Returns:
Distance from the focus along the negative focal dim direction until da first goes below cutoff. posoff: Distance from the focus along the positive focal dim direction until da first goes below cutoff.
- Return type:
negoff