mspasspy.ccore#

utility#

A submodule for utility namespace of ccore

class mspasspy.ccore.utility.AntelopePf#

Bases: Metadata

ConvertToMetadata(self: mspasspy.ccore.utility.AntelopePf) mspasspy.ccore.utility.Metadata#

Convert to a flat Metadata space (no branches)

arr_keys(self: mspasspy.ccore.utility.AntelopePf) list[str]#

Return a list of all branch (&Arr) keys

get_branch(self: mspasspy.ccore.utility.AntelopePf, arg0: str) mspasspy.ccore.utility.AntelopePf#

Fetch contents of a block of the pf defined by an Arr&

get_tbl(self: mspasspy.ccore.utility.AntelopePf, arg0: str) list[str]#

Fetch contents of a block of the pf file defined by Tbl&

tbl_keys(self: mspasspy.ccore.utility.AntelopePf) list[str]#

Fetch a list of keys for all &Tbl blocks

todict()#

Converts a AntelopePf object to a Python dict. This converts a AntelopePf object to a Python dict by recursively decoding the tbls. :param pf: AntelopePf object to convert. :type md: AntelopePf :return: Python dict equivalent to md. :rtype: dict

class mspasspy.ccore.utility.AtomicType#

Bases: pybind11_object

Members:

TIMESERIES

SEISMOGRAM

UNDEFINED

SEISMOGRAM = <AtomicType.SEISMOGRAM: 0>#
TIMESERIES = <AtomicType.TIMESERIES: 1>#
UNDEFINED = <AtomicType.UNDEFINED: 2>#
property name#
property value#
class mspasspy.ccore.utility.BasicMetadata#

Bases: pybind11_object

Abstract base class for key-value Metadata containers

class mspasspy.ccore.utility.BasicProcessingHistory#

Bases: pybind11_object

Base class - hold job history data

jobid(self: mspasspy.ccore.utility.BasicProcessingHistory) str#

Return job id string

jobname(self: mspasspy.ccore.utility.BasicProcessingHistory) str#

Return job name string defining main python script driving this processing chain

set_jobid(self: mspasspy.ccore.utility.BasicProcessingHistory, arg0: str) None#

Set a unique id so jobname + id is unique

set_jobname(self: mspasspy.ccore.utility.BasicProcessingHistory, arg0: str) None#

Set the base job name defining the main python script for this run

class mspasspy.ccore.utility.ErrorLogger#

Bases: pybind11_object

Used to post any nonfatal errors without aborting a program of family of parallel programs

clear(self: mspasspy.ccore.utility.ErrorLogger) None#

Reset log container to zero length destroying any current content

get_error_log(self: mspasspy.ccore.utility.ErrorLogger) list[mspasspy.ccore.utility.LogData]#

Return all posted entries

get_job_id(self: mspasspy.ccore.utility.ErrorLogger) int#

Return the job id attached to this logger

log_error(*args, **kwargs)#

Overloaded function.

  1. log_error(self: mspasspy.ccore.utility.ErrorLogger, arg0: object) -> None

log error thrown as MsPASSError

  1. log_error(self: mspasspy.ccore.utility.ErrorLogger, algorithm: str, message: str, severity: mspasspy.ccore.utility.ErrorSeverity) -> int

Log a message at a specified severity level

log_verbose(self: mspasspy.ccore.utility.ErrorLogger, algorithm: str, message: str) int#

Log an informational message - tagged as log message

set_job_id(self: mspasspy.ccore.utility.ErrorLogger, job_id: int) None#

Set the job id attached to future log entries

size(self: mspasspy.ccore.utility.ErrorLogger) int#

Return number of entries in this log

worst_errors(self: mspasspy.ccore.utility.ErrorLogger) list[mspasspy.ccore.utility.LogData]#

Return a list of only the worst errors

class mspasspy.ccore.utility.ErrorSeverity#

Bases: pybind11_object

Members:

Fatal

Invalid

Suspect

Complaint

Debug

Informational

Complaint = <ErrorSeverity.Complaint: 3>#
Debug = <ErrorSeverity.Debug: 4>#
Fatal = <ErrorSeverity.Fatal: 0>#
Informational = <ErrorSeverity.Informational: 5>#
Invalid = <ErrorSeverity.Invalid: 1>#
Suspect = <ErrorSeverity.Suspect: 2>#
property name#
property value#
class mspasspy.ccore.utility.LogData#

Bases: pybind11_object

Many mspass create error and log messages with this structure

property algorithm#

Return the algorithm of the procedure that threw the defined message

property badness#

Return a error level code

property job_id#

Return the job id defined for this log message

property message#

Return the actual posted message

property p_id#

Return the process id of the procedure that threw the defined message

class mspasspy.ccore.utility.MDDefFormat#

Bases: pybind11_object

Members:

PF

YAML

PF = <MDDefFormat.PF: 0>#
YAML = <MDDefFormat.YAML: 1>#
property name#
property value#
class mspasspy.ccore.utility.MDtype#

Bases: pybind11_object

Members:

Real

Real32

Double

Real64

Integer

Int32

Long

Int64

String

Boolean

Double_Array

Invalid

Boolean = <MDtype.Boolean: 9>#
Double = <MDtype.Double: 2>#
Double_Array = <MDtype.Double_Array: 10>#
Int32 = <MDtype.Int32: 5>#
Int64 = <MDtype.Int64: 7>#
Integer = <MDtype.Integer: 4>#
Invalid = <MDtype.Invalid: 11>#
Long = <MDtype.Long: 6>#
Real = <MDtype.Real: 0>#
Real32 = <MDtype.Real32: 1>#
Real64 = <MDtype.Real64: 3>#
String = <MDtype.String: 8>#
property name#
property value#
class mspasspy.ccore.utility.Metadata#

Bases: BasicMetadata

Heterogeneous key-value container used throughout MsPASS ccore objects

class Metadata_keyIterator#

Bases: pybind11_object

append_chain(self: mspasspy.ccore.utility.Metadata, key: str, value: str, separator: str) None#

Create or append to a string attribute that defines a chain

change_key(self: mspasspy.ccore.utility.Metadata, oldkey: str, newkey: str) None#

Change key used to access an attribute

clear_modified(self: mspasspy.ccore.utility.Metadata) None#

Clear container used to mark altered Metadata

erase(self: mspasspy.ccore.utility.Metadata, key: str) None#

Delete contents associated with a single key

get(self: mspasspy.ccore.utility.Metadata, key: str) boost::any#

Return the value indexed by a specified key

get_bool(self: mspasspy.ccore.utility.Metadata, key: str) bool#

Return a (C) boolean defined by a specified key

get_double(self: mspasspy.ccore.utility.Metadata, key: str) float#

Retrieve a real number by a specified key

get_long(self: mspasspy.ccore.utility.Metadata, key: str) int#

Return a long integer by a specified key

get_string(self: mspasspy.ccore.utility.Metadata, key: str) str#

Return a string indexed by a specified key

is_defined(self: mspasspy.ccore.utility.Metadata, key: str) bool#

Test if a key has a defined value

keys(self: mspasspy.ccore.utility.Metadata) set[str]#

Return a list of the keys of all defined attributes

modified(self: mspasspy.ccore.utility.Metadata) set[str]#

Return a list of all attributes that have been changes since construction

put(*args, **kwargs)#

Overloaded function.

  1. put(self: mspasspy.ccore.utility.Metadata, key: bytes, value: object) -> None

Set a metadata value using a bytes key

  1. put(self: mspasspy.ccore.utility.Metadata, key: str, value: float) -> None

Set a double metadata value

  1. put(self: mspasspy.ccore.utility.Metadata, key: str, value: bool) -> None

Set a boolean metadata value

  1. put(self: mspasspy.ccore.utility.Metadata, key: str, value: int) -> None

Set a long integer metadata value

  1. put(self: mspasspy.ccore.utility.Metadata, key: str, value: bytes) -> None

Store a Python bytes object as metadata

  1. put(self: mspasspy.ccore.utility.Metadata, key: str, value: str) -> None

Set a string metadata value

  1. put(self: mspasspy.ccore.utility.Metadata, key: str, value: object) -> None

Store a Python object as metadata, preserving unsupported scalar types as Python objects

put_bool(self: mspasspy.ccore.utility.Metadata, arg0: str, arg1: bool) None#

Interface class for boolean

put_double(self: mspasspy.ccore.utility.Metadata, arg0: str, arg1: float) None#

Interface class for doubles

put_long(self: mspasspy.ccore.utility.Metadata, arg0: str, arg1: int) None#

Interface class for long ints

put_string(self: mspasspy.ccore.utility.Metadata, arg0: str, arg1: str) None#

Interface class for strings

todict()#

Converts a Metadata object to a Python dict.

This is the inverse of dict2Metadata. It converts a Metadata object to a Python dict. Note that Metadata behavies like dict, so this conversion is usually not necessay.

Parameters:

md (Metadata) – Metadata object to convert.

Returns:

Python dict equivalent to md.

Return type:

dict

type(self: mspasspy.ccore.utility.Metadata, key: str) str#

Return a demangled typename for value associated with a key

class mspasspy.ccore.utility.MetadataDefinitions#

Bases: pybind11_object

Load a catalog of valid metadata names with types defined

add(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str, arg1: str, arg2: mspasspy.ccore.utility.MDtype) None#

Append a new attribute to the catalog

add_alias(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str, arg1: str) None#

Add an alias for a particular atrribute key

aliases(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) list[str]#

Return a list of aliases for a particular key

apply_aliases(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: mspasspy.ccore.utility.Metadata, arg1: list[str]) list[str]#

Apply a set of alias names to Metadata or child of Metadata

clear_aliases(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: mspasspy.ccore.utility.Metadata) None#

Clear aliases in a Metadata or child of Metadata

collection(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) str#

Return the table (collection) name for an attribute defined in a master table

concept(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) str#

Return a string with a brief description of the concept this attribute captures

has_alias(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) bool#

Returns true if a specified key as an alterate name - alias

is_alias(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) bool#

Return true if a key is an alias

is_defined(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) bool#

Test if a key is defined

is_normalized(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) bool#

Test to see if an attribute is stored in a master collection (table)

keys(self: mspasspy.ccore.utility.MetadataDefinitions) list[str]#

Return a list of all valid keys

normalize_data(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) tuple[str, str]#

Faster method to return unique_id_key and table name

readonly(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) bool#

Test if an attribute is marked readonly

set_readonly(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) None#

Force an attribute to be marked readonly

set_writeable(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) None#

Force an attribute to be marked as writeable

type(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) mspasspy.ccore.utility.MDtype#

Return a description of the type of this attribute

unique_id_key(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) str#

Return the key for a unique id to fetch an attribute from a master collection (table)

unique_name(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) tuple[str, mspasspy.ccore.utility.MDtype]#

Returns the unique key name associated with an alias

writeable(self: mspasspy.ccore.utility.MetadataDefinitions, arg0: str) bool#

Test if an attribute should be saved

class mspasspy.ccore.utility.Metadata_typedef#

Bases: pybind11_object

property mdt#

Type of any value associated with this key

property tag#

Name key for this metadata

exception mspasspy.ccore.utility.MsPASSError#

Bases: Exception

message#
severity#
class mspasspy.ccore.utility.NodeData#

Bases: pybind11_object

Data structure used in ProcessingHistory to processing tree node data

property algid#

id defining an instance of a particular algorithm (defines what parameter choices were used)

property algorithm#

algorithm that created data linked to this node position

property stage#

Processing stage counter for this node of the processing tree

property status#

ProcessingStatus value at this node

property type#

Type of data this process handled as this input

property uuid#

uuid of data stage associated with this node

class mspasspy.ccore.utility.ProcessingHistory#

Bases: BasicProcessingHistory

Used to save object level processing history.

accumulate(self: mspasspy.ccore.utility.ProcessingHistory, alg: str, algid: str, type: mspasspy.ccore.utility.AtomicType, newinput: mspasspy.ccore.utility.ProcessingHistory) None#

History accumulator for spark reduce operators

add_many_inputs(self: mspasspy.ccore.utility.ProcessingHistory, inputs: list[mspasspy.ccore.utility.ProcessingHistory]) None#

Add multiple inputs after initialization with new_ensemble_process or accumulate

add_one_input(self: mspasspy.ccore.utility.ProcessingHistory, newinput: mspasspy.ccore.utility.ProcessingHistory) None#

A single input datum after initialization with new_ensemble_process or accumulate

clear_history(self: mspasspy.ccore.utility.ProcessingHistory) None#

Clear this history chain - use with caution

created_by(self: mspasspy.ccore.utility.ProcessingHistory) tuple[str, str]#

Return the algorithm name and id that created current node

current_nodedata(self: mspasspy.ccore.utility.ProcessingHistory) mspasspy.ccore.utility.NodeData#

Return all the attributes of current

property elog#
get_nodes(self: mspasspy.ccore.utility.ProcessingHistory) std::multimap<T MSPASS_COMMA U>#

Retrieve the nodes multimap that defines the tree stucture branches

id(self: mspasspy.ccore.utility.ProcessingHistory) str#

Return current uuid

inputs(self: mspasspy.ccore.utility.ProcessingHistory, arg0: str) list[mspasspy.ccore.utility.NodeData]#

Return a list of uuids of all data that were inputs to defined uuid (current or any ancestor)

is_empty(self: mspasspy.ccore.utility.ProcessingHistory) bool#

Return true if the processing chain is empty

is_origin(self: mspasspy.ccore.utility.ProcessingHistory) bool#

Return True if the data are marked as an origin - commonly an intermediate save

is_raw(self: mspasspy.ccore.utility.ProcessingHistory) bool#

Return True if the data are raw data with no previous processing

is_saved(self: mspasspy.ccore.utility.ProcessingHistory) bool#

Return True if the data are saved and history can be cleared

is_volatile(self: mspasspy.ccore.utility.ProcessingHistory) bool#

Return True if the data are unsaved, partially processed data

map_as_saved(self: mspasspy.ccore.utility.ProcessingHistory, arg0: str, arg1: str, arg2: mspasspy.ccore.utility.AtomicType) str#

Load data defining this as the end of chain that was or will soon be saved

new_ensemble_process(self: mspasspy.ccore.utility.ProcessingHistory, alg: str, algid: str, type: mspasspy.ccore.utility.AtomicType, parents: list[mspasspy.ccore.utility.ProcessingHistory], create_newid: bool = True) str#

Set up history chain to define the current data as result of reduction - output form multiple inputs

new_map(*args, **kwargs)#

Overloaded function.

  1. new_map(self: mspasspy.ccore.utility.ProcessingHistory, alg: str, algid: str, type: mspasspy.ccore.utility.AtomicType, newstatus: mspasspy.ccore.utility.ProcessingStatus = <ProcessingStatus.VOLATILE: 2>) -> str

Set history chain to define the current data as a one-to-one map from parent

  1. new_map(self: mspasspy.ccore.utility.ProcessingHistory, alg: str, algid: str, type: mspasspy.ccore.utility.AtomicType, data_to_clone: mspasspy.ccore.utility.ProcessingHistory, newstatus: mspasspy.ccore.utility.ProcessingStatus = <ProcessingStatus.VOLATILE: 2>) -> str

Set history chain to define the current data as a one-to-one map from parent

newid(self: mspasspy.ccore.utility.ProcessingHistory) str#

Create a new uuid for current data

number_inputs(*args, **kwargs)#

Overloaded function.

  1. number_inputs(self: mspasspy.ccore.utility.ProcessingHistory, arg0: str) -> int

Return the number of inputs used to generate a specified uuid of the process chain

  1. number_inputs(self: mspasspy.ccore.utility.ProcessingHistory) -> int

Return the number of inputs used to create the current data

number_of_stages(self: mspasspy.ccore.utility.ProcessingHistory) int#

Return count of the number of processing steps applied so far

set_as_origin(self: mspasspy.ccore.utility.ProcessingHistory, alg: str, algid: str, uuid: str, type: mspasspy.ccore.utility.AtomicType, define_as_raw: bool = False) None#

Load data defining this as the top of a processing history chain

set_as_raw(self: mspasspy.ccore.utility.ProcessingHistory, arg0: str, arg1: str, arg2: str, arg3: mspasspy.ccore.utility.AtomicType) None#

Load data defining this as the raw input of a processing history chain

set_id(self: mspasspy.ccore.utility.ProcessingHistory, arg0: str) None#

Set current uuid to valued passed

stage(self: mspasspy.ccore.utility.ProcessingHistory) int#

Return the current stage number (counter of processing stages applied in this run)

class mspasspy.ccore.utility.ProcessingStatus#

Bases: pybind11_object

Members:

RAW

ORIGIN

VOLATILE

SAVED

UNDEFINED

ORIGIN = <ProcessingStatus.ORIGIN: 1>#
RAW = <ProcessingStatus.RAW: 0>#
SAVED = <ProcessingStatus.SAVED: 3>#
UNDEFINED = <ProcessingStatus.UNDEFINED: 4>#
VOLATILE = <ProcessingStatus.VOLATILE: 2>#
property name#
property value#
class mspasspy.ccore.utility.SphericalCoordinate#

Bases: pybind11_object

Enscapsulates concept of spherical coordinates

property phi#

azimuthal angle of spherical coordinates

property radius#

R of spherical coordinates

property theta#

zonal angle of spherical coordinates

property unit_vector#

Return the unit vector equivalent to the spherical-coordinate direction

mspasspy.ccore.utility.algorithm_history(h: mspasspy.ccore.utility.ProcessingHistory) list[tuple[int, str, str]]#

Return a list of algorithms applied to produce current data object

mspasspy.ccore.utility.algorithm_outputs(h: mspasspy.ccore.utility.ProcessingHistory, algorithm: str, algid: str) list[str]#

Return a list of uuids of data created by a specified algorithm

mspasspy.ccore.utility.copy_selected_metadata(mdin: mspasspy.ccore.utility.Metadata, mdout: mspasspy.ccore.utility.Metadata, mdlist: list[mspasspy.ccore.utility.Metadata_typedef]) int#

Copy selected values from one Metadata container to another using a MetadataList schema

class mspasspy.ccore.utility.dmatrix#

Bases: pybind11_object

columns(self: mspasspy.ccore.utility.dmatrix) int#

Columns in the matrix

rows(self: mspasspy.ccore.utility.dmatrix) int#

Rows in the matrix

property shape#

Return the unit vector equivalent to direction defined in sphereical coordinates

property size#

The size of the matrix

transpose(self: mspasspy.ccore.utility.dmatrix) mspasspy.ccore.utility.dmatrix#

Matrix transpose

zero(self: mspasspy.ccore.utility.dmatrix) None#

Initialize a matrix to all zeros

mspasspy.ccore.utility.error_says_data_bad(arg0: mspass::utility::MsPASSError) bool#

Test if what message from MsPASSError defines data as invalid and should be killed

mspasspy.ccore.utility.error_severity(arg0: mspass::utility::MsPASSError) mspasspy.ccore.utility.ErrorSeverity#

Return an ErrorSeverity object defining severity of a MsPASSError being handled

mspasspy.ccore.utility.error_severity_string(arg0: mspass::utility::MsPASSError) str#

Return a string defining error severity of a MsPASSError exception

mspasspy.ccore.utility.get_mdlist(arg0: mspasspy.ccore.utility.AntelopePf, arg1: str) list[mspasspy.ccore.utility.Metadata_typedef]#

retrieve list with keys and types

mspasspy.ccore.utility.pfread(pffile: str) mspasspy.ccore.utility.AntelopePf#

parameter file reader

seismic#

A submodule for seismic namespace of ccore

class mspasspy.ccore.seismic.CoreSeismogramEnsemble#

Bases: Metadata

Gather of vector(3c) time series objects

property member#

Vector of Seismogram objects defining the ensemble

sync_metadata(*args, **kwargs)#

Overloaded function.

  1. sync_metadata(self: mspasspy.ccore.seismic.CoreSeismogramEnsemble) -> None

Copy all ensemble metadata to all members

  1. sync_metadata(self: mspasspy.ccore.seismic.CoreSeismogramEnsemble, keys: list[str]) -> None

Copy selected ensemble metadata keys to all members

update_metadata(self: mspasspy.ccore.seismic.CoreSeismogramEnsemble, arg0: mspasspy.ccore.utility.Metadata) None#

Update the ensemble header (metadata)

class mspasspy.ccore.seismic.CoreTimeSeriesEnsemble#

Bases: Metadata

Gather of scalar time series objects

property member#

Vector of TimeSeries objects defining the ensemble

sync_metadata(*args, **kwargs)#

Overloaded function.

  1. sync_metadata(self: mspasspy.ccore.seismic.CoreTimeSeriesEnsemble) -> None

Copy all ensemble metadata to all members

  1. sync_metadata(self: mspasspy.ccore.seismic.CoreTimeSeriesEnsemble, keys: list[str]) -> None

Copy selected ensemble metadata keys to all members

update_metadata(self: mspasspy.ccore.seismic.CoreTimeSeriesEnsemble, arg0: mspasspy.ccore.utility.Metadata) None#

Update the ensemble header (metadata)

class mspasspy.ccore.seismic.DataGap#

Bases: pybind11_object

Base class for lightweight definition of data gaps

add_gap(self: mspasspy.ccore.seismic.DataGap, arg0: mspass::algorithms::TimeWindow) None#

Define a specified time range as a data gap

clear_gaps(self: mspasspy.ccore.seismic.DataGap) None#

Flush the entire gaps container

get_gaps(self: mspasspy.ccore.seismic.DataGap) list[mspass::algorithms::TimeWindow]#

Return a list of TimeWindows marked as gaps

has_gap(*args, **kwargs)#

Overloaded function.

  1. has_gap(self: mspasspy.ccore.seismic.DataGap) -> bool

Test if datum has any gaps defined

  1. has_gap(self: mspasspy.ccore.seismic.DataGap, arg0: mspass::algorithms::TimeWindow) -> bool

Test if there is a gap inside a specified time range (defined with TimeWindow object)

is_gap(self: mspasspy.ccore.seismic.DataGap, arg0: float) bool#

Return true if arg0 time is inside a data gap

number_gaps(self: mspasspy.ccore.seismic.DataGap) int#

Return number of defined gaps

subset(self: mspasspy.ccore.seismic.DataGap, arg0: mspass::algorithms::TimeWindow) mspasspy.ccore.seismic.DataGap#

Return a subset of content spanning input range

translate_origin(self: mspasspy.ccore.seismic.DataGap, arg0: float) None#

Shift time origin by a specified value

class mspasspy.ccore.seismic.DoubleVector#

Bases: pybind11_object

append(self: mspasspy.ccore.seismic.DoubleVector, x: float) None#

Add an item to the end of the list

clear(self: mspasspy.ccore.seismic.DoubleVector) None#

Clear the contents

count(self: mspasspy.ccore.seismic.DoubleVector, x: float) int#

Return the number of times x appears in the list

extend(*args, **kwargs)#

Overloaded function.

  1. extend(self: mspasspy.ccore.seismic.DoubleVector, L: mspasspy.ccore.seismic.DoubleVector) -> None

Extend the list by appending all the items in the given list

  1. extend(self: mspasspy.ccore.seismic.DoubleVector, L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(self: mspasspy.ccore.seismic.DoubleVector, i: int, x: float) None#

Insert an item at a given position.

pop(*args, **kwargs)#

Overloaded function.

  1. pop(self: mspasspy.ccore.seismic.DoubleVector) -> float

Remove and return the last item

  1. pop(self: mspasspy.ccore.seismic.DoubleVector, i: int) -> float

Remove and return the item at index i

remove(self: mspasspy.ccore.seismic.DoubleVector, x: float) None#

Remove the first item from the list whose value is x. It is an error if there is no such item.

class mspasspy.ccore.seismic.PowerSpectrum#

Bases: _BasicSpectrum, Metadata

Container for power spectrum estimates

Nyquist(self: mspasspy.ccore.seismic.PowerSpectrum) float#

Return Nyquist frequency of this power spectrum estimate

amplitude(self: mspasspy.ccore.seismic.PowerSpectrum) mspasspy.ccore.seismic.DoubleVector#

Return an std::vector of amplitude values (sqrt of power)

property elog#

Handle to ErrorLogger

frequencies(self: mspasspy.ccore.seismic.PowerSpectrum) mspasspy.ccore.seismic.DoubleVector#

Return a vector containing the frequency for each spectrum sample

frequency(self: mspasspy.ccore.seismic.PowerSpectrum, arg0: int) float#

Return frequency linked to given sample number

nf(self: mspasspy.ccore.seismic.PowerSpectrum) int#

Return number of frequencies in this spectral estimate

power(self: mspasspy.ccore.seismic.PowerSpectrum, arg0: float) float#

Return power at a specified frequency using linear interpolation between gridded values

property spectrum#

Vector containing estimated power spectrum; equally spaced ordered in increasing frequency

property spectrum_type#

Descriptive name of method used to generate spectrum

class mspasspy.ccore.seismic.Seismogram#

Bases: _CoreSeismogram, ProcessingHistory

mspass three-component seismogram data object

load_history(self: mspasspy.ccore.seismic.Seismogram, arg0: mspasspy.ccore.utility.ProcessingHistory) None#

Load ProcessingHistory from another data object that contains relevant history

toStream(chanmap=['E', 'N', 'Z'], hang=[90.0, 0.0, 0.0], vang=[90.0, 90.0, 0.0])#

Convert a mspass::Seismogram object to an obspy::Stream with 3 components split apart.

mspass and obspy have completely incompatible approaches to handling three component data. obspy uses a Stream object that is a wrapper around and a list of Trace objects. mspass stores 3C data bundled into a matrix container. This function takes the matrix container apart and produces the three Trace objects obspy want to define 3C data. The caller is responsible for how they handle bundling the output.

A very dark side of this function is any error log entries in the part mspass Seismogram object will be lost in this conversion as obspy does not implement that concept. If you need to save the error log you will need to save the input of this function to MongoDB to preserve the errorlog it may contain.

Parameters:
  • sg (Seismogram) – is the Seismogram object to be converted

  • chanmap (list) – 3 element list of channel names to be assigned components

  • hang (list) – 3 element list of horizontal angle attributes (azimuth in degrees) to be set in Stats array of output for each component. (default is for cardinal directions)

  • vang (list) – 3 element list of vertical angle (theta of spherical coordinates) to be set in Stats array of output for each component. (default is for cardinal directions)

Returns:

obspy Stream object containing a list of 3 Trace objects in mspass component order. Presently the data are ALWAYS returned to cardinal directions (see above). It will be empty if sg was marked dead

Return type:

obspy.core.stream.Stream

class mspasspy.ccore.seismic.SeismogramEnsemble#

Bases: CoreSeismogramEnsemble

Gather of vector(3c) time series objects

dead(self: mspasspy.ccore.seismic.SeismogramEnsemble) bool#

Return true if the entire ensemble is marked dead

property elog#

Error log attached to the ensemble - not the same as member error logs

kill(self: mspasspy.ccore.seismic.SeismogramEnsemble) None#

Mark the entire ensemble dead

property live#

True if the ensemble contains any valid data. False if empty or all invalid.

set_live(self: mspasspy.ccore.seismic.SeismogramEnsemble) bool#

Mark ensemble live but use a validate test first

toStream()#

Convert a seismogram ensemble to stream :param sge: seismogram ensemble input :return: stream

validate(self: mspasspy.ccore.seismic.SeismogramEnsemble) bool#

Test to see if the ensemble has any live members - return true of it does

class mspasspy.ccore.seismic.SeismogramVector#

Bases: pybind11_object

append(self: mspasspy.ccore.seismic.SeismogramVector, x: mspass::seismic::Seismogram) None#

Add an item to the end of the list

clear(self: mspasspy.ccore.seismic.SeismogramVector) None#

Clear the contents

extend(*args, **kwargs)#

Overloaded function.

  1. extend(self: mspasspy.ccore.seismic.SeismogramVector, L: mspasspy.ccore.seismic.SeismogramVector) -> None

Extend the list by appending all the items in the given list

  1. extend(self: mspasspy.ccore.seismic.SeismogramVector, L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(self: mspasspy.ccore.seismic.SeismogramVector, i: int, x: mspass::seismic::Seismogram) None#

Insert an item at a given position.

pop(*args, **kwargs)#

Overloaded function.

  1. pop(self: mspasspy.ccore.seismic.SeismogramVector) -> mspass::seismic::Seismogram

Remove and return the last item

  1. pop(self: mspasspy.ccore.seismic.SeismogramVector, i: int) -> mspass::seismic::Seismogram

Remove and return the item at index i

class mspasspy.ccore.seismic.SlownessVector#

Bases: pybind11_object

Encapsulate concept of slowness vector describing wave propagation

azimuth(self: mspasspy.ccore.seismic.SlownessVector) float#

Return the azimuth of propagation defined by this slowness vector

baz(self: mspasspy.ccore.seismic.SlownessVector) float#

Return the so called back azimuth defined by a slowness vector

mag(self: mspasspy.ccore.seismic.SlownessVector) float#

Return the magnitude of the slowness vector

property ux#

Slowness component in the x (Easting) direction

property uy#

Slowness component in the y (Northing) direction

class mspasspy.ccore.seismic.TimeReferenceType#

Bases: pybind11_object

Members:

Relative

UTC

Relative = <TimeReferenceType.Relative: 1>#
UTC = <TimeReferenceType.UTC: 0>#
property name#
property value#
class mspasspy.ccore.seismic.TimeSeries#

Bases: _CoreTimeSeries, ProcessingHistory

mspass scalar time series data object

load_history(self: mspasspy.ccore.seismic.TimeSeries, arg0: mspasspy.ccore.utility.ProcessingHistory) None#

Load ProcessingHistory from another data object that contains relevant history

toTrace()#

Converts a TimeSeries object to an obspy Trace object.

MsPASS can handle scalar data either as an obspy Trace object or as with the mspass TimeSeries object. The capture nearly the same concepts. The main difference is that TimeSeries support the error logging and history features of mspass while obspy, which is a separate package, does not. Obspy has a number of useful algorithms that operate on scalar data, however, so it is frequently useful to switch between Trace and TimeSeries formats. The user is warned, however, that converting a TimeSeries to a Trace object with this function will result in the loss of any error log information. For production runs unless the data set is huge, we recommend saving the intermediate result AFTER calling this function if there is any possibility there are errors posted on any data. We say after because some warning errors from this function may be posted in elog. Since python uses call by reference d may thus be altered.

Parameters:

ts (TimeSeries) – is the TimeSeries object to be converted

Returns:

an obspy Trace object from conversion of d. An empty Trace object will be returned if d was marked dead

Return type:

Trace

class mspasspy.ccore.seismic.TimeSeriesEnsemble#

Bases: CoreTimeSeriesEnsemble

Gather of scalar time series objects

dead(self: mspasspy.ccore.seismic.TimeSeriesEnsemble) bool#

Return true if the entire ensemble is marked dead

property elog#

Error log attached to the ensemble - not the same as member error logs

kill(self: mspasspy.ccore.seismic.TimeSeriesEnsemble) None#

Mark the entire ensemble dead

property live#

True if the ensemble contains any valid data. False if empty or all invalid.

set_live(self: mspasspy.ccore.seismic.TimeSeriesEnsemble) bool#

Mark ensemble live but use a validate test first

toStream()#

Convert a timeseries ensemble to stream. Always copies all ensemble Metadata to tse members before conversion. That is necessary to avoid loss of data in the case where the only copy is stored in the ensemble’s metadata.

Parameters:

tse – timeseries ensemble

Returns:

converted stream

validate(self: mspasspy.ccore.seismic.TimeSeriesEnsemble) bool#

Test to see if the ensemble has any live members - return true of it does

class mspasspy.ccore.seismic.TimeSeriesVector#

Bases: pybind11_object

append(self: mspasspy.ccore.seismic.TimeSeriesVector, x: mspass::seismic::TimeSeries) None#

Add an item to the end of the list

clear(self: mspasspy.ccore.seismic.TimeSeriesVector) None#

Clear the contents

extend(*args, **kwargs)#

Overloaded function.

  1. extend(self: mspasspy.ccore.seismic.TimeSeriesVector, L: mspasspy.ccore.seismic.TimeSeriesVector) -> None

Extend the list by appending all the items in the given list

  1. extend(self: mspasspy.ccore.seismic.TimeSeriesVector, L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(self: mspasspy.ccore.seismic.TimeSeriesVector, i: int, x: mspass::seismic::TimeSeries) None#

Insert an item at a given position.

pop(*args, **kwargs)#

Overloaded function.

  1. pop(self: mspasspy.ccore.seismic.TimeSeriesVector) -> mspass::seismic::TimeSeries

Remove and return the last item

  1. pop(self: mspasspy.ccore.seismic.TimeSeriesVector, i: int) -> mspass::seismic::TimeSeries

Remove and return the item at index i

class mspasspy.ccore.seismic.TimeSeriesWGaps#

Bases: TimeSeries, DataGap

TimeSeries object with gap handling methods

ator(self: mspasspy.ccore.seismic.TimeSeriesWGaps, arg0: float) None#

Convert to relative time shifting gaps to match

rtoa(*args, **kwargs)#

Overloaded function.

  1. rtoa(self: mspasspy.ccore.seismic.TimeSeriesWGaps) -> None

Return to UTC time using time shift defined in earlier ator call

  1. rtoa(self: mspasspy.ccore.seismic.TimeSeriesWGaps, arg0: float) -> None

Return to UTC time using a specified time shift

shift(self: mspasspy.ccore.seismic.TimeSeriesWGaps, arg0: float) None#

Shift the time reference by a specified constant

zero_gaps(self: mspasspy.ccore.seismic.TimeSeriesWGaps) None#

Zero the data vector for all sections defined as a gap

algorithms#

basic#

A submodule for algorithms namespace of ccore with common algorithms

mspasspy.ccore.algorithms.basic.ArrivalTimeReference(*args, **kwargs)#

Overloaded function.

  1. ArrivalTimeReference(d: mspasspy.ccore.seismic.Seismogram, key: str, window: mspass::algorithms::TimeWindow) -> mspasspy.ccore.seismic.Seismogram

Shifts data so t=0 is a specified arrival time

  1. ArrivalTimeReference(d: mspasspy.ccore.seismic.CoreSeismogramEnsemble, key: str, window: mspass::algorithms::TimeWindow) -> mspasspy.ccore.seismic.CoreSeismogramEnsemble

Shifts data so t=0 is a specified arrival time

class mspasspy.ccore.algorithms.basic.BasicTaper#

Bases: pybind11_object

Base class for family of taper algorithms

class mspasspy.ccore.algorithms.basic.Butterworth#

Bases: pybind11_object

Butterworth filter operator processing object

apply(*args, **kwargs)#

Overloaded function.

  1. apply(self: mspasspy.ccore.algorithms.basic.Butterworth, arg0: mspasspy.ccore.seismic.TimeSeries) -> None

Apply the predefined filter to a TimeSeries object

  1. apply(self: mspasspy.ccore.algorithms.basic.Butterworth, arg0: mspasspy.ccore.seismic.Seismogram) -> None

Apply the predefined filter to a 3c Seismogram object

change_dt(self: mspasspy.ccore.algorithms.basic.Butterworth, arg0: float) None#

Change sample interval defining the operator (does not change corners)

dt(self: mspasspy.ccore.algorithms.basic.Butterworth) float#

Current sample interval used for nondimensionalizing frequencies

filter_type(self: mspasspy.ccore.algorithms.basic.Butterworth) str#

Return a description of the filter type

high_corner(self: mspasspy.ccore.algorithms.basic.Butterworth) float#

Return high frequency 3db point

impulse_response(self: mspasspy.ccore.algorithms.basic.Butterworth, arg0: int) mspasspy.ccore.seismic._CoreTimeSeries#

Return impulse response

is_zerophase(self: mspasspy.ccore.algorithms.basic.Butterworth) bool#

Returns True if operator defines a zerophase filter

low_corner(self: mspasspy.ccore.algorithms.basic.Butterworth) float#

Return low frequency f3d point

npoles_high(self: mspasspy.ccore.algorithms.basic.Butterworth) int#

Return number of poles for the high frequency (low-pass aka high-cut) filter definition

npoles_low(self: mspasspy.ccore.algorithms.basic.Butterworth) int#

Return number of poles for the low frequency (high-pass aka low-cut) filter definition

transfer_function(self: mspasspy.ccore.algorithms.basic.Butterworth, arg0: int) mspass::algorithms::deconvolution::ComplexArray#

Return transfer function in a complex valued array

class mspasspy.ccore.algorithms.basic.CosineTaper#

Bases: BasicTaper

Define a taper using a half period cosine function

apply(*args, **kwargs)#

Overloaded function.

  1. apply(self: mspasspy.ccore.algorithms.basic.CosineTaper, arg0: mspasspy.ccore.seismic.TimeSeries) -> int

Apply taper to a scalar TimeSeries object

  1. apply(self: mspasspy.ccore.algorithms.basic.CosineTaper, arg0: mspasspy.ccore.seismic.Seismogram) -> int

Apply taper to a Seismogram (3C) object

get_t0head(self: mspasspy.ccore.algorithms.basic.CosineTaper) float#

Return time of end of zero zone - taper sets data with time < this value 0

get_t0tail(self: mspasspy.ccore.algorithms.basic.CosineTaper) float#

Return time of taper end - data with t > this value will be zeroed

get_t1head(self: mspasspy.ccore.algorithms.basic.CosineTaper) float#

Return time of end front end taper - point after this time are not altered until end taper zone is reached

get_t1tail(self: mspasspy.ccore.algorithms.basic.CosineTaper) float#

Return start time of end taper

class mspasspy.ccore.algorithms.basic.LinearTaper#

Bases: BasicTaper

Define a ramp taper function

apply(*args, **kwargs)#

Overloaded function.

  1. apply(self: mspasspy.ccore.algorithms.basic.LinearTaper, arg0: mspasspy.ccore.seismic.TimeSeries) -> int

Apply taper to a scalar TimeSeries object

  1. apply(self: mspasspy.ccore.algorithms.basic.LinearTaper, arg0: mspasspy.ccore.seismic.Seismogram) -> int

Apply taper to a Seismogram (3C) object

get_t0head(self: mspasspy.ccore.algorithms.basic.LinearTaper) float#

Return time of end of zero zone - taper sets data with time < this value 0

get_t0tail(self: mspasspy.ccore.algorithms.basic.LinearTaper) float#

Return time of taper end - data with t > this value will be zeroed

get_t1head(self: mspasspy.ccore.algorithms.basic.LinearTaper) float#

Return time of end front end taper - point after this time are not altered until end taper zone is reached

get_t1tail(self: mspasspy.ccore.algorithms.basic.LinearTaper) float#

Return start time of end taper

class mspasspy.ccore.algorithms.basic.TimeWindow#

Bases: pybind11_object

Simple description of a time window

property end#

End time of the window

length(self: mspasspy.ccore.algorithms.basic.TimeWindow) float#

Return the size of the window in seconds

shift(self: mspasspy.ccore.algorithms.basic.TimeWindow, arg0: float) mspasspy.ccore.algorithms.basic.TimeWindow#

Shift the reference time by a specified number of seconds

property start#

Start time of the window

class mspasspy.ccore.algorithms.basic.VectorTaper#

Bases: BasicTaper

Define generic taper function with a parallel vector of weights

apply(*args, **kwargs)#

Overloaded function.

  1. apply(self: mspasspy.ccore.algorithms.basic.VectorTaper, arg0: mspasspy.ccore.seismic.TimeSeries) -> int

Apply taper to a scalar TimeSeries object

  1. apply(self: mspasspy.ccore.algorithms.basic.VectorTaper, arg0: mspasspy.ccore.seismic.Seismogram) -> int

Apply taper to a Seismogram (3C) object

mspasspy.ccore.algorithms.basic.agc(d: mspasspy.ccore.seismic.Seismogram, twin: float) mspasspy.ccore.seismic.TimeSeries#

Automatic gain control a Seismogram

mspasspy.ccore.algorithms.basic.repair_overlaps(segments: list[mspasspy.ccore.seismic.TimeSeries]) list[mspasspy.ccore.seismic.TimeSeries]#

Attempt to remove redundant, matching overlapping data segments

mspasspy.ccore.algorithms.basic.seed_ensemble_sort(d: mspasspy.ccore.seismic.TimeSeriesEnsemble) None#

Sort a TimeSeriesEnsemble with a natural order with seed name codes.

The seed standard tags every single miniseed record with four string keys that seed uses to uniquely define a single data channel. In MsPASS the keys used for these name keys are: net, sta, chan, and loc. This function applies the same sort algorithm used in the bundle_seed_data algorithm to allow clean grouping into channels that can be assembled into three component (Seismogram) bundles. That means we sort the ensemble data with the four keys in this order: net, sta, loc, chan.

We provide this function because the process of doing such a sort is far from trivial to do in a robust way. A python programmer has easier tools for sorting BUT those standard tools cannot handle a common data problem that can be encountered with real data. That is, there is a high probability not all the seed keys are defined. In particular, data coming from a system based on the css3.0 relational data base (e.g. Antelope) may not have net or loc set. The sorting algorith here handle null net or loc codes cleanly by treating the null case as a particular value. Without those safeties the code would throw an error if net or loc were null.

Note this algorithm alters the ensemble it receives in place.

Parameters:

d – is the ensemble to be sorted.

mspasspy.ccore.algorithms.basic.splice_segments(segments: list[mspasspy.ccore.seismic.TimeSeries], save_history: bool) mspasspy.ccore.seismic.TimeSeriesWGaps#

Splice a time sorted list of TimeSeries data into a continuous block

amplitudes#

A submodule for amplitudes namespace of ccore.algorithms

class mspasspy.ccore.algorithms.amplitudes.BandwidthData#

Bases: pybind11_object

Defines the frequency domain bandwidth of data

bandwidth(self: mspasspy.ccore.algorithms.amplitudes.BandwidthData) float#

Return bandwidth in dB (bandwidth_fraction in dB)

bandwidth_fraction(self: mspasspy.ccore.algorithms.amplitudes.BandwidthData) float#

Return ratio of estimated bandwidth to total bandwidth of original data

property f_range#

Total frequency range of signal spectrum used for snr estimate

property high_edge_f#

High frequency limit of pass band

property high_edge_snr#

Signal-to-noise ratio at frequency high_edge_f

property low_edge_f#

Low frequency limit of pass band

property low_edge_snr#

Signal-to-noise ratio at frequency low_edge_f

mspasspy.ccore.algorithms.amplitudes.BandwidthStatistics(signal_spectrum: mspasspy.ccore.seismic.PowerSpectrum, noise_spectrum: mspasspy.ccore.seismic.PowerSpectrum, bandwidth_data: mspasspy.ccore.algorithms.amplitudes.BandwidthData) mspasspy.ccore.utility.Metadata#

Compute statistical summary of snr in a passband returned by EstimateBandwidth - Returned in Metadata container

mspasspy.ccore.algorithms.amplitudes.EstimateBandwidth(signal_df: float, signal_power_spectrum: mspasspy.ccore.seismic.PowerSpectrum, noise_power_spectrum: mspasspy.ccore.seismic.PowerSpectrum, srn_threshold: float, time_bandwidth_product: float, high_frequency_search_start: float, fix_high_edge_to_fhs: bool) mspasspy.ccore.algorithms.amplitudes.BandwidthData#

Estimate signal bandwidth estimate of power spectra of signal and noise

class mspasspy.ccore.algorithms.amplitudes.MADAmplitudeFunctor#

Bases: pybind11_object

Callable wrapper for MAD amplitude; picklable for Dask.

class mspasspy.ccore.algorithms.amplitudes.PeakAmplitudeFunctor#

Bases: pybind11_object

Callable wrapper for peak amplitude; picklable for Dask.

class mspasspy.ccore.algorithms.amplitudes.PercAmplitudeFunctor#

Bases: pybind11_object

Callable wrapper for percentile amplitude; picklable for Dask.

class mspasspy.ccore.algorithms.amplitudes.RMSAmplitudeFunctor#

Bases: pybind11_object

Callable wrapper for RMS amplitude; picklable for Dask.

class mspasspy.ccore.algorithms.amplitudes.ScalingMethod#

Bases: pybind11_object

Members:

Peak

RMS

ClipPerc

MAD

ClipPerc = <ScalingMethod.ClipPerc: 2>#
MAD = <ScalingMethod.MAD: 3>#
Peak = <ScalingMethod.Peak: 0>#
RMS = <ScalingMethod.RMS: 1>#
property name#
property value#

deconvolution#

A submodule for deconvolution namespace of ccore.algorithms

class mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine#

Bases: FFTDeconOperator

Colored noise regularized deconvolution engine - used for single station and array data

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine) mspasspy.ccore.utility.Metadata#

Return a Metadata container of QC metrics computed by this algorithm

actual_output(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine, arg0: mspasspy.ccore.seismic.TimeSeries) mspasspy.ccore.seismic.TimeSeries#

Return actual output/resolution kernel for the supplied wavelet

compute_noise_spectrum(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine, noise: mspasspy.ccore.seismic.TimeSeries) mspasspy.ccore.seismic.PowerSpectrum#

Compute a noise spectrum from a TimeSeries using the inverse operator multitaper parameters

compute_noise_spectrum_3C(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine, noise: mspasspy.ccore.seismic.Seismogram) mspasspy.ccore.seismic.PowerSpectrum#

Compute a noise spectrum from a Seismogram by averaging the three component spectra

get_operator_dt(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine) float#

Return operator sample interval

ideal_output(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine) mspasspy.ccore.seismic.TimeSeries#

Legacy alias for output_shaping_wavelet

initialize_inverse_operator(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine, wavelet: mspasspy.ccore.seismic.TimeSeries, noise_spectrum: mspasspy.ccore.seismic.PowerSpectrum) None#

Initialize the frequency-domain inverse operator from wavelet and precomputed noise spectrum

initialize_inverse_operator_TS(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine, wavelet: mspasspy.ccore.seismic.TimeSeries, noise_data: mspasspy.ccore.seismic.TimeSeries) None#

Initialize the frequency-domain inverse operator from wavelet and noise TimeSeries

inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine, arg0: mspasspy.ccore.seismic.TimeSeries, arg1: float) mspasspy.ccore.seismic.TimeSeries#

Return the time-domain inverse operator computed from the current frequency-domain operator

output_shaping_wavelet(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine) mspasspy.ccore.seismic.TimeSeries#

Return the output shaping wavelet ws(t)

process(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine, d: mspasspy.ccore.seismic.Seismogram, psnoise: mspasspy.ccore.seismic.PowerSpectrum, fl: float, fh: float) mspasspy.ccore.seismic.Seismogram#

Deconvolve a Seismogram using the loaded inverse operator and requested shaping bandwidth

resolution_kernel(self: mspasspy.ccore.algorithms.deconvolution.CNRDeconEngine, arg0: mspasspy.ccore.seismic.TimeSeries) mspasspy.ccore.seismic.TimeSeries#

Return actual output/resolution kernel for the supplied wavelet

class mspasspy.ccore.algorithms.deconvolution.ComplexArray#

Bases: pybind11_object

Complex-valued Fortran-style array implementation used in MsPASS deconvolution operators

abs(self: mspasspy.ccore.algorithms.deconvolution.ComplexArray) mspasspy.ccore.algorithms.deconvolution.DoubleVector#

Return DoubleVector of complex magnitudes

conj(self: mspasspy.ccore.algorithms.deconvolution.ComplexArray) None#

Convert array elements to complex conjugates

norm2(self: mspasspy.ccore.algorithms.deconvolution.ComplexArray) float#

Return L2 norm of array content

phase(self: mspasspy.ccore.algorithms.deconvolution.ComplexArray) mspasspy.ccore.algorithms.deconvolution.DoubleVector#

Return DoubleVector of phase of components

rms(self: mspasspy.ccore.algorithms.deconvolution.ComplexArray) float#

Return rms of array content

size(self: mspasspy.ccore.algorithms.deconvolution.ComplexArray) int#

Return number of components in the array

class mspasspy.ccore.algorithms.deconvolution.DoubleVector#

Bases: pybind11_object

append(self: mspasspy.ccore.algorithms.deconvolution.DoubleVector, x: float) None#

Add an item to the end of the list

clear(self: mspasspy.ccore.algorithms.deconvolution.DoubleVector) None#

Clear the contents

count(self: mspasspy.ccore.algorithms.deconvolution.DoubleVector, x: float) int#

Return the number of times x appears in the list

extend(*args, **kwargs)#

Overloaded function.

  1. extend(self: mspasspy.ccore.algorithms.deconvolution.DoubleVector, L: mspasspy.ccore.algorithms.deconvolution.DoubleVector) -> None

Extend the list by appending all the items in the given list

  1. extend(self: mspasspy.ccore.algorithms.deconvolution.DoubleVector, L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(self: mspasspy.ccore.algorithms.deconvolution.DoubleVector, i: int, x: float) None#

Insert an item at a given position.

pop(*args, **kwargs)#

Overloaded function.

  1. pop(self: mspasspy.ccore.algorithms.deconvolution.DoubleVector) -> float

Remove and return the last item

  1. pop(self: mspasspy.ccore.algorithms.deconvolution.DoubleVector, i: int) -> float

Remove and return the item at index i

remove(self: mspasspy.ccore.algorithms.deconvolution.DoubleVector, x: float) None#

Remove the first item from the list whose value is x. It is an error if there is no such item.

class mspasspy.ccore.algorithms.deconvolution.FFTDeconOperator#

Bases: pybind11_object

Base class used by frequency domain deconvolution methods

change_shift(self: mspasspy.ccore.algorithms.deconvolution.FFTDeconOperator, t0shift: int) None#

Change reference time shift

change_size(self: mspasspy.ccore.algorithms.deconvolution.FFTDeconOperator, nfft: int) None#

Change fft buffer size

df(self: mspasspy.ccore.algorithms.deconvolution.FFTDeconOperator, arg0: float) float#

Get frequency bin size

get_shift(self: mspasspy.ccore.algorithms.deconvolution.FFTDeconOperator) int#

Get current reference time shift

get_size(self: mspasspy.ccore.algorithms.deconvolution.FFTDeconOperator) int#

Get current fft buffer size

class mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon#

Bases: ScalarDecon

Frequency-domain generalized iterative deconvolution operator for three-component receiver functions

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) mspasspy.ccore.utility.Metadata#

Return QC metrics

actual_output(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output/resolution kernel of the inverse operator

changeparameter(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, arg0: mspasspy.ccore.utility.Metadata) None#

Change leaf inverse-operator parameters

clear_external_noise(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) None#

Clear any previously loaded external noise or noise spectrum

clear_external_wavelet(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) None#

Clear any previously loaded external wavelet

deconvolution_window_end(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) float#

Return end time of the configured deconvolution window

deconvolution_window_start(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) float#

Return start time of the configured deconvolution window

getresult(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) mspasspy.ccore.seismic._CoreSeismogram#

Return the deconvolved three-component receiver function

ideal_output(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Legacy alias for output_shaping_wavelet

inverse_wavelet(*args, **kwargs)#

Overloaded function.

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet with the default parent time reference

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, t0parent: float) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet shifted to a parent time reference

lag_weight_vector(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) mspasspy.ccore.algorithms.deconvolution.DoubleVector#

Return the final lag penalty weights from the GID iteration

load(*args, **kwargs)#

Overloaded function.

  1. load(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, d: mspasspy.ccore.seismic._CoreSeismogram, deconvolution_window: mspasspy.ccore.algorithms.basic.TimeWindow) -> int

Load data from the requested deconvolution window

  1. load(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, d: mspasspy.ccore.seismic._CoreSeismogram, deconvolution_window: mspasspy.ccore.algorithms.basic.TimeWindow, noise_window: mspasspy.ccore.algorithms.basic.TimeWindow) -> int

Load data and residual-noise windows from one Seismogram

loadnoise(*args, **kwargs)#

Overloaded function.

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, d: mspasspy.ccore.seismic._CoreSeismogram, noise_window: mspasspy.ccore.algorithms.basic.TimeWindow) -> int

Load noise data for regularization from a Seismogram window

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, noise: mspasspy.ccore.seismic.TimeSeries) -> int

Load externally supplied scalar noise

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, noise: mspasspy.ccore.seismic._CoreTimeSeries) -> int

Load externally supplied scalar noise

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, noise_spectrum: mspasspy.ccore.seismic.PowerSpectrum) -> int

Load externally supplied ns_gid inverse-operator noise spectrum; a residual noise window must still be loaded

loadwavelet(*args, **kwargs)#

Overloaded function.

  1. loadwavelet(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, wavelet: mspasspy.ccore.seismic.TimeSeries) -> int

Load an externally supplied wavelet used for all components

  1. loadwavelet(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon, wavelet: mspasspy.ccore.seismic._CoreTimeSeries) -> int

Load an externally supplied wavelet used for all components

noise_window_end(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) float#

Return end time of the configured noise window

noise_window_start(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) float#

Return start time of the configured noise window

process(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) None#

Process previously loaded data

sparse_output(self: mspasspy.ccore.algorithms.deconvolution.FrequencyDomainGIDDecon) mspasspy.ccore.seismic._CoreSeismogram#

Return the raw sparse impulse response from the GID iteration

class mspasspy.ccore.algorithms.deconvolution.LeastSquareDecon#

Bases: ScalarDecon

Damped least squares frequency domain operator

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.LeastSquareDecon) mspasspy.ccore.utility.Metadata#

Return QC metrics

actual_output(self: mspasspy.ccore.algorithms.deconvolution.LeastSquareDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output of inverse*wavelet

changeparameter(self: mspasspy.ccore.algorithms.deconvolution.LeastSquareDecon, arg0: mspasspy.ccore.utility.Metadata) None#

Change operator parameters

inverse_wavelet(*args, **kwargs)#

Overloaded function.

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.LeastSquareDecon) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet with the default parent time reference

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.LeastSquareDecon, t0parent: float) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet shifted to a parent time reference

process(self: mspasspy.ccore.algorithms.deconvolution.LeastSquareDecon) None#

Process previously loaded data

class mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine#

Bases: pybind11_object

Processing object used compute multitaper power spectrum estimates from time series data

apply(*args, **kwargs)#

Overloaded function.

  1. apply(self: mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine, d: mspasspy.ccore.seismic.TimeSeries) -> mspasspy.ccore.seismic.PowerSpectrum

Compute from data in a TimeSeries container

  1. apply(self: mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine, d: mspasspy.ccore.algorithms.deconvolution.DoubleVector) -> mspasspy.ccore.algorithms.deconvolution.DoubleVector

Compute from data stored in a simple vector container

df(self: mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine) float#

Return frequency bin size

nf(self: mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine) int#

Return number of frequency bins in this operator

nfft(self: mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine) int#

Return size of fft workspace in this operator

number_tapers(self: mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine) int#

Return the number of tapers this operator uses for power spectrum estimates

set_df(self: mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine, arg0: float) float#

Change the assumed frequency bin sample interval

taper_length(self: mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine) int#

Return number of samples assumed by the operator for input data to be processed

time_bandwidth_product(self: mspasspy.ccore.algorithms.deconvolution.MTPowerSpectrumEngine) float#

Return the time-bandwidth product of this operator

mspasspy.ccore.algorithms.deconvolution.MultiTaperPowerSpecDivDecon#

alias of MultiTaperSpecDivDecon

mspasspy.ccore.algorithms.deconvolution.MultiTaperPowerXcorDecon#

alias of MultiTaperXcorDecon

class mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon#

Bases: ScalarDecon

Compatibility name for the multitaper power-stabilized spectral-division operator. This is not a paper-faithful Park-Levin MTC estimator; the current implementation applies an untapered source/data phase inverse with a multitaper-stabilized power denominator. Prefer the MultiTaperPowerSpecDivDecon alias in new Python code.

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon) mspasspy.ccore.utility.Metadata#

Return QC metrics

actual_output(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output of inverse*wavelet

all_actual_outputs(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon, t0parent: float = 0.0) list[mspasspy.ccore.seismic._CoreTimeSeries]#

Return retained actual output products. The current implementation normally returns one combined resolution kernel.

all_inverse_wavelets(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon, t0parent: float = 0.0) list[mspasspy.ccore.seismic._CoreTimeSeries]#

Return retained inverse wavelet products. The current implementation normally returns one combined multitaper inverse.

all_rfestimates(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon, t0parent: float = 0.0) list[mspasspy.ccore.seismic._CoreTimeSeries]#

Return retained RF estimates. The current implementation normally returns one combined estimate.

changeparameter(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon, arg0: mspasspy.ccore.utility.Metadata) None#

Change operator parameters

get_number_outputs(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon) int#

Get number of combined output products retained by the operator

get_number_tapers(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon) int#

Get number of Slepian tapers used by the operator

get_taperlen(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon) int#

Get length of the Slepian tapers used by the operator

get_time_bandwidth_product(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon) float#

Get time-bandwidth product of Slepian tapers used by the operator

inverse_wavelet(*args, **kwargs)#

Overloaded function.

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet with the default parent time reference

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon, t0parent: float) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet shifted to a parent time reference

load(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon, wavelet: mspasspy.ccore.algorithms.deconvolution.DoubleVector, data: mspasspy.ccore.algorithms.deconvolution.DoubleVector, noise: mspasspy.ccore.algorithms.deconvolution.DoubleVector) int#

Load wavelet, data, and noise vectors

loadnoise(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon, noise: mspasspy.ccore.algorithms.deconvolution.DoubleVector) int#

Load a noise vector used for multitaper regularization

process(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperSpecDivDecon) None#

Process previously loaded data

class mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon#

Bases: ScalarDecon

Compatibility name for the multitaper source-power-stabilized deconvolution operator. This is not a paper-faithful Park-Levin MTC estimator; the current implementation applies an untapered source/data phase inverse with a multitaper-stabilized source-power denominator. Prefer the MultiTaperPowerXcorDecon alias in new Python code.

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon) mspasspy.ccore.utility.Metadata#

Return QC metrics

actual_output(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output of inverse*wavelet

changeparameter(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon, arg0: mspasspy.ccore.utility.Metadata) None#

Change operator parameters

get_number_tapers(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon) int#

Get number of Slepian tapers used by the operator

get_taperlen(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon) int#

Get length of the Slepian tapers used by the operator

get_time_bandwidth_product(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon) float#

Get time-bandwidth product of Slepian tapers used by the operator

inverse_wavelet(*args, **kwargs)#

Overloaded function.

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet with the default parent time reference

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon, t0parent: float) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet shifted to a parent time reference

load(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon, wavelet: mspasspy.ccore.algorithms.deconvolution.DoubleVector, data: mspasspy.ccore.algorithms.deconvolution.DoubleVector, noise: mspasspy.ccore.algorithms.deconvolution.DoubleVector) int#

Load wavelet, data, and noise vectors

loadnoise(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon, noise: mspasspy.ccore.algorithms.deconvolution.DoubleVector) int#

Load a noise vector used for multitaper regularization

process(self: mspasspy.ccore.algorithms.deconvolution.MultiTaperXcorDecon) None#

Process previously loaded data

class mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon#

Bases: ScalarDecon

Noise-aware stable frequency-domain inverse operator used by NS-GID

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon) mspasspy.ccore.utility.Metadata#

Return NS-GID inverse operator QC metrics

actual_output(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output of inverse*wavelet

changeparameter(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon, arg0: mspasspy.ccore.utility.Metadata) None#

Change operator parameters

gain_cap(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon) float#

Return the configured inverse-gain cap

inverse_wavelet(*args, **kwargs)#

Overloaded function.

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet with the default parent time reference

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon, t0parent: float) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet shifted to a parent time reference

loadnoise(*args, **kwargs)#

Overloaded function.

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon, noise: mspasspy.ccore.algorithms.deconvolution.DoubleVector) -> None

Load a noise time series vector used to estimate inverse-gain stability

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon, noise: mspasspy.ccore.seismic._CoreTimeSeries) -> None

Load a noise CoreTimeSeries used to estimate inverse-gain stability

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon, noise_spectrum: mspasspy.ccore.seismic.PowerSpectrum) -> None

Load a noise PowerSpectrum used to estimate inverse-gain stability

max_gain(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon) float#

Return the maximum inverse gain before stability capping

process(self: mspasspy.ccore.algorithms.deconvolution.NoiseStableDecon) None#

Process previously loaded data

class mspasspy.ccore.algorithms.deconvolution.ScalarDecon#

Bases: pybind11_object

Base class for scalar TimeSeries data

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon) mspasspy.ccore.utility.Metadata#

Return QC metrics

actual_output(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output/resolution kernel of inverse*wavelet

change_parameter(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon, arg0: mspasspy.ccore.utility.Metadata) None#

Change deconvolution parameters

change_shaping_wavelet(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon, arg0: mspasspy.ccore.algorithms.deconvolution.ShapingWavelet) None#

Change the shaping wavelet applied to output

get_shaping_wavelet(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon) mspasspy.ccore.algorithms.deconvolution.ShapingWavelet#

Get the shaping wavelet used by this operator

getresult(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon) mspasspy.ccore.algorithms.deconvolution.DoubleVector#

Fetch vector of deconvolved data - after calling process

ideal_output(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Legacy alias for output_shaping_wavelet

inverse_wavelet(*args, **kwargs)#

Overloaded function.

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet with the default parent time reference

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon, t0parent: float) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet shifted to a parent time reference

load(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon, wavelet: mspasspy.ccore.algorithms.deconvolution.DoubleVector, data: mspasspy.ccore.algorithms.deconvolution.DoubleVector) int#

Load wavelet and data used to construct the deconvolution operator

loaddata(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon, data: mspasspy.ccore.algorithms.deconvolution.DoubleVector) int#

Load the data trace to deconvolve

loadwavelet(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon, wavelet: mspasspy.ccore.algorithms.deconvolution.DoubleVector) int#

Load the source wavelet trace

output_shaping_wavelet(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return the output shaping wavelet ws(t)

process(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon) None#

Run the deconvolution after inputs have been loaded

resolution_kernel(self: mspasspy.ccore.algorithms.deconvolution.ScalarDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output/resolution kernel of inverse*wavelet

class mspasspy.ccore.algorithms.deconvolution.ShapingWavelet#

Bases: pybind11_object

Shaping wavelet object used in MsPASS decon frequency domain decon operators

df(self: mspasspy.ccore.algorithms.deconvolution.ShapingWavelet) float#

Return frequency bin size (Hz)

dt(self: mspasspy.ccore.algorithms.deconvolution.ShapingWavelet) float#

Return sample interval of wavelet in the time domain

impulse_response(self: mspasspy.ccore.algorithms.deconvolution.ShapingWavelet) mspasspy.ccore.seismic._CoreTimeSeries#

Return the impulse response of the wavelet in a CoreTimeSeries container

size(self: mspasspy.ccore.algorithms.deconvolution.ShapingWavelet) int#

Size of the complex array defining the wavelet internally

type(self: mspasspy.ccore.algorithms.deconvolution.ShapingWavelet) str#

Return the string description of the type of signal this wavelet defines

class mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon#

Bases: ScalarDecon

Generalized iterative deconvolution operator for three-component receiver functions

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) mspasspy.ccore.utility.Metadata#

Return QC metrics

actual_output(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output/resolution kernel of the inverse operator

changeparameter(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, arg0: mspasspy.ccore.utility.Metadata) None#

Change leaf inverse-operator parameters

clear_external_noise(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) None#

Clear any previously loaded external noise or noise spectrum

clear_external_wavelet(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) None#

Clear any previously loaded external wavelet

deconvolution_window_end(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) float#

Return end time of the configured deconvolution window

deconvolution_window_start(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) float#

Return start time of the configured deconvolution window

getresult(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) mspasspy.ccore.seismic._CoreSeismogram#

Return the deconvolved three-component receiver function

ideal_output(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Legacy alias for output_shaping_wavelet

inverse_wavelet(*args, **kwargs)#

Overloaded function.

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet with the default parent time reference

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, t0parent: float) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet shifted to a parent time reference

lag_weight_vector(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) mspasspy.ccore.algorithms.deconvolution.DoubleVector#

Return the final lag penalty weights from the GID iteration

load(*args, **kwargs)#

Overloaded function.

  1. load(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, d: mspasspy.ccore.seismic._CoreSeismogram, deconvolution_window: mspasspy.ccore.algorithms.basic.TimeWindow) -> int

Load data from the requested deconvolution window

  1. load(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, d: mspasspy.ccore.seismic._CoreSeismogram, deconvolution_window: mspasspy.ccore.algorithms.basic.TimeWindow, noise_window: mspasspy.ccore.algorithms.basic.TimeWindow) -> int

Load data and residual-noise windows from one Seismogram

loadnoise(*args, **kwargs)#

Overloaded function.

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, d: mspasspy.ccore.seismic._CoreSeismogram, noise_window: mspasspy.ccore.algorithms.basic.TimeWindow) -> int

Load noise data for regularization from a Seismogram window

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, noise: mspasspy.ccore.seismic.TimeSeries) -> int

Load externally supplied scalar noise

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, noise: mspasspy.ccore.seismic._CoreTimeSeries) -> int

Load externally supplied scalar noise

  1. loadnoise(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, noise_spectrum: mspasspy.ccore.seismic.PowerSpectrum) -> int

Load externally supplied ns_gid inverse-operator noise spectrum; a residual noise window must still be loaded

loadwavelet(*args, **kwargs)#

Overloaded function.

  1. loadwavelet(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, wavelet: mspasspy.ccore.seismic.TimeSeries) -> int

Load an externally supplied wavelet used for all components

  1. loadwavelet(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon, wavelet: mspasspy.ccore.seismic._CoreTimeSeries) -> int

Load an externally supplied wavelet used for all components

noise_window_end(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) float#

Return end time of the configured noise window

noise_window_start(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) float#

Return start time of the configured noise window

process(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) None#

Process previously loaded data

sparse_output(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainGIDDecon) mspasspy.ccore.seismic._CoreSeismogram#

Return the raw sparse impulse response from the GID iteration

class mspasspy.ccore.algorithms.deconvolution.TimeDomainLeastSquareDecon#

Bases: ScalarDecon

Damped least-squares time-domain operator for cropped linear convolution

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainLeastSquareDecon) mspasspy.ccore.utility.Metadata#

Return quality metrics for the time-domain least-squares solve

actual_output(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainLeastSquareDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output of inverse*wavelet

changeparameter(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainLeastSquareDecon, arg0: mspasspy.ccore.utility.Metadata) None#

Change operator parameters

inverse_wavelet(*args, **kwargs)#

Overloaded function.

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainLeastSquareDecon) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet with the default parent time reference

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainLeastSquareDecon, t0parent: float) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet shifted to a parent time reference

output_shaping_wavelet(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainLeastSquareDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return the output shaping wavelet on the same lag window as actual_output

process(self: mspasspy.ccore.algorithms.deconvolution.TimeDomainLeastSquareDecon) None#

Process previously loaded data

class mspasspy.ccore.algorithms.deconvolution.WaterLevelDecon#

Bases: ScalarDecon

Water level frequency domain operator

QCMetrics(self: mspasspy.ccore.algorithms.deconvolution.WaterLevelDecon) mspasspy.ccore.utility.Metadata#

Return QC metrics

actual_output(self: mspasspy.ccore.algorithms.deconvolution.WaterLevelDecon) mspasspy.ccore.seismic._CoreTimeSeries#

Return actual output of inverse*wavelet

changeparameter(self: mspasspy.ccore.algorithms.deconvolution.WaterLevelDecon, arg0: mspasspy.ccore.utility.Metadata) None#

Change operator parameters

inverse_wavelet(*args, **kwargs)#

Overloaded function.

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.WaterLevelDecon) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet with the default parent time reference

  1. inverse_wavelet(self: mspasspy.ccore.algorithms.deconvolution.WaterLevelDecon, t0parent: float) -> mspasspy.ccore.seismic._CoreTimeSeries

Return the time-domain inverse wavelet shifted to a parent time reference

process(self: mspasspy.ccore.algorithms.deconvolution.WaterLevelDecon) None#

Process previously loaded data

mspasspy.ccore.algorithms.deconvolution.circular_shift(d: mspasspy.ccore.algorithms.deconvolution.DoubleVector, i0: int) mspasspy.ccore.algorithms.deconvolution.DoubleVector#

Time-domain circular shift operator