Skip to content

Instantly share code, notes, and snippets.

View ChrisBeaumont's full-sized avatar

Chris Beaumont ChrisBeaumont

View GitHub Profile
@ChrisBeaumont
ChrisBeaumont / SciDB_afl.ipynb
Created March 7, 2014 20:01
scidbpy AFL Prototype
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChrisBeaumont
ChrisBeaumont / toast_plank.py
Created March 18, 2014 15:58
Test Planck Toast
from toasty import toast, healpix_sampler, normalizer
from astropy.io import fits
import logging
#print progress
FORMAT = ' %(asctime)-15s %(message)s'
logging.basicConfig(format=FORMAT)
logger = logging.getLogger('toasty.tile')
logger.setLevel(logging.DEBUG)
@ChrisBeaumont
ChrisBeaumont / parse.ipynb
Last active August 29, 2015 13:57
Parsing cambridgema.gov
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChrisBeaumont
ChrisBeaumont / brainstorm.py
Created April 15, 2014 21:50
spectral_cube brainstorm
from spectral_cube import read
mycube = read("ant_COline_5kms_evenbeam.fits")
my_cube.get_data(views, fill='min') # nan replacement fill='min'/'max'
my_cube.flatten(views) # flat, reject nans
my_cube.spectral_slab(30 * u.km / u.s, 50 * u.km / u.s)
@ChrisBeaumont
ChrisBeaumont / Rolling lm2.ipynb
Last active August 29, 2015 14:00
Rolling linear fits: SciDB and Pandas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChrisBeaumont
ChrisBeaumont / cat_qglue.py
Created May 15, 2014 15:55
Using qglue with categorical data
from glue import qglue
from glue.core.data_factories import panda_process
import pandas as pd
df = pd.read_csv(...)
data = panda_process(df) # convert to Glue data, detect categorical components
qglue(data=data) #start ui
#alternatively, from the GUI, choose file->open data set, and choose file type=Pandas table
@ChrisBeaumont
ChrisBeaumont / dendro_test.py
Created June 17, 2014 14:48
make_catalog test
from astrodendro import Dendrogram, ppv_catalog
from astropy.io import fits
from astropy import units as u
data = fits.getdata('DHT21_Taurus_mom.fits')
dg = Dendrogram.compute(data, verbose=True,
min_value=0.01,
min_delta = 0.005,
min_npix = 20)
@ChrisBeaumont
ChrisBeaumont / astropy_stylesheet.ipynb
Last active August 29, 2015 14:05
Astropy Stylesheet Demos
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.
@ChrisBeaumont
ChrisBeaumont / turtles.ipynb
Created September 3, 2014 15:52
Turtles (scraping XKCD 1416)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.