Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.apo.nmsu.edu/Telescopes/TCC/html/inst_from_obs_8py_source.html
Дата изменения: Tue Sep 15 02:25:37 2015
Дата индексирования: Sun Apr 10 02:40:30 2016
Кодировка:

Поисковые слова: созвездие лебедя
lsst.tcc: python/tcc/axis/instFromObs.py Source File
lsst.tcc  1.2.2-3-g89ecb63
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
instFromObs.py
Go to the documentation of this file.
1 from __future__ import division, absolute_import
2 
3 import coordConv
4 
5 import tcc.base
6 
7 __all__ = ["instFromObs"]
8 
9 def instFromObs(targObs, obj, taiDate):
10  """!Compute instrument position from observed coordinates
11 
12  @param[in] targObs position of target in observed coordinates (a coordConv.PVTCoord)
13  @param[in] obj the object block; the following fields are read:
14  - objInstXY
15  - obsPos
16  - objAzInstAng
17  @param[in] taiDate TAI date at which to compute (MJD, sec)
18 
19  @return a tuple:
20  - targInstXY: position of target in instrument coordinates (a tcc.base.ArrayPVT2) (deg)
21  i.e. a position in instrument X,Y relative to inst.iim_ctr, the center of the instrument
22  - targAzInstAng: angle of direction of increasing azimuth at target in instrument coordinates (a coordConv.PVT)
23  """
24  # compute the instrument-plane offset from boresight to target
25  targBoreDist = obj.obsPos.angularSeparation(targObs)
26  boreToTargAzAng = obj.obsPos.orientationTo(targObs)
27  boreToTargInstAng = boreToTargAzAng + obj.objAzInstAng
28  if not boreToTargInstAng.isfinite() and abs(targBoreDist.pos) < 1:
29  # target is fixed at boresight (dist < 1 avoids the case dist=180)
30  targObjXY = tcc.base.ArrayPVT2()
31  for i in range(2):
32  targObjXY[i] = obj.objInstXY[i].copy(taiDate)
33  return targObjXY, obj.objAzInstAng.copy(taiDate)
34  else:
35  targObjXY = tcc.base.ArrayPVT2()
36  coordConv.xyFromPolar(targObjXY[0], targObjXY[1], targBoreDist, boreToTargInstAng, taiDate)
37 
38  targInstXY = tcc.base.ArrayPVT2()
39  for i in range(2):
40  targInstXY[i] = targObjXY[i] + obj.objInstXY[i]
41 
42  # now compute targAzInstAng, e.g. by using orientationTo from target to boresight
43  targToBoreAzAng = targObs.orientationTo(obj.obsPos)
44  targAzInstAng = coordConv.wrapCtr(boreToTargAzAng + 180.0 - targToBoreAzAng + obj.objAzInstAng)
45  return targInstXY, targAzInstAng
def instFromObs
Compute instrument position from observed coordinates.
Definition: instFromObs.py:9