icecube_tools.simulator module

class icecube_tools.simulator.Braun2008Simulator(source, effective_area, reco_energy_sampler, angular_resolution)

Bases: object

Simple simulator which uses the results given in Braun+2008.

Takes a fixed number of neutrinos as arguments rather than source models to reflect the method in the paper.

run(N, show_progress=True)

Run the simulation.

Parameters

N – Number of events to simulate.

class icecube_tools.simulator.Simulator(sources, detector, period)

Bases: SimEvents

property detector
run(N=None, seed=1234, show_progress=True)

Run a simulation for the given set of sources and detector configuration. The expected number of neutrinos will be calculated for each source. If total N is forced, then the number from each source will be weighted accordingly. :param N: Set expected number of neutrinos manually. :param seed: Set random seed.

run_energy(N=None, seed=1234)

Run a simulation of energy reconstruction for the given set of sources and detector configuration. The expected number of neutrinos will be calculated for each source. If total N is forced, then the number from each source will be weighted accordingly. :param N: Set expected number of neutrinos manually. :return: Arrival energy, reconstructed energy in GeV.

save(filename)

Save the output to filename, for all but the R2021 release.

property sources
class icecube_tools.simulator.TimeDependentSimulator(periods, sources, **kwargs)

Bases: SimEvents

Simulator-class for simulations spanning multiple data taking periods.

get_expected_number()
run(N: Optional[List] = None, seed=1234, show_progress=False)

Runs simulation for each period. :param N: List of Ns to be set as expected number of neutrinos in sample. :param seed: Random seed. :param show_progress: Bool, True if debugging information on simulation is to be shown. Currently not implemented.

save(path, file_prefix)

Saves simulated data sets. :param path: Path to directory in which files should be saved. :param file_prefix: Actually suffix of filename, to be appended to all files. :return: Dictionary of filenames.

property sources
property time

Returns dictionary of simulator times. :return: Dictionary of simulator times.

icecube_tools.simulator.lists_to_tuple(list1, list2)
icecube_tools.simulator.sphere_sample(radius=1, v_lim=0, N=1)

Sample points uniformly on a sphere.

icecube_tools.simulator.spherical_to_icrs(theta, phi)

convert spherical coordinates to ICRS ra, dec.