mpdaf issueshttps://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues2024-02-29T11:44:21Zhttps://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/537bug in logger2024-02-29T11:44:21ZNicolas Bouchébug in loggersorry to bug you again, i believe that
in obj/image.py, the line 699
self.logger.warning('extracted image is too small')
should be
self._logger.warning('extracted image is too small')
(bug was introduced in 2...sorry to bug you again, i believe that
in obj/image.py, the line 699
self.logger.warning('extracted image is too small')
should be
self._logger.warning('extracted image is too small')
(bug was introduced in 2019? by Simon? looking at the logs) 49b82c62b386d7ab3dd9898bd11bdfa61fbf854cLaure PiquerasLaure Piquerashttps://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/536Spectrum.py polyfit2024-02-28T16:34:46ZNicolas BouchéSpectrum.py polyfitin spectrum.py poly_fit(), l1031 introduced a repeat of
err = d - np.polynomial.polynomial.polyval(w, p)
was introduced:
if maxiter > 0:
err = d - np.polynomial.polynomial.polyval(w, p)
sig =...in spectrum.py poly_fit(), l1031 introduced a repeat of
err = d - np.polynomial.polynomial.polyval(w, p)
was introduced:
if maxiter > 0:
err = d - np.polynomial.polynomial.polyval(w, p)
sig = np.std(err)
n_p = len(d)
for it in range(maxiter):
err = d - np.polynomial.polynomial.polyval(w, p)
ind = np.where((err >= nsig[0] * sig) &
(np.abs(err) <= nsig[1] * sig))
if len(ind[0]) == n_p:
break
if len(ind[0]) <= deg + 1:
raise ValueError('Too few points to perform '
'polynomial fit')
if vec_weight is not None:
vec_weight = vec_weight[ind]
p = np.polynomial.polynomial.polyfit(w[ind], d[ind],
deg, w=vec_weight)
err = d[ind] - np.polynomial.polynomial.polyval(w[ind], p)
sig = np.std(err)
n_p = len(ind[0])
but caused a bug.
while using pyplatefit.https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/531alignment of mpdaf image when no overlap2023-04-26T14:26:20ZJohan Richardalignment of mpdaf image when no overlapWhen using align_with_image using an input image with no overlap with the reference image, an error occurs (below).
This case could be treated by the function and return an image with 0 values everywhere, of the same size as the referenc...When using align_with_image using an input image with no overlap with the reference image, an error occurs (below).
This case could be treated by the function and return an image with 0 values everywhere, of the same size as the reference image, as well as masked values. I attach the test case which breaks and the detailed error message below.
im_new=Image('TEST_im_new.fits')
im_cube=Image('TEST_im_cube.fits')
im_rebin=im_new.align_with_image(im_cube)
[TEST_im_cube.fits](/uploads/84a7049e18301ede156bf6d677660694/TEST_im_cube.fits)
[TEST_im_new.fits](/uploads/747d9e315c3eaeaf4098b773b15dc669/TEST_im_new.fits)
---------------------------------------------------------------------------
MaskError Traceback (most recent call last)
Cell In[17], line 1
----> 1 im_rebin = im_new.align_with_image(im_cube)
File /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mpdaf/obj/image.py:3117, in Image.align_with_image(self, other, flux, inplace, cutoff, antialias, window)
3112 centersky = other.wcs.pix2sky(centerpix)[0]
3114 # Re-sample the rotated image to have the same axis
3115 # increments, offset and number of pixels as the image that we
3116 # are aligning it with.
-> 3117 out.regrid(other.shape, centersky, centerpix,
3118 other.wcs.get_axis_increments(unit=u.deg),
3119 flux, unit_inc=u.deg, inplace=True, cutoff=cutoff,
3120 antialias=antialias, window=window)
3121 return out
File /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mpdaf/obj/image.py:2806, in Image.regrid(self, newdim, refpos, refpix, newinc, flux, order, interp, unit_pos, unit_inc, antialias, inplace, cutoff, window)
2803 newinc = UnitArray(newinc, unit_inc, self.wcs.unit)
2805 # Get a copy of the data array with masked values filled.
-> 2806 data = self._prepare_data(interp)
2808 # If the angular pixel increments along either axis are being
2809 # increased, then low-pass filter the data along that axis to
2810 # prevent aliasing in the resampled data.
2811 if antialias:
File /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mpdaf/obj/image.py:1618, in Image._prepare_data(self, interp)
1616 data = self._interp_data(spline=True)
1617 else:
-> 1618 data = np.ma.filled(self.data, np.ma.median(self.data))
1619 return data
File /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/mpdaf/obj/data.py:548, in DataArray.data(self)
528 @property
529 def data(self):
530 """Return data as a `numpy.ma.MaskedArray`.
531
532 The DataArray constructor postpones reading data from FITS files until
(...)
546
547 """
--> 548 res = ma.MaskedArray(self._data, mask=self._mask, copy=False)
549 res._sharedmask = False
550 return res
File /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/ma/core.py:2900, in MaskedArray.__new__(cls, data, mask, dtype, copy, subok, ndmin, fill_value, keep_mask, hard_mask, shrink, order)
2897 else:
2898 msg = "Mask and data not compatible: data size is %i, " + \
2899 "mask size is %i."
-> 2900 raise MaskError(msg % (nd, nm))
2901 copy = True
2902 # Set the mask to the new value
MaskError: Mask and data not compatible: data size is 1, mask size is 36.https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/530Cube combination core dump2023-04-05T09:17:08ZJarle BrinchmannCube combination core dumpHi, I have been trying to combine a few cubes (well, I started with a lot but cut it down to only three now), and I keep getting a core dump.
I have tried various solutions, installed mpdaf in a clean python environment, and used two d...Hi, I have been trying to combine a few cubes (well, I started with a lot but cut it down to only three now), and I keep getting a core dump.
I have tried various solutions, installed mpdaf in a clean python environment, and used two different python versions, but the core dump happens no matter what. What I show here has mpdaf version 3.5 installed via pip install mpdaf[all] (but I have also used the github one) and python v3.11.2 with GCC 11.2.0 on a CentOS 7 box.
The script is very basic:
```
import glob
from mpdaf.obj import CubeList
cubes = glob.glob("scipost/*/DATACUBE*.fits")
l = CubeList(cubes[7:9])
cube, expmap, statpix = l.median()
```
and trying to debug this is not throwing a lot of light on it:
```(mpdaf) [jarle@muse1 0.2]$ gdb python
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /data/jarle/anaconda3/envs/mpdaf/bin/python3.11...Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or 4) [in module /data/jarle/anaconda3/envs/mpdaf/bin/python3.11]
(no debugging symbols found)...done.
(gdb) run /data/jarle/MUSE/Musered/UltraFaintDwarfs/HydraII/test_combine.py
Starting program: /data/jarle/anaconda3/envs/mpdaf/bin/python /data/jarle/MUSE/Musered/UltraFaintDwarfs/HydraII/test_combine.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or 4) [in module /data/jarle/anaconda3/envs/mpdaf/lib/python3.11/lib-dynload/_ctypes.cpython-311-x86_64-linux-gnu.so]
<...many more such Dwarf Errors, but those are not fatal...>
<... some New Thread statements ...>
New Thread 0x7fffd8708700 (LWP 3123)]
WARNING: UnitsWarning: '1e-20 erg/s/cm 2/Angstrom' contains multiple slashes, which is discouraged by the FITS standard [astropy.units.format.generic]
WARNING: UnitsWarning: '1e-20 erg/s/cm 2/Angstrom' contains multiple slashes, which is discouraged by the FITS standard [astropy.units.format.generic]
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or 4) [in module /data/jarle/anaconda3/envs/mpdaf/lib/libgomp.so.1]
1: scipost/2018-03-17T02:52:22.284/DATACUBE_FINAL.fits
2: scipost/2018-04-15T03:17:05.919/DATACUBE_FINAL.fits
nfiles: 2
num_nthreads: 460
[New Thread 0x7ff7032b4780 (LWP 3124)]
<... More New Thread statements ...>
omp_get_num_threads: 48
Using 48 threads
Read fits files
naxes 912 931 3722
04/04/23 - 02:18PM 0.0%
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ff69cff1800 (LWP 3157)]
0x00007fffd7d02cc6 in mpdaf_merging_median._omp_fn.1 ()
from /data/jarle/anaconda3/envs/mpdaf/lib/python3.11/site-packages/mpdaf/tools/_ctools.cpython-311-x86_64-linux-gnu.so
Missing separate debuginfos, use: debuginfo-install glibc-2.17-326.el7_9.x86_64
(gdb) gdb backtrace
Undefined command: "gdb". Try "help".
(gdb) backtrace
#0 0x00007fffd7d02cc6 in mpdaf_merging_median._omp_fn.1 ()
from /data/jarle/anaconda3/envs/mpdaf/lib/python3.11/site-packages/mpdaf/tools/_ctools.cpython-311-x86_64-linux-gnu.so
#1 0x00007ffff00bcffc in __kmp_GOMP_microtask_wrapper ()
from /data/jarle/anaconda3/envs/mpdaf/lib/python3.11/site-packages/mkl/../../../libiomp5.so
#2 0x00007ffff0158053 in __kmp_invoke_microtask ()
from /data/jarle/anaconda3/envs/mpdaf/lib/python3.11/site-packages/mkl/../../../libiomp5.so
#3 0x00007ffff00d4353 in __kmp_invoke_task_func ()
from /data/jarle/anaconda3/envs/mpdaf/lib/python3.11/site-packages/mkl/../../../libiomp5.so
#4 0x00007ffff00d3362 in __kmp_launch_thread ()
from /data/jarle/anaconda3/envs/mpdaf/lib/python3.11/site-packages/mkl/../../../libiomp5.so
#5 0x00007ffff0158cdc in _INTERNALdb99f3be::__kmp_launch_worker(void*) ()
from /data/jarle/anaconda3/envs/mpdaf/lib/python3.11/site-packages/mkl/../../../libiomp5.so
#6 0x00007ffff7bc6ea5 in start_thread () from /lib64/libpthread.so.0
#7 0x00007ffff71e6b0d in clone () from /lib64/libc.so.6
(gdb) q
A debugging session is active.
```
Any idea what is going on here?https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/528Error in bounding_box2023-01-13T09:23:12ZRoland BaconError in bounding_boxThe bounding_box return an image offset by 1 pixel, this translate to an error in mask_ellipse or similar masking routine
Here is the code to reproduce the error
```
import mpdaf
from mpdaf.obj import moffat_image
from mpdaf.obj.objs im...The bounding_box return an image offset by 1 pixel, this translate to an error in mask_ellipse or similar masking routine
Here is the code to reproduce the error
```
import mpdaf
from mpdaf.obj import moffat_image
from mpdaf.obj.objs import bounding_box
ima = moffat_image(fwhm=(5,5), n=2.5, shape=(13,13), flux=1.0, unit_fwhm=None)
radii = (5,5)
posangle=0
peak = ima.peak()
center = (peak['p'],peak['q'])
step = 1
[sy, sx], _, center = bounding_box(
form="ellipse", center=center, radii=radii,
shape=ima.shape, posangle=posangle, step=step)
cima = ima[sy, sx]
tima = ima.copy()
peak = tima.peak()
center = (peak['p']+0.5,peak['q']+0.5)
tima.mask_ellipse(center, radii, posangle, unit_radius=None, unit_center=None, inside=False)
fig,ax = plt.subplots(1,3,figsize=(12,5))
ima.plot(ax=ax[0])
cima.plot(ax=ax[1])
tima.plot(ax=ax[2])
```
![Screenshot_2023-01-07_at_10.41.52](/uploads/d3d68b445a7c574afe47340618deece5/Screenshot_2023-01-07_at_10.41.52.png)Laure PiquerasLaure Piquerashttps://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/526wcs cdelt2021-06-16T10:50:50ZNicolas Bouchéwcs cdeltwhen setting a wcs object with cdelt, the cdelt keyword is not updated:
In [29]: wcs=obj.WCS(cdelt=(0.2/3600,-0.2/3600),crpix=7,crval=0.,deg=True,shape=(15,15))
...when setting a wcs object with cdelt, the cdelt keyword is not updated:
In [29]: wcs=obj.WCS(cdelt=(0.2/3600,-0.2/3600),crpix=7,crval=0.,deg=True,shape=(15,15))
In [30]: wcs
Out[30]:
WCS Keywords
Number of WCS axes: 2
CTYPE : 'RA---TAN' 'DEC--TAN'
CRVAL : 0.0 0.0
CRPIX : 7.0 7.0
PC1_1 PC1_2 : -5.555555555555556e-05 -0.0
PC2_1 PC2_2 : -0.0 5.555555555555556e-05
CDELT : 1.0 1.0
NAXIS : 15 15Laure PiquerasLaure Piquerashttps://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/524Version 3.3 not on PyPI2019-12-05T02:58:49ZSimon ConseilVersion 3.3 not on PyPIHi :)
I saw that there is a version 3.3 which is tagged, but not on PyPI (https://pypi.org/project/mpdaf/).
I wrote some notes for doing this (https://git-cral.univ-lyon1.fr/MUSE/mpdaf/blob/master/RELEASE-HOWTO), what is needed is to c...Hi :)
I saw that there is a version 3.3 which is tagged, but not on PyPI (https://pypi.org/project/mpdaf/).
I wrote some notes for doing this (https://git-cral.univ-lyon1.fr/MUSE/mpdaf/blob/master/RELEASE-HOWTO), what is needed is to create the sdist file (step 5), and upload to PyPI (step 7).
When that's done I can have a look at creating the wheels, which may need some changes in the wheels repository (https://github.com/musevlt/mpdaf-wheels) for Python 3.8https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/523Bug in Pixtable.extract_from_mask2019-09-11T14:14:30ZEric EmsellemBug in Pixtable.extract_from_maskIn the meantime, source of the bug identified in extract_from_mask for a PixTable
============================
extract_from_mask returns a PixTable but it has the wrong EXTNAME and may be missing an extension:
1- **the standard xpos, ypo...In the meantime, source of the bug identified in extract_from_mask for a PixTable
============================
extract_from_mask returns a PixTable but it has the wrong EXTNAME and may be missing an extension:
1- **the standard xpos, ypos, ... are all transformed in upper characters** which means that they are not properly read later on by MUSE recipes
2- if a PIXTABLE_FLAT_FIELD extension is present, it is not copied over.
==============================
My initial email to Laure Piqueras regarding this bug.
a propos de mpdaf:
je te forward un mail que j'avais envoye a Simon a propos du masking que
je voulais faire sur des PixTable. En gros: je veux masquer les regions
du ciel qui correspondent au passage d'un satellite ("trail"). J'ai fais
une classe dans mon package MUSE en utilisant les conseils de Simon
(avec pixtable.extract_from_mask). Malheureusement la routine mpdaf ne
recopie pas la totalite de la PixTable et du coup elle devient
inutilisable. Je vais faire un patch dans ma routine pour faire le
transfert de l'extension manquante mais je te joins ce mail si toi ou
qqn d'autre souhaite ajouter un patch a mpdaf.
merci!
Eric
-------- Forwarded Message --------
Subject: Re: Pixtable pb
Date: Tue, 10 Sep 2019 22:26:27 +0200
From: Simon Conseil <simon@sconseil.fr>
To: Eric Emsellem <eric.emsellem@eso.org>
Ah oui, il y a un petit soucis, l'extension PIXTABLE_FLAT_FIELD est je
crois liée au flat-field spectrum ajouté dans la version 2.2, et qu'on
utilisait pas pour l'UDF (pour lequel on avait des satellites à masquer).
Du coup je n'ai pas eu ce soucis ... mais en gros il faudrait modifier
mpdaf pour lire et sauver cette extension en plus des autres. Il faut
probablement juste la lire si elle est présente, et la sauver, donc ca
ne doit pas être très compliqué à faire, mais ca fait un peu de boulot
en plus. Éventuellement tu peux le faire manuellement pour tester.
a+, Simon
Le 10/09/2019 à 13:30, Eric Emsellem a écrit :
> Salut
>
> j'ai fais a priori comme tu m'as dis pour masquer la PixTable. Mais je
> me retrouve avec une Pixtable qui n'a pas tout les bons ingredients et
> du coup cela ne marche pas.
>
> Si je regarde la PixTable originelle j'ai ca
>
> In [10]: PT.info()
> [INFO] 24 merged IFUs went into this pixel table
> [INFO] This pixel table was flux-calibrated
> [INFO] projected (intermediate) (Gnomonic proje)
> Filename: PIXTABLE_REDUCED_2017-12-26T05:11:09_0003.fits
> No. Name Ver Type Cards Dimensions Format
> 0 PRIMARY 1 PrimaryHDU 2586 ()
> 1 xpos 1 ImageHDU 9 (1, 323877659) float32
> 2 ypos 1 ImageHDU 9 (1, 323877659) float32
> 3 lambda 1 ImageHDU 9 (1, 323877659) float32
> 4 data 1 ImageHDU 9 (1, 323877659) float32
> 5 dq 1 ImageHDU 8 (1, 323877659) int32
> 6 stat 1 ImageHDU 9 (1, 323877659) float32
> 7 origin 1 ImageHDU 8 (1, 323877659) int32
> 8 PIXTABLE_FLAT_FIELD 1 BinTableHDU 15 3683R x 3C [1D, 1D,
> 1D]
> [INFO] None
>
> Mais la PixTable masquee donne ca:
>
> In [11]: masked_PT.info()
> [INFO] 24 merged IFUs went into this pixel table
> [INFO] This pixel table was flux-calibrated
> [INFO] projected (intermediate) (Gnomonic proje)
> Filename: tmaskPIXTABLE_REDUCED_2017-12-26T05:11:09_0003.fits
> No. Name Ver Type Cards Dimensions Format
> 0 PRIMARY 1 PrimaryHDU 2587 ()
> 1 XPOS 1 ImageHDU 9 (1, 316641649) float32
> 2 YPOS 1 ImageHDU 9 (1, 316641649) float32
> 3 LAMBDA 1 ImageHDU 9 (1, 316641649) float32
> 4 DATA 1 ImageHDU 9 (1, 316641649) float32
> 5 DQ 1 ImageHDU 8 (1, 316641649) int32
> 6 STAT 1 ImageHDU 9 (1, 316641649) float32
> 7 ORIGIN 1 ImageHDU 8 (1, 316641649) int32
> [INFO] None
>
> Si tu as une idee comment ne pas avoir ce pb (voir ci-dessus sur
> comment je fais).
>
> merci
> Eric
> ============
> Ma routine fait ca:
>
> # j'ouvre la pixtable
> pixtable = PixTable(self.pixtable_name)
>
> # je cree le masque a partir d'une image de 1 et de 0 avec le bon WCS
> mask_col = pixtable.mask_column(self.mask_name)
>
> # je fais la nouvelle pixtable
> newpixtable = pixtable.extract_from_mask(mask_col.maskcol)
>
> # Je l'ecris
> newpixtable.write(self.newpixtable_name)https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/518Division by zero warning in sea.py2018-11-01T09:18:34ZRoland BaconDivision by zero warning in sea.py/home/bacon/Soft/python/mpdaf/lib/mpdaf/sdetect/sea.py:368: RuntimeWarning: divide by zero encountered in true_divide
newvar = np.nansum(psf, axis=(1, 2)) / d/home/bacon/Soft/python/mpdaf/lib/mpdaf/sdetect/sea.py:368: RuntimeWarning: divide by zero encountered in true_divide
newvar = np.nansum(psf, axis=(1, 2)) / dhttps://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/510mpdaf change the resolution or pixel position2019-07-15T10:33:53ZGuillaume Mahlermpdaf change the resolution or pixel positionWhen I just load/open and save an image in a script with mpdaf,
mpdaf change the pixel position when astropy does not.
It might be a header keyword issue but if astropy is doing it, mpdaf should be able too.
The main lead is that the sh...When I just load/open and save an image in a script with mpdaf,
mpdaf change the pixel position when astropy does not.
It might be a header keyword issue but if astropy is doing it, mpdaf should be able too.
The main lead is that the shear information is lost during the load, but this is not certain.
I put here a google drive link that contain a short python script to produce the files : open_save_mpdaf_astropy.py
the HST image : SPT-CLJ0356-5337_jccd92010_drc.fits
and the 2 outputs of the script : astropy_output.fits and mpdaf_output.fits
https://drive.google.com/drive/folders/1JG_n57ZJzoyzTmuxYULVvlFTUwQcKnhx?usp=sharing
I was not able to get a nice simple working example with another/lighter image but it happen with several different images, not just this one.Simon ConseilSimon Conseilhttps://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/507Source.add_line does not handle the types of masked values2018-04-13T09:01:27ZYannick Roehllyyannick.roehlly@lam.frSource.add_line does not handle the types of masked valuesWhen a first line is added to a source, if one of the values is masked, its type is set to STR_DTYPE because the type of a masked value is `numpy.ma.core.MaskedConstant`:
https://git-cral.univ-lyon1.fr/MUSE/mpdaf/blob/master/lib/mpdaf/s...When a first line is added to a source, if one of the values is masked, its type is set to STR_DTYPE because the type of a masked value is `numpy.ma.core.MaskedConstant`:
https://git-cral.univ-lyon1.fr/MUSE/mpdaf/blob/master/lib/mpdaf/sdetect/source.py#L987-992
In addition to having the wrong type, if a format is passed to add_line (e.g. to format floats) this may raise a ValueError.https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/506Cube combination with masks2018-04-25T17:30:53ZChristian HerenzCube combination with masksI would like to use the CubeList class to combine a list of datacubes (~50) that I have reduced and resampled to the same output WCS. Unfortunately, some of my observations contain satellite trails. Is this possible with the CubeList c...I would like to use the CubeList class to combine a list of datacubes (~50) that I have reduced and resampled to the same output WCS. Unfortunately, some of my observations contain satellite trails. Is this possible with the CubeList class, or do I have to other magic (with MPDAF or maybe outside of MPDAF) to achieve this?https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/503Support OpenMP with clang ?2018-03-14T22:21:24ZSimon ConseilSupport OpenMP with clang ?Clang now supports OpenMP, though I did not find how to use it.
There is also something related which may go in astropy-helpers: https://github.com/astropy/astropy-helpers/pull/382Clang now supports OpenMP, though I did not find how to use it.
There is also something related which may go in astropy-helpers: https://github.com/astropy/astropy-helpers/pull/382https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/500Support for magnitude limits in Source files2018-02-16T15:33:37ZDavid CartonSupport for magnitude limits in Source filesCurrently the Source file format supports storing magnitude bands as a FITS binary table with 3 columns:
* filter band
* magnitude
* magnitude error
It would be useful to also be able to assign magnitude limits, i.e. when an object ...Currently the Source file format supports storing magnitude bands as a FITS binary table with 3 columns:
* filter band
* magnitude
* magnitude error
It would be useful to also be able to assign magnitude limits, i.e. when an object is not detected in a particular band.
Perhaps two extra columns could be added:
* upper magnitude limit
* upper magnitude limit error
Since the default values should be NaN if not provided, I imagine it should be possible to retain some backward compatibility for reading older Source file versions.https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/499Catalog.select should work with a mask and negative margin ?2018-02-16T09:17:43ZSimon ConseilCatalog.select should work with a mask and negative margin ?Follow-up to #498 and !119. The `mask` added in !119 must have the same size as `wcs` (this should be checked) but this prevent the use of a negative margin to select sources outside of the field.Follow-up to #498 and !119. The `mask` added in !119 must have the same size as `wcs` (this should be checked) but this prevent the use of a negative margin to select sources outside of the field.https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/497Handling 2D spectrum2018-01-08T16:06:05ZSimon ConseilHandling 2D spectrumFollowing a discussion with @johan.richard :
Previously it was possible to create an `Image` with a wavelength axis (from a slice of a cube) and to create a `Spectrum` from this "`Image`" (e.g. `sp = im[0,:]`). But this was removed when...Following a discussion with @johan.richard :
Previously it was possible to create an `Image` with a wavelength axis (from a slice of a cube) and to create a `Spectrum` from this "`Image`" (e.g. `sp = im[0,:]`). But this was removed when refactoring common operations in the `DataArray` class, before it was practical (in terms of code) and also because it was difficult to keep t`he wcs and wave correctly (and because most of `Image` methods don't make sense for a 2D spectrum).
So instead of this, we could think about creating a new `Spectrum2D` object for this use case. Another option would be adapt `Spectrum` to work on 2d arrays, which would allow to use transparently all `Spectrum` methods on a list of spectrum. This may be not too difficult to do.
On related notes, there was discussion recently on Astropy (https://github.com/astropy/astropy-APEs/blob/master/APE13.rst) to create a `Spectrum1D` object similar to ours, which may handle 2d arrays (https://github.com/astropy/astropy-APEs/blob/master/APE13.rst#multi-dimensional-data). Maybe a good occasion to reduce code duplication.https://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/494Allow pathlib objects in read/write methods2017-11-13T10:17:23ZSimon ConseilAllow pathlib objects in read/write methodshttps://docs.python.org/3/library/pathlib.htmlhttps://docs.python.org/3/library/pathlib.htmlhttps://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/469Running MUSELET in parallel mode2017-10-13T08:48:10ZSteve SchulzeRunning MUSELET in parallel modeHi,
MUSELET uses one core on my computer. Is it possible to use all cores simultaneously. I guess one could use the skyclean option to truncate the cube and run it in parallel. Is there a better option?
What is the limiting factor ...Hi,
MUSELET uses one core on my computer. Is it possible to use all cores simultaneously. I guess one could use the skyclean option to truncate the cube and run it in parallel. Is there a better option?
What is the limiting factor for running MUSELET? Is it RAM, CPU or the harddisk performance?
Does MUSELET recognise whether the wavelength calibration is with respect to air or vacuum?
Cheers,
Stevehttps://git-cral.univ-lyon1.fr/MUSE/mpdaf/-/issues/465Keep original extension names2018-05-17T12:40:13ZSimon ConseilKeep original extension namesWhen reading a file with extension names that differs from DATA/STAT, and save it, we loose the original extension names. When reading a file with extension names that differs from DATA/STAT, and save it, we loose the original extension names. Future