plots.sources.single ==================== .. py:module:: plots.sources.single Classes ------- .. autoapisummary:: plots.sources.single.SingleSource Module Contents --------------- .. py:class:: SingleSource(*args, x=None, y=None, z=None, u=None, v=None, crs=None, regrid=True, metadata=None, **kwargs) A basic source class for plotting, providing a structure for defining x, y, z coordinates, optional metadata, and optional coordinate reference system (CRS). :param \*args: Positional arguments representing the data to be plotted. :type \*args: array-like :param x: The x-coordinates of the data. :type x: array-like, optional :param y: The y-coordinates of the data. :type y: array-like, optional :param z: The z-coordinates or values of the data. :type z: array-like, optional :param u: The u-component of the data. :type u: array-like, optional :param v: The v-component of the data. :type v: array-like, optional :param crs: The coordinate reference system of the data. :type crs: object, optional :param metadata: Metadata associated with the source, e.g., units or description. :type metadata: dict, optional :param \*\*kwargs: Additional keyword arguments to be attached as metadata. :type \*\*kwargs: dict .. py:property:: crs Returns the coordinate reference system (CRS) of the data. .. py:property:: data Returns the data, if present. .. py:method:: datetime() Returns the datetime values of the data. .. py:property:: gridspec The gridspec of the data. The gridspec is used to determine the grid type of the data, which is required for regridding more complex grid types like reduced Gaussian grids. .. py:property:: magnitude .. py:method:: metadata(key, default=None) Retrieve a metadata value associated with the source. :param key: The key for the metadata to retrieve. :type key: str :param default: The default value if the metadata key is not present. :type default: any, optional :returns: The value of the metadata or the default if not found. :rtype: any .. py:attribute:: regrid :value: True .. py:method:: to_earthkit() Convert the data to an earthkit.data.core.Base object. .. py:property:: u_values Returns the u values. .. py:property:: units Returns the units of the data, if specified in metadata. .. py:property:: v_values Returns the v values. .. py:property:: x_values Returns the inferred or specified x values. .. py:property:: y_values Returns the inferred or specified y values. .. py:property:: z_values Returns the inferred or specified z values.