skyscapes.physical_model.exojax.components.scattering
=====================================================

.. py:module:: skyscapes.physical_model.exojax.components.scattering

.. autoapi-nested-parse::

   Scattering opacity components.



Classes
-------

.. autoapisummary::

   skyscapes.physical_model.exojax.components.scattering.RayleighScattering
   skyscapes.physical_model.exojax.components.scattering.NullScattering


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

.. py:class:: RayleighScattering

   Bases: :py:obj:`skyscapes.physical_model.exojax.components.base.AbstractScattering`


   Rayleigh scattering from tracked species + optional bulk residual.

   Iterates over the atmosphere's species tuple plus the bulk gas (if
   present), computing each gas's contribution from its own
   ``rayleigh_xs`` and ``molmass``. The bulk gas's mass-mixing ratio
   is computed dynamically as ``max(0, 1 - sum(tracked mmrs))``.

   To disable per-species Rayleigh while keeping the bulk: set the
   species' ``rayleigh_xs`` to zeros. To disable scattering entirely:
   use :class:`NullScattering`.


   .. py:method:: compute(species, bulk, gravity, rt_engine, n_layers, n_nu)

      Sum tracked-species + bulk-gas Rayleigh contributions.

      Bulk gas mmr is computed per-layer as
      ``max(0, 1 - sum(species profiles at this pressure))``, so
      altitude variation of the tracked species translates into
      altitude variation of the bulk-gas residual.



.. py:class:: NullScattering

   Bases: :py:obj:`skyscapes.physical_model.exojax.components.base.AbstractScattering`


   Disable scattering entirely: contributes zero opacity.

   Useful for ablation studies (e.g. quantifying how much Rayleigh
   affects a retrieval) and for atmospheres where scattering is
   negligible.


   .. py:method:: compute(species, bulk, gravity, rt_engine, n_layers, n_nu)

      Return zero-everywhere contribution.



