Skip to main content

Zodipy is a python tool that simulates the Zodiacal emission.

Project description

PyPI version Tests astropy


Zodipy is a Python simulation tool for Zodiacal Emission (Interplanetary Dust Emission). It allows you to compute the simulated emission in a timestream, or at an instant in time.

plot

Installing

Zodipy is available at PyPI and can be installed with pip install zodipy.

Features

The full set of features and use-cases will be documentated in the nearby future.

Initializing an Interplantery Dust Model: Zodipy implements the Kelsall et al. (1998) Interplanetary Dust Model. Additionally, it is possible to include the various emissivity fits from the Planck collaboration.

import zodipy

# Other options for models are "K98" (default), "Planck13", "Planck15"
model = zodipy.InterplanetaryDustModel(model="Planck18")

Instantaneous emission: We can make a map of the simulated instantaneous emission seen by an observer using the get_instantaneous_emission function, which queries the observer position given an epoch through the JPL Horizons API:

import healpy as hp
import astropy.units as u

emission = model.get_instantaneous_emission(
    800*u.GHz, 
    nside=256, 
    observer="Planck", 
    epochs=59215,  # 2010-01-01 (iso) in MJD
    coord_out="G"
)

hp.mollview(emission, norm="hist")

plot

The epochs input must follow the convention used in astroquery. If multiple dates are passed to the function, the returned emission becomes the average over all instantaneous maps.

Additionally, it is possible to retrieve the emission component-wise by setting return_comps=True in the function call. Following is an example of what the simulated emission seen from L2 for each component is at 6th of October 2021.

plot

Time-ordered emission: We can make a time-stream of simulated emission for a sequence of time-ordered pixels using the get_time_ordered_emission function. This requires specifying the heliocentric ecliptic cartesian position of the observer (and optionally the Earth) associated with each chunk of pixels. In the following we use the first day of time-ordered pixels from the DIRBE instrument of the COBE satellite (Photometric Band 6, Detector A, first day of observations) to make a simulated time-stream:

import astropy.units as u
import matplotlib.pyplot as plt
import zodipy

model = zodipy.InterplanetaryDustModel()

dirbe_pixels = ...
dirbe_position = ...  
earth_position = ...  

timestream = model.get_time_ordered_emission(
    25*u.micron
    nside=128,
    pixels=dirbe_pixels,
    observer_coordinates=dirbe_position,
    earth_coordinates=earth_position
)

plt.plot(timestream)

plot

Binned time-ordered emission: By setting bin=True in the function call, the simulated emission is binned into a map. In the following, we compare Zodipy simulations with the observed time-ordered data by DIRBE.

import astropy.units as u
import matplotlib.pyplot as plt
import zodipy

model = zodipy.InterplanetaryDustModel()

dirbe_pixel_chunks = [...]
dirbe_positions = [...]
earth_positions = [...]

emission = np.zeros(hp.nside2npix(nside))
hits_map = np.zeros(hp.nside2npix(nside))   
    
for day, (pixels, dirbe_position, earth_position) in enumerate(
    zip(dirbe_pixel_chunks, dirbe_positions, earth_positions),
    start=1
):
    
    unique_pixels, counts = np.unique(pixels, return_counts=True)
    hits_map[unique_pixels] += counts

    emission += model.get_time_ordered_emission(
        25*u.micron,
        nside=128,
        pixels=pixels,
        observer_position=dirbe_position,
        earth_position=earth_positions,
        bin=True
    )

    # We make a plot for each week.
    if day % 7 == 0:
        zodi_emission /= hits_map
        hp.mollview(zodi_emission)

        # Reset emission and hits map for next week
        emission = np.zeros(hp.nside2npix(nside)) 
        hits_map = np.zeros(hp.nside2npix(nside)) 
DIRBE TOD Zodipy TOD Simulation
plot plot

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

zodipy-0.3.3.tar.gz (66.8 kB view details)

Uploaded Source

Built Distribution

zodipy-0.3.3-py3-none-any.whl (69.4 kB view details)

Uploaded Python 3

File details

Details for the file zodipy-0.3.3.tar.gz.

File metadata

  • Download URL: zodipy-0.3.3.tar.gz
  • Upload date:
  • Size: 66.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.6 Darwin/21.2.0

File hashes

Hashes for zodipy-0.3.3.tar.gz
Algorithm Hash digest
SHA256 8e6f695b19de5a9c151b68ebbd0963d95a6be9a3993a0ea34bf92d6b4067823b
MD5 4d75d4c4b5b91b15baf922a28286d4ce
BLAKE2b-256 2aeff83577c135c78e73c36471976b72e0ff4cd16e9a86d120e468d5343e882d

See more details on using hashes here.

Provenance

File details

Details for the file zodipy-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: zodipy-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 69.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.6 Darwin/21.2.0

File hashes

Hashes for zodipy-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d720d5ae56e3e8514c3d86da0c34d7a21057dfcf03308fa8e744d610f2914b77
MD5 f46cf7e5417643206a52a0410068af40
BLAKE2b-256 fe7f67de81064480f77f7d40a6c5f41537cd211aa887aaa3a94e9d69eaf7423c

See more details on using hashes here.

Provenance

Supported by

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