DoubleSmoothlyBrokenPowerlaw

[3]:
# Parameters
func_name = "DoubleSmoothlyBrokenPowerlaw"
wide_energy_range = True
x_scale = "log"
y_scale = "log"
linear_range = False

Description

[5]:
func.display()
  • description: A smoothly broken power law with two breaks as parameterized in Ravasio, M. E. et al. Astron Astrophys 613, A16 (2018).
  • formula: $\begin{array}{l}\begin{aligned}f(x)=& A x_{\mathrm{b}}^{\alpha_{1}}\left[\left[\left(\frac{x}{x_{\mathrm{b}}}\right)^{-\alpha_{1} n_{1}}+\left(\frac{x}{x_{\mathrm{b}}}\right)^{-\alpha_{2} n_{1}}\right]^{\frac{n_{2}}{n_{1}}}\right.\\&\left.+\left(\frac{x}{x_{\mathrm{j}}}\right)^{-\beta n_{2}} \cdot\left[\left(\frac{x_{\mathrm{j}}}{x_{\mathrm{b}}}\right)^{-\alpha_{1} n_{1}}+\left(\frac{x_{\mathrm{j}}}{x_{\mathrm{b}}}\right)^{-\alpha_{2} n_{1}}\right]^{\frac{n_{2}}{n_{1}}}\right]^{-\frac{1}{n_{2}}}\end{aligned}\\\text { where }\\x_{\mathrm{j}}=x_{\mathrm{p}} \cdot\left(-\frac{\alpha_{2}+2}{\beta+2}\right)^{\frac{1}{\left.\beta-\alpha_{2}\right) n_{2}}}\end{array}$
  • parameters:
    • K:
      • value: 0.0001
      • desc: Differential flux at the pivot energy
      • min_value: 1e-50
      • max_value: None
      • unit:
      • is_normalization: True
      • delta: 1e-05
      • free: True
    • alpha1:
      • value: -0.66
      • desc: photon index below xb
      • min_value: None
      • max_value: None
      • unit:
      • is_normalization: False
      • delta: 0.066
      • free: True
    • xb:
      • value: 100.0
      • desc: break energy below xp
      • min_value: 1e-10
      • max_value: None
      • unit:
      • is_normalization: False
      • delta: 10.0
      • free: True
    • n1:
      • value: 2.0
      • desc: curvature of the first break
      • min_value: 0.0
      • max_value: None
      • unit:
      • is_normalization: False
      • delta: 0.2
      • free: False
    • alpha2:
      • value: -1.5
      • desc: photon index between xb and xp
      • min_value: None
      • max_value: None
      • unit:
      • is_normalization: False
      • delta: 0.15000000000000002
      • free: True
    • xp:
      • value: 300.0000000000001
      • desc: nuFnu peak
      • min_value: 1e-10
      • max_value: None
      • unit:
      • is_normalization: False
      • delta: 30.000000000000014
      • free: True
    • n2:
      • value: 2.0
      • desc: curvature of the break at xp
      • min_value: 0.0
      • max_value: None
      • unit:
      • is_normalization: False
      • delta: 0.2
      • free: False
    • beta:
      • value: -2.5
      • desc: photon index above xp
      • min_value: None
      • max_value: 2.0
      • unit:
      • is_normalization: False
      • delta: 0.25
      • free: True
    • piv:
      • value: 1.0
      • desc: pivot energy
      • min_value: None
      • max_value: None
      • unit:
      • is_normalization: False
      • delta: 0.1
      • free: False

Shape

The shape of the function.

If this is not a photon model but a prior or linear function then ignore the units as these docs are auto-generated

[6]:
fig, ax = plt.subplots()


ax.plot(energy_grid, func(energy_grid), color=blue)

ax.set_xlabel("energy (keV)")
ax.set_ylabel("photon flux")
ax.set_xscale(x_scale)
ax.set_yscale(y_scale)

../_images/notebooks_DoubleSmoothlyBrokenPowerlaw_8_0.png

F\(_{\nu}\)

The F\(_{\nu}\) shape of the photon model if this is not a photon model, please ignore this auto-generated plot

[7]:
fig, ax = plt.subplots()

ax.plot(energy_grid, energy_grid * func(energy_grid), red)


ax.set_xlabel("energy (keV)")
ax.set_ylabel(r"energy flux (F$_{\nu}$)")
ax.set_xscale(x_scale)
ax.set_yscale(y_scale)


../_images/notebooks_DoubleSmoothlyBrokenPowerlaw_10_0.png

\(\nu\)F\(_{\nu}\)

The \(\nu\)F\(_{\nu}\) shape of the photon model if this is not a photon model, please ignore this auto-generated plot

[8]:
fig, ax = plt.subplots()

ax.plot(energy_grid, energy_grid**2 * func(energy_grid), color=green)


ax.set_xlabel("energy (keV)")
ax.set_ylabel(r"$\nu$F$_{\nu}$")
ax.set_xscale(x_scale)
ax.set_yscale(y_scale)

../_images/notebooks_DoubleSmoothlyBrokenPowerlaw_12_0.png