コード例 #1
0
    def __init__(self, ebins, czbins,
                 earth_model='oscillations/PREM_60layer.dat',
                 detector_depth=2.0, prop_height=None, osc_precision=5e-4,
                 **kwargs):
        """
        Parameters needed to instantiate a NucraftOscillationService:
        * ebins: Energy bin edges
        * czbins: cos(zenith) bin edges
        * earth_model: Earth density model used for matter oscillations.
                       Default: 60-layer PREM model shipped with pisa.
        * detector_depth: Detector depth in km. Default: 2.0
        * prop_height: Height in the atmosphere to begin in km.
                       Default: None, samples from a parametrization to
                       the atmospheric interaction model presented in
                       "Path length distributions of atmospheric neutrinos",
                       Gaisser and Stanev, PhysRevD.57.1977
        * osc_precision: Numerical precision for oscillation probabilities
        """
        OscillationServiceBase.__init__(self, ebins, czbins)

        self.prop_height = prop_height # km above spherical Earth surface
        self.height_mode = 3 if self.prop_height is None else 1
        self.detector_depth = detector_depth # km below spherical Earth surface
        self.num_prec = osc_precision
        self.get_earth_model(earth_model)
コード例 #2
0
    def __init__(self, ebins, czbins, detector_depth=None, earth_model=None,
                 prop_height=None, osc_precision=None,
                 **kwargs):
        """
        Parameters needed to instantiate a NucraftOscillationService:
        * ebins: Energy bin edges
        * czbins: cos(zenith) bin edges
        * earth_model: Earth density model used for matter oscillations.
        * detector_depth: Detector depth in km.
        * prop_height: Height in the atmosphere to begin in km.
                       Default: 'sample', samples from a parametrization to
                       the atmospheric interaction model presented in
                       "Path length distributions of atmospheric neutrinos",
                       Gaisser and Stanev, PhysRevD.57.1977
        * osc_precision: Numerical precision for oscillation probabilities
        """
        OscillationServiceBase.__init__(self, ebins, czbins)

        print get_params()
        report_params(get_params(),['km','','','km'])

        self.prop_height = prop_height # km above spherical Earth surface
        self.height_mode = 3 if self.prop_height is 'sample' else 1
        self.detector_depth = detector_depth # km below spherical Earth surface
        self.num_prec = osc_precision
        self.get_earth_model(earth_model)
コード例 #3
0
    def __init__(
        self, ebins, czbins, detector_depth=None, earth_model=None, prop_height=None, osc_precision=5e-4, **kwargs
    ):
        """
        Parameters needed to instantiate a NucraftOscillationService:
        * ebins: Energy bin edges
        * czbins: cos(zenith) bin edges
        * earth_model: Earth density model used for matter oscillations.
        * detector_depth: Detector depth in km.
        * prop_height: Height in the atmosphere to begin in km.
                       Default: 'sample', samples from a parametrization to
                       the atmospheric interaction model presented in
                       "Path length distributions of atmospheric neutrinos",
                       Gaisser and Stanev, PhysRevD.57.1977
        * osc_precision: Numerical precision for oscillation probabilities
        """
        OscillationServiceBase.__init__(self, ebins, czbins)
        logging.info("Initializing %s..." % self.__class__.__name__)

        print get_params()
        report_params(get_params(), ["km", "", "", "km"])

        self.prop_height = prop_height  # km above spherical Earth surface
        # print "\n\n self.prop_height: ",self.prop_height
        """ height_mode = 0 ensures that interaction takes place at chosen height """
        """ whereas height_mode = 1 samples single altitude from distribution """
        self.height_mode = 3 if self.prop_height == "sample" else 0
        logging.debug("NuCraft height mode: %d" % self.height_mode)
        self.detector_depth = detector_depth  # km below spherical Earth surface
        self.num_prec = osc_precision
        self.get_earth_model(earth_model)
コード例 #4
0
    def __init__(self, ebins, czbins, detector_depth=None, earth_model=None,
                 prop_height=None, osc_precision=5e-4,
                 **kwargs):
        """
        Parameters needed to instantiate a NucraftOscillationService:
        * ebins: Energy bin edges
        * czbins: cos(zenith) bin edges
        * earth_model: Earth density model used for matter oscillations.
        * detector_depth: Detector depth in km.
        * prop_height: Height in the atmosphere to begin in km.
                       Default: 'sample', samples from a parametrization to
                       the atmospheric interaction model presented in
                       "Path length distributions of atmospheric neutrinos",
                       Gaisser and Stanev, PhysRevD.57.1977
        * osc_precision: Numerical precision for oscillation probabilities
        """
        OscillationServiceBase.__init__(self, ebins, czbins)
        logging.info('Initializing %s...'%self.__class__.__name__)

        print get_params()
        report_params(get_params(),['km','','','km'])

        self.prop_height = prop_height # km above spherical Earth surface
        #print "\n\n self.prop_height: ",self.prop_height
 	''' height_mode = 0 ensures that interaction takes place at chosen height '''
	''' whereas height_mode = 1 samples single altitude from distribution '''
        self.height_mode = 3 if self.prop_height == 'sample' else 0
        logging.debug("NuCraft height mode: %d"%self.height_mode)
        self.detector_depth = detector_depth # km below spherical Earth surface
        self.num_prec = osc_precision
        self.get_earth_model(earth_model)
コード例 #5
0
    def __init__(self, ebins, czbins, earth_model='oscillations/PREM_60layer.dat',
                 detector_depth=2.0, prop_height=20.0, **kwargs):
        """
        Parameters needed to instantiate a Prob3OscillationService:
        * ebins: Energy bin edges
        * czbins: cos(zenith) bin edges
        * earth_model: Earth density model used for matter oscillations.
                       Default: 60-layer PREM model shipped with pisa.
        * detector_depth: Detector depth in km. Default: 2.0
        * prop_height: Height in the atmosphere to begin in km.
                       Default: 20.0
        """
        OscillationServiceBase.__init__(self, ebins, czbins)

        self.prop_height = prop_height
        earth_model = find_resource(earth_model)
        self.barger_prop = BargerPropagator(earth_model, detector_depth)
        self.barger_prop.UseMassEigenstates(False)
コード例 #6
0
    def __init__(self, ebins, czbins, detector_depth=None, earth_model=None,
                 prop_height=None, **kwargs):
        """
        Parameters needed to instantiate a Prob3OscillationService:
        * ebins: Energy bin edges
        * czbins: cos(zenith) bin edges
        * earth_model: Earth density model used for matter oscillations.
        * detector_depth: Detector depth in km.
        * prop_height: Height in the atmosphere to begin in km.
        """
        OscillationServiceBase.__init__(self, ebins, czbins)

        report_params(get_params(),['km','','km'])

        self.prop_height = prop_height
        earth_model = find_resource(earth_model)
        self.barger_prop = BargerPropagator(earth_model, detector_depth)
        self.barger_prop.UseMassEigenstates(False)
コード例 #7
0
    def __init__(self,
                 ebins,
                 czbins,
                 detector_depth=None,
                 earth_model=None,
                 prop_height=None,
                 **kwargs):
        """
        Parameters needed to instantiate a Prob3OscillationService:
        * ebins: Energy bin edges
        * czbins: cos(zenith) bin edges
        * earth_model: Earth density model used for matter oscillations.
        * detector_depth: Detector depth in km.
        * prop_height: Height in the atmosphere to begin in km.
        """
        OscillationServiceBase.__init__(self, ebins, czbins)
        logging.info('Initializing %s...' % self.__class__.__name__)

        report_params(get_params(), ['km', '', 'km'])

        self.prop_height = prop_height
        earth_model = find_resource(earth_model)
        self.barger_prop = BargerPropagator(earth_model, detector_depth)
        self.barger_prop.UseMassEigenstates(False)
コード例 #8
0
 def __init__(self,ebins,czbins,datadir='oscillations', **kwargs):
     OscillationServiceBase.__init__(self, ebins, czbins)
     
     self.datadir = datadir
コード例 #9
0
    def __init__(self,ebins,czbins,datadir=None, **kwargs):
        OscillationServiceBase.__init__(self, ebins, czbins)

        report_params(get_params(),[''])
        self.datadir = datadir
コード例 #10
0
    def __init__(self, ebins, czbins, datadir=None, **kwargs):
        OscillationServiceBase.__init__(self, ebins, czbins)

        report_params(get_params(), [''])
        self.datadir = datadir