Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xumi1993 committed Mar 15, 2024
1 parent 12f2971 commit d240ad0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pytomoatt/src_rec.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,10 @@ def update_num_rec(self):

def update(self):
"""
Update src_points and rec_points with procedures:
Update ``SrcRec.src_points`` and ``SrcRec.rec_points`` with procedures:
1. remove rec_points by new src_points
2. remove src_points by new rec_points
1. remove receivers by new sources
2. remove sources by new receivers
3. update num_rec
4. reset index
5. update unique sources and receivers
Expand Down Expand Up @@ -518,10 +518,10 @@ def select_phase(self, phase_list):
"rec_points before selecting: {}".format(self.rec_points.shape)
)
self.rec_points = self.rec_points[self.rec_points["phase"].isin(phase_list)]
self.update()
self.log.SrcReclog.info(
"rec_points after selecting: {}".format(self.rec_points.shape)
)
self.update()

def select_by_datetime(self, time_range):
"""
Expand Down Expand Up @@ -774,9 +774,11 @@ def _calc_weights(self, lat, lon, scale):
def geo_weighting(self, scale=0.5, rec_weight=False):
"""Calculating geographical weights for sources
:param scale: Scale of reference distance parameter See equation 22 in Ruan et al., (2019),
The reference distance is given by ``scale``* dis_average, defaults to 0.5
:param scale: Scale of reference distance parameter.
See equation 22 in Ruan et al., (2019). The reference distance is given by ``scale* dis_average``, defaults to 0.5
:type scale: float, optional
:param rec_weight: Whether to calculate weights for receivers, defaults to False
:type rec_weight: bool, optional
"""

self.src_points["weight"] = self._calc_weights(
Expand Down

0 comments on commit d240ad0

Please sign in to comment.