# Emission Regions

The only emission region currently available in the package is a simple spherical plasmoid, commonly referred to as
*blob* in the literature.

## Blob

The blob represents a spherical region of plasma streaming along the jet.
The physical quantities *needed* to define the `Blob`

are:

its radius, \(R_{\rm b}\);

its distance from the observer, expressed through the redshift \(z\) of the host galaxy;

the Doppler factor produced by the motion of the jet, \(\delta_{\rm D} = \frac{1}{\Gamma(1 - \beta\cos(\theta_{\rm s}))}\). Where \(\beta\) is the blob relativistic velocity, \(\Gamma\) its bulk Lorentz factor, and \(\theta_{\rm s}\) the angle between the jet axis and the observer’s line of sight;

the bulk Lorentz factor of the jet, \(\Gamma\);

the magnetic field tangled to the blob, \(B\), assumed to be uniform;

the energy distributions of particles accelerated in the blob.

Follows a snippet initialising the `Blob`

(using `astropy`

quantities) with its physical quantities and an electrons disitribtuion.

```
import astropy.units as u
from astropy.constants import m_e, m_p
from astropy.coordinates import Distance
from agnpy.spectra import PowerLaw, BrokenPowerLaw
from agnpy.emission_regions import Blob
# set the quantities defining the blob
R_b = 1e16 * u.cm
z = Distance(1e27, unit=u.cm).z
delta_D = 10
Gamma = 10
B = 1 * u.G
# electron distribution
n_e = BrokenPowerLaw(
k=1e-8 * u.Unit("cm-3"),
p1=1.9,
p2=2.6,
gamma_b=1e4,
gamma_min=10,
gamma_max=1e6,
mass=m_e,
)
blob = Blob(R_b, z, delta_D, Gamma, B, n_e=n_e)
```

Note that defining \(\delta_{\rm D}\) and \(\Gamma\) implicitly defines the viewing angle \(\theta_{\rm s}\). If you want to set the Doppler factor from \(\Gamma\) and \(\theta_{\rm s}\), you can do so by using the `set_delta_D()`

function;

```
# set the Doppler factor from the bulk Lorentz factor and the viewing angle
blob = Blob()
blob.set_delta_D(Gamma=20, theta_s=10 * u.deg)
print(f"{blob.delta_D:.2f}")
```

```
3.04
```

Since version `0.3.0`

, we can also specify a non-thermal proton distribution

```
# add a proton energy distribution
n_p = PowerLaw(k=0.1 * u.Unit("cm-3"), p=2.3, gamma_min=10, gamma_max=1e6, mass=m_p)
blob = Blob(R_b, z, delta_D, Gamma, B, n_e=n_e, n_p=n_p)
print(blob)
```

```
* Spherical emission region
- R_b (radius of the blob): 1.00e+16 cm
- t_var (variability time scale): 4.13e-01 d
- V_b (volume of the blob): 4.19e+48 cm3
- z (source redshift): 0.07 redshift
- d_L (source luminosity distance):1.00e+27 cm
- delta_D (blob Doppler factor): 1.00e+01
- Gamma (blob Lorentz factor): 1.00e+01
- Beta (blob relativistic velocity): 9.95e-01
- theta_s (jet viewing angle): 5.74e+00 deg
- B (magnetic field tangled to the jet): 1.00e+00 G
- xi (coefficient for 1st order Fermi acceleration) : 1.00e+00
* electrons energy distribution
- broken power law
- k: 1.00e-08 1 / cm3
- p1: 1.90
- p2: 2.60
- gamma_b: 1.00e+04
- gamma_min: 1.00e+01
- gamma_max: 1.00e+06
* protons energy distribution
- power law
- k: 1.00e-01 1 / cm3
- p: 2.30
- gamma_min: 1.00e+01
- gamma_max: 1.00e+06
```

As shown above, the `Blob`

can be printed at any moment to obtain a resume of the blob characterisitcs

### Additional quantities computed by the blob

The quantities listed in the previous section, needed to initialise the blob, are then used to evaluate several other physical quantities.
Among the most interesting are the energy densities in electrons and protons \(u_{\rm e},\;u_{\rm p}\); the energy density of the magnetic field, \(U_B\), and of the synchrotron radiation, \(u_{\rm ph,\, synch}\).
You can examine all of the physical quantities automatically computed by the `Blob`

in the API.

```
# print energy densities
print(f"{blob.u_e:.2e}")
print(f"{blob.u_p:.2e}")
print(f"{blob.U_B:.2e}")
print(f"{blob.u_ph_synch:.2e}")
```

```
5.37e-06 erg / cm3
2.43e-04 erg / cm3
3.98e-02 erg / cm3
3.75e-05 erg / cm3
```