cfs-energy / cfspopcon

POPCONs (Plasma OPerating CONtours)
https://cfspopcon.readthedocs.io/en/latest/
MIT License
22 stars 14 forks source link

Version of scipy changes coronal mean charge state #15

Closed tbody-cfs closed 6 months ago

tbody-cfs commented 9 months ago

Currently have

radas: scipy 1.10.1
cfspopcon: scipy 1.11.2

Comparing argon datasets made using radas's environment or using cfspopcon's environment, find that

Differing data variables:
L   charge_state_fraction_at_equilibrium    
R   charge_state_fraction_at_equilibrium    
L   noncoronal_mean_charge_state            
R   noncoronal_mean_charge_state            
L   charge_state_fraction_evolution         
R   charge_state_fraction_evolution

Looking at one of the variables

key = "noncoronal_mean_charge_state"

np.testing.assert_allclose(ds1[key], ds2[key])

AssertionError: 
Not equal to tolerance rtol=1e-07, atol=0

Mismatched elements: 127 / 1600 (7.94%)
Max absolute difference: 0.00105862
Max relative difference: 0.00013053
 x: array([[[3.579050e-05, 3.551633e-04, 3.298948e-03, 1.927561e-02],
        [1.933333e-04, 1.916899e-03, 1.766722e-02, 9.906271e-02],
        [8.831938e-04, 8.707881e-03, 7.635380e-02, 3.421404e-01],...
 y: array([[[3.579050e-05, 3.551633e-04, 3.298948e-03, 1.927561e-02],
        [1.933333e-04, 1.916899e-03, 1.766722e-02, 9.906271e-02],
        [8.831938e-04, 8.707881e-03, 7.635380e-02, 3.421404e-01],...

image

tbody-cfs commented 6 months ago

No longer relevant in #7