Skip to content

Proposed changes to the behaviour of the PDF class. #1475

@scarlehoff

Description

@scarlehoff

This is a collection of issues with the current implementation of the PDF class.

This issue will be organized as:

  • Problem
  • Examples
  • Solution

Todo:

  • Error type: the nnpdf_error attribute
  • Loaded PDF class
  • PDF .info file
  • Closure test references

Error Type

Half of the issues with the PDF class is the management of the error type.

The nnpdf_error attribute:

def nnpdf_error(self):

I will remove this attribute and all references to it. If something is accessing this attribute then it is a libNNPDF thing and should be removed. Instead (as was suggested) any behavior that depends on the error type of the PDF should be interfaced through its associated stats_class.

Actual PDF

Currently load loads a libNNPDF PDF set.

def load(self):

It will be changed to a python wrapper to the lhapdf python interface. It makes sense to do it this way because it allows for certain optimization (such as grid_values).

Attributes

Currently we look inside the info file of the PDF by using hasattr, which is confusing and hides what's actually happening.

def __getattr__(self, attr):

if hasattr(self, "ErrorConfLevel"):

I will change it to something more explicit.

Reference to libNNPDF PDF

There are two instances where the libNNPDF PDF is used, both related to closure tests:

def internal_multiclosure_dataset_loader(

loaded_data.MakeClosure(fakeset, fakenoise)

Of course, some of the issues highlighted here might have reasons behind them to which I'm not privy. I might also be missing other points that could be removed and that I'm overlooking.

EDIT: Change the places in which libNNPDF is necessary.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions