OverviewΒΆ
This package implements an analysis pipeline to look for DM signals. This involves a lot of bookkeeping and loops over various things. It is probably easiest to first describe this with a bit of pseudo-code that represents the various analysis steps.
The various loop variable are:
rosters
The list of all the rosters to analyze.
targets
The list of all the analysis targets. This is generated by merging all the targets fron the input rosters.
target.profiles
The list of all the spatial profiles to analyze for a particular targeet. This is generated by version targets from all the input rosters.
jpriors
The list of all the type of prior on the J-factor. This is provied by the user.
channels
The list of all the channels to analyze results for. This is provided by the user.
sims
This is of all the simulation scenarios to analyze. This is provided by the user.
first, last
The first and last seeds to use the random number genreator (for simulations), or the first and last random directions to use, (for random direction control studies).
# Initialization, prepare the analysis directories and precompute the DM spectra
PrepareTargets(rosters)
SpecTable
# Data analysis
# Loop over targets
for target in targets:
AnalyzeROI(target)
for profile in target.profiles:
AnalyzeSED(target, profile)
PlotCastro(target, profile)
for jprior in jpriors:
ConvertCastro(target, profile, jprior) # This loops over channels
for channel in channels:
PlotDM(target, profile, jprior, channel)
PlotLimits(target, profile, jprior, channel)
for roster in rosters:
for jprior in jpriors:
StackLikelihood(roster, jprior) # This loops over channels
for channel in channels:
PlotDM(roster, jprior, channel, stacked=True)
PlotLimits(roster, jprior, channel, stacked=True)
# Simulation analysis
# Loop over simulation scenarios
for sim in sims:
# Loop over targets
for target in targets:
CopyBaseROI(sim, target)
for profile in target.profiles:
SimulateROI(sim, target, profile) # This loops over simulation seeds
CollectSED(sim, target, profile)
for seed in range(first, last):
for jprior in jpriors:
ConvertCastro(sim, target, profile, seed, jprior) # This loops over channels
for jprior in jpriors:
CollectLimits(sim, target, profile, jprior) # This loops over channels
for roster in rosters:
for seed in range(first, last):
for jprior in jpriors:
StackLikelihood(sim, roster, seed, jprior) # This loops over channels
for channel in channels:
PlotDM(sim, roster, seed, jprior, channel, stacked=True)
PlotLimits(sim, roster, seed, jprior, channel, stacked=True)
for jprior in jpriors:
CollectLimits(sim, roster, jprior, stacked=True) # This loops over channels
for channel in channels:
PlotLimits(sim, roster, jprior, channel, stacked=True, bands=True)
# Random direction control analysis
# Loop over targets
for target in targets:
CopyBaseROI(target)
RandomDirGen(target)
for profile in target.profiles:
for seed in range(first, last)
AnalyzeSED(target, profile, seed)
for jprior in jpriors:
ConvertCastro(target, profile, seed, jprior)
CollectSED('random', target, profile)
for roster in rosters:
for seed in range(first, last):
for jprior in jpriors:
StackLikelihood(roster, seed, jprior) # This loops over channels
for channel in channels:
PlotDM(roster, jprior, seed, channel, stacked=True)
PlotLimits(roster, jprior, seed, channel, stacked=True)
for jprior in jpriors:
CollectLimits(sim, roster, jprior, stacked=True) # This loops over channels
for channel in channels:
PlotLimits(sim, roster, jprior, channel, stacked=True, bands=True)