diff --git a/gatherdata.py b/gatherdata.py index 73a711a..dac8f9e 100644 --- a/gatherdata.py +++ b/gatherdata.py @@ -2,7 +2,7 @@ import numpy as np from myconfig import OUTPUT_DIR from tools.mylogger import log from pathlib import Path -from handheld import HandHeldPath +# from handheld import HandHeldPath class GatherData(object): """对数据进行汇总后分析 csv""" def __init__(self, ): diff --git a/handheld.py b/handheld.py index 682092f..0f0a312 100644 --- a/handheld.py +++ b/handheld.py @@ -481,12 +481,7 @@ class HandHeld(object): self.output_path = OUTPUT_DIR self.current_filepath = fpath self.current_measure_time = self.hhp.getCurrentMeasureTimeFromPath(fpath) - self.ymdhms = "20"+ str(self.info_dict['year']) + '_' \ - + str(self.info_dict['month']) + '_' \ - + str(self.info_dict['day']) + '_' \ - + str(self.info_dict['hour']) + '_' \ - + str(self.info_dict['minute']) + '_' \ - + str(self.info_dict['second']) + self.get_ymdhms() self.output_path = self.output_path.joinpath( self.ymdhms ) log.debug(f"current_measure_time: {self.current_measure_time}", __name__, "dealOneHandheldMeasurement") @@ -744,6 +739,13 @@ class HandHeld(object): return True + def get_ymdhms(self, ): + self.ymdhms = "20"+ f"{self.info_dict['year']:02d}" + '_' \ + + f"{self.info_dict['month']:02d}" + '_' \ + + f"{self.info_dict['day']:02d}" + '_' \ + + f"{self.info_dict['hour']:02d}" + '_' \ + + f"{self.info_dict['minute']:02d}" + '_' \ + + f"{self.info_dict['second']:02d}" # def getLwRsAndSave(self, ) -> bool: # """ # 并计算Lw Rs并保存