Merge branch 'master' into reconnection
This commit is contained in:
commit
2dcea97ee4
@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
||||
|
||||
setuptools.setup(
|
||||
name="amunpy",
|
||||
version="0.9.6",
|
||||
version="0.9.7",
|
||||
author="Grzegorz Kowal",
|
||||
author_email="grzegorz@amuncode.org",
|
||||
description="Python Interface for the AMUN code's snapshots",
|
||||
|
@ -21,6 +21,6 @@ __all__ = [ 'AmunXML', 'AmunH5', 'WriteVTK', \
|
||||
|
||||
__author__ = "Grzegorz Kowal"
|
||||
__copyright__ = "Copyright 2018-2022 Grzegorz Kowal <grzegorz@amuncode.org>"
|
||||
__version__ = "0.9.6"
|
||||
__version__ = "0.9.7"
|
||||
__maintainer__ = "Grzegorz Kowal"
|
||||
__email__ = "grzegorz@amuncode.org"
|
||||
|
@ -181,8 +181,8 @@ class Amun:
|
||||
if 'dens' in self.variables:
|
||||
self.variables['density'] = 'dens'
|
||||
self.variables['logarithm of density'] = 'logd'
|
||||
if 'pres' in self.variables:
|
||||
self.variables['pressure'] = 'dens'
|
||||
if 'pres' in self.variables or self.attributes['eos'] == 'iso':
|
||||
self.variables['pressure'] = 'pres'
|
||||
self.variables['logarithm of pressure'] = 'logp'
|
||||
if all(v in self.variables for v in ['velx','vely','velz']):
|
||||
self.variables['velocity'] = 'vvec'
|
||||
@ -258,8 +258,16 @@ class Amun:
|
||||
dset[p,...] = self.chunks[chunk_number]['levels'][p]
|
||||
elif dataset == 'logd':
|
||||
dset = numpy.log10(self.__read_binary_data__('dens', chunk_number))
|
||||
elif dataset == 'pres':
|
||||
if self.attributes['eos'] == 'iso':
|
||||
dset = self.__read_binary_data__('dens', chunk_number) * self.attributes['sound_speed']**2
|
||||
else:
|
||||
dset = self.__read_binary_data__('pres', chunk_number)
|
||||
elif dataset == 'logp':
|
||||
dset = numpy.log10(self.__read_binary_data__('pres', chunk_number))
|
||||
if self.attributes['eos'] == 'iso':
|
||||
dset = numpy.log10(self.__read_binary_data__('dens', chunk_number) * self.attributes['sound_speed']**2)
|
||||
else:
|
||||
dset = numpy.log10(self.__read_binary_data__('pres', chunk_number))
|
||||
elif dataset == 'velo':
|
||||
tmp = self.__read_binary_data__('velx', chunk_number)
|
||||
dset = tmp**2
|
||||
|
Loading…
x
Reference in New Issue
Block a user