Commit f7995079 authored by xin's avatar xin
Browse files

in getInputPointing.py add output rotation angle

parent d0a5deb4
...@@ -193,17 +193,29 @@ def getSelectPointingList(center = [60,-40], radius = 2): ...@@ -193,17 +193,29 @@ def getSelectPointingList(center = [60,-40], radius = 2):
return p_result return p_result
def findPointingbyChipID(chipID = 8, ra = 60., dec = -40.): def findPointingbyChipID(chipID = 8, ra = 60., dec = -40.):
"""_summary_
Args:
chipID (int, optional): Chip ID.
ra (_type_, optional): Chip center ra.
dec (_type_, optional): Chip center dec.
Returns:
_type_: [ra, dec, rotation angle]
"""
chip_center = [ra, dec] chip_center = [ra, dec]
p_list = getSelectPointingList(center = chip_center) p_list = getSelectPointingList(center = chip_center)
pchip = Chip(chipID) pchip = Chip(chipID)
p_num = p_list.shape[0] p_num = p_list.shape[0]
max_value = 1000000000
min_d = 1000000000 min_d = max_value
r_ra = ra r_ra = ra
r_dec = dec r_dec = dec
r_rot = 0.
for i in np.arange(0,p_num,1): for i in np.arange(0,p_num,1):
ra_n = p_list[i,0] ra_n = p_list[i,0]
dec_n = p_list[i,1] dec_n = p_list[i,1]
...@@ -222,8 +234,12 @@ def findPointingbyChipID(chipID = 8, ra = 60., dec = -40.): ...@@ -222,8 +234,12 @@ def findPointingbyChipID(chipID = 8, ra = 60., dec = -40.):
min_d = d min_d = d
r_ra = ra_n r_ra = ra_n
r_dec = dec_n r_dec = dec_n
r_rot = rot.deg
if min_d == max_value:
print("RA:%f,Dec:%f不在指向范围内,请于巡天规划序列比对!!!!!"%(ra, dec))
return galsim.CelestialCoord(ra=r_ra*galsim.degrees,dec=r_dec*galsim.degrees) return [r_ra, r_dec , r_rot]
...@@ -231,7 +247,7 @@ def findPointingbyChipID(chipID = 8, ra = 60., dec = -40.): ...@@ -231,7 +247,7 @@ def findPointingbyChipID(chipID = 8, ra = 60., dec = -40.):
if __name__ == "__main__": if __name__ == "__main__":
pointing = findPointingbyChipID() pointing = findPointingbyChipID(chipID = 8, ra = 60., dec = -40.)
# chipID = 8 # chipID = 8
# pchip = Chip(chipID) # pchip = Chip(chipID)
......
...@@ -277,10 +277,11 @@ def producePointingList3(out = '' , center = [60,-40], radius = 5, survey_file = ...@@ -277,10 +277,11 @@ def producePointingList3(out = '' , center = [60,-40], radius = 5, survey_file =
if __name__ == "__main__": if __name__ == "__main__":
isRealSurvey = True isRealSurvey = True
survey_file = 'skyMapOrSurveyList/E17.5_b17.5_beta_11.6_opt_transtime_1_CMG_1_dp_2_0.25_da_10_Texp_1.5_DEC60_500_0.1_800_1000_+5deg.dat' survey_file = 'skyMapOrSurveyList/E17.5_b17.5_beta_11.6_opt_transtime_1_CMG_1_dp_2_0.25_da_10_Texp_1.5_DEC60_500_0.1_800_1000_+5deg.dat'
outFileName = 'pointing_test_NGP_1..dat' outFileName = 'pointing_test_NGP_246.5_40_1.dat'
radi = 1.2 radi = 1.3
center_pos = [192.8595, 27.1283] # center_pos = [192.8595, 27.1283]
center_pos = [246.5, 40]
if isRealSurvey: if isRealSurvey:
producePointingList3(out = outFileName,center = center_pos, radius = radi, survey_file = survey_file) producePointingList3(out = outFileName,center = center_pos, radius = radi, survey_file = survey_file)
else: else:
......
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