Class SvgEarth

java.lang.Object
edu.sc.seis.TauP.SvgEarth

public class SvgEarth extends Object
Utilities for generating SVG plots of a slice through the earth model. Used for plotting ray paths or wavefronts.
  • Constructor Details

    • SvgEarth

      public SvgEarth()
  • Method Details

    • calcEarthScaleTransForPhaseList

      public static SvgEarthScaling calcEarthScaleTransForPhaseList(List<SeismicPhase> phaseList, DistDepthRange distDepthRange, boolean includeNegDist)
    • calcEarthScaleTrans

      public static SvgEarthScaling calcEarthScaleTrans(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(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 List<Arrival> createBoundingArrivals(List<SeismicPhase> phaseList)
    • printModelAsSVG

      public static void printModelAsSVG(PrintWriter out, TauModel tMod, float pixelWidth, SvgEarthScaling scaleTrans, boolean onlyNamedDiscon)
    • xyForDistRadius

      protected static double[] xyForDistRadius(double calcDist, double radius)
    • formatDistRadiusAsXY

      protected static String formatDistRadiusAsXY(double calcDist, double radius)
    • formatDistRadius

      public static String formatDistRadius(double calcDist, double radius)
    • calcZoomScaleTranslate

      public static SvgEarthScaling calcZoomScaleTranslate(List<Arrival> arrivals)
    • printSvgEnding

      public static void printSvgEnding(PrintWriter out)
    • printSvgEndZoom

      public static void printSvgEndZoom(PrintWriter out)
    • printSvgEnd

      public static void printSvgEnd(PrintWriter out)
    • printGmtScriptBeginning

      public static void printGmtScriptBeginning(PrintWriter out, String psFile, TauModel tMod, float mapWidth, String mapWidthUnit, boolean onlyNamedDiscon, String toolName, List<String> cmdLineArgs)
    • calcFontSizeForEarthScale

      public static int calcFontSizeForEarthScale(TauModel tMod, SvgEarthScaling scaleTrans)
    • printScriptBeginningSvg

      public static void printScriptBeginningSvg(PrintWriter out, TauModel tMod, float pixelWidth, SvgEarthScaling scaleTrans, String toolName, List<String> cmdLineArgs, List<String> colorList, String extraCSS)