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
fb74fc22
Commit
fb74fc22
authored
Apr 20, 2024
by
Wei Chengliang
Browse files
update path of the test-data
parent
bc0fccab
Changes
5
Hide whitespace changes
Inline
Side-by-side
tests/test_BF_CTE.py
View file @
fb74fc22
...
@@ -80,7 +80,7 @@ class detModule_coverage(unittest.TestCase):
...
@@ -80,7 +80,7 @@ class detModule_coverage(unittest.TestCase):
def
__init__
(
self
,
methodName
=
'runTest'
):
def
__init__
(
self
,
methodName
=
'runTest'
):
super
(
detModule_coverage
,
self
).
__init__
(
methodName
)
super
(
detModule_coverage
,
self
).
__init__
(
methodName
)
##self.dataPath = "/public/home/chengliang/CSSOSDataProductsSims/csst-simulation/tests/UNIT_TEST_DATA" ##os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_gc1')
##self.dataPath = "/public/home/chengliang/CSSOSDataProductsSims/csst-simulation/tests/UNIT_TEST_DATA" ##os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_fz_gc1')
self
.
dataPath
=
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_fz_msc'
)
self
.
dataPath
=
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_
msc_sim/csst_
fz_msc'
)
self
.
iccd
=
1
self
.
iccd
=
1
...
...
tests/test_PSFmodule.py
View file @
fb74fc22
...
@@ -39,7 +39,7 @@ def defineFilt(chip):
...
@@ -39,7 +39,7 @@ def defineFilt(chip):
class
PSFInterpModule_coverage
(
unittest
.
TestCase
):
class
PSFInterpModule_coverage
(
unittest
.
TestCase
):
def
__init__
(
self
,
methodName
=
'runTest'
):
def
__init__
(
self
,
methodName
=
'runTest'
):
super
(
PSFInterpModule_coverage
,
self
).
__init__
(
methodName
)
super
(
PSFInterpModule_coverage
,
self
).
__init__
(
methodName
)
self
.
dataPath
=
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_fz_msc'
)
self
.
dataPath
=
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_
msc_sim/csst_
fz_msc'
)
self
.
iccd
=
8
self
.
iccd
=
8
def
test_loadPSFSet
(
self
):
def
test_loadPSFSet
(
self
):
...
...
tests/test_darknoise_func.py
View file @
fb74fc22
...
@@ -60,7 +60,7 @@ def defineFilt(chip):
...
@@ -60,7 +60,7 @@ def defineFilt(chip):
class
detModule_coverage
(
unittest
.
TestCase
):
class
detModule_coverage
(
unittest
.
TestCase
):
def
__init__
(
self
,
methodName
=
'runTest'
):
def
__init__
(
self
,
methodName
=
'runTest'
):
super
(
detModule_coverage
,
self
).
__init__
(
methodName
)
super
(
detModule_coverage
,
self
).
__init__
(
methodName
)
self
.
dataPath
=
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_fz_msc'
)
self
.
dataPath
=
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_
msc_sim/csst_
fz_msc'
)
self
.
iccd
=
1
self
.
iccd
=
1
def
test_add_dark
(
self
):
def
test_add_dark
(
self
):
...
...
tests/test_imaging.py
View file @
fb74fc22
...
@@ -97,8 +97,8 @@ def _load_gals(file_path):
...
@@ -97,8 +97,8 @@ def _load_gals(file_path):
param
[
'av'
]
=
0.0
param
[
'av'
]
=
0.0
param
[
'redden'
]
=
0
param
[
'redden'
]
=
0
pcs
=
h5
.
File
(
"/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg
/sedlibs/
"
+
"
pcs.h5
"
,
"r"
)
pcs
=
h5
.
File
(
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_msc_sim/csst_fz_msc
/sedlibs/pcs.h5
'
)
,
"r"
)
lamb
=
h5
.
File
(
"/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg
/sedlibs/
"
+
"
lamb.h5
"
,
"r"
)
lamb
=
h5
.
File
(
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_msc_sim/csst_fz_msc
/sedlibs/lamb.h5
'
)
,
"r"
)
lamb_gal
=
lamb
[
'lamb'
][()]
lamb_gal
=
lamb
[
'lamb'
][()]
pcs
=
pcs
[
'pcs'
][()]
pcs
=
pcs
[
'pcs'
][()]
...
@@ -158,7 +158,7 @@ def defineFilt(chip):
...
@@ -158,7 +158,7 @@ def defineFilt(chip):
class
imagingModule_coverage
(
unittest
.
TestCase
):
class
imagingModule_coverage
(
unittest
.
TestCase
):
def
__init__
(
self
,
methodName
=
'runTest'
):
def
__init__
(
self
,
methodName
=
'runTest'
):
super
(
imagingModule_coverage
,
self
).
__init__
(
methodName
)
super
(
imagingModule_coverage
,
self
).
__init__
(
methodName
)
self
.
dataPath
=
"/public/home/chengliang/CSSOSDataProductsSims/csst-simulation/tests/UNIT_TEST_DATA"
##
os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'csst_
fz_gc1
')
self
.
dataPath
=
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_
msc_sim/csst_fz_msc
'
)
self
.
iccd
=
8
self
.
iccd
=
8
def
test_imaging
(
self
):
def
test_imaging
(
self
):
...
@@ -170,7 +170,7 @@ class imagingModule_coverage(unittest.TestCase):
...
@@ -170,7 +170,7 @@ class imagingModule_coverage(unittest.TestCase):
print
(
chip
.
cen_pix_x
,
chip
.
cen_pix_y
)
print
(
chip
.
cen_pix_x
,
chip
.
cen_pix_y
)
obj
=
_load_gals
(
"UNIT_TEST_DATA/galaxies_C6_bundle000287.h5"
)
obj
=
_load_gals
(
os
.
path
.
join
(
self
.
dataPath
,
'galaxies_C6_bundle000287.h5'
))
#(
"UNIT_TEST_DATA/galaxies_C6_bundle000287.h5")
sed_data
=
obj
[
'sed'
]
sed_data
=
obj
[
'sed'
]
norm_filt
=
None
norm_filt
=
None
...
...
tests/test_prescan_overscan_func.py
View file @
fb74fc22
...
@@ -81,7 +81,7 @@ def defineFilt(chip):
...
@@ -81,7 +81,7 @@ def defineFilt(chip):
class
detModule_coverage
(
unittest
.
TestCase
):
class
detModule_coverage
(
unittest
.
TestCase
):
def
__init__
(
self
,
methodName
=
'runTest'
):
def
__init__
(
self
,
methodName
=
'runTest'
):
super
(
detModule_coverage
,
self
).
__init__
(
methodName
)
super
(
detModule_coverage
,
self
).
__init__
(
methodName
)
self
.
dataPath
=
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_fz_msc'
)
self
.
dataPath
=
os
.
path
.
join
(
os
.
getenv
(
'UNIT_TEST_DATA_ROOT'
),
'csst_
msc_sim/csst_
fz_msc'
)
self
.
iccd
=
1
self
.
iccd
=
1
def
test_add_prescan_overscan
(
self
):
def
test_add_prescan_overscan
(
self
):
...
...
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