-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from Cosmoglobe/v1.0.0
v1.0.0 looks awesome
- Loading branch information
Showing
78 changed files
with
2,929 additions
and
4,721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,4 +173,7 @@ settings.json | |
test.py | ||
context.py | ||
|
||
|
||
work_in_progress/ | ||
old_tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import multiprocessing | ||
|
||
import astropy.units as u | ||
import astropy_healpix as ahp | ||
import healpy as hp | ||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
from astropy.time import Time | ||
|
||
import zodipy | ||
|
||
model = zodipy.Model(30 * u.micron) | ||
|
||
healpix = ahp.HEALPix(nside=256, frame="galactic") | ||
pixels = np.arange(healpix.npix) | ||
skycoord = healpix.healpix_to_skycoord(pixels) | ||
|
||
# Note that we manually set the obstime attribute | ||
skycoord.obstime = Time("2022-01-14") | ||
|
||
emission = model.evaluate(skycoord, nprocesses=multiprocessing.cpu_count()) | ||
|
||
# Plot with healpy | ||
hp.mollview( | ||
emission, | ||
unit="MJy/sr", | ||
cmap="afmhot", | ||
min=0, | ||
max=80, | ||
title="Zodiacal light at 30 µm (2022-01-14)", | ||
) | ||
# plt.savefig("../img/healpix_map.png", dpi=300, bbox_inches="tight") | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import multiprocessing | ||
|
||
import astropy.units as u | ||
import healpy as hp | ||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
from astropy.coordinates import SkyCoord | ||
from astropy.time import Time | ||
|
||
import zodipy | ||
|
||
COMP_NAMES = [ | ||
"Smooth cloud", | ||
"Dust band 1", | ||
"Dust band 2", | ||
"Dust band 3", | ||
"Circum-solar Ring", | ||
"Earth-trailing Feature", | ||
] | ||
|
||
model = zodipy.Model(24 * u.micron) | ||
|
||
nside = 128 | ||
pixels = np.arange(hp.nside2npix(nside)) | ||
lon, lat = hp.pix2ang(nside, pixels, lonlat=True) | ||
|
||
skycoord = SkyCoord( | ||
lon, | ||
lat, | ||
unit=u.deg, | ||
frame="barycentricmeanecliptic", | ||
obstime=Time("2022-01-14"), | ||
) | ||
|
||
emission = model.evaluate(skycoord, return_comps=True, nprocesses=multiprocessing.cpu_count()) | ||
|
||
fig = plt.figure(figsize=(8, 7)) | ||
for idx, comp_emission in enumerate(emission): | ||
hp.mollview( | ||
comp_emission, | ||
title=COMP_NAMES[idx], | ||
norm="log" if idx == 0 else None, | ||
cmap="afmhot", | ||
cbar=False, | ||
sub=(3, 2, idx + 1), | ||
fig=fig, | ||
) | ||
plt.savefig("../img/component_maps.png", dpi=250, bbox_inches="tight") | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import astropy.units as u | ||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
from astropy.coordinates import BarycentricMeanEcliptic, SkyCoord | ||
from astropy.time import Time | ||
|
||
from zodipy import Model | ||
|
||
model = Model(30 * u.micron) | ||
|
||
# Longitude and Latitude values corresponding to a scan through the eclitpic plane | ||
lats = np.linspace(-90, 90, 100) * u.deg | ||
lons = np.zeros_like(lats) | ||
|
||
coords = SkyCoord( | ||
lons, | ||
lats, | ||
frame=BarycentricMeanEcliptic, | ||
obstime=Time("2022-06-14"), | ||
) | ||
|
||
emission = model.evaluate(coords) | ||
|
||
plt.plot(lats, emission) | ||
plt.xlabel("Latitude [deg]") | ||
plt.ylabel("Emission [MJy/sr]") | ||
plt.savefig("../img/ecliptic_scan.png", dpi=300, bbox_inches="tight") | ||
plt.show() |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.