UnitConversionError: Unit mag is not a physical unit

I am trying to create photometry ensembles for from APASS data. I download the APASS data from a Vizier query into a QTable. I load the SExtractor catalog from an image into a QTable. I match stars between the two tables and reject stars that don’t match (and also filter on various conditions like B-V colour, nearby neighbours, etc). I then create an ‘ensemble’ QTable using the desired columns from the two tables and write it as ‘ascii.ecsv’. But when I read the table back in I get the UnitConversionError. All the magnitude columns from Vizier have unit ‘mag’ and that table can be written and read fine. I use the same magnitude columns in my ensemble QTable with the same unit and can’t read my tables back in. Can anybody help?

That sounds like a bug. Could you share a small version of the table, e.g. just the first few lines and just a few columns (obviously including the one with the mag) so that I can reproduce that and see what exactly the error looks like?

1 Like