Embody


Transforms Module

A module that contains transformations: functions that can be applied to a simulation result.

Functions and values

Function or value Description

applyMetric metric simulationResult

Full Usage: applyMetric metric simulationResult

Parameters:
Returns: float<'metric>[]
Modifiers: inline
Type parameters: 'l, 't, 'metric

Apply a metric to the results of a simulation.

metric : NumericalMetric<'l, 't, 'metric>
simulationResult : SimulationResult<'l, 't>
Returns: float<'metric>[]

for2PositionsOf firstBodyName secondBodyName predicate simulationResult

Full Usage: for2PositionsOf firstBodyName secondBodyName predicate simulationResult

Parameters:
Returns: 'a[]

Apply a predicate to positions of a pair of bodies, for every recorded step of a simulation.

firstBodyName : string
secondBodyName : string
predicate : Position<'l> -> Position<'l> -> 'a
simulationResult : SimulationResult<'l, 't>
Returns: 'a[]

forPositionAndVelocityRelativeTo orbitingBodyName centralBodyName predicate simulationResult

Full Usage: forPositionAndVelocityRelativeTo orbitingBodyName centralBodyName predicate simulationResult

Parameters:
Returns: 'a[]

Apply a predicate to position and velocity of a body, **relative to** central body.

orbitingBodyName : string
centralBodyName : string
predicate : NumericalVector3<'l> -> NumericalVector3<'t> -> 'a
simulationResult : SimulationResult<'l, MeasureProduct<MeasureInverse<'t>, MeasureProduct<'l, MeasureOne>>>
Returns: 'a[]

forPositionOf bodyName predicate simulationResult

Full Usage: forPositionOf bodyName predicate simulationResult

Parameters:
Returns: 'a[]

Apply a predicate to position of a given body, for every recorded step of a simulation.

bodyName : string
predicate : Position<'l> -> 'a
simulationResult : SimulationResult<'l, 't>
Returns: 'a[]

timeSteps simulationResult

Full Usage: timeSteps simulationResult

Parameters:
Returns: Time<'t>[]

Extract all time steps. It might be helpful when gathering data for a graph.

simulationResult : SimulationResult<'l, 't>
Returns: Time<'t>[]