Skip to content

Instantly share code, notes, and snippets.

View keflavich's full-sized avatar

Adam Ginsburg keflavich

View GitHub Profile
import numpy as np
from astropy.io import fits
header1 = """
SIMPLE = T / conforms to FITS standard
BITPIX = -64 / array data type
NAXIS = 2 / number of array dimensions
NAXIS1 = 128
NAXIS2 = 128
CRVAL1 = 0.0 / Value at ref. pixel on axis 1
@keflavich
keflavich / smooth.js
Last active January 4, 2016 11:59 — forked from jywarren/smooth.js
Time-averaging code: average over whole spectrum, don't bother with a selection process
setup: function() {
// code to run on startup
smooth_complete = function(row) {
var orig_img = $('#image')[0]
$('body').append("<canvas id='tmp_canvas'></canvas>")
var img = new Image()
img.src = orig_img.src
var canvas = $('#tmp_canvas')[0]
canvas.width = img.width
setup: function() {
// code to run on startup
flotoptions.yaxis.max = prompt("Enter a maximum graph height percentage, such as '50'");$.plot($("#graph"),$W.data,flotoptions);
},
draw: function() {
// code to run every frame
}
@keflavich
keflavich / gist:9139427
Last active August 29, 2015 13:56
mwe_interactive
{
"metadata": {
"name": "",
"signature": "sha256:6280333d104e04551440c924b25578a7ddbc9946ec0d9b34419f2d9d6521e4bb"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
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.
import bs4
import requests
import os
import astropy.utils.data as aud
import glob
import montage
from astropy.io import fits
import shutil
# These are URLs corresponding to the region that overlaps l=49 to l=50
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.