Package edu.sc.seis.TauP
Class ProtoSeismicPhase
java.lang.Object
edu.sc.seis.TauP.ProtoSeismicPhase
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionProtoSeismicPhase(List<SeismicPhaseSegment> segmentList, double receiverDepth) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadd(SeismicPhaseSegment seg) protected SeismicPhaseSegmentaddFlatBranch(boolean isPWave, PhaseInteraction prevEndAction, PhaseInteraction endAction, String currLeg) addToBranch(int endBranch, boolean isPWave, boolean nextIsPWave, PhaseInteraction endAction, String currLeg) Adds a segment to a path of a seismic phase.voidintprotected doublecalcMaxTransitRP(int startBranch, int endBranch, boolean isPWave, PhaseInteraction prevEndAction, double maxRayParam) intcalcStartBranch(String currLeg) Calculate the starting branch number for the current leg.intintintintfinal SeismicPhaseSegmentstatic ProtoSeismicPhasefailNewPhase(TauModel tMod, boolean isPWave, LayerPropogationType layerPropogationType, double receiverDepth, String phaseName, String reason) static intfindEndDiscon(TauModel tMod, int startBranchNum, boolean isPWave, LayerPropogationType layerPropogationType) Finds discontinuity branch in direction given.final SeismicPhaseSegmentget(int i) final PhaseInteractiongetName()final List<SeismicPhaseSegment>gettMod()final booleanisEmpty()booleanstatic StringlegNameForSegment(TauModel tMod, int endBranch, boolean isPWave, LayerPropogationType layerPropogationType, PhaseInteraction endAction) static StringlegNameForSegment(TauModel tMod, SeismicPhaseSegment seg) nextSegment(boolean isPWave, int endDisconBranchNum, PhaseInteraction endAction) Propogates a ray to the discontinuity given.nextSegment(boolean isPWave, PhaseInteraction endAction) intphaseNameForSegments(boolean zapED) final intsize()final SeismicPhaseSegmentsplitForHighSlowness(TauBranch hszBranch) splitForHighSlownessDiscon(int hszBranchNum, boolean isPWave) Split for a discontinuity where above slowness is smaller than below.static ProtoSeismicPhasestart(SeismicPhaseSegment startSeg, double receiverDepth) static ProtoSeismicPhasestartEmpty(String phaseName, TauModel tMod, double receiverDepth) Starts a phase with no legs.static ProtoSeismicPhasestartNewPhase(TauModel tMod, boolean isPWave, PhaseInteraction endAction, LayerPropogationType layerPropogationType, double receiverDepth) voidzapEDIfPossible(SeismicPhaseSegment seg, SeismicPhaseSegment next, String legName)
-
Constructor Details
-
ProtoSeismicPhase
-
-
Method Details
-
startEmpty
Starts a phase with no legs.- Parameters:
phaseName- name of phasetMod- tau model, which includes the source depthreceiverDepth- depth of the receiver- Returns:
- proto phase ready for adding legs
-
start
-
failNewPhase
public static ProtoSeismicPhase failNewPhase(TauModel tMod, boolean isPWave, LayerPropogationType layerPropogationType, double receiverDepth, String phaseName, String reason) -
startNewPhase
public static ProtoSeismicPhase startNewPhase(TauModel tMod, boolean isPWave, PhaseInteraction endAction, LayerPropogationType layerPropogationType, double receiverDepth) throws TauPException - Throws:
TauPException
-
failNext
-
nextSegment
public ProtoSeismicPhase nextSegment(boolean isPWave, PhaseInteraction endAction) throws TauModelException - Throws:
TauModelException
-
nextStartBranch
- Throws:
TauModelException
-
nextSegment
public ProtoSeismicPhase nextSegment(boolean isPWave, int endDisconBranchNum, PhaseInteraction endAction) throws TauModelException Propogates a ray to the discontinuity given.- Parameters:
isPWave- true for P, false for SendDisconBranchNum- branch number for the layer below the discontinuityendAction- end action when hitting the discontinuity- Returns:
- phase with one additional segment
- Throws:
TauModelException
-
findEndDiscon
public static int findEndDiscon(TauModel tMod, int startBranchNum, boolean isPWave, LayerPropogationType layerPropogationType) Finds discontinuity branch in direction given. Branch number is below the discontinuity.- Parameters:
tMod- the modelstartBranchNum- starting branchisPWave- true for PlayerPropogationType- up or down- Returns:
- branch number below the discontinuity
-
validateSegList
- Throws:
TauModelException
-
splitForAllHighSlowness
- Throws:
TauModelException
-
splitForHighSlowness
- Throws:
TauModelException
-
splitForHighSlownessDiscon
public 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
- Throws:
TauModelException
-
getSegmentList
-
get
-
isEmpty
public final boolean isEmpty() -
getFlatSegment
-
getEndAction
-
endSegment
-
sourceSegment
-
isSuccessful
public boolean isSuccessful() -
size
public final int size() -
countFlatLegs
public int countFlatLegs() -
countHeadLegs
public int countHeadLegs() -
countDiffLegs
public int countDiffLegs() -
add
-
calcStartBranch
Calculate the starting branch number for the current leg. This is the same as the previous end branch number for reflections, and offset by one for transmissions.- Parameters:
currLeg- current leg name- Returns:
- branch number
- Throws:
TauModelException
-
addToBranch
public SeismicPhaseSegment addToBranch(int endBranch, boolean isPWave, boolean nextIsPWave, PhaseInteraction endAction, 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, String currLeg) throws TauModelException - Throws:
TauModelException
-
calcInteractionNumber
public int calcInteractionNumber() -
zapEDIfPossible
-
phaseNameForSegments
-
phaseNameForSegments
-
legNameForSegment
-
legNameForSegment
public static String legNameForSegment(TauModel tMod, int endBranch, boolean isPWave, LayerPropogationType layerPropogationType, PhaseInteraction endAction) -
branchNumSeg
-
branchNumSeqStr
-
branchNumSeqStrWithSegBreaks
-
asSeismicPhase
- Throws:
TauModelException
-
getName
-
getPuristName
-
gettMod
-
segmentListAsString
-
compareTo
- Specified by:
compareToin interfaceComparable<ProtoSeismicPhase>
-