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
ef8c4609
Commit
ef8c4609
authored
Jun 01, 2021
by
Fang Yuedong
Browse files
modified fits header etc.
parent
3f932427
Changes
46
Show whitespace changes
Inline
Side-by-side
ObservationSim/__pycache__/Pointing.cpython-38.pyc
View file @
ef8c4609
No preview for this file type
ObservationSim/__pycache__/_util.cpython-38.pyc
View file @
ef8c4609
No preview for this file type
ObservationSim/preprocess.py
View file @
ef8c4609
...
@@ -7,7 +7,6 @@ imgDir = os.path.join(work_dir, config["mockImgDir"])
...
@@ -7,7 +7,6 @@ imgDir = os.path.join(work_dir, config["mockImgDir"])
if
not
os
.
path
.
exists
(
imgDir
):
if
not
os
.
path
.
exists
(
imgDir
):
os
.
system
(
"mkdir %s"
%
imgDir
)
os
.
system
(
"mkdir %s"
%
imgDir
)
# prefix = "MSC_" + config["date_obs"] + "_" + config["time_obs"] + "_"
prefix
=
"MSC_"
prefix
=
"MSC_"
for
pointing_ID
in
range
(
len
(
pRA
)):
for
pointing_ID
in
range
(
len
(
pRA
)):
...
...
ObservationSim/run.pbs
View file @
ef8c4609
...
@@ -12,11 +12,11 @@
...
@@ -12,11 +12,11 @@
#PBS -q batch
#PBS -q batch
#PBS -u fangyuedong
#PBS -u fangyuedong
NP
=
6
0
NP
=
4
0
date
date
echo
$NP
echo
$NP
# mpirun -np $NP --oversubscribe -H comput101 python /public/home/fangyuedong/CSST
_new_framework
/ObservationSim/runExposure.py
# mpirun -np $NP --oversubscribe -H comput101 python /public/home/fangyuedong/CSST/ObservationSim/runExposure.py
python /public/home/fangyuedong/CSST
_new_framework
/ObservationSim/preprocess.py
python /public/home/fangyuedong/CSST/ObservationSim/preprocess.py
mpirun
-np
$NP
python /public/home/fangyuedong/CSST
_new_framework
/ObservationSim/runExposure.py
mpirun
-np
$NP
python /public/home/fangyuedong/CSST/ObservationSim/runExposure.py
ObservationSim/runExposure.py
View file @
ef8c4609
...
@@ -9,16 +9,15 @@ gc.enable()
...
@@ -9,16 +9,15 @@ gc.enable()
#############################################
#############################################
# Testing run one exposure (NOT using MPI)
# Testing run one exposure (NOT using MPI)
ipoint
=
2
#
ipoint = 2
pointRa
=
float
(
'{:8.4f}'
.
format
(
pRA
[
ipoint
]))
#
pointRa = float('{:8.4f}'.format(pRA[ipoint]))
pointDec
=
float
(
'{:8.4f}'
.
format
(
pDEC
[
ipoint
]))
#
pointDec = float('{:8.4f}'.format(pDEC[ipoint]))
cat_dir
=
'point_RA'
+
str
(
pointRa
)
+
'_DE'
+
str
(
pointDec
)
+
'/'
# obs = Observation(work_dir=work_dir, data_dir=data_dir)
obs
=
Observation
(
input_cat_dir
=
cat_dir
,
work_dir
=
work_dir
,
data_dir
=
data_dir
)
# obs.runExposure(ra_cen=pointRa, dec_cen=pointDec, pointing_ID=ipoint, oneChip=16)
obs
=
Observation
(
work_dir
=
work_dir
,
data_dir
=
data_dir
)
obs
.
runExposure
(
ra_cen
=
pointRa
,
dec_cen
=
pointDec
,
pointing_ID
=
ipoint
,
oneChip
=
16
)
#############################################
#############################################
# Testing run pointing list (using MPI)
# Testing run pointing list (using MPI)
# obs = Observation(work_dir=work_dir, data_dir=data_dir)
obs
=
Observation
(
work_dir
=
work_dir
,
data_dir
=
data_dir
)
# obs.runExposure_MPI_PointingList(ra_cen=pRA, dec_cen=pDEC, pRange=pRange)
# obs.runExposure_MPI_PointingList(ra_cen=pRA, dec_cen=pDEC, pRange=pRange, timestamp_obs=timestamp_obs, pointing_type=pointing_type)
obs
.
runExposure_MPI_PointingList
(
ra_cen
=
pRA
,
dec_cen
=
pDEC
,
pRange
=
pRange
,
timestamp_obs
=
timestamp_obs
,
pointing_type
=
pointing_type
,
exptime
=
150.
)
test/ObservationSim.cfg
View file @
ef8c4609
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
##################################################
##################################################
# Observation setting
# Observation setting
date_obs 210
304
# Observation date [yymmdd]
date_obs 210
525
# Observation date [yymmdd]
time_obs
093
000 # Observation time [hhmmss]
time_obs
120
000 # Observation time [hhmmss]
ra_center 60.0 # Telesscope pointing center [degree] (Default)
ra_center 60.0 # Telesscope pointing center [degree] (Default)
dec_center -40.0
dec_center -40.0
psf_rcont 0.15,0.8 # Radius of the 80% flux concentration (for a Gaussian PSF)
psf_rcont 0.15,0.8 # Radius of the 80% flux concentration (for a Gaussian PSF)
...
@@ -30,15 +30,16 @@ abs_back y # Y: add sky background + sky noise & dark
...
@@ -30,15 +30,16 @@ abs_back y # Y: add sky background + sky noise & dark
# N: only add sky noise and dark noise
# N: only add sky noise and dark noise
add_bias y # Y/N: Whether to add bias-level to image
add_bias y # Y/N: Whether to add bias-level to image
shutter_effect y # Y/N: Whether to apply shutter effect
shutter_effect y # Y/N: Whether to apply shutter effect
shutter_output
y
# Y/N: Whether to export shutter effect 16-bit image (<=65535)
shutter_output
n
# Y/N: Whether to export shutter effect 16-bit image (<=65535)
flat_fielding y # Y/N: Whether to add flat-fielding effect
flat_fielding y # Y/N: Whether to add flat-fielding effect
bias_output y # Y/N: Whether to export bias frames
bias_output y # Y/N: Whether to export bias frames
dark_output y # Y/N: Whether to export the combined dark current file
dark_output y # Y/N: Whether to export the combined dark current file
flat_output y # Y/N: Whether to export the combined flat-field file
flat_output y # Y/N: Whether to export the combined flat-field file
prnu_effect y # Y/N: Whether to apply PRNU effect
prnu_effect y # Y/N: Whether to apply PRNU effect
prnu_output
y
# Y/N: Whether to export the PRNU (pixel-to-pixel flat-fielding) file
prnu_output
n
# Y/N: Whether to export the PRNU (pixel-to-pixel flat-fielding) file
non_linear
y
# Y/N: Whether to apply non-linearity
non_linear
n
# Y/N: Whether to apply non-linearity
cosmic_ray y # Y/N: Whether to add cosmic-ray
cosmic_ray y # Y/N: Whether to add cosmic-ray
cray_differ y # Y/N: Different cosmic-ray for calibration files or not
cte_trail y # Y/N: Whether to simulate CTE trails
cte_trail y # Y/N: Whether to simulate CTE trails
saturbloom y # Y/N: Whether to simulate Saturation and Blooming
saturbloom y # Y/N: Whether to simulate Saturation and Blooming
add_badcolumns y # Y/N: Whether to add bad columns
add_badcolumns y # Y/N: Whether to add bad columns
...
@@ -50,9 +51,11 @@ df_strength 2.3 # Sillicon sensor diffusion strength
...
@@ -50,9 +51,11 @@ df_strength 2.3 # Sillicon sensor diffusion strength
bias_level 500 # e-/pixel
bias_level 500 # e-/pixel
gain 1.1 # Gain
gain 1.1 # Gain
full_well 90000 # Full well level [e-]
full_well 90000 # Full well level [e-]
NBias 10 # number of frames to be exported
NBias 1 # Number of frames to be exported
NDark 10 # number of frames to be exported
NDark 1 # Number of frames to be exported
NFlat 10 # number of frames to be exported
NFlat 1 # Number of frames to be exported
dark_exptime 300 # Exposure time for dark current frame
flat_exptime 150 # Exposure time for flat field frame
#===========================================================
#===========================================================
# Shear method
# Shear method
...
...
Prev
1
2
3
Next
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