Duplicate spectra, when should have been written over, showing up from CLASS reader

Issue #6 resolved
jkamen NA created an issue

I've found a slight bug in the reading in of CLASS files. If the file contains a spectrum that has been overwritten, e.g. a new reduction, both the new and old spectra show up separately. Whereas, when reading the file into CLASS, only one version (the most recent) of the spectrum is there. I noticed that the version tag (sp.header['XVER']) of the old/should-be-overwritten spectrum shows up as a negative number, whereas the new/updated spectrum has the correct version as I see it in CLASS.

It seems that, in this case, spectra which show up as a negative version number should not be included in the spectra object. However, I don't know if there could be legitimate reasons why a negative version number would exist.

(Adam, if you'd like the file, I can email it separately.)

Comments (4)

  1. Adam Ginsburg

    @jkamen - OK, I was totally unaware of what the 'XVER' keyword meant. If you send on the file, I can debug and try to figure out how to fix this.

  2. Adam Ginsburg

    jkamen - sorry about the delay. Could you specify exactly how you were reading the CLASS file, i.e. which command you used? And the pyspeckit version?

  3. Log in to comment