GeoTessJavaExamples  2.0
Static Public Member Functions | Protected Member Functions | Static Private Attributes | List of all members
gov.sandia.geotess.examples.Tomography2D Class Reference

This application illustrates how to use features available in GeoTessJava to execute tomography on a 2D model. More...

Static Public Member Functions

static void main (String[] args)
 Main program that calls a bunch of methods that actually implement the tasks outlined above. More...
 

Protected Member Functions

void applyAttributeChanges (GeoTessModel model, int attributeIndex, float[] attributeChanges)
 Given a model and an array of attribute changes, apply the changes to the model. More...
 
ArrayList< double[][]> generateRayPaths () throws Exception
 Generate 11 ray paths on the surface of the WGS84 ellipsoid. More...
 
GeoTessModel hitCount (GeoTessModel inputModel, ArrayList< double[][]> rayPaths) throws Exception
 Build a new GeoTessModel with the same grid nodes as the input model. More...
 
void integrateRayPaths (GeoTessModel model, ArrayList< double[][]> rayPaths) throws Exception
 For every ray path, trace the ray through the model. More...
 
GeoTessModel refineModel (GeoTessModel oldModel, GeoTessModel hitCountModelRefined) throws Exception
 At this point, we have a new GeoTessModel that has been refined to have higher resolution (more vertices) than the old model. More...
 
void regularization (GeoTessModel model)
 Find the indices of the model 'points' that are the neighbors of each model point. More...
 
GeoTessModel startingModel () throws Exception
 Generate a starting model for the Tomography2D example program. More...
 

Static Private Attributes

static double[] ANMO = EarthShape.WGS84_RCONST.getVectorDegrees(34.9462, -106.4567)
 

Detailed Description

This application illustrates how to use features available in GeoTessJava to execute tomography on a 2D model.

This application does not implement tomography but merely illustrates how to call methods in GeoTessJava that one would likely need to perform tomography.

This application illustrates the following tasks:

  1. Generate 11 great circle ray paths along the surface of the WGS84 ellipsoid.
  2. Generate a 2D, global starting model consisting of values of attenuation as a function of geographic position on the globe.
  3. Limit the application of tomography to a region of the Earth in North America. This limitation is optional.
  4. Trace rays through the starting model, calculating the path integral of the attenuation along the ray path and the weights (data kernels) of all the grid nodes attributable to interpolation of points on ray paths.
  5. Call methods in GeoTessJava to identify the neighbors of a specified node. These methods are needed to apply regularization of the tomography matrix.
  6. Apply changes in model attribute values computed by tomographic inversion.
  7. Compute a new GeoTessModel whose attribute values are the number of times each grid node was 'touched' by one of the ray paths (hit count).
  8. Execute application GeoTessBuilder to generate a new grid that is more refined in areas of high hit count.
  9. Generate a new model based on the new, refined grid generated with GeoTessBuilder but containing attenuation values copied or interpolated from the original model.
Author
sballar

Definition at line 62 of file Tomography2D.java.

Member Function Documentation

◆ applyAttributeChanges()

void gov.sandia.geotess.examples.Tomography2D.applyAttributeChanges ( GeoTessModel  model,
int  attributeIndex,
float[]  attributeChanges 
)
protected

Given a model and an array of attribute changes, apply the changes to the model.

Parameters
model
attributeIndex
attributeChanges

Definition at line 572 of file Tomography2D.java.

◆ generateRayPaths()

ArrayList<double[][]> gov.sandia.geotess.examples.Tomography2D.generateRayPaths ( ) throws Exception
protected

Generate 11 ray paths on the surface of the WGS84 ellipsoid.

Each ray path is defined by two unit vector locations, one representing an event, and the other a station. All of the ray paths generated here have the same station, ANMO, located near Albuquerque, New Mexico, USA. The first ray path has zero length (the event is colocated with the station). The remaining events range in distance from 5 to 50 degrees in distance and 0 to 360 in azimuth from the station.

There is no requirement in GeoTess that the ray paths be represented this way, this parameterization was designed for this example program. In fact, GeoTess has no concept of a ray path at all.

Returns
an ArrayList of raypaths. Each ray path consists of two unit vectors, one for the event and one for the station.
Exceptions
IOException
GeoTessException

Definition at line 282 of file Tomography2D.java.

◆ hitCount()

GeoTessModel gov.sandia.geotess.examples.Tomography2D.hitCount ( GeoTessModel  inputModel,
ArrayList< double[][]>  rayPaths 
) throws Exception
protected

Build a new GeoTessModel with the same grid nodes as the input model.

There will a single attribute value of type int assigned to each grid node. The name of the attribute is HIT_COUNT and it is unitless.

Parameters
inputModel
rayPaths
Returns
Exceptions
GeoTessException
IOException

Definition at line 592 of file Tomography2D.java.

◆ integrateRayPaths()

void gov.sandia.geotess.examples.Tomography2D.integrateRayPaths ( GeoTessModel  model,
ArrayList< double[][]>  rayPaths 
) throws Exception
protected

For every ray path, trace the ray through the model.

Compute the integral of the model attribute along the ray path. Also accumulate the 'weight' associated with each grid node during interpolation of the attribute values along the ray path.

The GeoTess method used to compute the required information assume that each ray path is a great circle path from event to station. The radii of the points along the ray path are assumed to coincide with the surface of the WGS84 ellipsoid.

This method doesn't do anything with the results (the integrated value and the weights). This method merely serves as an example of how to extract the relevant information from a GeoTessModel. In a real tomography application, additional code would be required to transfer the information to tomographic matrices for inversion.

Parameters
model
rayPaths
Exceptions
GeoTessException

Definition at line 366 of file Tomography2D.java.

◆ main()

static void gov.sandia.geotess.examples.Tomography2D.main ( String[]  args)
static

Main program that calls a bunch of methods that actually implement the tasks outlined above.

This program should be run from directory GeoTessBuilderExamples/tomo2dTest.

Parameters
argsno command line arguments are required.

Definition at line 74 of file Tomography2D.java.

◆ refineModel()

GeoTessModel gov.sandia.geotess.examples.Tomography2D.refineModel ( GeoTessModel  oldModel,
GeoTessModel  hitCountModelRefined 
) throws Exception
protected

At this point, we have a new GeoTessModel that has been refined to have higher resolution (more vertices) than the old model.

But the new model has attribute value HIT_COUNT, not ATTENUATION. We need to make a new model using the refined grid from hitCountModelRefined but using data obtained from the old model. Where the old model has a vertex that is colocated with the vertex in the new model, the data from the old model is copied to the new model. For vertices in the new model that do not have colocated vertices in the old model, data will be interpolated from the data in the old model.

Parameters
oldModel
hitCountModelRefined
Returns
Exceptions
GeoTessException

Definition at line 732 of file Tomography2D.java.

◆ regularization()

void gov.sandia.geotess.examples.Tomography2D.regularization ( GeoTessModel  model)
protected

Find the indices of the model 'points' that are the neighbors of each model point.

In a real tomography application, this information would be used to apply regularization. Here, the GeoTessGrid is interrogated for the required information, but nothing is done with it.

Parameters
model

Definition at line 491 of file Tomography2D.java.

◆ startingModel()

GeoTessModel gov.sandia.geotess.examples.Tomography2D.startingModel ( ) throws Exception
protected

Generate a starting model for the Tomography2D example program.

The model will have a single attribute (attenuation), and will be a 2D model, i.e., there will be no radius associated with the nodes of the model. For this simple example, the model is populated with a single, constant value of attenuation, 0.1

Returns
a GeoTessModel
Exceptions
IOException
GeoTessException

Definition at line 199 of file Tomography2D.java.

Member Data Documentation

◆ ANMO

double [] gov.sandia.geotess.examples.Tomography2D.ANMO = EarthShape.WGS84_RCONST.getVectorDegrees(34.9462, -106.4567)
staticprivate

Definition at line 67 of file Tomography2D.java.


The documentation for this class was generated from the following file: