stilt.footprint.Jacobian.to_xarray#
- Jacobian.to_xarray(dense=False)[source]#
Return the matrix as a DataArray with dims
(receptor, time, cell).timeis the left edge of each time bin andcellthe target cell, as incolumns. For a grid,cellhas the coordinateslonandlat(xandywhen projected), and.unstack("cell")makes them dimensions. The receptors with an empty footprint and those not run yet are the attributesemptyandmissing.- Parameters:
dense (
bool) – Hold the values in a NumPy array. By default they are asparse.COOarray from the optionalsparsepackage (pip install pystilt[sparse]), whose entries not stored are zeros.- Return type:
Examples
>>> H = project.jacobian(july, zones, bins).to_xarray() >>> (H * flux).sum(["time", "cell"]) # ppm at each receptor