<jupyter_start><jupyter_text>jammer 1 Exploratory I- Look at the spectra<NAME>-Santiago  Friday, March 31, 2017<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
% matplotlib inline
% config InlineBackend.figure_format = 'retina'
import seaborn as sns
from astropy.io import fits
import h5py<jupyter_output><empty_output><jupyter_text>It looks like the pickle file was written in Python 2, which requires some special attention to the `encoding=` keyword argument (*kwarg*).  We must read the file as binary (`'rb'` argument to `open`).<jupyter_code>with open('../data/raw/2M_J0050.pic', 'rb') as f:
    wlgrid, Flux, Flux_err = np.load(f, allow_pickle=True, encoding='bytes')<jupyter_output><empty_output><jupyter_text>From Mike Line:> You'll probably want the units...same as in Line+2015.  > Wavelength=microns  > Flux=W/m2/m  > err=W/m2/m<jupyter_code>plt.step(wlgrid, Flux, 'k', where='mid')
plt.fill_between(wlgrid, Flux-Flux_err, Flux+Flux_err, color='r', step='mid')
plt.xlabel('$λ\;(μ\mathrm{m})$')
plt.ylabel('$f_λ \;(\mathrm{W/m}^2/\mathrm{m})$')<jupyter_output><empty_output><jupyter_text>Spot-check another one:<jupyter_code>with open('../data/raw/2M_J0415.pic', 'rb') as f:
    wlgrid, Flux, Flux_err = np.load(f, allow_pickle=True, encoding='bytes')
plt.step(wlgrid, Flux, 'k', where='mid')
plt.fill_between(wlgrid, Flux-Flux_err, Flux+Flux_err, color='r', step='mid')
plt.xlabel('$λ\;(μ\mathrm{m})$')
plt.ylabel('$f_λ \;(\mathrm{W/m}^2/\mathrm{m})$')<jupyter_output><empty_output><jupyter_text>And another:<jupyter_code>with open('../data/raw/HD3651B.pic', 'rb') as f:
    wlgrid, Flux, Flux_err = np.load(f, allow_pickle=True, encoding='bytes')

plt.step(wlgrid, Flux, 'k', where='mid')
plt.fill_between(wlgrid, Flux-Flux_err, Flux+Flux_err, color='r', step='mid')
plt.xlabel('$λ\;(μ\mathrm{m})$')
plt.ylabel('$f_λ \;(\mathrm{W/m}^2/\mathrm{m})$')
len(wlgrid)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18489583333333334, 'fraction_numerical': 0.016666666666666666, 'mean_word_length': 6.745967741935484, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '110764', 'license': 'MIT', 'n_tokens_mistral': 815, 'n_tokens_neox': 772, 'n_words': 148, 'path': 'notebooks/jammer_01-01_exploratory.ipynb', 'repo_name': 'gully/jammer-Gl570D', 'size': '1927'}