42 #define DATRW_CHANNELTRANSLATION_CC_VERSION \ 43 "DATRW_CHANNELTRANSLATION_CC V1.6" 48 #include <datrwxx/tsoftdata.h> 49 #include <datrwxx/channeltranslation.h> 78 {
"BF:SG056:Grav-1",
"BFO:GR1:SG056:Gra1",
CNSP},
79 {
"BF:SG056:Grav-2",
"BFO:GR2:SG056:Gra2",
CNSP},
80 {
"BF:SG056:Baro-1",
"BFO:BA1:SG056:Bar1",
CNSP},
81 {
"BF:SG056:Baro-2",
"BFO:BA2:SG056:Bar2",
CNSP},
83 {
"BF:SG056:G1-Sig",
"BFO:G1S:SG056:Sig1",
CNSP},
84 {
"BF:SG056:G1-Mode",
"BFO:G1M:SG056:Mod1",
CNSP},
85 {
"BF:SG056:GBal-1",
"BFO:G1B:SG056:GBa1",
CNSP},
86 {
"BF:SG056:G2-Sig",
"BFO:G2S:SG056:Sig2",
CNSP},
87 {
"BF:SG056:G2-Mode",
"BFO:G2M:SG056:Mod2",
CNSP},
88 {
"BF:SG056:GBal-2",
"BFO:G2B:SG056:GBa2",
CNSP},
90 {
"BF:SG056:Tmpr1",
"BFO:TP1:SG056:Tmp1",
CNSP},
91 {
"BF:SG056:RelHum1",
"BFO:RH1:SG056:ReH1",
CNSP},
92 {
"BF:SG056:Tmpr2",
"BFO:TP2:SG056:Tmp2",
CNSP},
93 {
"BF:SG056:RelHum2",
"BFO:RH2:SG056:ReH2",
CNSP},
95 {
"BF:SG056:TX-Bal",
"BFO:TXB:SG056:TXBa",
CNSP},
96 {
"BF:SG056:TY-Bal",
"BFO:TYB:SG056:TYBa",
CNSP},
97 {
"BF:SG056:TX-Pwr",
"BFO:TXP:SG056:TXPw",
POWERV},
98 {
"BF:SG056:TY-Pwr",
"BFO:TYP:SG056:TYPw",
POWERV},
100 {
"BF:SG056:Dewr-P",
"BFO:DEP:SG056:DewP",
PSI_1_1},
101 {
"BF:SG056:Dwr_Htr",
"BFO:DHT:SG056:DHtr",
C20P4},
102 {
"BF:SG056:NeckT-1",
"BFO:NT1:SG056:NTe1",
SIDIODE3},
103 {
"BF:SG056:NeckT-2",
"BFO:NT2:SG056:NTe2",
SIDIODE3},
104 {
"BF:SG056:HtrCrnt",
"BFO:HCT:SG056:HCrt",
POWERV},
105 {
"BF:SG056:Tmp-Bal",
"BFO:TBA:SG056:TBal",
CNSP},
107 {
"BF:SG056:P1GasCl",
"BFO:P1C:SG056:P1GC",
PSI_3000},
108 {
"BF:SG056:P2GasRg",
"BFO:P2R:SG056:P2GR",
PSI_500},
109 {
"BF:SG056:P3CmpHi",
"BFO:P3H:SG056:P3CH",
PSI_500},
110 {
"BF:SG056:P4CmpLo",
"BFO:P4L:SG056:P4CL",
PSI_500},
111 {
"BF:SG056:P5CmpBl",
"BFO:P5B:SG056:P5CB",
PSI_500},
113 {
"BF:SG056:TREEfan",
"BFO:FAN:SG056:Tfan",
FAN16},
114 {
"BF:SG056:AD-1",
"BFO:AD1:SG056:AD-1",
CNSP},
115 {
"BF:SG056:FB_Mod",
"BFO:FBM:SG056:FBMo",
CNSP},
116 {
"BF:SG056:Temp_77",
"BFO:T77:SG056:Te77",
CNSP},
117 {
"BF:SG056:Temp_6K",
"BFO:T6K:SG056:Te6K",
CNSP},
118 {
"BF:SG056:BelyT-3",
"BFO:BT3:SG056:BTe3",
SIDIODE3},
119 {
"BF:SG056:BodyT-4",
"BFO:BT4:SG056:BTe4",
SIDIODE4},
120 {
"BF:SG056:Temp_G1",
"BFO:TG1:SG056:TeG1",
TDV},
121 {
"BF:SG056:Temp_G2",
"BFO:TG2:SG056:TeG2",
TDV},
122 {
"BF:SG056:Temp_TX",
"BFO:TTX:SG056:TeTX",
TDV},
123 {
"BF:SG056:Temp_TY",
"BFO:TTY:SG056:TeTY",
TDV},
124 {
"BF:SG056:Temp_AX",
"BFO:TAX:SG056:TeAX",
TDV},
125 {
"BF:SG056:Temp_CH",
"BFO:TCH:SG056:TeCH",
TDV},
126 {
"BF:SG056:Temp_TE",
"BFO:TTE:SG056:TeTE",
TDV},
128 {
"BF:SG056:T1-Ext",
"BFO:T1X:SG056:T1Ex",
TDV},
129 {
"BF:SG056:T2-Ext",
"BFO:T2X:SG056:T2Ex",
TDV},
130 {
"BF:SG056:T3-Ext",
"BFO:T3X:SG056:T3Ex",
TDV},
132 {
"BF:SG056:Temp-Gt",
"BFO:TGT:SG056:TeGt",
PT100V_K},
134 {
"BF:SG056:AGnd",
"BFO:GND:SG056:AGnd",
CNSP},
135 {
"BF:SG056:LHeLvl",
"BFO:LHX:SG056:LHeX",
GEPLHe23},
137 {
"BF:SG056:LHe-Alt",
"BFO:LHX:SG056:LHeX",
GEPLHe23},
138 {
"BF:SG056:LHe-Lvl",
"BFO:LH1:SG056:LHeL",
GEPLHe23},
139 {
"BF:SG056:Comp_DC",
"BFO:CDC:SG056:CoDC",
CNSP},
140 {
"BF:SG056:CH_DC",
"BFO:CHD:SG056:CHDC",
CNSP},
142 {
"BF:SG056:Vstd-1",
"BFO:VS1:SG056:VST1",
CNSP},
143 {
"BF:SG056:Vstd-2",
"BFO:VS2:SG056:VST2",
CNSP},
149 {
"BF:SG056:G1-F60",
"BFO:G16:SG056:G160",
CNSP},
150 {
"BF:SG056:G2-F60",
"BFO:G26:SG056:G260",
CNSP},
151 {
"BF:SG056:Br1-F60",
"BFO:B16:SG056:B160",
CNSP},
152 {
"BF:SG056:Br2-F60",
"BFO:B26:SG056:B260",
CNSP},
153 {
"BF:SG056:B2r-F60",
"BFO:B26:SG056:B260",
CNSP},
156 {
"BF:SG056:G1-F10",
"BFO:G11:SG056:G110",
CNSP},
157 {
"BF:SG056:G2-F10",
"BFO:G21:SG056:G210",
CNSP},
158 {
"BF:SG056:Br1-F10",
"BFO:B11:SG056:B110",
CNSP},
159 {
"BF:SG056:Br2-F10",
"BFO:B21:SG056:B210",
CNSP},
162 {
"BF:SG056:G1-Resd",
"BFO:G1R:SG056:G1Re",
CNSP},
163 {
"BF:SG056:G2-Resd",
"BFO:G2R:SG056:G2Re",
CNSP},
164 {
"BF:SG056:G-Diff",
"BFO:GRE:SG056:GRes",
CNSP},
165 {
"BF:SG056:G-Calc",
"BFO:GCA:SG056:GCal",
CNSP},
166 {
"BF:SG056:G1-Poly",
"BFO:G1P:SG056:G1Po",
CNSP},
167 {
"BF:SG056:G2-Poly",
"BFO:G2P:SG056:G2Po",
CNSP},
179 DATRW_assert(vos.size()==3,
"unexpected number of fields");
182 retval.instrument=vos[1];
183 retval.datatype=vos[2];
193 DATRW_assert(vos.size()==4,
"unexpected number of fields");
196 retval.channel=vos[1];
197 retval.instrument=vos[2];
205 void pfield(std::ostream& os,
const std::string& s,
const int& w)
208 os.setf(std::ios_base::left, std::ios_base::adjustfield);
209 os << s.substr(0,w) <<
" ";
216 const std::string& s1,
217 const std::string& s2,
218 const std::string& s3,
219 const std::string& s4,
220 const std::string& s5,
221 const std::string& s6,
222 const std::string& s7)
240 os <<
"Translation table for TSOFT channels:" << std::endl;
241 pline(os,
"TSOFT",
"",
"",
"SFF",
"",
"",
"");
242 pline(os,
"location",
"instrument",
"datatype",
243 "station",
"channel",
"instrument",
"auxid");
244 const char* line=
"----------";
245 pline(os, line, line, line, line, line, line, line);
261 os <<
"If none of the entries matches, we take location for station,\n" 262 <<
"instrument for instrument, and datatype for channel and auxid." 270 os <<
"Comments found in 1s data file (A2100101.056):" << std::endl;
271 os <<
"15 LHe-Lvl 3 0.0 100.0 Volt % GEPLHe23" << std::endl;
272 os <<
"16 AGnd 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
273 os <<
"17 AD-1 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
274 os <<
"18 TREEfan 1 -10.0 10.0 Volt Volts 4.0" << std::endl;
275 os <<
"19 G1-Sig 1 -10.0 10.0 Volt nm/sec2 none" << std::endl;
276 os <<
"20 G1-Mode 1 -10.0 10.0 Volt Volts none" << std::endl;
277 os <<
"21 G2-Sig 1 -10.0 10.0 Volt nm/sec2 none" << std::endl;
278 os <<
"22 G2-Mode 1 -10.0 10.0 Volt Volts none" << std::endl;
279 os <<
"23 Dewr-P 1 -2.0 2.0 Volt PSI PSI_1_1" << std::endl;
280 os <<
"24 GBal-1 1 -10.0 10.0 Volt nm/sec2 none" << std::endl;
281 os <<
"25 TX-Pwr 1 -10.0 10.0 Volt %Power POWERV" << std::endl;
282 os <<
"26 TX-Bal 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
283 os <<
"27 NeckT-1 1 1.9 8.5 Volt Kelvin SiDiode-3" << std::endl;
284 os <<
"28 NeckT-2 1 1.9 8.5 Volt Kelvin SiDiode-3" << std::endl;
285 os <<
"29 BelyT-3 1 1.9 8.5 Volt Kelvin SiDiode-3" << std::endl;
286 os <<
"30 BodyT-4 1 1.9 8.5 Volt Kelvin SiDiode-4" << std::endl;
287 os <<
"31 LHeLvl 6 1.0 100.0 Volt % GEPLHe23" << std::endl;
288 os <<
"32 GBal-2 1 -10.0 10.0 Volt nm/sec2 none" << std::endl;
289 os <<
"33 TY-Pwr 1 -10.0 10.0 Volt %Power POWERV" << std::endl;
290 os <<
"34 TY-Bal 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
291 os <<
"35 Tmp-Bal 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
292 os <<
"36 HtrCrnt 1 -10.0 10.0 Volt %Power POWERV" << std::endl;
293 os <<
"37 Temp_6K 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
294 os <<
"38 Temp_77 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
295 os <<
"39 FB_Mod 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
296 os <<
"40 P1GasCl 1 -10.0 10.0 Volt PSI PSI-3000" << std::endl;
297 os <<
"41 P2GasRg 1 -10.0 10.0 Volt PSI PSI-500" << std::endl;
298 os <<
"42 P3CmpHi 1 -10.0 10.0 Volt PSI PSI-500" << std::endl;
299 os <<
"43 P4CmpLo 1 -10.0 10.0 Volt PSI PSI-500" << std::endl;
300 os <<
"44 P5CmpBl 1 -10.0 10.0 Volt PSI PSI-500" << std::endl;
301 os <<
"55 Temp-Gt 1 0.0 1.0 Volt Kelvin PT100V_K" << std::endl;
302 os <<
"56 Dwr_Htr 1 -10.0 10.0 Volt mA 20.0" << std::endl;
303 os <<
"57 Comp_DC 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
304 os <<
"58 CH_DC 1 -10.0 10.0 Volt Volts 1.0" << std::endl;
305 os <<
"59 Tmpr1 1 0.0 0.0 Celsius Celsius 1.0" << std::endl;
306 os <<
"60 Tmpr2 1 0.0 0.0 Celsius Celsius 1.0" << std::endl;
307 os <<
"61 RelHum1 1 0.4 1.7 Pcnt % 1.0" << std::endl;
308 os <<
"62 RelHum2 1 0.4 1.7 Pcnt % 1.0" << std::endl;
331 std::cout <<
"ATTENTION: " 332 <<
"TSOFT entry appears twice in translation table:" 345 std::cout <<
"ATTENTION: " 346 <<
"SFF entry appears twice in translation table:" 352 << sci1.
auxid << std::endl;
382 "UUPS... this is a programming error!");
438 "UUPS... this is a programming error!");
ChannelDescription channel(const SFFchannelid &insid)
return channel data for given SFF channel ID
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
void reporttranslation(std::ostream &os)
report translation table
Convert Current from Dewar Pressure gauge to PSI.
std::vector< std::string > Tvos
vector of strings.
const Econversion ConversionCode
conversion code for auxilliary channels
const char * SFFname
description to be used in SFF for this channel
const Channel translationtable[]
global variable: channel name translation tableThis table is specific for SG056 at BFO...
Convert Current from Gas Regulator and Helium Compressor Pressure gauge to PSI.
void pline(std::ostream &os, const std::string &s1, const std::string &s2, const std::string &s3, const std::string &s4, const std::string &s5, const std::string &s6, const std::string &s7)
helper function: formatted output
bool translationisunique(const bool &verbose)
check uniqueness of translation table
exception class declaration for libdatrwxx (prototypes)
Convert voltage across 23” AMI LHe sensor to % Helium.
Convert Voltage to % Power where.
Convert Voltage across Honeywell TD5 temperature sensor to degrees Celsius.
Convert voltage across Non-Magnetic Silicone Diode to Kelvins.
Convert voltage across Standard Silicone Diode to Kelvins.
std::string trimws(std::string s)
remove leading and trailing whitespace
Root namespace of library.
Convert Voltage to % Fan speed.
SFFchannelid translate(const TSOFTchannelid &ci)
return SFF channel ID for given TSOFT channel ID
utilities used by more than one type of data reader (prototypes)
Tvos stringtovec(const std::string &line, const std::string &delimiters)
helper function stringtok
Convert Current from Gas Regulator and Helium Compressor Pressure gauge to PSI.
hold TSOFT channel description
struct to hold a pair of channel names
Convert Voltage across Pt100 RTD to Kelvins.
Conversion factor 20.4 for Dewar Heater current.
SFFchannelid schannelid(const Channel &ci)
split SFF channel description
const char * TSOFTname
channel description used in TSOFT
TSOFTchannelid tchannelid(const Channel &ci)
split TSOFT channel description
void pfield(std::ostream &os, const std::string &s, const int &w)
helper function: print fixed width field
not found in channel translation table
hold SFF channel description
void reportdatacomments(std::ostream &os)
report comments from 1s files