This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Functions for converting dates to/from JD and MJD. Assumes dates are historical | |
dates, including the transition from the Julian calendar to the Gregorian | |
calendar in 1582. No support for proleptic Gregorian/Julian calendars. | |
:Author: Matt Davis | |
:Website: http://github.com/jiffyclub | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy, pylab, scipy | |
from scipy import optimize | |
# Uses MEANCLIP from above | |
from meanclip import meanclip | |
def msky(inarray, do_plot=0, verbose=0, ptitle='', func=0): | |
""" | |
Find modal sky on an array. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
# Uses MEANCLIP from above | |
from meanclip import meanclip | |
def mytotal(inarray, axis, type='meanclip'): | |
""" | |
Collapse 2-D array in one dimension. | |
.. note:: MYTOTAL routine from ACS library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
def meanclip(indata, clipsig=3.0, maxiter=5, converge_num=0.02, verbose=0): | |
""" | |
Computes an iteratively sigma-clipped mean on a | |
data set. Clipping is done about median, but mean | |
is returned. | |
.. note:: MYMEANCLIP routine from ACS library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
def robust_sigma(in_y, zero=0): | |
""" | |
Calculate a resistant estimate of the dispersion of | |
a distribution. For an uncontaminated distribution, | |
this is identical to the standard deviation. | |
Use the median absolute deviation as the initial | |
estimate, then weight points using Tukey Biweight. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simpler version of `PSF_GAUSSIAN` in IDL. | |
:Authors: Pey Lian Lim (Python) | |
:Organization: Space Telescope Science Institute | |
:History: | |
* 2010/08/17 PLL converted from IDL to Python. | |
""" | |
# External modules | |
import numpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script models the behavior of the agent in AI Class | |
Homework 5, Problem 3: http://youtu.be/212NkM6UCBc | |
The script prints the model grid and the total number of times a square was | |
visited by the agent over some number of simulations. | |
No actual TD-learning takes place in this script, the agent simply tries to | |
move from the start to the goal by moving to road squares on its preset path. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Add or modify a header value. Type hedit -h for help. | |
Requires pyfits and Python 2.7+. | |
Author | |
------ | |
@jiffyclub | |
git.io/jiffyclub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Print a FITS header or keyword. Type imhead -h for help. | |
Requires pyfits and Python 2.7+. | |
Author | |
------ | |
@jiffyclub | |
git.io/jiffyclub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Add or modify a header value. Type hedit.py -h for help. | |
Requires pyfits. | |
Author | |
------ | |
@jiffyclub | |
git.io/jiffyclub |
OlderNewer