Package edu.sc.seis.TauP
Class ProtoSeismicPhase
- java.lang.Object
-
- edu.sc.seis.TauP.ProtoSeismicPhase
-
- All Implemented Interfaces:
java.lang.Comparable<ProtoSeismicPhase>
public class ProtoSeismicPhase extends java.lang.Object implements java.lang.Comparable<ProtoSeismicPhase>
Represents a partial seismic phase, appended to as a name is parsed. May also fail if part way if phase is not compatible with the model.
-
-
Constructor Summary
Constructors Constructor Description ProtoSeismicPhase(java.util.List<SeismicPhaseSegment> segmentList, double receiverDepth)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SeismicPhaseSegment seg)
protected SeismicPhaseSegment
addFlatBranch(boolean isPWave, PhaseInteraction prevEndAction, PhaseInteraction endAction, java.lang.String currLeg)
SeismicPhaseSegment
addToBranch(int endBranch, boolean isPWave, boolean nextIsPWave, PhaseInteraction endAction, java.lang.String currLeg)
Adds a segment to a path of a seismic phase.SimpleSeismicPhase
asSeismicPhase()
java.util.List<java.lang.Integer>
branchNumSeg()
java.lang.String
branchNumSeqStr()
java.lang.String
branchNumSeqStrWithSegBreaks()
void
calcEndSegRayParam()
int
calcInteractionNumber()
protected double
calcMaxTransitRP(int startBranch, int endBranch, boolean isPWave, PhaseInteraction prevEndAction, double maxRayParam)
int
calcStartBranch(java.lang.String currLeg)
int
compareTo(ProtoSeismicPhase o)
int
countDiffLegs()
int
countFlatLegs()
int
countHeadLegs()
SeismicPhaseSegment
endSegment()
static ProtoSeismicPhase
failNewPhase(TauModel tMod, boolean isPWave, boolean isDownGoing, double receiverDepth, java.lang.String phaseName, java.lang.String reason)
SeismicPhaseSegment
failNext(java.lang.String reason)
static int
findEndDiscon(TauModel tMod, int startBranchNum, boolean isPWave, boolean isDowngoing)
SeismicPhaseSegment
get(int i)
PhaseInteraction
getEndAction()
java.lang.String
getName()
java.lang.String
getPuristName()
TauModel
gettMod()
boolean
isEmpty()
boolean
isSuccessful()
static java.lang.String
legNameForSegment(TauModel tMod, int endBranch, boolean isPWave, boolean isDownGoing, boolean isFlat, PhaseInteraction endAction)
static java.lang.String
legNameForSegment(TauModel tMod, SeismicPhaseSegment seg)
ProtoSeismicPhase
nextSegment(boolean isPWave, PhaseInteraction endAction)
java.lang.String
phaseNameForSegments()
java.lang.String
phaseNameForSegments(boolean zapED)
java.lang.String
segmentListAsString()
int
size()
SeismicPhaseSegment
sourceSegment()
java.util.List<ShadowOrProto>
splitForAllHighSlowness()
java.util.List<ShadowOrProto>
splitForHighSlowness(TauBranch hszBranch)
java.util.List<ShadowOrProto>
splitForHighSlownessDiscon(int hszBranchNum, boolean isPWave)
Split for a discontinuity where above slowness is smaller than below.static ProtoSeismicPhase
start(SeismicPhaseSegment startSeg, double receiverDepth)
static ProtoSeismicPhase
startEmpty(java.lang.String phaseName, TauModel tMod, double receiverDepth)
static ProtoSeismicPhase
startNewPhase(TauModel tMod, boolean isPWave, PhaseInteraction endAction, boolean isDownGoing, double receiverDepth)
void
validateSegList()
-
-
-
Constructor Detail
-
ProtoSeismicPhase
public ProtoSeismicPhase(java.util.List<SeismicPhaseSegment> segmentList, double receiverDepth)
-
-
Method Detail
-
startEmpty
public static ProtoSeismicPhase startEmpty(java.lang.String phaseName, TauModel tMod, double receiverDepth)
-
start
public static ProtoSeismicPhase start(SeismicPhaseSegment startSeg, double receiverDepth)
-
failNewPhase
public static ProtoSeismicPhase failNewPhase(TauModel tMod, boolean isPWave, boolean isDownGoing, double receiverDepth, java.lang.String phaseName, java.lang.String reason)
-
startNewPhase
public static ProtoSeismicPhase startNewPhase(TauModel tMod, boolean isPWave, PhaseInteraction endAction, boolean isDownGoing, double receiverDepth) throws TauPException
- Throws:
TauPException
-
failNext
public SeismicPhaseSegment failNext(java.lang.String reason)
-
nextSegment
public ProtoSeismicPhase nextSegment(boolean isPWave, PhaseInteraction endAction) throws TauModelException
- Throws:
TauModelException
-
findEndDiscon
public static int findEndDiscon(TauModel tMod, int startBranchNum, boolean isPWave, boolean isDowngoing)
-
validateSegList
public void validateSegList() throws TauModelException
- Throws:
TauModelException
-
splitForAllHighSlowness
public java.util.List<ShadowOrProto> splitForAllHighSlowness() throws TauModelException
- Throws:
TauModelException
-
splitForHighSlowness
public java.util.List<ShadowOrProto> splitForHighSlowness(TauBranch hszBranch) throws TauModelException
- Throws:
TauModelException
-
splitForHighSlownessDiscon
public java.util.List<ShadowOrProto> splitForHighSlownessDiscon(int hszBranchNum, boolean isPWave) throws TauModelException
Split for a discontinuity where above slowness is smaller than below. Usually a low velocity zone. Only splits for discontinuities internal to a SeismicPhaseSegment as discontinuities at the boundary are handled via normal phase generation and min,max ray param and cannot generate an internal shadow zone.- Parameters:
hszBranchNum
- TauBranch number with the discon at its topisPWave
- true for P waves, false for S waves- Returns:
- phase split for shadow zone
- Throws:
TauModelException
-
calcEndSegRayParam
public void calcEndSegRayParam() throws TauModelException
- Throws:
TauModelException
-
get
public final SeismicPhaseSegment get(int i)
-
isEmpty
public final boolean isEmpty()
-
getEndAction
public final PhaseInteraction getEndAction()
-
endSegment
public final SeismicPhaseSegment endSegment()
-
sourceSegment
public final SeismicPhaseSegment sourceSegment()
-
isSuccessful
public boolean isSuccessful()
-
size
public final int size()
-
countFlatLegs
public int countFlatLegs()
-
countHeadLegs
public int countHeadLegs()
-
countDiffLegs
public int countDiffLegs()
-
add
public final void add(SeismicPhaseSegment seg)
-
calcStartBranch
public int calcStartBranch(java.lang.String currLeg)
-
addToBranch
public SeismicPhaseSegment addToBranch(int endBranch, boolean isPWave, boolean nextIsPWave, PhaseInteraction endAction, java.lang.String currLeg) throws TauModelException
Adds a segment to a path of a seismic phase. Generally this corresponds to a character in a phase name, like K in PKP.- Parameters:
endBranch
- ending branch number, start is calculated from the end branch and end action of the prior leg.isPWave
- current leg phase type, true for P, false for SnextIsPWave
- next leg phase type, true for P, false for S, determines if a phase conversion at the endendAction
- action the phase takes at the end, like TURN or REFLECT_TOPSIDEcurrLeg
- name of current leg- Returns:
- The segment added by this call
- Throws:
TauModelException
- if arguments not possible in the model, but not thrown for a simple failure to exist
-
calcMaxTransitRP
protected double calcMaxTransitRP(int startBranch, int endBranch, boolean isPWave, PhaseInteraction prevEndAction, double maxRayParam)
-
addFlatBranch
protected SeismicPhaseSegment addFlatBranch(boolean isPWave, PhaseInteraction prevEndAction, PhaseInteraction endAction, java.lang.String currLeg) throws TauModelException
- Throws:
TauModelException
-
calcInteractionNumber
public int calcInteractionNumber()
-
phaseNameForSegments
public java.lang.String phaseNameForSegments()
-
phaseNameForSegments
public java.lang.String phaseNameForSegments(boolean zapED)
-
legNameForSegment
public static java.lang.String legNameForSegment(TauModel tMod, SeismicPhaseSegment seg)
-
legNameForSegment
public static java.lang.String legNameForSegment(TauModel tMod, int endBranch, boolean isPWave, boolean isDownGoing, boolean isFlat, PhaseInteraction endAction)
-
branchNumSeg
public java.util.List<java.lang.Integer> branchNumSeg()
-
branchNumSeqStr
public java.lang.String branchNumSeqStr()
-
branchNumSeqStrWithSegBreaks
public java.lang.String branchNumSeqStrWithSegBreaks()
-
asSeismicPhase
public SimpleSeismicPhase asSeismicPhase() throws TauModelException
- Throws:
TauModelException
-
getName
public java.lang.String getName()
-
getPuristName
public java.lang.String getPuristName()
-
gettMod
public TauModel gettMod()
-
segmentListAsString
public java.lang.String segmentListAsString()
-
compareTo
public int compareTo(ProtoSeismicPhase o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ProtoSeismicPhase>
-
-