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().

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.

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"].