matthewfeickert / exclusion

Calculate and visualize exclusion contours
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Remove dead code from interpolate #3

Open matthewfeickert opened 1 year ago

matthewfeickert commented 1 year ago

As pointed out in https://github.com/iris-hep/analysis-grand-challenge/pull/148#issuecomment-1569952091 the current interpolate.py code includes constraintsDict

...
def harvestToDict(args, inputJSON, tmpListOfContours=None):
    listOfContours, expectedContour, observedContour, _, _ = make_from_args(args)
    tmpListOfContours = tmpListOfContours or listOfContours

    """This parses the input file into a dictionary object for simpler handling"""

    modelDict = {}

    # for sample in inputJSON:
    for sample in inputJSON.values():

        ## Allowing filtering of entries via a constraints file
        if args.fixedParamsFile:
            failConstraintCutList = [
                sample[str(constrainedVar)] != constrainedVal
                for (constrainedVar, constrainedVal) in constraintsDict.iteritems()
            ]
...

though it is never defined. This appears to be remnants of HistFitter code, so this should get removed.

eguiraud commented 1 year ago

This is now fixed in the AGC repo (by this commit)

matthewfeickert commented 1 year ago

@eguiraud :+1:. In https://github.com/iris-hep/analysis-grand-challenge/pull/51 I was just temporarily vendoring the relevant components, so at some point once this is cleaned up it might be worthwhile to change that example over to using code from PyPI so that the AGC doesn't need to maintain anything related to it (beyond controlling dependencies).