:py:mod:`km3astro.coord` ======================== .. py:module:: km3astro.coord .. autoapi-nested-parse:: 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. .. !! processed by numpydoc !! Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: km3astro.coord.Event Functions ~~~~~~~~~ .. autoapisummary:: km3astro.coord.neutrino_to_source_direction km3astro.coord.source_to_neutrino_direction km3astro.coord.Sun km3astro.coord.Moon km3astro.coord.local_frame km3astro.coord.local_event km3astro.coord.sun_local km3astro.coord.moon_local km3astro.coord.gc_in_local km3astro.coord.is_args_fine_for_frame km3astro.coord.build_event km3astro.coord.transform_to km3astro.coord.transform_to_new_frame .. py:function:: neutrino_to_source_direction(phi, theta, radian=True) Flip the direction. :Parameters: **phi, theta: neutrino direction** .. **radian: bool [default=True]** receive + return angles in radian? (if false, use degree) .. !! processed by numpydoc !! .. py:function:: source_to_neutrino_direction(azimuth, zenith, radian=True) Flip the direction. :Parameters: **zenith** : float neutrino origin **azimuth: float** neutrino origin **radian: bool [default=True]** receive + return angles in radian? (if false, use degree) .. !! processed by numpydoc !! .. py:function:: Sun(time) Wrapper around astropy's get_sun, accepting numpy/pandas time objects. .. !! processed by numpydoc !! .. py:function:: Moon(time) Wrapper around astropy's get_moon, accepting numpy/pandas time objects. .. !! processed by numpydoc !! .. py:function:: local_frame(time, location) Get the (horizontal) coordinate frame of your detector. .. !! processed by numpydoc !! .. py:function:: local_event(theta, phi, time, location, radian=True, **kwargs) Create astropy events from detector coordinates. .. !! processed by numpydoc !! .. py:function:: sun_local(time, loc) Sun position in local coordinates. .. !! processed by numpydoc !! .. py:function:: moon_local(time, loc) Moon position in local coordinates. .. !! processed by numpydoc !! .. py:function:: gc_in_local(time, loc) Galactic center position in local coordinates. .. !! processed by numpydoc !! .. py:class:: Event(zenith, azimuth, time, location) .. py:method:: from_zenith(zenith, **initargs) :classmethod: .. py:function:: is_args_fine_for_frame(frame, *args) .. py:function:: build_event(Cframe, *args) Build a SkyCoord object of the corresponding frame and parameters :Parameters: **Cframe** : str Frame of the Skycoord event to build, either "ParticleFrame", "UTM", "equatorial" or "galactic" **\*args** : list of the sky coordinate parameters .. :Returns: **SkyCoord** : astropy.SkyCoord Sky coordinate object .. !! processed by numpydoc !! .. py:function:: transform_to(Skycoord, frame_to, detector_to='antares') Transform a Skycoord object to the desired frame :Parameters: **SkyCoord** : astropy.SkyCoord The sky coordinate **frame_to** : str The desired frame of transformation, either "ParticleFrame", "UTM", "altaz", "equatorial or "galactic" **detector_to** : str [default = "antares"] The detector of the transformed frame, either "orca", "arca" or "antares" .. !! processed by numpydoc !! .. py:function:: transform_to_new_frame(table, frame, frame_to, detector='antares', detector_to='antares') Transform a pandas DataFrame of sky coordinate parameters to a new pandas.DataFrame of SkyCoord of the initial and desired frame :Parameters: **table** : pandas.DataFrame(astropy.SkyCoord) The sky coordinate **frame** : str The frame of the table of parameters, either "ParticleFrame", "UTM", "altaz", "equatorial or "galactic" **detector** : str [default = "antares"] The detector of the sky coordinate parameters, either "orca", "arca" or "antares" **frame_to** : str The desired frame of transformation, either "ParticleFrame", "UTM", "altaz", "equatorial or "galactic" **detector_to** : str [default = "antares"] The detector of the transformed frame, either "orca", "arca" or "antares" .. !! processed by numpydoc !!