예제 #1
0
 def test_check_edges_of_retrieved_fields(self):
     """
     check that stars aren't being missed at the edges of requested fields, by retrieving over a much
     wider area and then trimming, compared with retrieving only over a the narrower trimmed area.
     """
     # pick an RA range where we've predetermined there's a star right at the edge
     # 0064 15.25 15.25 15.4999305556
     ra_range = [15.25 * 15.0, 16.0 * 15.0]
     dec_range = [-85., -83.]
     stars = fetch_nomad_box(ra_range, dec_range, epoch=2000.0)
     stars_largebox = fetch_nomad_box([ra_range[0] - 1.0, ra_range[1] + 1.0],
                                      [dec_range[0] - 1.0, dec_range[1] + 1.0], epoch=2000.0)
     stars_largebox_filtered = self.filter_starlist_by_radec_range(stars_largebox, ra_range, dec_range)
     self.assertTrue(self.starlists_contain_same_NOMAD_ids(stars_largebox_filtered, stars))
예제 #2
0
 def retrieve_nomad_from_search_parameters(self, search_params):
     """
     Use the fetch_nomad_box routine to fetch NOMAD stars for the same search area and epoch
     as specified in search_params, which would have been read in from a example test data file
     retrieved from the NOMAD web site
     """
     ra_range, dec_range = self.radec_range_from_search_parameters(search_params)
     print "Retrieving on ranges:"
     print "      RA = " + str(ra_range)
     print "     DEC = " + str(dec_range)
     return fetch_nomad_box(ra_range, dec_range, epoch=float(search_params['EPOCH']['value']))