+
+
def set_config(region="ridgecrest"):
+
+ config = {
+ "min_picks": 8,
+ "min_picks_ratio": 0.2,
+ "max_residual_time": 1.0,
+ "max_residual_amplitude": 1.0,
+ "min_score": 0.6,
+ "min_s_picks": 2,
+ "min_p_picks": 2,
+ "use_amplitude": False,
+ }
+
+ # ## Domain
+ if region.lower() == "ridgecrest":
+ config.update(
+ {
+ "region": "ridgecrest",
+ "minlongitude": -118.004,
+ "maxlongitude": -117.004,
+ "minlatitude": 35.205,
+ "maxlatitude": 36.205,
+ "mindepth_km": 0.0,
+ "maxdepth_km": 30.0,
+ }
+ )
+
+ lon0 = (config["minlongitude"] + config["maxlongitude"]) / 2
+ lat0 = (config["minlatitude"] + config["maxlatitude"]) / 2
+ proj = Proj(f"+proj=sterea +lon_0={lon0} +lat_0={lat0} +units=km")
+ xmin, ymin = proj(config["minlongitude"], config["minlatitude"])
+ xmax, ymax = proj(config["maxlongitude"], config["maxlatitude"])
+ zmin, zmax = config["mindepth_km"], config["maxdepth_km"]
+ xlim_km = (xmin, xmax)
+ ylim_km = (ymin, ymax)
+ zlim_km = (zmin, zmax)
+
+ config.update(
+ {
+ "xlim_km": xlim_km,
+ "ylim_km": ylim_km,
+ "zlim_km": zlim_km,
+ "proj": proj,
+ }
+ )
+
+ config.update(
+ {
+ "min_picks_per_eq": 5,
+ "min_p_picks_per_eq": 0,
+ "min_s_picks_per_eq": 0,
+ "max_sigma11": 3.0,
+ "max_sigma22": 1.0,
+ "max_sigma12": 1.0,
+ }
+ )
+
+ config["use_dbscan"] = False
+ config["use_amplitude"] = True
+ config["oversample_factor"] = 8.0
+ config["dims"] = ["x(km)", "y(km)", "z(km)"]
+ config["method"] = "BGMM"
+ config["ncpu"] = 1
+ vel = {"p": 6.0, "s": 6.0 / 1.75}
+ config["vel"] = vel
+
+ config["bfgs_bounds"] = (
+ (xlim_km[0] - 1, xlim_km[1] + 1), # x
+ (ylim_km[0] - 1, ylim_km[1] + 1), # y
+ (0, zlim_km[1] + 1), # z
+ (None, None), # t
+ )
+
+ config["event_index"] = 0
+
+ return config
+
+
def set_config(region="ridgecrest"):
+
+ config = {
+ "min_picks": 8,
+ "min_picks_ratio": 0.2,
+ "max_residual_time": 1.0,
+ "max_residual_amplitude": 1.0,
+ "min_score": 0.6,
+ "min_s_picks": 2,
+ "min_p_picks": 2,
+ "use_amplitude": False,
+ }
+
+ # ## Domain
+ if region.lower() == "ridgecrest":
+ config.update(
+ {
+ "region": "ridgecrest",
+ "minlongitude": -118.004,
+ "maxlongitude": -117.004,
+ "minlatitude": 35.205,
+ "maxlatitude": 36.205,
+ "mindepth_km": 0.0,
+ "maxdepth_km": 30.0,
+ }
+ )
+
+ lon0 = (config["minlongitude"] + config["maxlongitude"]) / 2
+ lat0 = (config["minlatitude"] + config["maxlatitude"]) / 2
+ proj = Proj(f"+proj=sterea +lon_0={lon0} +lat_0={lat0} +units=km")
+ xmin, ymin = proj(config["minlongitude"], config["minlatitude"])
+ xmax, ymax = proj(config["maxlongitude"], config["maxlatitude"])
+ zmin, zmax = config["mindepth_km"], config["maxdepth_km"]
+ xlim_km = (xmin, xmax)
+ ylim_km = (ymin, ymax)
+ zlim_km = (zmin, zmax)
+
+ config.update(
+ {
+ "xlim_km": xlim_km,
+ "ylim_km": ylim_km,
+ "zlim_km": zlim_km,
+ "proj": proj,
+ }
+ )
+
+ config.update(
+ {
+ "min_picks_per_eq": 5,
+ "min_p_picks_per_eq": 0,
+ "min_s_picks_per_eq": 0,
+ "max_sigma11": 3.0,
+ "max_sigma22": 1.0,
+ "max_sigma12": 1.0,
+ }
+ )
+
+ config["use_dbscan"] = False
+ config["use_amplitude"] = True
+ config["oversample_factor"] = 8.0
+ config["dims"] = ["x(km)", "y(km)", "z(km)"]
+ config["method"] = "BGMM"
+ config["ncpu"] = 1
+ vel = {"p": 6.0, "s": 6.0 / 1.75}
+ config["vel"] = vel
+
+ config["bfgs_bounds"] = (
+ (xlim_km[0] - 1, xlim_km[1] + 1), # x
+ (ylim_km[0] - 1, ylim_km[1] + 1), # y
+ (0, zlim_km[1] + 1), # z
+ (None, None), # t
+ )
+
+ config["event_index"] = 0
+
+ return config
+