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
c63576c4
Commit
c63576c4
authored
2 years ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
use iso 8601 format time stamp
parent
9d91ed34
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
+8
-4
csst_common/data_manager.py
with
8 additions
and
4 deletions
+8
-4
csst_common/data_manager.py
+
8
-
4
View file @
c63576c4
...
@@ -13,23 +13,23 @@ Modified-History:
...
@@ -13,23 +13,23 @@ Modified-History:
2022-11-06, Bo Zhang, deleted CsstMbiDataManager
2022-11-06, Bo Zhang, deleted CsstMbiDataManager
2022-11-20, Bo Zhang, added DFS APIs
2022-11-20, Bo Zhang, added DFS APIs
"""
"""
import
_io
import
datetime
import
glob
import
glob
import
os
import
os
import
re
import
re
from
typing
import
Union
from
typing
import
Union
import
numpy
as
np
import
numpy
as
np
from
astropy.io
import
fits
from
astropy
import
time
from
astropy
import
time
from
astropy.io
import
fits
from
astropy.table
import
Table
from
astropy.table
import
Table
from
csst_dfs_api.common.catalog
import
CatalogApi
from
csst_dfs_api.facility.level0
import
Level0DataApi
from
csst_dfs_api.facility.level0
import
Level0DataApi
from
csst_dfs_api.facility.level0prc
import
Level0PrcApi
from
csst_dfs_api.facility.level0prc
import
Level0PrcApi
from
csst_dfs_api.facility.level1
import
Level1DataApi
from
csst_dfs_api.facility.level1
import
Level1DataApi
from
csst_dfs_api.facility.level1prc
import
Level1PrcApi
from
csst_dfs_api.facility.level1prc
import
Level1PrcApi
from
csst_dfs_api.mbi.level2
import
Level2DataApi
as
MbiLevel2DataApi
from
csst_dfs_api.mbi.level2
import
Level2DataApi
as
MbiLevel2DataApi
from
csst_dfs_api.sls.level2spectra
import
Level2SpectraApi
as
SlsLevel2DataApi
from
csst_dfs_api.sls.level2spectra
import
Level2SpectraApi
as
SlsLevel2DataApi
from
csst_dfs_api.common.catalog
import
CatalogApi
from
.logger
import
get_logger
from
.logger
import
get_logger
from
.params
import
CSST_PARAMS
as
CP
from
.params
import
CSST_PARAMS
as
CP
...
@@ -262,7 +262,11 @@ class CsstMsDataManager:
...
@@ -262,7 +262,11 @@ class CsstMsDataManager:
def
write_stamp
(
self
):
def
write_stamp
(
self
):
if
self
.
stamps
is
not
None
and
not
self
.
stamps
==
""
:
if
self
.
stamps
is
not
None
and
not
self
.
stamps
==
""
:
with
open
(
self
.
stamps
,
"a+"
)
as
f
:
with
open
(
self
.
stamps
,
"a+"
)
as
f
:
f
.
write
(
f
"
{
time
.
Time
.
now
().
isot
}
\n
"
)
f
.
write
(
f
"
{
time
.
Time
.
now
().
isot
.
replace
(
'.'
,
','
)
}
+0800
\n
"
)
@
staticmethod
def
now
():
return
datetime
.
datetime
.
now
().
strftime
(
'%Y-%m-%d %H:%M:%S'
)
# DFS APIs
# DFS APIs
@
property
@
property
...
...
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