コード例 #1
0
    def test_cone_search(self):
        c = coordinates.SkyCoord("00h42m44.51s +41d16m08.45s", frame='icrs')

        parameterst = {
            'query': "select top 10 * from hsc_v2.hubble_sc2",
            'output_file': "test2.vot",
            'output_format': "votable",
            'verbose': False
        }
        dummyTapHandler = DummyHubbleTapHandler("launch_job", parameterst)

        parameters = {
            'coordinates': c,
            'radius': 0.0,
            'file_name': 'file_cone',
            'output_format': 'votable',
            'cache': True
        }
        dummyHandler = DummyHandler("cone_search", parameters)

        ehst = ESAHubbleClass(dummyHandler, dummyTapHandler)
        ehst.cone_search(parameters['coordinates'], parameters['radius'],
                         parameters['file_name'], parameters['output_format'],
                         parameters['cache'])
        dummyHandler.check_call("cone_search", parameters)
コード例 #2
0
 def test_download_product(self):
     parameters = {
         'observation_id': "J6FL25S4Q",
         'calibration_level': "RAW",
         'filename': 'file',
         'verbose': False
     }
     dummyHandler = DummyHandler("download_product", parameters)
     ehst = ESAHubbleClass(dummyHandler, self.get_dummy_tap_handler())
     ehst.download_product(parameters['observation_id'],
                           parameters['calibration_level'],
                           parameters['filename'], parameters['verbose'])
     dummyHandler.check_call("download_product", parameters)
コード例 #3
0
 def test_query_target(self):
     parameters = {'name': "m31", 'verbose': False}
     dummyHandler = DummyHandler("query_target", parameters)
     ehst = ESAHubbleClass(dummyHandler, self.get_dummy_tap_handler())
     ehst.query_target(parameters['name'])
     dummyHandler.check_call("query_target", parameters)
コード例 #4
0
 def test_get_postcard(self):
     parameters = {'observation_id': "X0MC5101T", 'verbose': False}
     dummyHandler = DummyHandler("get_postcard", parameters)
     ehst = ESAHubbleClass(dummyHandler, self.get_dummy_tap_handler())
     ehst.get_postcard("X0MC5101T")
     dummyHandler.check_call("get_postcard", parameters)