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_msc_sim
Commits
7dcab00e
Commit
7dcab00e
authored
Jan 21, 2025
by
Zhang Xin
Browse files
fig bug: large mermory in the model FlatLED
parent
a4587b61
Pipeline
#7816
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
observation_sim/mock_objects/FlatLED.py
View file @
7dcab00e
...
...
@@ -75,7 +75,7 @@ class FlatLED(MockObject):
ledflats
=
bandtoLed
[
self
.
chip
.
filter_type
]
iFlat
=
np
.
zeros
([
self
.
chip
.
npix_y
,
self
.
chip
.
npix_x
])
for
nled
in
ledflats
:
iFlat
=
iFlat
+
self
.
getLEDImage
(
led_type
=
nled
,
LED_Img_flag
=
False
)
iFlat
=
iFlat
+
self
.
getLEDImage
1
(
led_type
=
nled
,
LED_Img_flag
=
False
)
iFlat
=
iFlat
/
len
(
ledflats
)
return
iFlat
...
...
@@ -123,7 +123,7 @@ class FlatLED(MockObject):
# return LED flat, e/s
###
def
getLEDImage1
(
self
,
led_type
=
'LED1'
):
def
getLEDImage1
(
self
,
led_type
=
'LED1'
,
LED_Img_flag
=
True
):
# cwave = cwaves[led_type]
flat
=
fits
.
open
(
os
.
path
.
join
(
self
.
flatDir
,
'model_'
+
cwaves_name
[
led_type
]
+
'nm.fits'
))
...
...
@@ -155,6 +155,8 @@ class FlatLED(MockObject):
N
[
0
:
self
.
chip
.
npix_y
,
0
:
self
.
chip
.
npix_x
]),
method
=
'linear'
)
U
=
U
/
np
.
mean
(
U
)
flatImage
=
U
if
LED_Img_flag
:
flatImage
=
U
*
fluxLED
[
led_type
]
*
1000
gc
.
collect
()
return
flatImage
...
...
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