Skip to content

Commit

Permalink
SedIntegrable class renamed to RadiativeProcess
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorzbor committed Dec 16, 2023
1 parent ce999b7 commit 9a3ae02
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions agnpy/compton/external_compton.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
)
from ..utils.conversion import nu_to_epsilon_prime, to_R_g_units
from ..utils.geometry import x_re_shell, mu_star_shell, x_re_ring
from ..utils.sedintegrable import SedFluxIntegrable
from agnpy.radiation.radiative_process import RadiativeProcess
from ..targets import (
CMB,
PointSourceBehindJet,
Expand All @@ -22,7 +22,7 @@
__all__ = ["ExternalCompton"]


class ExternalCompton(SedFluxIntegrable):
class ExternalCompton(RadiativeProcess):
"""class for External Compton radiation computation
Parameters
Expand Down
4 changes: 2 additions & 2 deletions agnpy/compton/synchrotron_self_compton.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
nu_to_integrate,
)
from ..utils.conversion import nu_to_epsilon_prime
from ..utils.sedintegrable import SedFluxIntegrable
from agnpy.radiation.radiative_process import RadiativeProcess

__all__ = ["SynchrotronSelfCompton"]


class SynchrotronSelfCompton(SedFluxIntegrable):
class SynchrotronSelfCompton(RadiativeProcess):
"""class for Synchrotron Self Compton radiation computation
Parameters
Expand Down
4 changes: 2 additions & 2 deletions agnpy/synchrotron/proton_synchrotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from astropy.constants import e, c, m_p
from ..utils.math import axes_reshaper, gamma_e_to_integrate
from ..utils.conversion import nu_to_epsilon_prime, B_to_cgs, lambda_c_p
from ..utils.sedintegrable import SedFluxIntegrable
from agnpy.radiation.radiative_process import RadiativeProcess
from .synchrotron import single_particle_synch_power, tau_to_attenuation

__all__ = ["ProtonSynchrotron"]
Expand All @@ -13,7 +13,7 @@
B_cr = 4.414e13 * u.G # critical magnetic field


class ProtonSynchrotron(SedFluxIntegrable):
class ProtonSynchrotron(RadiativeProcess):
"""Class for synchrotron radiation computation
Parameters
Expand Down
4 changes: 2 additions & 2 deletions agnpy/synchrotron/synchrotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from astropy.constants import e, h, c, m_e, sigma_T
from ..utils.math import axes_reshaper, gamma_e_to_integrate
from ..utils.conversion import nu_to_epsilon_prime, B_to_cgs, lambda_c_e
from ..utils.sedintegrable import SedFluxIntegrable
from agnpy.radiation.radiative_process import RadiativeProcess


__all__ = ["R", "nu_synch_peak", "Synchrotron"]
Expand Down Expand Up @@ -68,7 +68,7 @@ def tau_to_attenuation(tau):
return np.where(tau < 1e-3, 1, 3 * u / tau)


class Synchrotron(SedFluxIntegrable):
class Synchrotron(RadiativeProcess):
"""Class for synchrotron radiation computation
Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from agnpy.spectra import PowerLaw
from agnpy.emission_regions import Blob
from agnpy.synchrotron import Synchrotron
from ..utils.sedintegrable import SedFluxIntegrable
from agnpy.radiation.radiative_process import RadiativeProcess


def _estimate_powerlaw_integral(x_values, y_values):
Expand All @@ -27,7 +27,7 @@ def _sample_synchrotron_model():
return synch


class FlatSedGenerator(SedFluxIntegrable):
class FlatSedGenerator(RadiativeProcess):
"""A dummy generator returning flat (constant) flux, of the same value across the whole spectrum."""
def __init__(self, flat_value):
self.flat_value = flat_value
Expand All @@ -37,7 +37,7 @@ def sed_flux(self, nu):
u.erg / (u.cm ** 2 * u.s * u.Hz)) * nu


class TestSedIntegrable:
class TestSedIntegration:

def test_flat_integral(self):
"""Integrate over flat SED (Fnu equal to 1.0 for all frequencies)."""
Expand Down

0 comments on commit 9a3ae02

Please sign in to comment.