Open renereimann opened 10 months ago
I test implemented this but I did not get better performance.
Here is the branch that implements this idea https://github.com/MCFlowMace/CRESana/tree/feature/fast_multicoil_field In my tests this implementation is slower then the original code. I do not understand why.
The
evaluate_B
of theMultiCoilField
class as defined in here https://github.com/MCFlowMace/CRESana/blob/develop/cresana/bfield.py#L397 is implemented as a for loop over all individual coils. The coil class implements the general field solution for a single coil. Outside of CRESana, I implemented the same evaluation but using the numpy capabilities to calculate the fields of all coils in higher dimensional arrays. This speeds up the overall calculation of evaluate_B by a big factor. This makes the Coil class basically obsolate.