spinifex.vis_tools.ms_tools
Attributes
Classes
Metadata from a Measurement Set |
Functions
|
Get ionospheric values for a measurement set |
|
|
|
|
|
Get first location from N locations |
|
Get the columns from a MeasurementSet |
|
Get rotation measures for a measurement set |
|
open measurement set and get metadata from it |
|
Get rotation measures for a measurement set |
Module Contents
- class spinifex.vis_tools.ms_tools.MsMetaData[source]
Bases:
NamedTupleMetadata from a Measurement Set
- spinifex.vis_tools.ms_tools._get_iono_from_ms(ms_path: pathlib.Path, iono_model: spinifex.ionospheric.ModelDensityFunction[spinifex.ionospheric.models.O], iono_type: Literal['dtec', 'rm'], timestep: astropy.units.Quantity | None = None, use_stations: list[int] | list[str] | Literal['all', 'average'] = 'average', height_array: numpy.typing.NDArray[numpy.float64] = DEFAULT_IONO_HEIGHT, iono_options: spinifex.ionospheric.models.O | None = None, magnetic_model: spinifex.magnetic.MagneticFieldFunction = magnetic_models.ppigrf) dict[str, spinifex.get_rm.RM] | dict[str, numpy.typing.NDArray][source]
Get ionospheric values for a measurement set
Parameters
- ms_pathPath
measurement set
- iono_typeLiteral[“dtec”, “rm”]
type of ionospheric value to calculate
- timestepu.Quantity | None, optional
only calculate rotation measure every timestep, by default None
- use_stationslist[int | str] | None, optional
list of stations (index or name) to use, if None use first of the measurement set, by default None
- height_arrayNDArray[np.float64], optional
array of ionospheric altitudes, by default DEFAULT_IONO_HEIGHT
- iono_modelModelDensityFunction, optional
ionospheric model, by default ionospheric_models.ionex
- magnetic_modelMagneticFieldFunction, optional
geomagnetic model, by default magnetic_models.ppigrf
- iono_optionsOptionType | None, optional
arguments for the ionospheric model, by default None
Returns
- dict[str, RM] | dict[str, NDArray]
dictionary with ionospheric values
- spinifex.vis_tools.ms_tools.get_average_location(location: astropy.coordinates.EarthLocation) astropy.coordinates.EarthLocation[source]
Get first location from N locations
Parameters
- locationEarthLocation
N locations
Returns
- EarthLocation
first location
- spinifex.vis_tools.ms_tools.get_columns_from_ms(ms_path: pathlib.Path) list[str][source]
Get the columns from a MeasurementSet
- spinifex.vis_tools.ms_tools.get_dtec_from_ms(ms_path: pathlib.Path, timestep: astropy.units.Quantity | None = None, use_stations: list[int] | list[str] | Literal['all', 'average'] = 'average', iono_model_name: str | None = None, **iono_kwargs: Any) dict[str, numpy.typing.NDArray][source]
Get rotation measures for a measurement set
Parameters
- ms_pathPath
measurement set
- timestepu.Quantity | None, optional
only calculate rotation measure every timestep, by default None
- use_stationslist[int | str] | None, optional
list of stations (index or name) to use, if None use first of the measurement set, by default None
- iono_model_namestr, optional
ionospheric model name, by default “ionex”. Must be a supported ionospheric model.
- iono_kwargsdict, optional
arguments for the ionospheric model, by default None
Returns
- dict[str, NDArray]
dictionary with electron_density_profiles per station
- spinifex.vis_tools.ms_tools.get_metadata_from_ms(ms_path: pathlib.Path) MsMetaData[source]
open measurement set and get metadata from it
Parameters
- ms_pathPath
measurement set
Returns
- MsMetaData
object with metadata
- spinifex.vis_tools.ms_tools.get_rm_from_ms(ms_path: pathlib.Path, timestep: astropy.units.Quantity | None = None, use_stations: list[int] | list[str] | Literal['all', 'average'] = 'average', iono_model_name: str | None = None, magnetic_model_name: str = 'ppigrf', **iono_kwargs: Any) dict[str, spinifex.get_rm.RM][source]
Get rotation measures for a measurement set
Parameters
- ms_pathPath
measurement set
- timestepu.Quantity | None, optional
only calculate rotation measure every timestep, by default None
- use_stationslist[int | str] | None, optional
list of stations (index or name) to use, if None use first of the measurement set, by default None
- 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, optional
arguments for the ionospheric model, by default None
Returns
- dict[str, RM]
dictionary with RM object per station