Esym-Lsym correlation

3.2. Esym-Lsym correlation#

In this tutorial, you will learn how to extract the Esym-Lsym correlation.


Import the libraries that will be employed in this tutorial.

# Import numpy
import numpy as np
# Import matplotlib
import matplotlib.pyplot as plt
# Import nucleardatapy package
import nucleardatapy as nuda

You can simply print out the properties of the nuda’s function that we will use:

# Explore the nucleardatapy module to find the correct attribute
print(dir(nuda.corr.setupEsymLsym))
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'init_self', 'print_outputs']

Get the full list of constraints:

constraints, constraints_lower = nuda.corr.EsymLsym_constraints()
print('constraints:',constraints)
constraints: ['2009-HIC', '2010-RNP', '2012-FRDM', '2013-NS', '2014-IAS', '2014-IAS+RNP', '2015-POL-208Pb', '2015-POL-120Sn', '2015-POL-68Ni', '2017-UG', '2021-PREXII-Reed', '2021-PREXII-Reinhard', '2023-PREXII+CREX-Zhang', '2023-EDF-D4', '2023-EDF-D4-IAS', '2023-EDF-D4-IAS-Rnp']

Fix one model for which we want to extract the constraint:

constraint = '2014-IAS'
el = nuda.corr.setupEsymLsym( constraint = constraint )

print the outputs:

el.print_outputs()
   constraint: 2014-IAS
   ref: Danielewicz and Lee, NPA 922, 1 (2014)
   label: IAS-2014
   note: Constraints from IAS.
   plot: band_y

plot:


constraints, constraints_lower = nuda.corr.EsymLsym_constraints()
print('constraints:',constraints)
constraints: ['2009-HIC', '2010-RNP', '2012-FRDM', '2013-NS', '2014-IAS', '2014-IAS+RNP', '2015-POL-208Pb', '2015-POL-120Sn', '2015-POL-68Ni', '2017-UG', '2021-PREXII-Reed', '2021-PREXII-Reinhard', '2023-PREXII+CREX-Zhang', '2023-EDF-D4', '2023-EDF-D4-IAS', '2023-EDF-D4-IAS-Rnp']

nuda.fig.corr_setupEsymLsym_fig( pname=None, constraints = constraints )
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[7], line 1
----> 1 nuda.fig.corr_setupEsymLsym_fig( pname=None, constraints = constraints )

TypeError: corr_setupEsymLsym_fig() missing 1 required positional argument: 'origine'