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 time | |
import multiprocessing as mp | |
import gc | |
#From https://gist.github.com/astrofrog/1453933 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test plot</title> | |
</head> | |
<body> | |
<div id="9fe4daf9-51ec-4a04-a625-d9d6c84217a9"> | |
<script | |
src="static/js/9fe4daf9-51ec-4a04-a625-d9d6c84217a9.js" |
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 | |
rr = np.linspace(0, 20, num=50) #50 elements linearly spaced from 0 to 20 | |
a = 3.0 | |
b = 7.5 | |
w = 2.0 | |
#The functional way | |
#this np.vectorize decorator is sort of python magic, but allows you |
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 | |
import yopy #Install with pip install yopy | |
username = "IANCZE" #Your personal yo account | |
token = <REDACTED> #Developer API key | |
yo = yopy.Yo(token=token,user="YOCODEDONE") #(optionally) create a separate account on your DEV page to send the Yo's | |
yo.yo(username) #send a yo at me, yo | |
#Usage | |
#$ python mcmc.py ; ./yo.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
extends ../reveal | |
block cssstyle | |
style. | |
.reveal img.noborder { | |
border:none; | |
box-shadow:none; | |
background:none; |
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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Spectroscopic Likelihood Function\n", | |
"\n", | |
"by Ian Czekala (`iczekala@cfa.harvard.edu`)\n", | |
"\n", |
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
\documentclass{aastex61} | |
% \documentclass[modern]{aastex61} | |
\shorttitle{Test AAS Document} | |
\shortauthors{Czekala et al.} | |
\begin{document} | |
\title{Testing} |
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
# based off of DFM's notebook here: https://gist.github.com/dfm/3f746476ac61e142b340ad74c7a1bc75 | |
# imports come from PSOAP, celerite | |
term1 = terms.Matern32Term(log_sigma=-4.0, log_rho=-22) | |
term2 = terms.Matern32Term(log_sigma=-6.0, log_rho=-22) | |
gp1 = celerite.GP(term1) | |
gp2 = celerite.GP(term2) |
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
# presume that we have been modeling some table of visibilities exported by UVPLOT | |
# : https://github.com/mtazzari/uvplot/blob/master/uvplot/io.py | |
# we want to put the model and residual visibilties into the CASA MS format so we can CLEAN them to make an image. | |
# load the model visibilities produced by galario | |
# assemble them into the right form to go into CASA | |
# (following UVHDF5: https://github.com/AstroChem/UVHDF5/blob/master/UVHDF5_to_MS.py) | |
# these would probably be columns of a text file in your case | |
uu = fid["uu"][:,:] # [kilolam] |
OlderNewer