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_gehong
Commits
8b690ff1
Commit
8b690ff1
authored
Oct 11, 2024
by
Shuai Feng
Browse files
add justification of input pars range
parent
168ff730
Pipeline
#6993
passed with stage
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
csst_ifs_gehong/map2d.py
View file @
8b690ff1
...
...
@@ -229,7 +229,8 @@ class Map2d(object):
if
(
mag
>
26
)
or
(
mag
<
8
):
print
(
"Notice: Your input integral magnitude of Sersic mode (mag) is > 26 mag or < 8 mag."
)
if
(
r_eff
<=
0
):
raise
Exception
(
"Effective radius (r_eff) should be > 0 arcsec!"
)
#raise Exception("Effective radius (r_eff) should be > 0 arcsec!")
print
(
"Effective radius (r_eff) should be > 0 arcsec!"
)
if
(
n
<
0
):
raise
Exception
(
"Sersic index (n) should be > 0!"
)
if
(
ellip
>
1
)
or
(
ellip
<
0
):
...
...
@@ -269,11 +270,11 @@ class Map2d(object):
if
(
vmax
<=
0
):
print
(
"Notice: Your input maximum rotational velocity (vmax) is <= 0 km/s!"
)
if
(
rt
<=
0
):
raise
Exception
(
"Turn-over radius (rt) should be > 0 arcsec!"
)
if
(
ellip
>
1
)
or
(
ellip
<
0
):
raise
Exception
(
"Ellipcity (ellip) should be >= 0 and < 1!"
)
if
(
ellip
==
0
):
print
(
"
Notice:
Ellipcity (ellip) should be >= 0 and < 1!"
)
#
raise Exception("Turn-over radius (rt) should be > 0 arcsec!")
print
(
"Turn-over radius (rt) should be > 0 arcsec!"
)
if
(
ellip
>=
1
)
or
(
ellip
<
0
):
#raise Exception("Ellipcity (ellip) should be >= 0 and < 1!")
print
(
"Ellipcity (ellip) should be >= 0 and < 1!"
)
if
(
theta
>
180
)
or
(
theta
<
-
180
):
print
(
"Notice: Your input position angle (theta) is > 180 degree or < -180 degree."
)
...
...
@@ -303,10 +304,10 @@ class Map2d(object):
"""
# Check Input Parameters
if
(
r_eff
<=
0
):
raise
Exception
(
"Effective radius (r_eff) should be > 0 arcsec!"
)
#raise Exception("Effective radius (r_eff) should be > 0 arcsec!")
print
(
"Effective radius (r_eff) should be > 0 arcsec!"
)
if
(
ellip
>
1
)
or
(
ellip
<
0
):
raise
Exception
(
"Ellipcity (ellip) should be >= 0 and < 1!"
)
if
(
ellip
==
0
):
#raise Exception("Ellipcity (ellip) should be >= 0 and < 1!")
print
(
"Notice: Ellipcity (ellip) should be >= 0 and < 1!"
)
if
(
theta
>
180
)
or
(
theta
<
-
180
):
print
(
"Notice: Your input position angle (theta) is > 180 degree or < -180 degree."
)
...
...
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