Skip to content

Instantly share code, notes, and snippets.

View cosmonaut's full-sized avatar

Nicholas Nell cosmonaut

  • N/A
  • Colorado
View GitHub Profile
@cosmonaut
cosmonaut / gizehpdf.py
Created December 17, 2014 03:20
Create pdf figure with gizeh
# Nicholas Nell -- http://casa.colorado.edu/~nell
import gizeh as gz
import cairocffi as cairo
class PDFS:
"""Simple class to allow gizeh to create pdf figures"""
def __init__(self, name, width, height, bg_color=None):
self.width = width
self.height = height
@cosmonaut
cosmonaut / hp54506b_sc.py
Created October 3, 2015 08:43
Script to grab screenshot from HP 54506B oscilloscope with Galvant USB/GPIB adapter.
#!/usr/bin/python
import sys
import serial
import time
import numpy as np
import matplotlib.pyplot as mp
import matplotlib.cm as cm
#48 bytes rows (384 pixels)
# Author: Nicholas Nell
# email: nicholas.nell@lasp.colorado.edu
#
# MetroPro DAT file extraction script -- this program extracts the
# basic header and intensity/phase information contained in a MetroPro
# DAT binary file.
#
# File information from "MetroPro Reference Guide" section 12 for the
# "MetroPro Binary Data File Format"
#