Recent Releases of agnpy
agnpy - v0.4.0: introduced proton synchrotron
This is the first agnpy version including hadronic radiative processes.
@IlariaViale and @dimaniad6 have implemented a ProtonSynchrotron class.
- Jupyter Notebook
Published by cosimoNigro over 3 years ago
agnpy - v0.3.0: introduced proton particles distribution
v0.3.0 introduces proton particles distributions.
In the previous versions of the package, only an electron distribution was available, the latter had to be defined through a dictionary ```python
set the spectrum normalisation (total energy in electrons in this case)
spectrum_norm = 1e48 * u.Unit("erg")
define the spectral function parametrisation through a dictionary
spectrumdict = { "type": "PowerLaw", "parameters": {"p": 2.8, "gammamin": 1e2, "gamma_max": 1e7}, }
set the remaining quantities defining the blob
Rb = 1e16 * u.cm B = 1 * u.G z = Distance(1e27, unit=u.cm).z deltaD = 10 Gamma = 10
blob = Blob(Rb, z, deltaD, Gamma, B, spectrumnorm, spectrumdict) ```
This was not very handy: I have simplified - and broke - the previous blob API.
From version 0.3.0 this is how electron distribution are defined and passed to the blob
```python
electron distribution
ne = BrokenPowerLaw( k=1e-8 * u.Unit("cm-3"), p1=1.9, p2=2.6, gammab=1e4, gammamin=10, gammamax=1e6, mass=m_e, )
set the quantities defining the blob
Rb = 1e16 * u.cm z = Distance(1e27, unit=u.cm).z deltaD = 10 Gamma = 10 B = 1 * u.G
blob = Blob(Rb, z, deltaD, Gamma, B, ne=ne) ```
The new way of defining particle distributions also allows to define proton distributions
python
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)
The only difference between particle distributions is the mass argument.
This will eventually allow to describe other particle distributions.
To achieve this:
ElectronDistributionhas been changed toParticleDistribution. This is the base class from which all the different distributions (PowerLaw,BrokenPowerLawetc..) inherit;@dimaniad6 additionally implemented an
InterpolatedDistributionto read an arbitrary input particle distribution (two arrays: one for of Lorentz factors and the other for densities);the
Blobclass has been improved:- the different initialisation method available under the
spectrum_norm_typeargument of theBlobare now implemented in the baseParticleDistributionclass. I.e. one can initialisefrom_total_density,from_total_energy_density,from_density_at_gamma_1,from_total_energy; - several quantities are now provided as
propertiesand are evaluated on the fly from the base parameters ( $Rb$, $z$, $\deltaD$, $\Gamma$, $B$);
- the different initialisation method available under the
the other classes remain largely unchanged. They have just been modified internally to deal with the new definition of particle distributions;
note that the prefactor of the particle distribution has been renamed from
k_etok, as we are not describing exclusively electrons distributions now. This means that the corresponding parameter in the fit classes islog10_kinstead oflog10_k_e.
- Jupyter Notebook
Published by cosimoNigro over 3 years ago
agnpy - v0.2.0: incorporated sherpa and Gammapy wrappers
In this release, the sherpa and Gammapy wrapper - that before were simple examples in the documentation - have been added to the source code.
A agnpy.fit module has been introduced with two physical scenarios:
SycnhrotronSelfComptonModel, representing the sum of synchrotron and synchrotron self-Compton (SSC) radiation. This scenario is commonly considered to model BL Lac sources;ExternalComptonModel, representing the sum of synchrotron and synchrotron self-Compton radiation along with an external Compton (EC) component. EC scattering can be computed considering a list of target photon fields. This scenario is commonly considered to model flat spectrum radio quasars (FSRQs).
For each scenario, a sherpa or gammapy backend can be selected, such that the fit can be performed with both packages.
Some helper functions are added to load directly a file representing a MWL SED with a proper format into a data object of the two packages.
- Jupyter Notebook
Published by cosimoNigro almost 4 years ago
agnpy - v0.1.8 minor fix in the usage of the default matplotlibrc
In the previous release I forgot to include the agnpy/utils/matplotlibrc in the MANIFEST.in.
To load it I am now using improtlib.resources rather than the deprecated Path(__file__).parent, see https://github.com/wimglenn/resources-example.
- Jupyter Notebook
Published by cosimoNigro over 4 years ago
agnpy - v0.1.7 minor fixes in the utils plot functions
This is a minor release fixing some inconsistencies in the agnpy.utils.plot functions.
- Jupyter Notebook
Published by cosimoNigro over 4 years ago
agnpy - v0.1.6 modifications in .zenodo.json to make the code findable by the ESAP
Changed few keywords in the .zenodo.json to make it findable by the ESAP platform.
- Jupyter Notebook
Published by cosimoNigro over 4 years ago
agnpy - v0.1.4 test new .zenodo.json on zenodo
I am creating this version just to test that the new .zenodo.json, generated from the codemeta.json using the OSSR tools is correctly parsed by zenodo.
- Jupyter Notebook
Published by cosimoNigro over 4 years ago
agnpy - v0.1.3: updates in data and docs
With this new release: - an update was realised in the data: the MWL SED of PKS1510-089 in 2015 was not properly converted to erg cm-2 s-1; - a notebook was added, following the referee report, giving some caveats on suing the thermal SED agnpy computes for the DT.
- Jupyter Notebook
Published by cosimoNigro over 4 years ago
agnpy - Test automatic deployment on pip
This is release is made just to test the automatic upload on pip via github actions. There are no significant differences from 0.1.1.
- Jupyter Notebook
Published by cosimoNigro over 4 years ago
agnpy - v0.1.1: added absorption on synch photons + check on EC on CMB
In this release:
1. the absorption on synchrotron photons was added;
2. a check on the EC on CMB is added with a reference SED produced by jetset;
3. the MWL SED data were standardised to be readable with gammapy's FluxPoints.
- Jupyter Notebook
Published by cosimoNigro almost 5 years ago
agnpy - v0.1.0: first minor relase
The package gathers now well-tested functionalities and it's time to make its first minor release.
In this release:
- a function including all the model parameters is introduced for the black body SED computations, such that also their SEDs can be wrapped in a fit;
- the SS disk black body SED is now properly normalised to the total disk luminosity;
- the DT black body SED is now properly normalised to the total DT luminosity;
- added some MWL SED for testing the fit capabilities.
- Jupyter Notebook
Published by cosimoNigro almost 5 years ago
agnpy - v0.0.10: added EPWL for electrons and off-axis absorption calculation
In this release the major features added are:
an exponential cutoff power-law for the electron spectra;
the possibility to compute the gamma-gamma opacity for misaligned sources (
viewing angle != 0) for the following targets: point source behind the jet, BLR and the DT.
- Jupyter Notebook
Published by cosimoNigro about 5 years ago
agnpy - v0.0.8
In this release:
- created sub-modules for each of the previous classes;
- added SED functions as @staticmethods in order for them to be used while fitting;
- added trapezoidal rule in log-log scale as an option for integration;
- moved data within the package.
- Jupyter Notebook
Published by cosimoNigro over 5 years ago
agnpy - v0.0.7.3, added tests on optical depth
Fixed optical depth calculation - was not running for disk in the previous release.
Added optical depth calculation to tests.
Extracted class with spectral constraints from emission_regions.
- Jupyter Notebook
Published by cosimoNigro over 5 years ago
agnpy - v0.0.7.2, zenodo release
- Added test on SSA
- fixed workflow for failing tests
- making zenodo release
- Jupyter Notebook
Published by cosimoNigro over 5 years ago
agnpy - v0.0.7
agnpy v0.0.7
new
- In this release we define the electron spectra starting from
astropy.modeling.models; - the setting of the spectral amplitude from the normalisation is uniformed to avoid duplication;
- the log-parabola is added to the spectral types.
- Jupyter Notebook
Published by cosimoNigro almost 6 years ago