diff --git a/v2e.py b/v2e.py index 635f55c..952686a 100644 --- a/v2e.py +++ b/v2e.py @@ -196,7 +196,7 @@ def main(): # check to make sure there are no other arguments that might be bogus misspelled arguments in case # we don't have synthetic input class to pass these to - if synthetic_input_instance is None and not other_args is None: + if synthetic_input_instance is None and len(other_args)>0: logger.error(f'There is no synthetic input class specified but there are extra arguments {other_args} that are probably incorrect') v2e_quit(1) diff --git a/v2ecore/emulator_utils.py b/v2ecore/emulator_utils.py index 784546a..310ed1f 100644 --- a/v2ecore/emulator_utils.py +++ b/v2ecore/emulator_utils.py @@ -14,6 +14,7 @@ logger = logging.getLogger(__name__) + def lin_log(x, threshold=20): """ linear mapping + logarithmic mapping. @@ -84,7 +85,13 @@ def low_pass_filter( eps = inten01*(delta_time/tau) max_eps = torch.max(eps) if max_eps >0.3: - logger.warning(f'IIR lowpass filter update has large maximum update eps={max_eps:.2f} from delta_time/tau={delta_time:.3g}/{tau:.3g}') + IIR_MAX_WARNINGS = 10 + if low_pass_filter.iir_warning_count