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
8fd9723d
Commit
8fd9723d
authored
Oct 26, 2024
by
Wei Chengliang
Browse files
update codestyle-PEP8
parent
9a4dead8
Pipeline
#7110
failed with stage
in 0 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
observation_sim/instruments/FilterParam.py
View file @
8fd9723d
...
...
@@ -25,7 +25,7 @@ class FilterParam(object):
# 6) sky background: e/pix/s
# 7) saturation magnitude
# 8) dim end magnitude
if
filter_param
==
None
:
if
filter_param
is
None
:
filtP
=
{
"NUV"
:
[
2867.7
,
705.4
,
2470.0
,
3270.0
,
0.1404
,
0.004
,
15.7
,
25.4
],
"u"
:
[
3601.1
,
852.1
,
3120.0
,
4090.0
,
0.2176
,
0.021
,
16.1
,
25.4
],
...
...
observation_sim/instruments/FocalPlane.py
View file @
8fd9723d
...
...
@@ -9,7 +9,7 @@ class FocalPlane(object):
self
.
nchips
=
42
self
.
ignore_chips
=
[]
if
bad_chips
==
None
:
if
bad_chips
is
None
:
self
.
bad_chips
=
[]
else
:
self
.
bad_chips
=
bad_chips
...
...
@@ -80,7 +80,7 @@ class FocalPlane(object):
if
logger
is
not
None
:
logger
.
info
(
" Construct the wcs of the entire image mosaic using Gnomonic/TAN projection"
)
if
(
xcen
==
None
)
or
(
ycen
==
None
):
if
(
xcen
is
None
)
or
(
ycen
is
None
):
xcen
=
self
.
cen_pix_x
ycen
=
self
.
cen_pix_y
...
...
observation_sim/instruments/_util.py
View file @
8fd9723d
...
...
@@ -46,7 +46,7 @@ def photonEnergy(lambd):
def
calculateLimitMag
(
aperture
=
2.0
,
psf_fwhm
=
0.1969
,
pixelSize
=
0.074
,
pmRation
=
0.8
,
throughputFn
=
'i_throughput.txt'
,
readout
=
5.0
,
skyFn
=
'sky_emiss_hubble_50_50_A.dat'
,
darknoise
=
0.02
,
exTime
=
150
,
exNum
=
1
,
fw
=
90000
):
'''
description:
description:
param {*} aperture: unit m, default 2 m
param {*} psf_fwhm: psf fwhm, default 0.1969"
param {*} pixelSize: pixel size, default 0.074"
...
...
observation_sim/instruments/chip/Chip.py
View file @
8fd9723d
...
...
@@ -191,7 +191,7 @@ class Chip(FocalPlane):
"""Return the filter index and type for a given chip #(chipID)
"""
filter_type_list
=
_util
.
ALL_FILTERS
if
chipID
==
None
:
if
chipID
is
None
:
chipID
=
self
.
chipID
# updated configurations
...
...
observation_sim/instruments/chip/chip_utils.py
View file @
8fd9723d
...
...
@@ -206,7 +206,7 @@ def get_poisson(seed=0, sky_level=0.):
def
get_base_img
(
img
,
chip
,
read_noise
,
readout_time
,
dark_noise
,
exptime
=
150.
,
InputDark
=
None
):
if
InputDark
==
None
:
if
InputDark
is
None
:
# base_level = read_noise**2 + dark_noise*(exptime+0.5*readout_time)
# base_level = dark_noise*(exptime+0.5*readout_time)
base_level
=
dark_noise
*
(
exptime
)
...
...
@@ -237,7 +237,7 @@ def add_poisson(img, chip, exptime=150., seed=0, sky_level=0., poisson_noise=Non
img
.
addNoise
(
poisson_noise
)
# img -= read_noise**2
if
InputDark
!=
None
:
if
InputDark
is
not
None
:
# "Instrument/data/dark/dark_1000s_example_0.fits"
hdu
=
fits
.
open
(
InputDark
)
img
+=
hdu
[
0
].
data
/
hdu
[
0
].
header
[
'exptime'
]
*
exptime
...
...
observation_sim/sim_steps/add_pattern_noise.py
View file @
8fd9723d
...
...
@@ -80,6 +80,6 @@ def add_bias(self, chip, filt, tel, pointing, catalog, obs_param):
nsecy
=
chip
.
nsecy
,
nsecx
=
chip
.
nsecx
,
seed
=
self
.
overall_config
[
"random_seeds"
][
"seed_biasNonUniform"
]
+
chip
.
chipID
)
elif
obs_param
[
"bias_16channel"
]
==
False
:
elif
obs_param
[
"bias_16channel"
]
is
False
:
chip
.
img
+=
chip
.
bias_level
return
chip
,
filt
,
tel
,
pointing
run_sim.py
View file @
8fd9723d
...
...
@@ -18,7 +18,7 @@ def run_sim():
Parameters
----------
Catalog : Class
a catalog class which is inherited from observation_sim.mock_objects.CatalogBase
a catalog class which is inherited from observation_sim.mock_objects.CatalogBase
Returns
----------
...
...
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