Пример #1
0
 def __init__(self, grids, dust_id):
     if np.array(grids[0][grids[0].keys()[0]]).ndim == 4:
         self.dust_id = dust_id
     else:
         self.dust_id = None
     self.grids = grids
     BaseIOHandler.__init__(self)
Пример #2
0
 def __init__(self, grids, dust_id):
     if np.array(grids[0][grids[0].keys()[0]]).ndim == 4:
         self.dust_id = dust_id
     else:
         self.dust_id = None
     self.grids = grids
     BaseIOHandler.__init__(self)
Пример #3
0
Файл: io.py Проект: tukss/yt
 def __init__(self, ds, *args, **kwargs):
     BaseIOHandler.__init__(self, ds, *args, **kwargs)
     self.ds = ds
     self._handle = ds._handle
     self.dim = self._handle["Chombo_global/"].attrs["SpaceDim"]
     self._read_ghost_info()
     if self._offset_string not in self._handle["level_0"]:
         self._calculate_offsets()
Пример #4
0
 def __init__(self, ds, *args, **kwargs):
     BaseIOHandler.__init__(self, ds, *args, **kwargs)
     self.ds = ds
     self._handle = ds._handle
     self.dim = self._handle['Chombo_global/'].attrs['SpaceDim']
     self._read_ghost_info()
     if self._offset_string not in self._handle['level_0']:
         self._calculate_offsets()
Пример #5
0
 def __init__(self, ds, ghost_zones=3):
     self.ds = ds
     import enzo
     self.enzo = enzo
     self.grids_in_memory = enzo.grid_data
     self.old_grids_in_memory = enzo.old_grid_data
     self.my_slice = (slice(ghost_zones,-ghost_zones),
                   slice(ghost_zones,-ghost_zones),
                   slice(ghost_zones,-ghost_zones))
     BaseIOHandler.__init__(self, ds)
Пример #6
0
 def __init__(self, ds, ghost_zones=3):
     self.ds = ds
     import enzo
     self.enzo = enzo
     self.grids_in_memory = enzo.grid_data
     self.old_grids_in_memory = enzo.old_grid_data
     self.my_slice = (slice(ghost_zones,-ghost_zones),
                   slice(ghost_zones,-ghost_zones),
                   slice(ghost_zones,-ghost_zones))
     BaseIOHandler.__init__(self, ds)
Пример #7
0
 def __init__(self, ds):
     BaseIOHandler.__init__(self, ds)
     self.ds = ds
     self.datfile = ds.parameter_filename
     header = self.ds.parameters
     self.block_shape = np.append(header["block_nx"], header["nw"])
Пример #8
0
 def __init__(self, quantities):
     self.quantities = quantities
     BaseIOHandler.__init__(self)
Пример #9
0
 def __init__(self, quantities):
     self.quantities = quantities
     BaseIOHandler.__init__(self)
Пример #10
0
 def __init__(self, ds, *args, **kwargs):
     BaseIOHandler.__init__(self, ds, *args, **kwargs)
     self.ds = ds
     self._handle = ds._handle
Пример #11
0
 def __init__(self, stream_handler):
     self.fields = stream_handler.fields
     BaseIOHandler.__init__(self)