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:
Instantiate
DEISM(mode, roomtype).Call
update_room().Call
update_wall_materials().Call
update_freqs().Call
update_source_receiver()andupdate_directivities()in the roomtype-appropriate order.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
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.
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 |
|---|---|
|
Active room geometry |
|
Working wall-impedance values, usually interpolated to the active grid |
|
Working frequency grid |
|
Derived wavenumber grid |
|
Image-source and path-related state used by the computation |
|
Convex-room reflection-path state required by ARG source directivities |
|
Source directivity coefficients |
|
Receiver directivity coefficients |
|
Final computed result |
|
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 radianspressure_data:(N_freq, N_dir)radius: sampling sphere radius
Directivity initialization checks that the data frequencies match the current
params["freqs"].