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
csst-sims
csst_ifs_sim
Commits
27ac668d
Commit
27ac668d
authored
Apr 10, 2024
by
Yan Zhaojun
Browse files
update setup.py
parent
a6e7e9e7
Pipeline
#3968
failed with stage
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
csst_ifs_sim/csst_ifs_sim.py
View file @
27ac668d
...
@@ -1267,6 +1267,8 @@ class IFSsimulator():
...
@@ -1267,6 +1267,8 @@ class IFSsimulator():
# self.log.info('Reading in cosmic ray information from %s and %s' % (self.information['cosmicraylengths'],
# self.log.info('Reading in cosmic ray information from %s and %s' % (self.information['cosmicraylengths'],
# self.information['cosmicraydistance']))
# self.information['cosmicraydistance']))
print
(
self
.
information
)
print
(
self
.
information
)
print
(
self
.
dir_path
)
crLengths
=
np
.
loadtxt
(
crLengths
=
np
.
loadtxt
(
self
.
information
[
'dir_path'
]
+
self
.
information
[
'cosmicraylengths'
])
self
.
information
[
'dir_path'
]
+
self
.
information
[
'cosmicraylengths'
])
crDists
=
np
.
loadtxt
(
crDists
=
np
.
loadtxt
(
...
@@ -4101,6 +4103,8 @@ class IFSsimulator():
...
@@ -4101,6 +4103,8 @@ class IFSsimulator():
self
.
log
.
error
(
'Error in datacube, negative values !!!!!!!'
)
self
.
log
.
error
(
'Error in datacube, negative values !!!!!!!'
)
continue
continue
##############################################################################
##############################################################################
# if ilam==100:
# if ilam==100:
# fits.writeto('/media/yan//IFSsim/IFSsim Data/original_Img.fits', Nimg, overwrite=True)
# fits.writeto('/media/yan//IFSsim/IFSsim Data/original_Img.fits', Nimg, overwrite=True)
...
...
ifs_data/IFS_sim_C90.config
View file @
27ac668d
...
@@ -6,9 +6,9 @@ CCDy = 0
...
@@ -6,9 +6,9 @@ CCDy = 0
CCDxgap
=
1
.
643
CCDxgap
=
1
.
643
CCDygap
=
8
.
116
CCDygap
=
8
.
116
sky_fitsin
=
../
IFS_data
/
FengshuaiData
/
NGC6397_S6102
.
fits
sky_fitsin
=
IFS_data
/
FengshuaiData
/
NGC6397_S6102
.
fits
result_path
=
../
ifs_sim_result
result_path
=
ifs_sim_result
### simulation software version
### simulation software version
...
@@ -103,7 +103,9 @@ cosmeticsFile_r =IFS_inputdata/Cosmetics_r.txt
...
@@ -103,7 +103,9 @@ cosmeticsFile_r =IFS_inputdata/Cosmetics_r.txt
###comicray information file
###comicray information file
cosmicraylengths
=
IFS_inputdata
/
cdf_cr_length
.
dat
cosmicraylengths
=
IFS_inputdata
/
cdf_cr_length
.
dat
cosmicraydistance
=
IFS_inputdata
/
cdf_cr_total
.
dat
cosmicraydistance
=
IFS_inputdata
/
cdf_cr_total
.
dat
#apply multiplicative flatfield (to emulate pixel-to-pixel non-uniformity)?
#apply multiplicative flatfield (to emulate pixel-to-pixel non-uniformity)?
...
...
tests/test_ifs_sim.py
View file @
27ac668d
...
@@ -36,6 +36,10 @@ class TestDemoFunction(unittest.TestCase):
...
@@ -36,6 +36,10 @@ class TestDemoFunction(unittest.TestCase):
configfile
=
dir_path
+
'IFS_data/IFS_sim_C90.config'
configfile
=
dir_path
+
'IFS_data/IFS_sim_C90.config'
skyfitsin
=
dir_path
+
'IFS_inputdata/FengshuaiData/NGC6397_S6102.fits'
skyfitsin
=
dir_path
+
'IFS_inputdata/FengshuaiData/NGC6397_S6102.fits'
sourcein
=
'SCI'
sourcein
=
'SCI'
print
(
configfile
)
print
(
skyfitsin
)
csst_ifs_sim
.
runIFSsim
(
sourcein
,
skyfitsin
,
configfile
,
1
,
'no'
)
csst_ifs_sim
.
runIFSsim
(
sourcein
,
skyfitsin
,
configfile
,
1
,
'no'
)
self
.
assertEqual
(
self
.
assertEqual
(
1
,
1
,
1
,
1
,
...
...
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