Skip to content

Instantly share code, notes, and snippets.

@nmearl
nmearl / install.rb
Last active August 29, 2015 14:21 — forked from skyl/install.rb
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY
# chmod +x install.rb
# ./install.rb
YOUR_HOME = ''
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local"
HOMEBREW_CACHE = '/Library/Caches/Homebrew'
HOMEBREW_REPO = 'https://github.com/Homebrew/homebrew'
@nmearl
nmearl / peakdetect.py
Created February 27, 2016 15:58 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
import numpy as np
from math import pi, log
import pylab
from scipy import fft, ifft
from scipy.optimize import curve_fit
i = 10000
x = np.linspace(0, 3.5 * pi, i)
y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 *
np.random.randn(i))

Please see the updated notebook here.

@nmearl
nmearl / engine_input.md
Created February 9, 2017 19:58
Documentation for engine parameters files and output data

Currently Supported Calculation Modes (03-2016)

The following following JWST instrument/mode combinations are currently implemented, working, and part of the nightly regression tests:

  • miri:
    • imaging
    • mrs
  • coronagraphy

Keybase proof

I hereby claim:

  • I am nmearl on github.
  • I am nmearl (https://keybase.io/nmearl) on keybase.
  • I have a public key whose fingerprint is 6502 BEC5 3F04 DC7D 122E F9EB 78A8 C346 83E2 99CA

To claim this, I am signing this object:

@nmearl
nmearl / example_loader.py
Last active December 8, 2017 19:59
Example of how to create a custom python loader function for reading data into SpecViz.
import os
from astropy.io import fits
from astropy.wcs import WCS
from astropy.units import Unit
from astropy.nddata import StdDevUncertainty
from specviz.interfaces.decorators import data_loader
from specviz.core.data import Spectrum1DRef
name: specviz_dev_env
channels:
- defaults
dependencies:
- ca-certificates=2018.03.07=0
- certifi=2018.4.16=py36_0
- libcxx=4.0.1=h579ed51_0
- libcxxabi=4.0.1=hebd6815_0
- libedit=3.1.20170329=hb402a30_2
- libffi=3.2.1=h475c297_4
from astroquery.jplhorizons import HorizonsClass
HorizonsClass.vectors_async = vectors_async_full
Horizons = HorizonsClass()
def vectors_async_full(self, get_query_payload=False, refplane='ecliptic',
closest_apparition=False, no_fragments=False,
get_raw_response=False, cache=True):
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.