Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bo Zhang
csst
Commits
1ccdfc65
Commit
1ccdfc65
authored
Mar 03, 2022
by
BO ZHANG
🏀
Browse files
refactored modules
parent
9541ab72
Changes
8
Show whitespace changes
Inline
Side-by-side
csst/common/__init__.py
deleted
100644 → 0
View file @
9541ab72
csst/core/__init__.py
0 → 100644
View file @
1ccdfc65
from
.data
import
CsstData
from
.exception
import
CsstException
from
.processor
import
CsstProcessor
\ No newline at end of file
csst/co
mmon
/data.py
→
csst/co
re
/data.py
View file @
1ccdfc65
...
...
@@ -3,7 +3,7 @@ from collections import OrderedDict
import
astropy.io.fits
as
fits
from
astropy.io.fits
import
HDUList
,
PrimaryHDU
from
csst.co
mmon
.exception
import
CsstException
from
csst.co
re
.exception
import
CsstException
__all__
=
[
"CsstData"
,
"INSTRUMENT_LIST"
]
...
...
csst/co
mmon
/exception.py
→
csst/co
re
/exception.py
View file @
1ccdfc65
File moved
csst/co
mmon
/processor
s
.py
→
csst/co
re
/processor.py
View file @
1ccdfc65
...
...
@@ -15,12 +15,17 @@ class CsstProcStatus(Enum):
# self['runtimeerror'].info = 'This run is exceptionally stopped due to runtime error.'
class
CsstProcessor
(
metaclass
=
ABCMeta
):
def
__init__
(
self
,
**
kwargs
):
pass
@
abstractmethod
def
prepare
(
self
,
**
kwargs
):
pass
@
abstractmethod
def
run
(
self
,
data
):
def
run
(
self
,
kwargs
):
""" """
return
self
.
_status
@
abstractmethod
...
...
csst/msc/data.py
View file @
1ccdfc65
...
...
@@ -2,7 +2,7 @@ from collections import OrderedDict
import
astropy.io.fits
as
fits
from
astropy.io.fits
import
HDUList
,
PrimaryHDU
,
ImageHDU
from
astropy.io.fits.header
import
Header
from
..co
mmon
.data
import
CsstData
,
INSTRUMENT_LIST
from
..co
re
.data
import
CsstData
,
INSTRUMENT_LIST
__all__
=
[
"CsstMscData"
,
"CsstMscImgData"
]
...
...
csst/msc/instrument.py
View file @
1ccdfc65
...
...
@@ -2,7 +2,7 @@ from collections import OrderedDict
from
abc
import
ABCMeta
,
abstractmethod
from
enum
import
Enum
import
numpy
as
np
from
..co
mmon
.processor
s
import
CsstProcStatus
,
CsstProcessor
from
..co
re
.processor
import
CsstProcStatus
,
CsstProcessor
class
CsstMscInstrumentProc
(
CsstProcessor
):
...
...
csst/msc/processor.py
0 → 100644
View file @
1ccdfc65
from
.data
import
CsstMscImgData
from
..core
import
CsstProcessor
class
CsstImgProcL0
(
CsstProcessor
):
def
__init__
(
self
):
super
(
CsstProcessor
,
self
).
__init__
()
def
some_function
(
self
):
pass
\ No newline at end of file
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