Package edu.sc.seis.TauP
Class SvgEarth
- java.lang.Object
-
- edu.sc.seis.TauP.SvgEarth
-
public class SvgEarth extends java.lang.ObjectUtilities for generating SVG plots of a slice through the earth model. Used for plotting ray paths or wavefronts.
-
-
Constructor Summary
Constructors Constructor Description SvgEarth()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SvgEarthScalingcalcEarthScaleTrans(java.util.List<Arrival> arrivalList, DistDepthRange distDepthRange)static SvgEarthScalingcalcEarthScaleTransForPhaseList(java.util.List<SeismicPhase> phaseList, DistDepthRange distDepthRange, boolean includeNegDist)static intcalcFontSizeForEarthScale(TauModel tMod, SvgEarthScaling scaleTrans)static SvgEarthScalingcalcZoomScaleTranslate(java.util.List<Arrival> arrivals)static java.util.List<Arrival>createBoundingArrivals(java.util.List<SeismicPhase> phaseList)static double[]findPierceBoundingBox(double[] distRangeDeg, double[] depthRange, double R)Find bounding box, in cartesian, that contains the distance and depth range.static double[]findPierceBoundingBox(java.util.List<Arrival> arrivals)Find the boundaries of a x-y box that contain all pierce points for the arrivals.static java.lang.StringformatDistRadius(double calcDist, double radius)protected static java.lang.StringformatDistRadiusAsXY(double calcDist, double radius)static voidprintGmtScriptBeginning(java.io.PrintWriter out, java.lang.String psFile, TauModel tMod, float mapWidth, java.lang.String mapWidthUnit, boolean onlyNamedDiscon, java.lang.String toolName, java.util.List<java.lang.String> cmdLineArgs)static voidprintModelAsSVG(java.io.PrintWriter out, TauModel tMod, float pixelWidth, SvgEarthScaling scaleTrans, boolean onlyNamedDiscon)static voidprintScriptBeginningSvg(java.io.PrintWriter out, TauModel tMod, float pixelWidth, SvgEarthScaling scaleTrans, java.lang.String toolName, java.util.List<java.lang.String> cmdLineArgs, java.util.List<java.lang.String> colorList, java.lang.String extraCSS)static voidprintSvgEnd(java.io.PrintWriter out)static voidprintSvgEnding(java.io.PrintWriter out)static voidprintSvgEndZoom(java.io.PrintWriter out)protected static double[]xyForDistRadius(double calcDist, double radius)
-
-
-
Method Detail
-
calcEarthScaleTransForPhaseList
public static SvgEarthScaling calcEarthScaleTransForPhaseList(java.util.List<SeismicPhase> phaseList, DistDepthRange distDepthRange, boolean includeNegDist)
-
calcEarthScaleTrans
public static SvgEarthScaling calcEarthScaleTrans(java.util.List<Arrival> arrivalList, DistDepthRange distDepthRange)
-
findPierceBoundingBox
public static double[] findPierceBoundingBox(double[] distRangeDeg, double[] depthRange, double R)Find bounding box, in cartesian, that contains the distance and depth range. Whole earth is [-R, R, -R, R]- Parameters:
distRangeDeg-depthRange-R-- Returns:
- [xmin, xmax, ymin, ymax]
-
findPierceBoundingBox
public static double[] findPierceBoundingBox(java.util.List<Arrival> arrivals)
Find the boundaries of a x-y box that contain all pierce points for the arrivals.- Parameters:
arrivals- to search- Returns:
- array of xmin, xmax, ymin, ymax in x-y coordinates (not dist-depth)
-
createBoundingArrivals
public static java.util.List<Arrival> createBoundingArrivals(java.util.List<SeismicPhase> phaseList)
-
printModelAsSVG
public static void printModelAsSVG(java.io.PrintWriter out, TauModel tMod, float pixelWidth, SvgEarthScaling scaleTrans, boolean onlyNamedDiscon)
-
xyForDistRadius
protected static double[] xyForDistRadius(double calcDist, double radius)
-
formatDistRadiusAsXY
protected static java.lang.String formatDistRadiusAsXY(double calcDist, double radius)
-
formatDistRadius
public static java.lang.String formatDistRadius(double calcDist, double radius)
-
calcZoomScaleTranslate
public static SvgEarthScaling calcZoomScaleTranslate(java.util.List<Arrival> arrivals)
-
printSvgEnding
public static void printSvgEnding(java.io.PrintWriter out)
-
printSvgEndZoom
public static void printSvgEndZoom(java.io.PrintWriter out)
-
printSvgEnd
public static void printSvgEnd(java.io.PrintWriter out)
-
printGmtScriptBeginning
public static void printGmtScriptBeginning(java.io.PrintWriter out, java.lang.String psFile, TauModel tMod, float mapWidth, java.lang.String mapWidthUnit, boolean onlyNamedDiscon, java.lang.String toolName, java.util.List<java.lang.String> cmdLineArgs)
-
calcFontSizeForEarthScale
public static int calcFontSizeForEarthScale(TauModel tMod, SvgEarthScaling scaleTrans)
-
printScriptBeginningSvg
public static void printScriptBeginningSvg(java.io.PrintWriter out, TauModel tMod, float pixelWidth, SvgEarthScaling scaleTrans, java.lang.String toolName, java.util.List<java.lang.String> cmdLineArgs, java.util.List<java.lang.String> colorList, java.lang.String extraCSS)
-
-