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
"""Obtain discovery dates for all confirmed exoplanets. | |
This script combines the NASA Exoplanet Archive and ADS API to obtain the | |
publication date for the discovery paper of all the confirmed exoplanets. | |
Author: Geert Barentsen | |
""" | |
import requests | |
import pandas as pd |
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
{ | |
"channels": { | |
"31": { | |
"dec": [ | |
-28.031356156487746, | |
-27.755350022942594, | |
-28.854298809320532, | |
-29.131659330859346, | |
-28.031356156487746 | |
], |
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
"""Compute ra and dec for the Galactic Plane. | |
This script computes the ICRS Right Ascension (ra) and Declination (dec) | |
coordinates for the entire Galactic Plane and writes them to a csv file. | |
""" | |
import numpy as np | |
import pandas as pd | |
from astropy.coordinates import SkyCoord | |
galactic_longitudes = np.arange(start=0, stop=360, step=0.1) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
"""Compares the performance of AstroPy between different versions of Python (2.7 vs 3.x). | |
This script reads AstroPy's benchmarking output (cf. github.com/astropy/astropy-benchmarks.git) | |
as generated by the airspeed velocity benchmarking package (cf. asv.readthedocs.io). | |
It then compares & plots the median execution time for different Python versions. | |
This script was hacked together as part of the Hack Day at the 229th American Astronomical | |
Society (AAS) meeting held in Grapevine, Texas. (Twitter: #hackaas #aas229.) | |
The output of this script is shown in the following tweet: |
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
"""Example conversion from pixel coordinates to ra/dec.""" | |
from astropy.io import fits | |
from astropy.wcs import WCS | |
x, y = 250, 250 | |
f = fits.open('f242_e0_c98.fits') | |
mywcs = WCS(f[0].header) | |
ra, dec = mywcs.all_pix2world([[x, y]], 0)[0] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.