本文整理汇总了Python中query.Query.query_circle方法的典型用法代码示例。如果您正苦于以下问题:Python Query.query_circle方法的具体用法?Python Query.query_circle怎么用?Python Query.query_circle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类query.Query
的用法示例。
在下文中一共展示了Query.query_circle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ShowSkyCoverage
# 需要导入模块: from query import Query [as 别名]
# 或者: from query.Query import query_circle [as 别名]
#.........这里部分代码省略.........
if same == True:
tkMessageBox.showerror('Warning',"airmass outside the range of {1 - 5.8}")
aladin.remove_FoV(ra, dec)
aladin.remove("C_" + str( ra ) + "/" + str( dec ))
else:
time_step = [dateutil.parser.parse(s) for s in datestrings]
self.__updating_center_coords(ra,dec)
fov_statistics = FoVstatistics()
fov_statistics.plot_stats(time_step, airmass_values,
ra, dec,
table,
integrated_prob,
distance_grid, ansatz_distribution, moon_illumination)
print airmass_values, datestrings
def update_pointings_file(self, infile, ra, dec, prob_fov):
"""The central location (ra[deg], dec[deg]) and the integrated probability of
a selected FoV are saved locally in an external file.
By default the file is named "GWsky_pointings.txt"."""
with open(infile, 'a') as pointing:
pointing.write(str(ra) + ' ' + str(dec)+ ' '+ str(prob_fov)+'\n')
def __query_shape(self, ra, dec, fov_shape):
"""Return the catalog query according with the defined-user FoV shape:
(1) box and (2) circle. """
if self.user.get_fov_shape() != 2: # box FoV
query_result = self.query.query_box(
ra, dec, self.user.get_fov_width(), self.user.get_fov_height(), self.user.get_catalog(),
self.user.get_column_1(), self.user.get_column_2(),
self.user.get_filter_1(), self.user.get_filter_2())
else: # circle FoV
query_result = self.query.query_circle(
ra, dec, self.user.get_fov_radius(), self.user.get_catalog(),
self.user.get_column_1(), self.user.get_column_2(),
self.user.get_filter_1(), self.user.get_filter_2())
return query_result
def __prob_shape(self, ra, dec, fov_shape):
"""Return the integrated probability according with the defined-user FoV shape:
(1) box and (2) circle."""
if self.user.get_fov_shape() !=2: # box FoV
prob_fov = self.lvc.prob_in_box(
ra, dec, self.user.get_fov_width(), self.user.get_fov_height())
else: # circle FoV
prob_fov = self.lvc.prob_in_circle(
ra, dec, self.user.get_fov_radius())
return prob_fov
def pick_coverage(self, ra, dec):
"""Setting GWsky: with statistic window (A); without statistic window (D)."""
if self.user.get_GWsky_basic() == "A": # full version
query_result = self.__query_shape(ra, dec, self.user.get_fov_shape())
prob_fov = self.__prob_shape(ra, dec, self.user.get_fov_shape())
moon_illumination = self.moon.illumination() # moon_illumination
# moon_dist
# TEST
fov_sep = Utils.separation(self.input_ra, self.input_dec,
ra, dec)
print ('The distance between 2 consecutive FoV centers is', fov_sep.round(6))