Jan-21-2020, 07:09 PM
I'm currently using Vizier Query to call the SAO catalog. I've successfully created a script that calls each spectral type, but when I try to plot the B stars, it comes up with this:
startswith first arg must be bytes or a tuple of bytes, not numpy.str_
The code that it refers to is
tbl = tbl[tbl['SpType'] != '']
print(tbl['_RA.icrs'][:4])
print(tbl['_DE.icrs'][:4])
sptype_mask = np.char.startswith(tbl['SpType'], 'O')
I'm unsure how to change the code to get it working. The rest of the script runs perfectly, and the mollweide projection works fine, I just can't plot each spectral type.
Has anybody had this issue with their code?
startswith first arg must be bytes or a tuple of bytes, not numpy.str_
The code that it refers to is
tbl = tbl[tbl['SpType'] != '']
print(tbl['_RA.icrs'][:4])
print(tbl['_DE.icrs'][:4])
sptype_mask = np.char.startswith(tbl['SpType'], 'O')
I'm unsure how to change the code to get it working. The rest of the script runs perfectly, and the mollweide projection works fine, I just can't plot each spectral type.
Has anybody had this issue with their code?