Support parameter ranges and distributions in target definitions file #10
Replies: 4 comments
-
I was thinking about this and the ways we used to generate "TS" and visualize the results. In this case, I'll use "TS" as a generic term for the different types of scattering amplitudes, e.g., σbs, reduced scattering length (RSL), TS (10*log10(σbs)), ... I'll use "L" as some length measurement of the target. It can be length of the major/semi-major axis of an oblong target (L) or radius (a) for a sphere. "TS"("L"): "TS"(f): "TS"(θ): (tilt angle) "TS"(φ): (roll angle) "TS"("L" and θ) These can be generated at a constant g and h, or over variable g and h. I'm still working on how we implement them in the code and when we get to a web-based interface with graphics. |
Beta Was this translation helpful? Give feedback.
-
I've been testing out a table-based way of giving model parameters to the models (hinted at in #5), where each row of the table (a Pandas DataFrame in my testing) specifies the scalar parameters to use to generate a single TS estimate. It is then trivial to have Pandas apply the model code to each row in turn, or have a multi-processing module spread them across many CPUs (as wished for in #4). Specifying the model parameters in a dictionary, such as this:
makes it simple to convert to a DataFrame containing the Cartesian product of those parameters (e.g., all the combinations) - it's one line of code:
It also generalises well if more of the parameters are array quantites. For example, the 3D theta/phi for a range of frequencies would be:
|
Beta Was this translation helpful? Give feedback.
-
Very nice. There are advantages to pandas. It seems the initial dictionary could be generated from reading an input file in a yaml, json, xml, toml, ... format that the user provides. I don't think we would need to define the structure of that input file (I think that just requires adding ingest and parser functions), but the naming convention should be standardized. |
Beta Was this translation helpful? Give feedback.
-
Agreed - a particular input file format wouldn't then be required. The code can be readily written to accept a dictionary, a DataFrame, or a DataArray (Xarray) as long as they use the specified parameter names (keys, column names, coordinate names, respectively). |
Beta Was this translation helpful? Give feedback.
-
Have the ReferenceModels class implement the parameter range and distribution definitions in the
target definitions.toml
file.Beta Was this translation helpful? Give feedback.
All reactions