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
Zhang Xin
Sls 1d Spec
Commits
7231bb80
Commit
7231bb80
authored
2 years ago
by
xin
Browse files
Options
Download
Email Patches
Plain Diff
add out information
parent
0b2605c1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
SpecGen/SpecGenerator.py
+8
-4
SpecGen/SpecGenerator.py
SpecWindow/specWin.py
+1
-1
SpecWindow/specWin.py
with
9 additions
and
5 deletions
+9
-5
SpecGen/SpecGenerator.py
+
8
-
4
View file @
7231bb80
...
...
@@ -185,13 +185,15 @@ class SpecGenerator(object):
Aimg_cal
=
Aimg_
[
y_cent_pos
-
y_range
:
y_cent_pos
+
y_range
+
1
,
specRangeImg
]
ids
=
Aimg_cal
>
self
.
saturation
#1. saturation pixel number, 2. total pixel number, 3 saturation ratio, 4.flux ratio in photo aperture
saturePix
=
[
0
,
0
,
0
,
0
]
#1. saturation pixel number, 2. total pixel number, 3 saturation ratio, 4.flux ratio in photo aperture
,5.max value,6.min value
saturePix
=
np
.
zeros
(
6
)
saturePix
[
0
]
=
Aimg_cal
[
ids
].
shape
[
0
]
saturePix
[
1
]
=
Aimg_cal
.
shape
[
0
]
*
Aimg_cal
.
shape
[
1
]
saturePix
[
2
]
=
saturePix
[
0
]
/
saturePix
[
1
]
saturePix
[
3
]
=
fluxRatio
saturePix
[
4
]
=
np
.
amax
(
Aimg_cal
)
saturePix
[
5
]
=
np
.
amin
(
Aimg_cal
)
idx
=
(
wave_pix
>=
bRange
[
0
]
-
100
)
idx1
=
(
wave_pix
[
idx
]
<=
bRange
[
1
]
+
100
)
...
...
@@ -308,13 +310,15 @@ class SpecGenerator(object):
Aimg_cal
=
Aimg_
[
y_cent_pos
-
y_range
:
y_cent_pos
+
y_range
+
1
,
specRangeImg
]
ids
=
Aimg_cal
>
self
.
saturation
#1. saturation pixel number, 2. total pixel number, 3 saturation ratio, 4.flux ratio in photo aperture
saturePix
=
[
0
,
0
,
0
,
0
]
#1. saturation pixel number, 2. total pixel number, 3 saturation ratio, 4.flux ratio in photo aperture
,5.max value,6.min value
saturePix
=
np
.
zeros
(
6
)
saturePix
[
0
]
=
Aimg_cal
[
ids
].
shape
[
0
]
saturePix
[
1
]
=
Aimg_cal
.
shape
[
0
]
*
Aimg_cal
.
shape
[
1
]
saturePix
[
2
]
=
saturePix
[
0
]
/
saturePix
[
1
]
saturePix
[
3
]
=
fluxRatio
saturePix
[
4
]
=
np
.
amax
(
Aimg_cal
)
saturePix
[
5
]
=
np
.
amin
(
Aimg_cal
)
idx
=
(
wave_pix
>=
bRange
[
0
]
-
100
)
idx1
=
(
wave_pix
[
idx
]
<=
bRange
[
1
]
+
100
)
...
...
This diff is collapsed.
Click to expand it.
SpecWindow/specWin.py
+
1
-
1
View file @
7231bb80
...
...
@@ -423,7 +423,7 @@ class Example(QMainWindow):
g_q
=
float
(
self
.
gqText
.
text
())
specTab
,
specImg
,
img
,
sutPix
=
specG
.
generateSpec1dforGal
(
s_n
=
g_sn
,
re
=
g_re
,
pa
=
g_pa
,
q_ell
=
g_q
,
limitfluxratio
=
0.8
)
self
.
outinfo
.
setText
(
'saturation: 90000 e- , saturation pixel number: %d, total pixel number: %d, saturation ratio: %f'
%
(
sutPix
[
0
],
sutPix
[
1
],
sutPix
[
2
]))
self
.
outinfo
.
setText
(
'saturation: 90000 e- , saturation pixel number: %d, total pixel number: %d, saturation ratio: %f
, pixel value maximun: %d e-, pixel value minimum: %d e-
'
%
(
sutPix
[
0
],
sutPix
[
1
],
sutPix
[
2
]
,
sutPix
[
4
],
sutPix
[
5
]
))
# self.outinfo.adjustSize()
spec_orig
=
np
.
loadtxt
(
sedFn
)
...
...
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