Code Monkey home page Code Monkey logo

zodipy's Introduction

PyPI version Tests astropy


ZodiPy is a Python tool for simulating the Interplanetary Dust Emission that a Solar System observer sees, either in the form of timestreams or binned HEALPix maps.

plot

Usage

See the documentation for a broader introduction to using ZodiPy.

Interplanetary Dust models: select between built in models.

from zodipy import Zodipy

model = Zodipy(model="Planck18")

Get emission from a point on the sky: choose a frequency/wavelength, an observer, a time of observation, and angular coordinates (co-latitude, longitude).

import astropy.units as u
from astropy.time import Time

model.get_emission_ang(
    25*u.micron,
    theta=10*u.deg,
    phi=40*u.deg,
    obs="earth",
    obs_time=Time.now(),
)
>> <Quantity [16.65684599] MJy / sr>

Get emission from a sequence of angular coordinates: theta and phi can be a sequence of angles that can represent some time-ordered pointing.

theta = [10.1, 10.5, 11.1, 11.5] * u.deg
phi = [40.2, 39.9, 39.8, 41.3] * u.deg

model.get_emission_ang(
    25*u.micron,
    theta=theta,
    phi=phi,
    obs="earth",
    obs_time=Time.now(),
    lonlat=True,
)
>> <Quantity [29.11106315, 29.33735654, 29.41248579, 28.30858417] MJy / sr>

Get emission from pixel indices on a HEALPIX grid: a sequence of pixel indicies along with an NSIDE parameter can be used.

model.get_emission_pix(
    25*u.micron,
    pixels=[24654, 12937, 26135],
    nside=128,
    obs="earth",
    obs_time=Time.now(),
)
>> <Quantity [17.77385144, 19.7889428 , 22.44797121] MJy / sr>

Get binned emission component-wise: the emission can be binned to a HEALPix map, and also returned component-wise.

import healpy as hp
import numpy as np

nside = 128

model.get_binned_emission_pix(
    25*u.micron,
    pixels=np.arange(hp.nside2npix(nside)),
    nside=nside,
    obs="earth",
    obs_time=Time.now(),
    return_comps=True
).shape
>> (6, 196608)

Documentation

A detailed introduction along with a tutorial of how to use ZodiPy will shortly be available in the documentation.

Installing

ZodiPy is available on PyPI and can be installed with pip install zodipy (Python >= 3.8 required).

Scientific paper

  • San et al. (2022). ZodiPy: software for simulating Zodiacal Emission. Manuscript in preparation.

zodipy's People

Contributors

hermda02 avatar metinsa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.