k-Wave Output File

class kwave_output_file.DomainSamplingType

An enumeration.

class kwave_output_file.KWaveOutputFile(file_name, reorder_data=True)

Represents k-Wave output file.

__init__(file_name, reorder_data=True)

Constructor of k-Wave output file object.

Parameters
  • file_name – Name of the simulation output file.

  • reorder_data – Whether input file was created with data reordering enabled.

close()

Close the output file.

open()

Open the output file.

read_pressure_at_sensor(sampling_type: kwave_output_file.SensorSamplingType)

Read pressure at sensor points/indexes (assuming it was specified to k-Wave driver).

Parameters

sampling_type – One of reduction methods from SensorSamplingType enum.

Returns

Series or value (depending on reduction method) for each point/index in the sensor mask.

read_pressure_everywhere(sampling_type: kwave_output_file.DomainSamplingType)

Read pressure at all point in the simulation domain (assuming it was specified to k-Wave driver).

Parameters

sampling_type – One of reduction methods from DomainSamplingType enum.

Returns

Domain shaped array of pressure values loaded from the file.

read_spatial_properties()

Read spatial properties (size and resolution) of the simulation grid

Returns

Tuple of ((Nx, Ny, Nz), (Dx, Dy, Dz))

read_temporal_properties()

Read number and length of simulation time-steps.

Returns

Tuple of (Nt, dt).

read_velocity_at_sensor(sampling_type: kwave_output_file.SensorSamplingType, non_staggered_raw=False)

Read velocity in each direction X,Y,Z at sensor points/indexes (assuming it was specified to k-Wave driver).

Parameters

sampling_type – One of reduction methods from SensorSamplingType enum.

Returns

Triplet (Ux, Uy, Uz) of series or values (depending on reduction method) for each point/index in the sensor mask.

read_velocity_everywhere(sampling_type: kwave_output_file.DomainSamplingType)

Read velocity in each direction X,Y,Z at all point in the simulation domain.

Parameters

sampling_type – One of reduction methods from DomainSamplingType enum.

Returns

Triplet (Ux, Uy, Uz) of domain shaped arrays of velocity values loaded from the file.

class kwave_output_file.SensorSamplingType

An enumeration.