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.2.tar.gz (18.3 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.2-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jayrock-0.0.2.tar.gz
  • Upload date:
  • Size: 18.3 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.2.tar.gz
Algorithm Hash digest
SHA256 fa6032160c0ceb7db7795aaee57a1065a27a5c2cd87de7cb262d3bda5cd4469c
MD5 fd63c27623c8dc85b77aee3cbc2e4c5e
BLAKE2b-256 129808a9f7258281d59030c533a0c37faa929fea7888cad45fc540e7bd1aa59c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jayrock-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 19.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c6112886a379326fd35c2b1310050e14d145cfe26be5a5df6709e32a066960c7
MD5 68afa314b67de29155992db4356cd197
BLAKE2b-256 271f5cbbcd577c0e2171921e5f248a4a6ac6070537c4b4bf2bcfd8775ad21cee

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