CKrawczyk / GZ3D_production

MIT License
6 stars 5 forks source link

Marvin Deprecation Error. #6

Open karenlmasters opened 4 years ago

karenlmasters commented 4 years ago

I get the following Marvin Deprecation Error running the trial Notebook which calls this code. Not quite sure what changed with Marvin that breaks this.... can you help me figure it out?


MarvinDeprecationError                    Traceback (most recent call last)
<ipython-input-5-50dda1424bbf> in <module>
      4 data.get_bpt()
      5 data.make_all_spaxel_masks()
----> 6 data.get_mean_spectra(inv=True)

/raid5/homes/klmasters/Galaxy Zoo 3D/gz3d_fits.py in get_mean_spectra(self, inv)
    226         if self.cube != 'no_data':
    227             self.make_all_spaxel_masks()
--> 228             self.mean_bar = self._stack_spectra('bar_mask_spaxel')
    229             self.mean_spiral = self._stack_spectra('spiral_mask_spaxel')
    230             self.mean_center = self._stack_spectra('center_mask_spaxel')

/gz3d_fits.py in _stack_spectra(self, mask_name, inv)
    212         if len(mdx[0] > 0):
    213             weights = mask[mdx]
--> 214             spaxels = self.cube[mdx]
    215             spectra = np.array([s.spectrum for s in spaxels])
    216             if len(spectra) == 1:

marvin_subclass.py in __getitem__(self, xy)
    111     def __getitem__(self, xy):
    112         """Returns the spaxel for ``(x, y)`` without propserties"""
--> 113         spaxel = self.getSpaxel(x=xy[0], y=xy[1], properties=False, xyorig='lower')
    114         if isinstance(spaxel, list):
    115             for s in spaxel:

/packages/python3.6.8/lib/python3.6/site-packages/marvin/tools/cube.py in getSpaxel(self, x, y, ra, dec, maps, modelcube, **kwargs)
    576                 raise marvin.core.exceptions.MarvinDeprecationError(
    577                     'the {0} parameter has been deprecated. '
--> 578                     'Use maps or modelcube.'.format(old_param))
    579 
    580         return marvin.utils.general.general.getSpaxel(x=x, y=y, ra=ra, dec=dec,

MarvinDeprecationError: the properties parameter has been deprecated. Use maps or modelcube.
You can submit this error to Marvin GitHub Issues (https://github.com/sdss/marvin/issues/new).
Fill out a subject and some text describing the error that just occurred.
If able, copy and paste the full traceback information into the issue as well.```
karenlmasters commented 4 years ago

That said. A lot of the code after this does work!

CKrawczyk commented 4 years ago

Well, that is annoying. I guess there is a new way to access the datacube...

karenlmasters commented 4 years ago

The Marvin error maybe on the Marvin side (due to the MPL-10 updates) so hang tight on that, unless you know its something which has really changed in Marvin!