spinifex.image_tools ==================== .. py:module:: spinifex.image_tools .. autoapi-nested-parse:: Spinifex tools for correcting image data Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/spinifex/image_tools/fits_tools/index /autoapi/spinifex/image_tools/image_tools/index Classes ------- .. autoapisummary:: spinifex.image_tools.FITSMetaData spinifex.image_tools.IntegratedRM Functions --------- .. autoapisummary:: spinifex.image_tools.get_freq_from_fits spinifex.image_tools.get_integrated_rm spinifex.image_tools.get_integrated_rm_from_fits spinifex.image_tools.get_metadata_from_fits spinifex.image_tools.get_rm_from_fits Package Contents ---------------- .. py:class:: FITSMetaData Bases: :py:obj:`NamedTuple` Metadata from a FITS file .. py:attribute:: duration :type: astropy.time.TimeDelta Duration of observation .. py:attribute:: location :type: astropy.coordinates.EarthLocation Location of observation .. py:attribute:: name :type: str Name of FITS file as str .. py:attribute:: source :type: astropy.coordinates.SkyCoord Target of observation .. py:attribute:: start_time :type: astropy.time.Time Start time of obsrvation .. py:class:: IntegratedRM Bases: :py:obj:`NamedTuple` Time-integrated rotation measure .. py:attribute:: azimuth :type: float Average azimuth (degrees) .. py:attribute:: b_parallel :type: float Average parallel magnetic field .. py:attribute:: electron_density :type: float Average electron content .. py:attribute:: elevation :type: float Average elevation (degrees) .. py:attribute:: height :type: float Average altitude (km) .. py:attribute:: theta :type: numpy.typing.NDArray[numpy.complex128] Complex time-integrated effect of the ionosphere .. py:attribute:: time :type: astropy.time.Time Average time .. py:function:: get_freq_from_fits(fits_path: pathlib.Path) -> astropy.units.Quantity Get frequency array from FITS file Parameters ---------- fits_path : Path Path to FITS file Returns ------- u.Quantity Frequency array Raises ------ FITSHeaderError If no spectral axis is found .. py:function:: get_integrated_rm(time_dep_rm: spinifex.get_rm.RM, freq_arr: astropy.units.Quantity) -> IntegratedRM Computed the integrated RM effect following Van Eck (2021) Parameters ---------- time_dep_rm : RM Time-dependent RM object freq_arr : u.Quantity Frequency array Returns ------- IntegratedRM Integrated rotation measure object .. py:function:: get_integrated_rm_from_fits(fits_path: pathlib.Path, timestep: astropy.units.Quantity = 15 * u.min, iono_model_name: str = 'ionex', magnetic_model_name: str = 'ppigrf', **iono_kwargs: Any) -> spinifex.image_tools.image_tools.IntegratedRM Computed the integrated RM effect following Van Eck (2021) Parameters ---------- fits_path : Path Path to FITS file timestep : u.Quantity, optional Timestep to use for computing time-dependent RM, by default 15*u.min 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 ------- IntegratedRM Integrated rotation measure object .. py:function:: get_metadata_from_fits(fits_path: pathlib.Path) -> FITSMetaData Get metadata from a FITS file header Parameters ---------- fits_path : Path FITS file Returns ------- FitsMetaData FITS image metadata .. py:function:: get_rm_from_fits(fits_path: pathlib.Path, timestep: astropy.units.Quantity = 15 * u.min, iono_model_name: str = 'ionex', magnetic_model_name: str = 'ppigrf', **iono_kwargs: Any) -> spinifex.get_rm.RM Get the ionospheric RM from a FITS file Parameters ---------- fits_path : Path Path to FITS file timestep : u.Quantity, optional Time step to evaluate time-dependant RM, by default 15*u.min 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