pytomoatt.checkerboard

Module for generating checkerboard model.

class pytomoatt.checkerboard.Checker(model_fname: str, para_fname='input_params.yml')[source]

Bases: object

Create checkerboard model by adding perturbations on an exist model

checkerboard(n_pert_x: int, n_pert_y: int, n_pert_z: int, pert_vel=0.08, pert_ani=0.04, ani_dir=45, lim_x=None, lim_y=None, lim_z=None)[source]

Create checkerboard

Parameters:
  • n_pert_x (float) – Multiple of period along X, e.g., set to 1 for 2 anomalies

  • n_pert_y (float) – Multiple of period along Y

  • n_pert_z (float) – Multiple of period along Z

  • pert_vel (float, optional) – Perturbation for velocity, defaults to 0.08

  • pert_ani (float, optional) – Perturbation for anisotropy, defaults to 0.04

  • ani_dir (float, optional) – Direction of fast velocity direction, defaults to 45

  • lim_x (list, optional) – Left and right bound along X, defaults to None

  • lim_y (list, optional) – Left and right bound along Y, defaults to None

  • lim_z (list, optional) – Left and right bound along Z, defaults to None

copy()[source]

Create a deep copy of the Checker object

Returns:

A copy of the Checker object

Return type:

Checker

write(fname)[source]

Write new model to h5 file

Parameters:

fname (str) – Path to output file