finesse.solutions.array.ArraySolution
¶
Overview
- class finesse.solutions.array.ArraySolution(name, parent, shape, xs, params)¶
Bases:
BaseSolution
Holds outputs from running a simulation.
This is essentially a wrapped up Numpy structured array whose named elements are the names of outputs in a model.
Detectors are stored in the array by their name. So you can use:
output['detector_name']
or, if the key has an attribute called name (as all Finesse.detectors do) it will use that, so using:
output[ifo.detector]
will return the same values.
The underlying storage format is a Numpy structured array. You can select runs by:
output[ifo.detector][a:b:c]
where a:b:c is your slice. Or you can select multiple outputs with:
output[['det1', 'det2']][a:b:c]
- Attributes
- namestr
Name to give to this analysis
parent
BaseSolution
parent: finesse.tree.TreeNode
- xtuple(ndarray)
Array of axes that have been scanned over
- shape
numpy.ndarray
The shape of the underlying data array. use a single integer for 1D outputs, N-dimensional outputs can be specified by using tuples, i.e. (10,5,100) for a 3D array with the requested sizes.
- params[array_like(objects)|array_like(str)]
Parameters associtated with each dimension of the data
Properties
The number of outputs that have been stored in here so far |
|
Returns all the outputs that have been stored. |
Methods
|
|
|
This method will setup this solution to allow for fast C access for updating the solution in simulations. |
|
Expands the output buffer by shape elements. |
|
Get legacy style data |
|
|
|
Calling this will compute all detector outputs and add an entry to the outputs stored. |
|
Write Finesse 2 style ASCII output file |