Skip to content

Instantly share code, notes, and snippets.

View yoachim's full-sized avatar

Peter Yoachim yoachim

View GitHub Profile
@yoachim
yoachim / progress_example.py
Created August 9, 2018 22:45
Python print loop progress wihtout any extra dependencies
import sys
max_i = int(10)
for i in range(max_i):
progress = i/float(max_i)*100
text = "\rprogress = %.1f%%"%progress
sys.stdout.write(text)
sys.stdout.flush()
@yoachim
yoachim / kd_tree_speed.py
Created April 28, 2016 06:07
Testing scipy cKDtree speed
import numpy as np
import scipy
from scipy.spatial import cKDTree as kdtree
import healpy as hp
# Check the speed of the scipy kdtree
def test_tree_time(random_postions=True):
def tree_xyz(lat, lon):
import numpy as np
import scipy
from scipy.spatial import cKDTree as kdtree
# Check the speed of the scipy kdtree
def test_tree_time():
def tree_xyz(lat, lon):
"""

First: git tag the package for release. (please also fill out the git "Release" page, making it an official release and giving you a spot to write notes.)

Next, for eups:

  • log into lsst-dev as lsstsw : (without taking along your own ssh github keys!)
  • ssh -a lsstsw@lsst-dev.ncsa.illinois.edu
  • rebuild -r w.2015.30 -r 2.0 lsst_sims (or appropriate DM tag and sims tag: note that these resolve left to right, and any matching tag that is found will be used). -- note the BUILD ID that comes from the rebuild process.
  • publish -b BUILDID -t sims lsst_sims
import numpy as np
NumPoints = 100
def computeFit(numPoints, order):
xvals = np.arange(numPoints)*3.
ygiven = xvals*1.5 + 100.
vecs = []
for i in range(order+1):
vecs.append(xvals**i)
@yoachim
yoachim / gist:8949681
Created February 12, 2014 03:36
healpy build/temp*/healpix_cxx/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by healpix_cxx configure 3.11.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ /Users/lsst/src/healpy-1.7.3/healpixsubmodule/src/cxx/autotools/configure --prefix=/Users/lsst/src/healpy-1.7.3/build/temp.macosx-10.5-x86_64-2.7 CC=/usr/bin/clang -fno-strict-aliasing -I/Users/lsst/anaconda/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes CXX=/usr/bin/clang++ CFLAGS=-fno-strict-aliasing -I/Users/lsst/anaconda/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes CXXFLAGS=-fno-strict-aliasing -I/Users/lsst/anaconda/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes --disable-shared --with-pic --disable-maintainer-mode
## --------- ##
## Platform. ##
@yoachim
yoachim / gist:8949664
Created February 12, 2014 03:34
healpy build/temp*/healpix_cxx/config.status
#! /bin/sh
# Generated by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
ac_cs_recheck=false
ac_cs_silent=false
@yoachim
yoachim / gist:8949637
Created February 12, 2014 03:31
healpy output from V=1 python setup.py build
No Cython >= 0.16 found, defaulting to pregenerated c version.
running build
running build_py
running build_clib
checking if configure script for library 'cfitsio' exists
checking if configure script for library 'healpix_cxx' exists
checking if library 'cfitsio' is installed
Package cfitsio was not found in the pkg-config search path.
Perhaps you should add the directory containing `cfitsio.pc'
to the PKG_CONFIG_PATH environment variable