# Broken powerlaw

[3]:

# Parameters
func_name = "Broken_powerlaw"
wide_energy_range = True
x_scale = "log"
y_scale = "log"
linear_range = False


## Description

[5]:

func.display()

• description: A broken power law function
• formula: $f(x)= K~\begin{cases}\left( \frac{x}{x_{b}} \right)^{\alpha} & x < x_{b} \\ \left( \frac{x}{x_{b}} \right)^{\beta} & x \ge x_{b} \end{cases}$
• parameters:
• K:
• value: 1.0
• desc: Normalization (differential flux at x_b)
• min_value: None
• max_value: None
• unit:
• is_normalization: True
• delta: 0.1
• free: True
• xb:
• value: 10.0
• desc: Break point
• min_value: 1.0
• max_value: None
• unit:
• is_normalization: False
• delta: 1.0
• free: True
• alpha:
• value: -1.5
• desc: Index before the break xb
• min_value: -10.0
• max_value: 10.0
• unit:
• is_normalization: False
• delta: 0.15000000000000002
• free: True
• beta:
• value: -2.5
• desc: Index after the break xb
• min_value: -10.0
• max_value: 10.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)


## 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)


## $$\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)