View get_exoplanets_CIRAS.py
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
# Equipo Pedagogico CIRAS/YEMS | |
from astroquery.open_exoplanet_catalogue import findvalue | |
from astroquery import open_exoplanet_catalogue as oec | |
import numpy as np | |
import re | |
def get_exoplanets(output='exoplanets.txt', SolarSystem=False): | |
"""Grabs all planets from Open Exoplanet Catalogue and saves them.""" | |
cata = oec.get_catalogue() |
View eclipse_map.py
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
# Script to plot the path of totality of an eclipse. | |
# Uses ephem to calculate the sun eclipse fraction for a | |
# grid of latitudes, longitudes and altitudes. | |
# Seba Perez (CIRAS/USACH) | |
import ephem | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.basemap import Basemap, cm |
View .emacs
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Seba Perez at USACH dot Emacs file | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(setq user-full-name "seba") | |
;; Package repositories | |
(require 'package) | |
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) | |
(not (gnutls-available-p)))) | |
(proto (if no-ssl "http" "https"))) |
View eclipse_map.py
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
# Script to plot the path of totality of an eclipse. | |
# Uses ephem to calculate the sun eclipse fraction for a | |
# grid of latitudes, longitudes and altitudes. | |
import ephem | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.basemap import Basemap, cm | |
import scipy.ndimage | |
import sys |
View exo_plot.py
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
import exodata | |
import numpy as np | |
import matplotlib | |
from matplotlib import pyplot as plt | |
import pickle | |
""" Script to plot exoplanet mass vs semi major axis (or any other | |
quantity). | |
for exoplanet data we need "pip install exodata". |
View flux_mass_conversion.py
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
import numpy as np | |
import scipy.constants as sc | |
M_Sun = 1.98844e30 # [M_Sun] = kg | |
M_Earth = 5.9723e24 # [M_Earth] = kg | |
M_Jup = 1.8986e27 # [M_Jup] = kg | |
M_Sat = 5.6846e26 # [M_Sat] = kg | |
def Bnu(nu, T, RJ=False): |
View convtools.py
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
import numpy as np | |
from astropy import nddata | |
from astropy.io import fits | |
from astropy.convolution import convolve_fft, Gaussian2DKernel | |
from astropy.convolution import convolve | |
from pathlib import Path | |
def get_Gaussian_kernel(from_beam, to_beam, pixelsize): |