Commit b898daf2 authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Rename PostFitShapes to FitDiagnostics task.

parent 89df039e
# coding: utf-8
# flake8: noqa
# import all task modules
import dhi.tasks.base
......@@ -8,7 +9,7 @@ import dhi.tasks.likelihoods
import dhi.tasks.significances
import dhi.tasks.pulls_impacts
import dhi.tasks.exclusion
import dhi.tasks.postfit_shapes
import dhi.tasks.postfit
import dhi.tasks.gof
import dhi.tasks.test
import dhi.tasks.studies.model_selection
# coding: utf-8
"""
Tasks for creating post fit plots.
Tasks for working with postfit results.
"""
import law
......@@ -11,7 +11,7 @@ from dhi.tasks.base import HTCondorWorkflow, view_output_plots
from dhi.tasks.combine import CombineCommandTask, POITask, POIPlotTask, CreateWorkspace
class PostfitShapes(POITask, CombineCommandTask, law.LocalWorkflow, HTCondorWorkflow):
class FitDiagnostics(POITask, CombineCommandTask, law.LocalWorkflow, HTCondorWorkflow):
pois = law.CSVParameter(
default=("r",),
......@@ -29,7 +29,7 @@ class PostfitShapes(POITask, CombineCommandTask, law.LocalWorkflow, HTCondorWork
return [""] # single branch with empty data
def workflow_requires(self):
reqs = super(PostfitShapes, self).workflow_requires()
reqs = super(FitDiagnostics, self).workflow_requires()
reqs["workspace"] = self.requires_from_branch()
return reqs
......@@ -60,6 +60,7 @@ class PostfitShapes(POITask, CombineCommandTask, law.LocalWorkflow, HTCondorWork
" --skipBOnlyFit"
" --saveWithUncertainties"
" --saveNormalizations"
" --saveWorkspace"
" {self.combine_optimization_args}"
" {self.custom_args}"
" && "
......@@ -73,7 +74,7 @@ class PostfitShapes(POITask, CombineCommandTask, law.LocalWorkflow, HTCondorWork
class PlotPostfitSOverB(POIPlotTask):
pois = PostfitShapes.pois
pois = FitDiagnostics.pois
bins = law.CSVParameter(
cls=luigi.FloatParameter,
default=(8,),
......@@ -104,7 +105,7 @@ class PlotPostfitSOverB(POIPlotTask):
force_n_pois = 1
def requires(self):
return PostfitShapes.req(self)
return FitDiagnostics.req(self)
def output(self):
name = self.create_plot_name(["postfitsoverb", self.get_output_postfix()])
......
......@@ -23,7 +23,7 @@ from dhi.tasks.likelihoods import (
from dhi.tasks.significances import PlotSignificanceScan, PlotMultipleSignificanceScans
from dhi.tasks.pulls_impacts import PlotPullsAndImpacts
from dhi.tasks.exclusion import PlotExclusionAndBestFit, PlotExclusionAndBestFit2D
from dhi.tasks.postfit_shapes import PlotPostfitSOverB
from dhi.tasks.postfit import PlotPostfitSOverB
from dhi.tasks.gof import PlotGoodnessOfFit, PlotMultipleGoodnessOfFits
from dhi.tasks.studies.model_selection import (
PlotMorphingScales, PlotMorphedDiscriminant, PlotStatErrorScan,
......
......@@ -25,7 +25,7 @@ Output:
```mermaid
graph LR;
A(PlotPostfitSOverB) --> B([PostfitShapes]);
A(PlotPostfitSOverB) --> B([FitDiagnostics]);
B --> C(CreateWorkspace);
C --> D(CombineDatacards);
```
......@@ -39,9 +39,9 @@ Rounded boxes mark [workflows](practices.md#workflows) with the option to run ta
--8<-- "content/snippets/plotpostfitsoverb_param_tab.md"
=== "PostfitShapes"
=== "FitDiagnostics"
--8<-- "content/snippets/postfitshapes_param_tab.md"
--8<-- "content/snippets/fitdiagnostics_param_tab.md"
=== "CreateWorkspace"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment