Skip to main content

Scattering phase matrix truncation Python tool for radiative transfer applications.

Project description

pytrunc

image image

Scattering phase matrix truncation Python tool for radiative transfer applications.

Mustapha Moulana
HYGEOS website
Documentation


Installation

For an installation via pip, you can use the following command:

pip install git+https://github.com/hygeos/pytrunc.git

Examples

Example using the Delta-m method:

Voir l'image
>>> ...
>>> from pytrunc.truncation import delta_m_phase_approx
>>> m_max = 20 # stream / term number
>>> # phase_exact -> P11 of a liquid cloud at 500nm and an effective radius of 8 mirometers
>>> # theta -> the phase angles in degrees
>>> ds = delta_m_phase_approx(phase_exact, theta, m_max) # return an xarray dataset
>>> ...

Example using the Geometric Truncation:

Voir l'image
>>> ...
>>> from pytrunc.truncation import gt_phase_approx
>>> from pytrunc.phase import calc_moments
>>> m_max = 20 # stream / term number
>>> # phase_exact -> P11 of a liquid cloud at 500nm and an effective radius of 8 mirometers
>>> # theta -> the phase angles in degrees
>>> chi = calc_moments(phase_exact, theta, m_max=m_max, normalize=True) # the phase moments
>>> f = chi[m_max] # The truncation factor
>>> ds = gt_phase_approx(phase_exact, theta, f) # return an xarray dataset
>>> ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytrunc-1.0.1.tar.gz (313.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytrunc-1.0.1-py3-none-any.whl (313.1 kB view details)

Uploaded Python 3

File details

Details for the file pytrunc-1.0.1.tar.gz.

File metadata

  • Download URL: pytrunc-1.0.1.tar.gz
  • Upload date:
  • Size: 313.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pytrunc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7721b3960a536061928e3b0fc63b34062c29732ec300bd5ad383dee662938727
MD5 44bb211eb298d1df688313bae94d4b9b
BLAKE2b-256 7e72afb569ff999566658ee5c8c7aee28456756acc82c8f2d0a58685bfda7aea

See more details on using hashes here.

File details

Details for the file pytrunc-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pytrunc-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 313.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pytrunc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0eb267357fbb7eff183fc01d12afb6ea96088fc41a69a91cbc08558d6d482dd5
MD5 412bc70207d65658e5cd94e6c213f80b
BLAKE2b-256 b7dd224874193a0e355ac232d5a6d134cc1100622bba8c98c0d84d81d6c54646

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page