Skip to content

Commit

Permalink
final edits
Browse files Browse the repository at this point in the history
  • Loading branch information
xspanger3770 committed Apr 21, 2024
1 parent c127aa7 commit 114aba2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions GQHypocenterSearch/src/hypocenter_search.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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]));
}
Expand All @@ -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,
Expand Down

0 comments on commit 114aba2

Please sign in to comment.