Skip to content
Snippets Groups Projects
Commit 1daad2af authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

add wrapper around field->write_filtered test

parent e19da739
No related branches found
No related tags found
No related merge requests found
Pipeline #62925 passed
#! /usr/bin/env python
import numpy as np
import h5py
import sys
import TurTLE
from TurTLE import TEST
try:
import matplotlib.pyplot as plt
except:
plt = None
def main():
c = TEST()
c.launch(
['write_filtered_test',
'--simname', 'write_filtered_test',
'--np', '4',
'--ntpp', '1',
'--wd', './'] +
sys.argv[1:])
df = h5py.File('data_for_write_filtered.h5', 'r')
bla0 = df['scal_field_full/complex/0'][:, 0]
bla1 = df['scal_field_z0slice/complex/0'][...]
assert(np.max(np.abs(bla1 - bla0)) < 1e-5)
print('SUCCESS!!! z=0 slice agrees between different datasets')
return None
if __name__ == '__main__':
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment