You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I previously mentioned this already at #6912 (comment) , but that PR is closed so I wanted to file this separate issue.
IMO write shouldn't modify the object, i.e. this could be considered a bug or at least undesirable behaviour. Note how calling write twice puts the comments twice, maybe another indication that if at all the addition doesn't happen in the right place, and e.g. a copy of meta should be made in the process?
Finally, BinTableHDU(table) doesn't have that behaviour, so the write to FITS on disk and in-memory conversion to FITS don't behave the same, which is a bit problematic for us in Gammapy where we have both cases.
Activity
Avoid modifying .meta when serializing columns