Ejemplo n.º 1
0
 def test_angle_both(self):
     """Check that both raangle and decangle must be specified. (gMap)"""
     with self.assertRaises(SystemExit):
         gm_check_args(
             gm_check_args(gm_setup_parser().parse_args(
                 ['--skypos',
                  str(self.skypos), '--raangle', '0.1'])))
Ejemplo n.º 2
0
 def test_angle_propagate1(self):
     """Check that raangle and decangle propagate to skyrange (gMap)"""
     args = gm_check_args(gm_setup_parser().parse_args([
         '--skypos', str(self.skypos), '--raangle', '0.1', '--decangle',
         '0.2']))
     self.assertAlmostEqual(0.1, args.skyrange[0])
     self.assertAlmostEqual(0.2, args.skyrange[1])
Ejemplo n.º 3
0
 def test_angle_propagate2(self):
     """Check that skyrange propagates to raangle and decangle. (gMap)"""
     args = gm_check_args(gm_setup_parser().parse_args(
         ['--skypos',
          str(self.skypos), '--skyrange', '[0.1, 0.2]']))
     self.assertAlmostEqual(0.1, args.raangle)
     self.assertAlmostEqual(0.2, args.decangle)
Ejemplo n.º 4
0
 def test_angle_propagate1(self):
     """Check that raangle and decangle propagate to skyrange (gMap)"""
     args = gm_check_args(gm_setup_parser().parse_args([
         '--skypos',
         str(self.skypos), '--raangle', '0.1', '--decangle', '0.2'
     ]))
     self.assertAlmostEqual(0.1, args.skyrange[0])
     self.assertAlmostEqual(0.2, args.skyrange[1])
Ejemplo n.º 5
0
 def setUp(self):
     self.bands = ['NUV', 'FUV']
     self.skypos = [176.919525856024, 0.255696872807351]
     self.tranges = [[765579107.995, 765579821.995],
                     [766525332.995, 766526576.995],
                     [919754986.995, 919755916.995]]
     self.trange = self.tranges[0]
     self.radius = 0.01
     self.annulus = [0.02, 0.03]
     self.parser = gm_setup_parser()
     self.args = self.parser.parse_args()
Ejemplo n.º 6
0
 def setUp(self):
     self.bands = ['NUV','FUV']
     self.skypos = [176.919525856024,0.255696872807351]
     self.tranges = [[ 765579107.995, 765579821.995 ],
                     [ 766525332.995, 766526576.995 ],
                     [ 919754986.995, 919755916.995 ]]
     self.trange = self.tranges[0]
     self.radius = 0.01
     self.annulus = [0.02,0.03]
     self.parser = gm_setup_parser()
     self.args = self.parser.parse_args()
Ejemplo n.º 7
0
 def test_memlight_default(self):
     """Check the default value of --memlight (gMap)"""
     self.assertAlmostEqual(100., gm_setup_parser().parse_args().memlight)
Ejemplo n.º 8
0
 def test_intensity_default(self):
     """Check the default value of --intensity (gMap)"""
     self.assertIsNone(gm_setup_parser().parse_args().intfile)
Ejemplo n.º 9
0
 def test_decangle_default(self):
     """Check the default value of --decangle (gMap)"""
     self.assertIsNone(gm_setup_parser().parse_args().decangle)
Ejemplo n.º 10
0
 def test_count_default(self):
     """Check the default value of --count (gMap)"""
     self.assertIsNone(gm_setup_parser().parse_args().cntfile)
Ejemplo n.º 11
0
 def test_angle_both(self):
     """Check that both raangle and decangle must be specified. (gMap)"""
     with self.assertRaises(SystemExit):
         gm_check_args(gm_check_args(gm_setup_parser().parse_args(
             ['--skypos', str(self.skypos), '--raangle', '0.1'])))
Ejemplo n.º 12
0
 def test_angle_propagate2(self):
     """Check that skyrange propagates to raangle and decangle. (gMap)"""
     args = gm_check_args(gm_setup_parser().parse_args(
         ['--skypos', str(self.skypos), '--skyrange', '[0.1, 0.2]']))
     self.assertAlmostEqual(0.1, args.raangle)
     self.assertAlmostEqual(0.2, args.decangle)
Ejemplo n.º 13
0
 def test_memlight_default(self):
     """Check the default value of --memlight (gMap)"""
     self.assertAlmostEqual(100., gm_setup_parser().parse_args().memlight)
Ejemplo n.º 14
0
 def test_intensity_default(self):
     """Check the default value of --intensity (gMap)"""
     self.assertIsNone(gm_setup_parser().parse_args().intfile)
Ejemplo n.º 15
0
 def test_decangle_default(self):
     """Check the default value of --decangle (gMap)"""
     self.assertIsNone(gm_setup_parser().parse_args().decangle)
Ejemplo n.º 16
0
 def test_count_default(self):
     """Check the default value of --count (gMap)"""
     self.assertIsNone(gm_setup_parser().parse_args().cntfile)