Access the PDF info explicitly
Created by: scarlehoff
One of the changes proposed in #1475 (closed).
This is not strictly necessarily for #destroyingc++ but it makes my life easier. Realistically the PDF
only needs to look into the .info
file for the error type and eventually the confidence levels of the hessian errors. Now this is done through explicit attributes. The .info
file is still exposed through an info
attribute, which among other things allows for the user to look at what's included instead of guessing and hoping for __get_attr__
to find it.
Since I was effectively rewriting the PDF
class I've also fixed a TODO
which asked for the usage of Path
for infopath
and I've clean some redundant checks (for instance, rescale_factor
is only called in one specific situation so no point on checking inside the same reason why it was being called in the first place.
The only quirk here is the fact that some hessian PDFs do not include a confidence level. Is that because it is assumed to be 68%? (@Zaharid could you comment?) I've left it such that it behaves exactly as the previous one in that case but the code could be simplified even more if this is confirmed.
Some notes on the PR itself: all the changes are to the core.py
(and test_core.py
) files. All the other files changed have been a sed command for the following substitutions: (ErrorType
-> error_type
, QMin
-> q_min
) and the removal of redundant pathlib
calls.