huracanpy.calc.density#
- huracanpy.calc.density(lon, lat, *, method='histogram', bin_size=5, n_seasons=1)[source]#
Function to compute the track density, based on a simple 2D histogram.
- Parameters:
lon (array_like) – longitude series
lat (array_like) – latitude series
method (str, default="histogram") – The method used to calculate the density, currently only “histogram”, which gives a 2d histogram using np.histogram2d
bin_size (int or float, default=5) – When using histogram, defines the size (in degrees) of the bins.
n_seasons (int, optional) – Number of season (will be used to divide the final results, so that is represents points/year). The default is 1.
- Raises:
NotImplementedError – If method given is not ‘histogram’
- Returns:
Track density as a 2D map.
- Return type: