PYTHON: Update adiabatic index name.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
2327e6ffa5
commit
5886c2039a
@ -149,7 +149,7 @@ class AmunXML:
|
||||
variables.append('cury')
|
||||
variables.append('curz')
|
||||
variables.append('curr')
|
||||
if 'pres' in variables and 'gamma' in self.attributes:
|
||||
if 'pres' in variables and 'adiabatic_index' in self.attributes:
|
||||
variables.append('eint')
|
||||
if all(v in variables for v in ['dens','pres']):
|
||||
variables.append('temp')
|
||||
@ -513,7 +513,7 @@ class AmunXML:
|
||||
dset = np.sqrt(dset)
|
||||
elif var == 'eint':
|
||||
dset = self.read_binary_data(n, 'pres')
|
||||
dset *= 1.0 / (self.attributes('gamma') - 1.0)
|
||||
dset *= 1.0 / (self.attributes('adiabatic_index') - 1)
|
||||
dset = np.reshape(dset, cm)
|
||||
elif var == 'temp':
|
||||
dset = self.read_binary_data(n, 'pres')
|
||||
@ -530,7 +530,7 @@ class AmunXML:
|
||||
tmp = self.read_binary_data(n, 'dens')
|
||||
dset *= tmp
|
||||
tmp = self.read_binary_data(n, 'pres')
|
||||
dset += 2.0 / (self.attributes('gamma') - 1.0) * tmp
|
||||
dset += 2.0 / (self.attributes('adiabatic_index') - 1) * tmp
|
||||
if 'magn' in self.variables:
|
||||
tmp = self.read_binary_data(n, 'magx')
|
||||
dset = tmp**2
|
||||
@ -925,7 +925,7 @@ def amun_dataset(fname, vname, shrink = 1, interpolation = 'rebin', progress = F
|
||||
nc = amun_attribute(fname, 'nprocs')
|
||||
nl = amun_attribute(fname, 'nleafs')
|
||||
if eos == 'adi':
|
||||
gm = amun_attribute(fname, 'gamma')
|
||||
gm = amun_attribute(fname, 'adiabatic_index')
|
||||
|
||||
# get block dimensions and the maximum level
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user