Commit 22dcd647 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

use str for dm.stamps

parent b59688de
......@@ -157,14 +157,14 @@ class CsstMsDataManager:
_survey: str = "MS",
obs_type: str = "SCI",
l0_post: str = "L0_1",
log_ppl="",
log_mod="",
clear_dir=False,
verbose=True,
n_jobs=18,
backend="multiprocessing",
device="CPU",
stamps="",
log_ppl: str = "",
log_mod: str = "",
clear_dir: bool = False,
verbose: bool = True,
n_jobs: int = 18,
backend: str = "multiprocessing",
device: str = "CPU",
stamps: str = "",
):
# set DFS log dir
......@@ -256,15 +256,13 @@ class CsstMsDataManager:
self.custom_dark = None
self.custom_flat = None
if stamps == "" or stamps is None:
self.stamps = None
else:
self.stamps = open(stamps, "w+")
self.write_stamp()
self.stamps = stamps
self.write_stamp()
def write_stamp(self):
if self.stamps is not None:
self.stamps.write(f"{time.Time.now().isot}\n")
if self.stamps is not None and not self.stamps == "":
with open(self.stamps, "a+") as f:
f.write(f"{time.Time.now().isot}\n")
# DFS APIs
@property
......
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