diff --git a/csst_common/data_manager.py b/csst_common/data_manager.py index a1f90895cf38bd9f0822872d02c1978e52ce55cb..dc2f8b3d3f3cc90fce577f355009e8168591cce9 100644 --- a/csst_common/data_manager.py +++ b/csst_common/data_manager.py @@ -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)