Skip to content

Commit

Permalink
taup time amplitude only with flag
Browse files Browse the repository at this point in the history
  • Loading branch information
crotwell committed Mar 15, 2024
1 parent b94dafc commit c57e286
Show file tree
Hide file tree
Showing 11 changed files with 289 additions and 279 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

Model: prem
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist Amp
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name Factor
--------------------------------------------------------------------------------------------
57.40 200.0 P 566.77 6.969 31.18 21.31 57.40 = P -8.3e-10
57.40 200.0 S 1028.61 13.018 32.34 22.00 57.40 = S 3.4e-09
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name
----------------------------------------------------------------------------------
57.40 200.0 P 566.77 6.969 31.18 21.31 57.40 = P
57.40 200.0 S 1028.61 13.018 32.34 22.00 57.40 = S

26 changes: 18 additions & 8 deletions src/main/java/edu/sc/seis/TauP/TauP_Time.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public class TauP_Time extends TauP_AbstractTimeTool {

protected boolean onlyFirst = false;

protected boolean withAmplitude = false;

protected String relativePhaseName = "";

public TauP_Time() {
Expand Down Expand Up @@ -200,6 +202,8 @@ protected String[] parseCmdLineArgs(String[] origArgs) throws IOException, TauPE
onlyPrintRayP = false;
} else if(dashEquals("first", args[i])) {
onlyFirst = true;
} else if(dashEquals("amp", args[i])) {
withAmplitude = true;
} else if(i < args.length - 1) {
if(dashEquals("deg", args[i])) {
degreesList = parseDegreeList(args[i+1]);
Expand Down Expand Up @@ -516,9 +520,13 @@ public void printResultText(PrintWriter out) throws IOException {
}
out.println(modelLine);
String lineOne = "Distance Depth " + String.format(phaseFormat, "Phase")
+ " Travel Ray Param Takeoff Incident Purist "+String.format(phasePuristFormat, "Purist")+" Amp ";
+ " Travel Ray Param Takeoff Incident Purist "+String.format(phasePuristFormat, "Purist");
String lineTwo = " (deg) (km) " + String.format(phaseFormat, "Name ")
+ " Time (s) p (s/deg) (deg) (deg) Distance "+String.format(phasePuristFormat, "Name") +" Factor";
+ " Time (s) p (s/deg) (deg) (deg) Distance "+String.format(phasePuristFormat, "Name");
if (withAmplitude) {
lineOne += " Amp ";
lineTwo += " Factor";
}
if (relativePhaseName != "") {
lineOne += " Relative to";
for (int s=0; s<(11-relativePhaseName.length())/2;s++) {
Expand Down Expand Up @@ -550,12 +558,14 @@ public void printResultText(PrintWriter out) throws IOException {
out.print(" * ");
}
out.print(String.format(phasePuristFormat, currArrival.getPuristName()));
try {
double ampFactorPSV = currArrival.getAmplitudeFactorPSV();
double ampFactorSH = currArrival.getAmplitudeFactorSH();
out.print(" " + Outputs.formatAmpFactor(ampFactorPSV)+","+Outputs.formatAmpFactor(ampFactorSH));
} catch (SlownessModelException | TauModelException | VelocityModelException e) {
throw new RuntimeException("SHould not happen", e);
if (withAmplitude) {
try {
double ampFactorPSV = currArrival.getAmplitudeFactorPSV();
double ampFactorSH = currArrival.getAmplitudeFactorSH();
out.print(" " + Outputs.formatAmpFactor(ampFactorPSV) + "," + Outputs.formatAmpFactor(ampFactorSH));
} catch (SlownessModelException | TauModelException | VelocityModelException e) {
throw new RuntimeException("SHould not happen", e);
}
}

if (relativePhaseName != "") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Model: iasp91
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist Amp
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name Factor
--------------------------------------------------------------------------------------------
35.00 10.0 P 412.43 8.613 26.74 26.70 35.00 = P 2.0e-09
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name
----------------------------------------------------------------------------------
35.00 10.0 P 412.43 8.613 26.74 26.70 35.00 = P

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Model: ak135
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist Amp
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name Factor
--------------------------------------------------------------------------------------------
35.00 10.0 P 412.51 8.625 26.78 26.74 35.00 = P 2.2e-09
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name
----------------------------------------------------------------------------------
35.00 10.0 P 412.51 8.625 26.78 26.74 35.00 = P

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

Model: prem
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist Amp
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name Factor
--------------------------------------------------------------------------------------------
35.00 10.0 P 411.69 8.604 26.71 26.67 35.00 = P 2.2e-09
35.00 10.0 P 479.97 13.490 44.81 44.72 35.00 = P 3.0e-10
35.00 10.0 P 480.12 13.432 44.57 44.48 35.00 = P 4.8e-12
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name
----------------------------------------------------------------------------------
35.00 10.0 P 411.69 8.604 26.71 26.67 35.00 = P
35.00 10.0 P 479.97 13.490 44.81 44.72 35.00 = P
35.00 10.0 P 480.12 13.432 44.57 44.48 35.00 = P

Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@

Model: ak135
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist Amp Relative to
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name Factor P
---------------------------------------------------------------------------------------------------------------------
145.00 10.0 Pdiff 1025.40 4.446 13.43 13.41 145.00 = Pdiff 0.0e+00 no arrival
145.00 10.0 pPdiff 1028.75 4.446 166.57 13.41 145.00 = pPdiff 0.0e+00 no arrival
145.00 10.0 sPdiff 1029.94 4.446 172.04 13.41 145.00 = sPdiff 0.0e+00 no arrival
145.00 10.0 PKP 1176.73 3.381 10.17 10.16 145.00 = PKP -1.6e-08 no arrival
145.00 10.0 PKP 1176.74 3.530 10.63 10.61 145.00 = PKP -8.5e-09 no arrival
145.00 10.0 PKIKP 1177.43 1.726 5.17 5.16 145.00 = PKIKP -5.1e-10 no arrival
145.00 10.0 pPKP 1180.12 3.386 169.81 10.17 145.00 = pPKP -1.1e-08 no arrival
145.00 10.0 pPKP 1180.13 3.510 169.43 10.55 145.00 = pPKP 1.9e-09 no arrival
145.00 10.0 pPKIKP 1180.86 1.726 174.83 5.17 145.00 = pPKIKP 5.0e-10 no arrival
145.00 10.0 PKiKP 1181.24 2.056 6.17 6.16 145.00 = PKiKP -4.9e-12 no arrival
145.00 10.0 sPKP 1181.30 3.386 173.94 10.17 145.00 = sPKP -6.4e-09 no arrival
145.00 10.0 sPKP 1181.30 3.514 173.71 10.56 145.00 = sPKP -1.1e-09 no arrival
145.00 10.0 sPKIKP 1182.03 1.726 176.92 5.17 145.00 = sPKIKP 3.6e-11 no arrival
145.00 10.0 pPKiKP 1184.67 2.056 173.83 6.16 145.00 = pPKiKP 3.6e-11 no arrival
145.00 10.0 sPKiKP 1185.84 2.056 176.33 6.16 145.00 = sPKiKP 1.5e-12 no arrival
145.00 10.0 PP 1375.39 5.961 18.15 18.12 145.00 = PP 6.4e-10 no arrival
145.00 10.0 SKIKP 1391.76 1.612 2.88 4.82 145.00 = SKIKP 2.6e-11 no arrival
145.00 10.0 PKIKS 1392.93 1.612 4.83 2.87 145.00 = PKIKS 3.6e-10 no arrival
145.00 10.0 SKP 1396.89 2.310 4.13 6.92 145.00 = SKP -2.6e-10 no arrival
145.00 10.0 SKiKP 1397.48 2.063 3.69 6.18 145.00 = SKiKP -1.0e-12 no arrival
145.00 10.0 PKS 1398.06 2.310 6.93 4.12 145.00 = PKS -6.5e-10 no arrival
145.00 10.0 SKIKS 1606.74 1.479 2.64 2.64 145.00 = SKIKS -2.2e-11 no arrival
145.00 10.0 pSKIKS 1611.35 1.479 175.57 2.64 145.00 = pSKIKS 5.0e-12 no arrival
145.00 10.0 sSKIKS 1612.51 1.479 177.36 2.64 145.00 = sSKIKS -4.5e-11 no arrival
145.00 10.0 PKIKKIKP 1723.30 1.924 5.77 5.76 215.00 = PKIKKIKP 2.3e-14 no arrival
145.00 10.0 SKKS 1788.04 5.686 10.21 10.19 145.00 = SKKS -1.8e-10 no arrival
145.00 10.0 SKKP 1875.58 4.185 7.49 12.61 215.00 = SKKP -1.8e-11 no arrival
145.00 10.0 SKKP 1875.73 4.399 7.88 13.26 215.00 = SKKP 5.6e-11 no arrival
145.00 10.0 PKKS 1876.76 4.184 12.63 7.48 215.00 = PKKS 1.8e-12 no arrival
145.00 10.0 PKKS 1876.91 4.399 13.29 7.87 215.00 = PKKS -2.5e-11 no arrival
145.00 10.0 Sdiff 1895.37 8.341 15.07 15.04 145.00 = Sdiff 0.0e+00 no arrival
145.00 10.0 pSdiff 1899.72 8.341 154.17 15.04 145.00 = pSdiff 0.0e+00 no arrival
145.00 10.0 sSdiff 1900.96 8.341 164.93 15.04 145.00 = sSdiff 0.0e+00 no arrival
145.00 10.0 SKIKKIKP 1938.81 1.922 3.43 5.75 215.00 = SKIKKIKP 7.7e-15 no arrival
145.00 10.0 PKIKKIKS 1939.98 1.922 5.76 3.43 215.00 = PKIKKIKS -4.7e-14 no arrival
145.00 10.0 SKKS 2110.19 3.595 6.43 6.42 215.00 = SKKS 2.5e-12 no arrival
145.00 10.0 SKIKKIKS 2155.48 1.918 3.43 3.42 215.00 = SKIKKIKS -9.5e-15 no arrival
145.00 10.0 SS 2504.95 11.438 20.88 20.85 145.00 = SS 1.4e-09 no arrival
145.00 10.0 SKSSKS 2586.47 7.530 13.57 13.55 145.00 = SKSSKS 8.3e-12 no arrival
145.00 10.0 SKSSKS 3000.49 4.340 7.77 7.76 215.00 = SKSSKS 8.3e-11 no arrival
145.00 10.0 SKIKSSKIKS 3080.75 1.924 3.44 3.43 215.00 = SKIKSSKIKS -2.4e-15 no arrival
Distance Depth Phase Travel Ray Param Takeoff Incident Purist Purist Relative to
(deg) (km) Name Time (s) p (s/deg) (deg) (deg) Distance Name P
-------------------------------------------------------------------------------------------------------------
145.00 10.0 Pdiff 1025.40 4.446 13.43 13.41 145.00 = Pdiff no arrival
145.00 10.0 pPdiff 1028.75 4.446 166.57 13.41 145.00 = pPdiff no arrival
145.00 10.0 sPdiff 1029.94 4.446 172.04 13.41 145.00 = sPdiff no arrival
145.00 10.0 PKP 1176.73 3.381 10.17 10.16 145.00 = PKP no arrival
145.00 10.0 PKP 1176.74 3.530 10.63 10.61 145.00 = PKP no arrival
145.00 10.0 PKIKP 1177.43 1.726 5.17 5.16 145.00 = PKIKP no arrival
145.00 10.0 pPKP 1180.12 3.386 169.81 10.17 145.00 = pPKP no arrival
145.00 10.0 pPKP 1180.13 3.510 169.43 10.55 145.00 = pPKP no arrival
145.00 10.0 pPKIKP 1180.86 1.726 174.83 5.17 145.00 = pPKIKP no arrival
145.00 10.0 PKiKP 1181.24 2.056 6.17 6.16 145.00 = PKiKP no arrival
145.00 10.0 sPKP 1181.30 3.386 173.94 10.17 145.00 = sPKP no arrival
145.00 10.0 sPKP 1181.30 3.514 173.71 10.56 145.00 = sPKP no arrival
145.00 10.0 sPKIKP 1182.03 1.726 176.92 5.17 145.00 = sPKIKP no arrival
145.00 10.0 pPKiKP 1184.67 2.056 173.83 6.16 145.00 = pPKiKP no arrival
145.00 10.0 sPKiKP 1185.84 2.056 176.33 6.16 145.00 = sPKiKP no arrival
145.00 10.0 PP 1375.39 5.961 18.15 18.12 145.00 = PP no arrival
145.00 10.0 SKIKP 1391.76 1.612 2.88 4.82 145.00 = SKIKP no arrival
145.00 10.0 PKIKS 1392.93 1.612 4.83 2.87 145.00 = PKIKS no arrival
145.00 10.0 SKP 1396.89 2.310 4.13 6.92 145.00 = SKP no arrival
145.00 10.0 SKiKP 1397.48 2.063 3.69 6.18 145.00 = SKiKP no arrival
145.00 10.0 PKS 1398.06 2.310 6.93 4.12 145.00 = PKS no arrival
145.00 10.0 SKIKS 1606.74 1.479 2.64 2.64 145.00 = SKIKS no arrival
145.00 10.0 pSKIKS 1611.35 1.479 175.57 2.64 145.00 = pSKIKS no arrival
145.00 10.0 sSKIKS 1612.51 1.479 177.36 2.64 145.00 = sSKIKS no arrival
145.00 10.0 PKIKKIKP 1723.30 1.924 5.77 5.76 215.00 = PKIKKIKP no arrival
145.00 10.0 SKKS 1788.04 5.686 10.21 10.19 145.00 = SKKS no arrival
145.00 10.0 SKKP 1875.58 4.185 7.49 12.61 215.00 = SKKP no arrival
145.00 10.0 SKKP 1875.73 4.399 7.88 13.26 215.00 = SKKP no arrival
145.00 10.0 PKKS 1876.76 4.184 12.63 7.48 215.00 = PKKS no arrival
145.00 10.0 PKKS 1876.91 4.399 13.29 7.87 215.00 = PKKS no arrival
145.00 10.0 Sdiff 1895.37 8.341 15.07 15.04 145.00 = Sdiff no arrival
145.00 10.0 pSdiff 1899.72 8.341 154.17 15.04 145.00 = pSdiff no arrival
145.00 10.0 sSdiff 1900.96 8.341 164.93 15.04 145.00 = sSdiff no arrival
145.00 10.0 SKIKKIKP 1938.81 1.922 3.43 5.75 215.00 = SKIKKIKP no arrival
145.00 10.0 PKIKKIKS 1939.98 1.922 5.76 3.43 215.00 = PKIKKIKS no arrival
145.00 10.0 SKKS 2110.19 3.595 6.43 6.42 215.00 = SKKS no arrival
145.00 10.0 SKIKKIKS 2155.48 1.918 3.43 3.42 215.00 = SKIKKIKS no arrival
145.00 10.0 SS 2504.95 11.438 20.88 20.85 145.00 = SS no arrival
145.00 10.0 SKSSKS 2586.47 7.530 13.57 13.55 145.00 = SKSSKS no arrival
145.00 10.0 SKSSKS 3000.49 4.340 7.77 7.76 215.00 = SKSSKS no arrival
145.00 10.0 SKIKSSKIKS 3080.75 1.924 3.44 3.43 215.00 = SKIKSSKIKS no arrival

Loading

0 comments on commit c57e286

Please sign in to comment.