Plugin SeismicLab
You can find the source code of this plugin on the following Github repository: Get the code here!. This plugin is one of the official plugins provided by LabRPS. It provides very useful features (tools) for the simulation of seismic ground motion. Plugins are very easy to create in LabRPS, therefore, anyone can develop plugin for any random phenomenon in LabRPS. Go to this page to see how to create new plugin for LabRPS. You can get quick assistance from LabRPS community by sending your concern to the community forum.
Horizontal Uniform Distribution
This feature provides an efficient method to distribute seismic ground motion simulation points uniformly in space. It allows users to generate a set of points within a 3D spatial domain, ensuring that the points are evenly distributed along a horizontal line that is parallel to one of the coordinate system axis. This uniform distribution is critical in certain simulation methods. For [math]\displaystyle{ n }[/math] simulation points [math]\displaystyle{ (P_1,P_2,P_3,...,P_n) }[/math], the distance [math]\displaystyle{ d_{jk} }[/math] between points [math]\displaystyle{ P_j }[/math] and [math]\displaystyle{ P_k }[/math] must be given by the following formula:
[math]\displaystyle{ d_{jk} = s\times|j-k| }[/math]
where [math]\displaystyle{ s }[/math] is the even space between any two adjacent points.
Properties
- DataFirstPoint: This is a point in 3D space representing the first point the distribution will start from.
- DataSpacing: This is the even space between any two adjacent points in the distribution.
Scripting
import SeismicLab
import GeneralToolsGui
import SeismicLabObjects
from LabRPS import Vector as vec
import numpy
import LabRPS
def compute():
installResuslt = SeismicLab.installPlugin("SeismicLabPlugin")
doc = LabRPS.ActiveDocument
if not doc:
doc = LabRPS.newDocument()
# create SeismicLab simulation called "Simulation"
sim = SeismicLabObjects.makeSimulation(doc, "Simulation")
# check if the simulation sucessfully created
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Horizontal Distribution"
featureGroup = "Location Distribution"
# create the feature
newFeature= SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not newFeature:
LabRPS.Console.PrintError("Error on creating the feature.\n")
return None
# let's set the first point of the distribution (x =0, y = 0, z = 80m)
newFeature.FirstPoint = vec(0,0,80000)
# let's set the spacing (s = 10m)
newFeature.Spacing = '10m'
# compute the simulation points coordinates. SeismicLab will internally use the "newFeature" feature.
simPoints = sim.computeLocationCoordinateMatrixP3()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(simPoints)
# you can also show the result in a table, pass False as last argument to the function to ask
# LabRPS to only show the data without plotting them
GeneralToolsGui.GeneralToolsPyTool.showArray(sim.getSimulationData().numberOfSpatialPosition, 4, simPoints, False)
compute()
Vertical Uniform Distribution
This feature provides an efficient method to distribute seismic ground motion simulation points uniformly in space. It allows users to generate a set of points within a 3D spatial domain, ensuring that the points are evenly distributed along a vertical line. This uniform distribution is critical in certain simulation methods. For [math]\displaystyle{ n }[/math] simulation points [math]\displaystyle{ (P_1,P_2,P_3,...,P_n) }[/math], the distance [math]\displaystyle{ d_{jk} }[/math] between points [math]\displaystyle{ P_j }[/math] and [math]\displaystyle{ P_k }[/math] must be given by the following formula:
[math]\displaystyle{ d_{jk} = s\times|j-k| }[/math]
where [math]\displaystyle{ s }[/math] is the even space between any two adjacent points.
Properties
- DataLowestPoint: This is a point in 3D space representing the lowest point the distribution will start from. In many applications, this point should not be lower than 10 meters.
- DataSpacing: This is the even space between any two adjacent points in the distribution.
Scripting
import SeismicLab
import GeneralToolsGui
import SeismicLabObjects
from LabRPS import Vector as vec
import numpy
import LabRPS
def compute():
installResuslt = SeismicLab.installPlugin("SeismicLabPlugin")
doc = LabRPS.ActiveDocument
if not doc:
doc = LabRPS.newDocument()
# create SeismicLab simulation called "Simulation"
sim = SeismicLabObjects.makeSimulation(doc, "Simulation")
# check if the simulation sucessfully created
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Vertical Distribution"
featureGroup = "Location Distribution"
# create the feature
newFeature= SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not newFeature:
LabRPS.Console.PrintError("Error on creating the feature.\n")
return None
# let's set the first point of the distribution (x =0, y = 0, z = 30m)
newFeature.LowestPoint = vec(0,0,30000)
# let's set the spacing (s = 10m)
newFeature.Spacing = '10m'
# compute the simulation points coordinates. SeismicLab will internally use the "newFeature" feature.
simPoints = sim.computeLocationCoordinateMatrixP3()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(simPoints)
# you can also show the result in a table, pass False as last argument to the function to ask
# LabRPS to only show the data without plotting them
GeneralToolsGui.GeneralToolsPyTool.showArray(sim.getSimulationData().numberOfSpatialPosition, 4, simPoints, False)
compute()
Uniform Distribution
This feature may be seen as a general form of the horizontal and the vertical distribution features. It allows users to generate a set of points within a 3D spatial domain, ensuring that the points are evenly distributed along a line parallel to one of the coordinate system axis. For [math]\displaystyle{ n }[/math] simulation points [math]\displaystyle{ (P_1,P_2,P_3,...,P_n) }[/math], the distance [math]\displaystyle{ d_{jk} }[/math] between points [math]\displaystyle{ P_j }[/math] and [math]\displaystyle{ P_k }[/math] must be given by the following formula:
[math]\displaystyle{ d_{jk} = s\times|j-k| }[/math]
where [math]\displaystyle{ s }[/math] is the even space between any two adjacent points.
Properties
- DataFirstPoint: This is a point in 3D space representing the first point the distribution will start from. This should be the lowest point in case the distribution is parallel to the vertical axis and should not be lower than 10 meters in many application.
- DataSpacing: This is the even space between any two adjacent points in the distribution.
- DataDirection: Its value can be X, Y or Z. This is the axis the points distribution is parallel to.
Scripting
This feature can be used to produce vertical distribution as we did before in the Vertical Distribution feature.
import SeismicLab
import GeneralToolsGui
import SeismicLabObjects
from LabRPS import Vector as vec
import numpy
import LabRPS
def compute():
installResuslt = SeismicLab.installPlugin("SeismicLabPlugin")
doc = LabRPS.ActiveDocument
if not doc:
doc = LabRPS.newDocument()
# create SeismicLab simulation called "Simulation"
sim = SeismicLabObjects.makeSimulation(doc, "Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Uniform Distribution"
featureGroup = "Location Distribution"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
unifSimPoints= SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not unifSimPoints:
LabRPS.Console.PrintError("Error on creating the uniform points feature.\n")
return None
# set the direction of the distribution to be vertical
unifSimPoints.Direction= 'Z'
# let's set the first point of the distribution (x =0, y = 0, z = 30m)
unifSimPoints.FirstPoint = vec(0,0,30000) # This is the lowest point in this case (Direction = 'Z')
# let's set the spacing (s = 10m)
unifSimPoints.Spacing = '10m'
# compute the simulation points coordinates. SeismicLab will internally use the "unifSimPoints" feature.
simPoints = sim.computeLocationCoordinateMatrixP3()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(simPoints)
# you can also show the result in a table, pass False as last argument to the function to ask
# LabRPS to only show the data without plotting them
GeneralToolsGui.GeneralToolsPyTool.showArray(sim.getSimulationData().numberOfSpatialPosition, 4, simPoints, False)
compute()
Grid Points
This feature allows users to generate a set of grid points within a 3D spatial domain, ensuring that the points are evenly distributed in a plane parallel to one of the coordinate system planes (XY Plane, YZ Plane, XZ Plane).
Properties
- DataSpacing1: This is the points spacing along one of the axis forming the plane.
- DataSpacing2: This is the points spacing along the second axis.
- DataLength1: This is the length within points are distributed along one of the axis forming the plane.
- DataLength2: This is the length within points are distributed along the second axis.
- DataCenterPoint: This is the center of the grid around which the points are generated. It is a 3D point.
- DataNumberOfPoints: This is the resulting total number of points in the grid. This is a read only property for internal use. User cannot change its value directly.
Scripting
The following script shows how this feature can be created and used.
import SeismicLab
import GeneralToolsGui
import SeismicLabObjects
from LabRPS import Vector as vec
import LabRPS
import numpy
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
def compute():
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Grid Points"
featureGroup = "Location Distribution"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
unifSimPoints= SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not unifSimPoints:
LabRPS.Console.PrintError("Error on creating the uniform points feature.\n")
return None
# set the plan the points grid is parallel to
unifSimPoints.LocationPlan= 'YZ Plane'
# let's set the center point of the distribution (x =0, y = 0, z = 0)
unifSimPoints.CenterPoint = vec(0,0,0)
# let's set the spacing1 (s1 = 10m)
unifSimPoints.Spacing1 = '10m'
# let's set the spacing2 (s2 = 10m)
unifSimPoints.Spacing2 = '10m'
# let's set the length1 (l1 = 200m)
unifSimPoints.Length1= '200m'
# let's set the length2 (l2 = 200m)
unifSimPoints.Length2= '200m'
# compute the simulation points coordinates. SeismicLab will internally use the "unifSimPoints" feature.
simPoints = sim.computeLocationCoordinateMatrixP3()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(simPoints)
# Example 3D points
x = arr[:,1]
y = arr[:,2]
z = arr[:,3]
# you can also show the result in a table, pass False as last argument to the function to ask
# LabRPS to only show the data without plotting them
GeneralToolsGui.GeneralToolsPyTool.showArray(sim.getSimulationData().numberOfSpatialPosition, 4, simPoints, False)
# Create a figure
fig = plt.figure()
# Add 3D axes
ax = fig.add_subplot(111, projection='3d')
# Plot points
ax.scatter(x, y, z, color='blue')
# Hide all axes and labels
ax.set_axis_off()
# Set the title
ax.set_title('3D Plotting of Points')
# Show the plot
plt.show()
compute()
General Distribution
When the simulation points distribution is more general and does not follow any of the previous uniform distribution, this feature can be used. This feature allows users to input simulation points one by one using their coordinates based on the vector dialog shown below:
File:SeismicLab Tutorial001 Pic005 SeismicLab Feat Locations 2.png
Properties
- DataLocations: This is a list holding the simulation points
Scripting
The following script shows how this feature can be created and used.
import SeismicLab
import GeneralToolsGui
import SeismicLabObjects
from LabRPS import Vector as vec
import LabRPS
import numpy
def compute():
installResuslt = SeismicLab.installPlugin("SeismicLabPlugin")
doc = LabRPS.ActiveDocument
if not doc:
doc = LabRPS.newDocument()
# create SeismicLab simulation called "Simulation"
sim = SeismicLabObjects.makeSimulation(doc, "Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "General Distribution"
featureGroup = "Location Distribution"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
genSimPoints= SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not genSimPoints:
LabRPS.Console.PrintError("Error on creating the uniform points feature.\n")
return None
# create the simulation points by their coordinates
v1 = vec(0, 0, 35000)
v2 = vec(0, 0, 40000)
v3 = vec(0, 0, 140000)
# add the points to the locations
genSimPoints.Locations = [v1, v2, v3]
# compute the simulation points coordinates. SeismicLab will internally use the "genSimPoints" feature
simPoints = sim.computeLocationCoordinateMatrixP3()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(simPoints)
# you can also show the result in a table, pass False as last argument to the function to ask
# LabRPS to only show the data without plotting them
GeneralToolsGui.GeneralToolsPyTool.showArray(sim.getSimulationData().numberOfSpatialPosition, 4, simPoints, False)
compute()
Import Simulation Points from File
When the simulation points are stored in a file, this feature can be used. The feature allows users to import simulation points coordinates from file. Note that, for now only tab separated text file is supported and the file is expected to have number of rows and number of columns which are number of simulation points and four, respectively.
File:SeismicLab Tutorial001 Pic006 SeismicLab Feat Locations 1.png
Properties
- DataFilePath: This is the path to the file.
Scripting
The following script shows how this feature can be created and used.
import SeismicLab
import GeneralToolsGui
import SeismicLabObjects
from LabRPS import Vector as vec
import LabRPS
import numpy
def compute():
installResuslt = SeismicLab.installPlugin("SeismicLabPlugin")
doc = LabRPS.ActiveDocument
if not doc:
doc = LabRPS.newDocument()
# create SeismicLab simulation called "Simulation"
sim = SeismicLabObjects.makeSimulation(doc, "Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Import Simulation Points from File"
featureGroup = "Location Distribution"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
simPoints= SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not simPoints:
LabRPS.Console.PrintError("Error on creating the simulation points feature.\n")
return None
# set the direction of the distribution to be vertical
simPoints.FilePath = "D:/Points.txt"
# compute the simulation points coordinates. SeismicLab will internally use the "simPoints" feature.
importedSimPoints = sim.computeLocationCoordinateMatrixP3()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(importedSimPoints )
# you can also show the result in a table, pass False as last argument to the function to ask
# LabRPS to only show the data without plotting them
GeneralToolsGui.GeneralToolsPyTool.showArray(sim.getSimulationData().numberOfSpatialPosition, 4, importedSimPoints, False)
compute()
Uniform Random Phases
In the simulation of seismic ground motion, one common technique is to represent the seismic ground motion as a sum of multiple sinusoidal components in the frequency domain. Each of these components is associated with a random phase, which determines the position of the sine wave relative to time. By assigning uniform random phases to each frequency component, the resulting time series will have random characteristics, while still adhering to the desired spectral properties, such as a specific power spectral density (PSD) or turbulence spectrum. The feature generate [math]\displaystyle{ n }[/math] sequences [math]\displaystyle{ (\phi_{1l}, \phi_{2l}, \phi_{3l},..., \phi_{nl}; l = 1, 2, 3, ..., N) }[/math] of independent random phase angles uniformly distributed over the interval [math]\displaystyle{ [0, 2\pi] }[/math] by default.
Properties
- DataMinimumValue: The minimum value that can be generated
- DataMaximumValue: The maximum value that can be generated
Scripting
The following script shows how this feature can be created and used.
import SeismicLab
import SeismicLabObjects
from LabRPS import Vector as vec
import numpy
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
# abord the computation
featureType = "Uniform Random Phases"
featureGroup = "Randomness Provider"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
randomness = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not randomness:
LabRPS.Console.PrintError("Error on creating the randomness feature.\n")
# abord the computation
randomness.MinimumValue = 0
randomness.MaximumValue = 6.28
# generate random phase angle
randomnessMatrix = sim.generateRandomMatrixFP()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(randomnessMatrix)
Uniform Random Phases Import
When the simulation numbers are stored in a file, this feature can be used. The feature allows users to import random numbers from file. Note that, for now only tab separated text file is supported and the file is expected to have number of rows and number of columns which are number of frequency increments and number of simulation points, respectively.
Properties
- DataFilePath: This is the path to the file.
Scripting
The following script shows how this feature can be created and used.
import SeismicLab
import SeismicLabObjects
from LabRPS import Vector as vec
import numpy
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
# abord the computation
featureType = "Uniform Random Phases Import"
featureGroup = "Randomness Provider"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
randomness = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not randomness:
LabRPS.Console.PrintError("Error on creating the randomness feature.\n")
# abord the computation
randomness.FilePath = "myfolderpath/myfile.txt"
# generate random phase angle
randomnessMatrix = sim.generateRandomMatrixFP()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(randomnessMatrix)
Single Index Frequency Discretization
This feature allows to discretize continuous frequency according to the following formula:
[math]\displaystyle{ \omega_{l} = l\Delta\omega; \quad l = 1, 2, 3, ..., N }[/math].
where:
- [math]\displaystyle{ \Delta\omega }[/math] is the frequency increment,
- [math]\displaystyle{ N }[/math] is the number of frequency increments,
Scripting
The following script shows how this feature can be created and used.
import SeismicLab
import SeismicLabObjects
from LabRPS import Vector as vec
import numpy
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
# abord the computation
featureType = "Single Index Frequency Discretization"
featureGroup = "Frequency Distribution"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
frequency = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not frequency:
LabRPS.Console.PrintError("Error on creating the frequency feature.\n")
# abord the computation
# compute the freqency distribution
frequencyMatrix = sim.computeFrequenciesMatrixFP()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(frequencyMatrix)
Double Index Frequency Discretization
This feature allows to discretize continuous frequency according to the following formula:
[math]\displaystyle{ \omega_{ml} = (l-1)\Delta\omega + \frac{m}{n}\Delta\omega; \quad m = 1, 2, 3, ..., n; \quad l = 1, 2, 3, ..., N }[/math].
where:
- [math]\displaystyle{ \Delta\omega }[/math] is the frequency increment,
- [math]\displaystyle{ n }[/math] is the number of simulation points,
- [math]\displaystyle{ N }[/math] is the number of frequency increments,
Scripting
The following script shows how this feature can be created and used.
import SeismicLab
import SeismicLabObjects
from LabRPS import Vector as vec
import numpy
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
# abord the computation
featureType = "Double Index Frequency Discretization"
featureGroup = "Frequency Distribution"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
frequency = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not frequency:
LabRPS.Console.PrintError("Error on creating the frequency feature.\n")
# abord the computation
# compute the freqency distribution
frequencyMatrix = sim.computeFrequenciesMatrixFP()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(frequencyMatrix)
Zerva Frequency Discretization
This feature allow to discretize continuous frequency according to the following formula:
[math]\displaystyle{ \omega_{l} = (1+\frac{l}{2})\Delta\omega;\quad l = 1, 2, 3, ..., N }[/math],
where:
- [math]\displaystyle{ \Delta\omega }[/math] is the frequency increment,
- [math]\displaystyle{ N }[/math] is the number of frequency increments,
Scripting
The following script shows how this feature can be created and used.
import SeismicLab
import SeismicLabObjects
from LabRPS import Vector as vec
import numpy
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
# abord the computation
featureType = "Zerva Frequency Discretization"
featureGroup = "Frequency Distribution"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
frequency = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not frequency:
LabRPS.Console.PrintError("Error on creating the frequency feature.\n")
# abord the computation
# compute the freqency distribution
frequencyMatrix = sim.computeFrequenciesMatrixFP()
# now you can convert the coordinate matrix to numpy array and use it for any other purposes
arr = numpy.asarray(frequencyMatrix)
Cholesky Decomposition
This feature performs the Cholesky decomposition of a positive Hermitian power spectrum matrix and returns the lower triangular matrix (L) of the decomposition. The Cholesky decomposition is a numerical method used to decompose a positive-definite matrix into the product of a lower triangular matrix and its conjugate transpose. Specifically, for a matrix A, the decomposition is given by:
[math]\displaystyle{ \mathbf{A} = \mathbf{L L}^{*}, }[/math]
[math]\displaystyle{ L_{j,j} = \sqrt{ A_{j,j} - \sum_{k=1}^{j-1} L_{j,k}^*L_{j,k} }, }[/math]
[math]\displaystyle{ L_{i,j} = \frac{1}{L_{j,j}} \left( A_{i,j} - \sum_{k=1}^{j-1} L_{j,k}^* L_{i,k} \right) \quad \text{for } i\gt j. }[/math]
where [math]\displaystyle{ L }[/math] is a lower triangular matrix with real and positive diagonal entries, and [math]\displaystyle{ L^* }[/math] denotes the conjugate transpose of [math]\displaystyle{ L }[/math].
The feature is optimized for performance and can handle large matrices efficiently using [math]\displaystyle{ O(n^3) }[/math] computational complexity in the worst case. It checks if the input matrix is indeed positive-definite and Hermitian before performing the decomposition and raises an error if the matrix does not meet these conditions. The feature belong to the PSD Decomposition Method feature group.
Feature Dependency
The features required by this feature are summarized as follows:
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import GeneralToolsGui
import SeismicLabObjects
from LabRPS import Vector as vec
import LabRPS
import numpy
def compute():
installResuslt = SeismicLab.installPlugin("SeismicLabPlugin")
doc = LabRPS.ActiveDocument
if not doc:
doc = LabRPS.newDocument()
# create SeismicLab simulation called "Simulation"
sim = SeismicLabObjects.makeSimulation(doc, "Simulation")
# check if the simulation sucessfully created
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Cholesky Decomposition"
featureGroup = "Spectrum Decomposition Method"
# create the feature
decomposedPSD = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not decomposedPSD :
LabRPS.Console.PrintError("Error on creating the spectrum decomposition method.\n")
return None
# get the active simulation points feature and compute the simulation points coordinates
simPoints = sim.computeLocationCoordinateMatrixP3()
if not simPoints :
LabRPS.Console.PrintError("Make sure you have an active location disttribution in the simulation with at least 3 simulation points.\n")
return None
# use a vector to represent a simulation point based on its coordinates
v1 = vec(simPoints[0][1], simPoints[0][2], simPoints[0][3])
v2 = vec(simPoints[1][1], simPoints[1][2], simPoints[1][3])
v3 = vec(simPoints[2][1], simPoints[2][2], simPoints[2][3])
# This feature is used to decompose power spectrum matrices which may vary in time. Let's assume that
# the active power spectrun density function in this example is stationary. Meanning it is not varying in time.
#Then, we use time instant of 0 second.
time = 0.0
# compute the decomposed cross spectrum between points 1 and 3, at time instant of 0 second and for all frequency
# increments. Note that when the following code is run, SeismicLab will try to identify the active frequency distribution,
# the active power spectrum feature, the active coherence function feature and others. If SeismicLab fails to find any
# of these dependency features, the computation will fails and specific error messages will be sent to the report view.
psd13 = sim.computeDecomposedCrossSpectrumVectorF(v1, v3, time)
# psd13 can be converted to numpy vector and be used for some other purposes.
arr = numpy.asarray(psd13)
compute()
Abrahamson Coherence Function
This feature belongs to the coherence group. The Abrahamson coherence function has the advantage that it can be used for a broad range of soil conditions.
[math]\displaystyle{ \gamma_{jk}(\omega) = \frac{1}{1 + \left[\frac{\omega}{2{\pi}C_8(\xi_{jk})}\right]^6}\times tanh\left \{ \frac{C_3(\xi_{jk})}{1 + \frac{\omega}{2\pi}C_4(\xi_{jk}) + \frac{\omega^2}{4\pi^2}C_7(\xi_{jk})} + \left [ 4.80 - C_3(\xi_{jk})\right ]exp\left [ C_6(\xi_{jk})\frac{\omega}{2\pi} \right ] + 0.35 \right \} ;\quad j,k = 1, 2, 3, ..., n;\quad {j} \neq {k} }[/math]
where:
- [math]\displaystyle{ C_3 = \frac{3.95}{(1+0.0077\xi_{jk}+0.000023\xi^2_{jk})} + 0.85exp\left(-0.00013\xi_{jk}\right ) }[/math]
- [math]\displaystyle{ C_4 = \frac{0.4\left [1- \frac{1}{1+\left ( \frac{\xi_{jk}}{5} \right )^3} \right ]}{\left [ 1+\left ( \frac{\xi_{jk}}{190} \right )^8 \right ]\left [ 1+\left ( \frac{\xi_{jk}}{180} \right )^3 \right ]} }[/math]
- [math]\displaystyle{ C_6 = 3\left [ exp\left ( -\frac{\xi_{jk}}{20} \right ) - 1\right]-0.0018\xi_{jk} }[/math]
- [math]\displaystyle{ C_7 = -0.598 + 0.106ln\left ( \xi_{jk} +325 \right ) - 0.0151exp\left ( -0.6 \xi_{jk} \right ) }[/math]
- [math]\displaystyle{ C_8 = exp\left [ 8.54 - 1.07ln\left ( \xi_{jk} +200 \right ) \right ] + 100exp\left ( -\xi_{jk} \right ) }[/math]
- [math]\displaystyle{ \gamma_{jk}(\omega) }[/math] is the coherence value between two points [math]\displaystyle{ P_{j}\left( x_{j},y_{j},z_{j} \right) }[/math] and [math]\displaystyle{ P_{k}\left( x_{k},y_{k},z_{k} \right) }[/math] at frequency [math]\displaystyle{ \omega }[/math],
- [math]\displaystyle{ \xi_{jk} }[/math] is the distance between two points [math]\displaystyle{ P_{j}\left( x_{j},y_{j},z_{j} \right) }[/math] and [math]\displaystyle{ P_{k}\left( x_{k},y_{k},z_{k} \right) }[/math],
- [math]\displaystyle{ \omega }[/math] is the frequency for which the coherence function is computed.
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
- A frequency discretization feature
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points and frequency distribution
def compute():
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Abrahamson Coherence Function"
featureGroup = "Coherence Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
coherence = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not coherence:
LabRPS.Console.PrintError("Error on creating the coherence function feature.\n")
return None
# For this example we shall compute the cross coherence matrix at time instant of 0 second and for the frequency value of 0.25 rad/s.
time = 0.0
frequency = 0.25
# compute the coherence matrix at time instant of 0 second and frequency of 0.25 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution, the active frequency discretization
# it will also try to identity the active modulation function in case the parent simulation is non-stationary.
# If SeismicLab fails to find these dependency features, the computation will fails and specific error messages will be sent to the report view.
coherences = sim.computeCrossCoherenceMatrixPP(frequency, time)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArrayAsMatrix(len(coherences), len(coherences[0]), coherences)
LabRPS.ActiveDocument.recompute()
compute()
Harichandran Vanmarcke Coherence Function
This feature belongs to the coherence group. The following empirical coherence function was proposed by Harichandran and Vanmarcke:
[math]\displaystyle{ \gamma_{jk}(\omega) = Aexp\left [ -\frac{2\xi_{jk}}{\alpha\theta(\omega)}\left ( 1 - A + \alpha A \right ) \right ] + (1 - A)exp\left [ -\frac{2\xi_{jk}}{\theta(\omega)}\left ( 1 - A + \alpha A \right ) \right ] }[/math]
where:
- [math]\displaystyle{ \theta(\omega) = k\left [ 1+ \left ( \frac{\omega}{\omega_0} \right )^b \right ]^{-\frac{1}{2}} }[/math]
- [math]\displaystyle{ \gamma_{jk}(\omega) }[/math] is the coherence value between two points [math]\displaystyle{ P_{j}\left( x_{j},y_{j},z_{j} \right) }[/math] and [math]\displaystyle{ P_{k}\left( x_{k},y_{k},z_{k} \right) }[/math] at frequency [math]\displaystyle{ \omega }[/math],
- [math]\displaystyle{ \xi_{jk} }[/math] is the distance between two points [math]\displaystyle{ P_{j}\left( x_{j},y_{j},z_{j} \right) }[/math] and [math]\displaystyle{ P_{k}\left( x_{k},y_{k},z_{k} \right) }[/math],
- [math]\displaystyle{ \omega }[/math] is the frequency for which the coherence function is computed.
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
- A frequency discretization feature
Properties
- DataParameterA: The parameter A.
- DataParameterAlpha: The parameter Alpha.
- DataParameterK: The parameter K.
- DataParameterOmegaZero: The parameter omega zero.
- DataParameterB: The parameter b.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points and frequency distribution
def compute():
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Harichandran-Vanmarcke Coherence Function"
featureGroup = "Coherence Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
coherence = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not coherence:
LabRPS.Console.PrintError("Error on creating the coherence function feature.\n")
return None
sim.setActiveFeature(coherence)
# For this example we shall compute the cross coherence matrix at time instant of 0 second and for the frequency value of 0.25 rad/s.
time = 0.0
frequency = 0.25
# compute the coherence matrix at time instant of 0 second and frequency of 0.25 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution, the active frequency discretization
# it will also try to identity the active modulation function in case the parent simulation is non-stationary.
# If SeismicLab fails to find these dependency features, the computation will fails and specific error messages will be sent to the report view.
coherences = sim.computeCrossCoherenceMatrixPP(frequency, time)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArrayAsMatrix(len(coherences), len(coherences[0]), coherences)
LabRPS.ActiveDocument.recompute()
compute()
Loh and Lin Coherence Function
This feature belongs to the coherence group. The following empirical coherence function was proposed by Harichandran and Vanmarcke:
[math]\displaystyle{ \gamma_{jk}(\omega) = exp\left [ -\left ( \alpha + B\omega^2 \right )\xi_{jk} \right ] }[/math]
where:
- [math]\displaystyle{ \gamma_{jk}(\omega) }[/math] is the coherence value between two points [math]\displaystyle{ P_{j}\left( x_{j},y_{j},z_{j} \right) }[/math] and [math]\displaystyle{ P_{k}\left( x_{k},y_{k},z_{k} \right) }[/math] at frequency [math]\displaystyle{ \omega }[/math],
- [math]\displaystyle{ \xi_{jk} }[/math] is the distance between two points [math]\displaystyle{ P_{j}\left( x_{j},y_{j},z_{j} \right) }[/math] and [math]\displaystyle{ P_{k}\left( x_{k},y_{k},z_{k} \right) }[/math],
- [math]\displaystyle{ \omega }[/math] is the frequency for which the coherence function is computed.
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
- A frequency discretization feature
Properties
- DataParameterAlpha: The natural frequency of the ground.
- DataParameterB: The damping ratio of the ground.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points and frequency distribution
def compute():
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Loh and Lin Coherence Function"
featureGroup = "Coherence Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
coherence = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not coherence:
LabRPS.Console.PrintError("Error on creating the coherence function feature.\n")
return None
sim.setActiveFeature(coherence)
# For this example we shall compute the cross coherence matrix at time instant of 0 second and for the frequency value of 0.25 rad/s.
time = 0.0
frequency = 0.25
# compute the coherence matrix at time instant of 0 second and frequency of 0.25 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution, the active frequency discretization
# it will also try to identity the active modulation function in case the parent simulation is non-stationary.
# If SeismicLab fails to find these dependency features, the computation will fails and specific error messages will be sent to the report view.
coherences = sim.computeCrossCoherenceMatrixPP(frequency, time)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArrayAsMatrix(len(coherences), len(coherences[0]), coherences)
LabRPS.ActiveDocument.recompute()
compute()
Tajimi Kanai Spectrum
This feature belongs to the spectrum group. The Tajimi-Kanai Spectrum model assumes that the movement process of rock caused by earthquake is an ideal white noise process with zero mean value, and the overburden layer is simplified as a linear single degree of freedom system (a second-order linear lowpass filter).
[math]\displaystyle{ S(\omega) = \frac{\omega^4_g + \left ( 2\beta_g\omega_g\omega \right )^2}{\left ( \omega^2_g - \omega^2 \right )^2 + \left ( 2\beta_g\omega_g\omega \right )^2}S_0 }[/math]
where:
- [math]\displaystyle{ S(\omega) }[/math] is power spectral density at frequency [math]\displaystyle{ \omega }[/math].
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
- A frequency discretization feature
- A coherence function feature may also be needed
Properties
- DataGroundNaturalFrequency: The natural frequency of the ground.
- DataGroundDampingRatio: The damping ratio of the ground.
- DataConstantSpectralIntensity: The shaking intensity of the ground.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points and frequency distribution
def compute():
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Tajimi-Kanai Spectrum"
featureGroup = "Spectrum"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
spectrum = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not spectrum:
LabRPS.Console.PrintError("Error on creating the spectrum function feature.\n")
return None
spectrum.GroundNaturalFrequency = '2.48 1/s'
spectrum.GroundDampingRatio = 0.55
sim.setActiveFeature(spectrum)
# For this example we shall compute the cross spectrum matrix at time instant of 0 second and for the frequency value of 0.25 rad/s.
time = 0.0
frequency = 2.1539658744
# compute the spectrum matrix at time instant of 0 second and frequency of 2.4828171151 hz
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution, the active frequency discretization,
# the active coherence function. It will also try to identity the active modulation function in case the parent simulation is non-stationary.
# If SeismicLab fails to find these dependency features, the computation will fails and specific error messages will be sent to the report view.
spectrums = sim.computeCrossSpectrumMatrixPP(frequency, time)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArrayAsMatrix(len(spectrums), len(spectrums[0]), spectrums)
LabRPS.ActiveDocument.recompute()
compute()
Clough Penzien Spectrum
This feature belongs to the spectrum group. The model has clear physical significance. That is, it fully considers the filtering effect of site soil layer on rock motion, and the spectral characteristics are more in line with the actual site. Therefore, the Tajimi-Kanai model has become one of the mostwidely used stochastic stationary models of strong ground motion. However, the model also has some obvious defects.Specifically:
- The Tajimi-Kanai model overestimates the low-frequency components of ground motion, which may give unreasonable results when used in the random seismic response analysis of lowfrequency structures.
- The Tajimi-Kanai model has singular points at zero frequency and does not satisfy the continuous quadratic integrability condition. The variance of ground velocity and ground displacement derived from it is infinite.
- The Tajimi-Kanai model assumes that the ground acceleration of rock is the Gaussian white noise. It can't adequately reflect the spectral characteristics of rock motion.
Clough Penzien proposed a method to modify the low frequency energy of the Tajimi-Kanai spectral model as follows:
[math]\displaystyle{ S(\omega) = \frac{\omega^4}{\left ( \omega^2_f - \omega^2 \right )^2 + \left ( 2\beta_f\omega_f\omega \right )^2}\times\frac{\omega^4_g + \left ( 2\beta_g\omega_g\omega \right )^2}{\left ( \omega^2_g - \omega^2 \right )^2 + \left ( 2\beta_g\omega_g\omega \right )^2}S_0 }[/math]
where:
- [math]\displaystyle{ S(\omega) }[/math] is power spectral density at frequency [math]\displaystyle{ \omega }[/math].
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
- A frequency discretization feature
- A coherence function feature may also be needed
Properties
- DataGroundNaturalFrequency: The natural frequency of the ground.
- DataGroundDampingRatio: The damping ratio of the ground.
- DataSecondFilterLayerFrequency: The frequency of the second filter layer.
- DataSecondFilterLayerDampingRatio: The damping ratio of the second filter layer.
- DataConstantSpectralIntensity: The shaking intensity of the ground.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points and frequency distribution
def compute():
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Clough-Penzien Spectrum"
featureGroup = "Spectrum"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
spectrum = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not spectrum:
LabRPS.Console.PrintError("Error on creating the spectrum function feature.\n")
return None
spectrum.GroundNaturalFrequency = '2.4828171151 1/s'
spectrum.GroundDampingRatio = 0.55
spectrum.SecondFilterLayerFrequency = '0.2482817115 1/s'
spectrum.SecondFilterLayerDampingRatio = 0.8
sim.setActiveFeature(spectrum)
# For this example we shall compute the cross spectrum matrix at time instant of 0 second and for the frequency value of 0.25 rad/s.
time = 0.0
frequency = 2.1539658744
# compute the spectrum matrix at time instant of 0 second and frequency of 2.4828171151 hz
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution, the active frequency discretization,
# the active coherence function. It will also try to identity the active modulation function in case the parent simulation is non-stationary.
# If SeismicLab fails to find these dependency features, the computation will fails and specific error messages will be sent to the report view.
spectrums = sim.computeCrossSpectrumMatrixPP(frequency, time)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArrayAsMatrix(len(spectrums), len(spectrums[0]), spectrums)
LabRPS.ActiveDocument.recompute()
compute()
Hu Zhou Spectrum
This feature belongs to the spectrum group. Hu Zhou proposed a method to modify the low frequency energy of the Tajimi-Kanai spectral model as follows:
[math]\displaystyle{ S(\omega) = \frac{\omega^6}{ \omega^6 + \omega^6_c}\times\frac{\omega^4_g + \left ( 2\beta_g\omega_g\omega \right )^2}{\left ( \omega^2_g - \omega^2 \right )^2 + \left ( 2\beta_g\omega_g\omega \right )^2}S_0 }[/math]
where:
- [math]\displaystyle{ S(\omega) }[/math] is power spectral density at frequency [math]\displaystyle{ \omega }[/math].
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
- A frequency discretization feature
- A coherence function feature may also be needed
Properties
- DataGroundNaturalFrequency: The natural frequency of the ground.
- DataGroundDampingRatio: The damping ratio of the ground.
- DataLowFrequencyControlFactor: The low frequency control factor.
- DataConstantSpectralIntensity: The shaking intensity of the ground.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points and frequency distribution
def compute():
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Clough-Penzien Spectrum"
featureGroup = "Spectrum"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
spectrum = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not spectrum:
LabRPS.Console.PrintError("Error on creating the spectrum function feature.\n")
return None
spectrum.GroundNaturalFrequency = '2.4828171151 1/s'
spectrum.GroundDampingRatio = 0.55
spectrum.SecondFilterLayerFrequency = '0.2482817115 1/s'
spectrum.SecondFilterLayerDampingRatio = 0.8
sim.setActiveFeature(spectrum)
# For this example we shall compute the cross spectrum matrix at time instant of 0 second and for the frequency value of 0.25 rad/s.
time = 0.0
frequency = 2.1539658744
# compute the spectrum matrix at time instant of 0 second and frequency of 2.4828171151 hz
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution, the active frequency discretization,
# the active coherence function. It will also try to identity the active modulation function in case the parent simulation is non-stationary.
# If SeismicLab fails to find these dependency features, the computation will fails and specific error messages will be sent to the report view.
spectrums = sim.computeCrossSpectrumMatrixPP(frequency, time)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArrayAsMatrix(len(spectrums), len(spectrums[0]), spectrums)
LabRPS.ActiveDocument.recompute()
compute()
Kougioumtzoglou And Spano Spectrum 2009
This feature belongs to the spectrum group. The model proposed by Kougioumtzoglou And Spano is a non-separable power spectrum expressed as follows:
[math]\displaystyle{ S(\omega,t) = S\left ( \frac{\omega}{5\pi} \right )^2exp\left (-0.15t\right )t^2exp\left [ -\left ( \frac{\omega}{5\pi} \right )^2t \right ] }[/math]
where:
- [math]\displaystyle{ S(\omega,t) }[/math] is power spectral density at frequency [math]\displaystyle{ \omega }[/math] and time [math]\displaystyle{ t }[/math].
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
- A frequency discretization feature
- A coherence function feature may also be needed
Properties
- DataConstantS: The constant S.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points and frequency distribution
def compute():
# get an existing SeismicLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Kougioumtzoglou And Spano Spectrum 2009"
featureGroup = "Spectrum"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
spectrum = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not spectrum:
LabRPS.Console.PrintError("Error on creating the spectrum function feature.\n")
return None
sim.Stationarity = False
sim.setActiveFeature(spectrum)
# For this example we shall compute the cross spectrum matrix at time instant of 0.25 second and for the frequency value of 0.25 rad/s.
time = 0.25
frequency = 0.25
# compute the spectrum matrix at time instant of 0 second and frequency of 0.25 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution, the active frequency discretization,
# the active coherence function. It will also try to identity the active modulation function in case the parent simulation is non-stationary.
# If SeismicLab fails to find these dependency features, the computation will fails and specific error messages will be sent to the report view.
spectrums = sim.computeCrossSpectrumMatrixPP(frequency, time)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArrayAsMatrix(len(spectrums), len(spectrums[0]), spectrums)
LabRPS.ActiveDocument.recompute()
compute()
Bogdanoff Goldberg Bernard Modulation Function
This feature belongs to the modulation function group. The Bogdanoff Goldberg Bernard modulation function is a uniform (not dependent on frequency [math]\displaystyle{ \omega }[/math]) modulation function expressed as follows:
[math]\displaystyle{ A(\omega,t) = c_1t\mbox{exp}\left ( -c_2t \right ) }[/math]
where:
- [math]\displaystyle{ A(\omega,t) }[/math] is the modulation function at frequency [math]\displaystyle{ \omega }[/math] and time [math]\displaystyle{ t }[/math],
- [math]\displaystyle{ c_1 }[/math] and [math]\displaystyle{ c_2 }[/math] are coefficients.
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
Properties
- DataCoefficientOne: The coefficient 1.
- DataCoefficientTwo: The coefficient 2..
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
from LabRPS import Vector as vec
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points
def compute():
# get an existing SeismicLab simulation called "Simulation".
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Bogdanoff Goldberg Bernard Modulation Function"
featureGroup = "Modulation Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
modulation = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not modulation:
LabRPS.Console.PrintError("Error on creating the modulation function feature.\n")
return None
sim.setActiveFeature(modulation)
# For this example we shall compute the modulation for the frequency value of 0.0 rad/s.
frequency = 0.00
# compute the simulation points coordinates
simPoints = sim.computeLocationCoordinateMatrixP3()
if not simPoints :
LabRPS.Console.PrintError("Make sure you have an active location disttribution in the simulation with at least 3 simulation points.\n")
return None
# let pick the first simulation point
v1 = vec(simPoints[0][1], simPoints[0][2], simPoints[0][3])
# compute the modulation function for frequency of 0.00 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution,
# If SeismicLab fails to find this dependency feature, the computation will fails and specific error messages will be sent to the report view.
modulations = sim.computeModulationVectorT(v1, frequency)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArray(len(modulations), len(modulations[0]), modulations, False)
LabRPS.ActiveDocument.recompute()
compute()
Box Car Modulation Function
This feature belongs to the modulation function group. The Box Car modulation function is a kind of constant uniform (not dependent on frequency [math]\displaystyle{ \omega }[/math]) modulation function expressed as follows:
[math]\displaystyle{ A(\omega,t) = \begin{cases} A_0, & \mbox{for } 0 \le t \le T_0 \\ 0, & \mbox{for } t \gt T_0 \end{cases} }[/math]
where:
- [math]\displaystyle{ A(\omega,t) }[/math] is the modulation function at frequency [math]\displaystyle{ \omega }[/math] and time [math]\displaystyle{ t }[/math],
- [math]\displaystyle{ A_0 }[/math] is a constant.
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
Properties
- DataScalingFactor: This is the scaling factor.
- DataStrongMotionDuration: This is the strong motion duration of the earthquake excitation.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
from LabRPS import Vector as vec
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points
def compute():
# get an existing SeismicLab simulation called "Simulation".
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Box Car Modulation Function"
featureGroup = "Modulation Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
modulation = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not modulation:
LabRPS.Console.PrintError("Error on creating the modulation function feature.\n")
return None
sim.setActiveFeature(modulation)
# For this example we shall compute the modulation for the frequency value of 0.0 rad/s.
frequency = 0.00
# compute the simulation points coordinates
simPoints = sim.computeLocationCoordinateMatrixP3()
if not simPoints :
LabRPS.Console.PrintError("Make sure you have an active location disttribution in the simulation with at least 3 simulation points.\n")
return None
# let pick the first simulation point
v1 = vec(simPoints[0][1], simPoints[0][2], simPoints[0][3])
# compute the modulation function for frequency of 0.00 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution,
# If SeismicLab fails to find this dependency feature, the computation will fails and specific error messages will be sent to the report view.
modulations = sim.computeModulationVectorT(v1, frequency)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArray(len(modulations), len(modulations[0]), modulations, False)
LabRPS.ActiveDocument.recompute()
compute()
Constant Modulation Function
This feature belongs to the modulation function group. The Box Car modulation function is a kind of constant uniform (not dependent on frequency [math]\displaystyle{ \omega }[/math]) modulation function expressed as follows:
[math]\displaystyle{ A(\omega,t) = A_0 }[/math]
where:
- [math]\displaystyle{ A(\omega,t) }[/math] is the modulation function at frequency [math]\displaystyle{ \omega }[/math] and time [math]\displaystyle{ t }[/math],
- [math]\displaystyle{ A_0 }[/math] is a constant.
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
Properties
- DataConstantModulationValue: The constant modulation value.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
from LabRPS import Vector as vec
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points
def compute():
# get an existing SeismicLab simulation called "Simulation".
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Constant Modulation Function"
featureGroup = "Modulation Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
modulation = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not modulation:
LabRPS.Console.PrintError("Error on creating the modulation function feature.\n")
return None
sim.setActiveFeature(modulation)
# For this example we shall compute the modulation for the frequency value of 0.0 rad/s.
frequency = 0.00
# compute the simulation points coordinates
simPoints = sim.computeLocationCoordinateMatrixP3()
if not simPoints :
LabRPS.Console.PrintError("Make sure you have an active location disttribution in the simulation with at least 3 simulation points.\n")
return None
# let pick the first simulation point
v1 = vec(simPoints[0][1], simPoints[0][2], simPoints[0][3])
# compute the modulation function for frequency of 0.00 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution,
# If SeismicLab fails to find this dependency feature, the computation will fails and specific error messages will be sent to the report view.
modulations = sim.computeModulationVectorT(v1, frequency)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArray(len(modulations), len(modulations[0]), modulations, False)
LabRPS.ActiveDocument.recompute()
compute()
Exponential Modulation Function
This feature belongs to the modulation function group. The Box Car modulation function is a kind of constant uniform (not dependent on frequency [math]\displaystyle{ \omega }[/math]) modulation function expressed as follows:
[math]\displaystyle{ A(\omega,t) = A_0\left ( e^{-\alpha t} - e^{-\beta t} \right ) }[/math]
where:
- [math]\displaystyle{ A(\omega,t) }[/math] is the modulation function at frequency [math]\displaystyle{ \omega }[/math] and time [math]\displaystyle{ t }[/math],
- [math]\displaystyle{ A_0 }[/math] and [math]\displaystyle{ \alpha }[/math] and [math]\displaystyle{ \beta }[/math] are constants.
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
Properties
- DataAlpha: The parameter alpha.
- DataBeta: The parameter beta.
- DataCoefficientA: The internal coefficient A.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
from LabRPS import Vector as vec
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points
def compute():
# get an existing SeismicLab simulation called "Simulation".
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Exponential Modulation Function"
featureGroup = "Modulation Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
modulation = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not modulation:
LabRPS.Console.PrintError("Error on creating the modulation function feature.\n")
return None
sim.setActiveFeature(modulation)
# For this example we shall compute the modulation for the frequency value of 0.0 rad/s.
frequency = 0.00
# compute the simulation points coordinates
simPoints = sim.computeLocationCoordinateMatrixP3()
if not simPoints :
LabRPS.Console.PrintError("Make sure you have an active location disttribution in the simulation with at least 3 simulation points.\n")
return None
# let pick the first simulation point
v1 = vec(simPoints[0][1], simPoints[0][2], simPoints[0][3])
# compute the modulation function for frequency of 0.00 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution,
# If SeismicLab fails to find this dependency feature, the computation will fails and specific error messages will be sent to the report view.
modulations = sim.computeModulationVectorT(v1, frequency)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArray(len(modulations), len(modulations[0]), modulations, False)
LabRPS.ActiveDocument.recompute()
compute()
Jennings Modulation Function
This feature belongs to the modulation function group. The Jennings modulation function is a piecewise uniform (not dependent on frequency [math]\displaystyle{ \omega }[/math]) modulation function expressed as follows:
[math]\displaystyle{ A(\omega,t) = \begin{cases} \left ( \frac{t}{t_1} \right )^p, & \mbox{for } 0 \le t \le t_1 \\ \\ 1, & \mbox{for } t_1 \lt t \le t_2 \\ \\ \mbox{exp}\left [ -\alpha\left ( t-t_2 \right ) \right ] & \mbox{for } t \gt t_2 \end{cases} }[/math]
where:
- [math]\displaystyle{ A(\omega,t) }[/math] is the modulation function at frequency [math]\displaystyle{ \omega }[/math] and time [math]\displaystyle{ t }[/math],
- [math]\displaystyle{ p }[/math] and [math]\displaystyle{ \alpha }[/math] are constants.
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
Properties
- DataRiseTime: The instant of time (in sec) corresponding to the beginning of the horizontal part of the envelope..
- DataLevelTime: The instant of time corresponding to the beginning of the descending branch of the envelope. The Level Time should be larger than the Rise Time.
- DataAlpha: The parameter alpha.
- DataPower: The power coefficient.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
from LabRPS import Vector as vec
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points
def compute():
# get an existing SeismicLab simulation called "Simulation".
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Jennings Modulation Function"
featureGroup = "Modulation Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
modulation = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not modulation:
LabRPS.Console.PrintError("Error on creating the modulation function feature.\n")
return None
sim.setActiveFeature(modulation)
# For this example we shall compute the modulation for the frequency value of 0.0 rad/s.
frequency = 0.00
# compute the simulation points coordinates
simPoints = sim.computeLocationCoordinateMatrixP3()
if not simPoints :
LabRPS.Console.PrintError("Make sure you have an active location disttribution in the simulation with at least 3 simulation points.\n")
return None
# let pick the first simulation point
v1 = vec(simPoints[0][1], simPoints[0][2], simPoints[0][3])
# compute the modulation function for frequency of 0.00 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution,
# If SeismicLab fails to find this dependency feature, the computation will fails and specific error messages will be sent to the report view.
modulations = sim.computeModulationVectorT(v1, frequency)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArray(len(modulations), len(modulations[0]), modulations, False)
LabRPS.ActiveDocument.recompute()
compute()
Saragoni and Hart Modulation Function
This feature belongs to the modulation function group. The Saragoni and Hartmodulation function is a uniform (not dependent on frequency [math]\displaystyle{ \omega }[/math]) modulation function expressed as follows:
[math]\displaystyle{ A(\omega,t) = \alpha_1t^{\alpha_2-1}\mbox{e}^{-\alpha_3t} }[/math]
where:
- [math]\displaystyle{ A(\omega,t) }[/math] is the modulation function at frequency [math]\displaystyle{ \omega }[/math] and time [math]\displaystyle{ t }[/math],
- [math]\displaystyle{ \alpha_1 }[/math], [math]\displaystyle{ \alpha_2 }[/math] and [math]\displaystyle{ \alpha_3 }[/math] are constants.
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
Properties
- DataAlphaOne: The parameter 1.
- DataAlphaTwo: The parameter 2.
- DataAlphaThree: The parameter 3.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
from LabRPS import Vector as vec
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points
def compute():
# get an existing SeismicLab simulation called "Simulation".
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Saragoni and Hart Modulation Function"
featureGroup = "Modulation Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
modulation = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not modulation:
LabRPS.Console.PrintError("Error on creating the modulation function feature.\n")
return None
sim.setActiveFeature(modulation)
# For this example we shall compute the modulation for the frequency value of 0.0 rad/s.
frequency = 0.00
# compute the simulation points coordinates
simPoints = sim.computeLocationCoordinateMatrixP3()
if not simPoints :
LabRPS.Console.PrintError("Make sure you have an active location disttribution in the simulation with at least 3 simulation points.\n")
return None
# let pick the first simulation point
v1 = vec(simPoints[0][1], simPoints[0][2], simPoints[0][3])
# compute the modulation function for frequency of 0.00 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution,
# If SeismicLab fails to find this dependency feature, the computation will fails and specific error messages will be sent to the report view.
modulations = sim.computeModulationVectorT(v1, frequency)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArray(len(modulations), len(modulations[0]), modulations, False)
LabRPS.ActiveDocument.recompute()
compute()
Trapezoidal Modulation Function
This feature belongs to the modulation function group. The Trapezoidal modulation function is a uniform (not dependent on frequency [math]\displaystyle{ \omega }[/math]) modulation function expressed as follows:
[math]\displaystyle{ A(\omega,t) = \begin{cases} \frac{t}{t_1}, & \mbox{for } 0 \le t \le t_1 \\ \\ 1, & \mbox{for } t_1 \lt t \le t_2 \\ \\ \frac{t-t_3}{t_2 - t_3} & \mbox{for } t_2 \lt t \le t_3 \\ \\ 0 & \mbox{for } t \gt t_3 \end{cases} }[/math]
where:
- [math]\displaystyle{ A(\omega,t) }[/math] is the modulation function at frequency [math]\displaystyle{ \omega }[/math] and time [math]\displaystyle{ t }[/math],
Feature Dependency
The features required by this feature are summarized as follows:
- A simulation points feature
Properties
- DataRiseTime: This is the instant of time (in sec) corresponding to the beginning of the horizontal part of the envelope.
- DataLevelTime: This is the instant of time corresponding to the beginning of the descending branch of the envelope. The Level Time should be larger than the Rise Time.
- DataMaxTime: The Duration.
Scripting
The feature can be used from the python console as follows:
import SeismicLab
import SeismicLabObjects
import GeneralToolsGui
import LabRPS
from LabRPS import Vector as vec
# Before you run this code, you should first have created a document with a SeismicLab simulation with
# active simulation points
def compute():
# get an existing SeismicLab simulation called "Simulation".
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation does really exist
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Trapezoidal Modulation Function"
featureGroup = "Modulation Function"
# create the feature and add it to the existing simulation (you may refer to the SeismicLab Workbench page in
# case you don't understand the next line)
modulation = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not modulation:
LabRPS.Console.PrintError("Error on creating the modulation function feature.\n")
return None
sim.setActiveFeature(modulation)
# For this example we shall compute the modulation for the frequency value of 0.0 rad/s.
frequency = 0.00
# compute the simulation points coordinates
simPoints = sim.computeLocationCoordinateMatrixP3()
if not simPoints :
LabRPS.Console.PrintError("Make sure you have an active location disttribution in the simulation with at least 3 simulation points.\n")
return None
# let pick the first simulation point
v1 = vec(simPoints[0][1], simPoints[0][2], simPoints[0][3])
# compute the modulation function for frequency of 0.00 rad/s
# Note that when the following code is run, SeismicLab will try to identify the active locations distribution,
# If SeismicLab fails to find this dependency feature, the computation will fails and specific error messages will be sent to the report view.
modulations = sim.computeModulationVectorT(v1, frequency)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArray(len(modulations), len(modulations[0]), modulations, False)
LabRPS.ActiveDocument.recompute()
compute()
Exponential Wave Passage Effect
The wave passage effect is a measure of the wave passage delay due to the apparent velocity of waves, which is one of spatially varying properties of multivariate random processes. The exponential Wave Passage effect is expressed as follows:
[math]\displaystyle{ \gamma_{jk}(\omega) = \mbox{exp}\left ( -i\frac{\omega \times \xi_{jk}}{v_{app}} \right ) }[/math]
where:
- [math]\displaystyle{ \gamma_{jk}(\omega) }[/math] is the wave passage effect between two points [math]\displaystyle{ P_{j}\left( x_{j},y_{j},z_{j} \right) }[/math] and [math]\displaystyle{ P_{k}\left( x_{k},y_{k},z_{k} \right) }[/math] at frequency [math]\displaystyle{ \omega }[/math],
- [math]\displaystyle{ \xi_{jk} }[/math] is the distance between two points [math]\displaystyle{ P_{j}\left( x_{j},y_{j},z_{j} \right) }[/math] and [math]\displaystyle{ P_{k}\left( x_{k},y_{k},z_{k} \right) }[/math],
- [math]\displaystyle{ \omega }[/math] is the frequency for which the coherence function is computed.
Feature Dependency
The features required by this feature are summarized as follows:
Properties
- DataApparentWaveVelocity: The apparent wave velocity.
- DataCoefficient: The appropriate coefficient that can obtained from experiments.
Scripting
The following script shows how this feature can be created and used.
import SeismicLab
import GeneralToolsGui
import SeismicLabObjects
from LabRPS import Vector as vec
import LabRPS
import numpy
def compute():
installResuslt = SeismicLab.installPlugin("SeismicLabPlugin")
# get an existing SeaLab simulation called "Simulation"
sim = SeismicLab.getSimulation("Simulation")
# check if the simulation sucessfully created
if not sim:
LabRPS.Console.PrintError("The simulation does not exist.\n")
return None
featureType = "Exponential Wave Passage Effect"
featureGroup = "Wave Passage Effect"
# create the feature
decomposedPSD = SeismicLabObjects.makeFeature("MyNewFeature", sim.Name, featureType, featureGroup)
# check if the created feature is good
if not decomposedPSD :
LabRPS.Console.PrintError("Error on creating the the feature.\n")
return None
# set simulation parameters
sim.NumberOfFrequency = 2048
sim.MaxFrequency = "0.64 Hz" # 4 rad/s;
sim.FrequencyIncrement = "0.00031 Hz" # 0.00195 rad/s;
# get the active simulation points feature and compute the simulation points coordinates
simPoints = sim.computeLocationCoordinateMatrixP3()
if not simPoints :
LabRPS.Console.PrintError("Make sure you have an active location disttribution in the simulation with at least 3 simulation points.\n")
return None
# use a vector to represent a simulation point based on its coordinates
v1 = vec(simPoints[0][1], simPoints[0][2], simPoints[0][3])
v2 = vec(simPoints[1][1], simPoints[1][2], simPoints[1][3])
v3 = vec(simPoints[2][1], simPoints[2][2], simPoints[2][3])
# This feature is used to compute the wave passage effect which may vary in time. Let's assume that
# the active wave passage effect in this example is stationary. Meanning it is not varying in time.
#Then, we use time instant of 0 second.
time = 0.0
# compute the wave passage effect between points 1 and 3, at time instant of 0 second and for all frequency
# increments. Note that when the following code is run, SeismicLab will try to identify the active frequency distribution,
# the active wave passage effect feature, and others. If SeismicLab fails to find any of these dependency features,
# the computation will fails and specific error messages will be sent to the report view.
effect13 = sim.computeWavePassageEffectVectorF(v1, v3, time)
# show the results
GeneralToolsGui.GeneralToolsPyTool.showArray(len(effect13), len(effect13[0]), effect13)
LabRPS.ActiveDocument.recompute()
compute()