spinifex.get_rm =============== .. py:module:: spinifex.get_rm .. autoapi-nested-parse:: Module to calculate rotation measures Attributes ---------- .. autoapisummary:: spinifex.get_rm.DEFAULT_IONO_HEIGHT Classes ------- .. autoapisummary:: spinifex.get_rm.RM Functions --------- .. autoapisummary:: spinifex.get_rm._get_rm spinifex.get_rm._get_rm_from_altaz spinifex.get_rm._get_rm_from_skycoord spinifex.get_rm.get_average_rm spinifex.get_rm.get_rm_from_altaz spinifex.get_rm.get_rm_from_skycoord Module Contents --------------- .. py:class:: RM Bases: :py:obj:`NamedTuple` object with all rotation measures .. py:attribute:: azimuth :type: numpy.typing.NDArray[numpy.floating[Any]] array of azimuths (degrees) .. py:attribute:: b_parallel :type: numpy.typing.NDArray[numpy.floating[Any]] parallel magnetic field (nT) .. py:attribute:: b_parallel_error :type: numpy.typing.NDArray[numpy.floating[Any]] parallel magnetic field uncertainty (nT) .. py:attribute:: electron_density :type: numpy.typing.NDArray[numpy.floating[Any]] electron density (TECU) .. py:attribute:: electron_density_error :type: numpy.typing.NDArray[numpy.floating[Any]] electron density uncertainty (TECU) .. py:attribute:: elevation :type: numpy.typing.NDArray[numpy.floating[Any]] array of elevation (degrees) .. py:attribute:: height :type: numpy.typing.NDArray[numpy.floating[Any]] array of altitudes (km) .. py:attribute:: loc :type: astropy.coordinates.EarthLocation observer location .. py:attribute:: rm :type: numpy.typing.NDArray[numpy.floating[Any]] rotation measures .. py:attribute:: rm_error :type: numpy.typing.NDArray[numpy.floating[Any]] error on rotation measures .. py:attribute:: times :type: astropy.time.Time time axis .. py:function:: _get_rm(ipp: spinifex.geometry.IPP, iono_model: spinifex.ionospheric.ModelDensityFunction[spinifex.ionospheric.models.O], magnetic_model: spinifex.magnetic.MagneticFieldFunction, iono_options: spinifex.ionospheric.models.O | None = None) -> RM Get the rotation measures for a given set of ionospheric piercepoints Parameters ---------- ipp : IPP ionospheric piercepoints iono_model : ModelDensityFunction, optional ionospheric model, by default ionospheric_models.ionex magnetic_model : MagneticFieldFunction, optional geomagnetic model, by default magnetic_models.ppigrf iono_options : OptionType, optional options for the ionospheric model, by default None Returns ------- RM rotation measures object .. py:function:: _get_rm_from_altaz(loc: astropy.coordinates.EarthLocation, altaz: astropy.coordinates.AltAz, iono_model: spinifex.ionospheric.ModelDensityFunction[spinifex.ionospheric.models.O], magnetic_model: spinifex.magnetic.MagneticFieldFunction, height_array: astropy.units.Quantity = DEFAULT_IONO_HEIGHT, iono_options: spinifex.ionospheric.models.O | None = None) -> RM get rotation measures for user defined altaz coordinates Parameters ---------- loc : EarthLocation observer location altaz : AltAz altaz coordinates height_array : u.Quantity, optional altitudes, by default default_height iono_model : ModelDensityFunction, optional ionospheric model, by default ionospheric_models.ionex magnetic_model : MagneticFieldFunction, optional geomagnetic model, by default magnetic_models.ppigrf iono_options: Options keyword arguments for the ionospheric model Returns ------- RM rotation measure object .. py:function:: _get_rm_from_skycoord(loc: astropy.coordinates.EarthLocation, times: astropy.time.Time, source: astropy.coordinates.SkyCoord, iono_model: spinifex.ionospheric.ModelDensityFunction[spinifex.ionospheric.models.O], magnetic_model: spinifex.magnetic.MagneticFieldFunction, height_array: astropy.units.Quantity = DEFAULT_IONO_HEIGHT, iono_options: spinifex.ionospheric.models.O | None = None) -> RM get rotation measures for user defined times and source coordinate Parameters ---------- loc : EarthLocation observer location times : Time times source : SkyCoord coordinates of the source height_array : NDArray, optional altitudes, by default default_height iono_model : ModelDensityFunction, optional ionospheric model, by default ionospheric_models.ionex magnetic_model : MagneticFieldFunction, optional geomagnetic model, by default magnetic_models.ppigrf iono_options : IonoOptions, optional options for the ionospheric model, by default None Returns ------- RM rotation measure object .. py:function:: get_average_rm(rm: RM) -> RM Get the average values from an RM object Parameters ---------- rm : RM Time-varying RM Returns ------- RM Time-averaged RM .. py:function:: get_rm_from_altaz(loc: astropy.coordinates.EarthLocation, altaz: astropy.coordinates.AltAz, iono_model_name: str = 'ionex', magnetic_model_name: str = 'ppigrf', **iono_kwargs: Any) -> RM get rotation measures for user defined altaz coordinates Parameters ---------- loc : EarthLocation observer location altaz : AltAz altaz coordinates iono_model_name : str, optional ionospheric model name, by default "ionex". Must be a supported ionospheric model. magnetic_model_name : str, optional geomagnetic model name, by default "ppigrf". Must be a supported geomagnetic model. iono_kwargs : dict keyword arguments for the ionospheric model Returns ------- RM rotation measure object .. py:function:: get_rm_from_skycoord(loc: astropy.coordinates.EarthLocation, times: astropy.time.Time, source: astropy.coordinates.SkyCoord, iono_model_name: str = 'ionex', magnetic_model_name: str = 'ppigrf', **iono_kwargs: Any) -> RM get rotation measures for user defined times and source coordinate Parameters ---------- loc : EarthLocation observer location times : Time times source : SkyCoord coordinates of the source iono_model_name : str, optional ionospheric model name, by default "ionex". Must be a supported ionospheric model. magnetic_model_name : str, optional geomagnetic model name, by default "ppigrf". Must be a supported geomagnetic model. iono_kwargs : dict keyword arguments for the ionospheric model Returns ------- RM rotation measure object .. py:data:: DEFAULT_IONO_HEIGHT