Skip to content

Instantly share code, notes, and snippets.

View pkgw's full-sized avatar

Peter Williams pkgw

View GitHub Profile
@pkgw
pkgw / gist:1143360
Created August 13, 2011 01:24
SOMETHING HAS GONE TERRIBLY WRONG
#include <casa/Exceptions/Error.h>
#include <casa/iostream.h>
#include <synthesis/MeasurementEquations/Imager.h>
#include <synthesis/MeasurementComponents/EPJones.h>
#include <ms/MeasurementSets/MSHistoryHandler.h>
#include <casa/Arrays/Matrix.h>
#include <casa/Arrays/ArrayMath.h>
#include <casa/Arrays/ArrayLogical.h>
@pkgw
pkgw / gist:1436133
Created December 6, 2011 00:43
SMA miriad merge diff
commit e07320d824afcdc19d85104259659b55221b1858
Author: Peter Williams <peter@newton.cx>
Date: Mon Oct 18 17:21:07 2010 -0700
Incorporate new SMA files into autotools build.
diff --git a/src/prog/sma/Makefile.am b/src/prog/sma/Makefile.am
index 916739a..72e906a 100644
--- a/src/prog/sma/Makefile.am
+++ b/src/prog/sma/Makefile.am
@pkgw
pkgw / xpdf-extract-helper.sh
Created October 15, 2012 14:22
Helper to use XPDF to extract figures from PDFs as vector graphics
#! /bin/bash
# -*- shell-script -*-
margin=4
# XPDF gives its y coordinates in terms of the standard PDF coordinate
# system, where (0,0) is the bottom left corner and y increases going
# up. But pdftocairo uses Cairo coordinates, in which (0,0) is the top
# left corner and y increases going down. We can use pdfinfo to get
# the page size to translate between these conventions.
commit fc673a66958ee26213c4be766b7cfa4858a39754
Author: Peter Williams <peter@newton.cx>
Date: Tue Oct 20 09:25:43 2015 -0400
fipy/meshes/uniformGrid3D.py: fix
diff --git a/fipy/meshes/uniformGrid3D.py b/fipy/meshes/uniformGrid3D.py
index 304bb69..827ca9e 100644
--- a/fipy/meshes/uniformGrid3D.py
+++ b/fipy/meshes/uniformGrid3D.py
@pkgw
pkgw / clean.py
Last active December 25, 2015 16:25
Simple pwkit CLEAN implementation, never really used so who knows if it works
# Copyright 2015 Peter Williams
# Licensed under the MIT License.
import numpy as np
from scipy.signal import lombscargle
from pwkit import lsqmdl
twopi = 2 * np.pi
ncoarse = 512
@pkgw
pkgw / affils.sty
Last active March 16, 2016 15:58
Automatically-numbered affiliations using textual keys.
% affils.sty -- automatically number affiliations
% Copyright 2016 Peter Williams <peter@newton.cx>
% Licensed under the MIT License.
%
% To use:
%
% 1. Save this file next to your .tex file and add \usepackage{affils} at its top.
%
% 2. Before your author list, write:
%
@pkgw
pkgw / chandra_repro.py
Created March 28, 2016 22:25
Overcomplicated untested work on automagical ninja pipeline for X-ray processing
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 Peter Williams <peter@newton.cx> and collaborators.
# Licensed under the MIT License.
"""Framework to call the CIAO chandra_repro program in the context of a Ninja
build system.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
#! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 Peter Williams <peter@newton.cx> and collaborators.
# Licensed under the MIT License.
# XXX remove hashbang
"""Compute phase closure diagnostics from a Measurement Set
For most results to make sense, the data should be observations of a bright
@pkgw
pkgw / uval.py
Created April 4, 2013 02:38
"The worst possible way to propagate uncertainties."
"""
The worst possible way to propagate uncertainties.
"""
import numpy as np
from scipy.stats import scoreatpercentile as sap
n = 1024
uplaces = 1 # the argument is that you generally only know your uncerts to 1 place
udtype = np.double
@pkgw
pkgw / five-hours.diff
Created January 23, 2018 22:23
Change in the list of pending conda-forge Travis CI jobs, sorted by job id, 2018 Jan 23, five hour time span
--- diffable-earlier.txt 2018-01-23 17:19:00.965739367 -0500
+++ diffable-later.txt 2018-01-23 17:18:56.938713677 -0500
@@ -145,6 +145,19 @@
flask-sqlalchemy-feedstock build #13 job #2
flask-sqlalchemy-feedstock build #13 job #3
staged-recipes build #13877 job #1
+pvlib-python-feedstock build #28 job #1
+pvlib-python-feedstock build #28 job #2
+pvlib-python-feedstock build #28 job #3
+staged-recipes build #25180 job #1