In [1]:
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
import argparse
import seaborn.apionly as sns
from icecube import ShowerLLH
from composition.analysis.load_sim import load_sim
import composition.analysis.data_functions as datafunc
import composition.analysis.plotting_functions as plotting
In [2]:
sns.set_palette('muted')
sns.set_color_codes()
In [3]:
df, cut_dict = load_sim(return_cut_dict=True)
selection_mask = np.array([True] * len(df))
standard_cut_keys = ['reco_exists', 'reco_zenith', 'num_hits', 'IT_signal',
'StationDensity', 'max_charge_frac', 'reco_containment',
'energy_range']
for key in standard_cut_keys:
selection_mask *= cut_dict[key]
print('n_events before cuts = {}'.format(len(df)))
df = df[selection_mask]
print('n_events after cuts = {}'.format(len(df)))
In [4]:
charge = df.InIce_log_charge
nchannels = np.log10(df.NChannels)
bins=100
fig, ax = plt.subplots()
plotting.histogram_2D(nchannels, charge, bins, log_counts=False)
plt.plot([0,10], [0,10], marker='None', linestyle='-.')
plt.xlim([1, 3.5])
plt.ylim([1, 5])
plt.xlabel('$\log_{10}(\mathrm{NChannels})$')
plt.ylabel('$\log_{10}(\mathrm{Q}_{\mathrm{tot}})$')
# plt.title('True vs. ShowerLLH Energy')
plt.show()
In [5]:
charge_half = df.InIce_log_charge_half
nchannels_half = np.log10(df.NChannels_half)
bins=100
fig, ax = plt.subplots()
plotting.histogram_2D(nchannels_half, charge_half, bins, log_counts=False)
plt.plot([0,10], [0,10], marker='None', linestyle='-.')
plt.xlim([1, 3.5])
plt.ylim([1, 5])
plt.xlabel('$\log_{10}(\mathrm{NChannels})$')
plt.ylabel('$\log_{10}(\mathrm{Q}_{\mathrm{tot}})$')
# plt.title('True vs. ShowerLLH Energy')
plt.show()
In [6]:
charge_quarter = df.InIce_log_charge_quarter
nchannels_quarter = np.log10(df.NChannels_quarter)
bins=100
fig, ax = plt.subplots()
plotting.histogram_2D(nchannels_quarter, charge_quarter, bins, log_counts=False)
plt.plot([0,10], [0,10], marker='None', linestyle='-.')
plt.xlim([1, 3.5])
plt.ylim([1, 5])
plt.xlabel('$\log_{10}(\mathrm{NChannels})$')
plt.ylabel('$\log_{10}(\mathrm{Q}_{\mathrm{tot}})$')
# plt.title('True vs. ShowerLLH Energy')
plt.show()
In [19]:
nstations = df.NStations
nchannels = df.NChannels
In [23]:
bins=25
fig, ax = plt.subplots()
plotting.histogram_2D(nchannels, nstations, bins, log_counts=False)
# plt.plot([0,10], [0,10], marker='None', linestyle='-.')
# plt.xlim([1, 3.5])
# plt.ylim([1, 5])
plt.xlabel('$\log_{10}(\mathrm{NChannels})$')
plt.ylabel('$\log_{10}(\mathrm{NStations})$')
# plt.title('True vs. ShowerLLH Energy')
plt.show()
In [ ]: