swirlspy.ltg package

Submodules

swirlspy.ltg.map module

swirlspy.ltg.map.gen_ltg_density(ltg, area_def, start_time, end_time, tolerance, coord_label, unit_area=(1000000, 'per $km^2$'))

Computes lightning density in an area.

Parameters
  • ltg (Lightning object) – Lightning object containing data of lightning strike.

  • area_def (pyresample.geometry.AreaDefinition) – AreaDefinition of the desired grid in coordinates of the data in the Lightning object.

  • start_time (pandas.Timestamp) – Start time of lightning observation period.

  • end_time (pandas.Timestamp) – End time of lightning observation period.

  • tolerance (float) – The radius of influence of a lightning strike.

  • coord_label (list of strings) – [‘x’, ‘y’] Coordinate labels.

  • unit_area (tuple of float and str respectively) – The unit area expressed in the units of the projection the name of the unit area. Defaults to (1000000, ‘per $km^2$’), i.e. 1 square kilometer assuming that the projection is expressed in meters. Change according to the unit of the projection system.

Returns

ltg_density – Gridded lightning density.

Return type

xarray.DataArray

swirlspy.ltg.map.gen_ltgv(ltg, area_def, start_time, end_time, sigma, coord_label=['x', 'y'])

Generates lightning potential in an area. Lightning potential is calculated using a multivariate normal distribution.

Parameters
  • ltg (Lightning object) – Lightning object containing data of lightning strike.

  • area_def (pyresample.geometry.AreaDefinition) – Areadefinition of the desired grid in coordinates of the data in the Lightning object.

  • start_time (pandas.Timestamp) – Start time of lightning observation period.

  • end_time (pandas.Timestamp) – End time of lightning observation period.

  • sigma (float) – Standard deviation of the Gaussian Distribution. Assume that distribution is symmetrical.

  • coord_label (list of strings) – Defaults to [‘x’, ‘y’].

Returns

ltgv – Gridded lightning potential.

Return type

xarray.DataArray