Commit e4bcf2d1 authored by Chen Yili's avatar Chen Yili
Browse files

Upload New File

parent 9d85a905
import unittest
from CpicImgSim import observation_simulation, quick_run
class TestMain(unittest.TestCase):
def test_main(self):
target_example = {
'name': 'test',
'cstar': {
'magnitude': 0,
'ra': '120d',
'dec': '40d',
'distance': 10,
'sptype': 'F0III',
},
# 'stars': [
# {
# 'magnitude': 15,
# 'ra': '120d0m5s',
# 'dec': '40d00m3s',
# 'sptype': 'G0III',
# 'isblackbody': True
# },
# ],
# 'planets': [
# {
# 'radius': 20,
# 'pangle': 60,
# 'separation': 0.7,
# 'phase_angle': 90,
# }
# ]
}
quick_run('', 10, 'f661', 1, 1, 30)
quick_run('*2.4/10(3,5)/15(-4,2)', 21, 'f661', 1, 1, 30)
# normal target
observation_simulation(
target=target_example,
skybg=21,
expt=1,
nframe=1,
band='f661',
emgain=30,
obsid=51012345678,
)
# bias-gain
observation_simulation(
target={},
skybg=None,
expt=1,
nframe=1,
band='f661',
emgain=30,
obsid=50112345678,
)
if __name__ == '__main__':
unittest.main()
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