Ejemplo n.º 1
0
def generate_shot_linearized_data_time(shots, solver, model,
                                       model_perturbation, **kwargs):
    """
    Given a list of shots and a solver, generates linearized seismic data in the time domain. This function will use the function 
    of the linear_forward_model function in the `temporal_modeling.py`

    Parameters
    ----------
    shots : list of pysit.Shot
        Collection of shots to be processed
    solver : pysit.WaveSolver
        Instance of wave solver to be used.
    model : background model parameters
    model_perturbation : model perturbation
    **kwargs : dict, optional
        Optional arguments.

    Notes
    -----
    `kwargs` may be used to specify `C0` and `wavefields` to    `generate_shot_data`.
    """

    GenerateDataObj = TemporalModeling(solver)
    for shot in shots:
        retval = GenerateDataObj.linear_forward_model(shot,
                                                      model,
                                                      model_perturbation,
                                                      'simdata',
                                                      dWaveOp0=None)
        shot.receivers.data = retval['simdata']
    def __init__(self,
                 solver,
                 filter_op=None,
                 parallel_wrap_shot=ParallelWrapShotNull(),
                 transform_mode='linear',
                 imaging_period=1,
                 c_ratio=5.0,
                 exp_a=1.0,
                 env_p=2.0,
                 auto_expa=True,
                 paddata=False,
                 FlagCnsdNeg=False):
        """imaging_period: Imaging happens every 'imaging_period' timesteps. Use higher numbers to reduce memory consumption at the cost of lower gradient accuracy.
            By assigning this value to the class, it will automatically be used when the gradient function of the temporal objective function is called in an inversion context.
        """
        self.solver = solver
        self.modeling_tools = TemporalModeling(solver)

        self.parallel_wrap_shot = parallel_wrap_shot
        self.transform_mode = transform_mode

        self.imaging_period = int(imaging_period)  #Needs to be an integer
        self.filter_op = filter_op
        self.c_ratio = c_ratio
        self.exp_a = exp_a
        self.env_p = env_p
        self.paddata = paddata
        self.auto_expa = auto_expa
        self.FlagCnsdNeg = FlagCnsdNeg
Ejemplo n.º 3
0
    def __init__(self,
                 solver,
                 res_match_obj,
                 normalize_d_to_u=True,
                 model_window=IdentityModelWindow(),
                 data_window=IdentityDataWindow(),
                 parallel_wrap_shot=ParallelWrapShotNull(),
                 imaging_period=1):

        self.solver = solver

        self.modeling_tools = TemporalModeling(solver)

        self.parallel_wrap_shot = parallel_wrap_shot

        self.W_model = model_window
        self.W_data = data_window

        TemporalLeastSquares.__init__(self, solver, parallel_wrap_shot,
                                      imaging_period)
        self.res_match_obj = res_match_obj  #The residual match object that is used for normalizing the data.
        self.normalize_d_to_u = normalize_d_to_u

        if res_match_obj._synToFld:
            raise Exception(
                "I'm assuming synToFld should be false. It determines the order of synthetic and true data in the call self.res_match_obj.match in the self._residual function. The covmatch option of the match routine will in this case pass fld as first argument and syn as second. The udmatch array contains the scaling factor for the first argument in self.res_match_obj.match to the second this way"
            )
Ejemplo n.º 4
0
    def __init__(self,
                 solver,
                 h,
                 filter_op=None,
                 dm_extend=None,
                 max_sub_offset=0.0,
                 weight_matrix=None,
                 regularization_value=None,
                 krylov_maxiter=10,
                 parallel_wrap_shot=ParallelWrapShotNull(),
                 imaging_period=1):
        """imaging_period: Imaging happens every 'imaging_period' timesteps. Use higher numbers to reduce memory consumption at the cost of lower gradient accuracy.
            By assigning this value to the class, it will automatically be used when the gradient function of the temporal objective function is called in an inversion context.
        """
        self.solver = solver
        self.modeling_tools = TemporalModeling(solver)

        self.parallel_wrap_shot = parallel_wrap_shot

        self.imaging_period = int(imaging_period)  # Needs to be an integer
        self.filter_op = filter_op

        self.weight_matrix = weight_matrix
        self.regularization_value = regularization_value
        self.krylov_maxiter = krylov_maxiter

        self.max_sub_offset = max_sub_offset
        self.h = h
        self.dm_extend = dm_extend
Ejemplo n.º 5
0
    def __init__(self,
                 solver,
                 ot_param=None,
                 parallel_wrap_shot=ParallelWrapShotNull(),
                 imaging_period=1,
                 normalize_trace=False):
        """imaging_period: Imaging happens every 'imaging_period' timesteps. Use higher numbers to reduce memory consumption at the cost of lower gradient accuracy.
            By assigning this value to the class, it will automatically be used when the gradient function of the temporal objective function is called in an inversion context.
        """
        self.solver = solver
        self.modeling_tools = TemporalModeling(solver)
        self.parallel_wrap_shot = parallel_wrap_shot
        self.imaging_period = int(imaging_period)  # Needs to be an integer
        self.normalize_trace = normalize_trace
        self.trans_func = 'id'
        self.trans_factor = 1.0
        self.filter_op = False
        self.noise_factor = None

        if ot_param is not None:
            self.trans_func = ot_param['trans_func_type']
            self.trans_factor = ot_param['trans_func_factor']
            self.velocity_bound = ot_param['velocity_bound']
            self.filter_op = ot_param['filter_op']
            self.freq_band = ot_param['freq_band']
            self.noise_factor = ot_param['noise_factor']
Ejemplo n.º 6
0
    def __init__(self,
                 solver,
                 parallel_wrap_shot=ParallelWrapShotNull(),
                 imaging_period=1):
        """imaging_period: Imaging happens every 'imaging_period' timesteps. Use higher numbers to reduce memory consumption at the cost of lower gradient accuracy.
            By assigning this value to the class, it will automatically be used when the gradient function of the temporal objective function is called in an inversion context.
        """
        self.solver = solver
        self.modeling_tools = TemporalModeling(solver)

        self.parallel_wrap_shot = parallel_wrap_shot

        self.imaging_period = int(imaging_period)  #Needs to be an integer
Ejemplo n.º 7
0
    def __init__(self,
                 solver,
                 model_window=IdentityModelWindow(),
                 data_window=IdentityDataWindow(),
                 parallel_wrap_shot=ParallelWrapShotNull(),
                 imaging_period=1):

        self.solver = solver

        self.modeling_tools = TemporalModeling(solver)

        self.parallel_wrap_shot = parallel_wrap_shot

        self.W_model = model_window
        self.W_data = data_window
        self.imaging_period = imaging_period
Ejemplo n.º 8
0
    def __init__(self,
                 solver,
                 filter_op=None,
                 parallel_wrap_shot=ParallelWrapShotNull(),
                 imaging_period=1,
                 normalize_trace=False,
                 regularization=None,
                 normalize_obs=True,
                 DownSample_op=opI()):
        """imaging_period: Imaging happens every 'imaging_period' timesteps. Use higher numbers to reduce memory consumption at the cost of lower gradient accuracy.
            By assigning this value to the class, it will automatically be used when the gradient function of the temporal objective function is called in an inversion context.
        """
        self.solver = solver
        self.modeling_tools = TemporalModeling(solver)
        self.regularization = regularization

        self.parallel_wrap_shot = parallel_wrap_shot

        self.imaging_period = int(imaging_period)  # Needs to be an integer
        self.filter_op = filter_op
        self.normalize_trace = normalize_trace
        self.normalize_obs = normalize_obs
        self.DownSample_op = DownSample_op