Skip to content

Commit 6f0e879

Browse files
authored
chore: Run runic formatter (#257)
1 parent f8636bd commit 6f0e879

84 files changed

Lines changed: 1531 additions & 1612 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/src/examples/xrism-simulation.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ begin
1818
erange = 10 .^ collect(range(log10(4), log10(20.0), 100))
1919
model2 = GaussianLine() + GaussianLine= FitParam(10.0))
2020
plot(
21-
erange[1:(end-1)],
21+
erange[1:(end - 1)],
2222
@time(invokemodel(erange, model)),
2323
marker = :o,
2424
markersize = 4,
2525
label = "XS",
2626
)
2727
plot!(
28-
erange[1:(end-1)],
28+
erange[1:(end - 1)],
2929
@time(invokemodel(erange, model2)),
3030
marker = :o,
3131
markersize = 4,
@@ -40,14 +40,14 @@ model = XS_PowerLaw(a = FitParam(2.0), K = FitParam(1.0))
4040
emids = push!(copy(resp.channel_bins_low), last(resp.channel_bins_high))
4141
evald = push!(copy(resp.bins_low), last(resp.bins_high))
4242
out = resp.matrix * invokemodel(evald, model)
43-
plot(emids[1:(end-1)], out)
43+
plot(emids[1:(end - 1)], out)
4444

4545

46-
sims = @time simulate(model, resp, anc; exposure_time = 1e3, seed = 42)
47-
plot(sims, xscale = :log10, yscale = :log10, xlims = (1.0, 30.0), ylims = (1e-6, 100.0))
46+
sims = @time simulate(model, resp, anc; exposure_time = 1.0e3, seed = 42)
47+
plot(sims, xscale = :log10, yscale = :log10, xlims = (1.0, 30.0), ylims = (1.0e-6, 100.0))
4848

4949
begin
50-
sims = @time simulate(model, resp, nothing; exposure_time = 1e5, seed = 42)
50+
sims = @time simulate(model, resp, nothing; exposure_time = 1.0e5, seed = 42)
5151
normalize!(faked)
5252
plot(
5353
faked,
@@ -58,7 +58,7 @@ begin
5858
)
5959
plot!(sims)
6060
plot!(
61-
emids[1:(end-1)] .+ diff(emids) ./ 2,
61+
emids[1:(end - 1)] .+ diff(emids) ./ 2,
6262
out .* 1.4,
6363
xscale = :log10,
6464
label = "Hand folded",
@@ -71,18 +71,18 @@ result = @time fit(prob, LevenbergMarquadt())
7171
plot!(faked, result)
7272

7373

74-
sims = @time simulate(model, resp, anc; exposure_time = 1e3, seed = 42)
74+
sims = @time simulate(model, resp, anc; exposure_time = 1.0e3, seed = 42)
7575
plot(
7676
sims,
7777
xscale = :log10,
7878
# yscale = :log10,
7979
xlims = (1.0, 10.0),
80-
ylims = (1e-6, 40.0),
80+
ylims = (1.0e-6, 40.0),
8181
)
8282

8383
model = GaussianLine= FitParam(7.0)) + PowerLaw(a = FitParam(0.2))
8484

85-
sims = @time simulate(model, resp, nothing; exposure_time = 1e5, seed = 42)
85+
sims = @time simulate(model, resp, nothing; exposure_time = 1.0e5, seed = 42)
8686

8787
plot(
8888
sims,

lib/XSPECModels/src/XSPECModels.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function register_xspec_data()
2020
register_model_data(XS_Kerrconv, "kerrtable.fits"; root = LIBXSPEC_STORAGE_PATH)
2121
register_model_data(XS_KyrLine, "KBHline01.fits"; root = LIBXSPEC_STORAGE_PATH)
2222
register_model_data(XS_Laor, "ari.mod"; root = LIBXSPEC_STORAGE_PATH)
23+
return
2324
end
2425

2526

@@ -32,6 +33,7 @@ function __init__()
3233
# set an environment variable so we don't accidentally init again
3334
ENV["SPECTRAL_FITTING_XSPEC_INIT"] = "true"
3435
end
36+
return
3537
end
3638

3739
end # module XSPECModels

0 commit comments

Comments
 (0)