Skip to content

Instantly share code, notes, and snippets.

View jonathansick's full-sized avatar

Jonathan Sick jonathansick

View GitHub Profile
@jonathansick
jonathansick / gist:9489902
Created March 11, 2014 16:49
Pixel scale from CD matrix
np.sqrt(header['CD1_1'] ** 2. + header['CD1_2'] ** 2.) * 3600.
@jonathansick
jonathansick / SConstruct
Created March 11, 2014 19:40
SConstruct file for imfit 1.0.1 mac with home-brew gcc-4.7
# Scons "makefile" for imfit and related programs
#
# To use this, type the following on the command line:
# $ scons <target-name>
# where <target-name> is, e.g., "imft", "imfit_db", etc.
# "scons" by itself will build *all* targets
#
# To clean up files associated with a given target:
# $ scons -c <target-name>
# To clean up all targets (including programs):
@jonathansick
jonathansick / jsick_postgresql.conf
Created May 15, 2014 19:28
postgresql.conf Postgres Config File Customizations
# It's convenient to put all postgresql.conf customizations in a included file.
# From bottom postgresql.conf, include as
# include = 'path/to/jsick_postgresql.conf'
# NOTE: you may need to customize some of these columns.
# Note: Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).
max_connections = 100 # (change requires restart)
# Logging
@jonathansick
jonathansick / pypi_checklist.md
Last active August 29, 2015 14:02
A checklist for uploading to PyPI, because I always forget.

First time:

python setup.py register

Uploading a new version:

python setup.py check
@jonathansick
jonathansick / pix_scale.py
Created June 3, 2014 19:50
Flexible pixel scale
if 'CDELT' in header:
pix_scale header['CDELT'] * 3600.
else:
pix_scale = np.sqrt(header['CD1_1'] ** 2. + header['CD1_2'] ** 2.) * 3600.

Keybase proof

I hereby claim:

  • I am jonathansick on github.
  • I am jsick (https://keybase.io/jsick) on keybase.
  • I have a public key whose fingerprint is 2175 1D47 7F2A 78C3 D6AF A6E9 F210 C97A 0D74 0AA6

To claim this, I am signing this object:

@jonathansick
jonathansick / multipix_daft.ipynb
Last active August 29, 2015 14:06
Probabilistic Graphical Model of Multi-Pixel SEDs drawn in Daft
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathansick
jonathansick / archive_of_astro_comm.md
Last active August 29, 2015 14:16
A proposed workflow for the Archive of Informal Astronomy Communications
  • There is an "Archive of Informal Astronomy Communications" (name TBD);
    • The Archive has an editor and board that is backed by astro libraries and the AAS or similar organizations,
    • The Archive is fundamentally a Zenodo curated community,
    • ADS agrees to index the resources of this Zenodo community,
    • Astronomy blogs apply for affiliation with the Archive as authors (or use an arXiv-like endorsement model).
  • The blogger posts an article as usual.
  • Only if the blogger deems the post to be relevant to scholarly astronomy discourse do they intentionally submit their article to the Zenodo community (i.e., submission is not automatic so that a grad student who normally blogs astronomy research doesn't get that one blog post about a Taylor Swift concert indexed by ADS). This also implies that articles can be retroactively submitted.
  • The submission consists of the post's content. There is no prescribed format, but it should be easily and openly readable, e.g., plaintext/markdown and images or an ipy
@jonathansick
jonathansick / Cubehelix Demo.ipynb
Created April 27, 2015 02:28
Palettable Cubehelix Demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathansick
jonathansick / writer.py
Created September 23, 2010 05:16
Makes LaTeX files available to Writer on the iPad
#!/usr/bin/env python
# encoding: utf-8
"""
writer.py
Makes LaTeX files available to Writer on the iPad, and retrieves
the changed documents later. Could be modified to work with Elements,
etc. on the iPad. The idea is to copy the latex files to the
~/Dropbox/Writer directory, and retain its project membership
by appending the host directory name to the original file name.