Skip to main content

LBT/LBC point-source exposure-time calculator

Project description

rretc

The Rapid Response Exposure Time Calculator is an exposure-time calculator for point sources observed with LBT/LBC.

Installation

Install (no dependencies) with:

pip install .

Install the optional command-line interface with:

pip install ".[cli]"

Python API

The package exposes five functions:

from rretc import msat, nexp, snr, texp, tsat

conditions = {
    "magnitude": 22.0,
    "band": "g",
    "moon_zd": 60.0,
    "moon_phase": 0.0,
    "moon_elongation": 90.0,
    "aperture": 2.25,
    "airmass": 1.3,
    "site_quality": "ultra-clean",
    "seeing": 0.75,
}

count = nexp(100.0, 60.0, **conditions)
seconds = texp(10, 100.0, **conditions)
achieved = snr(60.0, 10, **conditions)

saturation_conditions = {
    key: value
    for key, value in conditions.items()
    if key not in {"magnitude", "aperture"}
}
saturation_time = tsat(18.0, **saturation_conditions)
saturation_magnitude = msat(10.0, **saturation_conditions)

nexp returns the minimum exposure count for a target SNR and exposure duration; texp returns the minimum exposure duration for a target SNR and exposure count; and snr computes the SNR for an exposure stack. texp returns math.inf if the requested SNR is above the systematic-noise limit for the specified number of exposures. tsat returns the exposure time at which the peak pixel saturates; msat returns the corresponding saturation magnitude for a proposed exposure time. Both use 90% of the detector full-well capacity. msat returns math.nan when sky and dark current alone saturate the pixel.

Command line

The CLI requires click or the cli installation extra (pip install ".[cli]"). It provides one subcommand for each API operation and prints one numeric value:

rretc nexp --snr 100 --texp 60 \
  --magnitude 22 --band g --moon-zd 60 --moon-phase 0 \
  --moon-elongation 90 --aperture 2.25

rretc texp --nexp 10 --snr 100 \
  --magnitude 22 --band g --moon-zd 60 --moon-phase 0 \
  --moon-elongation 90 --aperture 2.25

rretc snr --texp 60 --nexp 10 \
  --magnitude 22 --band g --moon-zd 60 --moon-phase 0 \
  --moon-elongation 90 --aperture 2.25

rretc tsat --magnitude 18 --band V --moon-zd 70 --moon-phase 0.75 \
  --moon-elongation 90

rretc msat --texp 10 --band V --moon-zd 70 --moon-phase 0.75 \
  --moon-elongation 90

Run rretc COMMAND --help for all options.

Inputs and assumptions

  • Supported bands are U, B, V_B, V, R, I, u, g, r_B, r, i, and z.
  • Magnitudes are finite values, Vega for Johnson-Cousins bands and AB for Sloan bands.
  • Exposure times are seconds. Lunar angles are degrees. Seeing and aperture are arcseconds.
  • Saturation calculations use the central pixel, so tsat and msat do not take an aperture.
  • moon_phase ranges from 0 for new Moon to 1 for full Moon.
  • moon_zd >= 90 places the Moon below the horizon.
  • Site profiles are standard, dry, and ultra-clean.
  • Default airmass is 1.3, default site quality is ultra-clean, and default seeing is 0.75 arcseconds.

The lunar sky model follows Krisciunas & Schaefer, PASP 103, 1033 (1991). The lunar airmass approximation follows Young, Applied Optics 33, 1108 (1994).

Testing and development

Install with:

pip install . --group dev

Run tests with:

python -m pytest

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

rretc-0.1.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

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

rretc-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file rretc-0.1.0.tar.gz.

File metadata

  • Download URL: rretc-0.1.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":null,"cpu":"x86_64","distro":{"id":"jammy","libc":{"lib":"glibc","version":"2.35"},"name":"Ubuntu","version":"22.04"},"implementation":{"name":"CPython","version":"3.11.15"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.0.2 15 Mar 2022","python":"3.11.15","system":{"name":"Linux","release":"5.15.0-185-generic"}} HTTPX2/2.5.0

File hashes

Hashes for rretc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8554b373225b391bd68770a688c24814f3229bfe24c4b4af83aa246ad6d21dde
MD5 59af3f00c47754ebb9d626ced1e7c797
BLAKE2b-256 418dfffc339233a5b871cea500a0404199f17ad936296a20df707a03604aec24

See more details on using hashes here.

File details

Details for the file rretc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rretc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":null,"cpu":"x86_64","distro":{"id":"jammy","libc":{"lib":"glibc","version":"2.35"},"name":"Ubuntu","version":"22.04"},"implementation":{"name":"CPython","version":"3.11.15"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.0.2 15 Mar 2022","python":"3.11.15","system":{"name":"Linux","release":"5.15.0-185-generic"}} HTTPX2/2.5.0

File hashes

Hashes for rretc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 902db9bddc130aabd08af92e53e8992e19240a88aaa1be10df3c3a04fab63bc7
MD5 fa6df259133bfb21975df8c7889bfc19
BLAKE2b-256 3a7c71f2aa2a05fe0c36b5915b5fa60c3f212ac5f56dc222e366fd9ec0a803cb

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