How about something like this:
In [1]: import yt
...: ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')
In [2]: reg = ds.cut_region(ds.all_data(),
"np.logical_and(obj['temperature'] < 1e5, obj['temperature'] > 1e4)")
In [3]: reg['temperature'].min()
Out[3]: 10000.001953125 K
In [4]: reg['temperature'].max()
Out[4]: 99975.84375 K
In [5]: reg['metallicity'].mean()
Out[5]: 0.010114664953242768 Zsun
On Tue, Feb 5, 2019 at 9:43 AM Joseph Smidt
Hey everyone,
I would like to calculate the average metallically between two temperature values. IE... the average metallicity between T = 200 K and T = 1000 K. Is there a way to do this? Thanks!
-- ------------------------------------------------------------------------ Joseph Smidt
Theoretical Division P.O. Box 1663, Mail Stop B283 Los Alamos, NM 87545 Office: 505-665-9752 Fax: 505-667-1931 _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org