Skip to main content

A simple Exposure Time Calculator for the Lux mission concept

Project description

Lux_Proposal Repository

This is a location for code under development for the Lux mission concept. Currently it contains a simple exposure time calculator.

Dependencies: numpy, pandas, astropy, matplotlib

NOTE: Currently (v0.0.4) only the optical and NIR channels are implemented, and sensitivities are based on current best estimates. This will be modified soon to include the UV channel, as well as sensitivies at requirement levels.

Installation: pip install luxetc

Usage:

In [1]: import luxetc

Instatiate a LuxETC object.

In [2]: x = luxetc.LuxETC()

Create a source with AB mag = 20.24.

In [3]: import astropy.units as u

In [4]: source = (20.24 * u.ABmag).to(u.erg / u.cm**2 / u.s / u.AA, u.spectral_density(luxetc.config.WAV))

Calculate the SNR for 100 s exposures in the g, r, and i-bands.

In [5]: x.get_snr(source, texps={"g": 100., "r": 100., "i": 100., "z": 100., "y": 100., "j": 100.}) Out[5]: {'g': np.float64(8.998967243642625), 'r': np.float64(6.4310822015567375), 'i': np.float64(4.068664798528796), 'z': np.float64(3.2757870535410034), 'y': np.float64(5.882262115840334), 'j': np.float64(5.886179099315213)}

Calculate the necessary exposure time to achieve SNR = 9.0, 6.4, 4.1, 3.3, 5.9, and 5.9 in g, r, i, z, y, and j-band (respectively).

In [6]: x.get_texp(source, snrs={"g": 9.0, "r": 6.4, "i": 4.1, "z": 3.3, "y": 5.9, "j": 5.9}) Out[6]: {'g': np.float64(97.27763225445993), 'r': np.float64(96.78990062621607), 'i': np.float64(97.83428612199552), 'z': np.float64(90.28943141959489), 'y': np.float64(95.14224142371266), 'j': np.float64(95.12166345972044)}

Calculate the limiting magnitude for a given filter, exposure time, and SNR.

In [7]: x.get_limmag({"g": (100., 9.0), "r": (100., 6.4), "i": (100., 4.1), "z": (100., 3.3), "y": (100., 5.9), "j": (100., 5.9)}) Out[7]: {'g': np.float64(20.258971055028226), 'r': np.float64(20.255269377129782), 'i': np.float64(20.250905066741165), 'z': np.float64(20.230548187712248), 'y': np.float64(20.264815842833464), 'j': np.float64(20.263580065925844)}

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

luxetc-0.0.6.tar.gz (974.8 kB view details)

Uploaded Source

Built Distribution

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

luxetc-0.0.6-py3-none-any.whl (961.5 kB view details)

Uploaded Python 3

File details

Details for the file luxetc-0.0.6.tar.gz.

File metadata

  • Download URL: luxetc-0.0.6.tar.gz
  • Upload date:
  • Size: 974.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for luxetc-0.0.6.tar.gz
Algorithm Hash digest
SHA256 488a97fbc9b725fab6cc43e1c3468e0d884a945649a7391b09b20f6de201f4bc
MD5 303cafc7e5611d83fcb9a4bda281ee7a
BLAKE2b-256 bb4f26998d4e222a6b0512a20ea347481bae3f1eb535a2d3e13d9e3a42cd7aac

See more details on using hashes here.

File details

Details for the file luxetc-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: luxetc-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 961.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for luxetc-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 946f84e42c9f324f1f3eed80a4512de269d999fbc82c8ce8c9ff19b62e6be15c
MD5 85eac243a50f361ce788c5c92cc49cf8
BLAKE2b-256 e5017e6b3ecb8045c64c212710cb356ade5e35240b9132ada0b863c500221569

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