Skip to main content

JWST observations planning for asteroids.

Project description

Features - Install - Documentation

JWST observation planning and simulation for minor bodies across the Solar System. You define the target and instrument(s) – jayrock does the rest.

>>> import jayrock

Features

Computation of target ephemeris

Define a solar system target by name and then compute and display its JWST-observable ephemeris for a specified cycle, including visibility windows, magnitude changes, and thermal flux estimates.

>>> achilles = jayrock.Target("achilles") # define target by name or designation
>>> achilles.compute_ephemeris(cycle=6)   # compute ephemeris for JWST Cycle 6
>>> achilles.print_ephemeris()
(588) Achilles: Ephemeris from 2027-07-01 to 2028-06-30
├── Window 1: 2027-07-02 -> 2027-08-10
   ├── Duration         40 days
   ├── Vmag             16.18 -> 16.48
   └── Thermal @ 15um   393.39 -> 308.31 mJy
├── Window 2: 2028-03-02 -> 2028-04-21
   ├── Duration         51 days
   ├── Vmag             16.54 -> 16.15
   └── Thermal @ 15um   279.80 -> 360.74 mJy
└── errRA/errDec in arcsec: 0.027 / 0.005

Modelling of reflectance spectrum and thermal emission

Identify the dates of maximum and minimum thermal emission within the visibility window and then plot the target's modelled reflectance and thermal spectrum for a direct comparison between the two observation dates.

>>> # compare spectra at dates of max/min thermal emission
>>> date_thermal_max = achilles.get_date_obs(at="thermal_max")
>>> date_thermal_min = achilles.get_date_obs(at="thermal_min")
>>> achilles.plot_spectrum(date_obs=[date_thermal_max, date_thermal_min])

Modelled spectrum of (588) Achilles at two different observation dates

Compute instrument configuration to reach SNR target

Configure a JWST instrument and calculate the required exposure time parameters (groups and integrations) to achieve a specified Signal-to-Noise Ratio (SNR) at a particular wavelength.

>>> miri_lrs = jayrock.Instrument('MIRI', mode='LRSSLIT')
>>> miri_lrs.detector.nexp = 2  # 2-pt dither
>>> miri_lrs.detector.readout_pattern = 'fastr1'  # recommended for LRS
>>> # Compute exposure times for SNR target of 300 at 10 micron
>>> miri_lrs.set_snr_target(300, target, date_thermal_min, wave=10)
>>> # -> jayrock defines ngroup and nint for you

Visualise SNR across detector configurations and possible saturation issues

Simulate multiple observations using manually set exposure parameters across different detector configurations (apertures/filters/dispersers). Plot the resulting simulated SNR over the full wavelength range for all defined observations.

# Simulate observation of Achilles on date of minimum Vmag
date_obs = achilles.get_date_obs(at="vmag_min")

observations = []  # list to store observations

inst = jayrock.Instrument("NIRSpec", mode="IFU")

for disp, filt in [("G235M", "F170LP"), ("G395M", "F290LP")]:

    # Set filter and disperser
    inst.disperser = disp
    inst.filter = filt

    # Set ngroup, nint, nexp directly
    inst.detector.ngroup = 10  # number of groups per integration
    inst.detector.nint = 1     # number of integrations per exposure
    inst.detector.nexp = 4     # number of exposures -> number of dithers

    obs = jayrock.observe(achilles, inst, date_obs=date_obs)
    observations.append(obs)

# Plot SNR over wavelength
jayrock.plot_snr(observations)

Simulated SNR of NIRSpec observation of (588) Achilles

Install

Install from PyPi using pip:

 $ pip install jayrock

The minimum required python version is 3.11. jayrock relies on pandeia, the python engine behind the JWST ETC. Detailed install instructions for this dependency can be found here.

Documentation

Check out the documentation at jayrock.readthedocs.io.

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

jayrock-0.0.3.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

jayrock-0.0.3-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file jayrock-0.0.3.tar.gz.

File metadata

  • Download URL: jayrock-0.0.3.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/6.5.0-44-generic

File hashes

Hashes for jayrock-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7321b485c384f077539ecc4113b2396898aa72354d2cf788a660f90cecfb494a
MD5 b14eabc362d922b1ad9e6fee435f6ee7
BLAKE2b-256 ef3f5b65be3c894739dbe70d854db7b994029c921f49de87ddfb650c5ea9a0f3

See more details on using hashes here.

File details

Details for the file jayrock-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: jayrock-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/6.5.0-44-generic

File hashes

Hashes for jayrock-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f8993a3dfdc087b42fe714a39b4f51f70021f40f33569b09e77e60d5df3b9982
MD5 7905807d8c7b08dba83cf637c4aa4725
BLAKE2b-256 f48f2addc4f7eee437c3ec7120b9803900ed6afdfdedcd62bda0446898df0a8a

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