Skip to content

Commit 53bd7ff

Browse files
cycle over T_bb and tau_T, FITS output
T_e comes from the cluster task index grid is the one suggested by Tuomo, small ("test") one new HDU for each combination of T_bb and tau_T, new fits file for each T_e. this can be rearranged within the code or later on all great but still 8 hours of calculations for 1 T_e-T_bb-tau_T combination with 12 orders, 150 NEnergies, 9 NMu and tau 50
1 parent c8de9ca commit 53bd7ff

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

test_parallel.jl

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
using ArgParse
2+
using FITSIO
3+
4+
function parse_commandline()
5+
s = ArgParseSettings()
6+
@add_arg_table s begin
7+
"--te"
8+
help = "give T_e"
9+
arg_type = Float64
10+
default = 0.08
11+
end
12+
13+
return parse_args(s)
14+
end
15+
16+
parsed_args = parse_commandline()
17+
#set values
18+
for (arg,val) in parsed_args
19+
println(" $arg => $val")
20+
eval(Meta.parse("$(arg)=$(val)"))
21+
end
22+
23+
T__e = te/100.0
24+
# T__e = 0.05
25+
26+
include("./cs.jl")
27+
28+
using .IsothermalComptonAtmosphere: init_atmosphere, compute_slab
29+
30+
31+
t__bb = range(0.001, step=0.0001, stop=0.002)
32+
tau__T = range(0.5, step=0.1, stop=4.0)
33+
34+
IsothermalComptonAtmosphere.init_x(150)
35+
IsothermalComptonAtmosphere.init_μ(9)
36+
IsothermalComptonAtmosphere.set_ScatterNum(12) #20? orders of scattering icluded,
37+
init_atmosphere()
38+
39+
f = FITS("CompSlab_$T__e.fits", "r+")
40+
41+
for ii in tau__T
42+
for iii in t__bb
43+
IsothermalComptonAtmosphere.init_τ(50, ii) #here come tau(nubmer of optical depth levels) and then tau_t, Thomson optical depth of thermalization
44+
IsothermalComptonAtmosphere.init_Θ(T__e, iii) # theta=kTe/mec2 and t=kTbb/mec2
45+
I = compute_slab()
46+
data = Dict("I"=>I[:,10:end,1], "Q"=>I[:,10:end,2])
47+
write(f,data)
48+
end
49+
end

0 commit comments

Comments
 (0)