pub struct PyPDFSet { /* private fields */ }Expand description
LHAPDF-compatible interface to a PDF set.
Provides the same API as lhapdf.PDFSet.
Implementations§
Source§impl PyPDFSet
impl PyPDFSet
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Human-readable description of the PDF set.
Sourcepub fn error_type(&self) -> &str
pub fn error_type(&self) -> &str
Error type string (e.g. replicas, hessian).
Sourcepub fn info(&self) -> PyMetaData
pub fn info(&self) -> PyMetaData
Return the metadata for this set as a MetaData object.
Sourcepub fn mk_pdf(&self, member: usize) -> PyPDF
pub fn mk_pdf(&self, member: usize) -> PyPDF
Load a single PDF member by index.
§Parameters
member : int Member index. Defaults to 0 (central value).
Sourcepub fn mk_pdfs(&self, method: &PyLoaderMethod) -> Vec<PyPDF>
pub fn mk_pdfs(&self, method: &PyLoaderMethod) -> Vec<PyPDF>
Load all members of this PDF set.
§Parameters
method : LoaderMethod
Loading strategy. Defaults to Parallel.
Sourcepub fn error_conf_level(&self) -> f64
pub fn error_conf_level(&self) -> f64
Confidence level (in %) at which the set’s error members were constructed.
Returns -1.0 when the ErrorConfLevel field is absent from the .info file,
matching the LHAPDF convention.
Sourcepub fn uncertainty(
&self,
values: Vec<f64>,
cl: f64,
alternative: bool,
) -> PyResult<PyUncertainty>
pub fn uncertainty( &self, values: Vec<f64>, cl: f64, alternative: bool, ) -> PyResult<PyUncertainty>
Compute PDF uncertainty from a slice of per-member values.
§Parameters
values : list[float]
Per-member values at a given kinematic point. Element 0 is the central member;
the remaining elements are the error members.
cl : float
Output confidence level in %. Defaults to CL_1_SIGMA (~ 68.27 %).
alternative : bool
If True, replica sets use a quantile-based asymmetric interval instead of
the standard deviation. Defaults to False.
§Errors
Raises ValueError if values is empty.
Sourcepub fn has_key(&self, key: &str) -> bool
pub fn has_key(&self, key: &str) -> bool
Return True if the given LHAPDF-canonical key is present in this set’s metadata.
Trait Implementations§
impl DerefToPyAny for PyPDFSet
impl ExtractPyClassWithClone for PyPDFSet
Source§impl<'py> IntoPyObject<'py> for PyPDFSet
impl<'py> IntoPyObject<'py> for PyPDFSet
Source§type Output = Bound<'py, <PyPDFSet as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <PyPDFSet as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClassImpl for PyPDFSet
impl PyClassImpl for PyPDFSet
Source§const MODULE: Option<&str> = ::core::option::Option::None
const MODULE: Option<&str> = ::core::option::Option::None
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// LHAPDF-compatible interface to a PDF set.
///
/// Provides the same API as `lhapdf.PDFSet`.
const RAW_DOC: &'static CStr = /// LHAPDF-compatible interface to a PDF set. /// /// Provides the same API as `lhapdf.PDFSet`.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<PyPDFSet as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<PyPDFSet>
type Layout = <<PyPDFSet as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<PyPDFSet>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
Source§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
Source§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for PyPDFSet
impl PyClassNewTextSignature for PyPDFSet
const TEXT_SIGNATURE: &'static str = "(name)"
Source§impl PyMethods<PyPDFSet> for PyClassImplCollector<PyPDFSet>
impl PyMethods<PyPDFSet> for PyClassImplCollector<PyPDFSet>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for PyPDFSet
impl PyTypeInfo for PyPDFSet
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Auto Trait Implementations§
impl Freeze for PyPDFSet
impl RefUnwindSafe for PyPDFSet
impl Send for PyPDFSet
impl Sync for PyPDFSet
impl Unpin for PyPDFSet
impl UnsafeUnpin for PyPDFSet
impl UnwindSafe for PyPDFSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.