...
- download the POWER code from https://git.ncsa.illinois.edu/elihu/Gravitational_Waveform_Extractor
- run the example shown in its README file.This will produce a directory
Extrapolated_Strain
with the output files in it inspect the code in exercise.py and make sure you understand it, you can run it via :
Code Block python3
./exercise.py
and it which will create a file
strain.h5
as the output.- it will show some data on screen to illustrate how to read HDF5 files
- now edit the code to extract the final value for the quantitiy "qlm_coordspinz[2]" from file "simulations/J0040_N40/output-0018/J0040_N40/quasilocalmeasures-qlm_scalars..asc"
and add a new attribute "spinz" to the same dataset as "Mirr", output "spinz" similar to how "Mirr" is output
run the code and make sure that your output looks like this:
Code Block language text Mirr is: 0.8849351497 spinz is: 0.622982178513881 strain is: [[-1.07734394e+02 -1.97435367e-03 -3.47866610e-04] [-1.06870394e+02 -2.20947167e-03 -2.08704522e-04] [-1.06006394e+02 -2.44269767e-03 -4.09940789e-05] [-1.05142394e+02 -2.67012740e-03 1.53466795e-04] [-1.04278394e+02 -2.88837339e-03 3.72011225e-04] [-1.03414394e+02 -3.09482594e-03 6.11327622e-04] [-1.02550394e+02 -3.28766689e-03 8.67687648e-04] [-1.01686394e+02 -3.46590267e-03 1.13718397e-03] [-1.00822394e+02 -3.62928587e-03 1.41592530e-03] [-9.99583943e+01 -3.77823285e-03 1.70021021e-03] [-9.90943943e+01 -3.91369150e-03 1.98664637e-03] [-9.82303943e+01 -4.03701767e-03 2.27224160e-03] [-9.73663943e+01 -4.14983968e-03 2.55444780e-03] [-9.65023943e+01 -4.25394309e-03 2.83118410e-03] [-9.56383943e+01 -4.35116303e-03 3.10082727e-03] [-9.47743943e+01 -4.44330059e-03 3.36219212e-03] [-9.39103943e+01 -4.53205400e-03 3.61449322e-03] [-9.30463943e+01 -4.61897146e-03 3.85730553e-03] [-9.21823943e+01 -4.70541818e-03 4.09051596e-03] [-9.13183943e+01 -4.79255934e-03 4.31427882e-03]]
...