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] |
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
sudo apt install libresample1 | |
wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb | |
sudo dpkg -i libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb | |
wget http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb | |
sudo dpkg -i libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb | |
wget https://www.dropbox.com/s/gg2i5wszrqkhzy8/clickshare_01.07.01-79_amd64.deb?dl=0# | |
sudo dpkg -i clickshare_01.07.01-79_amd64.deb |
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) |
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
from math import * | |
import numpy as np | |
def ga2equ(ga): | |
""" | |
Convert Galactic to Equatorial coordinates (J2000.0) | |
(use at own risk) | |
Input: [l,b] in decimal degrees | |
Returns: [ra,dec] in decimal degrees |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
""" | |
Example function to convert the 'QUALITY' column in Kepler/K2 target pixel | |
and lightcurve files into a list of meaningful strings. | |
""" | |
# The meaning of the various flags are described in the Kepler Archive Manual | |
KEPLER_QUALITY_FLAGS = { | |
"1": "Attitude tweak", | |
"2": "Safe mode", | |
"4": "Coarse point", |
NewerOlder