Skip to content

Feature wishlist #88

Description

@felixhekhorn

I would like to see more features to make this a full drop-in replacement.

  1. add a PDFSet equivalent - i.e. the ensemble itself and not any specific member there of. In particular I would need the uncertainty, has_key, and get_entry methods
  2. I would love to do a import neopdf.blub as lhapdf and that act as a true drop-in replacement - it might be too ambitious I know ... the current from neopdf.pdf import PDF as lhapdf does only work for mkPDF at the moment, but then lhapdf.setVerbosity(0) (which could for example do exactly nothing) or lhapdf.getPDFSet (see above) fail

I was hoping using neopdf I could bypass https://gitlab.com/hepcedar/lhapdf/-/commit/d71a58e18565786f276d32e21a82ea0e10374c04 - but then I realised that this creates actually more problems ...

Activity

  1. Radonirinaunimi commented on Mar 23, 2026

    @Radonirinaunimi
    Member

    Thanks for the comments @felixhekhorn!

    1. add a [`PDFSet`](https://gitlab.com/hepcedar/lhapdf/-/blob/main/src/PDFSet.cc?ref_type=heads) equivalent - i.e. the ensemble itself and not any specific member there of. In particular I would need the `uncertainty`, `has_key`, and `get_entry` methods
    

    This, I am currently working on, especially in the view of NNPDF/pineappl#370.

    2. I would love to do a `import neopdf.blub as lhapdf` and that act as a true drop-in replacement - it might be too ambitious I know ... the current `from neopdf.pdf import PDF as lhapdf` does only work for `mkPDF` at the moment, but then `lhapdf.setVerbosity(0)` (which could for example do exactly nothing) or `lhapdf.getPDFSet` (see above) fail
    

    For this, I am not entirely sure about the best way to implement it without polluting the modules/namespaces with duplicated methods.

    I was hoping using neopdf I could bypass https://gitlab.com/hepcedar/lhapdf/-/commit/d71a58e18565786f276d32e21a82ea0e10374c04 - but then I realised that this creates actually more problems ...

    Could you perhaps summarize what exactly is the premise of this?

  2. felixhekhorn commented on Mar 24, 2026

    @felixhekhorn
    Author

    I was hoping using neopdf I could bypass https://gitlab.com/hepcedar/lhapdf/-/commit/d71a58e18565786f276d32e21a82ea0e10374c04 - but then I realised that this creates actually more problems ...

    Could you perhaps summarize what exactly is the premise of this?

    I thought I was affected by that bug, which was wrong - so please ignore that

    2. I would love to do a `import neopdf.blub as lhapdf` and that act as a true drop-in replacement - it might be too ambitious I know ... the current `from neopdf.pdf import PDF as lhapdf` does only work for `mkPDF` at the moment, but then `lhapdf.setVerbosity(0)` (which could for example do exactly nothing) or `lhapdf.getPDFSet` (see above) fail
    

    For this, I am not entirely sure about the best way to implement it without polluting the modules/namespaces with duplicated methods.

    I'm not sure Rust has the same feature, but in Python you could just re-export the relevant methods, no? is that what you mean? in any case, as already said, I'm not sure how far you want to go with this ...

  3. Radonirinaunimi commented on Jun 8, 2026

    @Radonirinaunimi
    Member

    To follow up on this @felixhekhorn (given that I have some time this week xD), apart from the two drop-in functions you mentioned before, what else would you usually need/are currently using? I would start from these first and then add more as time passes by.

  4. felixhekhorn commented on Jun 8, 2026

    @felixhekhorn
    Author
    1. add a PDFSet equivalent - i.e. the ensemble itself and not any specific member there of. In particular I would need the uncertainty, has_key, and get_entry methods

    I still think, my first point would be good to have ... it also has some overlap with the official python example script

  5. Radonirinaunimi commented on Jun 8, 2026

    @Radonirinaunimi
    Member

    Ok, I believe I implemented most of them now in #93 and all the available symbols documented here https://qcdlab.github.io/neopdf/design-and-features/#no-code-migration .

  6. felixhekhorn commented on Jun 9, 2026

    @felixhekhorn
    Author

    great! a few more would still be good to have - and as far as I can see, most of them are already there, they are just not available in the same place

    the uncertainty, has_key, and get_entry methods

    PS: https://github.com/QCDLab/neopdf/pull/93/changes#r3378879847

  7. Radonirinaunimi commented on Jun 12, 2026

    @Radonirinaunimi
    Member

    great! a few more would still be good to have - and as far as I can see, most of them are already there, they are just not available in the same place

    the uncertainty, has_key, and get_entry methods

    Just to say that these have also been implemented now.

  8. felixhekhorn commented on Jun 12, 2026

    @felixhekhorn
    Author

    Perfect! I'd say let's close this issue and open a new one if necessary. Thanks a lot for your work! 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions