|
@@ -19,7 +19,7 @@ class Peak:
|
|
|
y_label: str
|
|
|
ex1: Expansion
|
|
|
ex2: Expansion
|
|
|
- emanuele_data_column: int
|
|
|
+ ici_data_column: int
|
|
|
log_y: bool
|
|
|
kappaR_axis_in_expansion: int = None
|
|
|
|
|
@@ -27,7 +27,7 @@ class Peak:
|
|
|
class PeakEP(Peak):
|
|
|
|
|
|
def __init__(self, ex: Expansion, log_y: bool = False, kappaR_axis_in_expansion: int = None):
|
|
|
- self.emanuele_data_column = 4
|
|
|
+ self.ici_data_column = 4
|
|
|
self.y_label = r'$|V_\mathrm{EP}|$' if log_y else r'$V_\mathrm{EP}$'
|
|
|
self.ex1 = ex.clone()
|
|
|
self.ex2 = ex.clone()
|
|
@@ -39,7 +39,7 @@ class PeakEP(Peak):
|
|
|
class PeakPP(Peak):
|
|
|
|
|
|
def __init__(self, ex: Expansion, log_y: bool = False, kappaR_axis_in_expansion: int = None):
|
|
|
- self.emanuele_data_column = 3
|
|
|
+ self.ici_data_column = 3
|
|
|
self.y_label = r'$V_\mathrm{PP}$'
|
|
|
self.ex1 = ex.clone()
|
|
|
self.ex2 = ex.clone()
|
|
@@ -50,7 +50,7 @@ class PeakPP(Peak):
|
|
|
class PeakSEP(Peak):
|
|
|
|
|
|
def __init__(self, ex: Expansion, log_y: bool = False, kappaR_axis_in_expansion: int = None):
|
|
|
- self.emanuele_data_column = 5
|
|
|
+ self.ici_data_column = 5
|
|
|
self.y_label = r'$|V_\mathrm{sEP}|$' if log_y else r'$V_\mathrm{sEP}$'
|
|
|
self.ex1 = ex.clone()
|
|
|
self.ex2 = ex.clone()
|
|
@@ -75,7 +75,7 @@ def get_charge_energy_dicts(peak: Peak, params: ModelParams, emanuele_data: Arra
|
|
|
if ab in np.around(abar_cs, 5):
|
|
|
idx, = np.nonzero(inverse == i)
|
|
|
charge = emanuele_data[idx, 0]
|
|
|
- en = emanuele_data[idx, peak.emanuele_data_column]
|
|
|
+ en = emanuele_data[idx, peak.ici_data_column]
|
|
|
sort = np.argsort(charge)
|
|
|
if peak.log_y:
|
|
|
data_dict_ic[ab] = np.stack((charge[sort] / 280 + 2, np.abs(en)[sort])).T
|
|
@@ -88,9 +88,9 @@ def get_charge_energy_dicts(peak: Peak, params: ModelParams, emanuele_data: Arra
|
|
|
return data_dict_ic, data_dict_cs
|
|
|
|
|
|
|
|
|
-def get_kappaR_energy_dicts(peak: Peak, params: ModelParams, emanuele_data: Array,
|
|
|
+def get_kappaR_energy_dicts(peak: Peak, params: ModelParams, ici_data: Array,
|
|
|
kappaR: Array, abar_cs: list, max_kappaR: float = 50, only_loaded: bool = False):
|
|
|
- abar_ic, inverse = np.unique(emanuele_data[:, 1], return_inverse=True)
|
|
|
+ abar_ic, inverse = np.unique(ici_data[:, 1], return_inverse=True)
|
|
|
|
|
|
energy_fn = mapping.parameter_map_two_expansions(partial(interactions.charged_shell_energy, dist=2),
|
|
|
peak.kappaR_axis_in_expansion)
|
|
@@ -106,8 +106,8 @@ def get_kappaR_energy_dicts(peak: Peak, params: ModelParams, emanuele_data: Arra
|
|
|
ab = np.around(abar_ic[i], 5)
|
|
|
if ab in np.around(abar_cs, 5):
|
|
|
idx, = np.nonzero(inverse == i)
|
|
|
- kR = emanuele_data[idx, 2][emanuele_data[idx, 2] <= max_kappaR]
|
|
|
- en = emanuele_data[idx, peak.emanuele_data_column][emanuele_data[idx, 1] <= max_kappaR]
|
|
|
+ kR = ici_data[idx, 2][ici_data[idx, 2] <= max_kappaR]
|
|
|
+ en = ici_data[idx, peak.ici_data_column][ici_data[idx, 1] <= max_kappaR]
|
|
|
sort = np.argsort(kR)
|
|
|
if peak.log_y:
|
|
|
data_dict_ic[ab] = np.stack((kR[sort], np.abs(en)[sort])).T
|
|
@@ -120,9 +120,9 @@ def get_kappaR_energy_dicts(peak: Peak, params: ModelParams, emanuele_data: Arra
|
|
|
return data_dict_ic, data_dict_cs
|
|
|
|
|
|
|
|
|
-def get_abar_energy_dicts(peak: Peak, params: ModelParams, emanuele_data: Array, a_bar: Array, kR_cs: list, max_abar: float = 0.8):
|
|
|
+def get_abar_energy_dicts(peak: Peak, params: ModelParams, ici_data: Array, a_bar: Array, kR_cs: list, max_abar: float = 0.8):
|
|
|
|
|
|
- kR_ic, inverse = np.unique(emanuele_data[:, 2], return_inverse=True)
|
|
|
+ kR_ic, inverse = np.unique(ici_data[:, 2], return_inverse=True)
|
|
|
|
|
|
energy_fn = mapping.parameter_map_two_expansions(partial(interactions.charged_shell_energy, dist=2),
|
|
|
peak.kappaR_axis_in_expansion)
|
|
@@ -135,8 +135,8 @@ def get_abar_energy_dicts(peak: Peak, params: ModelParams, emanuele_data: Array,
|
|
|
kr = np.around(kR_ic[i], 5)
|
|
|
if kr in np.around(kR_cs, 5):
|
|
|
idx, = np.nonzero(inverse == i)
|
|
|
- abar = emanuele_data[idx, 1][emanuele_data[idx, 1] <= max_abar]
|
|
|
- en = emanuele_data[idx, peak.emanuele_data_column][emanuele_data[idx, 1] <= max_abar]
|
|
|
+ abar = ici_data[idx, 1][ici_data[idx, 1] <= max_abar]
|
|
|
+ en = ici_data[idx, peak.ici_data_column][ici_data[idx, 1] <= max_abar]
|
|
|
sort = np.argsort(abar)
|
|
|
if peak.log_y:
|
|
|
data_dict_ic[kr] = np.stack((abar[sort], np.abs(en)[sort])).T
|
|
@@ -482,7 +482,7 @@ def main():
|
|
|
|
|
|
a_bar = [0.2, 0.5, 0.8]
|
|
|
# IC_peak_energy_plot(a_bar=a_bar, which='pp', min_kappaR=0.01, max_kappaR=50,
|
|
|
- # save_as=FIGURES_PATH.joinpath('Emanuele_data').joinpath('peak_pp_kappaR_higher_correction_abar02.png'),
|
|
|
+ # save_as=FIGURES_PATH.joinpath('ICi_data').joinpath('peak_pp_kappaR_higher_correction_abar02.png'),
|
|
|
# save_data=False,
|
|
|
# quad_correction=False,
|
|
|
# log_y=False
|
|
@@ -493,7 +493,7 @@ def main():
|
|
|
|
|
|
a_bar = [0.1, 0.2, 0.3]
|
|
|
# IC_peak_energy_charge_plot(a_bar=a_bar, which='sep',
|
|
|
- # # save_as=FIGURES_PATH.joinpath('Emanuele_data').joinpath('peak_sep_charge.png'),
|
|
|
+ # # save_as=FIGURES_PATH.joinpath('ICi_data').joinpath('peak_sep_charge.png'),
|
|
|
# )
|
|
|
IC_peak_energy_charge_combined_plot(a_bar,
|
|
|
save_as=FIGURES_PATH.joinpath('final_figures').joinpath('peak_combined_charge.png')
|
|
@@ -501,7 +501,7 @@ def main():
|
|
|
|
|
|
kappaR = [0.01, 3.02407, 30]
|
|
|
# IC_peak_energy_abar_plot(kappaR=kappaR, which='sep', min_abar=0.2, max_abar=0.8,
|
|
|
- # save_as=FIGURES_PATH.joinpath('Emanuele_data').joinpath('peak_sep_abar.png'),
|
|
|
+ # save_as=FIGURES_PATH.joinpath('ICi_data').joinpath('peak_sep_abar.png'),
|
|
|
# save_data=False,
|
|
|
# quad_correction=False,
|
|
|
# log_y=False
|