From 114aba2f4b6a263d09884c09711693d613282418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=A0panger?= Date: Sun, 21 Apr 2024 16:35:40 +0200 Subject: [PATCH] final edits --- GQHypocenterSearch/src/hypocenter_search.cu | 4 ++-- .../core/training/EarthquakeAnalysisTraining.java | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/GQHypocenterSearch/src/hypocenter_search.cu b/GQHypocenterSearch/src/hypocenter_search.cu index 2417e195..c072be39 100644 --- a/GQHypocenterSearch/src/hypocenter_search.cu +++ b/GQHypocenterSearch/src/hypocenter_search.cu @@ -214,11 +214,11 @@ __global__ void evaluate_hypocenter(float *results, float origins[TILE]; - int j = (point_index + blockIdx.y * TILE) % station_count; + int j = (point_index) % station_count; // trick with changing station that is being used for origin calculation { - float ang_dist = station_distances[point_index + j * points]; + float ang_dist = station_distances_across[point_index]; float s_pwave = s_stations[j]; for(int tile = 0; tile < TILE; tile++) { diff --git a/GlobalQuakeCore/src/main/java/globalquake/core/training/EarthquakeAnalysisTraining.java b/GlobalQuakeCore/src/main/java/globalquake/core/training/EarthquakeAnalysisTraining.java index a5ff28f8..a135acc7 100644 --- a/GlobalQuakeCore/src/main/java/globalquake/core/training/EarthquakeAnalysisTraining.java +++ b/GlobalQuakeCore/src/main/java/globalquake/core/training/EarthquakeAnalysisTraining.java @@ -26,6 +26,9 @@ public class EarthquakeAnalysisTraining { public static final double INACCURACY = 5000; private static final double MASSIVE_ERR_ODDS = 0.4; + public static final double DIST_STATIONS = 10; + private static final double DIST_HYPOC_ANG = 0; + public static void main(String[] args) throws Exception { TauPTravelTimeCalculator.init(); @@ -126,7 +129,7 @@ public static double runTest(long seed, int stations, boolean cpuOnly) { for (int i = 0; i < stations; i++) { double ang = r.nextDouble() * 360.0; - double dist = r.nextDouble() * DIST; + double dist = r.nextDouble() * DIST_STATIONS; double[] latLon = GeoUtils.moveOnGlobe(0, 0, dist, ang); fakeStations.add(new FakeStation(latLon[0], latLon[1])); } @@ -135,7 +138,7 @@ public static double runTest(long seed, int stations, boolean cpuOnly) { var cluster = new Cluster(); cluster.updateCount = 6543541; - Hypocenter absolutetyCorrect = new Hypocenter(r.nextDouble() * 10, r.nextDouble() * 10, r.nextDouble() * 600.0, 0, 0, 0, null, null); + Hypocenter absolutetyCorrect = new Hypocenter(r.nextDouble() * DIST_HYPOC_ANG, r.nextDouble() * DIST_HYPOC_ANG, r.nextDouble() * 600.0, 0, 0, 0, null, null); for (FakeStation fakeStation : fakeStations) { double distGC = GeoUtils.greatCircleDistance(absolutetyCorrect.lat,