Commit 6a38e3ac authored by JX's avatar JX 😵
Browse files

Merge remote-tracking branch 'origin/develop'

parents fc33cf07 af8ceb6c
Pipeline #4235 passed with stage
in 0 seconds
......@@ -20,11 +20,11 @@ import os
hubbleAverZodiacal = {'nuv':0.0035,'u':0.0163,'g':0.1109,'r':0.1471,'i':0.1568,'z':0.0953,'y':0.0283}
hubbleAverEarthShine = {'nuv':0.00024,'u':0.0051,'g':0.0506,'r':0.0591,'i':0.0568,'z':0.0315,'y':0.0090}
def transRaDec2D(ra, dec):
x1 = np.cos(dec / 57.2957795) * np.cos(ra / 57.2957795);
y1 = np.cos(dec / 57.2957795) * np.sin(ra / 57.2957795);
z1 = np.sin(dec / 57.2957795);
return np.array([x1, y1, z1])
# def transRaDec2D(ra, dec):
# x1 = np.cos(dec / 57.2957795) * np.cos(ra / 57.2957795);
# y1 = np.cos(dec / 57.2957795) * np.sin(ra / 57.2957795);
# z1 = np.sin(dec / 57.2957795);
# return np.array([x1, y1, z1])
def getAngle132(x1=0, y1=0, z1=0, x2=0, y2=0, z2=0, x3=0, y3=0, z3=0):
......@@ -192,13 +192,13 @@ class TestStraylight(unittest.TestCase):
if __name__ == '__main__':
os.environ['UNIT_TEST_DATA_ROOT']="/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData"
suit = unittest.TestSuite()
case1 = TestStraylight('test_EarthShineFilter', filter = 'i')
suit.addTest(case1)
case2 = TestStraylight('test_ZodiacalFilter',filter = 'i')
suit.addTest(case2)
case3 = TestStraylight('test_StarFilter', filter='i')
suit.addTest(case3)
case4 = TestStraylight('test_GratingStraylight', grating = 'GI')
suit.addTest(case4)
unittest.TextTestRunner(verbosity=2).run(suit)
\ No newline at end of file
# suit = unittest.TestSuite()
# case1 = TestStraylight('test_EarthShineFilter', filter = 'i')
# suit.addTest(case1)
# case2 = TestStraylight('test_ZodiacalFilter',filter = 'i')
# suit.addTest(case2)
# case3 = TestStraylight('test_StarFilter', filter='i')
# suit.addTest(case3)
# case4 = TestStraylight('test_GratingStraylight', grating = 'GI')
# suit.addTest(case4)
# unittest.TextTestRunner(verbosity=2).run(suit)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment