seismic.traveltime package


seismic.traveltime.cluster_grid module

seismic.traveltime.events_stations_rays_visualization2 module

seismic.traveltime.gather_events module

seismic.traveltime.mpiops module

seismic.traveltime.mpiops.array_split(arr, process=None)[source]

Convenience function for splitting array elements across MPI processes

  • arr (ndarray) – Numpy array

  • process (int) – Process for which array members are required. If None, MPI.comm.rank is used instead. (optional)

:return List corresponding to array members in a process. :rtype: list

seismic.traveltime.mpiops.run_once(f, *args, **kwargs)[source]

Run a function on one node and then broadcast result to all.

  • f (str) – The function to be evaluated. Can take arbitrary arguments and return anything or nothing

  • args (str) – Other positional arguments to pass on to f (optional)

  • kwargs (str) – Other named arguments to pass on to f (optional)


The value returned by f.

Return type


seismic.traveltime.parametrisation module

Class for parsing Alexei’s tomographic parametrisation file as an object.

Created on Wed Apr 03 13:52:28 2019

@author: Marcus W. Haynes

class seismic.traveltime.parametrisation.grid(in_file='param')[source]

Bases: object

extract_1D(lon, lat, values, ref=None, method='linear')[source]

Extracts arbitrary 1D vertical seismic velocity profiles from an inversion model.

  • lon - float or list of desired longitude locations.

  • lat - float or list of desired latitude locations.

  • values - array of inversion values corresponding to the grid class.

  • ref [optional] - the reference model to convert velocity perturbations to absolute values, if desired. Needs to be a 2D array with depth in first column and velocity in second column.

  • method [optional] - method used to interpolate values to location


Write the parametrisation file to disk

seismic.traveltime.parse_param module

Created on Wed Oct 31 14:15:44 2018

@author: u81234

class seismic.traveltime.parse_param.grid3[source]

Bases: object


Reads in the local and global grid parameters from an external parametrisation file (by default we load ‘./param’)

seismic.traveltime.plotviews module

seismic.traveltime.pslog module

class seismic.traveltime.pslog.ElapsedFormatter[source]

Bases: object

seismic.traveltime.pslog.warn_with_traceback(message, category, filename, lineno, line=None)[source]

copied from:

seismic.traveltime.sort_rays module

seismic.traveltime.zone_rays module

Module contents