Commit f46b435d authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add CsstMsFile.fno

parent 4a604e5f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1064,6 +1064,15 @@ class CsstMsFile(dict):
                 f"{self.obs_id}_{self.detector}_L1_V{self.version}_{post}"
        return os.path.join(self.dir_out, fn)

    def fno(self, post=".fits"):
        if post.startswith("."):
            fn = f"{self.telescope}_{self.instrument}_{self.project}_{self.obs_type}_{self.exp_start}_{self.exp_stop}_" \
                 f"{self.obs_id}_{self.detector}_L1_V{self.version}{post}"
        else:
            fn = f"{self.telescope}_{self.instrument}_{self.project}_{self.obs_type}_{self.exp_start}_{self.exp_stop}_" \
                 f"{self.obs_id}_{self.detector}_L1_V{self.version}_{post}"
        return fn

    def fpi(self):
        return os.path.join(self.dir_in, self.filename)