Skip to content

Commit

Permalink
Drop inspector from runner
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Nov 5, 2023
1 parent cd3a330 commit 3bc8a8a
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/yadism/runner.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""
This module contains the main loop for the DIS calculations.
"""This module contains the main loop for the DIS calculations.
There are two ways of using ``yadism``:
Expand Down Expand Up @@ -35,7 +34,7 @@
from . import log, observable_name
from .coefficient_functions.coupling_constants import CouplingConstants
from .esf import scale_variations as sv
from .input import compatibility, inspector
from .input import compatibility
from .output import Output
from .sf import StructureFunction as SF
from .xs import CrossSection as XS
Expand All @@ -44,8 +43,7 @@


class Runner:
"""
Wrapper to compute a process.
"""Wrapper to compute a process.
Parameters
----------
Expand All @@ -64,7 +62,6 @@ class Runner:
.. todo::
* reference on theory template
* detailed description of dis_observables entries
"""

banner = rich.align.Align(
Expand All @@ -86,9 +83,6 @@ class Runner:
)

def __init__(self, theory: dict, observables: dict):
# Validate inputs and improve if necessary
insp = inspector.Inspector(theory, observables)
insp.perform_all_checks()
new_theory, new_observables = compatibility.update(theory, observables)

# Store inputs
Expand Down Expand Up @@ -201,24 +195,22 @@ def get_sf(self, obs_name):
def drop_cache(self):
"""Drop the whole cache for all observables.
This preserves final results, since they are not part of the cache.
This preserves final results, since they are not part of the
cache.
"""
for obs in self.observables.values():
if isinstance(obs, SF):
obs.drop_cache()

def get_result(self):
"""
Compute coefficient functions grid for requested kinematic points.
"""Compute coefficient functions grid for requested kinematic points.
Returns
-------
:obj:`Output`
output object, it will store the coefficient functions grid
(flavour, interpolation-index) for each requested kinematic
point (x, Q2)
"""
self.console.print(self.banner)

Expand Down

0 comments on commit 3bc8a8a

Please sign in to comment.