@@ -2991,7 +2991,7 @@ def compute_track_density(
29912991 filter_tracks : bool = True ,
29922992 wind_min : float = None ,
29932993 wind_max : float = None ,
2994- ) -> tuple [np .ndarray , tuple ]:
2994+ ) -> tuple [np .ndarray , np . ndarray , np . ndarray ]:
29952995 """Compute absolute and normalized tropical cyclone track density. Before using this function,
29962996 apply the same temporal resolution to all tracks by calling :py:meth:`equal_timestep` on the
29972997 TCTrack object. Due to the computational cost of the this function, it is not recommended to
@@ -3006,11 +3006,11 @@ def compute_track_density(
30063006 track object containing a list of all tracks
30073007 res: int (optional), default: 5°
30083008 resolution in degrees of the grid bins in which the density will be computed
3009- bounds: tuple, dafault: None
3010- (lat_min,lat_max,lon_min,lon_max) latitude and longitude bounds to compute track density .
3011- genesis: bool, Default = False
3009+ bounds: tuple, (optional) dafault: None
3010+ (lat_min,lat_max,lon_min,lon_max) latitude and longitude bounds.
3011+ genesis: bool, (optional) default = False
30123012 If true the function computes the track density of only the genesis location of tracks
3013- norm: str (optional), default = None
3013+ norm: str (optional), default: None
30143014 If None the function returns the number of samples in each bin. If True, it normalize the
30153015 bin count as specified: if norm = area -> normalize by gird cell area. If norm = sum ->
30163016 normalize by the total sum of each bin.
@@ -3028,13 +3028,17 @@ def compute_track_density(
30283028 hist_count: np.ndarray
30293029 2D matrix containing the the absolute count per gridd cell of track point or the normalized
30303030 number of track points, depending on the norm parameter.
3031+ lat_bins: np.ndarray
3032+ latitude bins in which the point where counted
3033+ lon_bins: np.ndarray
3034+ laongitude bins in which the point where counted
30313035
30323036 Example:
30333037 --------
30343038 >>> tc_tracks = TCTrack.from_ibtracs_netcdf("path_to_file")
30353039 >>> tc_tracks.equal_timestep(time_steph_h = 1)
3036- >>> hist_count, *_ = compute_track_density(res = 1)
3037- >>> plot_track_density(hist_count)
3040+ >>> hist_count, *_ = compute_track_density(tc_track = tc_tracks, res = 1)
3041+ >>> ax = plot_track_density(hist_count)
30383042
30393043 """
30403044
@@ -3110,11 +3114,11 @@ def compute_genesis_density(
31103114 -----------
31113115
31123116 tc_track: TCT track object
3113- track object containing a list of all tracks
3117+ TC track object containing a list of all tracks.
31143118 lat_bins: 1D np.array
3115- array containg the latitude bins
3119+ array containg the latitude bins.
31163120 lon_bins: 1D np.array
3117- array containg the longitude bins
3121+ array containg the longitude bins.
31183122
31193123 Returns:
31203124 --------
0 commit comments