-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests and example code to use new API
- Loading branch information
Showing
19 changed files
with
226 additions
and
279 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
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
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 |
---|---|---|
@@ -1,27 +1,28 @@ | ||
from multiprocessing import cpu_count | ||
|
||
import astropy.units as u | ||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
from astropy.time import Time | ||
|
||
from zodipy import Zodipy | ||
|
||
model = Zodipy("dirbe") | ||
model = Zodipy("dirbe", n_proc=cpu_count()) | ||
|
||
latitudes = np.linspace(-90, 90, 10000) * u.deg | ||
longitudes = np.zeros_like(latitudes) | ||
|
||
emission = model.get_emission_ang( | ||
30 * u.micron, | ||
theta=longitudes, | ||
phi=latitudes, | ||
freq=30 * u.micron, | ||
lonlat=True, | ||
obs_time=Time("2022-06-14"), | ||
obs="earth", | ||
obs_pos="earth", | ||
) | ||
|
||
|
||
plt.plot(latitudes, emission) | ||
plt.xlabel("Latitude [deg]") | ||
plt.ylabel("Emission [MJy/sr]") | ||
plt.savefig("../img/timestream.png", dpi=300) | ||
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
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
Oops, something went wrong.