km3astro.coord
¶
Coordinate transformations.
- Galactic:
GC at (0, 0), gal. longitude, latitude (l, b)
- Horizontal / altaz (km3):
centered at detector position altitude, azimuth (altitude = 90deg - zenith)
- EquatorialJ200 / FK5 / ICRS / GCRS
(right ascension, declination)
Equatorial is the same as FK5. FK5 is superseded by the ICRS, so use this instead. Note that FK5/ICRS are _barycentric_ implementations, so if you are looking for geocentric equatorial (i.e. for solar system bodies), use GCRS.
A note on maing conventions:
phi
and theta
refer to neutrino directions, azimuth
and
zenith
to source directions (i.e. the inversed neutrino direction).
The former says where the neutrino points to, the latter says where it comes
from.
Also radian is the default. Degree can be used, but generally the default is to assume radian.
Module Contents¶
Classes¶
Functions¶
|
Flip the direction. |
|
Flip the direction. |
|
Wrapper around astropy's get_sun, accepting numpy/pandas time objects. |
|
Wrapper around astropy's get_moon, accepting numpy/pandas time objects. |
|
Get the (horizontal) coordinate frame of your detector. |
|
Create astropy events from detector coordinates. |
|
Sun position in local coordinates. |
|
Moon position in local coordinates. |
|
Galactic center position in local coordinates. |
|
Return angular distance of event to GC. |
|
Return distance of event to sun, in detector coordinates. |
|
Generate random (time, azimuth) events and get distance to GC. |
|
Generate random (time, azimuth) events and get distance to GC. |
|
|
|
Build a SkyCoord object of the corresponding frame and parameters |
|
Transform a Skycoord object to the desired frame |
|
Transform a pandas DataFrame of sky coordinate parameters to a new pandas.DataFrame of SkyCoord of the initial and desired frame |
- km3astro.coord.neutrino_to_source_direction(phi, theta, radian=True)[source]¶
Flip the direction.
- Parameters:
- phi, theta: neutrino direction
- radian: bool [default=True]
receive + return angles in radian? (if false, use degree)
- km3astro.coord.source_to_neutrino_direction(azimuth, zenith, radian=True)[source]¶
Flip the direction.
- Parameters:
- zenithfloat
neutrino origin
- azimuth: float
neutrino origin
- radian: bool [default=True]
receive + return angles in radian? (if false, use degree)
- km3astro.coord.Sun(time)[source]¶
Wrapper around astropy’s get_sun, accepting numpy/pandas time objects.
- km3astro.coord.Moon(time)[source]¶
Wrapper around astropy’s get_moon, accepting numpy/pandas time objects.
- km3astro.coord.local_frame(time, location)[source]¶
Get the (horizontal) coordinate frame of your detector.
- km3astro.coord.local_event(azimuth, time, zenith, location, radian=True, **kwargs)[source]¶
Create astropy events from detector coordinates.
- km3astro.coord.orca_gc_dist(azimuth, time, zenith, frame='detector')[source]¶
Return angular distance of event to GC.
- Parameters:
- frame: str, [default: ‘detector’]
valid are ‘detector’, ‘galactic’, ‘icrs’, ‘gcrs’
- km3astro.coord.orca_sun_dist(azimuth, time, zenith)[source]¶
Return distance of event to sun, in detector coordinates.
- km3astro.coord.gc_dist_random(zenith, frame='detector')[source]¶
Generate random (time, azimuth) events and get distance to GC.
- km3astro.coord.sun_dist_random(zenith)[source]¶
Generate random (time, azimuth) events and get distance to GC.
- km3astro.coord.build_event(Cframe, *args)[source]¶
Build a SkyCoord object of the corresponding frame and parameters
- Parameters:
- Cframestr
Frame of the Skycoord event to build, either “ParticleFrame”, “UTM”, “equatorial” or “galactic”
- *argslist of the sky coordinate parameters
- Returns:
- SkyCoordastropy.SkyCoord
Sky coordinate object
- km3astro.coord.transform_to(Skycoord, frame_to, detector_to='antares')[source]¶
Transform a Skycoord object to the desired frame
- Parameters:
- SkyCoordastropy.SkyCoord
The sky coordinate
- frame_tostr
The desired frame of transformation, either “ParticleFrame”, “UTM”, “altaz”, “equatorial or “galactic”
- detector_tostr [default = “antares”]
The detector of the transformed frame, either “orca”, “arca” or “antares”
- km3astro.coord.transform_to_new_frame(table, frame, frame_to, detector='antares', detector_to='antares')[source]¶
Transform a pandas DataFrame of sky coordinate parameters to a new pandas.DataFrame of SkyCoord of the initial and desired frame
- Parameters:
- tablepandas.DataFrame(astropy.SkyCoord)
The sky coordinate
- framestr
The frame of the table of parameters, either “ParticleFrame”, “UTM”, “altaz”, “equatorial or “galactic”
- detectorstr [default = “antares”]
The detector of the sky coordinate parameters, either “orca”, “arca” or “antares”
- frame_tostr
The desired frame of transformation, either “ParticleFrame”, “UTM”, “altaz”, “equatorial or “galactic”
- detector_tostr [default = “antares”]
The detector of the transformed frame, either “orca”, “arca” or “antares”