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

OpticsDescription table is inconsistent (and not readable) #1359

Closed
kosack opened this issue Jun 8, 2020 · 7 comments
Closed

OpticsDescription table is inconsistent (and not readable) #1359

kosack opened this issue Jun 8, 2020 · 7 comments
Labels

Comments

@kosack
Copy link
Contributor

kosack commented Jun 8, 2020

Writing an optics table with subarray.to_table(kind="optics").write(output) writes a table in a format that is not readable by OpticsDescription.from_name().

It seems the format was updated in one place, but not the other. This leads to the files written by ctapipe-stage1-process to be not usable to construct a SubarrayDescription.

With other tables, like CameraGeometry we were careful to set a TAB_VER (table version) header keywords, so we could support data model changes, but it seems that was not done here.

Suggestion: we will have to add TAB_VER to this, but to support older version of the data format (which unfortunately are in ctapipe-extra and all output from ctapipe-stage1-process v0.8), we will have to make some code that reads both type (actually it seems 3 separate data models are assumed).

@kosack
Copy link
Contributor Author

kosack commented Jun 8, 2020

see #1358

@kosack kosack added the bug label Jun 8, 2020
@kosack kosack added this to the v0.8.1 milestone Jun 8, 2020
@LukasNickel
Copy link
Member

Are you going to add a second (newer) table to ctapipe-extra? Or what would be the next steps on this?

@maxnoe
Copy link
Member

maxnoe commented Sep 14, 2020

This should be fixed by #1405, right?

@kosack
Copy link
Contributor Author

kosack commented Sep 14, 2020

No I think it's a fundamental problem in the OpticsDescription to_table and from_table methods. They just need to be made consistent. There is a bit of a hack in #1405 to make it work, but we are definitely missing a unit test and having these two methods work without any hacks. The problem is that the file format changed in #982, but only the write method was updated, I think.

@maxnoe
Copy link
Member

maxnoe commented Sep 14, 2020

Ok, so we also need to update a file in ctapipe-extra, right?

@kosack
Copy link
Contributor Author

kosack commented Sep 14, 2020

Yes, or also support the old format (by looking at the TAB_VER header in the file). Might be a good example for what happens when we update the data model or file format in the future...

@maxnoe
Copy link
Member

maxnoe commented Sep 24, 2020

Fixed by merging #1417

@maxnoe maxnoe closed this as completed Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants