The MultiCoilFieldclass assumes that the maximal magnetic field as should be returned by the get_B_max (see https://github.com/MCFlowMace/CRESana/blob/main/cresana/bfield.py#L119 ) is located at the position of one of the coils z positions. The function only checks for the maximum at the z0 position of each coil.
This assumption is not correct. For close by coils, the maximal magnetic field can be in the space between two coils as shown in the attached plot for illustration. It is save to say that the maximum has to be somewhere between the smallest z0 and the largest z0 position of all coils.
The
MultiCoilField
class assumes that the maximal magnetic field as should be returned by theget_B_max
(see https://github.com/MCFlowMace/CRESana/blob/main/cresana/bfield.py#L119 ) is located at the position of one of the coils z positions. The function only checks for the maximum at the z0 position of each coil. This assumption is not correct. For close by coils, the maximal magnetic field can be in the space between two coils as shown in the attached plot for illustration. It is save to say that the maximum has to be somewhere between the smallest z0 and the largest z0 position of all coils.