-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added testing for potential splicing (needs to be single core as MINR…
…ES is undeterministic on multiple threads)
- Loading branch information
1 parent
510ea83
commit de798dc
Showing
6 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import subprocess | ||
import plotslice as ps | ||
import pylab as p | ||
|
||
def run_genetic(sphere_size): | ||
st = """ | ||
Om 0.279 | ||
Ol 0.721 | ||
#Ob 0.04 | ||
s8 0.817 | ||
zin 99 | ||
random_seed_real_space 8896131 | ||
camb ../camb_transfer_kmax40_z0.dat | ||
outname test_1 | ||
outdir ./ | ||
outformat tipsy | ||
basegrid 50.0 128 | ||
center 25 25 25 | ||
select_sphere %.1f | ||
splice 8896132 | ||
done | ||
dump_ps 0 | ||
dump_grid 0"""%sphere_size | ||
|
||
with open("paramfile_anim.txt","w") as f: | ||
f.write(st) | ||
|
||
subprocess.run(["../../genetIC", "paramfile_anim.txt"]) | ||
|
||
for frame in range(100): | ||
size = frame/5 | ||
run_genetic(size) | ||
p.clf() | ||
ps.plotslice("./") | ||
p.savefig("anim/%.3d.png"%frame) | ||
ps.plotslice("./",diff_prefix="comp/",diff_normalized=False) | ||
p.savefig("anim_diff/%.3d.png"%frame) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Test splicing of two different random fields | ||
|
||
Om 0.279 | ||
Ol 0.721 | ||
#Ob 0.04 | ||
s8 0.817 | ||
zin 99 | ||
|
||
random_seed 8896131 | ||
camb ../camb_transfer_kmax40_z0.dat | ||
|
||
outname test_24b | ||
outdir ./ | ||
outformat tipsy | ||
|
||
|
||
basegrid 50.0 16 | ||
|
||
center 25 25 25 | ||
select_sphere 10 | ||
|
||
|
||
set_splice_minimization MINRES | ||
splice_seedfourier_parallel | ||
set_splice_accuracy relative 1e-5 | ||
splice_potential 8896132 | ||
|
||
done | ||
|
||
dump_ps 0 | ||
dump_grid 0 |
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
genetIC/tests/test_24b_splicing_potential/reference_grid/grid-info-0.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
0 0 0 50 | ||
The line above contains information about grid level 0 | ||
It gives the x-offset, y-offset and z-offset of the low-left corner and also the box length |
Binary file not shown.