pyIntensityFeatures.utils.coords ================================ .. py:module:: pyIntensityFeatures.utils.coords .. autoapi-nested-parse:: Coordinate handling and conversion functions. .. !! processed by numpydoc !! Attributes ---------- .. autoapisummary:: pyIntensityFeatures.utils.coords.apexpy Functions --------- .. autoapisummary:: pyIntensityFeatures.utils.coords.convert_geo_to_mag pyIntensityFeatures.utils.coords.get_slice_mlat_max_min pyIntensityFeatures.utils.coords.as_datetime Module Contents --------------- .. py:data:: apexpy :value: None .. py:function:: convert_geo_to_mag(ctime, glat, glon, alt, method='ALLOWTRACE') Convert and reshape GUVI location output to magnetic coordinates. :Parameters: **ctime** : dt.datetime Conversion time **glat** : array-like 2D array of geodetic latitudes **glon** : array-like 2D array of geographic longitudes **alt** : float Altitude of the auroral data in km **method** : str Magnetic method to use, expects one of the AACGMV2 codes ('TRACE', 'ALLOWTRACE', 'BADIDEA', 'GEOCENTRIC'), 'apex', or 'qd'. The last two methods correspond to apex and quasi-dipole coordiantes, and only work if apexpy is available. (default='ALLOWTRACE') :Returns: **mlat** : array-like 2D array of magnetic latitudes **mlon** : array-like 2D array of magnetic longitudes **mlt** : array-like 2D array of magnetic local times :Raises: ValueError If 'apex' or 'qd' is requested, but apexpy is not available. .. !! processed by numpydoc !! .. py:function:: get_slice_mlat_max_min(num_samples, mlat_bins, mlt_bins, mlat_inc=1.0) Get latitude range of the auroral intensity slice. :Parameters: **num_samples** : array-like 2D array with number of samples in each mlat/mlt bin **mlat_bins** : np.array Magnetic latitude of output bin centres **mlt_bins** : np.array Magnetic local time of output bin centres **mlat_inc** : float Magnetic latitude increment for output (default=1.0) :Returns: **mlat_min** : float Minimum magnetic latitude along MLT slice that also contains the magnetic latitude maximum in degrees **mlat_max** : float Maximum magnetic latitude of slice in degrees .. !! processed by numpydoc !! .. py:function:: as_datetime(time_val) Ensure a time value is cast as datetime without timezone information. :Parameters: **time_val** : object Date and time object that may be np.datetime64, pds.datetime, dt.datetime, or dt.date :Returns: **out_time** : dt.datetime desired casting of the datetime object .. !! processed by numpydoc !!