Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions analysator/vlsvfile/vlsvreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3848,8 +3848,10 @@ def read_velocity_cells(self, cellid, pop="proton"):

if datatype == "float" and element_size == 4:
data_avgs = np.fromfile(fptr, dtype = np.float32, count = vector_size*num_of_blocks)
if datatype == "float" and element_size == 8:
elif datatype == "float" and element_size == 8:
data_avgs = np.fromfile(fptr, dtype = np.float64, count = vector_size*num_of_blocks)
else:
raise TypeError("Error! Bad data type in blocks! datatype found was "+datatype)
data_avgs = data_avgs.reshape(num_of_blocks, vector_size)
# Read in block coordinates:
if ("name" in child.attrib) and (child.attrib["name"] == pop) and (child.tag == "BLOCKIDS"):
Expand Down Expand Up @@ -4359,4 +4361,4 @@ def cache_optimization_files(self, force=False):
''' Create cached optimization files for this reader object (e.g. spatial index)

'''
self.__metadata_cache.set_cellid_spatial_index(force)
self.__metadata_cache.set_cellid_spatial_index(force)
Loading