Exemple #1
0
def _convert_trace_to_adj(tr, adj_src_type, minp, maxp):
    """
    Convert Trace to AdjointSource, for internal use only
    """
    adj = AdjointSource(adj_src_type, 0.0, 0.0, minp, maxp, "")
    adj.dt = tr.stats.delta
    adj.adjoint_source = tr.data
    adj.station = tr.stats.station
    adj.network = tr.stats.network
    adj.location = tr.stats.location
    adj.component = tr.stats.channel
    adj.starttime = tr.stats.starttime

    return adj
Exemple #2
0
def _convert_trace_to_adj(tr, adj_src_type, minp, maxp):
    """
    Convert Trace to AdjointSource, for internal use only
    """
    adj = AdjointSource(adj_src_type, 0.0, 0.0, minp, maxp, "")
    adj.dt = tr.stats.delta
    adj.adjoint_source = tr.data
    adj.station = tr.stats.station
    adj.network = tr.stats.network
    adj.location = tr.stats.location
    adj.component = tr.stats.channel
    adj.starttime = tr.stats.starttime

    return adj
Exemple #3
0
def convert_trace_to_adj(tr, meta):
    """
    Convert Trace to AdjointSource, for internal use only, with
    meta data information
    """
    minp = meta["min_period"]
    maxp = meta["max_period"]
    adj_src_type = meta["adj_src_type"]
    misfit = meta["misfit"]

    dt = tr.stats.delta
    component = tr.stats.channel
    adj = AdjointSource(adj_src_type, misfit, dt, minp, maxp, component)

    adj.adjoint_source = deepcopy(tr.data)
    adj.station = tr.stats.station
    adj.network = tr.stats.network
    adj.location = tr.stats.location
    adj.starttime = tr.stats.starttime

    return adj
Exemple #4
0
def _convert_trace_to_adj(tr, meta):
    """
    Convert Trace to AdjointSource, for internal use only, with
    meta data information
    """
    minp = meta["min_period"]
    maxp = meta["max_period"]
    adj_src_type = meta["adj_src_type"]
    misfit = meta["misfit"]

    dt = tr.stats.delta
    component = tr.stats.channel
    adj = AdjointSource(adj_src_type, misfit, dt, minp, maxp, component)

    adj.adjoint_source = tr.data
    adj.station = tr.stats.station
    adj.network = tr.stats.network
    adj.location = tr.stats.location
    adj.starttime = tr.stats.starttime

    return adj