Project segmented-spline-reco

Invoke with: import icecube.segmented_spline_reco

C++ I3Modules

I3TimingEquatorFitter

"I3TimingEquatorFitter" (C++ I3Module)

Gulliver-based module to perform simple generic log-likelihood reconstructions.

Param IcePickServiceKey:

Default = '', Key for an IcePick in the context that this module should check before processing physics frames.

Param If:

Default = None, A python function… if this returns something that evaluates to True, Module runs, else it doesn’t

Param LogLikelihood:

Default = None, Log-likelihood service to use

Param Minimizer:

Default = None, Minimizer service to use

Param NonStdName:

Default = '', Name to use to store the non-standard part of the event hypothesis (if any). Be sure to choose a unique name. Default is the fit name + “Params”.

Param OutputName:

Default = '', Name of output I3Particle, and prefix for any fit parameter frame objects

Param Parametrization:

Default = None, Parametrization service to use

Param SeedService:

Default = None, Seed service to use

Param StoragePolicy:

Default = 'OnlyBestFit', Select whether you would like to have: (1) “OnlyBestFit” (default): only a single result (the fit with the best likelihood, storing the I3Particle, I3LogLikelihoodFitParams and if relevant the nonstd part); (2) “AllFitsAndFitParams”: the best fit PLUS two vectors with the fits (I3Particle+I3LogLikelihoodFitParams) for each seed; (3) “AllFitsAndFitParamsNotInVectors”: same as before but instead of storing the results with all seeds in vectors, they are stored individually with an index number appended to the fit name; (4) “AllResults”: the best fit PLUS three vectors with the full fits (I3Particle+nonstd+I3LogLikelihoodFitParams) for each seed (NOT YET IMPLEMENTED); (5) “AllResultsNotInVectors”: same as before but instead of storing the results with all seeds in vectors, they are stored individually with an index number appended to the fit name (NOT YET IMPLEMENTED).

Param TraceMode:

Default = 'None', For detailed debugging of the minimization process, you may want to look at the full history of fit parameter values that were tried by the minimizer, together with the likelihood function values and (if applicable) the gradients. Possible option values: “None” (no tracing), “All” (get traces of fits from all available seeds) and “Single” (only the trace of the best track is kept). In case none of the fits converge, only the last trace will be reported in “Single” mode.

Python I3Modules

SegSplineRecoEMCEE

SegSplineRecoEMCEE (Python I3Module)

Likelihood space visualization

Param covar_input:

Default = '', string of input hessian in frame

Param Filename:

Default = None, Output filename base for plots; if None, run interactively.

Param IcePickServiceKey:

Default = '', Key for an IcePick in the context that this module should check before processing physics frames.

Param If:

Default = None, A python function… if this returns something that evaluates to True, Module runs, else it doesn’t

Param LogLikelihood:

Default = '', LogLikelihood service to use

Param name:

Default = 'emcee', optional name

Param NIterations:

Default = 100, Number of iterations for emcee

Param NSteps:

Default = 20, Number of steps to take along each dimension

Param NWalkers:

Default = 24, Number of walkers for emcee

Param Parametrization:

Default = '', Parametrization service to use

Param plot_debug_trace:

Default = False, plot debug trace

Param SeedService:

Default = '', Seed service to use

Param StepSize:

Default = 0.5, Size of each step in unit of the parametrization’s step size

Param WithGradients:

Default = False, Plot LogLikelihood gradients along with function values.

calc_hessian

calc_hessian (Python I3Module)

Likelihood space visualization

Param IcePickServiceKey:

Default = '', Key for an IcePick in the context that this module should check before processing physics frames.

Param If:

Default = None, A python function… if this returns something that evaluates to True, Module runs, else it doesn’t

Param LogLikelihood:

Default = '', LogLikelihood service to use

Param output_name:

Default = 'hess', ouptutname

Param Parametrization:

Default = '', Parametrization service to use

Param SeedService:

Default = '', Seed service to use

nd_paraboloid

nd_paraboloid (Python I3Module)

Code to fit “n-d” paraboloids given a bunch of sample points. The standard application is 6-d (x,y,z,dir1,dir2,t) input given by samples, but it can really work in any dimension .. although it is not optimized to work in higher than 10-d or so. Standard applicataion is within SegmentedSplineReco, where the 6-d fit is performed on the samples, the hesse matrix is converted into a covariance matrix, and one obtains the covariance in the desired dimensions (marginalization) just by picking out the dimensions of interest. It is independent of the precise reconstruction, parametrization, or gulliver.

Param calls_per_iter:

Default = 100, Name of llh_string in object of samples

Param clean_first_values:

Default = 0, Name of llh_string in object of samples

Param IcePickServiceKey:

Default = '', Key for an IcePick in the context that this module should check before processing physics frames.

Param If:

Default = None, A python function… if this returns something that evaluates to True, Module runs, else it doesn’t

Param llh_string:

Default = 'negllh', Name of llh_string in object of samples

Param loss:

Default = 'linear', Name of llh_string in object of samples

Param lq_fn:

Default = 'lm', Name of llh_string in object of samples

Param object_of_samples:

Default = 'samples', Name of I3MapStringVectorDouble containing Vectors of doubles, one for each dim and llh

Param pb_pars:

Default = ['dir1', 'dir2'], Name of llh_string in object of samples

Param tot_iter:

Default = 100, Name of llh_string in object of samples

C++ ServiceFactorys

I3EquatorParametrizationFactory

"I3EquatorParametrizationFactory" (C++ ServiceFactory)

<undocumented>

Param DirectionStepsize:

Default = 0.3, Stepsize for direction, should be positive.

Param FitEffectiveDomeff:

Default = False, Fit differential energy loss?

Param LogEnergyStepsize:

Default = 0.0, Stepsize for log10(E), should be >=0 (if 0, then energy remains fixed).

Param RotateVertexCoords:

Default = False, Stepsize for vertex time, should be >=0 (if 0, then the vertex time remains fixed).

Param TimeStepsize:

Default = 0.0, Stepsize for vertex time, should be >=0 (if 0, then the vertex time remains fixed).

Param UseDifferentialElossPara:

Default = False, Fit differential energy loss?

Param VertexStepsize:

Default = 1.0, Stepsize for (dx,dy,dz), should be >=0 (if 0, then the vertex position remains fixed).

I3SegmentedRecoSeedServiceFactory

"I3SegmentedRecoSeedServiceFactory" (C++ ServiceFactory)

This class installs a I3SegmentedRecoSeedService.

Param AddAlternatives:

Default = 'None', Add simple alternative seeds for each first guess;argument is a string; possibilities: “None” (default,no alternatives), “Reverse” (add a track the samevertex in the opposite direction), “Cubic” (add 5more tracks: the track and four perpendicular tracks).

Param AltTimeShiftType:

Default = 'TFirst', This option is only relevant if you configure ‘alternative seeds’ (add e.g. reverse fg guess track). You may want to have different vertex tweaking for the original seed and the alternative seeds: if the first guess is the result of some LLH then you don’t want to do any vertex tweaking on that, but the alternative seeds are probably worthless without vertex tweaking.

Param BoundingSurface:

Default = None, Place cascades inside this surface when constructing composite hypothesis

Param ChargeFraction:

Default = 0.9, If you use the “TChargeFraction” or “TDirectChargeFraction” vertex time correction method, then you can configure with this option the fraction of the charge that should have a positive time residual.

Param DifferentialEnergyLoss:

Default = 0, Use differntial energy loss Prior?

Param FirstGuess:

Default = '', Names of result of first guess module.

Param FirstGuesses:

Default = [], Names of results of several first guess modules.

Param FixedEnergy:

Default = nan, Most FG methods do not provide an energy estimate, with this option you can give the energy some reasonable starting value. NOTE(0): ‘Fixed’ refers to the seed energy always being the same value, independent of any event variales (e.g. on NCh). So you can use this option if you actually want to fit the energy: you configure that in the parametrization service, not in the seed service. NOTE(1): You cannot set both this option and the NChEnergyGuessPolynomial option. NOTE(2): If the FG already gives a value for the energy,then setting the FixedEnergy or NChEnergyGuessPolynomial option will clobber that value. Default: leave FG energy as it is, regardless.

Param InputReadout:

Default = '', Name of hits/pulses to use for vertex correction (leave empty if you don’t want any corrections)

Param MaxMeanTimeResidual:

Default = 1000.0, This option only has effect if you set TimeShift to “TFirst”: Occasionally an event has a weird little early cluster of hits; that would totally sabotage this time correction. Hence for this correction hits with a tres less than [optionvalue] below the mean are ignored; in other words, it is guaranteed that after the time correction, the mean time residual is between 0 and [optionvalue]. if you don’t want this, set this option to NAN or a negative time.

Param NChEnergyGuessPolynomial:

Default = [], Most FG methods do not provide an energy estimate,with this option you can fix the energy value. Theargument to this option should be vector of floats (useproper units, e.g. I3Units.GeV)), which will be used toobtain an energy estimate from NCh, via a polynomial: log10(E/GeV) = p0+p1*x+p2*x*x+… with x=log(NCh). You can get the efficients p0, p1, p2… from a fit to a profile plot of log10(MCLeadMuon/GeV):log10(NHits). For instance, for IC80 it seems that [3.627338, 0.299288, 0.437605] works well. NOTE(1): You cannot set both this option and the FixedEnergy option. NOTE(2): If the FG already gives a value for the energy,then setting the FixedEnergy or NChEnergyGuessPolynomial option will clobber that value. Default: leave FG energy as it is, regardless.

Param NonStdHypothesis:

Default = True, If set to true: the hypothesis will have a particle part (SplineReco track) + a nonstd part (Millipede cascades)Only set to true if FirstGuesses = [SplineMPE, Millipede].

Param OnlyAlternatives:

Default = False, If set to true: use only the alternative seeds, omit the seeds that are directly based on the input tracks or first guesses.

Param PositionShiftType:

Default = 'COG', Indicate how you’d like the vertex position of the fg corrected. Currently this is only relevant for infinite muon tracks, for other I3Particle shapes the vertex position from the first guess is taken as is. For infinite muons, if you provide an InputReadout, then the vertex position of an infinite track is by default (option value “COG”) shifted along the track to the closest point to the COG of the hits/pulses. Setting this option to “None” or empty string will disable the correction of the vertex position.

Param ShowerSpacing:

Default = -1.0, Shower spacing to use when constructing composite hypothesis

Param SpeedPolice:

Default = True, By default, the basic seed service will force the speed of infinite tracks to be 1.0c and that of cascades to be 0. If you would like to keep the speed value as provided by the first guess (e.g. linefit sets a nontrivial speed value since release V02-00-07), then set this flag to False.

Param TimeShiftType:

Default = 'TMean', Indicate how you’d like the vertex time of the fg corrected: such that mean or minimum time residual of the hits/pulses is zero (use “TMean” or “TFirst”, resp.), or no correction at all (“TNone”). There are two new vertex time methods: “TChargeFraction” and “TDirectChargeFraction”.The former chooses the vertex such that some (configurable) charge-weighted fraction of all pulses has a positive time residual, the latter does the same but using only the first hit/pulse in every DOM. What’s best depends both on the detector (AMANDA or IceCube) and on the first guess, e.g.: DirectWalk first guess: TNone; linefit first guess for AMANDA: TMean; linefit first guess for IceCube: TFirst.

I3SegmentedSplineRecoLikelihoodFactory

"I3SegmentedSplineRecoLikelihoodFactory" (C++ ServiceFactory)

<undocumented>

Param CascadePhotonicsService:

Default = None, Photonics service for level2 muon splines. This is a MUST.

Param cutoff_distance:

Default = 500.0, Maximum Cascade-DOM distance considered in the evaluation of the energy of cascades. Cascdes further than cutoff_distance are not considered anymore

Param effective_dom_efficiency:

Default = 0.99, Cache table evaluation for fast pure energy optimization.

Param en_estimators:

Default = [], Names of I3Particles containing desired energy estimation. Used for EnDependentPostJitter.

Param energy_regularization:

Default = -1.0, Maximum Cascade-DOM distance considered in the evaluation of the energy of cascades. Cascdes further than cutoff_distance are not considered anymore

Param EnergyDependentPostJitter:

Default = False, Post jitter is chosen depending on energy for MPE reco

Param ExcludedDOMs:

Default = ['BadDomsList', 'CalibrationErrata', 'SaturationWindows'], Set of keys containing lists either of OMKeys or I3TimeWindowSeriesMaps describing potentially unreliable data that should be excluded from the fit

Param Likelihood:

Default = 'mpe', One of “mpe/spe/extended_spe”

Param MuonPhotonicsService:

Default = None, Photonics service for level2 muon splines. This is a MUST.

Param MuonReco:

Default = False, Reconstruct also bare muon weighted with its meanPEs contribution. Muon contribution is added as a cascade with its weigth

Param NoiseRate:

Default = 6.5e-07, Rate of noise hits in Hz. Needs to be set also if NoiseModel is “none”. Defaults to 10 Hertz.

Param NoiseScale:

Default = 1.0, Scale factor to apply to cascades’ energy (to be used with UMillipede’s cascades)

Param PostJitter:

Default = 0.0, Jitter applied to time residual of outer hit llh (MPE),

Param PrePulsesReco:

Default = False, Reconstruct prepulses

Param Pulses:

Default = 'RecoPulseSeries', Name of pulse series to use (MUST).

Param spe_charge_correction:

Default = 0.84, Cache table evaluation for fast pure energy optimization.

Param use_cache:

Default = False, Cache table evaluation for fast pure energy optimization.

I3Tray segments

SegRecoSVN

SegRecoSVN (I3Tray segment)

Perform a SplineMPE-reconstruction Configuration==’default’ will run a default MPE reco giving the worst resolution. The options ‘fast’, ‘recommended’ and ‘max’ will activate modifications with rising accuracy and decreasing execution speed, where “fast” is faster than “default” because of quicker convergence. See https://wiki.icecube.wisc.edu/index.php/Spline-reco for documentation as well as speed and resolution comparisons.

Param llh:

Default = 'spe',

Param PulsesName:

Default = '',

Param PrePulsesReco:

Default = False,

Param MuonReco:

Default = False,

Param TrackSeedList:

Default = [],

Param CascadeSeedList:

Default = [],

Param NoiseScaleFactor:

Default = 1.0,

Param max_iter:

Default = 20,

Param num_particles:

Default = 20,

Param kernel_type:

Default = 'mean',

Param stepsize:

Default = 1.0,

Param start_sigma:

Default = 0.1,

Param decr_rand_scale:

Default = 0.2,

Param perm_rand_scale:

Default = 0.01,

Param BareMuTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_prob_z20a10_V2.fits',

Param BareMuAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_abs_z20a10_V2.fits',

Param CascadeTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.prob.fits',

Param CascadeAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.abs.fits',

Param If:

Default = <function <lambda> at 0x15696eca0>,

SegmentedSplineReco

SegmentedSplineReco (I3Tray segment)

Perform a SplineMPE-reconstruction Configuration==’default’ will run a default MPE reco giving the worst resolution. The options ‘fast’, ‘recommended’ and ‘max’ will activate modifications with rising accuracy and decreasing execution speed, where “fast” is faster than “default” because of quicker convergence. See https://wiki.icecube.wisc.edu/index.php/Spline-reco for documentation as well as speed and resolution comparisons.

Param llh:

Default = 'spe',

Param PulsesName:

Default = '',

Param PrePulsesReco:

Default = False,

Param MuonReco:

Default = False,

Param TrackSeedList:

Default = [],

Param CascadeSeedList:

Default = [],

Param ShowerSpacing:

Default = 10,

Param BoundingSurface:

Default = <icecube._phys_services.Cylinder object at 0x1067ce5c0>,

Param NoiseScaleFactor:

Default = 1.0,

Param use_gradient:

Default = False,

Param fit_cascade_energies:

Default = False,

Param pure_efit:

Default = False,

Param tolerance:

Default = 1e-15,

Param strategy:

Default = 0,

Param algo:

Default = 'migrad',

Param energy_regularization:

Default = -1.0,

Param scan_dim_1:

Default = 'dir1',

Param scan_dim_2:

Default = 'dir2',

Param scan_fov:

Default = 2.0,

Param scan_npts:

Default = 10,

Param use_cache:

Default = 1,

Param effective_dom_efficiency:

Default = 1.0,

Param spe_charge_correction:

Default = 0.84,

Param cpp_pure_energy:

Default = 0,

Param efit_use_jax:

Default = 0,

Param efit_use_logsumexp:

Default = 0,

Param excluded_doms:

Default = ['BadDomsList', 'CalibrationErrata'],

Param excluded_timewindows:

Default = ['SaturationWindows'],

Param post_jitter:

Default = 0.0,

Param pre_jitter:

Default = 4.0,

Param en_dependent_post_jitter:

Default = 0,

Param en_estimators:

Default = [],

Param differential_eloss_prior:

Default = 0,

Param eloss_spline_path:

Default = '',

Param fit_effective_domeff:

Default = 0,

Param seed_cyl_cleaning_radius:

Default = 0.0,

Param BareMuTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_prob_z20a10_V2.fits',

Param BareMuAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_abs_z20a10_V2.fits',

Param CascadeTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.prob.fits',

Param CascadeAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.abs.fits',

Param table_cos_azimuth_range:

Default = (-0.99999, 0.99999),

Param quantile_epsilon:

Default = 1e-08,

Param ignore_edm:

Default = True,

Param minuit_print_level:

Default = 0,

Param If:

Default = <function <lambda> at 0x1040f4220>,

SegmentedSplineRecoHessianTest

SegmentedSplineRecoHessianTest (I3Tray segment)

Perform a SplineMPE-reconstruction Configuration==’default’ will run a default MPE reco giving the worst resolution. The options ‘fast’, ‘recommended’ and ‘max’ will activate modifications with rising accuracy and decreasing execution speed, where “fast” is faster than “default” because of quicker convergence. See https://wiki.icecube.wisc.edu/index.php/Spline-reco for documentation as well as speed and resolution comparisons.

Param llh:

Default = 'spe',

Param PulsesName:

Default = '',

Param PrePulsesReco:

Default = False,

Param MuonReco:

Default = False,

Param TrackSeedList:

Default = [],

Param CascadeSeedList:

Default = [],

Param NoiseScaleFactor:

Default = 1.0,

Param fit_energy:

Default = 0.0,

Param effective_dom_efficiency:

Default = 1.0,

Param spe_charge_correction:

Default = 0.84,

Param pre_jitter:

Default = 4.0,

Param pure_efit:

Default = False,

Param cpp_pure_energy:

Default = 1,

Param excluded_doms:

Default = ['BadDomsList', 'CalibrationErrata'],

Param excluded_timewindows:

Default = ['SaturationWindows'],

Param BareMuTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_prob_z20a10_V2.fits',

Param BareMuAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_abs_z20a10_V2.fits',

Param CascadeTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.prob.fits',

Param CascadeAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.abs.fits',

Param If:

Default = <function <lambda> at 0x15696e840>,

segreco_parscan

segreco_parscan (I3Tray segment)

Perform a SplineMPE-reconstruction Configuration==’default’ will run a default MPE reco giving the worst resolution. The options ‘fast’, ‘recommended’ and ‘max’ will activate modifications with rising accuracy and decreasing execution speed, where “fast” is faster than “default” because of quicker convergence. See https://wiki.icecube.wisc.edu/index.php/Spline-reco for documentation as well as speed and resolution comparisons.

Param llh:

Default = 'spe',

Param PulsesName:

Default = '',

Param PrePulsesReco:

Default = False,

Param MuonReco:

Default = False,

Param TrackSeedList:

Default = [],

Param CascadeSeedList:

Default = [],

Param NoiseScaleFactor:

Default = 1.0,

Param pts_per_dim:

Default = 10,

Param scan_fov:

Default = 5.0,

Param scan_name1:

Default = 'dir1',

Param scan_name2:

Default = 'dir2',

Param BareMuTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_prob_z20a10_V2.fits',

Param BareMuAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_abs_z20a10_V2.fits',

Param CascadeTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.prob.fits',

Param CascadeAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.abs.fits',

Param If:

Default = <function <lambda> at 0x15696ede0>,

segreco_uncertainty

segreco_uncertainty (I3Tray segment)

Perform a SplineMPE-reconstruction Configuration==’default’ will run a default MPE reco giving the worst resolution. The options ‘fast’, ‘recommended’ and ‘max’ will activate modifications with rising accuracy and decreasing execution speed, where “fast” is faster than “default” because of quicker convergence. See https://wiki.icecube.wisc.edu/index.php/Spline-reco for documentation as well as speed and resolution comparisons.

Param llh:

Default = 'spe',

Param PulsesName:

Default = '',

Param PrePulsesReco:

Default = False,

Param MuonReco:

Default = False,

Param TrackSeedList:

Default = [],

Param CascadeSeedList:

Default = [],

Param NoiseScaleFactor:

Default = 1.0,

Param mode:

Default = 'emcee',

Param num_particles:

Default = 50,

Param num_iter:

Default = 50,

Param clean_first_vals_for_ndfit:

Default = 2000,

Param use_evar:

Default = False,

Param energy_regularization:

Default = -1.0,

Param effective_dom_efficiency:

Default = 1.0,

Param spe_charge_correction:

Default = 0.84,

Param post_jitter:

Default = 0.0,

Param en_dependent_post_jitter:

Default = 0,

Param excluded_doms:

Default = ['BadDomsList', 'CalibrationErrata', 'SaturationWindows'],

Param excluded_timewindows:

Default = [],

Param en_estimators:

Default = [],

Param BareMuTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_prob_z20a10_V2.fits',

Param BareMuAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/InfBareMu_mie_abs_z20a10_V2.fits',

Param CascadeTimingSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.prob.fits',

Param CascadeAmplitudeSpline:

Default = '/cvmfs/icecube.opensciencegrid.org/data/photon-tables/splines/ems_mie_z20_a10.abs.fits',

Param If:

Default = <function <lambda> at 0x15696ef20>,