Commit 1fb76a54 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add CsstMsFile.to_dict()

parent 30c3a11b
Pipeline #846 failed with stage
in 0 seconds
......@@ -1067,6 +1067,7 @@ class CsstMsFile(dict):
self.filename = os.path.basename(filepath)
self.dir_in = os.path.dirname(filepath)
self.dir_out = dir_out
self.kwargs = kwargs
# parse filename
# CSST_MSC_MS_SCIE_20270713222417_20270713222647_10160000066_01_L0_V01.fits
......@@ -1137,6 +1138,14 @@ class CsstMsFile(dict):
header=header
)
def to_dict(self):
return dict(
filepath=self.filepath,
ver_sim=self.ver_sim,
dir_out=self.dir_out,
kwargs=self.kwargs
)
def __repr__(self):
return f"CsstMsFile(filepath=\"{self.filename}\", ver_sim=\"{self.ver_sim}\", dir_out=\"{self.dir_out}\")"
# file = CsstMsFile(
......
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