Skip to main content
A LIVE simulation answers the API with the numbers its result view shows. Two of the Simulation toolbox’s tools are built for it, and a session runs them directly with invokeTool, with no agent and no model charges: Both read the same evaluator as the result view, the agent and a code object’s study.optics() and study.plot(), so a Strehl ratio read here is the simulation’s strehl QoI and an exported table is the one in the view. Invoking tools requires the projects:write scope.

Read The Optics At A Point

structuredContent holds the whole result; content.text says the same in prose. The sections:
  • summary: rmsWavefrontNm, rmsWavefrontWaves, strehl (from the PSF, as the strehl QoI composes it), strehlMarechal, fwhm and ee50 / ee80 (in lod, and mas / urad when the train carries its telescope constants), lineOfSight (detectorUm, magnitudeUm, skyUrad, magnitudeUrad, magnitudeMas), changeRmsNm against the reference.
  • zernike: every term with its index in the convention, its noll and fringe indices, n, m, name and value.
  • surfaces: per optic and per segment, dx, dy, despace (m; a segment’s despace is its piston) and tip, tilt, clock (rad) in the surface’s local frame, the figure’s figureRmsNm and Zernike terms, and commanded, the part the declared pose axes command.
  • cases: every field and wavelength case with its RMS wavefront, Maréchal Strehl and line of sight.
  • mtf: fraction of the cutoff with the radial, x, y and diffractionLimited curves, cutoffCyclesPerMm and the detector’s nyquistFraction when known.
  • encircledEnergy: radiusLod, energy, diffractionLimited, ee50Lod, ee80Lod.
  • coronagraph: for raw, dug and held, the mean contrast and the contrast against separation (λ/D).
  • wavefront and psf: rows of the map (row 0 is the lowest y; null outside the pupil), with the grid, extent and units.

Any Display As Data And Files

structuredContent.record is the display’s data; the PNG comes back as an image part (source.data is base64), and the CSV or JSON text in content.text. With save: true the files are added to the project Library (or to parentId); exporting the same display under the same name again replaces them. A simulation offers the displays its physics can draw; asking for another answers 422 with the list it has.

The record format

Every record carries format: "davinci-simulation-plot/v1", a kind, a title and details (what the display’s caption says: the case, the wavelength, the Strehl…).
  • line, bars, polylines: xLabel, yLabel, logX, logY, series ([{name, x, y, dash?}]; bars also carry labels and hover), polylines ({x: [[...]], y: [[...]]} for a ray fan), markerX and markerLabel.
  • map: x and y (label, min, max at the cell edges, centers), value (label, unit), rows (row 0 is the lowest y; null outside the data) and the display range, colour map and stretch.
  • table: columns (key, label, unit) and rows keyed by column.

In A Code Object

A Python code object in the model reads the same results, so a script can build on them:
See the Simulation page for the result view these numbers come from.