Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook 5 Error #181

Open
MDeRung2021 opened this issue Dec 1, 2023 · 0 comments
Open

Notebook 5 Error #181

MDeRung2021 opened this issue Dec 1, 2023 · 0 comments
Labels
bug Something isn't working refactor Summer 2023 project to rewrite stellarphot

Comments

@MDeRung2021
Copy link

comp_table['coord'] = SkyCoord(ra=[c.split(',')[0] for c in comp_table['coord']],
                            dec=[c.split(',')[1] for c in comp_table['coord']],
                            unit='degree',
                            frame='icrs')
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[9], line 1
----> 1 comp_table['coord'] = SkyCoord(ra=[c.split(',')[0] for c in comp_table['coord']],
      2                             dec=[c.split(',')[1] for c in comp_table['coord']],
      3                             unit='degree',
      4                             frame='icrs')

File ~\miniforge3\envs\stellarphot\Lib\site-packages\astropy\table\table.py:2055, in Table.__getitem__(self, item)
   2053 def __getitem__(self, item):
   2054     if isinstance(item, str):
-> 2055         return self.columns[item]
   2056     elif isinstance(item, (int, np.integer)):
   2057         return self.Row(self, item)

File ~\miniforge3\envs\stellarphot\Lib\site-packages\astropy\table\table.py:264, in TableColumns.__getitem__(self, item)
    253 """Get items from a TableColumns object.
    254 
    255 ::
   (...)
    261   tc[1:3] # <TableColumns names=('b', 'c')>
    262 """
    263 if isinstance(item, str):
--> 264     return OrderedDict.__getitem__(self, item)
    265 elif isinstance(item, (int, np.integer)):
    266     return list(self.values())[item]

KeyError: 'coord'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactor Summer 2023 project to rewrite stellarphot
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants