Lot of new things

This commit is contained in:
Noe Brucy
2019-07-18 11:33:15 +02:00
parent 8af0d5574d
commit 1211dbb7b8
3 changed files with 731 additions and 626 deletions
-23
View File
@@ -4,27 +4,4 @@ import matplotlib.pyplot as plt
import numpy as np
from matplotlib.collections import EllipseCollection
me.make_clump_hop('/home/nbrucy/simus/conv_disk/73_beta3_jeansrefine', 40, 'test_hop', 3, 12,
[0.5, 0.5, 0.5], 1., path_out='/home/nbrucy/visus/conv_disk/73_beta3_jeansrefine/', path_hop=
'./', force=True)
me.clump_properties('test_hop', '/home/nbrucy/simus/conv_disk/73_beta3_jeansrefine', 40, path_out='/home/nbrucy/visus/conv_disk/73_beta3_jeansrefine/', gcomp=False)
f = open('/home/nbrucy/visus/conv_disk/73_beta3_jeansrefine/test_hop_prop_struct.save')
a = pickle.load(f)
f.close()
mask = a['n_max'] > 10**4
p = a['pos_n_max'][mask]
c = a['n_max'][mask]
f = open('/home/nbrucy/visus/conv_disk/73_beta3_jeansrefine/maps_disk_73_beta3_jeansrefine_00040.save')
m = pickle.load(f)
plt.imshow(np.log10(m['coldens_z']), extent=m['im_extent'], cmap='plasma')
plt.scatter(p[:, 0], 2 - p[:, 1], c = c)
fig, ax = plt.subplots(1, 1)
offsets = list(zip(p[:, 0], 2 - p[:, 1]))
size = a['size_iner2'][mask]
ax.add_collection(EllipseCollection(widths=size, heights=size, angles=0, units='xy',
facecolors=plt.cm.hsv(a['n_max'][mask]),
offsets=offsets, transOffset=ax.transData))