Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use refractive index of ice at LOFAR/Auger #757

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions NuRadioMC/utilities/medium.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Module providing the ice models in NuRadioMC.

For more details on the implementation, and the available modules,
see the documentation :doc:`here </NuRadioMC/pages/Manuals/icemodels>`.

"""

from NuRadioMC.utilities import medium_base
import itertools
import numpy as np
Expand Down
51 changes: 46 additions & 5 deletions NuRadioReco/utilities/ice.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,52 @@

"""
implementation of ice models
(old) implementation of ice models

Only returns one of two values depending on whether the depth is below
or above 0 (assumed to be the ice-air) interface.

.. Warning::
This function is used internally in some modules, but should not
be used in new user code. Please use the `NuRadioMC.utilities.medium`
module instead

"""
import logging

logger = logging.getLogger('NuRadioReco.utilities.ice')

def get_refractive_index(depth, site='southpole'):
if(depth <= 0):
return 1.3
else:
"""
Get refractive index for depth

For sites that are not at the poles, always returns the refractive index
of air (1.000293). Otherwise, returns 1.3

.. Warning::
This function is only used internally. New user code should
use the ice models in `NuRadioMC.utilities.medium` instead

Parameters
----------
depth : float
The depth
site : str, optional
The site to use. For sites on land (not in-ice),
the refractive index returned is always that for air.

Returns
-------
n : float
The refractive index. For land-based sites,
this is always n_air=1.000293; for in-ice sites,
returns n_ice=1.3 or n_air depending on the depth.

"""
if site.lower() in ['lofar', 'auger']:
return 1.000293
else:
if not site.lower() in ['southpole', 'mooresbay', 'summit']:
logger.warning(f"site '{site}' unknown, assuming in-ice detector")
if(depth <= 0):
return 1.3
else:
return 1.000293
2 changes: 1 addition & 1 deletion documentation/source/NuRadioMC/pages/Manuals/icemodels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ _________________
In the table below we can find the different parameters for the simple ice refractive index models available in NuRadioMC.

.. csv-table:: Simple Ice Models
:header: "Name", ":math:`n_{ice}`", ":math:`\Delta_n`", ":math:`z_0$ [m]`"
:header: "Name", ":math:`n_{ice}`", ":math:`\Delta_n`", ":math:`z_0 [m]`"

`southpole_simple <https://iopscience.iop.org/article/10.1088/1475-7516/2018/07/055>`__ (RICE2014/SP), 1.78, 0.425, 71
`southpole_2015 <https://iopscience.iop.org/article/10.1088/1475-7516/2018/07/055>`__ (SPICE2015/SP), 1.78, 0.423, 77
Expand Down