Hi! I'm working on Pyrokinetics, and I'd like to use your functions identify_cocos and cocos_transform to ensure any equilibrium data we read in is converted to COCOS 1. When I tried using identify_cocos, I found that it always raised NameError as pi wasn't defined. This PR makes the following changes:
Uses numpy.pi instead of pi, fixing the NameError issue
Added unit test that checks simple examples for COCOS 1 -> 8 and 11 -> 18 (positive $B_0$ and $I_p$ only)
Fixed error where COCOS 15 -> 18 inputs would result in COCOS 5 -> 8 due to incorrect sign of q_estimate in the part of the algorithm that determines $e_{Bp}$.
Please let me know if it looks like I've made a mistake anywhere or otherwise misunderstood the function. If all looks good, would it be possible to get this in a 89.1 release?
Hi! I'm working on Pyrokinetics, and I'd like to use your functions
identify_cocos
andcocos_transform
to ensure any equilibrium data we read in is converted to COCOS 1. When I tried usingidentify_cocos
, I found that it always raisedNameError
aspi
wasn't defined. This PR makes the following changes:numpy.pi
instead ofpi
, fixing theNameError
issueq_estimate
in the part of the algorithm that determines $e_{Bp}$.Please let me know if it looks like I've made a mistake anywhere or otherwise misunderstood the function. If all looks good, would it be possible to get this in a 89.1 release?