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 matplotlib import pyplot as plt | |
import numpy as np | |
import matplotlib | |
from astropy.io import fits | |
from astropy.convolution import Gaussian2DKernel | |
from scipy import ndimage, stats, interpolate, signal | |
import random | |
plt.rcParams['font.family'] = 'serif' | |
plt.rcParams['font.size'] = 18 |
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
pro readdata, max | |
readcol, 'data.txt', name, KIC, Kp, t_0, t_0_unc, P, P_unc, Rp, a, T_eq, Dur, Depth, a_to_Rstar, a_to_Rstar_unc, r_to_Rstar, r_to_Rstar_unc, b, b_unc, SNR, chi, T_eff, log_g, Rad2, f_T_eff, /silent ;read in the given file with all the information | |
BJD=2456069 ; May 21th 2012, initial start time for the plot | |
t=findgen(1000000)/10000+BJD ;ends August 29 2012 | |
dist=500 ;pc distance from earth to the objects | |
f=4.84e-6 ;convert AU to pc | |
ff=2.254e-8 ;conert solar R to pc | |
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 statsmodels.tsa.stattools import ccf | |
import scipy | |
from scipy import optimize | |
def template_fun(x, x_0, W_FWHM, A): | |
return A * np.exp(-0.5 * (x - x_0)**2 * (2.35/W_FWHM)**2) | |
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
''' | |
Just integrating a model SED in observed frame from mbb & RP's output | |
Last Modified: 05 May 2016 | |
''' | |
from astropy.cosmology import WMAP9 | |
import numpy as np |
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
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
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
#!/usr/bin/python | |
''' | |
from http://apple.stackexchange.com/questions/4286/is-there-a-mac-os-x-terminal-version-of-the-free-command-in-linux-systems | |
''' | |
import subprocess | |
import re | |
# Get process info |
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 random | |
peeps = [ | |
'Dominik', | |
'Martha', | |
'Gordon', | |
'Thomas', | |
'Henrik', | |
'Tyler', | |
'Luke', |
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 emcee | |
import numpy as np | |
# TODO: | |
# write something using sampler.sample() instead of predefined niter to ensure we have enough uncorrelated sample after run.. | |
nindependent = 0 | |
nind = 500 | |
niter = 1000 | |
attempts = 10 | |
counter = 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
#! /usr/bin/env python | |
''' | |
Reads in image data from a FITS file. It transforms the image using FFT. | |
Plot the original image, the real part and the imaginary part of the transform, and the inverse transform -- real part, which should be equal to the original image, and a imaginary part. | |
The last panel = residual, and shows the quality of the FFT = original image - real part of the inverse FFT image. |
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
'''Convert between R_E to vdisp and M_E | |
one z_lens, one z_source, one R_E at a time | |
''' | |
import numpy | |
#HELMS59 |
OlderNewer