Naima

Latest version: v0.10.2

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

0.6.1

^^^^^^^^^^^^^^^^^^

- Performance improvements to the memoize logic that result in 10% or higher
improvement in model execution time.

0.6

^^^^^^^^^^^^^^^^

- Medians and associated errors are now shown with a precision corresponding to
a single significant digit in the errors (except when the leading digit is 1,
when two significant digits are shown). Note that they are still saved with
full precision to the result tables.
- There is a new GUI tool for interactive model fitting:
``InteractiveModelFitter``, which can be accessed directly or through the
``interactive`` argument of ``get_sampler`` prior to a sampling run.
- Sampling run results can be saved and retrieved for later analysis or archival
with the new functions `naima.save_run` and `naima.read_run`.
- The individual contributions to the total Inverse Compton spectrum of the
different seed photon fields can now be accessed through the ``seed`` argument
of the ``InverseCompton.flux`` and ``InverseCompton.sed`` functions.

Bug Fixes
~~~~~~~~~

- ``save_diagnostic_plots`` now turns matplotlib interactivity off, so the plots
are only saved and not shown.
- The ``group`` column is now preserved if a data table is validated more than
once.

0.5

^^^^^^^^^^^^^^^^

- ``save_results_table`` now saves the maximum log likelihood and ML parameters
of the sample.
- Update ``astropy_helpers`` to 1.0.2 and require astropy >= 1.0.2 to ensure
pickleable Tables.
- Internal data is a QTable instead of a dict.
- When multiple input spectra are used, they are now plotted with different
colors and markers.
- Now doing the prefit with a minimizer that allows for relative tolerance
termination: in general prefit will be faster.
- Add ``e_range`` and ``e_npoints`` parameters to ``plot_fit`` to allow
computing the model samples for a wider energy range that the observed
spectrum (or at energies between data sets, such as X-ray and gamma-ray)
- Added ``plot_corner`` as a thin wrapper around ``triangle.corner`` with ML
parameter plotting.

0.4

^^^^^^^^^^^^^^^^

- All models have a cache of length 10 so that the output is not computed when
the parameters have not changed. It can be turned off through the ``_memoize``
attribute of the models.

Bug Fixes
~~~~~~~~~

- Fixed concatenation of UL and CL in ``validate_data_table``.

0.3

^^^^^^^^^^^^^^^^

- Added an option to save the distribution properties of scalar blobs when
saving results table: option ``include_blobs`` of ``save_results_table``.
- A new method for radiative classes allows to renormalize the particle
distributions to a given energy content in particles. See ``set_We`` and
``set_Wp`` in leptonic and hadronic classes, respectively.
- The default FIR and NIR photon fields for `naima.InverseCompton` have been set
to the GALPROP values at a galactic radius of 6.5 kpc.
- Require astropy >= 1.0.

Bug Fixes
~~~~~~~~~

- Fixed sed conversion of residuals [69]
- Fixed ``plot_data`` so it can take lists of data_tables.

API Changes
~~~~~~~~~~~

- The name of the ``table_format`` parameter of ``save_results_table`` has been changed
to ``format`` for consistency with `astropy.io.ascii`.

0.2

^^^^^^^^^^^^^^^^

- Refactored sherpa models to use parent SherpaModelECPL class [62]
- Added a data_sed flag to get_sampler to select whether to convert all data
tables to SED or choose format of first data tables when providing multiple
data tables.
- Added support for a ``flux_ul`` column in input data tables.
- Added a method to estimate magnetic field: `naima.estimate_B`.
- Added the option to perform an optimization of the parameters before the MCMC
run: see option ``prefit`` in `naima.get_sampler`.
- Convert between SED and differential fluxes automatically if the model and
data physical types do not match.
- Add blob_labels parameter to save_diagnostic_plots.

Bug Fixes
~~~~~~~~~

- Fix sherpa models guess() for integrated datasets.
- Only complain about CL when there are ULs at a different CL.
- Fix parsing of string upper limit columns in Python 3.
- Use old energy unit when plotting a new data set onto a figure [64]
- Show ordinate units when plotting blobs without spectral data.

API Changes
~~~~~~~~~~~

- module sherpamod is now sherpa_modules.

Page 3 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.