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