Skip to content

Instantly share code, notes, and snippets.

"""
grid_utils
----------
Utilities for gridding and ungridding data efficiently in Numpy.
"""
import numpy as np
from scipy.interpolate import griddata
@telegraphic
telegraphic / spherical_coords.py
Created December 29, 2015 21:04
Conversion between (theta, phi) and (azimuth, elevation) coordinate systems
"""
# spherical_coords.py
Convert between (theta, phi) and (azimuth, elevation) coordinate systems.
Author: Danny Price
License: MIT
## Overview
@telegraphic
telegraphic / fpga_mmap.py
Created February 19, 2015 17:20
ROACH2-MMAP: Access ROACH2 FPGA data from the PowerPC
"""
fpga_mmap.py
------------
Utilities for reading FPGA data via the memory-mapped /dev/roach/mem file
on the ROACH2 filesystem. This file needs to be run from the ROACH2, and
is an alternative to reading data via KATCP. This provides access only;
you'll need to write your own functions for transferring / storing data.
"""