finesse.solutions.array.ArraySolution
¶
Overview
- class finesse.solutions.array.ArraySolution(name, parents, detector_workspaces, shape, xs, params)¶
Bases:
finesse.solutions.base.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]
- Parameters
name : str
Name to give to this analysis
parents :
BaseSolution
Parent solutions that have preceeded this solution being calculated. Can be None.
model :
Model
Model object to get simulation data from
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.
Properties
The number of outputs that have been stored in here so far |
|
Returns all the outputs that have been stored. |
|
Methods
|
|
|
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 |