stilt.footprint.Jacobian.to_xarray#

Jacobian.to_xarray(dense=False)[source]#

Return the matrix as a DataArray with dims (receptor, time, cell).

time is the left edge of each time bin and cell the target cell, as in columns. For a grid, cell has the coordinates lon and lat (x and y when projected), and .unstack("cell") makes them dimensions. The receptors with an empty footprint and those not run yet are the attributes empty and missing.

Parameters:

dense (bool) – Hold the values in a NumPy array. By default they are a sparse.COO array from the optional sparse package (pip install pystilt[sparse]), whose entries not stored are zeros.

Return type:

DataArray

Examples

>>> H = project.jacobian(july, zones, bins).to_xarray()
>>> (H * flux).sum(["time", "cell"])  # ppm at each receptor