Skip to content

Instantly share code, notes, and snippets.

@mindriot101
mindriot101 / Makefile
Last active Aug 29, 2015
Quick file to read the floating point magnitude column from a strangely formatted fits file
View Makefile
all: read_fits
read_fits: read_fits.c
gcc $< -o $@ -lcfitsio -Wall -Wextra
@mindriot101
mindriot101 / catalogue_hdu_example.py
Last active Aug 29, 2015
Code examples for the NGTS wiki page
View catalogue_hdu_example.py
'''
Read in the catalogue RA and DEC positions and plot as a scatter plot
'''
from astropy.io import fits
import matplotlib.pyplot as plt
with fits.open("example.fits") as hdulist:
catalogue = hdulist['catalogue'].data
ra = catalogue['ra']
View gist:02d6a635372a1fa667ef
{
"metadata": {
"name": "",
"signature": "sha256:2a604bad3f98e76127138bde3e00c443f63d0dad9aacb9eb3eb134c8037c2c5c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@mindriot101
mindriot101 / gist:7c58b0a2eebbe03f88a7
Created Dec 5, 2014
CCD geometry for the prototype
View gist:7c58b0a2eebbe03f88a7
{
"metadata": {
"name": "",
"signature": "sha256:1e02e5c975ff47422f513d8acc59dcba3a82095ade7ca789b0b2203ddf223201"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
View gist:3092760b73c8f59cb8cc
{
"metadata": {
"name": "",
"signature": "sha256:5fddeb641c99360902951f4e05e71fa0f22d867941f2dd43429f5ebb3d5b3fca"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
View 01.cmake
2015-02-03 08:44:06 +0000
cmake
.
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mariadb/10.0.16
-DCMAKE_FIND_FRAMEWORK=LAST
-DCMAKE_VERBOSE_MAKEFILE=ON
-DMYSQL_DATADIR=/usr/local/var/mysql
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_MANDIR=share/man
@mindriot101
mindriot101 / pythonmodule.c
Last active Aug 29, 2015
Simple boilerplate code for wrapping C code into either python 2 or 3, taken from the porting guide: https://docs.python.org/3/howto/cporting.html
View pythonmodule.c
#include "Python.h"
/*********************************************************************************
* Taken from the porting guide: https://docs.python.org/3/howto/cporting.html
*
* Change all occurrences of
* - myextension => the extension name you want to create,
* - error_out => the function(s) you want to wrap
* - METH_NOARGS => METH_VARARGS|METH_KWARGS depending on if the function
* takes keyword arguments or not
View gist:872b4c814baec91b8296
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Voltage analysis\n",
"\n",
"Three nights were observed with different VI+ settings:\n",
"\n",
View gist:ddca3e49678f97888dfd
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Voltage analysis\n",
"\n",
"Three nights were observed with different VI+ settings:\n",
@mindriot101
mindriot101 / minimizer-evaluation.ipynb
Created Aug 7, 2015
Assessment of scipy minimizers
View minimizer-evaluation.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.