pytomoatt.data

Module for handling middleware array data, including kernel, kernel density, and traveltime field, etc.

class pytomoatt.data.ATTData(fname: str, fname_params: str, fname_grid='OUTPUT_FILES/out_data_grid.h5')[source]

Bases: object

Read data from HDF5 or ASCII file

Parameters:
  • fname (str) – Path to data file

  • fname_params (str) – Path to input parameter file

  • fname_grid (str) – Path to grid file

classmethod read(fname: str, fname_params: str, fname_grid='OUTPUT_FILES/out_data_grid.h5', group_name='model', dataset_name=None, format='hdf5')[source]

Read data from HDF5 or ASCII file

Parameters:
  • fname (str) – Path to data file

  • fname_params (str) – Path to input parameter file

  • fname_grid (str) – Path to grid file

  • group_name (str) – Name of the group in the HDF5 file

  • dataset_name (str) – Name of the dataset in the HDF5 file

  • format (str, optional) – Format of the data file, defaults to ‘hdf5’

Returns:

An instance of ATTData

Return type:

ATTData

to_xarray()[source]

Convert to attarray.Dataset

Returns:

A multi-dimensional data base inheriting from xarray.Dataset

Return type:

attarray.DataSet