icecube.clsim.util package

icecube.clsim.util.GetAnisotropyTransforms(anisotropyDirAzimuth=3.7699111843077517, magnitudeAlongDir=0.04, magnitudePerpToDir=-0.08, absorptionAnisk1=0, absorptionAnisk2=0, absorptionAniskz=0, scaleOldAnis=1)

Returns the direction-dependent absorption length scaling function and a pre- and post-scattering direction transformation used in the ice anisotropy description of Spice-Lea.

icecube.clsim.util.GetGroupRefractiveIndexRange(mediumProperties)

Returns the minimum and maximum group refractive indices as tuple over all ice layers for a given mediumProperties object.

icecube.clsim.util.GetIceTiltZShift(tiltDirAzimuth=3.9269908169872414, tiltDirectory='/Users/buildbot/actions-runner/_work/icetray/build/clsim/resources/ice/TILT_data/', detectorCenterDepth=1948.07)
icecube.clsim.util.GetIceTiltZShift2D(tiltDirectory='/Users/buildbot/actions-runner/_work/icetray/build/ice-models/resources/models/ICEMODEL/spice_ftp-v0/', detectorCenterDepth=1948.07, tiltDir1=0.16231562043547265, tiltDir2=2.2567107228286685, max_ngrid_x=11, max_ngrid_y=10)
icecube.clsim.util.GetPhaseRefractiveIndexRange(mediumProperties)

Returns the minimum and maximum phase refractive indices as tuple over all ice layers for a given mediumProperties object.

class icecube.clsim.util.interp1d(x, y, kind='linear', axis=-1, copy=True, bounds_error=True, fill_value=nan)

Bases: object

interp1d(x, y, kind=’linear’, axis=-1, copy=True, bounds_error=True,

fill_value=np.nan)

Interpolate a 1-D function.

x and y are arrays of values used to approximate some function f: y = f(x). This class returns a function whose call method uses interpolation to find the value of new points.

Parameters:
  • x (array_like) – A 1-D array of monotonically increasing real values.

  • y (array_like) – A N-D array of real values. The length of y along the interpolation axis must be equal to the length of x.

  • kind (str or int, optional) – Specifies the kind of interpolation as a string (‘linear’,’nearest’) or as an integer specifying the order of the spline interpolator to use. Default is ‘linear’.

  • axis (int, optional) – Specifies the axis of y along which to interpolate. Interpolation defaults to the last axis of y.

  • copy (bool, optional) – If True, the class makes internal copies of x and y. If False, references to x and y are used. The default is to copy.

  • bounds_error (bool, optional) – If True, an error is thrown any time interpolation is attempted on a value outside of the range of x (where extrapolation is necessary). If False, out of bounds values are assigned fill_value. By default, an error is raised.

  • fill_value (float, optional) – If provided, then this value will be used to fill in for requested points outside of the data range. If not provided, then the default is NaN.

See also

UnivariateSpline

A more recent wrapper of the FITPACK routines.

splrep, splev, interp2d

Examples

>>> from scipy import interpolate
>>> x = np.arange(0, 10)
>>> y = np.exp(-x/3.0)
>>> f = interpolate.interp1d(x, y)
>>> xnew = np.arange(0,9, 0.1)
>>> ynew = f(xnew)   # use interpolation function returned by `interp1d`
>>> plt.plot(x, y, 'o', xnew, ynew, '-')
>>> plt.show()

Submodules