MCFlowMace / CRESana

Analytic CRES signal modeling
2 stars 1 forks source link

implemented get_B_max in a different way to find the max and not make… #8

Closed renereimann closed 8 months ago

renereimann commented 8 months ago

… assumption that the max is at a coil position. Instead we first scan the range between all coils and get a guess for the maximum. Then we find the maximum by requireing dBz/dz = 0. At the position of the maximum we return the field value.

This should fix Issue #6 .

MCFlowMace commented 8 months ago

It seems like this is returning the minimum instead of the maximum. Tried running it with cresana_samples/run_coil_simulation.py

renereimann commented 8 months ago

It seems like this is returning the minimum instead of the maximum. Tried running it with cresana_samples/run_coil_simulation.py

The last commit addresses the issue. Tests show that the new implementation works and also for this example the maximum is returned.