Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • elihu/Gravitational_Waveform_Extractor
  • weiren2/Gravitational_Waveform_Extractor
  • chavva2/Gravitational_Waveform_Extractor
  • brendal4/Gravitational_Waveform_Extractor
  • mingxin9/Gravitational_Waveform_Extractor
5 results
Show changes
Commits on Source (73)
Showing
with 2 additions and 109183 deletions
Copyright (c) 2017 The Board of Trustees of the University of Illinois
All rights reserved.
Developed by: Daniel Johnson, E. A. Huerta, Roland Haas
Developed by: Daniel Johnson, E. A. Huerta, Roland Haas, Debopam Sanyal,
Brockton Brendal
NCSA Gravity Group
National Center for Supercomputing Applications
University of Illinois at Urbana-Champaign
......
Python Open-source Waveform ExtractoR: An open source, python package to monitor and post-process numerical relativity simulations
Author(s) : Daniel Johnson <dsjohns2@illinois.edu>
E. A. Huerta <elihu@illinois.edu>
Roland Haas <rhaas@ncsa.illinois.edu>
Copyright : (c) 2017 The Board of Trustees of the University of Illinois
Maintainer(s): Daniel Johnson, E. A. Huerta, Roland Haas
License : NCSA
1. Purpose
POWER is an open source, python package to monitor the status and progress of
numerical relativity simulations, and to post-process the data products of
these simulations to compute the gravitational wave strain at future null
infinity.
To run POWER on the example dataset, do:
./power.py simulations/J0040_N40
#!/bin/bash
for folder in "$@"
do
run=${folder##*/}
./power.py $folder
./plot_monitor.py $run
done
#!/usr/bin/env python
# Copyright (c) 2017 The Board of Trustees of the University of Illinois
# All rights reserved.
#
# Developed by: Daniel Johnson, E. A. Huerta, Roland Haas
# NCSA Gravity Group
# National Center for Supercomputing Applications
# University of Illinois at Urbana-Champaign
# http://gravity.ncsa.illinois.edu/
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal with the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimers.
#
# Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimers in the documentation
# and/or other materials provided with the distribution.
#
# Neither the names of the National Center for Supercomputing Applications,
# University of Illinois at Urbana-Champaign, nor the names of its
# contributors may be used to endorse or promote products derived from this
# Software without specific prior written permission.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# WITH THE SOFTWARE.
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import sys
import os
run_name = sys.argv[1]
python_strain = np.loadtxt("./Extrapolated_Strain/"+run_name+"/"+run_name+"_radially_extrapolated_strain_l2_m2.dat")
python_phase = np.loadtxt("./Extrapolated_Strain/"+run_name+"/"+run_name+"_radially_extrapolated_phase_l2_m2.dat")
python_amp = np.loadtxt("./Extrapolated_Strain/"+run_name+"/"+run_name+"_radially_extrapolated_amplitude_l2_m2.dat")
py_t = python_strain[:, 0]
py_hplus = python_strain[:, 1]
py_phase = python_phase[:, 1]
py_amp = python_amp[:, 1]
cur_max_time = python_strain[0][0]
cur_max_amp = abs(pow(python_strain[0][1], 2)) + abs(pow(python_strain[0][2], 2))
for i in python_strain[:]:
cur_time = i[0]
cur_amp = abs(pow(i[1], 2)) + abs(pow(i[2], 2))
if(cur_amp>cur_max_amp):
cur_max_amp = cur_amp
cur_max_time = cur_time
run_name_without_resolution = run_name.split("_")[0]
matplotlib.rcParams.update({'font.size': 12})
matplotlib.rcParams.update({'font.family': 'serif'})
plt.title(run_name_without_resolution)
plt.plot(py_t, py_hplus)
plt.xlim((0,cur_max_time+200))
plt.ylabel('${\mathfrak{R}} [h(t)]$')
plt.xlabel('Time [M]')
plt.savefig("./Extrapolated_Strain/"+run_name+"/"+run_name+"_strain_plot_l2_m2.png")
plt.close()
matplotlib.rcParams.update({'font.size': 12})
matplotlib.rcParams.update({'font.family': 'serif'})
plt.title(run_name_without_resolution)
plt.plot(py_t, py_phase)
plt.xlim((0,cur_max_time+200))
plt.ylabel('Phase')
plt.xlabel('Time [M]')
plt.savefig("./Extrapolated_Strain/"+run_name+"/"+run_name+"_phase_plot_l2_m2.png")
plt.close()
matplotlib.rcParams.update({'font.size': 12})
matplotlib.rcParams.update({'font.family': 'serif'})
plt.title(run_name_without_resolution)
plt.plot(py_t, py_amp)
plt.xlim((0,cur_max_time+200))
plt.ylabel('Amplitude')
plt.xlabel('Time [M]')
plt.savefig("./Extrapolated_Strain/"+run_name+"/"+run_name+"_amplitude_plot_l2_m2.png")
plt.close()
#!/usr/bin/env python
# Copyright (c) 2017 The Board of Trustees of the University of Illinois
# All rights reserved.
#
# Developed by: Daniel Johnson, E. A. Huerta, Roland Haas
# NCSA Gravity Group
# National Center for Supercomputing Applications
# University of Illinois at Urbana-Champaign
# http://gravity.ncsa.illinois.edu/
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal with the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimers.
#
# Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimers in the documentation
# and/or other materials provided with the distribution.
#
# Neither the names of the National Center for Supercomputing Applications,
# University of Illinois at Urbana-Champaign, nor the names of its
# contributors may be used to endorse or promote products derived from this
# Software without specific prior written permission.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# WITH THE SOFTWARE.
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import sys
run_name = sys.argv[1]
python_strain = np.loadtxt("./Extrapolated_Strain/"+run_name+"/"+run_name+"_radially_extrapolated_strain_l2_m2.dat")
python_phase = np.loadtxt("./Extrapolated_Strain/"+run_name+"/"+run_name+"_radially_extrapolated_phase_l2_m2.dat")
py_t = python_strain[:, 0]
py_hplus = python_strain[:, 1]
py_phase = python_phase[:, 1]
run_name_without_resolution = run_name.split("_")[0]
matplotlib.rcParams.update({'font.size': 12})
matplotlib.rcParams.update({'font.family': 'serif'})
plt.title(run_name_without_resolution)
plt.plot(py_t, py_hplus)
plt.xlim((0,None))
plt.ylabel('${\mathfrak{R}} [h(t)]$')
plt.xlabel('Time [M]')
plt.show()
plt.title(run_name_without_resolution)
plt.plot(py_t, py_phase)
plt.xlim((0,None))
plt.ylabel('$\phi$')
plt.xlabel('Time [M]')
plt.show()
This diff is collapsed.
#!/usr/bin/env python
import numpy
import sys
import os
for path in sys.argv[1:]:
main_dir = path
sim = path.split("/")[-2]
strain_data = numpy.loadtxt(path)
cur_max_time = strain_data[0][0]
cur_max_amp = abs(pow(strain_data[0][1], 2)) + abs(pow(strain_data[0][2], 2))
for i in strain_data[:]:
cur_time = i[0]
cur_amp = abs(pow(i[1], 2)) + abs(pow(i[2], 2))
if(cur_amp>cur_max_amp):
cur_max_amp = cur_amp
cur_max_time = cur_time
for i in strain_data[:]:
i[0] -= cur_max_time
numpy.savetxt("./Extrapolated_Strain/"+sim+"/"+sim+"_shifted_radially_extrapolated_strain.dat", strain_data)
print(cur_max_time)
File deleted
# ==================================
# Numerical Relativity Metadata file
# ==================================
#
# This file contains information about the simulation provided by the
# TwoPunctures thorn. The format is described in the NR Data Format Document
# http://arxiv.org/abs/0709.0093 [draft SVN r707].
[metadata]
initial-ADM-energy = 0.9914380459677640811
initial-ADM-angular-momentumx = 0
initial-ADM-angular-momentumy = 0
initial-ADM-angular-momentumz = 1.010179735247381805
initial-separation = 16.28895279716000033
initial-data-type = Bowen-York
initial-data-bibtex-keys = Bowen:1980yu Brandt:1997tf Ansorg:2004ds
initial-bh-position1x = 8.144476398580000165
initial-bh-position1y = 0
initial-bh-position1z = 0
initial-bh-position2x = -8.144476398580000165
initial-bh-position2y = 0
initial-bh-position2z = 0
initial-bh-momentum1x = 0
initial-bh-momentum1y = 0.06201624793359999943
initial-bh-momentum1z = 0
initial-bh-momentum2x = -0
initial-bh-momentum2y = -0.06201624793359999943
initial-bh-momentum2z = 0
initial-bh-spin1x = 0
initial-bh-spin1y = 0
initial-bh-spin1z = 0
initial-bh-spin2x = 0
initial-bh-spin2y = 0
initial-bh-spin2z = 0
initial-bh-puncture-adm-mass1 = 0.5000000000000063283
initial-bh-puncture-adm-mass2 = 0.5000000000000063283
# Scalar ASCII output created by CarpetIOScalar
# created on nid22248 by elihu on Apr 24 2017 at 19:17:53-0500
# parameter filename: "/scratch/sciteam/elihu/simulations/J0040_N40/output-0000/J0040_N40.par"
# Build ID: build-sim-h2ologin2.ncsa.illinois.edu-elihu-2016.12.02-22.38.15-4497
# Simulation ID: run-J0040_N40-nid22248-elihu-2017.04.25-00.15.02-4471
# Run ID: run-J0040_N40-nid22248-elihu-2017.04.25-00.15.02-4471
#
# ML_BSSN::H (ml_bssn-ml_ham)
# 1:iteration 2:time 3:data
# data columns: 3:H
0 0 3.79947155914401e-12
256 0.432 3.79947155914401e-12
512 0.864 3.79666296698173e-12
768 1.296 3.80576357579658e-12
1024 1.728 3.82551540416214e-12
1280 2.16 3.84842960911371e-12
1536 2.592 1.79384151835681e-11
1792 3.024 1.91145230445222e-11
2048 3.456 4.14052788404381e-12
2304 3.888 4.58591180155506e-11
2560 4.32 3.84667837128416e-11
2816 4.752 2.12713563570343e-11
3072 5.184 6.3350755113462e-11
3328 5.616 5.27687135020937e-11
3584 6.048 5.39969921036114e-11
3840 6.48 7.92653073971886e-11
4096 6.912 7.50470305296641e-11
4352 7.344 7.48000420455252e-11
4608 7.776 8.19045773920514e-11
4864 8.208 8.90246599871955e-11
5120 8.64 7.83314439663718e-11
5376 9.072 8.85560946408737e-11
5632 9.504 1.06805070849054e-10
5888 9.936 9.55654409840328e-11
6144 10.368 1.02642397086244e-10
6400 10.8 1.38160960171004e-10
6656 11.232 1.15216544608924e-10
6912 11.664 1.3873188866365e-10
7168 12.096 1.68239053933051e-10
7424 12.528 783.516391312273
7680 12.96 42.1010178638053
7936 13.392 1.95186325332284e-10
8192 13.824 783.516391438945
8448 14.256 81.5005304331778
8704 14.688 2.10241188710688e-10
8960 15.12 1567.03278287203
9216 15.552 244.500903328935
9472 15.984 163.056992541628
9728 16.416 1567.03278290387
9984 16.848 407.501299205076
10240 17.28 326.057439873519
10496 17.712 1573.85700227295
10752 18.144 1160.42307280907
11008 18.576 757.292676804418
11264 19.008 1512.33483232701
11520 19.44 1153.00994468126
11776 19.872 1200.55730719511
12032 20.304 1532.37998716141
12288 20.736 1883.22658003341
12544 21.168 1332.74297185831
12800 21.6 1595.68106702117
13056 22.032 2021.12635102862
13312 22.464 1445.89736180207
13568 22.896 1660.29535415106
13824 23.328 2074.54523163749
14080 23.76 1512.34052537768
14336 24.192 1660.2055697605
14592 24.624 2109.56076830194
14848 25.056 1570.87528230049
15104 25.488 1687.04414128873
15360 25.92 2090.21207986466
15616 26.352 1672.85555856899
15872 26.784 944.659795210749
16128 27.216 2155.05063367014
16384 27.648 2476.67978158629
16640 28.08 2365.87275847067
16896 28.512 2756.45858143906
17152 28.944 3281.46626367389
17408 29.376 3204.92261092089
17664 29.808 3299.94586422539
17920 30.24 3427.15909563579
18176 30.672 3502.2864113601
18432 31.104 3433.3932378666
18688 31.536 4213.28479205853
18944 31.968 3944.99896657262
19200 32.4 3799.22128474563
19456 32.832 4300.08011977155
19712 33.264 4472.23946064415
19968 33.696 4342.12498176261
20224 34.128 5180.21193264953
20480 34.56 7092.36582734317
20736 34.992 4582.15271167994
20992 35.424 5340.81263580758
21248 35.856 7176.3271905177
21504 36.288 4797.29015496877
21760 36.72 5445.67438348302
22016 37.152 10206.303997951
22272 37.584 7074.99848393911
22528 38.016 6229.7011897462
22784 38.448 10353.4439618685
23040 38.88 7779.50099523348
23296 39.312 8066.91947199618
23552 39.744 13501.1272494343
23808 40.176 11156.1031078159
24064 40.608 8251.16338097924
24320 41.04 13680.3240013796
24576 41.472 11445.8451613729
24832 41.904 8408.1321480128
25088 42.336 13999.8786595741
25344 42.768 13400.0537053874
25600 43.2 8708.04982516244
25856 43.632 15437.9168835215
26112 44.064 13421.0008861036
26368 44.496 9743.7992068635
26624 44.928 16016.2215010226
26880 45.36 13462.5232788732
27136 45.792 10012.1106123024
27392 46.224 16149.545419892
27648 46.656 13574.6105984315
27904 47.088 9909.63207353294
28160 47.52 16569.3667615553
28416 47.952 13375.1735662884
28672 48.384 9987.55998612008
28928 48.816 16714.9556047989
29184 49.248 13645.5235888243
29440 49.68 10068.9125184285
29696 50.112 16818.1002880182
29952 50.544 13890.4740853618
30208 50.976 10127.8044898895
30464 51.408 17062.6764348865
30720 51.84 13784.7461069682
30976 52.272 10599.5669577191
31232 52.704 17282.2214913235
31488 53.136 13745.3063724671
31744 53.568 10615.9717069715
32000 54 17796.0770735437
32256 54.432 13733.4180799353
32512 54.864 11100.2139258386
32768 55.296 17685.1346435113
33024 55.728 14099.5298308229
33280 56.16 11703.8438047565
33536 56.592 17554.0111209613
33792 57.024 14154.2615335623
34048 57.456 12329.8183493525
34304 57.888 17506.9723096164
34560 58.32 14126.6587255037
34816 58.752 12394.1672558456
35072 59.184 17149.8977357508
35328 59.616 13995.371046431
35584 60.048 12377.6935454986
35840 60.48 16986.6000160517
36096 60.912 13914.0965812308
36352 61.344 12311.4911708126
36608 61.776 16817.9078000292
36864 62.208 13721.4192056236
37120 62.64 12203.2308426398
37376 63.072 16863.8010450173
37632 63.504 13583.655333236
37888 63.936 12062.9281592879
38144 64.368 16600.4483954112
38400 64.8 13494.5814671668
38656 65.232 12002.9697252996
38912 65.664 16494.1153038554
39168 66.096 13421.4056018058
39424 66.528 11895.7694143065
39680 66.96 16377.5841711814
39936 67.392 13166.804808218
40192 67.824 11782.1448965896
40448 68.256 16128.0901724043
40704 68.688 13071.2262449341
40960 69.12 11673.1405447036
41216 69.552 15910.9886246838
41472 69.984 12813.6646449734
41728 70.416 11642.3520683933
41984 70.848 15633.9799882294
42240 71.28 12034.3157781595
42496 71.712 11369.8797601769
42752 72.144 15663.5952879014
43008 72.576 11751.237301658
43264 73.008 11317.3226956064
43520 73.44 15558.6354375698
43776 73.872 11672.550931648
44032 74.304 11155.5411168177
44288 74.736 15448.4373487718
44544 75.168 11361.9848584343
44800 75.6 10928.5728290009
45056 76.032 15183.6869401502
45312 76.464 11389.7951430256
45568 76.896 10773.0634650125
45824 77.328 14843.8602511289
46080 77.76 11146.6223702108
46336 78.192 10704.3214109662
46592 78.624 14696.6222692357
46848 79.056 10789.1639747639
47104 79.488 10699.4393071665
47360 79.92 14431.4095141906
47616 80.352 10534.137525979
47872 80.784 10533.8006470478
48128 81.216 14268.1874368086
48384 81.648 10405.7678813556
48640 82.08 10416.1185571431
48896 82.512 13969.5497603027
49152 82.944 10087.1301876651
49408 83.376 10078.5015038042
49664 83.808 13832.6269167663
49920 84.24 9903.36479548977
50176 84.672 9891.02946741089
50432 85.104 13561.1734600949
50688 85.536 9674.69188450721
50944 85.968 9726.99429920734
51200 86.4 13430.3857360895
51456 86.832 9429.15043654471
51712 87.264 9565.26582590076
51968 87.696 13179.1748545878
52224 88.128 9306.84137877211
52480 88.56 9432.30419695212
52736 88.992 12982.5739372272
52992 89.424 9049.97110764222
53248 89.856 9417.27656064769
53504 90.288 12880.2211729505
53760 90.72 9119.9628456284
54016 91.152 9470.40573506094
54272 91.584 11918.0007247328
54528 92.016 9139.76429096722
54784 92.448 9201.32780549331
55040 92.88 11762.2927663067
55296 93.312 8899.15698509712
55552 93.744 9548.72526790828
55808 94.176 11523.4204840633
56064 94.608 9255.75065162383
56320 95.04 9705.11466550048
56576 95.472 11624.4378373494
56832 95.904 11034.8093928824
57088 96.336 9600.07158831502
57344 96.768 11291.1155691306
57600 97.2 10806.6448860671
57856 97.632 9362.36576631531
58112 98.064 11484.7830328373
58368 98.496 10981.4063490104
58624 98.928 9532.53200265218
58880 99.36 11447.6981779332
59136 99.792 10917.8060621749
59392 100.224 9412.21235768454
59648 100.656 11329.923922572
59904 101.088 10781.4889532648
60160 101.52 9290.58442321763
60416 101.952 11195.0803024799
60672 102.384 10690.9912365538
60928 102.816 9182.68562600247
61184 103.248 11128.1071651992
61440 103.68 10698.7414593258
61696 104.112 9206.79730796487
61952 104.544 11091.9490630426
62208 104.976 10643.5715321331
62464 105.408 9150.75405390098
62720 105.84 10921.6327893588
62976 106.272 10553.9031027108
63232 106.704 9117.30867287501
63488 107.136 10860.6774945778
63744 107.568 10458.0686309787
64000 108 9057.78617147117
64256 108.432 10762.9439739368
64512 108.864 10396.9180908268
64768 109.296 8990.27213946055
65024 109.728 10579.4492867677
65280 110.16 10282.9010125573
65536 110.592 8925.13648386203
65792 111.024 10537.9880223572
66048 111.456 10179.0328919836
66304 111.888 8821.4645480054
66560 112.32 10452.3014460176