Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analysis script for CCE #635

Open
wants to merge 76 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
63f30b2
analysis script
HengruiZhu99 Jan 13, 2025
74b3417
feat: nan checker.
rashti-alireza Jan 16, 2025
d97f677
fix: name
rashti-alireza Jan 16, 2025
0c8e362
feat: add debug script.
rashti-alireza Jan 16, 2025
be07710
fix: bug.
rashti-alireza Jan 16, 2025
21680c2
feat: plot
rashti-alireza Jan 16, 2025
4641d85
fix.
rashti-alireza Jan 16, 2025
c618d78
feat: add plot script.
rashti-alireza Jan 16, 2025
a7d66a1
feat: add mode convergence.
rashti-alireza Jan 17, 2025
5479115
fix: plots.
rashti-alireza Jan 17, 2025
193da9b
fix: minor.
rashti-alireza Jan 22, 2025
47636c0
fix: minor bug.
rashti-alireza Jan 22, 2025
2d01df1
update debug scripts.
rashti-alireza Jan 22, 2025
7482abd
feat: add cce spectre plot.
rashti-alireza Jan 22, 2025
af27034
fix: bugs.
rashti-alireza Jan 22, 2025
11c04dc
renamed: cce_plot.py -> cce_txt.py
rashti-alireza Jan 22, 2025
a97cc9a
renamed: cce_txt.py -> cce_extract_txt.py
rashti-alireza Jan 22, 2025
436c934
fix: minors.
rashti-alireza Jan 22, 2025
2de7fa8
add: memo.
rashti-alireza Jan 22, 2025
49e9dca
fix & feat: fix some bugs and improve bin read speed.
rashti-alireza Jan 27, 2025
a919c1c
minor.
rashti-alireza Jan 27, 2025
a560a82
fix: fourier time derives.
rashti-alireza Jan 27, 2025
ab602d7
add note.
rashti-alireza Jan 27, 2025
1ff1ea0
feat: add chebu expansion.
rashti-alireza Jan 29, 2025
c302963
minor.
rashti-alireza Jan 29, 2025
997c08c
fix: bugs.
rashti-alireza Jan 29, 2025
4f88e05
chores.
rashti-alireza Jan 29, 2025
60fd8d3
fix: bugs
rashti-alireza Jan 30, 2025
1b09aac
fix: nasty bugs in cheb. exp.
rashti-alireza Jan 30, 2025
72a0e3d
minor.
rashti-alireza Jan 30, 2025
ea74e4a
fix: collocation points for interpolation.
rashti-alireza Jan 30, 2025
30385b6
fix: sign bug due to x=[-1,1] convention.
rashti-alireza Jan 30, 2025
3afd56e
minors.
rashti-alireza Jan 30, 2025
7034379
minor.
rashti-alireza Jan 30, 2025
63c47d2
update legendre roots calculation and include unit test for spherical…
HengruiZhu99 Feb 1, 2025
3a0d6da
clean up
HengruiZhu99 Feb 1, 2025
45c88c2
addressing comments and improving accuracy
HengruiZhu99 Feb 3, 2025
eeb7dfb
fix minor diagnostic things
HengruiZhu99 Feb 4, 2025
1321e07
Merge branch 'main' into cce_analysis
Feb 4, 2025
56b1ca5
Merge branch 'test_gauss_legendre' into cce_analysis
Feb 4, 2025
01350f1
adding debug
Feb 5, 2025
3d81529
add: plan for pittnull to cce spectre
rashti-alireza Feb 6, 2025
3b4bc9a
Merge branch 'cce_analysis' of github.com:IAS-Astrophysics/athenak in…
rashti-alireza Feb 6, 2025
86fa233
add: pit to spec transformation, not finished.
rashti-alireza Feb 7, 2025
0a1ef09
add: phi colloc.
rashti-alireza Feb 7, 2025
cdf851b
add: theta colloc pnts using sympy.
rashti-alireza Feb 7, 2025
fc2319b
add: ylm used in pittnull.
rashti-alireza Feb 7, 2025
069d330
fix: bugs.
rashti-alireza Feb 7, 2025
de453ea
add: angular coordinate transformation between pittnull to spectre.
rashti-alireza Feb 7, 2025
b887bb5
feat: optimize.
rashti-alireza Feb 10, 2025
a1ba6e6
feat: optimize.
rashti-alireza Feb 10, 2025
cd98e7f
feat: optimize and test.
rashti-alireza Feb 10, 2025
3e31638
fix: bug on reconstruction
rashti-alireza Feb 10, 2025
c77303d
feat: broadcast and debug coeff to field.
rashti-alireza Feb 10, 2025
3398bee
feat: linting.
rashti-alireza Feb 10, 2025
acee1cb
feat: broadcast.
rashti-alireza Feb 10, 2025
29c8e90
fix: many bugs
rashti-alireza Feb 10, 2025
ea9495c
add: more test scripts.
rashti-alireza Feb 10, 2025
3433986
feat: more optimized.
rashti-alireza Feb 10, 2025
1cec746
feat: add a nan checker.
rashti-alireza Feb 11, 2025
1e23dbb
chore: update scripts.
rashti-alireza Feb 11, 2025
7d7b0cb
chore: rm plan.txt
rashti-alireza Feb 11, 2025
d2bd992
fix: fix max_l inclusive bug.
rashti-alireza Feb 11, 2025
51873ed
chore: comments about max_l.
rashti-alireza Feb 11, 2025
9fd8b6d
fix: minor bugs.
rashti-alireza Feb 12, 2025
ccb6e8a
add: bms transformation.
rashti-alireza Feb 12, 2025
8ecdcb7
fix: minor comment.
rashti-alireza Feb 17, 2025
f3936af
fix: bms transformation script.
rashti-alireza Feb 17, 2025
ce8f1ac
minors.
rashti-alireza Feb 19, 2025
af39f69
add restart time step for CCE
HengruiZhu99 Feb 21, 2025
4739086
Merge branch 'main' into cce_analysis
HengruiZhu99 Feb 26, 2025
7f58741
lint python
HengruiZhu99 Feb 26, 2025
89a7c3b
fix c++ linting error
HengruiZhu99 Feb 26, 2025
1dc0872
fix python linting
HengruiZhu99 Feb 26, 2025
65351d8
fix compilation
HengruiZhu99 Mar 5, 2025
5ef0410
fix z4c restart
HengruiZhu99 Mar 8, 2025
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
118 changes: 118 additions & 0 deletions scripts/cce/BMS_tranformation.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "0491f9aa",
"metadata": {},
"outputs": [],
"source": [
"# https://scri.readthedocs.io/en/latest/tutorial_abd.html#loading-cce-data-and-adjusting-the-bms-frame\n",
"import scri\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d45f67e0",
"metadata": {},
"outputs": [],
"source": [
"w = scri.WaveformModes()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fbbd0dea",
"metadata": {},
"outputs": [],
"source": [
"abd = scri.create_abd_from_h5(\n",
" file_name=\"debug/q2/CharacteristicExtractReduction_10_8.h5\",\n",
" file_format=\"spectrecce_v1\",\n",
" ch_mass=1.0, # Optional; helpful if known\n",
" # t_interpolate=t_worldtube, # Optional; for some specified values of `t_worldtube`\n",
" t_0_superrest=500,\n",
" padding_time=200\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1d82ee9c",
"metadata": {},
"outputs": [],
"source": [
"h = abd.h"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fe2397e3",
"metadata": {},
"outputs": [],
"source": [
"plt.plot(h.t, h.data[:, h.index(2,2)])"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6bf07394",
"metadata": {},
"outputs": [],
"source": [
"re = h.data[:,h.index(2,2)].real\n",
"im = h.data[:,h.index(2,2)].imag\n",
"am = np.sqrt(np.square(re)+np.square(im))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dafbd8a1",
"metadata": {},
"outputs": [],
"source": [
"plt.plot(h.t,am)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "66a3fd9e",
"metadata": {},
"outputs": [],
"source": [
"dout = np.column_stack((h.t,re,im,am))\n",
"np.savetxt(\"./bms_h22.txt\",dout,header=\"# t re im am\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "nr_misc",
"language": "python",
"name": "nr_misc"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading