<jupyter_start><jupyter_text>I'm trying to process some darksky particles, in a format that's a little more manageable.<jupyter_code>import numpy as np
import h5py
from matplotlib import pyplot as plt
%matplotlib inline
import seaborn as sns
sns.set()
#f= h5py.File('/home/users/swmclau2/scratch/Darksky/ds14_a_1.0000_0.010_downsample.hdf5')
f = h5py.File('/home/users/swmclau2/scratch/Darksky/ds14_a_halos_1.0000_fixed_boundaries_v2.hdf5')
#f['halos'].keys()
parts = f['halos']
h = 0.6880620000000001
R0 = 5.81342950e6
2*R0*h/1000
x = (parts['subbox_444'].value[:100000])# + R0)*h/1000<jupyter_output><empty_output><jupyter_text>plt.scatter(x[:, 0], x[:, 2], alpha = 0.2)<jupyter_code>non_nan_idxs = ~np.isnan(x[:,7])
np.max(x[x[:,3]>0,3])
bins = np.logspace(10.5, 15.5, 20)
plt.hist(x[:, 3],bins=bins )
plt.hist(x[non_nan_idxs, 3],bins = bins )
plt.hist(x[~non_nan_idxs, 3],bins = bins , alpha = 0.1)

plt.yscale('log')
plt.xscale('log')
nan_hist, _ = np.histogram(x[~non_nan_idxs,3], bins = bins)
non_nan_hist, _  = np.histogram(x[non_nan_idxs, 3], bins = bins)

plt.plot((bins[:1]+bins[:-1])/2.0, nan_hist/non_nan_hist)
plt.xscale('log')
np.sum(non_nan_idxs)*1.0/non_nan_idxs.shape[0]
plt.scatter(x[:, 0], x[:, 2], alpha = 0.2)
plt.scatter(x[non_nan_idxs, 0], x[non_nan_idxs, 2], alpha = 1.0)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19155354449472098, 'fraction_numerical': 0.08446455505279035, 'mean_word_length': 6.455056179775281, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '408200', 'license': 'MIT', 'n_tokens_mistral': 696, 'n_tokens_neox': 618, 'n_words': 96, 'path': 'notebooks/Darksky Understanding.ipynb', 'repo_name': 'mclaughlin6464/pearce', 'size': '1326'}