GeoTessCExamples
2.0
|
#include "Tomography2D.h"
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
GeoTessModelC * | startingModel (char *gridFile) |
void | generateRayPaths (double ****rayPaths, int *nRays) |
void | integrateRayPaths (GeoTessModelC *model, double ***rayPaths, int nRays) |
void | regularization (GeoTessModelC *model) |
void | applyAttributeChanges (GeoTessModelC *model, int attributeIndex, float *attributeChanges, int nChanges) |
GeoTessModelC * | hitCount (GeoTessModelC *model, double ***rayPaths, int nRays) |
GeoTessModelC * | refineModel (GeoTessModelC *oldModel, GeoTessModelC *hitCountModelRefined) |
void | errorCheck () |
void applyAttributeChanges | ( | GeoTessModelC * | model, |
int | attributeIndex, | ||
float * | attributeChanges, | ||
int | nChanges | ||
) |
Given a model and an array of attribute changes, apply the changes to the model.
model | |
attributeIndex | |
attributeChanges | |
nChanges |
Definition at line 713 of file Tomography2D.c.
void errorCheck | ( | ) |
Check to see if any errors have occurred. If any, print out the error messages and abort.
Definition at line 1022 of file Tomography2D.c.
void generateRayPaths | ( | double **** | rayPaths, |
int * | nRays | ||
) |
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.
rayPaths | a pointer to a 3D array containing the rayPaths. Each ray path consists of two unit vectors, one for the event and one for the station. On input, this pointer should be null. |
nRays | the number of rays created. |
Definition at line 362 of file Tomography2D.c.
GeoTessModelC* hitCount | ( | GeoTessModelC * | model, |
double *** | rayPaths, | ||
int | nRays | ||
) |
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.
model | |
rayPaths | |
nRays |
Definition at line 740 of file Tomography2D.c.
void integrateRayPaths | ( | GeoTessModelC * | model, |
double *** | rayPaths, | ||
int | nRays | ||
) |
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.
model | |
rayPaths | |
nRays |
Definition at line 445 of file Tomography2D.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
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.
In order to run properly, this program must be run from directory GeoTessBuilderExamples/tomo2dTest.
This application illustrates the following tasks:
Definition at line 75 of file Tomography2D.c.
GeoTessModelC* refineModel | ( | GeoTessModelC * | oldModel, |
GeoTessModelC * | hitCountModelRefined | ||
) |
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.
oldModel | |
hitCountModelRefined |
Definition at line 941 of file Tomography2D.c.
void regularization | ( | GeoTessModelC * | model | ) |
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.
model |
Definition at line 606 of file Tomography2D.c.
GeoTessModelC* startingModel | ( | char * | gridFile | ) |
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
gridFile | the name of the file containing the GeoTessGrid upon which the starting model will be based. |
Definition at line 260 of file Tomography2D.c.