ndtatbristol / arim

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

Enabling numba on 32-bit systems #13

Closed mgchandler closed 1 year ago

mgchandler commented 1 year ago

Major change is adding dependence on an environment variable ARIM_USE_PARALLEL, which enables/disables parallel execution in numba to address #12. Set to take a default value of not numba.core.config.IS_32BITS, i.e. parallel execution when on 64-bit OS, not when on a 32-bit OS.

Also added a TxRxAmplitudes generator for an angle limiter which I've found useful recently; changed arim.measurement.find_probe_loc_from_frontwall to account for dead elements which previously did not appear to be considered; and updated deprecated numpy types to reduce warnings from pytest.

nbud commented 1 year ago

Thank you for the good work! The definition of use_parallel is sound, although I think that relying on ensure_parallel_support() would have been more general and future-proof than relying on its current implementation (numba.core.config.IS_32BITS), but it's a detail. Out of curiosity, why not define use_parallel once for all in the config.py, as you did in an earlier commit?

The logic regarding the dead elements and angle limitation looks good, thanks.