lod_unit
========

.. py:module:: lod_unit

.. autoapi-nested-parse::

   Initialization for the λ/D unit and equivalency conversion module.

   This module makes available the :py:data:`lod` unit, representing the ratio of
   wavelength to diameter (λ/D), and :py:func:`lod_eq`, a function providing an
   equivalency for converting between λ/D and standard angular units. These tools
   are designed to facilitate calculations and conversions in optical systems and
   astronomical observations where λ/D is a commonly used metric.

   The module is built on the Astropy units and equivalencies framework, ensuring
   compatibility with the Astropy ecosystem.

   When imported, this module automatically extends astropy's units system to make
   the λ/D unit available through the standard astropy.units interface.

   Available Items:

   - :py:data:`lod` A unit representing λ/D.

   - :py:func:`lod_eq` A function to convert between λ/D and angular units, given wavelength and diameter.



Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/lod_unit/lod_unit/index


Attributes
----------

.. autoapisummary::

   lod_unit.lod


Functions
---------

.. autoapisummary::

   lod_unit.lod_eq


Package Contents
----------------

.. py:data:: lod
   :value: None


   An astropy unit representing the ratio of wavelength to diameter (λ/D).


.. py:function:: lod_eq(lam, D)

   Convert between λ/D and angular units.

   Function to allow conversion between λ/D and angular units natively
   with the astropy units package.

   Args:
       lam (Astropy Quantity):
           Wavelength
       D (Astropy Quantity):
           Diameter

   Returns:
       An astropy Equivalency object to allow conversion between λ/D and
       angular units.

   Usage:
       >>> diam = 10*u.m
       >>> lam = 500*u.nm
       >>> angseparation = 3 * lod
       >>> angseparation.to(u.arcsec, lod_eq(lam, diam))
           <Quantity 0.03093972 arcsec>


