From d1afc8720a7be7ff60de1607a93d6b0ff64f3dce Mon Sep 17 00:00:00 2001 From: michael gemmell Date: Thu, 17 Aug 2023 16:10:26 +0100 Subject: [PATCH] precommit types --- indica/workflows/bayes_workflow_example.py | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/indica/workflows/bayes_workflow_example.py b/indica/workflows/bayes_workflow_example.py index bce9272c..5d153a01 100644 --- a/indica/workflows/bayes_workflow_example.py +++ b/indica/workflows/bayes_workflow_example.py @@ -1,8 +1,9 @@ +from typing import Optional + import emcee import flatdict import numpy as np from scipy.stats import loguniform -from typing import Optional from indica.bayesmodels import BayesModels from indica.bayesmodels import get_uniform @@ -105,12 +106,12 @@ class BayesWorkflowExample(AbstractBayesWorkflow): def __init__( self, + diagnostics: list, + param_names: list, + opt_quantity: list, + priors: dict, + profile_params: dict, pulse: int = None, - diagnostics: Optional[list] = None, - param_names: Optional[list] = None, - opt_quantity: Optional[list] = None, - priors: dict = None, - profile_params: dict = None, phantoms: bool = False, tstart=0.02, tend=0.10, @@ -414,18 +415,19 @@ def __call__( if __name__ == "__main__": run = BayesWorkflowExample( - pulse=None, - phantoms=True, - diagnostics=["xrcs", "efit", "smmh1", "cxff_pi"], - opt_quantity=[ + ["xrcs", "efit", "smmh1", "cxff_pi"], + [ "xrcs.spectra", "cxff_pi.ti", "efit.wp", "smmh1.ne", ], - param_names=OPTIMISED_PARAMS, - profile_params=DEFAULT_PROFILE_PARAMS, - priors=DEFAULT_PRIORS, + OPTIMISED_PARAMS, + DEFAULT_PROFILE_PARAMS, + DEFAULT_PRIORS, + + pulse=None, + phantoms=True, tstart=0.02, tend=0.10, dt=0.005,