API Reference

This page keeps hand-written explanations short and pulls method signatures and docstrings from the live code where practical. Workflow guidance belongs in Workflows and Parameter Dependencies; this page focuses on the public API surface.

Primary public class

DEISM is the main user-facing entry point.

Typical usage pattern:

  1. Instantiate DEISM(mode, roomtype).

  2. Call update_room().

  3. Call update_wall_materials().

  4. Call update_freqs().

  5. Call update_source_receiver() and update_directivities() in the roomtype-appropriate order.

  6. Call run_DEISM().

class deism.core_deism.DEISM(mode, roomtype, silent=False)[source]

User-facing workflow class for shoebox and convex DEISM simulations.

update_source_receiver(source=None, receiver=None)[source]

Update source and receiver positions with conflict checking

update_room(roomDimensions=None, wallCenters=None, roomVolumn=None, roomAreas=None)[source]

Update the room dimensions Inputs: For shoebox room: - roomDimensions: numpy array of size 3, the room dimensions [length, width, height] For convex room: - roomDimensions: numpy array of size (N, 3), N is the number of vertices of the room - wallCenters: numpy array of size (M, 3), M is the number of wall centers, used for more accurate impedance definition - roomVolumn: float, the room volumn - roomAreas: numpy array of size (M,), M is the number of walls, the areas of the walls

update_wall_materials(datain=None, freqs_bands=None, datatype=None)[source]

Update impedance parameters with conflict checking Inputs: - datain: numpy arrays of size 6 * len(frequency bands) for shoebox rooms (impedance and absorption coefficients), 1D numpy array for reverberation time - freqs_bands: numpy array of size len(frequency bands) - datatype: str, the type of the parameters to be converted 1. “imp”: impedance 2. “abs”: absorption coefficients 3. “t60”: reverberation time

update_directivities()[source]

Update the directivities

run_DEISM(if_clean_up=True, if_shutdown_ray=True)[source]

Run DEISM using the Numba backend (default).

Parameters:
  • if_clean_up (bool) – If True, delete large image arrays after computation.

  • if_shutdown_ray (bool) – Ignored (kept for backward compatibility). Only used by run_DEISM_ray().

run_DEISM_ray(if_clean_up=True, if_shutdown_ray=True)[source]

Run DEISM using the Ray backend (legacy).

Parameters:
  • if_clean_up (bool)

  • if_shutdown_ray (bool)

Supporting helpers

deism.data_loader.detect_conflicts(params)[source]

Print warnings for parameter conflicts. Does not modify params and does not raise.

Use this for diagnostics only. For enforcement (modify params for monopole, raise on invalid config), use ConflictChecks.check_all_conflicts(params) instead.

Suggested placement: after initializing all parameters, before running pre_calc_images_src_rec, run_DEISM, pre_calc_Wigner, init_source_directivity, init_receiver_directivity, or other DEISM-ARG functions.

class deism.data_loader.ConflictChecks[source]

Static methods for efficient parameter conflict checking

static directivity_checks(params)[source]

Check directivity-related parameter conflicts

static distance_spheres_checks(params)[source]

Check distance-related parameter conflicts

static wall_material_checks(params)[source]

Check wall material parameter conflicts

static distance_boundaries_checks(params)[source]

Check distance from source and receiver to the boundaries of the room

static check_all_conflicts(params)[source]

Run all conflict checks efficiently

Convex-room internals

New users should normally stay with DEISM. Room_deism_cpp is a lower level helper used by the convex-room path.

class deism.core_deism_arg.Room_deism_cpp(params, *choose_wall_centers)[source]

Low-level convex-room helper used by DEISM-ARG for room setup and images.

Important runtime fields

The most important entries in deism.params during the workflow are:

Runtime key

Meaning

roomSize / vertices

Active room geometry

impedance

Working wall-impedance values, usually interpolated to the active grid

freqs

Working frequency grid

waveNumbers

Derived wavenumber grid

images

Image-source and path-related state used by the computation

reflection_matrix

Convex-room reflection-path state required by ARG source directivities

C_nm_s / C_nm_s_ARG

Source directivity coefficients

C_vu_r

Receiver directivity coefficients

RTF

Final computed result

updated_where

Optional provenance tracking for when parameters were last refreshed

Directivity data expectations

For custom directivities, the loaded data is expected to be compatible with the active DEISM frequency grid:

  • frequencies: (N_freq,)

  • directions: (N_dir, 2) with azimuth and inclination in radians

  • pressure_data: (N_freq, N_dir)

  • radius: sampling sphere radius

Directivity initialization checks that the data frequencies match the current params["freqs"].