ndtatbristol / arim

A Python library for array imaging in ultrasonic testing.
MIT License
25 stars 13 forks source link

Extend multiview #19

Open mgchandler opened 5 months ago

mgchandler commented 5 months ago

A big pull request containing a lot of the work done to extend multiview imaging to arbitrary geometry.

The biggest change is the removal of examination_object.frontwall and examination_object.backwall attributes and replacing them with examination_object.walls (a list of all the walls) and examination_object.wall_idxs_for_imaging (a list of which walls in examination_object.walls will be used to skip from). This now enables any arbitrary geometry to be modelled, rather than being limited to a frontwall and backwall.

Lots of other minor changes, but another big one is a slight adjustment to the definition of the basis in each wall. For frontwalls and backwalls, this was previously defined to align with the global coordinate system (i.e. z_hat aligned with the +ve z axis). As walls may now be in any direction, it's slightly awkward to automatically determine whether incoming and outgoing rays will be on the same side as the normal directions. One option would be to leave this completely up to the user, which would probably require a good understanding of exactly how it works behind the scenes. I've opted for an alternative, adopting the convention that the normal direction should point into the object (i.e. for an object with a frontwall at z = 0mm and backwall at z = 20mm, the frontwall has z_hat = [0, 0, 1] and the backwall has z_hat = [0, 0, -1]). This should work for any abstract geometry.

mgchandler commented 3 months ago

Some things appear to be failing due to use of numpy.core.umath functions in scat.py, models/block_in_contact.py, models/block_in_immersion.py, and model.py as these functions are deprecated to numpy._core.umath. Do we need to use these internal functions or can we use the public cos, sin, etc. functions?