get_TS: Run a single simulation for a given parameter grid index

View source: R/simulation.R

get_TSR Documentation

Run a single simulation for a given parameter grid index

Description

This helper function extracts parameter values for a given simulation grid index, updates the working scatterer object accordingly (including reforge if needed), runs the target strength calculation, and formats the results for output.

Usage

get_TS(grid_index, object, parameters, simulation_grid, frequency, model)

Arguments

grid_index

Integer index of the row in simulation_grid to simulate.

object

Scatterer-class object.

parameters

List containing the values, distributions, or generating functions of parameter values that inform the TS model.

frequency

Frequency (Hz).

model

Model name. If multiple models are specified, the output will be a list of data frames, one for each model.

Details

This function is intended for internal use in both parallel and sequential simulation workflows. It handles object re-forging, parameter assignment, and result extraction for a single simulation instance.

Value

A named list of data frames, one per model, each containing the simulation results along with the model name and parameter values for this simulation.

See Also

target_strength, reforge


brandynlucca/acousticTS documentation built on July 4, 2025, 12:43 a.m.