Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_common
Commits
d593a671
Commit
d593a671
authored
2 years ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
use os.system to implement dm.remove_files
parent
8ac91be4
dev
main
wangxia-main-patch-87026
zhaobowei-main-patch-61353
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
csst_common/data_manager.py
+5
-6
csst_common/data_manager.py
with
5 additions
and
6 deletions
+5
-6
csst_common/data_manager.py
+
5
-
6
View file @
d593a671
...
...
@@ -23,7 +23,7 @@ from astropy.table import Table
from
.dfs
import
gaia_query_from_dfs
,
get_l1api
from
.params
import
CSST_PARAMS
as
CP
from
.params
import
DFS_CONF
from
.utils
import
remove_files
,
remove_dir
from
.utils
import
remove_dir
class
CsstMsDataManager
:
...
...
@@ -252,8 +252,8 @@ class CsstMsDataManager:
# parse info
_telescope
,
_instrument
,
_survey
,
_imagetype
,
\
_exp_start
,
_exp_stop
,
_exp_id
,
\
_detector
,
*
_l0_post
,
_ext
=
re
.
split
(
r
"[_.]"
,
fps_img
[
0
])
_exp_start
,
_exp_stop
,
_exp_id
,
\
_detector
,
*
_l0_post
,
_ext
=
re
.
split
(
r
"[_.]"
,
fps_img
[
0
])
_exp_start
=
int
(
_exp_start
)
_exp_stop
=
int
(
_exp_stop
)
...
...
@@ -514,9 +514,8 @@ class CsstMsDataManager:
lines
+=
f
"CSST_DFS_GATEWAY = "
+
os
.
getenv
(
"CSST_DFS_GATEWAY"
)
+
"
\n
"
return
lines
@
staticmethod
def
remove_files
(
fmt
=
"./*_post.fits"
):
remove_files
(
fmt
=
fmt
)
def
remove_files
(
self
,
fmt
=
"*.fits"
):
os
.
system
(
f
"rm -rf
{
os
.
path
.
join
(
self
.
dir_l1
,
fmt
)
}
"
)
@
staticmethod
def
remove_dir
(
path
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets