6.1. Neutron Star Crust#
In this tutorial, you will learn how to extract neutron star crust EoS.
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.crust.setupCrust))
['__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 models:
models, models_lower = nuda.crust.crust_models()
print('models:',models)
models: ['1973-Negele-Vautherin', '2018-PCPFDDG-BSK22', '2018-PCPFDDG-BSK24', '2018-PCPFDDG-BSK25', '2018-PCPFDDG-BSK26', '2020-MVCD-D1S', '2020-MVCD-D1M', '2020-MVCD-D1MS', '2022-GMRS-BSK14', '2022-GMRS-BSK16', '2022-GMRS-DHSL59', '2022-GMRS-DHSL69', '2022-GMRS-F0', '2022-GMRS-H1', '2022-GMRS-H2', '2022-GMRS-H3', '2022-GMRS-H4', '2022-GMRS-H5', '2022-GMRS-H7', '2022-GMRS-LNS5', '2022-GMRS-RATP', '2022-GMRS-SGII', '2022-GMRS-SLY5']
for model in models:
crust = nuda.crust.setupCrust( model = model )
#crust.print_outputs( )
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[4], line 2
1 for model in models:
----> 2 crust = nuda.crust.setupCrust( model = model )
3 #crust.print_outputs( )
File ~/work/nucleardatapy/nucleardatapy/version-1.0/nucleardatapy/crust/setup_crust.py:179, in setupCrust.__init__(self, model)
177 # NEP
178 nep = nuda.matter.setupNEP( model = 'ESkyrme', param = 'BSk22' )
--> 179 self.nsat = nep.sat
180 self.Esym = nep.Esym
181 self.Lsym = nep.Lsym
AttributeError: 'setupNEP' object has no attribute 'sat'
figure:
nuda.fig.crust_setupCrust_fig( None, models )
Plot name: None
model: 1973-Negele-Vautherin
model: 2020-MVCD-D1S
model: 2020-MVCD-D1M
model: 2020-MVCD-D1MS
model: 2022-crustGMRS-BSK14
model: 2022-crustGMRS-BSK16
model: 2022-crustGMRS-DHSL59
model: 2022-crustGMRS-DHSL69
model: 2022-crustGMRS-F0
model: 2022-crustGMRS-H1
model: 2022-crustGMRS-H2
model: 2022-crustGMRS-H3
model: 2022-crustGMRS-H4
model: 2022-crustGMRS-H5
model: 2022-crustGMRS-H7
model: 2022-crustGMRS-LNS5
model: 2022-crustGMRS-RATP
model: 2022-crustGMRS-SGII
model: 2022-crustGMRS-SLY5
