Skip to content

Doc: Add etc documentation to contribution guidelines#9

Open
ahms5 wants to merge 1 commit into
choras-org:developfrom
ahms5:doc/add_etc
Open

Doc: Add etc documentation to contribution guidelines#9
ahms5 wants to merge 1 commit into
choras-org:developfrom
ahms5:doc/add_etc

Conversation

@ahms5
Copy link
Copy Markdown
Contributor

@ahms5 ahms5 commented May 12, 2026

Add explaination how to add results on etc and impulse response to the doc.

@SilvinWillemsen SilvinWillemsen requested a review from mberz May 12, 2026 09:03
Copy link
Copy Markdown
Contributor

@mberz mberz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating this PR! I have added a couple of comments for improvement of the PR.

json_output.write(json.dumps(result_container, indent=4))


for ETC results assuming the etc of shape (n_receiver, n_fbands, n_times) and
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for ETC results assuming the etc of shape (n_receiver, n_fbands, n_times) and
for energy time curves - assuming the etc of shape (n_receiver, n_fbands, n_times) - and

Comment on lines +277 to +287
.. code-block:: python
for i_rec in range(n_receivers):
for i_frequency in range(n_bands):
result_container["results"][0]["responses"][i_rec]["receiverResults"].append(
{
"data": 10*np.log10(etc[i_rec, i_frequency]/1e-12).tolist(),
"t": times.tolist(),
"frequency": frequencies[i_frequency],
"type": "edc",
}
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if you could maybe also add an example which does not contain a loop so it's a bit easier to see the actual structure?

Writing Results
~~~~~~~~~~~~~~~

For impulse responses, the sampling rate is fixed to 44.1kHz:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is actually also possible to specify a sampling rate in via the simulation settings.

The corresponding property, which can also be picked up by the backend is:

input_data["simulationSettings"]["sampling_rate"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants