spinifex.get_rm

Module to calculate rotation measures

Attributes

Classes

RM

object with all rotation measures

Functions

_get_rm(→ RM)

Get the rotation measures for a given set of ionospheric piercepoints

_get_rm_from_altaz(→ RM)

get rotation measures for user defined altaz coordinates

_get_rm_from_skycoord(→ RM)

get rotation measures for user defined times and source coordinate

get_average_rm(→ RM)

Get the average values from an RM object

get_rm_from_altaz(→ RM)

get rotation measures for user defined altaz coordinates

get_rm_from_skycoord(→ RM)

get rotation measures for user defined times and source coordinate

Module Contents

class spinifex.get_rm.RM[source]

Bases: NamedTuple

object with all rotation measures

azimuth: numpy.typing.NDArray[numpy.floating[Any]][source]

array of azimuths (degrees)

b_parallel: numpy.typing.NDArray[numpy.floating[Any]][source]

parallel magnetic field (nT)

b_parallel_error: numpy.typing.NDArray[numpy.floating[Any]][source]

parallel magnetic field uncertainty (nT)

electron_density: numpy.typing.NDArray[numpy.floating[Any]][source]

electron density (TECU)

electron_density_error: numpy.typing.NDArray[numpy.floating[Any]][source]

electron density uncertainty (TECU)

elevation: numpy.typing.NDArray[numpy.floating[Any]][source]

array of elevation (degrees)

height: numpy.typing.NDArray[numpy.floating[Any]][source]

array of altitudes (km)

loc: astropy.coordinates.EarthLocation[source]

observer location

rm: numpy.typing.NDArray[numpy.floating[Any]][source]

rotation measures

rm_error: numpy.typing.NDArray[numpy.floating[Any]][source]

error on rotation measures

times: astropy.time.Time[source]

time axis

spinifex.get_rm._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[source]

Get the rotation measures for a given set of ionospheric piercepoints

Parameters

ippIPP

ionospheric piercepoints

iono_modelModelDensityFunction, optional

ionospheric model, by default ionospheric_models.ionex

magnetic_modelMagneticFieldFunction, optional

geomagnetic model, by default magnetic_models.ppigrf

iono_optionsOptionType, optional

options for the ionospheric model, by default None

Returns

RM

rotation measures object

spinifex.get_rm._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[source]

get rotation measures for user defined altaz coordinates

Parameters

locEarthLocation

observer location

altazAltAz

altaz coordinates

height_arrayu.Quantity, optional

altitudes, by default default_height

iono_modelModelDensityFunction, optional

ionospheric model, by default ionospheric_models.ionex

magnetic_modelMagneticFieldFunction, optional

geomagnetic model, by default magnetic_models.ppigrf

iono_options: Options

keyword arguments for the ionospheric model

Returns

RM

rotation measure object

spinifex.get_rm._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[source]

get rotation measures for user defined times and source coordinate

Parameters

locEarthLocation

observer location

timesTime

times

sourceSkyCoord

coordinates of the source

height_arrayNDArray, optional

altitudes, by default default_height

iono_modelModelDensityFunction, optional

ionospheric model, by default ionospheric_models.ionex

magnetic_modelMagneticFieldFunction, optional

geomagnetic model, by default magnetic_models.ppigrf

iono_optionsIonoOptions, optional

options for the ionospheric model, by default None

Returns

RM

rotation measure object

spinifex.get_rm.get_average_rm(rm: RM) RM[source]

Get the average values from an RM object

Parameters

rmRM

Time-varying RM

Returns

RM

Time-averaged RM

spinifex.get_rm.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[source]

get rotation measures for user defined altaz coordinates

Parameters

locEarthLocation

observer location

altazAltAz

altaz coordinates

iono_model_namestr, optional

ionospheric model name, by default “ionex”. Must be a supported ionospheric model.

magnetic_model_namestr, optional

geomagnetic model name, by default “ppigrf”. Must be a supported geomagnetic model.

iono_kwargsdict

keyword arguments for the ionospheric model

Returns

RM

rotation measure object

spinifex.get_rm.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[source]

get rotation measures for user defined times and source coordinate

Parameters

locEarthLocation

observer location

timesTime

times

sourceSkyCoord

coordinates of the source

iono_model_namestr, optional

ionospheric model name, by default “ionex”. Must be a supported ionospheric model.

magnetic_model_namestr, optional

geomagnetic model name, by default “ppigrf”. Must be a supported geomagnetic model.

iono_kwargsdict

keyword arguments for the ionospheric model

Returns

RM

rotation measure object

spinifex.get_rm.DEFAULT_IONO_HEIGHT[source]