misc
This commit is contained in:
parent
e78bfa3c8a
commit
e73113754f
|
|
@ -3,8 +3,6 @@ from fn.op import foldr
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
from SimCAD import configs
|
from SimCAD import configs
|
||||||
# from SimCAD.configuration.utils.parameterSweep import ParamSweep
|
|
||||||
|
|
||||||
from SimCAD.utils import key_filter
|
from SimCAD.utils import key_filter
|
||||||
from SimCAD.configuration.utils.behaviorAggregation import dict_elemwise_sum
|
from SimCAD.configuration.utils.behaviorAggregation import dict_elemwise_sum
|
||||||
from SimCAD.configuration.utils import exo_update_per_ts
|
from SimCAD.configuration.utils import exo_update_per_ts
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,8 @@ from copy import deepcopy
|
||||||
from fn.func import curried
|
from fn.func import curried
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
from SimCAD.utils import dict_filter, contains_type, flatten_tabulated_dict, tabulate_dict, curry_pot
|
from SimCAD.utils import dict_filter, contains_type
|
||||||
|
|
||||||
# import pprint
|
|
||||||
# pp = pprint.PrettyPrinter(indent=4)
|
|
||||||
|
|
||||||
class TensorFieldReport:
|
class TensorFieldReport:
|
||||||
def __init__(self, config_proc):
|
def __init__(self, config_proc):
|
||||||
|
|
@ -45,14 +43,14 @@ def proc_trigger(trigger_step, update_f, step):
|
||||||
return lambda x: x
|
return lambda x: x
|
||||||
|
|
||||||
|
|
||||||
t_delta = timedelta(days=0, minutes=0, seconds=30)
|
step_t_delta = timedelta(days=0, minutes=0, seconds=30)
|
||||||
def time_step(dt_str, dt_format='%Y-%m-%d %H:%M:%S', _timedelta = t_delta):
|
def time_step(dt_str, dt_format='%Y-%m-%d %H:%M:%S', _timedelta = t_delta):
|
||||||
dt = datetime.strptime(dt_str, dt_format)
|
dt = datetime.strptime(dt_str, dt_format)
|
||||||
t = dt + _timedelta
|
t = dt + _timedelta
|
||||||
return t.strftime(dt_format)
|
return t.strftime(dt_format)
|
||||||
|
|
||||||
|
|
||||||
t_delta = timedelta(days=0, minutes=0, seconds=1)
|
ep_t_delta = timedelta(days=0, minutes=0, seconds=1)
|
||||||
def ep_time_step(s, dt_str, fromat_str='%Y-%m-%d %H:%M:%S', _timedelta = t_delta):
|
def ep_time_step(s, dt_str, fromat_str='%Y-%m-%d %H:%M:%S', _timedelta = t_delta):
|
||||||
if s['mech_step'] == 0:
|
if s['mech_step'] == 0:
|
||||||
return time_step(dt_str, fromat_str, _timedelta)
|
return time_step(dt_str, fromat_str, _timedelta)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue