spinifex.image_tools.fits_tools =============================== .. py:module:: spinifex.image_tools.fits_tools .. autoapi-nested-parse:: Predict / correct ionospheric RM in FITS images Classes ------- .. autoapisummary:: spinifex.image_tools.fits_tools.FITSMetaData Functions --------- .. autoapisummary:: spinifex.image_tools.fits_tools.correct_fits_images spinifex.image_tools.fits_tools.get_freq_from_fits spinifex.image_tools.fits_tools.get_integrated_rm_from_fits spinifex.image_tools.fits_tools.get_metadata_from_fits spinifex.image_tools.fits_tools.get_rm_from_fits Module 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:function:: correct_fits_images(stokes_q_path: pathlib.Path, stokes_u_path: pathlib.Path, integrated_rm: spinifex.image_tools.image_tools.IntegratedRM, ext: int = 0, suffix: str = 'fr_corr') -> None .. 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_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