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

Поисковые слова: arp 220
lsst.tcc: include/tcc/telMod.h Source File
lsst.tcc  1.2.2-3-g89ecb63
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
telMod.h
Go to the documentation of this file.
1 #pragma once
2 /*
3 * Pointing model block
4 */
5 #include <iostream>
6 #include <string>
7 #include <vector>
8 #include "tcs.h"
9 
10 namespace tcc {
11 
12  class TelMod {
13  public:
17  explicit TelMod() {
18  init();
19  }
20 
24  explicit TelMod(std::string const &filePath) {
25  loadPath(filePath);
26  }
27 
28  ~TelMod() {};
29 
30  /*
31  * Initialize a model
32  */
33  void init();
34 
35  /*
36  * Load a pointing model from a file specified by path, replacing all existing data
37  *
38  * @note
39  * 1 The file containing the pointing model must be set out exactly as
40  * written by TPOINT's OUTMOD command (which indeed is the ideal way
41  * of generating the file). Unlike TPOINT's INMOD command, the
42  * present function does not support departures from the stated
43  * format nor the presence of comment records (though trailing
44  * comments, beginning with the character '!', are permitted). The
45  * first two records, which are ignored, may be used to record
46  * comments; however, both must be present, as must the END marker.
47  * In the term records, the term name must start in column 3, and
48  * the coefficient value must not start before column 11.
49  *
50  * 2 Here is an example file (for an equatorial):
51  *
52  * AAT f/15 1979/06/11
53  * T 49 1.1206 52.015 -0.0624
54  * IH +174.7543 1.18854
55  * =ZH +3.5100
56  * ID +23.0464 0.35693
57  * &=HFX +1.0000
58  * &=HFD +1.0000
59  * & HF -18.7283 0.48982
60  * & X2HC -3.1122 0.26477
61  * & NP +2.9636 0.79658
62  * & CH -18.6889 1.20785
63  * =ZE +0.7000
64  * & ME +58.2504 0.43977
65  * & MA +2.9518 0.24207
66  * TF +8.9655 0.54629
67  * & TFP +1.1686 0.47733
68  * END
69  *
70  * Note the two initial records, which must be present but which are
71  * not interpreted, and the mandatory END record. Each of the
72  * remaining records defines a term and the corresponding
73  * coefficient value (in arcseconds). For example, the record
74  *
75  * & ME +58.2504 0.43977
76  *
77  * defines a term called ME with a value of +58.2504 arcsec. The
78  * additional flag and number are ignored.
79  *
80  * 3 Any terms with a TPOINT "data subset" tag are ignored, as are the
81  * special terms POX and POY.
82  *
83  * 4 If any invalid record is detected, the pointing model is reset
84  * and the rest of the input file is ignored.
85  */
86  void loadPath(std::string const &filePath);
87 
88  /*
89  * Add a term to the pointing model
90  *
91  * @param termName name of new term
92  * @param termValue value of new term (arcsec)
93  * @return the number of the added term (always > 0)
94  */
95  int addTerm(
96  std::string const &termName,
97  double termValue
98  );
99 
105  int getNumTerms() const;
106 
112  std::vector<std::string> getTermNames() const;
113 
120  double getTerm(
121  std::string const &termName
122  ) const;
123 
124  /*
125  * Set the value of an existing term, by name
126  *
127  * @param termName name of term
128  * @param termValue value of term (arcsec)
129  */
130  void setTerm(
131  std::string const &termName,
132  double termValue
133  );
134 
138  std::string __repr__();
139 
140  public:
141  // This could be private, but that would complicate usage in TCSpk
142  TPMOD _model;
143  };
144 
145  std::ostream &operator<<(std::ostream &os, TelMod const &telMod);
146 
147 }
TPMOD _model
Definition: telMod.h:142
std::string __repr__()
Definition: telMod.cc:119
int getNumTerms() const
Definition: telMod.cc:66
void setTerm(std::string const &termName, double termValue)
Definition: telMod.cc:105
TelMod()
Definition: telMod.h:17
double getTerm(std::string const &termName) const
Definition: telMod.cc:85
~TelMod()
Definition: telMod.h:28
std::ostream & operator<<(std::ostream &os, ChebyshevPolynomial const &cheby)
Definition: cheby.cc:12
std::vector< std::string > getTermNames() const
Definition: telMod.cc:75
int addTerm(std::string const &termName, double termValue)
Definition: telMod.cc:46
void loadPath(std::string const &filePath)
Definition: telMod.cc:27
void init()
Definition: telMod.cc:17
TelMod(std::string const &filePath)
Definition: telMod.h:24