Skip to content

Commit

Permalink
Resolved conflict resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhirjain committed Nov 24, 2017
2 parents 265ce62 + 97eff79 commit b928db3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 45 deletions.
6 changes: 4 additions & 2 deletions phasepapy/associator/assoc1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ def __data_dump_asscan(self):
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

def __accumulate_rms_sort(self, radius, lon, lat,st_declare):

log.debug('Using radius {}'.format(radius))
cb = self.comb(radius)
log.debug('Using CB: {}'.format(cb))

rms_sort = []
for k in range(len(cb)):
radius_cb = cb[k]
Expand Down Expand Up @@ -258,7 +262,6 @@ def associate_candidates(self):
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# remove the candidates with the modified picks has
# been associated
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

picks_associated_id = list(set(
self.assoc_db.query(PickModified.id).filter(
Expand All @@ -273,7 +276,6 @@ def associate_candidates(self):
if index_candis:
for j in sorted(set(index_candis), reverse=True):
del candis[j]
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# remove the candidates with the modified picks has
# been associated
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def run_tests(self):
NUMPY_VERSION,
'scipy >= 0.15.1',
'matplotlib >= 2.0.0', # need to install inside virtualenv for basemap
'obspy >= 1.0.3',
'obspy >= 1.1.0',
'pillow >= 4.1.1',
'basemap == 1.1.0',
'mpi4py == 2.0.0',
Expand Down
42 changes: 0 additions & 42 deletions tests/test_1dassociator.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,47 +128,6 @@ def test_1dassociater(random_filename):
# print ("Lon = {}".format(lon))
# print ("Lat = {}".format(lat))

# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Function Testing for fmin calculating new loaction
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

# radius_cb = (('SIO', -137.26, 68.992, 83.5, 0.7514, 0),
# ('U32A', -137.26, 68.992, 203.0, 1.8268, 1),
# ('W35A', -137.26, 68.992, 42.5, 0.3825, 2),
# ('OKCFA', -137.26, 68.992, 33.0, 0.297, 3),
# ('X34A', -137.26, 68.992, 122.0, 1.0979, 4),
# ('FNO', -137.26, 68.992, 36.5, 0.3285, 5))
# lon = -137.26; lat = 68.992
#
# location = fmin(locating, [lon, lat], radius_cb,disp=0)
#
# print ('location = {}',location)
#
# assert abs(location[0]) > 0
# assert abs(location[1]) > 0


# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Function for Testing outer cutoff
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# matches = (('SIO', -137.26, 68.992, 83.5, 0.7514, 0),
# ('U32A', -137.26, 68.992, 203.0, 1.8268, 1),
# ('W35A', -137.26, 68.992, 42.5, 0.3825, 2),
# ('OKCFA', -137.26, 68.992, 33.0, 0.297, 3),
# ('X34A', -137.26, 68.992, 122.0, 1.0979, 4),
# ('FNO', -137.26, 68.992, 36.5, 0.3285, 5))
# location = [-137.26, 68.992]
# cutoff_outer = 30

# matches, mismatches = outlier_cutoff(matches, location, cutoff_outer)

# print ("")
# print ("matches = {}".format(matches))
# print ("mismatches = {}".format(mismatches))
# assert len(matches) > 0

# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

# Add singles stations to events
assocOK.single_phase()
Expand Down Expand Up @@ -280,4 +239,3 @@ def test_datetime_statistics(cluster_time):
print ("pickave = {}".format(pickave))
print ("pickstd = {}".format(pickstd))
assert pickstd >= 0

0 comments on commit b928db3

Please sign in to comment.