faultpostproc class

class csi.faultpostproc(name, fault, Mu=24000000000.0, samplesh5=None, AlTarV=1, utmzone=None, ellps='WGS84', lon0=None, lat0=None, verbose=True)

A class that allows to compute various things from a fault object.

Args:
  • name : Name of the InSAR dataset.

  • fault : Fault object

Kwargs:
  • Mu : Shear modulus. Default is 24e9 GPa, because it is the PREM value for the upper 15km. Can be a scalar or a list/array of len=len(fault.patch)

  • samplesh5 : file name of h5 file containing samples

  • AlTarV : AlTar version 1 or version 2 (default 1 for backwards compatibility)

  • utmzone : UTM zone (optional, default=None)

  • lon0 : Longitude of the center of the UTM zone

  • lat0 : Latitude of the center of the UTM zone

  • ellps : ellipsoid (optional, default=’WGS84’)

  • verbose : Speak to me (default=True)

Aki2Harvard()

Transform the patch from the Aki convention to the Harvard convention.

checkSymmetric(M)

Check if a matrix is symmetric.

computeBetaMagnitude()

Computes the magnitude with a simple approximation.

computeCentroidLonLatDepth(plotOutput=None, xyzOutput=None)

Computes the equivalent centroid location. Take from Theoretical Global Seismology, Dahlen & Tromp. Chapter 5. Section 4. pp. 169

computeMagnitude(plotHist=None, outputSamp=None)

Computes the moment magnitude.

computeMomentAngularDifference(Mout, form='harvard')

Computes the difference in angle between the moment Mout and the moment. Mout: full moment in harvard convention.

computeMomentTensor()

Computes the full seismic (0-order) moment tensor from the slip distribution.

computeMoments()

Computes the moment tensor for each patch. Result is stored in self.Moments

computePatchMoment(p)

Computes the Moment tensor for one patch. Args:

  • p : patch index

computePotencies()

Computes the potencies for all the patches. Result is stored in self.Potencies

computeScalarMoment()

Computes the scalar seismic moment.

h5_finalize()

Close the (potentially) open h5 file.

Returns:
  • None

h5_init(decim=1, indss=None, indds=None)

If the attribute self.samplesh5 is not None, we open the h5 file specified by self.samplesh5 and copy the slip values to self.fault.slip (hopefully without loading into memory).

Kwargs:
  • decim : decimation factor for skipping samples

  • indss : tuples (size (2,)) containing desired indices of strike slip in h5File

  • indds : tuples (size (2,)) containing desired indices of dip slip in h5File

Returns:
  • None

integratedPotencyAlongProfile(numXBins=100, outputSamp=None)

Computes the cumulative potency as a function of distance to the profile origin. If the potencies were computed with multiple samples (in case of Bayesian exploration), we form histograms of potency vs. distance. Otherwise, we just compute a distance profile.

kwargs:

numXBins number of bins to group patches along the profile

integratedPotencyWithDepth(plotOutput=None, numDepthBins=5, outputSamp=None)

Computes the cumulative moment with depth by summing the moment per row of patches. If the moments were computed with mutiple samples, we form histograms of potency vs. depth. Otherwise, we just compute a depth profile.

kwargs:

plotOutput output directory for figures numDepthBins number of bins to group patch depths

patchNormal(p)

Returns the Normal to a patch.

Args:
  • p : Index of the desired patch.

Returns:
  • unit normal vector

slipVector(p)

Returns the slip vector in the cartesian space for the patch p. We do not deal with the opening component. The fault slip may be a 3D array for multiple samples of slip. Args:

  • p : Index of the desired patch.

stressdrop(shapefactor=2.44, threshold=0.2, threshold_rand=False, return_Area_Mo_Slip=False)

Compute threshold-dependent moment-based average stress-dip (cf., Noda et al., GJI 2013) Args:

  • shapefactor: shape factor (e.g., 2.44 for a circular crack,)

  • threshold: Rupture Area = area for slip > threshold * slip_max

  • threashold_rand: if =’log-normal’ randomly generate threshold with mean threshold[0]

    and sigma=threshold[1]

    if =’uniform’ randomly generate threshold between threshold[0]

    and threshold[1]

    if =False: compute stressdrop for a constant threshold

  • return_Area_Mo_Slip: if True, also return Rupture area as well as corresponding

    scalar moment and averaged slip amplitude

write2GCMT(form='full', filename=None)

Writes in GCMT style Args:

  • formformat is either ‘full’ to match with Zacharie binary

    or ‘line’ to match with the option -Sm in GMT

Example of ‘full’:

PDE 2006 1 1 7 11 57.00 31.3900 140.1300 10.0 5.3 5.0 SOUTHEAST OF HONSHU, JAP

event name: 200601010711A time shift: 10.4000 half duration: 1.5000 latitude: 31.5100 longitude: 140.0700 depth: 12.0000 Mrr: 3.090000e+24 Mtt: -2.110000e+24 Mpp: -9.740000e+23 Mrt: -6.670000e+23 Mrp: -5.540000e+23 Mtp: -5.260000e+23