Skip to content

Make a higher level "chi2 table" like API #610

@wilsonmr

Description

@wilsonmr

So many of the tables in results and now closure are small variations on a theme. I was wondering if we could shorten the code a bit by making some kind of table API which allows tables to be declared in runcard somehow

tablespec:
  index: {'experiments': 'datasets'}
  columns: {`fits`: {`ndata`, `central`}}
  show_total: True

actions_:
 - chi2_table_action

maybe we could even be more adventurous and have cross compatibility for anything which can be tabled in this way:

tablespec:
  index: {'experiments': 'datasets'}
  columns: {'fits': {'ndata', {'chi2': 'central'}}}
  show_total: True

actions_:
 - generic_table_action

Not sure if that would even be useful however.. Probably the first thing would be sufficient to start

I haven't thought that through really but I think it could work? I'm sure @Zaharid already mentioned it in #447

specifically: #447 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions