Run It
Every instrument is mocked, so the example runs without hardware.
bash
git clone https://github.com/tofupilot/panelscd panelstofupilot run random-vibrationThe procedure
procedure.yaml
name: Random Vibrationversion: 1.0.0plugs: - key: shaker name: Vibration controller python: plugs.shaker:ShakerControllermain: - key: random name: Random vibration python: phases.random_vibration:random_vibration measurements: - key: full_level_grms name: Control Grms at full level unit: "g" validators: - operator: ">=" expected_value: 12.69 - operator: "<=" expected_value: 15.51 ui: panel: panels/vibration.htmlThe panel
panels/vibration.html
<div class="inst" data-bind="ui.level"><svg viewBox="0 0 320 210" role="img"><rect x="1" y="1" width="318" height="208" rx="10" fill="#0d1014" stroke="#20262c" stroke-width="1.5"/><text x="20" y="30" text-anchor="start" style="font: 600 7.5px system-ui, sans-serif; letter-spacing: .16em; fill: #7d8791">CONTROL</text><g class="st s12"><rect x="150" y="21" width="33" height="13" rx="3"/><text x="166.5" y="30" text-anchor="middle" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: currentColor">−12</text></g><g class="st s6"><rect x="187" y="21" width="33" height="13" rx="3"/><text x="203.5" y="30" text-anchor="middle" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: currentColor">−6</text></g><g class="st s3"><rect x="224" y="21" width="33" height="13" rx="3"/><text x="240.5" y="30" text-anchor="middle" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: currentColor">−3</text></g><g class="st s0"><rect x="261" y="21" width="33" height="13" rx="3"/><text x="277.5" y="30" text-anchor="middle" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: currentColor">0 dB</text></g><path d="M40.0 58V180" stroke="#1a1f25"/><path d="M90.9 58V180" stroke="#1a1f25"/><path d="M129.5 58V180" stroke="#1a1f25"/><path d="M168.0 58V180" stroke="#1a1f25"/><path d="M218.9 58V180" stroke="#1a1f25"/><path d="M257.5 58V180" stroke="#1a1f25"/><path d="M296.0 58V180" stroke="#1a1f25"/><path d="M40 58.0H296" stroke="#1a1f25"/><path d="M40 88.5H296" stroke="#1a1f25"/><path d="M40 119.0H296" stroke="#1a1f25"/><path d="M40 149.5H296" stroke="#1a1f25"/><path d="M40 180.0H296" stroke="#1a1f25"/><text x="40.0" y="192" text-anchor="middle" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: #4b545d">20</text><text x="129.5" y="192" text-anchor="middle" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: #4b545d">100</text><text x="257.5" y="192" text-anchor="middle" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: #4b545d">1k</text><text x="296.0" y="192" text-anchor="middle" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: #4b545d">2k Hz</text><text x="35" y="60.5" text-anchor="end" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: #4b545d">1</text><text x="35" y="121.5" text-anchor="end" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: #4b545d">10⁻²</text><text x="35" y="182.5" text-anchor="end" style="font: 600 6.5px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: #4b545d">10⁻⁴</text><text x="20" y="46" text-anchor="start" data-bind="ui.grms" style="font: 600 10px ui-monospace, Menlo, monospace; letter-spacing: 0; fill: #f2f4f6">STOPPED</text><g class="lv l12"><path d="M40.0 124.8L43.7 123.0L47.3 121.3L51.0 119.6L54.6 117.8L58.3 116.1L61.9 114.3L65.6 112.6L69.3 110.8L72.9 109.1L76.6 107.4L80.2 105.6L83.9 103.9L87.5 102.1L91.2 100.5L94.9 100.5L98.5 100.5L102.2 100.5L105.8 100.5L109.5 100.5L113.1 100.5L116.8 100.5L120.5 100.5L124.1 100.5L127.8 100.5L131.4 100.5L135.1 100.5L138.7 100.5L142.4 100.5L146.1 100.5L149.7 100.5L153.4 100.5L157.0 100.5L160.7 100.5L164.3 100.5L168.0 100.5L171.7 100.5L175.3 100.5L179.0 100.5L182.6 100.5L186.3 100.5L189.9 100.5L193.6 100.5L197.3 100.5L200.9 100.5L204.6 100.5L208.2 100.5L211.9 100.5L215.5 100.5L219.2 100.5L222.9 100.5L226.5 100.5L230.2 100.5L233.8 100.5L237.5 100.5L241.1 100.5L244.8 100.5L248.5 102.1L252.1 103.9L255.8 105.6L259.4 107.4L263.1 109.1L266.7 110.8L270.4 112.6L274.1 114.3L277.7 116.1L281.4 117.8L285.0 119.6L288.7 121.3L292.3 123.0L296.0 124.8" stroke="#e5383b" stroke-width=".9" stroke-dasharray="3 3" fill="none"/><path d="M40.0 161.5L43.7 159.8L47.3 158.0L51.0 156.3L54.6 154.5L58.3 152.8L61.9 151.1L65.6 149.3L69.3 147.6L72.9 145.8L76.6 144.1L80.2 142.3L83.9 140.6L87.5 138.9L91.2 137.2L94.9 137.2L98.5 137.2L102.2 137.2L105.8 137.2L109.5 137.2L113.1 137.2L116.8 137.2L120.5 137.2L124.1 137.2L127.8 137.2L131.4 137.2L135.1 137.2L138.7 137.2L142.4 137.2L146.1 137.2L149.7 137.2L153.4 137.2L157.0 137.2L160.7 137.2L164.3 137.2L168.0 137.2L171.7 137.2L175.3 137.2L179.0 137.2L182.6 137.2L186.3 137.2L189.9 137.2L193.6 137.2L197.3 137.2L200.9 137.2L204.6 137.2L208.2 137.2L211.9 137.2L215.5 137.2L219.2 137.2L222.9 137.2L226.5 137.2L230.2 137.2L233.8 137.2L237.5 137.2L241.1 137.2L244.8 137.2L248.5 138.9L252.1 140.6L255.8 142.3L259.4 144.1L263.1 145.8L266.7 147.6L270.4 149.3L274.1 151.1L277.7 152.8L281.4 154.5L285.0 156.3L288.7 158.0L292.3 159.8L296.0 161.5" stroke="#e5383b" stroke-width=".9" stroke-dasharray="3 3" fill="none"/><path d="M40.0 134.0L43.7 132.2L47.3 130.5L51.0 128.7L54.6 127.0L58.3 125.3L61.9 123.5L65.6 121.8L69.3 120.0L72.9 118.3L76.6 116.5L80.2 114.8L83.9 113.1L87.5 111.3L91.2 109.7L94.9 109.7L98.5 109.7L102.2 109.7L105.8 109.7L109.5 109.7L113.1 109.7L116.8 109.7L120.5 109.7L124.1 109.7L127.8 109.7L131.4 109.7L135.1 109.7L138.7 109.7L142.4 109.7L146.1 109.7L149.7 109.7L153.4 109.7L157.0 109.7L160.7 109.7L164.3 109.7L168.0 109.7L171.7 109.7L175.3 109.7L179.0 109.7L182.6 109.7L186.3 109.7L189.9 109.7L193.6 109.7L197.3 109.7L200.9 109.7L204.6 109.7L208.2 109.7L211.9 109.7L215.5 109.7L219.2 109.7L222.9 109.7L226.5 109.7L230.2 109.7L233.8 109.7L237.5 109.7L241.1 109.7L244.8 109.7L248.5 111.3L252.1 113.1L255.8 114.8L259.4 116.5L263.1 118.3L266.7 120.0L270.4 121.8L274.1 123.5L277.7 125.3L281.4 127.0L285.0 128.7L288.7 130.5L292.3 132.2L296.0 134.0" stroke="#f2c230" stroke-width=".9" stroke-dasharray="4 3" fill="none"/><path d="M40.0 152.3L43.7 150.6L47.3 148.8L51.0 147.1L54.6 145.4L58.3 143.6L61.9 141.9L65.6 140.1L69.3 138.4L72.9 136.6L76.6 134.9L80.2 133.2L83.9 131.4L87.5 129.7L91.2 128.1L94.9 128.1L98.5 128.1L102.2 128.1L105.8 128.1L109.5 128.1L113.1 128.1L116.8 128.1L120.5 128.1L124.1 128.1L127.8 128.1L131.4 128.1L135.1 128.1L138.7 128.1L142.4 128.1L146.1 128.1L149.7 128.1L153.4 128.1L157.0 128.1L160.7 128.1L164.3 128.1L168.0 128.1L171.7 128.1L175.3 128.1L179.0 128.1L182.6 128.1L186.3 128.1L189.9 128.1L193.6 128.1L197.3 128.1L200.9 128.1L204.6 128.1L208.2 128.1L211.9 128.1L215.5 128.1L219.2 128.1L222.9 128.1L226.5 128.1L230.2 128.1L233.8 128.1L237.5 128.1L241.1 128.1L244.8 128.1L248.5 129.7L252.1 131.4L255.8 133.2L259.4 134.9L263.1 136.6L266.7 138.4L270.4 140.1L274.1 141.9L277.7 143.6L281.4 145.4L285.0 147.1L288.7 148.8L292.3 150.6L296.0 152.3" stroke="#f2c230" stroke-width=".9" stroke-dasharray="4 3" fill="none"/><path d="M40.0 143.1L43.7 141.4L47.3 139.7L51.0 137.9L54.6 136.2L58.3 134.4L61.9 132.7L65.6 130.9L69.3 129.2L72.9 127.5L76.6 125.7L80.2 124.0L83.9 122.2L87.5 120.5L91.2 118.9L94.9 118.9L98.5 118.9L102.2 118.9L105.8 118.9L109.5 118.9L113.1 118.9L116.8 118.9L120.5 118.9L124.1 118.9L127.8 118.9L131.4 118.9L135.1 118.9L138.7 118.9L142.4 118.9L146.1 118.9L149.7 118.9L153.4 118.9L157.0 118.9L160.7 118.9L164.3 118.9L168.0 118.9L171.7 118.9L175.3 118.9L179.0 118.9L182.6 118.9L186.3 118.9L189.9 118.9L193.6 118.9L197.3 118.9L200.9 118.9L204.6 118.9L208.2 118.9L211.9 118.9L215.5 118.9L219.2 118.9L222.9 118.9L226.5 118.9L230.2 118.9L233.8 118.9L237.5 118.9L241.1 118.9L244.8 118.9L248.5 120.5L252.1 122.2L255.8 124.0L259.4 125.7L263.1 127.5L266.7 129.2L270.4 130.9L274.1 132.7L277.7 134.4L281.4 136.2L285.0 137.9L288.7 139.7L292.3 141.4L296.0 143.1" stroke="#f2f4f6" stroke-width="1.3" fill="none"/></g><g class="lv l6"><path d="M40.0 106.5L43.7 104.7L47.3 103.0L51.0 101.3L54.6 99.5L58.3 97.8L61.9 96.0L65.6 94.3L69.3 92.5L72.9 90.8L76.6 89.1L80.2 87.3L83.9 85.6L87.5 83.8L91.2 82.2L94.9 82.2L98.5 82.2L102.2 82.2L105.8 82.2L109.5 82.2L113.1 82.2L116.8 82.2L120.5 82.2L124.1 82.2L127.8 82.2L131.4 82.2L135.1 82.2L138.7 82.2L142.4 82.2L146.1 82.2L149.7 82.2L153.4 82.2L157.0 82.2L160.7 82.2L164.3 82.2L168.0 82.2L171.7 82.2L175.3 82.2L179.0 82.2L182.6 82.2L186.3 82.2L189.9 82.2L193.6 82.2L197.3 82.2L200.9 82.2L204.6 82.2L208.2 82.2L211.9 82.2L215.5 82.2L219.2 82.2L222.9 82.2L226.5 82.2L230.2 82.2L233.8 82.2L237.5 82.2L241.1 82.2L244.8 82.2L248.5 83.8L252.1 85.6L255.8 87.3L259.4 89.1L263.1 90.8L266.7 92.5L270.4 94.3L274.1 96.0L277.7 97.8L281.4 99.5L285.0 101.3L288.7 103.0L292.3 104.7L296.0 106.5" stroke="#e5383b" stroke-width=".9" stroke-dasharray="3 3" fill="none"/><path d="M40.0 143.2L43.7 141.5L47.3 139.7L51.0 138.0L54.6 136.2L58.3 134.5L61.9 132.8L65.6 131.0L69.3 129.3L72.9 127.5L76.6 125.8L80.2 124.0L83.9 122.3L87.5 120.6L91.2 118.9L94.9 118.9L98.5 118.9L102.2 118.9L105.8 118.9L109.5 118.9L113.1 118.9L116.8 118.9L120.5 118.9L124.1 118.9L127.8 118.9L131.4 118.9L135.1 118.9L138.7 118.9L142.4 118.9L146.1 118.9L149.7 118.9L153.4 118.9L157.0 118.9L160.7 118.9L164.3 118.9L168.0 118.9L171.7 118.9L175.3 118.9L179.0 118.9L182.6 118.9L186.3 118.9L189.9 118.9L193.6 118.9L197.3 118.9L200.9 118.9L204.6 118.9L208.2 118.9L211.9 118.9L215.5 118.9L219.2 118.9L222.9 118.9L226.5 118.9L230.2 118.9L233.8 118.9L237.5 118.9L241.1 118.9L244.8 118.9L248.5 120.6L252.1 122.3L255.8 124.0L259.4 125.8L263.1 127.5L266.7 129.3L270.4 131.0L274.1 132.8L277.7 134.5L281.4 136.2L285.0 138.0L288.7 139.7L292.3 141.5L296.0 143.2" stroke="#e5383b" stroke-width=".9" stroke-dasharray="3 3" fill="none"/><path d="M40.0 115.7L43.7 113.9L47.3 112.2L51.0 110.4L54.6 108.7L58.3 107.0L61.9 105.2L65.6 103.5L69.3 101.7L72.9 100.0L76.6 98.2L80.2 96.5L83.9 94.8L87.5 93.0L91.2 91.4L94.9 91.4L98.5 91.4L102.2 91.4L105.8 91.4L109.5 91.4L113.1 91.4L116.8 91.4L120.5 91.4L124.1 91.4L127.8 91.4L131.4 91.4L135.1 91.4L138.7 91.4L142.4 91.4L146.1 91.4L149.7 91.4L153.4 91.4L157.0 91.4L160.7 91.4L164.3 91.4L168.0 91.4L171.7 91.4L175.3 91.4L179.0 91.4L182.6 91.4L186.3 91.4L189.9 91.4L193.6 91.4L197.3 91.4L200.9 91.4L204.6 91.4L208.2 91.4L211.9 91.4L215.5 91.4L219.2 91.4L222.9 91.4L226.5 91.4L230.2 91.4L233.8 91.4L237.5 91.4L241.1 91.4L244.8 91.4L248.5 93.0L252.1 94.8L255.8 96.5L259.4 98.2L263.1 100.0L266.7 101.7L270.4 103.5L274.1 105.2L277.7 107.0L281.4 108.7L285.0 110.4L288.7 112.2L292.3 113.9L296.0 115.7" stroke="#f2c230" stroke-width=".9" stroke-dasharray="4 3" fill="none"/><path d="M40.0 134.0L43.7 132.3L47.3 130.5L51.0 128.8L54.6 127.1L58.3 125.3L61.9 123.6L65.6 121.8L69.3 120.1L72.9 118.3L76.6 116.6L80.2 114.9L83.9 113.1L87.5 111.4L91.2 109.8L94.9 109.8L98.5 109.8L102.2 109.8L105.8 109.8L109.5 109.8L113.1 109.8L116.8 109.8L120.5 109.8L124.1 109.8L127.8 109.8L131.4 109.8L135.1 109.8L138.7 109.8L142.4 109.8L146.1 109.8L149.7 109.8L153.4 109.8L157.0 109.8L160.7 109.8L164.3 109.8L168.0 109.8L171.7 109.8L175.3 109.8L179.0 109.8L182.6 109.8L186.3 109.8L189.9 109.8L193.6 109.8L197.3 109.8L200.9 109.8L204.6 109.8L208.2 109.8L211.9 109.8L215.5 109.8L219.2 109.8L222.9 109.8L226.5 109.8L230.2 109.8L233.8 109.8L237.5 109.8L241.1 109.8L244.8 109.8L248.5 111.4L252.1 113.1L255.8 114.9L259.4 116.6L263.1 118.3L266.7 120.1L270.4 121.8L274.1 123.6L277.7 125.3L281.4 127.1L285.0 128.8L288.7 130.5L292.3 132.3L296.0 134.0" stroke="#f2c230" stroke-width=".9" stroke-dasharray="4 3" fill="none"/><path d="M40.0 124.8L43.7 123.1L47.3 121.4L51.0 119.6L54.6 117.9L58.3 116.1L61.9 114.4L65.6 112.6L69.3 110.9L72.9 109.2L76.6 107.4L80.2 105.7L83.9 103.9L87.5 102.2L91.2 100.6L94.9 100.6L98.5 100.6L102.2 100.6L105.8 100.6L109.5 100.6L113.1 100.6L116.8 100.6L120.5 100.6L124.1 100.6L127.8 100.6L131.4 100.6L135.1 100.6L138.7 100.6L142.4 100.6L146.1 100.6L149.7 100.6L153.4 100.6L157.0 100.6L160.7 100.6L164.3 100.6L168.0 100.6L171.7 100.6L175.3 100.6L179.0 100.6L182.6 100.6L186.3 100.6L189.9 100.6L193.6 100.6L197.3 100.6L200.9 100.6L204.6 100.6L208.2 100.6L211.9 100.6L215.5 100.6L219.2 100.6L222.9 100.6L226.5 100.6L230.2 100.6L233.8 100.6L237.5 100.6L241.1 100.6L244.8 100.6L248.5 102.2L252.1 103.9L255.8 105.7L259.4 107.4L263.1 109.2L266.7 110.9L270.4 112.6L274.1 114.4L277.7 116.1L281.4 117.9L285.0 119.6L288.7 121.4L292.3 123.1L296.0 124.8" stroke="#f2f4f6" stroke-width="1.3" fill="none"/></g><g class="lv l3"><path d="M40.0 97.3L43.7 95.6L47.3 93.9L51.0 92.1L54.6 90.4L58.3 88.6L61.9 86.9L65.6 85.1L69.3 83.4L72.9 81.7L76.6 79.9L80.2 78.2L83.9 76.4L87.5 74.7L91.2 73.1L94.9 73.1L98.5 73.1L102.2 73.1L105.8 73.1L109.5 73.1L113.1 73.1L116.8 73.1L120.5 73.1L124.1 73.1L127.8 73.1L131.4 73.1L135.1 73.1L138.7 73.1L142.4 73.1L146.1 73.1L149.7 73.1L153.4 73.1L157.0 73.1L160.7 73.1L164.3 73.1L168.0 73.1L171.7 73.1L175.3 73.1L179.0 73.1L182.6 73.1L186.3 73.1L189.9 73.1L193.6 73.1L197.3 73.1L200.9 73.1L204.6 73.1L208.2 73.1L211.9 73.1L215.5 73.1L219.2 73.1L222.9 73.1L226.5 73.1L230.2 73.1L233.8 73.1L237.5 73.1L241.1 73.1L244.8 73.1L248.5 74.7L252.1 76.4L255.8 78.2L259.4 79.9L263.1 81.7L266.7 83.4L270.4 85.1L274.1 86.9L277.7 88.6L281.4 90.4L285.0 92.1L288.7 93.9L292.3 95.6L296.0 97.3" stroke="#e5383b" stroke-width=".9" stroke-dasharray="3 3" fill="none"/><path d="M40.0 134.1L43.7 132.3L47.3 130.6L51.0 128.8L54.6 127.1L58.3 125.3L61.9 123.6L65.6 121.9L69.3 120.1L72.9 118.4L76.6 116.6L80.2 114.9L83.9 113.1L87.5 111.4L91.2 109.8L94.9 109.8L98.5 109.8L102.2 109.8L105.8 109.8L109.5 109.8L113.1 109.8L116.8 109.8L120.5 109.8L124.1 109.8L127.8 109.8L131.4 109.8L135.1 109.8L138.7 109.8L142.4 109.8L146.1 109.8L149.7 109.8L153.4 109.8L157.0 109.8L160.7 109.8L164.3 109.8L168.0 109.8L171.7 109.8L175.3 109.8L179.0 109.8L182.6 109.8L186.3 109.8L189.9 109.8L193.6 109.8L197.3 109.8L200.9 109.8L204.6 109.8L208.2 109.8L211.9 109.8L215.5 109.8L219.2 109.8L222.9 109.8L226.5 109.8L230.2 109.8L233.8 109.8L237.5 109.8L241.1 109.8L244.8 109.8L248.5 111.4L252.1 113.1L255.8 114.9L259.4 116.6L263.1 118.4L266.7 120.1L270.4 121.9L274.1 123.6L277.7 125.3L281.4 127.1L285.0 128.8L288.7 130.6L292.3 132.3L296.0 134.1" stroke="#e5383b" stroke-width=".9" stroke-dasharray="3 3" fill="none"/><path d="M40.0 106.5L43.7 104.8L47.3 103.0L51.0 101.3L54.6 99.5L58.3 97.8L61.9 96.1L65.6 94.3L69.3 92.6L72.9 90.8L76.6 89.1L80.2 87.3L83.9 85.6L87.5 83.9L91.2 82.2L94.9 82.2L98.5 82.2L102.2 82.2L105.8 82.2L109.5 82.2L113.1 82.2L116.8 82.2L120.5 82.2L124.1 82.2L127.8 82.2L131.4 82.2L135.1 82.2L138.7 82.2L142.4 82.2L146.1 82.2L149.7 82.2L153.4 82.2L157.0 82.2L160.7 82.2L164.3 82.2L168.0 82.2L171.7 82.2L175.3 82.2L179.0 82.2L182.6 82.2L186.3 82.2L189.9 82.2L193.6 82.2L197.3 82.2L200.9 82.2L204.6 82.2L208.2 82.2L211.9 82.2L215.5 82.2L219.2 82.2L222.9 82.2L226.5 82.2L230.2 82.2L233.8 82.2L237.5 82.2L241.1 82.2L244.8 82.2L248.5 83.9L252.1 85.6L255.8 87.3L259.4 89.1L263.1 90.8L266.7 92.6L270.4 94.3L274.1 96.1L277.7 97.8L281.4 99.5L285.0 101.3L288.7 103.0L292.3 104.8L296.0 106.5" stroke="#f2c230" stroke-width=".9" stroke-dasharray="4 3" fill="none"/><path d="M40.0 124.9L43.7 123.1L47.3 121.4L51.0 119.7L54.6 117.9L58.3 116.2L61.9 114.4L65.6 112.7L69.3 110.9L72.9 109.2L76.6 107.5L80.2 105.7L83.9 104.0L87.5 102.2L91.2 100.6L94.9 100.6L98.5 100.6L102.2 100.6L105.8 100.6L109.5 100.6L113.1 100.6L116.8 100.6L120.5 100.6L124.1 100.6L127.8 100.6L131.4 100.6L135.1 100.6L138.7 100.6L142.4 100.6L146.1 100.6L149.7 100.6L153.4 100.6L157.0 100.6L160.7 100.6L164.3 100.6L168.0 100.6L171.7 100.6L175.3 100.6L179.0 100.6L182.6 100.6L186.3 100.6L189.9 100.6L193.6 100.6L197.3 100.6L200.9 100.6L204.6 100.6L208.2 100.6L211.9 100.6L215.5 100.6L219.2 100.6L222.9 100.6L226.5 100.6L230.2 100.6L233.8 100.6L237.5 100.6L241.1 100.6L244.8 100.6L248.5 102.2L252.1 104.0L255.8 105.7L259.4 107.5L263.1 109.2L266.7 110.9L270.4 112.7L274.1 114.4L277.7 116.2L281.4 117.9L285.0 119.7L288.7 121.4L292.3 123.1L296.0 124.9" stroke="#f2c230" stroke-width=".9" stroke-dasharray="4 3" fill="none"/><path d="M40.0 115.7L43.7 114.0L47.3 112.2L51.0 110.5L54.6 108.7L58.3 107.0L61.9 105.2L65.6 103.5L69.3 101.8L72.9 100.0L76.6 98.3L80.2 96.5L83.9 94.8L87.5 93.0L91.2 91.4L94.9 91.4L98.5 91.4L102.2 91.4L105.8 91.4L109.5 91.4L113.1 91.4L116.8 91.4L120.5 91.4L124.1 91.4L127.8 91.4L131.4 91.4L135.1 91.4L138.7 91.4L142.4 91.4L146.1 91.4L149.7 91.4L153.4 91.4L157.0 91.4L160.7 91.4L164.3 91.4L168.0 91.4L171.7 91.4L175.3 91.4L179.0 91.4L182.6 91.4L186.3 91.4L189.9 91.4L193.6 91.4L197.3 91.4L200.9 91.4L204.6 91.4L208.2 91.4L211.9 91.4L215.5 91.4L219.2 91.4L222.9 91.4L226.5 91.4L230.2 91.4L233.8 91.4L237.5 91.4L241.1 91.4L244.8 91.4L248.5 93.0L252.1 94.8L255.8 96.5L259.4 98.3L263.1 100.0L266.7 101.8L270.4 103.5L274.1 105.2L277.7 107.0L281.4 108.7L285.0 110.5L288.7 112.2L292.3 114.0L296.0 115.7" stroke="#f2f4f6" stroke-width="1.3" fill="none"/></g><g class="lv l0"><path d="M40.0 88.2L43.7 86.4L47.3 84.7L51.0 83.0L54.6 81.2L58.3 79.5L61.9 77.7L65.6 76.0L69.3 74.2L72.9 72.5L76.6 70.8L80.2 69.0L83.9 67.3L87.5 65.5L91.2 63.9L94.9 63.9L98.5 63.9L102.2 63.9L105.8 63.9L109.5 63.9L113.1 63.9L116.8 63.9L120.5 63.9L124.1 63.9L127.8 63.9L131.4 63.9L135.1 63.9L138.7 63.9L142.4 63.9L146.1 63.9L149.7 63.9L153.4 63.9L157.0 63.9L160.7 63.9L164.3 63.9L168.0 63.9L171.7 63.9L175.3 63.9L179.0 63.9L182.6 63.9L186.3 63.9L189.9 63.9L193.6 63.9L197.3 63.9L200.9 63.9L204.6 63.9L208.2 63.9L211.9 63.9L215.5 63.9L219.2 63.9L222.9 63.9L226.5 63.9L230.2 63.9L233.8 63.9L237.5 63.9L241.1 63.9L244.8 63.9L248.5 65.5L252.1 67.3L255.8 69.0L259.4 70.8L263.1 72.5L266.7 74.2L270.4 76.0L274.1 77.7L277.7 79.5L281.4 81.2L285.0 83.0L288.7 84.7L292.3 86.4L296.0 88.2" stroke="#e5383b" stroke-width=".9" stroke-dasharray="3 3" fill="none"/><path d="M40.0 124.9L43.7 123.2L47.3 121.4L51.0 119.7L54.6 117.9L58.3 116.2L61.9 114.5L65.6 112.7L69.3 111.0L72.9 109.2L76.6 107.5L80.2 105.7L83.9 104.0L87.5 102.3L91.2 100.6L94.9 100.6L98.5 100.6L102.2 100.6L105.8 100.6L109.5 100.6L113.1 100.6L116.8 100.6L120.5 100.6L124.1 100.6L127.8 100.6L131.4 100.6L135.1 100.6L138.7 100.6L142.4 100.6L146.1 100.6L149.7 100.6L153.4 100.6L157.0 100.6L160.7 100.6L164.3 100.6L168.0 100.6L171.7 100.6L175.3 100.6L179.0 100.6L182.6 100.6L186.3 100.6L189.9 100.6L193.6 100.6L197.3 100.6L200.9 100.6L204.6 100.6L208.2 100.6L211.9 100.6L215.5 100.6L219.2 100.6L222.9 100.6L226.5 100.6L230.2 100.6L233.8 100.6L237.5 100.6L241.1 100.6L244.8 100.6L248.5 102.3L252.1 104.0L255.8 105.7L259.4 107.5L263.1 109.2L266.7 111.0L270.4 112.7L274.1 114.5L277.7 116.2L281.4 117.9L285.0 119.7L288.7 121.4L292.3 123.2L296.0 124.9" stroke="#e5383b" stroke-width=".9" stroke-dasharray="3 3" fill="none"/><path d="M40.0 97.4L43.7 95.6L47.3 93.9L51.0 92.1L54.6 90.4L58.3 88.7L61.9 86.9L65.6 85.2L69.3 83.4L72.9 81.7L76.6 79.9L80.2 78.2L83.9 76.5L87.5 74.7L91.2 73.1L94.9 73.1L98.5 73.1L102.2 73.1L105.8 73.1L109.5 73.1L113.1 73.1L116.8 73.1L120.5 73.1L124.1 73.1L127.8 73.1L131.4 73.1L135.1 73.1L138.7 73.1L142.4 73.1L146.1 73.1L149.7 73.1L153.4 73.1L157.0 73.1L160.7 73.1L164.3 73.1L168.0 73.1L171.7 73.1L175.3 73.1L179.0 73.1L182.6 73.1L186.3 73.1L189.9 73.1L193.6 73.1L197.3 73.1L200.9 73.1L204.6 73.1L208.2 73.1L211.9 73.1L215.5 73.1L219.2 73.1L222.9 73.1L226.5 73.1L230.2 73.1L233.8 73.1L237.5 73.1L241.1 73.1L244.8 73.1L248.5 74.7L252.1 76.5L255.8 78.2L259.4 79.9L263.1 81.7L266.7 83.4L270.4 85.2L274.1 86.9L277.7 88.7L281.4 90.4L285.0 92.1L288.7 93.9L292.3 95.6L296.0 97.4" stroke="#f2c230" stroke-width=".9" stroke-dasharray="4 3" fill="none"/><path d="M40.0 115.7L43.7 114.0L47.3 112.2L51.0 110.5L54.6 108.8L58.3 107.0L61.9 105.3L65.6 103.5L69.3 101.8L72.9 100.0L76.6 98.3L80.2 96.6L83.9 94.8L87.5 93.1L91.2 91.5L94.9 91.5L98.5 91.5L102.2 91.5L105.8 91.5L109.5 91.5L113.1 91.5L116.8 91.5L120.5 91.5L124.1 91.5L127.8 91.5L131.4 91.5L135.1 91.5L138.7 91.5L142.4 91.5L146.1 91.5L149.7 91.5L153.4 91.5L157.0 91.5L160.7 91.5L164.3 91.5L168.0 91.5L171.7 91.5L175.3 91.5L179.0 91.5L182.6 91.5L186.3 91.5L189.9 91.5L193.6 91.5L197.3 91.5L200.9 91.5L204.6 91.5L208.2 91.5L211.9 91.5L215.5 91.5L219.2 91.5L222.9 91.5L226.5 91.5L230.2 91.5L233.8 91.5L237.5 91.5L241.1 91.5L244.8 91.5L248.5 93.1L252.1 94.8L255.8 96.6L259.4 98.3L263.1 100.0L266.7 101.8L270.4 103.5L274.1 105.3L277.7 107.0L281.4 108.8L285.0 110.5L288.7 112.2L292.3 114.0L296.0 115.7" stroke="#f2c230" stroke-width=".9" stroke-dasharray="4 3" fill="none"/><path d="M40.0 106.5L43.7 104.8L47.3 103.1L51.0 101.3L54.6 99.6L58.3 97.8L61.9 96.1L65.6 94.3L69.3 92.6L72.9 90.9L76.6 89.1L80.2 87.4L83.9 85.6L87.5 83.9L91.2 82.3L94.9 82.3L98.5 82.3L102.2 82.3L105.8 82.3L109.5 82.3L113.1 82.3L116.8 82.3L120.5 82.3L124.1 82.3L127.8 82.3L131.4 82.3L135.1 82.3L138.7 82.3L142.4 82.3L146.1 82.3L149.7 82.3L153.4 82.3L157.0 82.3L160.7 82.3L164.3 82.3L168.0 82.3L171.7 82.3L175.3 82.3L179.0 82.3L182.6 82.3L186.3 82.3L189.9 82.3L193.6 82.3L197.3 82.3L200.9 82.3L204.6 82.3L208.2 82.3L211.9 82.3L215.5 82.3L219.2 82.3L222.9 82.3L226.5 82.3L230.2 82.3L233.8 82.3L237.5 82.3L241.1 82.3L244.8 82.3L248.5 83.9L252.1 85.6L255.8 87.4L259.4 89.1L263.1 90.9L266.7 92.6L270.4 94.3L274.1 96.1L277.7 97.8L281.4 99.6L285.0 101.3L288.7 103.1L292.3 104.8L296.0 106.5" stroke="#f2f4f6" stroke-width="1.3" fill="none"/></g><g class="pp" data-bind="ui.p0" style="--x: 40.0px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p1" style="--x: 47.3px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p2" style="--x: 54.6px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p3" style="--x: 61.9px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p4" style="--x: 69.3px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p5" style="--x: 76.6px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p6" style="--x: 83.9px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p7" style="--x: 91.2px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p8" style="--x: 98.5px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p9" style="--x: 105.8px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p10" style="--x: 113.1px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p11" style="--x: 120.5px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p12" style="--x: 127.8px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p13" style="--x: 135.1px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p14" style="--x: 142.4px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p15" style="--x: 149.7px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p16" style="--x: 157.0px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p17" style="--x: 164.3px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p18" style="--x: 171.7px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p19" style="--x: 179.0px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p20" style="--x: 186.3px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p21" style="--x: 193.6px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p22" style="--x: 200.9px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p23" style="--x: 208.2px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p24" style="--x: 215.5px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p25" style="--x: 222.9px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p26" style="--x: 230.2px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p27" style="--x: 237.5px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p28" style="--x: 244.8px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p29" style="--x: 252.1px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p30" style="--x: 259.4px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p31" style="--x: 266.7px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p32" style="--x: 274.1px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p33" style="--x: 281.4px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p34" style="--x: 288.7px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g><g class="pp" data-bind="ui.p35" style="--x: 296.0px"><rect x="-2" y="-1" width="4" height="2" rx="1"/></g></svg></div><style> .inst { width: min(560px, 100%); margin: 0 auto; } .inst svg { display: block; width: 100%; height: auto; } .inst text { font-family: system-ui, sans-serif; } .dp rect { fill: var(--off); } .dp.on rect, .dp[data-value=true] rect { fill: var(--on); } .led circle { fill: #2a2f35; transition: fill .15s; } .led[data-value=true] circle { fill: var(--led, #38e07a); } .ann text { fill: var(--off); transition: fill .15s; } .ann[data-value=true] text { fill: var(--on); } .d7 rect { fill: var(--off); transition: fill .08s; } .d7[data-value="0"] :is(.sa, .sb, .sc, .sd, .se, .sf) { fill: var(--on); } .d7[data-value="1"] :is(.sb, .sc) { fill: var(--on); } .d7[data-value="2"] :is(.sa, .sb, .sd, .se, .sg) { fill: var(--on); } .d7[data-value="3"] :is(.sa, .sb, .sc, .sd, .sg) { fill: var(--on); } .d7[data-value="4"] :is(.sb, .sc, .sf, .sg) { fill: var(--on); } .d7[data-value="5"] :is(.sa, .sc, .sd, .sf, .sg) { fill: var(--on); } .d7[data-value="6"] :is(.sa, .sc, .sd, .se, .sf, .sg) { fill: var(--on); } .d7[data-value="7"] :is(.sa, .sb, .sc) { fill: var(--on); } .d7[data-value="8"] :is(.sa, .sb, .sc, .sd, .se, .sf, .sg) { fill: var(--on); } .d7[data-value="9"] :is(.sa, .sb, .sc, .sd, .sf, .sg) { fill: var(--on); } .d7[data-value="-"] :is(.sg) { fill: var(--on); } .d7[data-value="E"] :is(.sa, .sd, .se, .sf, .sg) { fill: var(--on); } .d7[data-value="U"] :is(.sb, .sc, .sd, .se, .sf) { fill: var(--on); } .d7[data-value="r"] :is(.se, .sg) { fill: var(--on); } .lv { display: none; } .inst[data-value="-12"] .l12, .inst[data-value="-6"] .l6, .inst[data-value="-3"] .l3, .inst[data-value="0"] .l0 { display: inline; } .st rect { fill: #1a1f25; } .st { color: #4b545d; } .inst[data-value="-12"] .s12, .inst[data-value="-6"] :is(.s12, .s6), .inst[data-value="-3"] :is(.s12, .s6, .s3), .inst[data-value="0"] :is(.s12, .s6, .s3, .s0) { color: #9ccfff; } .inst[data-value="-12"] .s12 rect, .inst[data-value="-6"] :is(.s12, .s6) rect, .inst[data-value="-3"] :is(.s12, .s6, .s3) rect, .inst[data-value="0"] :is(.s12, .s6, .s3, .s0) rect { fill: #16324d; } .pp rect { fill: #4aa8ff; } .pp { transform: translate(var(--x), calc(180px - (clamp(-4, var(--value, -4), 0) + 4) / 4 * 122px)); transition: transform .24s linear; } .inst[data-value=stop] .pp, .inst:not([data-value]) .pp { opacity: 0; }</style>The phase
phases/random_vibration.py
"""Runs random vibration at -12, -6, -3 dB and full level of the GEVScomponent profile. `ui.level` shows that level's reference, tolerance andabort lines; `ui.p0` to `ui.p35` are the control ASD (log10 g²/Hz) and`ui.grms` the control Grms. The run records the mean Grms at full level."""import mathimport timedef random_vibration(ui, measurements, shaker): full = [] for n in range(shaker.length()): level, asd, grms = shaker.read() ui.level = "stop" if level is None else str(level) if level is None: ui.grms = "STOPPED" elif n % 2 == 0: for k, g in enumerate(asd): setattr(ui, f"p{k}", round(math.log10(g), 3)) ui.grms = f"{grms:.2f} Grms" if level == 0: full.append(grms) time.sleep(0.1) measurements.full_level_grms = round(sum(full) / len(full), 2) time.sleep(1.5)The mocked instrument
plugs/shaker.py
"""Mock vibration controller: random vibration at -12, -6, -3 dB and fulllevel of the GEVS component profile (14.1 Grms at full level). Replace it withyour controller's driver."""import mathimport randomBINS = 36FREQS = [20 * 100 ** (k / (BINS - 1)) for k in range(BINS)]LEVELS = [(-12, 40), (-6, 40), (-3, 40), (0, 60), (None, 20)]def reference(f): """GEVS component profile, g²/Hz at full level: +6 dB/oct to 50 Hz, 0.16 to 800 Hz, -6 dB/oct to 2000 Hz.""" return 0.16 * (f / 50) ** 2 if f < 50 else 0.16 if f <= 800 else 0.16 * (800 / f) ** 2class ShakerController: def __init__(self): self.rng = random.Random(3) self.schedule = [level for level, n in LEVELS for _ in range(n)] self.k = 0 def length(self): return len(self.schedule) def read(self): """[level in dB or None when stopped, control ASD in g²/Hz per bin, control Grms]""" level = self.schedule[min(self.k, len(self.schedule) - 1)] self.k += 1 if level is None: return [None, [], 0.0] gain = 10 ** (level / 10) asd = [reference(f) * gain * 10 ** ((self.rng.gauss(0, 0.9) + (1.1 if f > 1400 else 0)) / 10) for f in FREQS] grms = math.sqrt(sum((asd[k] + asd[k + 1]) / 2 * (FREQS[k + 1] - FREQS[k]) for k in range(BINS - 1))) return [level, asd, grms]