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
59153d14
Commit
59153d14
authored
May 02, 2024
by
JX
😵
Browse files
Merge remote-tracking branch 'origin/develop'
parents
885d85b2
5c59486a
Pipeline
#4323
passed with stage
in 0 seconds
Changes
6
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
ObservationSim/Straylight/lib/PST
100755 → 100644
View file @
59153d14
This diff is collapsed.
Click to expand it.
ObservationSim/sim_steps/add_objects.py
View file @
59153d14
...
@@ -206,6 +206,12 @@ def add_objects(self, chip, filt, tel, pointing, catalog, obs_param):
...
@@ -206,6 +206,12 @@ def add_objects(self, chip, filt, tel, pointing, catalog, obs_param):
except
Exception
as
e
:
except
Exception
as
e
:
traceback
.
print_exc
()
traceback
.
print_exc
()
self
.
chip_output
.
Log_error
(
e
)
self
.
chip_output
.
Log_error
(
e
)
self
.
chip_output
.
Log_error
(
"pointing: #%d, chipID: %d"
%
(
pointing
.
id
,
chip
.
chipID
))
if
obj
.
type
==
"galaxy"
:
self
.
chip_output
.
Log_error
(
"obj id: %s"
%
(
obj
.
param
[
'id'
]))
self
.
chip_output
.
Log_error
(
" e1: %.5f
\n
e2: %.5f
\n
size: %f
\n
bfrac: %f
\n
detA: %f
\n
g1: %.5f
\n
g2: %.5f
\n
"
%
(
obj
.
param
[
'e1'
],
obj
.
param
[
'e2'
],
obj
.
param
[
'size'
],
obj
.
param
[
'bfrac'
],
obj
.
param
[
'detA'
],
obj
.
param
[
'g1'
],
obj
.
param
[
'g2'
]))
# Unload SED:
# Unload SED:
obj
.
unload_SED
()
obj
.
unload_SED
()
...
...
ObservationSim/sim_steps/readout_output.py
View file @
59153d14
...
@@ -82,17 +82,16 @@ def quantization_and_output(self, chip, filt, tel, pointing, catalog, obs_param)
...
@@ -82,17 +82,16 @@ def quantization_and_output(self, chip, filt, tel, pointing, catalog, obs_param)
hdu1
=
fits
.
PrimaryHDU
(
header
=
self
.
h_prim
)
hdu1
=
fits
.
PrimaryHDU
(
header
=
self
.
h_prim
)
hdu1
.
add_checksum
()
hdu1
.
header
.
comments
[
'CHECKSUM'
]
=
'HDU checksum'
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'DATASECT'
],
values
=
[
str
(
chip
.
img
.
array
.
shape
[
1
])
+
'x'
+
str
(
chip
.
img
.
array
.
shape
[
0
])])
hdu1
.
header
.
comments
[
'DATASUM'
]
=
'data unit checksum'
self
.
updateHeaderInfo
(
header_flag
=
'ext'
,
keys
=
[
'DATASECT'
],
values
=
[
str
(
chip
.
img
.
array
.
shape
[
1
])
+
'x'
+
str
(
chip
.
img
.
array
.
shape
[
0
])])
hdu2
=
fits
.
ImageHDU
(
chip
.
img
.
array
,
header
=
self
.
h_ext
)
hdu2
=
fits
.
ImageHDU
(
chip
.
img
.
array
,
header
=
self
.
h_ext
)
hdu2
.
add_checksum
()
hdu2
.
header
.
comments
[
'XTENSION'
]
=
'extension type'
hdu2
.
header
.
comments
[
'CHECKSUM'
]
=
'HDU checksum'
hdu2
.
header
.
comments
[
'DATASUM'
]
=
'data unit checksum'
hdu2
.
header
.
comments
[
"XTENSION"
]
=
"image extension"
hdu2
.
header
.
comments
[
"XTENSION"
]
=
"image extension"
hdu1
=
fits
.
HDUList
([
hdu1
,
hdu2
])
hdu1
.
writeto
(
fname
,
output_verify
=
'ignore'
,
overwrite
=
True
)
hdu
=
fits
.
HDUList
([
hdu1
,
hdu2
])
hdu
[
0
].
add_datasum
(
when
=
'data unit checksum'
)
hdu
[
0
].
add_checksum
(
when
=
'HDU checksum'
,
override_datasum
=
True
)
hdu
[
1
].
add_datasum
(
when
=
'data unit checksum'
)
hdu
[
1
].
add_checksum
(
when
=
'HDU checksum'
,
override_datasum
=
True
)
hdu
.
writeto
(
fname
,
output_verify
=
'ignore'
,
overwrite
=
True
)
return
chip
,
filt
,
tel
,
pointing
return
chip
,
filt
,
tel
,
pointing
config/config_overall.yaml
View file @
59153d14
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
# can add some of the command-line arguments here as well;
# can add some of the command-line arguments here as well;
# ok to pass either way or both, as long as they are consistent
# ok to pass either way or both, as long as they are consistent
work_dir
:
"
/public/home/fangyuedong/project/workplace/"
work_dir
:
"
/public/home/fangyuedong/project/workplace/"
run_name
:
"
magnification
_test"
run_name
:
"
no_nonlinearity
_test"
# Project cycle and run counter are used to name the outputs
# Project cycle and run counter are used to name the outputs
project_cycle
:
9
project_cycle
:
9
...
@@ -32,11 +32,13 @@ run_option:
...
@@ -32,11 +32,13 @@ run_option:
catalog_options
:
catalog_options
:
input_path
:
input_path
:
cat_dir
:
"
/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/"
cat_dir
:
"
/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/"
star_cat
:
"
starcat/"
# star_cat: "starcat/"
star_cat
:
"
starcat_C9/"
galaxy_cat
:
"
qsocat/cat2CSSTSim_bundle-50sqDeg/"
galaxy_cat
:
"
qsocat/cat2CSSTSim_bundle-50sqDeg/"
SED_templates_path
:
SED_templates_path
:
star_SED
:
"
/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/SpecLib.hdf5"
# star_SED: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/SpecLib.hdf5"
star_SED
:
"
/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/starcat_C9/"
galaxy_SED
:
"
/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/sedlibs/"
galaxy_SED
:
"
/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/sedlibs/"
AGN_SED
:
"
/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/qsocat/qsosed/"
AGN_SED
:
"
/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/qsocat/qsosed/"
...
@@ -44,7 +46,7 @@ catalog_options:
...
@@ -44,7 +46,7 @@ catalog_options:
star_only
:
NO
star_only
:
NO
# Only simulate galaxies?
# Only simulate galaxies?
galaxy_only
:
YES
galaxy_only
:
NO
# rotate galaxy ellipticity
# rotate galaxy ellipticity
rotateEll
:
0.
# [degree]
rotateEll
:
0.
# [degree]
...
@@ -57,7 +59,8 @@ obs_setting:
...
@@ -57,7 +59,8 @@ obs_setting:
# if you just want to run default pointing:
# if you just want to run default pointing:
# - pointing_dir: null
# - pointing_dir: null
# - pointing_file: null
# - pointing_file: null
pointing_file
:
"
/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/pointing50_C9/pointing_50_1_n.dat"
# pointing_file: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/pointing50_C9/pointing_50_1_n.dat"
pointing_file
:
"
/public/home/fangyuedong/project/unit_test_data/pointing_for_test.dat"
obs_config_file
:
"
/public/home/fangyuedong/project/csst_msc_sim/config/obs_config_SCI_WIDE_phot.yaml"
obs_config_file
:
"
/public/home/fangyuedong/project/csst_msc_sim/config/obs_config_SCI_WIDE_phot.yaml"
...
@@ -65,7 +68,7 @@ obs_setting:
...
@@ -65,7 +68,7 @@ obs_setting:
# - give a list of indexes of pointings: [ip_1, ip_2...]
# - give a list of indexes of pointings: [ip_1, ip_2...]
# - run all pointings: null
# - run all pointings: null
# Note: only valid when a pointing list is specified
# Note: only valid when a pointing list is specified
run_pointings
:
[
0
]
run_pointings
:
[
1
]
# Whether to enable astrometric modeling
# Whether to enable astrometric modeling
enable_astrometric_model
:
True
enable_astrometric_model
:
True
...
...
config/obs_config_SCI_WIDE_phot.yaml
View file @
59153d14
...
@@ -16,7 +16,7 @@ obs_id: "00000001" # this setting will only be used if pointing list file is not
...
@@ -16,7 +16,7 @@ obs_id: "00000001" # this setting will only be used if pointing list file is not
# Define list of chips
# Define list of chips
# run_chips: [6,7,8,9,11,12,13,14,15,16,17,18,19,20,22,23,24,25]
# run_chips: [6,7,8,9,11,12,13,14,15,16,17,18,19,20,22,23,24,25]
#run_chips: [1,2,3,4,5,10,21,26,27,28,29,30]
#run_chips: [1,2,3,4,5,10,21,26,27,28,29,30]
run_chips
:
[
8
]
run_chips
:
[
9
]
# Define observation sequence
# Define observation sequence
call_sequence
:
call_sequence
:
...
...
run_C6.pbs
View file @
59153d14
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
#SBATCH -J CSSTSim
#SBATCH -J CSSTSim
#SBATCH -N 1
#SBATCH -N 1
#SBATCH --ntasks-per-node=
40
#SBATCH --ntasks-per-node=
6
#SBATCH -p debug
#SBATCH -p debug
#SBATCH --mem=
24
0G
#SBATCH --mem=
6
0G
module load mpi/hpcx/2.4.1/gcc-7.3.1
module load mpi/hpcx/2.4.1/gcc-7.3.1
date
date
...
@@ -12,4 +12,4 @@ date
...
@@ -12,4 +12,4 @@ date
#限定单节点任务数
#限定单节点任务数
srun
hostname
-s
|
sort
-n
|
awk
-F
"-"
'{print $2}'
|
uniq
>
pnodes
srun
hostname
-s
|
sort
-n
|
awk
-F
"-"
'{print $2}'
|
uniq
>
pnodes
mpirun
-mca
pml ucx
-x
UCX_NET_DEVICES
=
mlx5_0:1
-machinefile
pnodes
-np
40
--map-by
node python3 /public/home/fangyuedong/project/csst_msc_sim/run_sim.py
--config_file
config_overall.yaml
--catalog
C6_50sqdeg
-c
/public/home/fangyuedong/project/csst_msc_sim/config
mpirun
-mca
pml ucx
-x
UCX_NET_DEVICES
=
mlx5_0:1
-machinefile
pnodes
-np
6
--map-by
node python3 /public/home/fangyuedong/project/csst_msc_sim/run_sim.py
--config_file
config_overall.yaml
--catalog
C6_50sqdeg_ns
-c
/public/home/fangyuedong/project/csst_msc_sim/config
\ No newline at end of file
\ No newline at end of file
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