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
Fang Yuedong
injection_pipeline
Commits
5617dc34
Commit
5617dc34
authored
Mar 25, 2024
by
Fang Yuedong
Browse files
add run_csst_msc_instrument.py rearrange config into image module
parent
ff118a41
Changes
7
Hide whitespace changes
Inline
Side-by-side
measurement_pipeline/L1_pipeline/csst_msc_instrument/csst_msc_mbi_instrument.py
View file @
5617dc34
...
@@ -11,7 +11,7 @@ Modified-History:
...
@@ -11,7 +11,7 @@ Modified-History:
from
datetime
import
datetime
from
datetime
import
datetime
from
typing
import
Optional
from
typing
import
Optional
import
csst_common
#
import csst_common
import
numpy
as
np
import
numpy
as
np
from
itertools
import
product
from
itertools
import
product
from
astropy.io
import
fits
from
astropy.io
import
fits
...
@@ -23,7 +23,7 @@ from astropy.stats import sigma_clipped_stats
...
@@ -23,7 +23,7 @@ from astropy.stats import sigma_clipped_stats
# subtract_dark,
# subtract_dark,
# FlagConfig,
# FlagConfig,
# )
# )
from
csst_msc_instrument.image
import
(
from
L1_pipeline.
csst_msc_instrument.image
import
(
subtract_bias
,
subtract_bias
,
subtract_dark
,
subtract_dark
,
FlagConfig
,
FlagConfig
,
...
@@ -46,7 +46,7 @@ def core_msc_l1_mbi_instrument(
...
@@ -46,7 +46,7 @@ def core_msc_l1_mbi_instrument(
config_ccd_info
:
Optional
[
str
]
=
None
,
config_ccd_info
:
Optional
[
str
]
=
None
,
config_bad_pixel
:
Optional
[
str
]
=
None
,
config_bad_pixel
:
Optional
[
str
]
=
None
,
device
:
Optional
[
str
]
=
"CPU"
,
device
:
Optional
[
str
]
=
"CPU"
,
)
#-> CsstResult:
)
:
#-> CsstResult:
"""
"""
Make the instrument correction for one chip of CSST data.
Make the instrument correction for one chip of CSST data.
...
...
measurement_pipeline/L1_pipeline/csst_msc_instrument/image/__init__.py
View file @
5617dc34
...
@@ -13,5 +13,8 @@ from .basic import subtract_bias, subtract_dark
...
@@ -13,5 +13,8 @@ from .basic import subtract_bias, subtract_dark
from
.crosstalk
import
remove_crosstalk
from
.crosstalk
import
remove_crosstalk
from
.gain
import
apply_gain
from
.gain
import
apply_gain
from
.overscan
import
correct_overscan
from
.overscan
import
correct_overscan
from
.config
import
FlagConfig
,
CameraConfig
,
CCDArrayConfig
,
get_array_config
from
.format
import
convert_format
__all__
=
[
'correct_overscan'
,
'apply_gain'
,
'subtract_bias'
,
'remove_crosstalk'
,
'subtract_dark'
,
]
__all__
=
[
'correct_overscan'
,
'apply_gain'
,
'subtract_bias'
,
'remove_crosstalk'
,
'subtract_dark'
,
\ No newline at end of file
'FlagConfig'
,
'CameraConfig'
,
'CCDArrayConfig'
,
'get_array_config'
,
'convert_format'
,
]
\ No newline at end of file
measurement_pipeline/L1_pipeline/csst_msc_instrument/config.py
→
measurement_pipeline/L1_pipeline/csst_msc_instrument/
image/
config.py
View file @
5617dc34
File moved
measurement_pipeline/L1_pipeline/csst_msc_instrument/format.py
→
measurement_pipeline/L1_pipeline/csst_msc_instrument/
image/
format.py
View file @
5617dc34
File moved
measurement_pipeline/L1_pipeline/csst_msc_instrument/image/gain.py
View file @
5617dc34
...
@@ -11,7 +11,7 @@ Modified-History:
...
@@ -11,7 +11,7 @@ Modified-History:
import
numpy
as
np
import
numpy
as
np
from
.
.config
import
get_array_config
from
.config
import
get_array_config
__all__
=
[
'apply_gain'
,
'make_gainmap_from_channel_value'
,
]
__all__
=
[
'apply_gain'
,
'make_gainmap_from_channel_value'
,
]
...
...
measurement_pipeline/L1_pipeline/csst_msc_instrument/image/overscan.py
View file @
5617dc34
...
@@ -18,7 +18,7 @@ from scipy.special import erf
...
@@ -18,7 +18,7 @@ from scipy.special import erf
from
scipy.stats
import
trim_mean
,
t
,
sigmaclip
from
scipy.stats
import
trim_mean
,
t
,
sigmaclip
from
astropy.stats
import
mad_std
,
sigma_clip
from
astropy.stats
import
mad_std
,
sigma_clip
from
.
.config
import
get_array_config
from
.config
import
get_array_config
__all__
=
[
"average_overscan"
,
"smooth_overscan"
,
"correct_overscan"
,
]
__all__
=
[
"average_overscan"
,
"smooth_overscan"
,
"correct_overscan"
,
]
...
...
measurement_pipeline/run_csst_msc_instrument.py
0 → 100644
View file @
5617dc34
from
L1_pipeline.csst_msc_instrument.csst_msc_mbi_instrument
import
core_msc_l1_mbi_instrument
# core_msc_l1_mbi_instrument(
# image_path=r"D:\Zhou\Desktop\data\data_09.fits",
# bias_path=r"D:\Zhou\Desktop\data\bias_09.fits",
# dark_path=r"D:\Zhou\Desktop\data\dark_09.fits",
# flat_path=r"D:\Zhou\Desktop\data\flat_09.fits",
# shutter_path=r"D:\Zhou\Desktop\data\csst_msc_ms_shutter_09_000001.fits",
# image_output_path=r"D:\Zhou\Desktop\data\result\image_test_output.fits",
# weight_output_path=r"D:\Zhou\Desktop\data\result\weight_test_output.fits",
# flag_output_path=r"D:\Zhou\Desktop\data\result\flag_test_output.fits",
# )
\ 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