scikit-hep / scikit-hep/pyhf

Extended workspace schema for plotting

Open
#1,007 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat/enhancement question user request
Dominant language
Python
Stars
303
Forks
102
Avg merge
12h 39m
Merged PRs (30d)
17

Description

Question

The current pyhf schema disallows additional channel properties beyond name and samples:

https://github.com/scikit-hep/pyhf/blob/d8be1d121777d52babe018c453d05588d9122395/src/pyhf/schemas/1.0.0/defs.json#L66-L74

What do you think about relaxing this requirement to permit writing additional properties into it? With an added property for the name of the variable the channel is binned in and an array of the bins, it would be possible to e.g. visualize data/MC distributions and effects of systematic uncertainties wrt. nominal (using only the extended workspace as input).

This extra info has no relevance to the statistical inference, so plots could be done without these cosmetics too (which is possible at the moment already).

It might make more sense to separately define a schema for plots. It is also not clear to me whether best-fit results would naturally fit into the workspace (to allow visualizing post-fit distributions), since the workspace feels like a "pre-fit" object. The majority of the information in the workspace is relevant to plots though, so any new format for specifying plots for data/MC distributions would duplicate a lot of information.

Relevant Issues and Pull Requests

none I'm aware of

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the channel definition in src/pyhf/schemas/1.0.0/defs.json at the linked lines and the existing workspace schema constraints. Compare the proposed channel metadata with the alternative of a separate plotting schema, including how post-fit results would be represented. Done means an agreed format and schema direction for plotting metadata, with the required validation changes identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.