3.1. Ksat-Qsat correlation#
In this tutorial, you will learn how to extract the Ksat-Qsat correlation.
Import the libraries that will be employed in this tutorial.
# Import numpy
import numpy as np
# Import matplotlib
import matplotlib.pyplot as plt
%matplotlib inline
# 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.setupKsatQsat))
['__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:
print('models:',nuda.corr.KsatQsat_constraints()[0])
models: ['1991-Pearson', '2025-MK-95', '2025-MK-90', '2025-MK-67', 'EDF-SKY', 'EDF-GSKY', 'EDF-ESKY', 'EDF-Fayans', 'EDF-Gogny', 'EDF-DDRH', 'EDF-NLRH', 'EDF-DDRHF', 'EDF-xEFT']
Fix one model for which we want to extract the constraint:
constraint = 'EDF-SKY'
kq = nuda.corr.setupKsatQsat( constraint = constraint )
print the outputs:
kq.print_outputs()
constraint: EDF-SKY
ref:
label: Skyrme
note: constraints from Skyrme.
plot: None
Ksat: [239.3441, 241.6726, 241.6857, 241.6553, 237.8, 237.45, 230.0156, 230.0252, 230.0084, 217.0589, 210.7857, 244.224, 240.245, 225.6646, 239.5167, 245.005, 214.651, 355.3754, 237.2519, 240.7237, 247.7449, 230.8828, 223.3613, 222.3165, 201.0341, 237.3913, 271.0816, 230.1072, 229.9148, 229.9628, 229.9107, 229.9151, 305.6799, 235.9693, 230.0255, 230.0195, 220.0152]
Qsat: [-358.6562, -363.5624, -363.5954, -363.5079, -376.7, -376.26, -404.9084, -406.1566, -405.4248, -399.4512, -382.5238, -324.63, -316.0942, -362.5279, -349.8086, -338.6849, -380.8947, 101.3885, -348.7068, -339.2832, -330.7994, -338.0346, -392.8599, -390.7309, -435.5587, -348.3948, -297.4161, -365.2347, -363.0842, -363.973, -364.1825, -363.0837, -175.76, -383.1506, -365.9015, -403.6671, -404.1833]
plot:
constraints, constraints_lower = nuda.corr.KsatQsat_constraints()
print('constraints:',constraints)
constraints: ['1991-Pearson', '2025-MK-95', '2025-MK-90', '2025-MK-67', 'EDF-SKY', 'EDF-GSKY', 'EDF-ESKY', 'EDF-Fayans', 'EDF-Gogny', 'EDF-DDRH', 'EDF-NLRH', 'EDF-DDRHF', 'EDF-xEFT']
nuda.fig.corr_setupKsatQsat_fig( pname=None, constraints = constraints )
Plot name: None
constraint: 1991-Pearson
constraint: 2025-MK-95
constraint: 2025-MK-90
constraint: 2025-MK-67
constraint: EDF-SKY
constraint: EDF-GSKY
constraint: EDF-ESKY
constraint: EDF-Fayans
constraint: EDF-Gogny
constraint: EDF-DDRH
constraint: EDF-NLRH
constraint: EDF-DDRHF
constraint: EDF-xEFT