Skip to content

Commit

Permalink
a bit more doc string change
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunius committed Jul 24, 2020
1 parent 43cc9f8 commit 0abdb8a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
19 changes: 16 additions & 3 deletions ipart/AR_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,12 @@ def getARData(slab, quslab, qvslab, anoslab, quano, qvano, areas,
(indices defined in the matrix of corresponding mask
in <masks>.)
timestr (str): string of time snap.
param_dict (dict): parameter dict defined in Global preamble.
param_dict (dict): a dict containing parameters controlling the
detection process. Keys of the dict:
'thres_low', 'min_area', 'max_area', 'max_isoq', 'max_isoq_hard',
'min_lat', 'max_lat', 'min_length', 'min_length_hard', 'rdp_thres',
'fill_radius', 'single_dome', 'max_ph_ratio', 'edge_eps'.
See the doc string of findARs() for more.
Returns:
labels (cdms.TransientVariable): (n * m) 2D int map showing all ARs
Expand Down Expand Up @@ -1199,7 +1204,11 @@ def findARAxis(quslab, qvslab, armask_list, costhetas, sinthetas, param_dict,
sinthetas (cdms.TransientVariable): (n * m) 2D slab of grid cell shape:
sin=dy/sqrt(dx^2+dy^2).
param_dict (dict): a dict containing parameters controlling the
detection process. See the doc string of findARs() for more.
detection process. Keys of the dict:
'thres_low', 'min_area', 'max_area', 'max_isoq', 'max_isoq_hard',
'min_lat', 'max_lat', 'min_length', 'min_length_hard', 'rdp_thres',
'fill_radius', 'single_dome', 'max_ph_ratio', 'edge_eps'.
See the doc string of findARs() for more.
Keyword Args:
verbose (bool): print some messages or not.
Expand Down Expand Up @@ -1311,7 +1320,11 @@ def _findARs(anoslab, areas, param_dict):
Args:
anoslab (cdms.TransientVariable): (n * m) 2D anomalous IVT slab, in kg/m/s.
areas (cdms.TransientVariable): (n * m) 2D grid cell area slab, in km^2.
param_dict (dict): parameter dict controlling the detection process.
param_dict (dict): a dict containing parameters controlling the
detection process. Keys of the dict:
'thres_low', 'min_area', 'max_area', 'max_isoq', 'max_isoq_hard',
'min_lat', 'max_lat', 'min_length', 'min_length_hard', 'rdp_thres',
'fill_radius', 'single_dome', 'max_ph_ratio', 'edge_eps'.
See the doc string of findARs() for more.
Returns:
Expand Down
6 changes: 3 additions & 3 deletions ipart/utils/rdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
import numpy as np

def distance(a, b):
'''Eularian distance between 2 points
'''Euclidean distance between 2 points
Args:
a (tuple): (x, y) coordinates of point A.
b (tuple): (x, y) coordinates of point B.
Returns:
result (float): Eularian distance between 2 points
result (float): Euclidean distance between 2 points
'''
return sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)

def point_line_distance(point, start, end):
'''Eularian distance between a point and a line
'''Euclidean distance between a point and a line
Args:
point (tuple): (x, y) coordinates of a point.
Expand Down

0 comments on commit 0abdb8a

Please sign in to comment.