Mpdaf

Latest version: v3.6

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

Scan your dependencies

Page 2 of 3

3.0

----------------

MPDAF now requires Python 3.5 or later.

Pixtable
~~~~~~~~

- The self-calibration method is deprecated, as it is available in the DRS
since version 2.4, with the ``autocalib="deepfield"`` parameter.

- Add the `~mpdaf.drs.plot_autocal_factors` function to plot the autocalib
corrections. [:pull:`138`]

Muselet
~~~~~~~

- Fix Muselet issue with AO cubes. [:issue:`513`]

Cube, Image, Spectrum
~~~~~~~~~~~~~~~~~~~~~

- Add `mpdaf.obj.Cube.get_band_image` to create images with the same filters as
the DRS (this includes HST, SDSS, or other filters). [:pull:`146`]

- Add rgb plotting function `~mpdaf.obj.plot_rgb` and a method to Source
objects (`mpdaf.sdetect.Source.show_rgb`). [:pull:`123`]

- Adds parameter to avoid the float32/float64 conversions: by default arrays in
Spectrum/Image/Cube are converted to float32 when saving, to save some disk
space. This can be avoided with ``convert_float32=False``. And when reading
files, a float64 conversion can now be avoided with ``convert_float64=False``.
[!126, !!135]

- Remove duplicate air/vacuum conversion functions, now available as
`mpdaf.obj.airtovac` and `mpdaf.obj.vactoair`. [:pull:`127`]

- Fix subcube when using ``np.ma.nomask`` [:pull:`128`].

- Check that FITS file's naxis is compatible with the class [505, !129]

- Fix the copy of FITS header to respect the initial order of keywords. [:pull:`137`]

Source, Catalog
~~~~~~~~~~~~~~~

- Support the use of metadata in ``Source`` tables and ``Catalog``. Keywords
IDNAME, RANAME and DECNAME can be used to specify the column names for the ID,
RA and DEC columns that are used in several ``Catalog`` methods. [:pull:`124`]

- Speedup ``get_FSF_from_cube_keywords``. [:pull:`131`]

- Add ``cube.min()``. [:pull:`133`]

- Correct bug in source crackz execution.

- Correct bug in match to return only one catalog when option ``full_output``
is False. [:pull:`139`]

- Fix ``get_emlines`` to use unicode for line type. [:pull:`142`]

Misc
~~~~

- Fix pickling of MPDAF objects when the header does not match the data. [:pull:`141`]

- Fix warnings with recent Numpy versions.

2.5.1

------------------

- Fix ``Spectrum.gauss_fit`` to always return a positive fwhm. [:issue:`501`]

- Fix several issues with the ``CubeList`` C extension:

- Avoid segfault with ``-std=c99``.

- Fix compilation when NAN is not defined.

- Fix the extension when not using OpenMP, which is still the case with Clang.
Support for OpenMP with Clang will be addressed in the future.

- Changes to ``Cube.get_image``:

- It's now possible to use any method from the Cube object that reduces the
data on the wavelength axis to get an image, e.g. mean, sum, max...

- The way to compute the background when asking for a summed image has
changed. Before, it was computed averaging the pixel values of regions
'below' and 'above' the kept wavelengths; now it is calculated as the mean
of the average in each region. This may lead to slightly different results
when working at the edge of the spectrum, when the width of the regions are
different.

2.5

----------------

- Numpy is now installed with ``setup_requires``, which means that it is no
more required to run the setup, and it can be installed directly as
a dependency.

- Allow one to pickle MPDAF objects (``Cube``, ``Image``, ``Spectrum``,
``Source``). This makes it much easier to use these MPDAF objects with
``multiprocessing`` as they can now be passed transparently to the
subprocesses.

- Allow one to specify the wavelength range in ``Cube.subcube_circle_aperture``.

- Speedup ``create_psf_cube``, ``moffat_image`` and ``gauss_image``.

- Add option to plot images with world coordinates axes, using
``astropy.visualization.wcsaxes``. This can be used with
``Image.plot(..., use_wcs=True)``

Sources
~~~~~~~

- Better completions for Source attributes, and for keys in IPython.

- Allow one to load a "fieldmap" from a dedicated file (in ``Source.add_FSF``).

- New method to get FSF keywords from a Source (``Source.get_FSF``).

Catalog
~~~~~~~

- Remove the index that was added by default on the 'ID' column, as it was
causing errors with some operations due to bugs in the Astropy
implementations. Indexes can still be added manually if needed.

- Allow one to pass additional Ellipse arguments to ``Catalog.plot_symb``.

- Allow one to export coordinates from their columns to
a ``astropy.coordinates.SkyCoord`` object (``Catalog.to_skycoord``) and to
ds9 region file (``Catalog.to_ds9_regions``).

- New methods ``Catalog.nearest``, to get the nearest sources with respect to
a given coordinate, and ``Catalog.match3Dline``, to match elements of the
current catalog with another using spatial (RA, DEC) and a list of spectral
lines location.

- ``Catalog.plot_id`` is deprecated, in favor of ``Catalog.plot_symb`` with
``label=True``.

- Allow one to use a mask in ``Catalog.select``.

- Add workaround for reading FITS table written with ``Catalog``, with Astropy
3.0 (because of a bug introduced with their new serialization feature, which
does not work with subclasses).

2.4

----------------

- Compatibility with Scipy 1.0 (removal of ``scipy.stat.threshold``).

- Add compressed FITS files (``.fits.fz``) to the supported extensions.

Image
~~~~~

- Add a ``var`` option to plot the variance extension with ``.plot()``.

Cube
~~~~

- Fix bug in ``cube.spatial_erosion``.

Sources
~~~~~~~

- Keep the original order of the header keywords in ``.info()``.

- Allow one to set the size of a source without needing the white image.

- New option to add the white image directly within ``add_cube``.

Catalog
~~~~~~~

- Fix unit conversion in ``Catalog.edgedist``.

- Avoid forcing the ra/dec column names to uppercase.

2.3

----------------

- New function to create a PSF cube in `~mpdaf.MUSE.create_psf_cube`.

- Update the ``mpdaf.drs.rawobj`` module.

- New ``extract_cube_fieldsMap`` script.

WCS
~~~

- Avoid useless unit conversions in ``pix2sky`` and ``sky2pix``.

- Add back the ``WCS.rotate`` method.

Spectrum
~~~~~~~~

- Fix ``Spectrum.plot`` when unit is not angstrom.

- Add wavelength filtering, thanks to Markus Rexroth (EPFL):
`~mpdaf.obj.Spectrum.wavelet_filter`.

Image
~~~~~

- Fix ``align_with_image`` which was modifying the input data.

- Several bugfixes for Gaussian and Moffat fits.

- Margin of 1/100th of pixel added in `~mpdaf.obj.Image.inside`.

- Allow one to set the center outside the parent image in `~mpdaf.obj.Image.subimage`.

Cube
~~~~

- Add `~mpdaf.obj.Cube.max`, `~mpdaf.obj.Cube.spatial_erosion`.

CubeList
~~~~~~~~

- Avoid warnings with HIERARCH keywords

- Mask NaNs in the output cube, useful when creating the white-image after.

Sources
~~~~~~~

- Fix removal of extension with the optimized source writing. [:pull:`87`]

- Add an overwrite parameter to `~mpdaf.sdetect.Source.write`. [:issue:`485`]

- Fix text truncated in source history.

- New optimal extraction algorithm for "CCD spectroscopy", Horne, K. 1986.

- Allow one to set the order for the spline interpolation in
`~mpdaf.sdetect.Source.add_image`.

Catalog
~~~~~~~

- Correct bug (naxis inversion) in catalog.select and catalog.edgedist

Pixtable
~~~~~~~~

- Bugfix for `~mpdaf.drs.PixTable.selfcalibrate`: make sure that we have enough
pixels with a flux in each slice.

2.2

-----------------

- Compatibility with Astropy 1.3

- Fix direct replacement of .data in a Cube/Image/Spectrum object. [:pull:`82`]

WCS
~~~

- Fix bugs with the handling of ``CROTa``. [:pull:`77`]

Image
~~~~~

- Fix bug in `~mpdaf.obj.Image.rebin` when the ``factor`` parameter is a tuple.
[:issue:`483`]

Spectrum
~~~~~~~~

- Add HST filters to the list of filters available in
`~mpdaf.obj.Spectrum.abmag_filter_name`. [:issue:`484`]

Cube
~~~~

- Fix issue with `~mpdaf.obj.Cube.subcube_circle_aperture` which was masking
the original cube.

- Add ``is_sum`` option in `~mpdaf.obj.Cube.aperture`.

CubeList
~~~~~~~~

- Fix offset computation in `~mpdaf.obj.CubeMosaic`, using CRPIX from the
output cube.

- More options in the ``pycombine`` methods: MAD, scales, offsets.

Sources
~~~~~~~

- Correct behaviour when adding an image not overlapping with Source. [:issue:`482`]

Catalog
~~~~~~~

- Fix issue in `~mpdaf.sdetect.Catalog.match`

Pixtable
~~~~~~~~

- A new method `~mpdaf.drs.PixTable.selfcalibrate` was added to correct the
background levels of the slices. This method replaces the
``subtract_slice_median`` and ``divide_slice_median`` methods (which have
been removed). The new method works differently, gives better results, and no
more requires to pre-compute a mean sky spectrum with
`~mpdaf.drs.PixTable.sky_ref`. [:pull:`78`]

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.