In [1]:
%matplotlib notebook
In [2]:
import os
import sys
import numpy as np
import scipy.io as sio
import matplotlib.pyplot as plt
from matplotlib.ticker import (MultipleLocator, FormatStrFormatter, AutoMinorLocator)
import pandas as pd
In [3]:
os.chdir('..')
os.getcwd()
Out[3]:
In [4]:
sys.path.append('../scripts/')
In [5]:
import bicorr as bicorr
import bicorr_e as bicorr_e
import bicorr_plot as bicorr_plot
import bicorr_math as bicorr_math
import bicorr_sums as bicorr_sums
In [6]:
det_df = bicorr.load_det_df('../meas_info/det_df_pairs_angles.csv')
det_df.head()
Out[6]:
In [7]:
e_min = 1
e_max = 4
In [8]:
legends =['Experiment', 'CGMF', 'FREYA', 'PoliMi', 'PoliMi-No CT']
fmts = ['x', 's', 'D', 'o', '^']
colors = ['#5d269b', '#dd673b', '#80bc31', '#3cbfe0', '#4242f4']
to_plot = [0,1,2,3,4]
In [9]:
bhm_e_meas, e_bin_edges, note = bicorr_e.load_bhm_e('../analysis/Cf072115_to_Cf072215b/datap'); print(note)
bhm_e_cgmf, e_bin_edges, note = bicorr_e.load_bhm_e('../analysis/cgmf/datap'); print(note)
bhm_e_freya,e_bin_edges, note = bicorr_e.load_bhm_e('../analysis/freya/datap'); print(note)
bhm_e_ipol, e_bin_edges, note = bicorr_e.load_bhm_e('../analysis/ipol/datap'); print(note)
bhm_e_ipol_noct, e_bin_edges, note = bicorr_e.load_bhm_e('../analysis/ipol_noct/datap'); print(note)
In [10]:
index = bicorr.generate_pair_is(det_df, ignore_fc_neighbors_flag=False)
print(index.shape)
bhp_e_meas = bicorr_e.build_bhp_e(bhm_e_meas, e_bin_edges, pair_is = index)[0]
bhp_e_cgmf = bicorr_e.build_bhp_e(bhm_e_cgmf, e_bin_edges, pair_is = index)[0]
bhp_e_freya= bicorr_e.build_bhp_e(bhm_e_freya,e_bin_edges, pair_is = index)[0]
bhp_e_ipol = bicorr_e.build_bhp_e(bhm_e_ipol, e_bin_edges, pair_is = index)[0]
bhp_e_ipol_noct = bicorr_e.build_bhp_e(bhm_e_ipol_noct, e_bin_edges, pair_is = index)[0]
bhp_es = [bhp_e_meas,
bhp_e_cgmf,
bhp_e_freya,
bhp_e_ipol,
bhp_e_ipol_noct]
Load num_fission
In [11]:
num_fission_meas = int(int(sio.loadmat('Cf072115_to_Cf072215b/datap/num_fissions.mat')['num_fissions'])*float(sio.loadmat('Cf072115_to_Cf072215b/datap/fc_efficiency.mat')['fc_efficiency']))
num_fission_cgmf = int(sio.loadmat('cgmf/datap/num_fissions.mat')['num_fissions'])
num_fission_freya= int(sio.loadmat('freya/datap/num_fissions.mat')['num_fissions'])
num_fission_ipol = int(sio.loadmat('ipol/datap/num_fissions.mat')['num_fissions'])
num_fission_ipol_noct = int(sio.loadmat('ipol_noct/datap/num_fissions.mat')['num_fissions'])
num_fissions = [num_fission_meas,
num_fission_cgmf,
num_fission_freya,
num_fission_ipol,
num_fission_ipol_noct]
print(num_fissions)
In [12]:
counts_df = pd.DataFrame({'dataset':legends,'num_fissions':num_fissions},index=to_plot)
counts_df['Cd'] = np.nan
counts_df['Cd_err'] = np.nan
counts_df.head()
Out[12]:
In [13]:
for i in to_plot:
bhp_e = bhp_es[i]
counts_df.loc[i,'Cd'], counts_df.loc[i,'Cd_err'], energies_real = bicorr_sums.calc_nn_sum_e(bhp_e, e_bin_edges, e_min = e_min, e_max = e_max, return_real_energies_flag=True)
counts_df
Out[13]:
In [15]:
counts_df['Cd per million fission'] = 10**6 * counts_df['Cd'] / counts_df['num_fissions']
counts_df['Cd_err per million fission'] = 10**6 * counts_df['Cd_err'] / counts_df['num_fissions']
In [16]:
counts_df
Out[16]:
In [17]:
counts_df.to_csv(r'compare/doubles_counts_df.csv')
In [20]:
print(counts_df.to_latex(columns=['dataset','num_fissions','Cd','Cd_err','Cd per million fission','Cd_err per million fission'],index=False))
In [ ]: