herosdevices.hardware.menlo.oscillator
======================================

.. py:module:: herosdevices.hardware.menlo.oscillator

.. autoapi-nested-parse::

   HERO driver for the main seed oscillator of a Menlo Systems frequency comb.





Module Contents
---------------

.. py:class:: Oscillator(ofc: herosdevices.hardware.menlo.ofc.OFC, observables: dict[str, dict[str, str]] | None = None)

   Bases: :py:obj:`herosdevices.hardware.menlo.functional_layer.FunctionalLayerModule`


   Driver for the main seed oscillator (fs laser) of a Menlo Systems frequency comb.

   Wraps the OFC's `functionalLayer.ofcSettings` sub-tree, a fixed, singleton module (there is only one
   seed oscillator per OFC, so unlike :py:class:`~herosdevices.hardware.menlo.DDS`/
   :py:class:`~herosdevices.hardware.menlo.LaserLock` there is no `funclayer_identifier` to select).

   `ofcSettings` also has `xps`/`fsOscillator` pump-diode current-control nodes (e.g. `xps.diode01`,
   `fsOscillator.preampDiode01`), but which diodes are actually populated appears to vary by comb
   configuration (one observed unit had `diode01`/`diode03`/`diode04` under both trees, with no `diode02`) -
   not modeled here since it isn't confirmed to be a fixed, general shape. Poll/control specific diode nodes
   for your comb via `observables`, or `ofc.get_node`/`set_node` directly.

   :param ofc: The OFC HERO this oscillator belongs to.
   :param observables: Additional observables to poll, merged on top of `DEFAULT_OBSERVABLES`, see
                       :py:class:`~herosdevices.hardware.menlo.functional_layer.FunctionalLayerModule`.


   .. py:attribute:: DEFAULT_OBSERVABLES
      :type:  dict[str, dict[str, str]]


   .. py:property:: mode_locked
      :type: bool


      Whether the oscillator is currently mode-locked. Read-only.


   .. py:property:: temperature
      :type: float


      Actual temperature of the oscillator's TEC. Read-only.


   .. py:property:: dc_act
      :type: float


      DC component of the mode-lock detection signal. Read-only.


   .. py:property:: ac_act
      :type: float


      AC component of the mode-lock detection signal. Read-only.


   .. py:property:: laser_enabled
      :type: bool


      Whether the oscillator's pump laser is enabled.


   .. py:attribute:: ofc


   .. py:attribute:: base_path


   .. py:attribute:: observables


   .. py:method:: get(relative_path: str) -> Any

      Read the current value of a node relative to this module's settings object.

      Use this for module properties not already exposed as a named attribute. See
      :py:meth:`~herosdevices.hardware.menlo.ofc.OFC.explore` to find the available relative paths,
      e.g. `ofc.explore(module.base_path, depth=2)`.

      :param relative_path: Dotted path relative to `base_path`.

      :returns: The current value of the node.



   .. py:method:: set(relative_path: str, value: Any) -> None

      Set the value of a node relative to this module's settings object.

      :param relative_path: Dotted path relative to `base_path`, see :py:meth:`get`.
      :param value: Value to set.



