Skip to content

Instantly share code, notes, and snippets.

View taldcroft's full-sized avatar

Tom Aldcroft taldcroft

View GitHub Profile
@taldcroft
taldcroft / stars_2015_006.ipynb
Last active August 29, 2015 14:13
Course attitude solution
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
pkg-config is not installed, falling back to pykg-config
/Users/aldcroft/anaconda/envs/test-healpy/lib/python2.7/site-packages/setuptools-11.3.1-py2.7.egg/pkg_resources/__init__.py:2510: PEP440Warning: 'pykg (config-1.2.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
/Users/aldcroft/anaconda/envs/test-healpy/lib/python2.7/site-packages/setuptools-11.3.1-py2.7.egg/pkg_resources/__init__.py:2510: PEP440Warning: 'pykg (config-1.3.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
zip_safe flag not set; analyzing archive contents...
Installed /Users/aldcroft/git/healpy/.eggs/pykg_config-1.3.0-py2.7.egg
running build
running build_py
creating build
creating build/lib.macosx-10.5-x86_64-2.7
# Example - Generating the Dataframe and Panel objects - pulled from pyger_cases.py
#
# The code below was pieced together from snippets in pyger_cases.py and was not fully tested.
# Testing is not entirely possible since some of it is fictitious to simplify the example.
#
# The dictionary values, pitch_set, hot_max, hot90, and cool90 are one dimensional numpy arrays
# representing heating and cooling data for one case (i.e. set of conditions). Each case is designed
# to limit the dwell time for one msid. For example, a set of cases would be used to represent the
# dwell capability for each msid at their current planning limit along with a common number of ACIS
# CCDs (where applicable).
skadev-unagi$ python
iActivePython 2.7.1.4 (ActiveState Software Inc.) based on
Python 2.7.1 (r271:86832, Feb 7 2011, 11:30:54)
[GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
po>>> import astropy
astropy.test()
WARNING: ConfigurationChangedWarning: The configuration options in astropy 1.0rc2 may have changed, your configuration file was not updated in order to preserve local changes. A new configuration template has been saved to '/home/aldcroft/.astropy/config/astropy.1.0rc2.cfg'. [astropy.config.configuration]
>>> astropy.test()
========================================================== test session starts ===========================================================
@taldcroft
taldcroft / 10-startup.py
Last active September 10, 2017 01:28
IPython startup magic
# ~/.ipython/profile_default/startup/10-mystartup.py
import numpy as np
ip = get_ipython()
def import_astropy(self, arg):
ip.ex('import astropy')
ip.ex('print(astropy.__version__)')
ip.ex('from astropy.io import ascii')
@taldcroft
taldcroft / table_aggregation.py
Created January 20, 2016 17:39
Generalized table aggregation example using astropy Table
from __future__ import division, print_function
from astropy import table
from astropy.table import Table
from collections import OrderedDict
t = Table([['a', 'a', 'a', 'b', 'b', 'c'],
[1, 2, 3, 4, 5, 6],
[2, 2, 1, 2, 1, 1]],
names=('name', 'value', 'weight'))
@taldcroft
taldcroft / combine-intervals.ipynb
Created March 20, 2020 18:14
Combine cheta logical intervals
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taldcroft
taldcroft / mystyle.css
Last active May 20, 2020 13:54
Annotated data tables
table {
table-layout: fixed;
border-collapse: collapse;
border: 3px solid black;
}
th, td {
padding: 5px;
border: 1px solid black;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.