mwcraig / reducer

Friendly professional-level data reduction...documentation here:
https://reducer.readthedocs.org
BSD 3-Clause "New" or "Revised" License
26 stars 10 forks source link

Running the ImageBrowser after a couple reduction steps got me an odd error #162

Open mwcraig opened 7 years ago

mwcraig commented 7 years ago
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-464b9d3f0bbe> in <module>()
----> 1 fits_browser = ImageBrowser(images, keys=['imagetyp', 'exposure'])
      2 fits_browser.display()

~/Development/astronomy/reducer-notebook/reducer/image_browser.py in __init__(self, collection, allow_missing, *args, **kwd)
    343         missing = 'No value' if allow_missing else None
    344         tree = msumastro.TableTree(collection.summary, self._tree_keys, 'file',
--> 345                                    fill_missing=missing)
    346         kwd['orientation'] = 'horizontal'
    347         super(ImageBrowser, self).__init__(*args, **kwd)

~/anaconda/envs/ipw-dev2/lib/python3.6/site-packages/msumastro/table_tree.py in __init__(self, *args, **kwd)
    105         self._validate_group_keys()
    106         self._index_key = index_key
--> 107         self._validate_index()
    108         self._build_tree()
    109 

~/anaconda/envs/ipw-dev2/lib/python3.6/site-packages/msumastro/table_tree.py in _validate_index(self)
    125         """
    126         index_column = self._table[self._index_key]
--> 127         if len(set(index_column)) != len(self._table):
    128             raise ValueError('The table column named {0} cannot be used as '
    129                              'and index because its values are '

TypeError: unhashable type: 'MaskedConstant'
mwcraig commented 7 years ago

Note to self: check astropy main repo for this, I remember it coming up in the last couple of days...

mwcraig commented 7 years ago

So this has to do with masking, I think, since resetting the ImageFileCollection made this work again.