1 | #pragma rtGlobals=3 // Use modern global access method and strict wave access. |
---|
2 | |
---|
3 | |
---|
4 | //////////// READ (GET) FUNCTIONS //////////////////// |
---|
5 | |
---|
6 | |
---|
7 | ////////////////////////////////////////////// |
---|
8 | ////////////////////////////////// |
---|
9 | // for TESTING of the get functions - to quickly access and se if there are errors |
---|
10 | // |
---|
11 | // -- not sure how to test the string functions -- can't seem to get a FUNCREF to a string function |
---|
12 | // to work -- maybe it's not alllowed? |
---|
13 | // |
---|
14 | // -- also, now I have get_functions that take a detStr input with the detector information, so that the |
---|
15 | // functions didn't need to be repeated |
---|
16 | // |
---|
17 | // -- Not sure how to test the "write" functions. writing the wrong data type to the wrong data field will be a disaster |
---|
18 | // Writing odd, dummy values will also be a mess - no way to know if I'm doing anything correctly |
---|
19 | // |
---|
20 | Function proto_V_get_FP(str) |
---|
21 | String str |
---|
22 | return(0) |
---|
23 | end |
---|
24 | |
---|
25 | Function proto_V_get_FP2(str,str2) |
---|
26 | String str,str2 |
---|
27 | return(0) |
---|
28 | end |
---|
29 | |
---|
30 | //Function/S proto_V_get_STR(str) |
---|
31 | // String str |
---|
32 | // return("") |
---|
33 | //end |
---|
34 | |
---|
35 | Proc Dump_V_getFP(fname) |
---|
36 | String fname |
---|
37 | |
---|
38 | Test_V_get_FP("V_get*",fname) |
---|
39 | end |
---|
40 | |
---|
41 | Function Test_V_get_FP(str,fname) |
---|
42 | String str,fname |
---|
43 | |
---|
44 | Variable ii,num |
---|
45 | String list,item |
---|
46 | |
---|
47 | |
---|
48 | list=FunctionList(str,";","NPARAMS:1,VALTYPE:1") //,VALTYPE:1 gives real return values, not strings |
---|
49 | // Print list |
---|
50 | num = ItemsInlist(list) |
---|
51 | |
---|
52 | |
---|
53 | for(ii=0;ii<num;ii+=1) |
---|
54 | item = StringFromList(ii, list , ";") |
---|
55 | FUNCREF proto_V_get_FP f = $item |
---|
56 | Print item ," = ", f(fname) |
---|
57 | endfor |
---|
58 | |
---|
59 | return(0) |
---|
60 | end |
---|
61 | |
---|
62 | Proc Dump_V_getFP_Det(fname,detStr) |
---|
63 | String fname,detStr="FL" |
---|
64 | |
---|
65 | Test_V_get_FP2("V_get*",fname,detStr) |
---|
66 | end |
---|
67 | |
---|
68 | Function Test_V_get_FP2(str,fname,detStr) |
---|
69 | String str,fname,detStr |
---|
70 | |
---|
71 | Variable ii,num |
---|
72 | String list,item |
---|
73 | |
---|
74 | |
---|
75 | list=FunctionList(str,";","NPARAMS:2,VALTYPE:1") //,VALTYPE:1 gives real return values, not strings |
---|
76 | // Print list |
---|
77 | num = ItemsInlist(list) |
---|
78 | |
---|
79 | |
---|
80 | for(ii=0;ii<num;ii+=1) |
---|
81 | item = StringFromList(ii, list , ";") |
---|
82 | FUNCREF proto_V_get_FP2 f = $item |
---|
83 | Print item ," = ", f(fname,detStr) |
---|
84 | endfor |
---|
85 | |
---|
86 | return(0) |
---|
87 | end |
---|
88 | |
---|
89 | |
---|
90 | Proc Dump_V_getSTR(fname) |
---|
91 | String fname |
---|
92 | |
---|
93 | Test_V_get_STR("V_get*",fname) |
---|
94 | end |
---|
95 | |
---|
96 | Function Test_V_get_STR(str,fname) |
---|
97 | String str,fname |
---|
98 | |
---|
99 | Variable ii,num |
---|
100 | String list,item,strToEx |
---|
101 | |
---|
102 | |
---|
103 | list=FunctionList(str,";","NPARAMS:1,VALTYPE:4") |
---|
104 | // Print list |
---|
105 | num = ItemsInlist(list) |
---|
106 | |
---|
107 | |
---|
108 | for(ii=0;ii<num;ii+=1) |
---|
109 | item = StringFromList(ii, list , ";") |
---|
110 | // FUNCREF proto_V_get_STR f = $item |
---|
111 | printf "%s = ",item |
---|
112 | sprintf strToEx,"Print %s(\"%s\")",item,fname |
---|
113 | Execute strToEx |
---|
114 | // print strToEx |
---|
115 | // Print item ," = ", f(fname) |
---|
116 | endfor |
---|
117 | |
---|
118 | return(0) |
---|
119 | end |
---|
120 | |
---|
121 | Proc Dump_V_getSTR_Det(fname,detStr) |
---|
122 | String fname,detStr="FL" |
---|
123 | |
---|
124 | Test_V_get_STR2("V_get*",fname,detStr) |
---|
125 | end |
---|
126 | |
---|
127 | Function Test_V_get_STR2(str,fname,detStr) |
---|
128 | String str,fname,detStr |
---|
129 | |
---|
130 | Variable ii,num |
---|
131 | String list,item,strToEx |
---|
132 | |
---|
133 | |
---|
134 | list=FunctionList(str,";","NPARAMS:2,VALTYPE:4") |
---|
135 | // Print list |
---|
136 | num = ItemsInlist(list) |
---|
137 | |
---|
138 | |
---|
139 | for(ii=0;ii<num;ii+=1) |
---|
140 | item = StringFromList(ii, list , ";") |
---|
141 | // FUNCREF proto_V_get_STR f = $item |
---|
142 | printf "%s = ",item |
---|
143 | sprintf strToEx,"Print %s(\"%s\",\"%s\")",item,fname,detStr |
---|
144 | Execute strToEx |
---|
145 | // print strToEx |
---|
146 | // Print item ," = ", f(fname) |
---|
147 | endfor |
---|
148 | |
---|
149 | return(0) |
---|
150 | end |
---|
151 | /////////////////////////////////////// |
---|
152 | |
---|
153 | |
---|
154 | ////////////////////////////////////////////// |
---|
155 | |
---|
156 | |
---|
157 | /////////////////////// |
---|
158 | // |
---|
159 | // *These are the specific bits of information to retrieve (or write) to the data file |
---|
160 | // *These functions use the path to the file as input, and each has the specific |
---|
161 | // path to the variable srting, or wave hard-coded into the access function |
---|
162 | // *They call the generic worker functions to get the values, either from the local copy if present, |
---|
163 | // or the full file is loaded. |
---|
164 | // |
---|
165 | // *Since the path is the important bit, these are written as get/write pairs to make it easier to |
---|
166 | // keep up with any changes in path |
---|
167 | // |
---|
168 | // |
---|
169 | // TODO -- verify the paths, and add more as needed |
---|
170 | // TODO -- for all of the String functions -- "num" does nothing right now - |
---|
171 | // -- if it ever does, or needs to, a lot of locations will need to be corrected |
---|
172 | // |
---|
173 | |
---|
174 | |
---|
175 | //////// TOP LEVEL |
---|
176 | //////// TOP LEVEL |
---|
177 | //////// TOP LEVEL |
---|
178 | |
---|
179 | //// nexus version used for definitions |
---|
180 | //Function/S V_getNeXus_version(fname) |
---|
181 | // String fname |
---|
182 | // |
---|
183 | // String path = "entry:NeXus_version" |
---|
184 | // Variable num=60 |
---|
185 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
186 | //End |
---|
187 | |
---|
188 | // TODO -- not mine, added somewhere by Nexus writer? |
---|
189 | // data collection time (! this is the true counting time??) |
---|
190 | Function V_getCollectionTime(fname) |
---|
191 | String fname |
---|
192 | |
---|
193 | String path = "entry:collection_time" |
---|
194 | return(V_getRealValueFromHDF5(fname,path)) |
---|
195 | End |
---|
196 | |
---|
197 | // data directory where data files are stored (for user access, not archive) |
---|
198 | Function/S V_getData_directory(fname) |
---|
199 | String fname |
---|
200 | |
---|
201 | String path = "entry:data_directory" |
---|
202 | Variable num=60 |
---|
203 | return(V_getStringFromHDF5(fname,path,num)) |
---|
204 | End |
---|
205 | |
---|
206 | // Base class of Nexus definition (=NXsas) |
---|
207 | Function/S V_getNexusDefinition(fname) |
---|
208 | String fname |
---|
209 | |
---|
210 | String path = "entry:definition" |
---|
211 | Variable num=60 |
---|
212 | return(V_getStringFromHDF5(fname,path,num)) |
---|
213 | End |
---|
214 | |
---|
215 | // TODO -- not mine, added somewhere by Nexus writer? |
---|
216 | // data collection duration (may include pauses, other "dead" time) |
---|
217 | Function V_getDataDuration(fname) |
---|
218 | String fname |
---|
219 | |
---|
220 | String path = "entry:duration" |
---|
221 | return(V_getRealValueFromHDF5(fname,path)) |
---|
222 | End |
---|
223 | |
---|
224 | // TODO -- not mine, added somewhere by Nexus writer? |
---|
225 | // data collection end time |
---|
226 | Function/S V_getDataEndTime(fname) |
---|
227 | String fname |
---|
228 | |
---|
229 | String path = "entry:end_time" |
---|
230 | Variable num=60 |
---|
231 | return(V_getStringFromHDF5(fname,path,num)) |
---|
232 | End |
---|
233 | |
---|
234 | // experiment description |
---|
235 | Function/S V_getExperiment_description(fname) |
---|
236 | String fname |
---|
237 | |
---|
238 | String path = "entry:experiment_description" |
---|
239 | Variable num=60 |
---|
240 | return(V_getStringFromHDF5(fname,path,num)) |
---|
241 | End |
---|
242 | |
---|
243 | // experiment identifier? used only by NICE? |
---|
244 | Function/S V_getExperiment_identifier(fname) |
---|
245 | String fname |
---|
246 | |
---|
247 | String path = "entry:experiment_identifier" |
---|
248 | Variable num=60 |
---|
249 | return(V_getStringFromHDF5(fname,path,num)) |
---|
250 | End |
---|
251 | |
---|
252 | // name of facility = NCNR |
---|
253 | Function/S V_getFacility(fname) |
---|
254 | String fname |
---|
255 | |
---|
256 | String path = "entry:facility" |
---|
257 | Variable num=60 |
---|
258 | return(V_getStringFromHDF5(fname,path,num)) |
---|
259 | End |
---|
260 | |
---|
261 | // **cut in JUNE 2017 |
---|
262 | //// x- should be the file name as saved on disk, currently it's not |
---|
263 | //Function/S V_getFile_name(fname) |
---|
264 | // String fname |
---|
265 | // |
---|
266 | // String path = "entry:file_name" |
---|
267 | // Variable num=60 |
---|
268 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
269 | //End |
---|
270 | |
---|
271 | // **cut in JUNE 2017 |
---|
272 | //// |
---|
273 | //Function/S V_getHDF_version(fname) |
---|
274 | // String fname |
---|
275 | // |
---|
276 | // String path = "entry:hdf_version" |
---|
277 | // Variable num=60 |
---|
278 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
279 | //End |
---|
280 | |
---|
281 | // TODO -- not mine, added somewhere by Nexus writer? |
---|
282 | Function/S V_getProgram_name(fname) |
---|
283 | String fname |
---|
284 | |
---|
285 | String path = "entry:program_name" |
---|
286 | Variable num=60 |
---|
287 | return(V_getStringFromHDF5(fname,path,num)) |
---|
288 | End |
---|
289 | |
---|
290 | // TODO -- not mine, added somewhere by Nexus writer? |
---|
291 | // data collection start time |
---|
292 | Function/S V_getDataStartTime(fname) |
---|
293 | String fname |
---|
294 | |
---|
295 | String path = "entry:start_time" |
---|
296 | Variable num=60 |
---|
297 | return(V_getStringFromHDF5(fname,path,num)) |
---|
298 | End |
---|
299 | |
---|
300 | // title of experiment |
---|
301 | Function/S V_getTitle(fname) |
---|
302 | String fname |
---|
303 | |
---|
304 | String path = "entry:title" |
---|
305 | Variable num=60 |
---|
306 | return(V_getStringFromHDF5(fname,path,num)) |
---|
307 | end |
---|
308 | |
---|
309 | |
---|
310 | |
---|
311 | ////////// USER |
---|
312 | ////////// USER |
---|
313 | ////////// USER |
---|
314 | |
---|
315 | // list of user names |
---|
316 | // x- currently not written out to data file?? |
---|
317 | Function/S V_getUserNames(fname) |
---|
318 | String fname |
---|
319 | |
---|
320 | String path = "entry:user:name" |
---|
321 | Variable num=60 |
---|
322 | return(V_getStringFromHDF5(fname,path,num)) |
---|
323 | end |
---|
324 | |
---|
325 | |
---|
326 | //////// CONTROL |
---|
327 | //////// CONTROL |
---|
328 | //////// CONTROL |
---|
329 | |
---|
330 | // TODO -- for the control section, document each of the fields |
---|
331 | |
---|
332 | // **cut in JUNE 2017 |
---|
333 | //Function/S V_getCount_end(fname) |
---|
334 | // String fname |
---|
335 | // |
---|
336 | // Variable num |
---|
337 | // String path = "entry:control:count_end" |
---|
338 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
339 | //end |
---|
340 | |
---|
341 | // **cut in JUNE 2017 |
---|
342 | // |
---|
343 | //Function/S V_getCount_start(fname) |
---|
344 | // String fname |
---|
345 | // |
---|
346 | // Variable num |
---|
347 | // String path = "entry:control:count_start" |
---|
348 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
349 | //end |
---|
350 | |
---|
351 | |
---|
352 | Function V_getCount_time(fname) |
---|
353 | String fname |
---|
354 | |
---|
355 | String path = "entry:control:count_time" |
---|
356 | return(V_getRealValueFromHDF5(fname,path)) |
---|
357 | end |
---|
358 | |
---|
359 | |
---|
360 | Function V_getCount_time_preset(fname) |
---|
361 | String fname |
---|
362 | |
---|
363 | String path = "entry:control:count_time_preset" |
---|
364 | return(V_getRealValueFromHDF5(fname,path)) |
---|
365 | end |
---|
366 | |
---|
367 | |
---|
368 | Function V_getDetector_counts(fname) |
---|
369 | String fname |
---|
370 | |
---|
371 | String path = "entry:control:detector_counts" |
---|
372 | return(V_getRealValueFromHDF5(fname,path)) |
---|
373 | end |
---|
374 | |
---|
375 | |
---|
376 | Function V_getDetector_preset(fname) |
---|
377 | String fname |
---|
378 | |
---|
379 | String path = "entry:control:detector_preset" |
---|
380 | return(V_getRealValueFromHDF5(fname,path)) |
---|
381 | end |
---|
382 | |
---|
383 | // **cut in JUNE 2017 |
---|
384 | // |
---|
385 | //Function V_getIntegral(fname) |
---|
386 | // String fname |
---|
387 | // |
---|
388 | // String path = "entry:control:integral" |
---|
389 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
390 | //end |
---|
391 | |
---|
392 | // control mode for data acquisition, "timer" |
---|
393 | // TODO - what are the enumerated types for this? |
---|
394 | Function/S V_getControlMode(fname) |
---|
395 | String fname |
---|
396 | |
---|
397 | String path = "entry:control:mode" |
---|
398 | Variable num=60 |
---|
399 | return(V_getStringFromHDF5(fname,path,num)) |
---|
400 | End |
---|
401 | |
---|
402 | //monitor count |
---|
403 | // TODO - verify that this is the correct monitor |
---|
404 | Function V_getMonitorCount(fname) |
---|
405 | String fname |
---|
406 | |
---|
407 | String path = "entry:control:monitor_counts" |
---|
408 | return(V_getRealValueFromHDF5(fname,path)) |
---|
409 | end |
---|
410 | |
---|
411 | Function V_getMonitor_preset(fname) |
---|
412 | String fname |
---|
413 | |
---|
414 | String path = "entry:control:monitor_preset" |
---|
415 | return(V_getRealValueFromHDF5(fname,path)) |
---|
416 | end |
---|
417 | |
---|
418 | // **cut in JUNE 2017 |
---|
419 | // - what are the enumerated types for this? |
---|
420 | //Function/S V_getPreset(fname) |
---|
421 | // String fname |
---|
422 | // |
---|
423 | // Variable num |
---|
424 | // String path = "entry:control:preset" |
---|
425 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
426 | //end |
---|
427 | |
---|
428 | |
---|
429 | |
---|
430 | |
---|
431 | |
---|
432 | //////// INSTRUMENT |
---|
433 | //////// INSTRUMENT |
---|
434 | //////// INSTRUMENT |
---|
435 | |
---|
436 | // x- this does not appear to be written out |
---|
437 | Function/S V_getLocalContact(fname) |
---|
438 | String fname |
---|
439 | |
---|
440 | String path = "entry:instrument:local_contact" |
---|
441 | Variable num=60 |
---|
442 | return(V_getStringFromHDF5(fname,path,num)) |
---|
443 | End |
---|
444 | |
---|
445 | Function/S V_getInstrumentName(fname) |
---|
446 | String fname |
---|
447 | |
---|
448 | String path = "entry:instrument:name" |
---|
449 | Variable num=60 |
---|
450 | return(V_getStringFromHDF5(fname,path,num)) |
---|
451 | End |
---|
452 | |
---|
453 | Function/S V_getInstrumentType(fname) |
---|
454 | String fname |
---|
455 | |
---|
456 | String path = "entry:instrument:type" |
---|
457 | Variable num=60 |
---|
458 | return(V_getStringFromHDF5(fname,path,num)) |
---|
459 | End |
---|
460 | |
---|
461 | ////// INSTRUMENT/ATTENUATOR |
---|
462 | // TODO - be sure of the definition of these terms |
---|
463 | // |
---|
464 | |
---|
465 | // transmission value for the attenuator in the beam |
---|
466 | // use this, but if something wrong, the tables are present |
---|
467 | Function V_getAttenuator_transmission(fname) |
---|
468 | String fname |
---|
469 | |
---|
470 | Print "Atten read - diverted to calculation" |
---|
471 | return(V_CalculateAttenuationFactor(fname)) |
---|
472 | |
---|
473 | // String path = "entry:instrument:attenuator:attenuator_transmission" |
---|
474 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
475 | |
---|
476 | end |
---|
477 | |
---|
478 | // transmission value (error) for the attenuator in the beam |
---|
479 | // use this, but if something wrong, the tables are present |
---|
480 | Function V_getAttenuator_trans_err(fname) |
---|
481 | String fname |
---|
482 | |
---|
483 | Print "Atten_err read - diverted to calculation" |
---|
484 | return(V_CalculateAttenuationError(fname)) |
---|
485 | |
---|
486 | // String path = "entry:instrument:attenuator:attenuator_transmission_error" |
---|
487 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
488 | |
---|
489 | end |
---|
490 | |
---|
491 | // desired thickness |
---|
492 | Function V_getAtten_desired_thickness(fname) |
---|
493 | String fname |
---|
494 | |
---|
495 | String path = "entry:instrument:attenuator:desired_thickness" |
---|
496 | return(V_getRealValueFromHDF5(fname,path)) |
---|
497 | end |
---|
498 | |
---|
499 | |
---|
500 | // distance from the attenuator to the sample (units??) |
---|
501 | Function V_getAttenDistance(fname) |
---|
502 | String fname |
---|
503 | |
---|
504 | String path = "entry:instrument:attenuator:distance" |
---|
505 | return(V_getRealValueFromHDF5(fname,path)) |
---|
506 | end |
---|
507 | |
---|
508 | |
---|
509 | |
---|
510 | // table of the attenuation factor error |
---|
511 | Function/WAVE V_getAttenIndex_error_table(fname) |
---|
512 | String fname |
---|
513 | |
---|
514 | String path = "entry:instrument:attenuator:index_error_table" |
---|
515 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
516 | |
---|
517 | return w |
---|
518 | end |
---|
519 | |
---|
520 | // table of the attenuation factor |
---|
521 | Function/WAVE V_getAttenIndex_table(fname) |
---|
522 | String fname |
---|
523 | |
---|
524 | String path = "entry:instrument:attenuator:index_table" |
---|
525 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
526 | |
---|
527 | return w |
---|
528 | end |
---|
529 | |
---|
530 | // |
---|
531 | //// status "in or out" |
---|
532 | //Function/S V_getAttenStatus(fname) |
---|
533 | // String fname |
---|
534 | // |
---|
535 | // String path = "entry:instrument:attenuator:status" |
---|
536 | // Variable num=60 |
---|
537 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
538 | //End |
---|
539 | |
---|
540 | //// this is the "number" of attenuators dropped in the beam - and should be |
---|
541 | // what I can use to lookup the actual attenuator transmission |
---|
542 | Function V_getAtten_number(fname) |
---|
543 | String fname |
---|
544 | |
---|
545 | String path = "entry:instrument:attenuator:num_atten_dropped" |
---|
546 | return(V_getRealValueFromHDF5(fname,path)) |
---|
547 | end |
---|
548 | |
---|
549 | // thickness of the attenuator (PMMA) - units?? |
---|
550 | Function V_getAttenThickness(fname) |
---|
551 | String fname |
---|
552 | |
---|
553 | String path = "entry:instrument:attenuator:thickness" |
---|
554 | return(V_getRealValueFromHDF5(fname,path)) |
---|
555 | end |
---|
556 | |
---|
557 | |
---|
558 | // type of material for the atteunator |
---|
559 | Function/S V_getAttenType(fname) |
---|
560 | String fname |
---|
561 | |
---|
562 | String path = "entry:instrument:attenuator:type" |
---|
563 | Variable num=60 |
---|
564 | return(V_getStringFromHDF5(fname,path,num)) |
---|
565 | End |
---|
566 | |
---|
567 | |
---|
568 | ////// INSTRUMENT/BEAM |
---|
569 | // instrument/beam/analyzer (data folder) |
---|
570 | // this is the He3 analyzer, after the sample (but first alphabetically) |
---|
571 | // TODO -- document what all of the fields represent, and what are the most important to "key" on to read |
---|
572 | // |
---|
573 | Function V_getAnalyzer_depth(fname) |
---|
574 | String fname |
---|
575 | |
---|
576 | String path = "entry:instrument:beam:analyzer:depth" |
---|
577 | return(V_getRealValueFromHDF5(fname,path)) |
---|
578 | end |
---|
579 | |
---|
580 | Function/S V_getAnalyzer_direction(fname) |
---|
581 | String fname |
---|
582 | |
---|
583 | String path = "entry:instrument:beam:analyzer:direction" |
---|
584 | Variable num=60 |
---|
585 | return(V_getStringFromHDF5(fname,path,num)) |
---|
586 | End |
---|
587 | |
---|
588 | Function V_getAnalyzer_height(fname) |
---|
589 | String fname |
---|
590 | |
---|
591 | String path = "entry:instrument:beam:analyzer:height" |
---|
592 | return(V_getRealValueFromHDF5(fname,path)) |
---|
593 | end |
---|
594 | |
---|
595 | // ?? TODO is this equivalent to "status" -- ?? 0|1 |
---|
596 | Function V_getAnalyzer_inBeam(fname) |
---|
597 | String fname |
---|
598 | |
---|
599 | String path = "entry:instrument:beam:analyzer:inBeam" |
---|
600 | return(V_getRealValueFromHDF5(fname,path)) |
---|
601 | end |
---|
602 | |
---|
603 | Function V_getAnalyzer_innerDiameter(fname) |
---|
604 | String fname |
---|
605 | |
---|
606 | String path = "entry:instrument:beam:analyzer:innerDiameter" |
---|
607 | return(V_getRealValueFromHDF5(fname,path)) |
---|
608 | end |
---|
609 | |
---|
610 | // one of the most important |
---|
611 | Function/S V_getAnalyzer_name(fname) |
---|
612 | String fname |
---|
613 | |
---|
614 | String path = "entry:instrument:beam:analyzer:name" |
---|
615 | Variable num=60 |
---|
616 | return(V_getStringFromHDF5(fname,path,num)) |
---|
617 | End |
---|
618 | |
---|
619 | Function V_getAnalyzer_opacityAt1Ang(fname) |
---|
620 | String fname |
---|
621 | |
---|
622 | String path = "entry:instrument:beam:analyzer:opacityAt1Ang" |
---|
623 | return(V_getRealValueFromHDF5(fname,path)) |
---|
624 | end |
---|
625 | |
---|
626 | Function V_getAnalyzer_opacityAt1Ang_err(fname) |
---|
627 | String fname |
---|
628 | |
---|
629 | String path = "entry:instrument:beam:analyzer:opacityAt1AngStd" |
---|
630 | return(V_getRealValueFromHDF5(fname,path)) |
---|
631 | end |
---|
632 | |
---|
633 | Function V_getAnalyzer_outerDiameter(fname) |
---|
634 | String fname |
---|
635 | |
---|
636 | String path = "entry:instrument:beam:analyzer:outerDiameter" |
---|
637 | return(V_getRealValueFromHDF5(fname,path)) |
---|
638 | end |
---|
639 | |
---|
640 | Function/S V_getAnalyzer_shape(fname) |
---|
641 | String fname |
---|
642 | |
---|
643 | String path = "entry:instrument:beam:analyzer:shape" |
---|
644 | Variable num=60 |
---|
645 | return(V_getStringFromHDF5(fname,path,num)) |
---|
646 | End |
---|
647 | |
---|
648 | Function V_getAnalyzer_tE(fname) |
---|
649 | String fname |
---|
650 | |
---|
651 | String path = "entry:instrument:beam:analyzer:tE" |
---|
652 | return(V_getRealValueFromHDF5(fname,path)) |
---|
653 | end |
---|
654 | |
---|
655 | Function V_getAnalyzer_tE_err(fname) |
---|
656 | String fname |
---|
657 | |
---|
658 | String path = "entry:instrument:beam:analyzer:tEStd" |
---|
659 | return(V_getRealValueFromHDF5(fname,path)) |
---|
660 | end |
---|
661 | |
---|
662 | Function/S V_getAnalyzer_type(fname) |
---|
663 | String fname |
---|
664 | |
---|
665 | String path = "entry:instrument:beam:analyzer:type" |
---|
666 | Variable num=60 |
---|
667 | return(V_getStringFromHDF5(fname,path,num)) |
---|
668 | End |
---|
669 | |
---|
670 | |
---|
671 | Function V_getAnalyzer_width(fname) |
---|
672 | String fname |
---|
673 | |
---|
674 | String path = "entry:instrument:beam:analyzer:width" |
---|
675 | return(V_getRealValueFromHDF5(fname,path)) |
---|
676 | end |
---|
677 | |
---|
678 | |
---|
679 | // instrument/beam/chopper (data folder) |
---|
680 | Function V_getChopperAngular_opening(fname) |
---|
681 | String fname |
---|
682 | |
---|
683 | String path = "entry:instrument:beam:chopper:angular_opening" |
---|
684 | return(V_getRealValueFromHDF5(fname,path)) |
---|
685 | end |
---|
686 | |
---|
687 | Function V_getChopDistance_from_sample(fname) |
---|
688 | String fname |
---|
689 | |
---|
690 | String path = "entry:instrument:beam:chopper:distance_from_sample" |
---|
691 | return(V_getRealValueFromHDF5(fname,path)) |
---|
692 | end |
---|
693 | |
---|
694 | Function V_getChopDistance_from_source(fname) |
---|
695 | String fname |
---|
696 | |
---|
697 | String path = "entry:instrument:beam:chopper:distance_from_source" |
---|
698 | return(V_getRealValueFromHDF5(fname,path)) |
---|
699 | end |
---|
700 | |
---|
701 | Function V_getChopperDuty_cycle(fname) |
---|
702 | String fname |
---|
703 | |
---|
704 | String path = "entry:instrument:beam:chopper:duty_cycle" |
---|
705 | return(V_getRealValueFromHDF5(fname,path)) |
---|
706 | end |
---|
707 | |
---|
708 | Function V_getChopperRotation_speed(fname) |
---|
709 | String fname |
---|
710 | |
---|
711 | String path = "entry:instrument:beam:chopper:rotation_speed" |
---|
712 | return(V_getRealValueFromHDF5(fname,path)) |
---|
713 | end |
---|
714 | |
---|
715 | Function V_getChopperSlits(fname) |
---|
716 | String fname |
---|
717 | |
---|
718 | String path = "entry:instrument:beam:chopper:slits" |
---|
719 | return(V_getRealValueFromHDF5(fname,path)) |
---|
720 | end |
---|
721 | |
---|
722 | Function/S V_getChopperStatus(fname) |
---|
723 | String fname |
---|
724 | |
---|
725 | String path = "entry:instrument:beam:chopper:status" |
---|
726 | Variable num=60 |
---|
727 | return(V_getStringFromHDF5(fname,path,num)) |
---|
728 | End |
---|
729 | |
---|
730 | Function/S V_getChopperType(fname) |
---|
731 | String fname |
---|
732 | |
---|
733 | String path = "entry:instrument:beam:chopper:type" |
---|
734 | Variable num=60 |
---|
735 | return(V_getStringFromHDF5(fname,path,num)) |
---|
736 | End |
---|
737 | |
---|
738 | |
---|
739 | // instrument/beam/flipperPolarizer (data folder) |
---|
740 | // this is upstream, after the supermirror but before the sample |
---|
741 | |
---|
742 | Function/S V_getflipperPolarizer_Direction(fname) |
---|
743 | String fname |
---|
744 | |
---|
745 | String path = "entry:instrument:beam:flipperPolarizer:direction" |
---|
746 | Variable num=60 |
---|
747 | return(V_getStringFromHDF5(fname,path,num)) |
---|
748 | End |
---|
749 | |
---|
750 | Function V_getflipperPolarizer_inBeam(fname) |
---|
751 | String fname |
---|
752 | |
---|
753 | String path = "entry:instrument:beam:flipperPolarizer:inBeam" |
---|
754 | return(V_getRealValueFromHDF5(fname,path)) |
---|
755 | end |
---|
756 | |
---|
757 | Function/S V_getflipperPolarizer_Type(fname) |
---|
758 | String fname |
---|
759 | |
---|
760 | String path = "entry:instrument:beam:flipperPolarizer:type" |
---|
761 | Variable num=60 |
---|
762 | return(V_getStringFromHDF5(fname,path,num)) |
---|
763 | End |
---|
764 | |
---|
765 | |
---|
766 | |
---|
767 | //Function V_getFlipperDriving_current(fname) |
---|
768 | // String fname |
---|
769 | // |
---|
770 | // String path = "entry:instrument:beam:flipper:driving_current" |
---|
771 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
772 | //end |
---|
773 | // |
---|
774 | //Function V_getFlipperFrequency(fname) |
---|
775 | // String fname |
---|
776 | // |
---|
777 | // String path = "entry:instrument:beam:flipper:frequency" |
---|
778 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
779 | //end |
---|
780 | // |
---|
781 | //Function/S V_getFlipperstatus(fname) |
---|
782 | // String fname |
---|
783 | // |
---|
784 | // String path = "entry:instrument:beam:flipper:status" |
---|
785 | // Variable num=60 |
---|
786 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
787 | //End |
---|
788 | // |
---|
789 | //Function V_getFlipperTransmitted_power(fname) |
---|
790 | // String fname |
---|
791 | // |
---|
792 | // String path = "entry:instrument:beam:flipper:transmitted_power" |
---|
793 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
794 | //end |
---|
795 | // |
---|
796 | //Function/S V_getFlipperWaveform(fname) |
---|
797 | // String fname |
---|
798 | // |
---|
799 | // String path = "entry:instrument:beam:flipper:waveform" |
---|
800 | // Variable num=60 |
---|
801 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
802 | //End |
---|
803 | |
---|
804 | |
---|
805 | |
---|
806 | // instrument/beam/monochromator (data folder) |
---|
807 | Function/S V_getMonochromatorType(fname) |
---|
808 | String fname |
---|
809 | |
---|
810 | String path = "entry:instrument:beam:monochromator:type" |
---|
811 | Variable num=60 |
---|
812 | return(V_getStringFromHDF5(fname,path,num)) |
---|
813 | End |
---|
814 | |
---|
815 | Function V_getWavelength(fname) |
---|
816 | String fname |
---|
817 | |
---|
818 | String path = "entry:instrument:beam:monochromator:wavelength" |
---|
819 | return(V_getRealValueFromHDF5(fname,path)) |
---|
820 | end |
---|
821 | |
---|
822 | Function V_getWavelength_spread(fname) |
---|
823 | String fname |
---|
824 | |
---|
825 | String path = "entry:instrument:beam:monochromator:wavelength_spread" |
---|
826 | return(V_getRealValueFromHDF5(fname,path)) |
---|
827 | end |
---|
828 | |
---|
829 | // instrument/beam/monochromator/crystal (data folder) |
---|
830 | Function V_getCrystalDistance(fname) |
---|
831 | String fname |
---|
832 | |
---|
833 | String path = "entry:instrument:beam:monochromator:crystal:distance" |
---|
834 | return(V_getRealValueFromHDF5(fname,path)) |
---|
835 | end |
---|
836 | |
---|
837 | Function V_getCrystalEnergy(fname) |
---|
838 | String fname |
---|
839 | |
---|
840 | String path = "entry:instrument:beam:monochromator:crystal:energy" |
---|
841 | return(V_getRealValueFromHDF5(fname,path)) |
---|
842 | end |
---|
843 | |
---|
844 | Function V_getCrystalHorizontal_aperture(fname) |
---|
845 | String fname |
---|
846 | |
---|
847 | String path = "entry:instrument:beam:monochromator:crystal:horizontal_aperture" |
---|
848 | return(V_getRealValueFromHDF5(fname,path)) |
---|
849 | end |
---|
850 | |
---|
851 | Function V_getCrystalHoriz_curvature(fname) |
---|
852 | String fname |
---|
853 | |
---|
854 | String path = "entry:instrument:beam:monochromator:crystal:horizontal_curvature" |
---|
855 | return(V_getRealValueFromHDF5(fname,path)) |
---|
856 | end |
---|
857 | |
---|
858 | Function V_getCrystalLattice_parameter(fname) |
---|
859 | String fname |
---|
860 | |
---|
861 | String path = "entry:instrument:beam:monochromator:crystal:lattice_parameter" |
---|
862 | return(V_getRealValueFromHDF5(fname,path)) |
---|
863 | end |
---|
864 | |
---|
865 | Function V_getCrystalReflection(fname) |
---|
866 | String fname |
---|
867 | |
---|
868 | String path = "entry:instrument:beam:monochromator:crystal:reflection" |
---|
869 | return(V_getRealValueFromHDF5(fname,path)) |
---|
870 | end |
---|
871 | |
---|
872 | Function V_getCrystalRotation(fname) |
---|
873 | String fname |
---|
874 | |
---|
875 | String path = "entry:instrument:beam:monochromator:crystal:rotation" |
---|
876 | return(V_getRealValueFromHDF5(fname,path)) |
---|
877 | end |
---|
878 | |
---|
879 | Function/S V_getCrystalStatus(fname) |
---|
880 | String fname |
---|
881 | |
---|
882 | String path = "entry:instrument:beam:monochromator:crystal:status" |
---|
883 | Variable num=60 |
---|
884 | return(V_getStringFromHDF5(fname,path,num)) |
---|
885 | End |
---|
886 | |
---|
887 | Function V_getCrystalVertical_aperture(fname) |
---|
888 | String fname |
---|
889 | |
---|
890 | String path = "entry:instrument:beam:monochromator:crystal:vertical_aperture" |
---|
891 | return(V_getRealValueFromHDF5(fname,path)) |
---|
892 | end |
---|
893 | |
---|
894 | Function V_getCrystalVertical_curvature(fname) |
---|
895 | String fname |
---|
896 | |
---|
897 | String path = "entry:instrument:beam:monochromator:crystal:vertical_curvature" |
---|
898 | return(V_getRealValueFromHDF5(fname,path)) |
---|
899 | end |
---|
900 | |
---|
901 | Function V_getCrystalWavelength(fname) |
---|
902 | String fname |
---|
903 | |
---|
904 | String path = "entry:instrument:beam:monochromator:crystal:wavelength" |
---|
905 | return(V_getRealValueFromHDF5(fname,path)) |
---|
906 | end |
---|
907 | |
---|
908 | Function V_getCrystalWavelength_spread(fname) |
---|
909 | String fname |
---|
910 | |
---|
911 | String path = "entry:instrument:beam:monochromator:crystal:wavelength_spread" |
---|
912 | return(V_getRealValueFromHDF5(fname,path)) |
---|
913 | end |
---|
914 | |
---|
915 | Function V_getCrystalWavevector(fname) |
---|
916 | String fname |
---|
917 | |
---|
918 | String path = "entry:instrument:beam:monochromator:crystal:wavevector" |
---|
919 | return(V_getRealValueFromHDF5(fname,path)) |
---|
920 | end |
---|
921 | |
---|
922 | // instrument/beam/monochromator/velocity_selector (data folder) |
---|
923 | Function V_getVSDistance(fname) |
---|
924 | String fname |
---|
925 | |
---|
926 | String path = "entry:instrument:beam:monochromator:velocity_selector:distance" |
---|
927 | return(V_getRealValueFromHDF5(fname,path)) |
---|
928 | end |
---|
929 | |
---|
930 | Function V_getVSRotation_speed(fname) |
---|
931 | String fname |
---|
932 | |
---|
933 | String path = "entry:instrument:beam:monochromator:velocity_selector:rotation_speed" |
---|
934 | return(V_getRealValueFromHDF5(fname,path)) |
---|
935 | end |
---|
936 | |
---|
937 | Function/S V_getVelSelStatus(fname) |
---|
938 | String fname |
---|
939 | |
---|
940 | String path = "entry:instrument:beam:monochromator:velocity_selector:status" |
---|
941 | Variable num=60 |
---|
942 | return(V_getStringFromHDF5(fname,path,num)) |
---|
943 | End |
---|
944 | |
---|
945 | Function/WAVE V_getVSTable_parameters(fname) |
---|
946 | String fname |
---|
947 | |
---|
948 | String path = "entry:instrument:beam:monochromator:velocity_selector:table_parameters" |
---|
949 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
950 | |
---|
951 | return w |
---|
952 | end |
---|
953 | |
---|
954 | //// DONE - this does not exist for VSANS - per JGB 4/2016 |
---|
955 | //Function V_getVS_tilt(fname) |
---|
956 | // String fname |
---|
957 | // |
---|
958 | // String path = "entry:instrument:beam:monochromator:velocity_selector:vs_tilt" |
---|
959 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
960 | //end |
---|
961 | |
---|
962 | Function V_getVSWavelength(fname) |
---|
963 | String fname |
---|
964 | |
---|
965 | String path = "entry:instrument:beam:monochromator:velocity_selector:wavelength" |
---|
966 | return(V_getRealValueFromHDF5(fname,path)) |
---|
967 | end |
---|
968 | |
---|
969 | Function V_getVSWavelength_spread(fname) |
---|
970 | String fname |
---|
971 | |
---|
972 | String path = "entry:instrument:beam:monochromator:velocity_selector:wavelength_spread" |
---|
973 | return(V_getRealValueFromHDF5(fname,path)) |
---|
974 | end |
---|
975 | |
---|
976 | // instrument/beam/monochromator/white_beam (data folder) |
---|
977 | Function/S V_getWhiteBeamStatus(fname) |
---|
978 | String fname |
---|
979 | |
---|
980 | String path = "entry:instrument:beam:monochromator:white_beam:status" |
---|
981 | Variable num=60 |
---|
982 | return(V_getStringFromHDF5(fname,path,num)) |
---|
983 | End |
---|
984 | |
---|
985 | Function V_getWhiteBeamWavelength(fname) |
---|
986 | String fname |
---|
987 | |
---|
988 | String path = "entry:instrument:beam:monochromator:white_beam:wavelength" |
---|
989 | return(V_getRealValueFromHDF5(fname,path)) |
---|
990 | end |
---|
991 | |
---|
992 | Function V_getWhiteBeamWavelength_spread(fname) |
---|
993 | String fname |
---|
994 | |
---|
995 | String path = "entry:instrument:beam:monochromator:white_beam:wavelength_spread" |
---|
996 | return(V_getRealValueFromHDF5(fname,path)) |
---|
997 | end |
---|
998 | |
---|
999 | // instrument/beam/superMirror (data folder) |
---|
1000 | // This is the upstream polarizer. There are no other choices for polarizer on VSANS |
---|
1001 | Function/S V_getPolarizerComposition(fname) |
---|
1002 | String fname |
---|
1003 | |
---|
1004 | String path = "entry:instrument:beam:superMirror:composition" |
---|
1005 | Variable num=60 |
---|
1006 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1007 | End |
---|
1008 | |
---|
1009 | Function V_getPolarizerEfficiency(fname) |
---|
1010 | String fname |
---|
1011 | |
---|
1012 | String path = "entry:instrument:beam:superMirror:efficiency" |
---|
1013 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1014 | end |
---|
1015 | |
---|
1016 | Function/S V_getPolarizerState(fname) |
---|
1017 | String fname |
---|
1018 | |
---|
1019 | String path = "entry:instrument:beam:superMirror:state" |
---|
1020 | Variable num=60 |
---|
1021 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1022 | End |
---|
1023 | |
---|
1024 | //Function/S V_getPolarizerType(fname) |
---|
1025 | // String fname |
---|
1026 | // |
---|
1027 | // String path = "entry:instrument:beam:polarizer:type" |
---|
1028 | // Variable num=60 |
---|
1029 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
1030 | //End |
---|
1031 | |
---|
1032 | //// instrument/beam/polarizer_analyzer (data folder) |
---|
1033 | //Function V_getPolAnaCell_index(fname) |
---|
1034 | // String fname |
---|
1035 | // |
---|
1036 | // String path = "entry:instrument:beam:polarizer_analyzer:cell_index" |
---|
1037 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
1038 | //End |
---|
1039 | // |
---|
1040 | //Function/S V_getPolAnaCell_name(fname) |
---|
1041 | // String fname |
---|
1042 | // |
---|
1043 | // String path = "entry:instrument:beam:polarizer_analyzer:cell_name" |
---|
1044 | // Variable num=60 |
---|
1045 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
1046 | //End |
---|
1047 | // |
---|
1048 | //Function/WAVE V_getPolAnaCell_parameters(fname) |
---|
1049 | // String fname |
---|
1050 | // |
---|
1051 | // String path = "entry:instrument:beam:polarizer_analyzer:cell_parameters" |
---|
1052 | // WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
1053 | // |
---|
1054 | // return w |
---|
1055 | //End |
---|
1056 | // |
---|
1057 | //Function V_getPolAnaGuideFieldCur_1(fname) |
---|
1058 | // String fname |
---|
1059 | // |
---|
1060 | // String path = "entry:instrument:beam:polarizer_analyzer:guide_field_current_1" |
---|
1061 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
1062 | //End |
---|
1063 | // |
---|
1064 | //Function V_getPolAnaGuideFieldCur_2(fname) |
---|
1065 | // String fname |
---|
1066 | // |
---|
1067 | // String path = "entry:instrument:beam:polarizer_analyzer:guide_field_current_2" |
---|
1068 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
1069 | //End |
---|
1070 | // |
---|
1071 | //Function V_getPolAnaSolenoid_current(fname) |
---|
1072 | // String fname |
---|
1073 | // |
---|
1074 | // String path = "entry:instrument:beam:polarizer_analyzer:solenoid_current" |
---|
1075 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
1076 | //End |
---|
1077 | // |
---|
1078 | //Function/S V_getPolAnaStatus(fname) |
---|
1079 | // String fname |
---|
1080 | // |
---|
1081 | // String path = "entry:instrument:beam:polarizer_analyzer:status" |
---|
1082 | // Variable num=60 |
---|
1083 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
1084 | //End |
---|
1085 | |
---|
1086 | |
---|
1087 | /////// INSTRUMENT/BEAM MONITORS |
---|
1088 | |
---|
1089 | //beam_monitor_low (data folder) |
---|
1090 | Function V_getBeamMonLowData(fname) |
---|
1091 | String fname |
---|
1092 | |
---|
1093 | String path = "entry:instrument:beam_monitor_low:data" |
---|
1094 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1095 | End |
---|
1096 | |
---|
1097 | Function V_getBeamMonLowDistance(fname) |
---|
1098 | String fname |
---|
1099 | |
---|
1100 | String path = "entry:instrument:beam_monitor_low:distance" |
---|
1101 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1102 | End |
---|
1103 | |
---|
1104 | Function V_getBeamMonLowEfficiency(fname) |
---|
1105 | String fname |
---|
1106 | |
---|
1107 | String path = "entry:instrument:beam_monitor_low:efficiency" |
---|
1108 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1109 | End |
---|
1110 | |
---|
1111 | Function V_getBeamMonLowSaved_count(fname) |
---|
1112 | String fname |
---|
1113 | |
---|
1114 | String path = "entry:instrument:beam_monitor_low:saved_count" |
---|
1115 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1116 | End |
---|
1117 | |
---|
1118 | Function/S V_getBeamMonLowType(fname) |
---|
1119 | String fname |
---|
1120 | |
---|
1121 | String path = "entry:instrument:beam_monitor_low:type" |
---|
1122 | Variable num=60 |
---|
1123 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1124 | End |
---|
1125 | |
---|
1126 | //beam_monitor_norm (data folder) |
---|
1127 | Function V_getBeamMonNormData(fname) |
---|
1128 | String fname |
---|
1129 | |
---|
1130 | String path = "entry:instrument:beam_monitor_norm:data" |
---|
1131 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1132 | End |
---|
1133 | |
---|
1134 | Function V_getBeamMonNormDistance(fname) |
---|
1135 | String fname |
---|
1136 | |
---|
1137 | String path = "entry:instrument:beam_monitor_norm:distance" |
---|
1138 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1139 | End |
---|
1140 | |
---|
1141 | Function V_getBeamMonNormEfficiency(fname) |
---|
1142 | String fname |
---|
1143 | |
---|
1144 | String path = "entry:instrument:beam_monitor_norm:efficiency" |
---|
1145 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1146 | End |
---|
1147 | |
---|
1148 | Function V_getBeamMonNormSaved_count(fname) |
---|
1149 | String fname |
---|
1150 | |
---|
1151 | String path = "entry:instrument:beam_monitor_norm:saved_count" |
---|
1152 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1153 | End |
---|
1154 | |
---|
1155 | Function/S V_getBeamMonNormType(fname) |
---|
1156 | String fname |
---|
1157 | |
---|
1158 | String path = "entry:instrument:beam_monitor_norm:type" |
---|
1159 | Variable num=60 |
---|
1160 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1161 | End |
---|
1162 | |
---|
1163 | //beam_stop C2 (data folder) |
---|
1164 | Function/S V_getBeamStopC2Description(fname) |
---|
1165 | String fname |
---|
1166 | |
---|
1167 | String path = "entry:instrument:beam_stop_C2:description" |
---|
1168 | Variable num=60 |
---|
1169 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1170 | End |
---|
1171 | |
---|
1172 | Function V_getBeamStopC2Dist_to_det(fname) |
---|
1173 | String fname |
---|
1174 | |
---|
1175 | String path = "entry:instrument:beam_stop_C2:distance_to_detector" |
---|
1176 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1177 | End |
---|
1178 | |
---|
1179 | //TODO -- not sure what this really means |
---|
1180 | Function V_getBeamStopC2num_beamstops(fname) |
---|
1181 | String fname |
---|
1182 | |
---|
1183 | String path = "entry:instrument:beam_stop_C2:num_beamstops" |
---|
1184 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1185 | End |
---|
1186 | |
---|
1187 | Function V_getBeamStopC2_x_pos(fname) |
---|
1188 | String fname |
---|
1189 | |
---|
1190 | String path = "entry:instrument:beam_stop_C2:x_pos" |
---|
1191 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1192 | End |
---|
1193 | |
---|
1194 | Function V_getBeamStopC2_y_pos(fname) |
---|
1195 | String fname |
---|
1196 | |
---|
1197 | String path = "entry:instrument:beam_stop_C2:y_pos" |
---|
1198 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1199 | End |
---|
1200 | |
---|
1201 | // beam stop shape parameters |
---|
1202 | Function V_getBeamStopC2_height(fname) |
---|
1203 | String fname |
---|
1204 | |
---|
1205 | String path = "entry:instrument:beam_stop_C2:shape:height" |
---|
1206 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1207 | End |
---|
1208 | |
---|
1209 | Function/S V_getBeamStopC2_shape(fname) |
---|
1210 | String fname |
---|
1211 | |
---|
1212 | Variable num=60 |
---|
1213 | String path = "entry:instrument:beam_stop_C2:shape:shape" |
---|
1214 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1215 | End |
---|
1216 | |
---|
1217 | // == diameter if shape = CIRCLE |
---|
1218 | Function V_getBeamStopC2_size(fname) |
---|
1219 | String fname |
---|
1220 | |
---|
1221 | String path = "entry:instrument:beam_stop_C2:shape:size" |
---|
1222 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1223 | End |
---|
1224 | |
---|
1225 | Function V_getBeamStopC2_width(fname) |
---|
1226 | String fname |
---|
1227 | |
---|
1228 | String path = "entry:instrument:beam_stop_C2:shape:width" |
---|
1229 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1230 | End |
---|
1231 | |
---|
1232 | |
---|
1233 | |
---|
1234 | //beam_stop C3 (data folder) |
---|
1235 | Function/S V_getBeamStopC3Description(fname) |
---|
1236 | String fname |
---|
1237 | |
---|
1238 | String path = "entry:instrument:beam_stop_C3:description" |
---|
1239 | Variable num=60 |
---|
1240 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1241 | End |
---|
1242 | |
---|
1243 | Function V_getBeamStopC3Dist_to_det(fname) |
---|
1244 | String fname |
---|
1245 | |
---|
1246 | String path = "entry:instrument:beam_stop_C3:distance_to_detector" |
---|
1247 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1248 | End |
---|
1249 | |
---|
1250 | //TODO -- not sure what this really means |
---|
1251 | Function V_getBeamStopC3num_beamstops(fname) |
---|
1252 | String fname |
---|
1253 | |
---|
1254 | String path = "entry:instrument:beam_stop_C3:num_beamstops" |
---|
1255 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1256 | End |
---|
1257 | |
---|
1258 | Function V_getBeamStopC3_x_pos(fname) |
---|
1259 | String fname |
---|
1260 | |
---|
1261 | String path = "entry:instrument:beam_stop_C3:x_pos" |
---|
1262 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1263 | End |
---|
1264 | |
---|
1265 | Function V_getBeamStopC3_y_pos(fname) |
---|
1266 | String fname |
---|
1267 | |
---|
1268 | String path = "entry:instrument:beam_stop_C3:y_pos" |
---|
1269 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1270 | End |
---|
1271 | |
---|
1272 | // beam stop shape parameters |
---|
1273 | Function V_getBeamStopC3_height(fname) |
---|
1274 | String fname |
---|
1275 | |
---|
1276 | String path = "entry:instrument:beam_stop_C3:shape:height" |
---|
1277 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1278 | End |
---|
1279 | |
---|
1280 | Function/S V_getBeamStopC3_shape(fname) |
---|
1281 | String fname |
---|
1282 | |
---|
1283 | Variable num=60 |
---|
1284 | String path = "entry:instrument:beam_stop_C3:shape:shape" |
---|
1285 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1286 | End |
---|
1287 | |
---|
1288 | // == diameter if shape = CIRCLE |
---|
1289 | Function V_getBeamStopC3_size(fname) |
---|
1290 | String fname |
---|
1291 | |
---|
1292 | String path = "entry:instrument:beam_stop_C3:shape:size" |
---|
1293 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1294 | End |
---|
1295 | |
---|
1296 | Function V_getBeamStopC3_width(fname) |
---|
1297 | String fname |
---|
1298 | |
---|
1299 | String path = "entry:instrument:beam_stop_C3:shape:width" |
---|
1300 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1301 | End |
---|
1302 | |
---|
1303 | |
---|
1304 | |
---|
1305 | |
---|
1306 | //// INSTRUMENT/COLLIMATOR |
---|
1307 | //collimator (data folder) |
---|
1308 | |
---|
1309 | // this is now defined as text, due to selections from GUI |
---|
1310 | Function/S V_getNumberOfGuides(fname) |
---|
1311 | String fname |
---|
1312 | |
---|
1313 | Variable num=60 |
---|
1314 | String path = "entry:instrument:collimator:number_guides" |
---|
1315 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1316 | End |
---|
1317 | |
---|
1318 | // geometry (data folder) |
---|
1319 | // shape (data folder) |
---|
1320 | Function/S V_getGuideShape(fname) |
---|
1321 | String fname |
---|
1322 | |
---|
1323 | String path = "entry:instrument:collimator:geometry:shape:shape" |
---|
1324 | Variable num=60 |
---|
1325 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1326 | End |
---|
1327 | |
---|
1328 | Function V_getGuideSize(fname) |
---|
1329 | String fname |
---|
1330 | |
---|
1331 | String path = "entry:instrument:collimator:geometry:shape:size" |
---|
1332 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1333 | End |
---|
1334 | |
---|
1335 | |
---|
1336 | // converging_pinholes (data folder) |
---|
1337 | Function/S V_getConvPinholeStatus(fname) |
---|
1338 | String fname |
---|
1339 | |
---|
1340 | String path = "entry:instrument:converging_pinholes:status" |
---|
1341 | Variable num=60 |
---|
1342 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1343 | End |
---|
1344 | |
---|
1345 | // converging_slits (not used) |
---|
1346 | |
---|
1347 | ////// INSTRUMENT/DETECTORS |
---|
1348 | // detector_B (data folder) |
---|
1349 | // |
---|
1350 | // only defined for the "B" detector, and may not be necessary? |
---|
1351 | // DONE -- write to return an ARRAY |
---|
1352 | Function/WAVE V_getDet_cal_x(fname,detStr) |
---|
1353 | String fname,detStr |
---|
1354 | |
---|
1355 | if(cmpstr(detStr,"B") == 0) |
---|
1356 | String path = "entry:instrument:detector_"+detStr+":cal_x" |
---|
1357 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
1358 | |
---|
1359 | return w |
---|
1360 | else |
---|
1361 | return $"" |
---|
1362 | endif |
---|
1363 | End |
---|
1364 | |
---|
1365 | // only defined for the "B" detector, and may not be necessary? |
---|
1366 | // TODO -- write to return an ARRAY |
---|
1367 | Function/WAVE V_getDet_cal_y(fname,detStr) |
---|
1368 | String fname,detStr |
---|
1369 | |
---|
1370 | if(cmpstr(detStr,"B") == 0) |
---|
1371 | String path = "entry:instrument:detector_"+detStr+":cal_y" |
---|
1372 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
1373 | |
---|
1374 | return w |
---|
1375 | else |
---|
1376 | return $"" |
---|
1377 | endif |
---|
1378 | End |
---|
1379 | |
---|
1380 | // Pixels are not square |
---|
1381 | // so the FHWM will be different in each direction. May need to return |
---|
1382 | // "dummy" value for "B" detector if pixels there are square |
---|
1383 | Function V_getDet_pixel_fwhm_x(fname,detStr) |
---|
1384 | String fname,detStr |
---|
1385 | |
---|
1386 | String path = "entry:instrument:detector_"+detStr+":pixel_fwhm_x" |
---|
1387 | |
---|
1388 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1389 | End |
---|
1390 | |
---|
1391 | // Pixels are not square |
---|
1392 | // so the FHWM will be different in each direction. May need to return |
---|
1393 | // "dummy" value for "B" detector if pixels there are square |
---|
1394 | Function V_getDet_pixel_fwhm_y(fname,detStr) |
---|
1395 | String fname,detStr |
---|
1396 | |
---|
1397 | String path = "entry:instrument:detector_"+detStr+":pixel_fwhm_y" |
---|
1398 | |
---|
1399 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1400 | End |
---|
1401 | |
---|
1402 | Function V_getDet_pixel_num_x(fname,detStr) |
---|
1403 | String fname,detStr |
---|
1404 | |
---|
1405 | String path = "entry:instrument:detector_"+detStr+":pixel_num_x" |
---|
1406 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1407 | End |
---|
1408 | |
---|
1409 | Function V_getDet_pixel_num_y(fname,detStr) |
---|
1410 | String fname,detStr |
---|
1411 | |
---|
1412 | String path = "entry:instrument:detector_"+detStr+":pixel_num_y" |
---|
1413 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1414 | End |
---|
1415 | |
---|
1416 | //// only defined for the "B" detector, and only to satisfy NXsas |
---|
1417 | //Function V_getDet_azimuthalAngle(fname,detStr) |
---|
1418 | // String fname,detStr |
---|
1419 | // |
---|
1420 | // if(cmpstr(detStr,"B") == 0) |
---|
1421 | // String path = "entry:instrument:detector_"+detStr+":azimuthal_angle" |
---|
1422 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
1423 | // else |
---|
1424 | // return(0) |
---|
1425 | // endif |
---|
1426 | //End |
---|
1427 | |
---|
1428 | Function V_getDet_beam_center_x(fname,detStr) |
---|
1429 | String fname,detStr |
---|
1430 | |
---|
1431 | String path = "entry:instrument:detector_"+detStr+":beam_center_x" |
---|
1432 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1433 | End |
---|
1434 | |
---|
1435 | Function V_getDet_beam_center_y(fname,detStr) |
---|
1436 | String fname,detStr |
---|
1437 | |
---|
1438 | String path = "entry:instrument:detector_"+detStr+":beam_center_y" |
---|
1439 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1440 | End |
---|
1441 | |
---|
1442 | |
---|
1443 | //TODO |
---|
1444 | // |
---|
1445 | // x and y center in mm is currently not part of the Nexus definition |
---|
1446 | // does it need to be? |
---|
1447 | // these lookups will fail if they have not been generated locally! |
---|
1448 | Function V_getDet_beam_center_x_mm(fname,detStr) |
---|
1449 | String fname,detStr |
---|
1450 | |
---|
1451 | String path = "entry:instrument:detector_"+detStr+":beam_center_x_mm" |
---|
1452 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1453 | End |
---|
1454 | |
---|
1455 | //TODO |
---|
1456 | // |
---|
1457 | // x and y center in mm is currently not part of the Nexus definition |
---|
1458 | // does it need to be? |
---|
1459 | // these lookups will fail if they have not been generated locally! |
---|
1460 | Function V_getDet_beam_center_y_mm(fname,detStr) |
---|
1461 | String fname,detStr |
---|
1462 | |
---|
1463 | String path = "entry:instrument:detector_"+detStr+":beam_center_y_mm" |
---|
1464 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1465 | End |
---|
1466 | |
---|
1467 | //TODO |
---|
1468 | // |
---|
1469 | // x and y center in pix is currently not part of the Nexus definition |
---|
1470 | // does it need to be? |
---|
1471 | // these lookups will fail if they have not been generated locally! |
---|
1472 | Function V_getDet_beam_center_x_pix(fname,detStr) |
---|
1473 | String fname,detStr |
---|
1474 | |
---|
1475 | String path = "entry:instrument:detector_"+detStr+":beam_center_x_pix" |
---|
1476 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1477 | End |
---|
1478 | |
---|
1479 | //TODO |
---|
1480 | // |
---|
1481 | // x and y center in pix is currently not part of the Nexus definition |
---|
1482 | // does it need to be? |
---|
1483 | // these lookups will fail if they have not been generated locally! |
---|
1484 | Function V_getDet_beam_center_y_pix(fname,detStr) |
---|
1485 | String fname,detStr |
---|
1486 | |
---|
1487 | String path = "entry:instrument:detector_"+detStr+":beam_center_y_pix" |
---|
1488 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1489 | End |
---|
1490 | |
---|
1491 | Function/WAVE V_getDetectorDataW(fname,detStr) |
---|
1492 | String fname,detStr |
---|
1493 | |
---|
1494 | String path = "entry:instrument:detector_"+detStr+":data" |
---|
1495 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
1496 | |
---|
1497 | return w |
---|
1498 | End |
---|
1499 | |
---|
1500 | // |
---|
1501 | // TODO -- this does not exist in the raw data, but does in the processed data |
---|
1502 | // !!! how to handle this?? Binning routines need the error wave |
---|
1503 | // |
---|
1504 | Function/WAVE V_getDetectorDataErrW(fname,detStr) |
---|
1505 | String fname,detStr |
---|
1506 | |
---|
1507 | String path = "entry:instrument:detector_"+detStr+":linear_data_error" |
---|
1508 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
1509 | |
---|
1510 | return w |
---|
1511 | End |
---|
1512 | |
---|
1513 | // TODO -- write this function to return a WAVE with the data |
---|
1514 | // either as a wave reference, or as an input parameter |
---|
1515 | // ALSO -- the "B" deadtime will be a single value (probably) |
---|
1516 | // but the tube banks will be 1D arrays of values, one per tube |
---|
1517 | Function/WAVE V_getDetector_deadtime(fname,detStr) |
---|
1518 | String fname,detStr |
---|
1519 | |
---|
1520 | String path = "entry:instrument:detector_"+detStr+":dead_time" |
---|
1521 | if(cmpstr(detStr,"B") == 0) |
---|
1522 | return $"" |
---|
1523 | else |
---|
1524 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
1525 | return w |
---|
1526 | endif |
---|
1527 | End |
---|
1528 | |
---|
1529 | // for "B" only |
---|
1530 | Function V_getDetector_deadtime_B(fname,detStr) |
---|
1531 | String fname,detStr |
---|
1532 | |
---|
1533 | String path = "entry:instrument:detector_"+detStr+":dead_time" |
---|
1534 | if(cmpstr(detStr,"B") == 0) |
---|
1535 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1536 | else |
---|
1537 | return(0) |
---|
1538 | endif |
---|
1539 | End |
---|
1540 | |
---|
1541 | Function/S V_getDetDescription(fname,detStr) |
---|
1542 | String fname,detStr |
---|
1543 | |
---|
1544 | String path = "entry:instrument:detector_"+detStr+":description" |
---|
1545 | Variable num=60 |
---|
1546 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1547 | End |
---|
1548 | |
---|
1549 | // return value in [cm] |
---|
1550 | Function V_getDet_NominalDistance(fname,detStr) |
---|
1551 | String fname,detStr |
---|
1552 | |
---|
1553 | String path = "entry:instrument:detector_"+detStr+":distance" |
---|
1554 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1555 | End |
---|
1556 | |
---|
1557 | //this is a DERIVED distance, since the nominal sdd is for the carriage (=LR panels) |
---|
1558 | // return value in [cm] |
---|
1559 | Function V_getDet_ActualDistance(fname,detStr) |
---|
1560 | String fname,detStr |
---|
1561 | |
---|
1562 | Variable sdd |
---|
1563 | sdd = V_getDet_NominalDistance(fname,detStr) //[cm] |
---|
1564 | sdd += V_getDet_TBSetback(fname,detStr) // written [cm], returns 0 for L/R/B panels |
---|
1565 | |
---|
1566 | return(sdd) |
---|
1567 | End |
---|
1568 | |
---|
1569 | //// only defined for the "B" detector, and only to satisfy NXsas |
---|
1570 | //Function V_getDet_equatorial_angle(fname,detStr) |
---|
1571 | // String fname,detStr |
---|
1572 | // |
---|
1573 | // if(cmpstr(detStr,"B") == 0) |
---|
1574 | // String path = "entry:instrument:detector_"+detStr+":equatorial_angle" |
---|
1575 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
1576 | // else |
---|
1577 | // return(0) |
---|
1578 | // endif |
---|
1579 | //End |
---|
1580 | |
---|
1581 | Function/S V_getDetEventFileName(fname,detStr) |
---|
1582 | String fname,detStr |
---|
1583 | |
---|
1584 | String path = "entry:instrument:detector_"+detStr+":event_file_name" |
---|
1585 | Variable num=60 |
---|
1586 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1587 | End |
---|
1588 | |
---|
1589 | Function V_getDet_IntegratedCount(fname,detStr) |
---|
1590 | String fname,detStr |
---|
1591 | |
---|
1592 | String path = "entry:instrument:detector_"+detStr+":integrated_count" |
---|
1593 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1594 | End |
---|
1595 | |
---|
1596 | // only return value for B and L/R detectors. everything else returns zero |
---|
1597 | Function V_getDet_LateralOffset(fname,detStr) |
---|
1598 | String fname,detStr |
---|
1599 | |
---|
1600 | if(cmpstr(detStr,"FT") == 0 || cmpstr(detStr,"FB") == 0) |
---|
1601 | return(0) |
---|
1602 | endif |
---|
1603 | if(cmpstr(detStr,"MT") == 0 || cmpstr(detStr,"MB") == 0) |
---|
1604 | return(0) |
---|
1605 | endif |
---|
1606 | |
---|
1607 | String path = "entry:instrument:detector_"+detStr+":lateral_offset" |
---|
1608 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1609 | End |
---|
1610 | |
---|
1611 | // only return values for T/B. everything else returns zero |
---|
1612 | Function V_getDet_VerticalOffset(fname,detStr) |
---|
1613 | String fname,detStr |
---|
1614 | |
---|
1615 | if(cmpstr(detStr,"B") == 0) |
---|
1616 | return(0) |
---|
1617 | endif |
---|
1618 | if(cmpstr(detStr,"FR") == 0 || cmpstr(detStr,"FL") == 0) |
---|
1619 | return(0) |
---|
1620 | endif |
---|
1621 | if(cmpstr(detStr,"MR") == 0 || cmpstr(detStr,"ML") == 0) |
---|
1622 | return(0) |
---|
1623 | endif |
---|
1624 | |
---|
1625 | String path = "entry:instrument:detector_"+detStr+":vertical_offset" |
---|
1626 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1627 | End |
---|
1628 | |
---|
1629 | // TODO -DONE be sure this is defined correctly (with correct units-- this is now 41.0 cm) |
---|
1630 | // -- only returns for T/B detectors |
---|
1631 | Function V_getDet_TBSetback(fname,detStr) |
---|
1632 | String fname,detStr |
---|
1633 | |
---|
1634 | if(cmpstr(detStr,"B") == 0) |
---|
1635 | return(0) |
---|
1636 | endif |
---|
1637 | if(cmpstr(detStr,"FR") == 0 || cmpstr(detStr,"FL") == 0) |
---|
1638 | return(0) |
---|
1639 | endif |
---|
1640 | if(cmpstr(detStr,"MR") == 0 || cmpstr(detStr,"ML") == 0) |
---|
1641 | return(0) |
---|
1642 | endif |
---|
1643 | |
---|
1644 | String path = "entry:instrument:detector_"+detStr+":setback" |
---|
1645 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1646 | |
---|
1647 | |
---|
1648 | End |
---|
1649 | |
---|
1650 | // gap when panels are "touching" |
---|
1651 | // units are mm |
---|
1652 | // returns gap value for RIGHT and LEFT (they are the same) |
---|
1653 | // returns gap value for TOP and BOTTOM (they are the same) |
---|
1654 | // returns 0 for BACK, (no such field for this detector) |
---|
1655 | // |
---|
1656 | Function V_getDet_panel_gap(fname,detStr) |
---|
1657 | String fname,detStr |
---|
1658 | |
---|
1659 | if(cmpstr(detStr,"B") == 0) |
---|
1660 | return(0) |
---|
1661 | endif |
---|
1662 | // if(cmpstr(detStr,"FB") == 0 || cmpstr(detStr,"FL") == 0) |
---|
1663 | // return(0) |
---|
1664 | // endif |
---|
1665 | // if(cmpstr(detStr,"MB") == 0 || cmpstr(detStr,"ML") == 0) |
---|
1666 | // return(0) |
---|
1667 | // endif |
---|
1668 | |
---|
1669 | String path = "entry:instrument:detector_"+detStr+":panel_gap" |
---|
1670 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1671 | |
---|
1672 | |
---|
1673 | End |
---|
1674 | |
---|
1675 | Function/S V_getDetSettings(fname,detStr) |
---|
1676 | String fname,detStr |
---|
1677 | |
---|
1678 | String path = "entry:instrument:detector_"+detStr+":settings" |
---|
1679 | Variable num=60 |
---|
1680 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1681 | End |
---|
1682 | |
---|
1683 | |
---|
1684 | Function V_getDet_x_pixel_size(fname,detStr) |
---|
1685 | String fname,detStr |
---|
1686 | |
---|
1687 | String path = "entry:instrument:detector_"+detStr+":x_pixel_size" |
---|
1688 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1689 | End |
---|
1690 | |
---|
1691 | Function V_getDet_y_pixel_size(fname,detStr) |
---|
1692 | String fname,detStr |
---|
1693 | |
---|
1694 | String path = "entry:instrument:detector_"+detStr+":y_pixel_size" |
---|
1695 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1696 | End |
---|
1697 | |
---|
1698 | ///////// detector_FB (data folder) + ALL other PANEL DETECTORS |
---|
1699 | |
---|
1700 | Function V_getDet_numberOfTubes(fname,detStr) |
---|
1701 | String fname,detStr |
---|
1702 | |
---|
1703 | String path = "entry:instrument:detector_"+detStr+":number_of_tubes" |
---|
1704 | if(cmpstr(detStr,"B") == 0) |
---|
1705 | return(0) |
---|
1706 | else |
---|
1707 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1708 | endif |
---|
1709 | End |
---|
1710 | |
---|
1711 | |
---|
1712 | // DONE -- write this function to return a WAVE with the data |
---|
1713 | // either as a wave reference, or as an input parameter |
---|
1714 | Function/WAVE V_getDetTube_spatialCalib(fname,detStr) |
---|
1715 | String fname,detStr |
---|
1716 | |
---|
1717 | String path = "entry:instrument:detector_"+detStr+":spatial_calibration" |
---|
1718 | if(cmpstr(detStr,"B") == 0) |
---|
1719 | return $("") // return should be null |
---|
1720 | else |
---|
1721 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
1722 | return w |
---|
1723 | endif |
---|
1724 | End |
---|
1725 | |
---|
1726 | |
---|
1727 | Function/S V_getDet_tubeOrientation(fname,detStr) |
---|
1728 | String fname,detStr |
---|
1729 | |
---|
1730 | String path = "entry:instrument:detector_"+detStr+":tube_orientation" |
---|
1731 | Variable num=60 |
---|
1732 | if(cmpstr(detStr,"B") == 0) |
---|
1733 | return("") |
---|
1734 | else |
---|
1735 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1736 | endif |
---|
1737 | End |
---|
1738 | |
---|
1739 | // TODO -- be clear on how this is defined. Units? |
---|
1740 | Function V_getDet_tubeWidth(fname,detStr) |
---|
1741 | String fname,detStr |
---|
1742 | |
---|
1743 | String path = "entry:instrument:detector_"+detStr+":tube_width" |
---|
1744 | if(cmpstr(detStr,"B") == 0) |
---|
1745 | return(0) |
---|
1746 | else |
---|
1747 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1748 | endif |
---|
1749 | End |
---|
1750 | |
---|
1751 | ////////////////////// |
---|
1752 | |
---|
1753 | // INSTRUMENT/LENSES |
---|
1754 | // lenses (data folder) |
---|
1755 | |
---|
1756 | Function V_getLensCurvature(fname) |
---|
1757 | String fname |
---|
1758 | |
---|
1759 | String path = "entry:instrument:lenses:curvature" |
---|
1760 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1761 | End |
---|
1762 | |
---|
1763 | Function/S V_getLensesFocusType(fname) |
---|
1764 | String fname |
---|
1765 | |
---|
1766 | String path = "entry:instrument:lenses:focus_type" |
---|
1767 | Variable num=60 |
---|
1768 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1769 | End |
---|
1770 | |
---|
1771 | Function V_getLensDistance(fname) |
---|
1772 | String fname |
---|
1773 | |
---|
1774 | String path = "entry:instrument:lenses:lens_distance" |
---|
1775 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1776 | End |
---|
1777 | |
---|
1778 | Function/S V_getLensGeometry(fname) |
---|
1779 | String fname |
---|
1780 | |
---|
1781 | String path = "entry:instrument:lenses:lens_geometry" |
---|
1782 | Variable num=60 |
---|
1783 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1784 | End |
---|
1785 | |
---|
1786 | Function/S V_getLensMaterial(fname) |
---|
1787 | String fname |
---|
1788 | |
---|
1789 | String path = "entry:instrument:lenses:lens_material" |
---|
1790 | Variable num=60 |
---|
1791 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1792 | End |
---|
1793 | |
---|
1794 | Function V_getNumber_of_Lenses(fname) |
---|
1795 | String fname |
---|
1796 | |
---|
1797 | String path = "entry:instrument:lenses:number_of_lenses" |
---|
1798 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1799 | End |
---|
1800 | |
---|
1801 | Function V_getNumber_of_prisms(fname) |
---|
1802 | String fname |
---|
1803 | |
---|
1804 | String path = "entry:instrument:lenses:number_of_prisms" |
---|
1805 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1806 | End |
---|
1807 | |
---|
1808 | Function V_getPrism_distance(fname) |
---|
1809 | String fname |
---|
1810 | |
---|
1811 | String path = "entry:instrument:lenses:prism_distance" |
---|
1812 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1813 | End |
---|
1814 | |
---|
1815 | Function/S V_getPrismMaterial(fname) |
---|
1816 | String fname |
---|
1817 | |
---|
1818 | String path = "entry:instrument:lenses:prism_material" |
---|
1819 | Variable num=60 |
---|
1820 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1821 | End |
---|
1822 | |
---|
1823 | // status of lens/prism = lens | prism | both | out |
---|
1824 | Function/S V_getLensPrismStatus(fname) |
---|
1825 | String fname |
---|
1826 | |
---|
1827 | String path = "entry:instrument:lenses:status" |
---|
1828 | Variable num=60 |
---|
1829 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1830 | End |
---|
1831 | |
---|
1832 | |
---|
1833 | |
---|
1834 | |
---|
1835 | /////// sample_aperture (1) (data folder) |
---|
1836 | // this is the INTERNAL sample aperture |
---|
1837 | // |
---|
1838 | Function/S V_getSampleAp_Description(fname) |
---|
1839 | String fname |
---|
1840 | |
---|
1841 | String path = "entry:instrument:sample_aperture:description" |
---|
1842 | Variable num=60 |
---|
1843 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1844 | End |
---|
1845 | |
---|
1846 | Function V_getSampleAp_distance(fname) |
---|
1847 | String fname |
---|
1848 | |
---|
1849 | String path = "entry:instrument:sample_aperture:distance" |
---|
1850 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1851 | End |
---|
1852 | |
---|
1853 | // shape (data folder) |
---|
1854 | Function V_getSampleAp_height(fname) |
---|
1855 | String fname |
---|
1856 | |
---|
1857 | String path = "entry:instrument:sample_aperture:shape:height" |
---|
1858 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1859 | End |
---|
1860 | |
---|
1861 | Function/S V_getSampleAp_shape(fname) |
---|
1862 | String fname |
---|
1863 | |
---|
1864 | String path = "entry:instrument:sample_aperture:shape:shape" |
---|
1865 | Variable num=60 |
---|
1866 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1867 | End |
---|
1868 | |
---|
1869 | // this returns TEXT, due to GUI input, == to diameter if CIRCLE |
---|
1870 | Function/S V_getSampleAp_size(fname) |
---|
1871 | String fname |
---|
1872 | |
---|
1873 | String path = "entry:instrument:sample_aperture:shape:size" |
---|
1874 | Variable num=60 |
---|
1875 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1876 | End |
---|
1877 | |
---|
1878 | Function V_getSampleAp_width(fname) |
---|
1879 | String fname |
---|
1880 | |
---|
1881 | String path = "entry:instrument:sample_aperture:shape:width" |
---|
1882 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1883 | End |
---|
1884 | |
---|
1885 | |
---|
1886 | |
---|
1887 | /////// sample_aperture_2 (data folder) |
---|
1888 | // sample aperture (2) is the external aperture, which may or may not be present |
---|
1889 | |
---|
1890 | Function/S V_getSampleAp2_Description(fname) |
---|
1891 | String fname |
---|
1892 | |
---|
1893 | String path = "entry:instrument:sample_aperture_2:description" |
---|
1894 | Variable num=60 |
---|
1895 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1896 | End |
---|
1897 | |
---|
1898 | Function V_getSampleAp2_distance(fname) |
---|
1899 | String fname |
---|
1900 | |
---|
1901 | String path = "entry:instrument:sample_aperture_2:distance" |
---|
1902 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1903 | End |
---|
1904 | |
---|
1905 | // shape (data folder) |
---|
1906 | Function V_getSampleAp2_height(fname) |
---|
1907 | String fname |
---|
1908 | |
---|
1909 | String path = "entry:instrument:sample_aperture_2:shape:height" |
---|
1910 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1911 | End |
---|
1912 | |
---|
1913 | Function/S V_getSampleAp2_shape(fname) |
---|
1914 | String fname |
---|
1915 | |
---|
1916 | String path = "entry:instrument:sample_aperture_2:shape:shape" |
---|
1917 | Variable num=60 |
---|
1918 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1919 | End |
---|
1920 | |
---|
1921 | // this returns REAL, DIFFERENT than SampleAp1 |
---|
1922 | Function V_getSampleAp2_size(fname) |
---|
1923 | String fname |
---|
1924 | |
---|
1925 | String path = "entry:instrument:sample_aperture_2:shape:size" |
---|
1926 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1927 | End |
---|
1928 | |
---|
1929 | Function V_getSampleAp2_width(fname) |
---|
1930 | String fname |
---|
1931 | |
---|
1932 | String path = "entry:instrument:sample_aperture_2:shape:width" |
---|
1933 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1934 | End |
---|
1935 | |
---|
1936 | |
---|
1937 | ////// sample_table (data folder) |
---|
1938 | // location = "CHAMBER" or HUBER |
---|
1939 | Function/S V_getSampleTableLocation(fname) |
---|
1940 | String fname |
---|
1941 | |
---|
1942 | String path = "entry:instrument:sample_table:location" |
---|
1943 | Variable num=60 |
---|
1944 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1945 | End |
---|
1946 | |
---|
1947 | // TODO - verify the meaning |
---|
1948 | // offset_distance (?? for center of sample table vs. sample position) |
---|
1949 | Function V_getSampleTableOffset(fname) |
---|
1950 | String fname |
---|
1951 | |
---|
1952 | String path = "entry:instrument:sample_table:offset_distance" |
---|
1953 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1954 | End |
---|
1955 | |
---|
1956 | // source (data folder) |
---|
1957 | //name "NCNR" |
---|
1958 | Function/S V_getSourceName(fname) |
---|
1959 | String fname |
---|
1960 | |
---|
1961 | String path = "entry:instrument:source:name" |
---|
1962 | Variable num=60 |
---|
1963 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1964 | End |
---|
1965 | |
---|
1966 | // power -- nominal only, not connected to any real number |
---|
1967 | Function V_getReactorPower(fname) |
---|
1968 | String fname |
---|
1969 | |
---|
1970 | String path = "entry:instrument:source:power" |
---|
1971 | return(V_getRealValueFromHDF5(fname,path)) |
---|
1972 | End |
---|
1973 | |
---|
1974 | //probe (wave) "neutron" |
---|
1975 | Function/S V_getSourceProbe(fname) |
---|
1976 | String fname |
---|
1977 | |
---|
1978 | String path = "entry:instrument:source:probe" |
---|
1979 | Variable num=60 |
---|
1980 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1981 | End |
---|
1982 | |
---|
1983 | //type (wave) "Reactor Neutron Source" |
---|
1984 | Function/S V_getSourceType(fname) |
---|
1985 | String fname |
---|
1986 | |
---|
1987 | String path = "entry:instrument:source:type" |
---|
1988 | Variable num=60 |
---|
1989 | return(V_getStringFromHDF5(fname,path,num)) |
---|
1990 | End |
---|
1991 | |
---|
1992 | |
---|
1993 | /////// source_aperture (data folder) |
---|
1994 | |
---|
1995 | Function/S V_getSourceAp_Description(fname) |
---|
1996 | String fname |
---|
1997 | |
---|
1998 | String path = "entry:instrument:source_aperture:description" |
---|
1999 | Variable num=60 |
---|
2000 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2001 | End |
---|
2002 | |
---|
2003 | Function V_getSourceAp_distance(fname) |
---|
2004 | String fname |
---|
2005 | |
---|
2006 | String path = "entry:instrument:source_aperture:distance" |
---|
2007 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2008 | End |
---|
2009 | |
---|
2010 | // shape (data folder) |
---|
2011 | Function V_getSourceAp_height(fname) |
---|
2012 | String fname |
---|
2013 | |
---|
2014 | String path = "entry:instrument:source_aperture:shape:height" |
---|
2015 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2016 | End |
---|
2017 | |
---|
2018 | Function/S V_getSourceAp_shape(fname) |
---|
2019 | String fname |
---|
2020 | |
---|
2021 | String path = "entry:instrument:source_aperture:shape:shape" |
---|
2022 | Variable num=60 |
---|
2023 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2024 | End |
---|
2025 | |
---|
2026 | // this returns TEXT, due to GUI input, == to diameter if CIRCLE |
---|
2027 | Function/S V_getSourceAp_size(fname) |
---|
2028 | String fname |
---|
2029 | |
---|
2030 | String path = "entry:instrument:source_aperture:shape:size" |
---|
2031 | Variable num=60 |
---|
2032 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2033 | End |
---|
2034 | |
---|
2035 | Function V_getSourceAp_width(fname) |
---|
2036 | String fname |
---|
2037 | |
---|
2038 | String path = "entry:instrument:source_aperture:shape:width" |
---|
2039 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2040 | End |
---|
2041 | |
---|
2042 | |
---|
2043 | //////// SAMPLE |
---|
2044 | //////// SAMPLE |
---|
2045 | //////// SAMPLE |
---|
2046 | |
---|
2047 | //Sample position in changer (returned as TEXT) |
---|
2048 | Function/S V_getSamplePosition(fname) |
---|
2049 | String fname |
---|
2050 | |
---|
2051 | String path = "entry:sample:changer_position" |
---|
2052 | Variable num=60 |
---|
2053 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2054 | end |
---|
2055 | |
---|
2056 | // sample label |
---|
2057 | Function/S V_getSampleDescription(fname) |
---|
2058 | String fname |
---|
2059 | |
---|
2060 | String path = "entry:sample:description" |
---|
2061 | Variable num=60 |
---|
2062 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2063 | End |
---|
2064 | |
---|
2065 | // for a z-stage?? |
---|
2066 | Function V_getSampleElevation(fname) |
---|
2067 | String fname |
---|
2068 | |
---|
2069 | String path = "entry:sample:elevation" |
---|
2070 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2071 | end |
---|
2072 | |
---|
2073 | //no meaning to this... |
---|
2074 | Function V_getSample_equatorial_ang(fname) |
---|
2075 | String fname |
---|
2076 | |
---|
2077 | String path = "entry:sample:equatorial_angle" |
---|
2078 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2079 | end |
---|
2080 | |
---|
2081 | // group ID !!! very important for matching up files |
---|
2082 | Function V_getSample_GroupID(fname) |
---|
2083 | String fname |
---|
2084 | |
---|
2085 | String path = "entry:sample:group_id" |
---|
2086 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2087 | end |
---|
2088 | |
---|
2089 | |
---|
2090 | //Sample Rotation Angle |
---|
2091 | Function V_getSampleRotationAngle(fname) |
---|
2092 | String fname |
---|
2093 | |
---|
2094 | String path = "entry:sample:rotation_angle" |
---|
2095 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2096 | end |
---|
2097 | |
---|
2098 | //?? this is huber/chamber?? |
---|
2099 | // TODO -- then where is the description of 10CB, etc... |
---|
2100 | Function/S V_getSampleHolderDescription(fname) |
---|
2101 | String fname |
---|
2102 | |
---|
2103 | String path = "entry:sample:sample_holder_description" |
---|
2104 | Variable num=60 |
---|
2105 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2106 | End |
---|
2107 | |
---|
2108 | Function V_getSampleTemperature(fname) |
---|
2109 | String fname |
---|
2110 | |
---|
2111 | String path = "entry:sample:temperature" |
---|
2112 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2113 | end |
---|
2114 | |
---|
2115 | Function V_getSampleTempSetPoint(fname) |
---|
2116 | String fname |
---|
2117 | |
---|
2118 | String path = "entry:sample:temperature_setpoint" |
---|
2119 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2120 | end |
---|
2121 | |
---|
2122 | |
---|
2123 | //Sample Thickness |
---|
2124 | // TODO -- somehow, this is not set correctly in the acquisition, so NaN results |
---|
2125 | Function V_getSampleThickness(fname) |
---|
2126 | String fname |
---|
2127 | |
---|
2128 | String path = "entry:sample:thickness" |
---|
2129 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2130 | end |
---|
2131 | |
---|
2132 | Function V_getSampleTranslation(fname) |
---|
2133 | String fname |
---|
2134 | |
---|
2135 | String path = "entry:sample:translation" |
---|
2136 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2137 | end |
---|
2138 | |
---|
2139 | // sample transmission |
---|
2140 | Function V_getSampleTransmission(fname) |
---|
2141 | String fname |
---|
2142 | |
---|
2143 | String path = "entry:sample:transmission" |
---|
2144 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2145 | end |
---|
2146 | |
---|
2147 | //transmission error (one sigma) |
---|
2148 | Function V_getSampleTransError(fname) |
---|
2149 | String fname |
---|
2150 | |
---|
2151 | String path = "entry:sample:transmission_error" |
---|
2152 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2153 | end |
---|
2154 | |
---|
2155 | |
---|
2156 | |
---|
2157 | // |
---|
2158 | // TODO -- this is all a big mess with the changes in the data file structure |
---|
2159 | // in JUNE 2017, which completely wrecks what was decided in 2016. |
---|
2160 | // Now, I'm not sure at all what I'll get...or what the field will be called... or what they mean... |
---|
2161 | // |
---|
2162 | // |
---|
2163 | //// SAMPLE / DATA LOGS |
---|
2164 | // write this generic , call with the name of the environment log desired |
---|
2165 | // |
---|
2166 | // |
---|
2167 | // shear_field |
---|
2168 | // pressure |
---|
2169 | // magnetic_field |
---|
2170 | // electric_field |
---|
2171 | // |
---|
2172 | //////// (for example) electric_field (data folder) |
---|
2173 | |
---|
2174 | Function/S V_getLog_attachedTo(fname,logStr) |
---|
2175 | String fname,logStr |
---|
2176 | |
---|
2177 | String path = "entry:sample:"+logstr+":attached_to" |
---|
2178 | Variable num=60 |
---|
2179 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2180 | End |
---|
2181 | |
---|
2182 | |
---|
2183 | Function/S V_getLog_measurement(fname,logStr) |
---|
2184 | String fname,logStr |
---|
2185 | |
---|
2186 | String path = "entry:sample:"+logstr+":measurement" |
---|
2187 | Variable num=60 |
---|
2188 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2189 | End |
---|
2190 | |
---|
2191 | |
---|
2192 | Function/S V_getLog_Name(fname,logStr) |
---|
2193 | String fname,logStr |
---|
2194 | |
---|
2195 | String path = "entry:sample:"+logstr+":name" |
---|
2196 | Variable num=60 |
---|
2197 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2198 | End |
---|
2199 | |
---|
2200 | |
---|
2201 | |
---|
2202 | // for temperature only, logStr = "temperature_env" |
---|
2203 | Function/S V_getTemp_ControlSensor(fname,logStr) |
---|
2204 | String fname,logStr |
---|
2205 | |
---|
2206 | String path = "entry:sample:"+logstr+":control_sensor" |
---|
2207 | Variable num=60 |
---|
2208 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2209 | End |
---|
2210 | |
---|
2211 | // for temperature only, logStr = "temperature_env" |
---|
2212 | Function/S V_getTemp_MonitorSensor(fname,logStr) |
---|
2213 | String fname,logStr |
---|
2214 | |
---|
2215 | String path = "entry:sample:"+logstr+":monitor_sensor" |
---|
2216 | Variable num=60 |
---|
2217 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2218 | End |
---|
2219 | |
---|
2220 | |
---|
2221 | |
---|
2222 | //// TODO -- this may not exist if it is not a "controlling" sensor, but there still may be logged data present |
---|
2223 | //// TODO -- it may also have different names for each sensor (setpoint_1, setpoint_2, etc. which will be a big hassle) |
---|
2224 | //Function V_getLog_setPoint(fname,logStr) |
---|
2225 | // String fname,logStr |
---|
2226 | // |
---|
2227 | // String path = "entry:sample:"+logstr+":setpoint_1" |
---|
2228 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
2229 | //end |
---|
2230 | // |
---|
2231 | //Function/S V_getLog_startTime(fname,logStr) |
---|
2232 | // String fname,logStr |
---|
2233 | // |
---|
2234 | // String path = "entry:sample:"+logstr+":start" |
---|
2235 | // Variable num=60 |
---|
2236 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
2237 | //End |
---|
2238 | // |
---|
2239 | // |
---|
2240 | //// TODO -- this may only exist for electric field and magnetic field... |
---|
2241 | //// or may be eliminated altogether |
---|
2242 | //Function V_getLog_nomValue(fname,logStr) |
---|
2243 | // String fname,logStr |
---|
2244 | // |
---|
2245 | // String path = "entry:sample:"+logstr+":value" |
---|
2246 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
2247 | //end |
---|
2248 | |
---|
2249 | |
---|
2250 | |
---|
2251 | /////////// |
---|
2252 | // for temperature, the "attached_to", "measurement", and "name" fields |
---|
2253 | // are one level down farther than before, and down deeper than for other sensors |
---|
2254 | // |
---|
2255 | // |
---|
2256 | // read the value of V_getTemp_MonitorSensor/ControlSensor to get the name of the sensor level . |
---|
2257 | // |
---|
2258 | |
---|
2259 | Function/S V_getTempLog_attachedTo(fname,logStr) |
---|
2260 | String fname,logStr |
---|
2261 | |
---|
2262 | String path = "entry:sample:temperature_env:"+logstr+":attached_to" |
---|
2263 | Variable num=60 |
---|
2264 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2265 | End |
---|
2266 | |
---|
2267 | Function V_getTempLog_highTrip(fname,logStr) |
---|
2268 | String fname,logStr |
---|
2269 | |
---|
2270 | String path = "entry:sample:temperature_env:"+logstr+":high_trip_value" |
---|
2271 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2272 | end |
---|
2273 | |
---|
2274 | Function V_getTempLog_holdTime(fname,logStr) |
---|
2275 | String fname,logStr |
---|
2276 | |
---|
2277 | String path = "entry:sample:temperature_env:"+logstr+":hold_time" |
---|
2278 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2279 | end |
---|
2280 | |
---|
2281 | Function V_getTempLog_lowTrip(fname,logStr) |
---|
2282 | String fname,logStr |
---|
2283 | |
---|
2284 | String path = "entry:sample:temperature_env:"+logstr+":low_trip_value" |
---|
2285 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2286 | end |
---|
2287 | |
---|
2288 | Function/S V_getTempLog_measurement(fname,logStr) |
---|
2289 | String fname,logStr |
---|
2290 | |
---|
2291 | String path = "entry:sample:temperature_env:"+logstr+":measurement" |
---|
2292 | Variable num=60 |
---|
2293 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2294 | End |
---|
2295 | |
---|
2296 | |
---|
2297 | Function/S V_getTempLog_Model(fname,logStr) |
---|
2298 | String fname,logStr |
---|
2299 | |
---|
2300 | String path = "entry:sample:temperature_env:"+logstr+":model" |
---|
2301 | Variable num=60 |
---|
2302 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2303 | End |
---|
2304 | |
---|
2305 | Function/S V_getTempLog_Name(fname,logStr) |
---|
2306 | String fname,logStr |
---|
2307 | |
---|
2308 | String path = "entry:sample:temperature_env:"+logstr+":name" |
---|
2309 | Variable num=60 |
---|
2310 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2311 | End |
---|
2312 | |
---|
2313 | Function V_getTempLog_runControl(fname,logStr) |
---|
2314 | String fname,logStr |
---|
2315 | |
---|
2316 | String path = "entry:sample:temperature_env:"+logstr+":run_control" |
---|
2317 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2318 | end |
---|
2319 | |
---|
2320 | Function V_getTempLog_Setpoint(fname,logStr) |
---|
2321 | String fname,logStr |
---|
2322 | |
---|
2323 | String path = "entry:sample:temperature_env:"+logstr+":setpoint" |
---|
2324 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2325 | end |
---|
2326 | |
---|
2327 | Function/S V_getTempLog_ShortName(fname,logStr) |
---|
2328 | String fname,logStr |
---|
2329 | |
---|
2330 | String path = "entry:sample:temperature_env:"+logstr+":short_name" |
---|
2331 | Variable num=60 |
---|
2332 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2333 | End |
---|
2334 | |
---|
2335 | Function V_getTempLog_Timeout(fname,logStr) |
---|
2336 | String fname,logStr |
---|
2337 | |
---|
2338 | String path = "entry:sample:temperature_env:"+logstr+":timeout" |
---|
2339 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2340 | end |
---|
2341 | |
---|
2342 | Function V_getTempLog_Tolerance(fname,logStr) |
---|
2343 | String fname,logStr |
---|
2344 | |
---|
2345 | String path = "entry:sample:temperature_env:"+logstr+":tolerance" |
---|
2346 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2347 | end |
---|
2348 | |
---|
2349 | Function V_getTempLog_ToleranceBand(fname,logStr) |
---|
2350 | String fname,logStr |
---|
2351 | |
---|
2352 | String path = "entry:sample:temperature_env:"+logstr+":tolerance_band_time" |
---|
2353 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2354 | end |
---|
2355 | |
---|
2356 | Function V_getTempLog_Value(fname,logStr) |
---|
2357 | String fname,logStr |
---|
2358 | |
---|
2359 | String path = "entry:sample:temperature_env:"+logstr+":value" |
---|
2360 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2361 | end |
---|
2362 | |
---|
2363 | |
---|
2364 | |
---|
2365 | |
---|
2366 | |
---|
2367 | |
---|
2368 | // |
---|
2369 | // temperature_env:temp_Internal_1:value_log |
---|
2370 | // |
---|
2371 | //// value_log (data folder) |
---|
2372 | // |
---|
2373 | // TODO: |
---|
2374 | // -- be sure that the calling function properly calls for temperture |
---|
2375 | // logs which are down an extra layer: |
---|
2376 | // for example, logStr = "temperature_env:temp_Internal_1" |
---|
2377 | // |
---|
2378 | // read the value of V_getTemp_MonitorSensor to get the name of the sensor the next level down. |
---|
2379 | // |
---|
2380 | Function V_getLog_avgValue(fname,logStr) |
---|
2381 | String fname,logStr |
---|
2382 | |
---|
2383 | String path = "entry:sample:"+logstr+":value_log:average_value" |
---|
2384 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2385 | end |
---|
2386 | |
---|
2387 | Function V_getLog_avgValue_err(fname,logStr) |
---|
2388 | String fname,logStr |
---|
2389 | |
---|
2390 | String path = "entry:sample:"+logstr+":value_log:average_value_error" |
---|
2391 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2392 | end |
---|
2393 | |
---|
2394 | Function V_getLog_maximumValue(fname,logStr) |
---|
2395 | String fname,logStr |
---|
2396 | |
---|
2397 | String path = "entry:sample:"+logstr+":value_log:maximum_value" |
---|
2398 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2399 | end |
---|
2400 | |
---|
2401 | Function V_getLog_medianValue(fname,logStr) |
---|
2402 | String fname,logStr |
---|
2403 | |
---|
2404 | String path = "entry:sample:"+logstr+":value_log:median_value" |
---|
2405 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2406 | end |
---|
2407 | |
---|
2408 | Function V_getLog_minimumValue(fname,logStr) |
---|
2409 | String fname,logStr |
---|
2410 | |
---|
2411 | String path = "entry:sample:"+logstr+":value_log:minimum_value" |
---|
2412 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2413 | end |
---|
2414 | |
---|
2415 | // DONE -- this needs to be a WAVE reference |
---|
2416 | // DONE -- verify that the field is really read in as "time0" |
---|
2417 | Function V_getLog_timeWave(fname,logStr,outW) |
---|
2418 | String fname,logStr |
---|
2419 | Wave outW |
---|
2420 | |
---|
2421 | String path = "entry:sample:"+logstr+":value_log:time0" |
---|
2422 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
2423 | |
---|
2424 | outW = w |
---|
2425 | return(0) |
---|
2426 | end |
---|
2427 | |
---|
2428 | // DONE -- this needs to be a WAVE reference |
---|
2429 | Function V_getLog_ValueWave(fname,logStr,outW) |
---|
2430 | String fname,logStr |
---|
2431 | Wave outW |
---|
2432 | |
---|
2433 | String path = "entry:sample:"+logstr+":value_log:value" |
---|
2434 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
2435 | |
---|
2436 | outW = w |
---|
2437 | return(0) |
---|
2438 | end |
---|
2439 | |
---|
2440 | |
---|
2441 | |
---|
2442 | |
---|
2443 | |
---|
2444 | |
---|
2445 | |
---|
2446 | ///////// REDUCTION |
---|
2447 | ///////// REDUCTION |
---|
2448 | ///////// REDUCTION |
---|
2449 | |
---|
2450 | |
---|
2451 | Function/WAVE V_getAbsolute_Scaling(fname) |
---|
2452 | String fname |
---|
2453 | |
---|
2454 | String path = "entry:reduction:absolute_scaling" |
---|
2455 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
2456 | |
---|
2457 | return w |
---|
2458 | end |
---|
2459 | |
---|
2460 | Function/S V_getBackgroundFileName(fname) |
---|
2461 | String fname |
---|
2462 | |
---|
2463 | String path = "entry:reduction:background_file_name" |
---|
2464 | Variable num=60 |
---|
2465 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2466 | End |
---|
2467 | |
---|
2468 | Function/WAVE V_getBoxCoordinates(fname) |
---|
2469 | String fname |
---|
2470 | |
---|
2471 | String path = "entry:reduction:box_coordinates" |
---|
2472 | WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
2473 | |
---|
2474 | return w |
---|
2475 | end |
---|
2476 | |
---|
2477 | //box counts |
---|
2478 | Function V_getBoxCounts(fname) |
---|
2479 | String fname |
---|
2480 | |
---|
2481 | String path = "entry:reduction:box_count" |
---|
2482 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2483 | end |
---|
2484 | |
---|
2485 | //box counts error |
---|
2486 | Function V_getBoxCountsError(fname) |
---|
2487 | String fname |
---|
2488 | |
---|
2489 | String path = "entry:reduction:box_count_error" |
---|
2490 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2491 | end |
---|
2492 | |
---|
2493 | Function/S V_getReductionComments(fname) |
---|
2494 | String fname |
---|
2495 | |
---|
2496 | String path = "entry:reduction:comments" |
---|
2497 | Variable num=60 |
---|
2498 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2499 | End |
---|
2500 | |
---|
2501 | |
---|
2502 | Function/S V_getEmptyBeamFileName(fname) |
---|
2503 | String fname |
---|
2504 | |
---|
2505 | String path = "entry:reduction:empty_beam_file_name" |
---|
2506 | Variable num=60 |
---|
2507 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2508 | End |
---|
2509 | |
---|
2510 | Function/S V_getEmptyFileName(fname) |
---|
2511 | String fname |
---|
2512 | |
---|
2513 | String path = "entry:reduction:empty_file_name" |
---|
2514 | Variable num=60 |
---|
2515 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2516 | End |
---|
2517 | |
---|
2518 | // this is purpose is used for all files, and has different meaning |
---|
2519 | // if polarization is used. need the "intent" also to be able to fully decipher what a file |
---|
2520 | // is really being used for. GUI controls this, not me. |
---|
2521 | Function/S V_getReduction_purpose(fname) |
---|
2522 | String fname |
---|
2523 | |
---|
2524 | String path = "entry:reduction:file_purpose" |
---|
2525 | Variable num=60 |
---|
2526 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2527 | End |
---|
2528 | |
---|
2529 | ////group ID |
---|
2530 | //// DONE |
---|
2531 | //// x- is this duplicated? |
---|
2532 | //// x- yes, this is a duplicated field in the /entry/sample block (and is probably more appropriate there) |
---|
2533 | //// x- so pick a single location, rather than needing to duplicate. |
---|
2534 | //// x- REPLACE with a single function V_getSample_GroupID() |
---|
2535 | //// |
---|
2536 | //Function V_getSample_group_ID(fname) |
---|
2537 | // String fname |
---|
2538 | // |
---|
2539 | //// do not use the entry/reduction location |
---|
2540 | //// String path = "entry:reduction:group_id" |
---|
2541 | // String path = "entry:sample:group_id" |
---|
2542 | // |
---|
2543 | // return(V_getRealValueFromHDF5(fname,path)) |
---|
2544 | //end |
---|
2545 | |
---|
2546 | Function/S V_getReduction_intent(fname) |
---|
2547 | String fname |
---|
2548 | |
---|
2549 | String path = "entry:reduction:intent" |
---|
2550 | Variable num=60 |
---|
2551 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2552 | End |
---|
2553 | |
---|
2554 | Function/S V_getMaskFileName(fname) |
---|
2555 | String fname |
---|
2556 | |
---|
2557 | String path = "entry:reduction:mask_file_name" |
---|
2558 | Variable num=60 |
---|
2559 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2560 | End |
---|
2561 | |
---|
2562 | Function/S V_getLogFileName(fname) |
---|
2563 | String fname |
---|
2564 | |
---|
2565 | String path = "entry:reduction:sans_log_file_name" |
---|
2566 | Variable num=60 |
---|
2567 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2568 | End |
---|
2569 | |
---|
2570 | Function/S V_getSensitivityFileName(fname) |
---|
2571 | String fname |
---|
2572 | |
---|
2573 | String path = "entry:reduction:sensitivity_file_name" |
---|
2574 | Variable num=60 |
---|
2575 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2576 | End |
---|
2577 | |
---|
2578 | Function/S V_getTransmissionFileName(fname) |
---|
2579 | String fname |
---|
2580 | |
---|
2581 | String path = "entry:reduction:transmission_file_name" |
---|
2582 | Variable num=60 |
---|
2583 | return(V_getStringFromHDF5(fname,path,num)) |
---|
2584 | End |
---|
2585 | |
---|
2586 | //whole detector trasmission |
---|
2587 | Function V_getSampleTransWholeDetector(fname) |
---|
2588 | String fname |
---|
2589 | |
---|
2590 | String path = "entry:reduction:whole_trans" |
---|
2591 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2592 | end |
---|
2593 | |
---|
2594 | //whole detector trasmission error |
---|
2595 | Function V_getSampleTransWholeDetErr(fname) |
---|
2596 | String fname |
---|
2597 | |
---|
2598 | String path = "entry:reduction:whole_trans_error" |
---|
2599 | return(V_getRealValueFromHDF5(fname,path)) |
---|
2600 | end |
---|
2601 | |
---|
2602 | // this is a NON NICE entered field |
---|
2603 | // so I need to catch the error if it's not there |
---|
2604 | Function/WAVE V_getReductionProtocolWave(fname) |
---|
2605 | String fname |
---|
2606 | |
---|
2607 | String path = "entry:reduction:protocol" |
---|
2608 | WAVE/T/Z tw = V_getTextWaveFromHDF5(fname,path) |
---|
2609 | |
---|
2610 | if(waveExists(tw)) |
---|
2611 | return tw |
---|
2612 | else |
---|
2613 | Make/O/T/N=0 nullTextWave |
---|
2614 | return nullTextWave |
---|
2615 | endif |
---|
2616 | |
---|
2617 | end |
---|
2618 | |
---|
2619 | |
---|
2620 | |
---|
2621 | |
---|
2622 | // these have all been moved elsewhere |
---|
2623 | /////// pol_sans (data folder) |
---|
2624 | // |
---|
2625 | //Function/S V_getPolSANS_cellName(fname) |
---|
2626 | // String fname |
---|
2627 | // |
---|
2628 | // String path = "entry:reduction:pol_sans:cell_name" |
---|
2629 | // Variable num=60 |
---|
2630 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
2631 | //End |
---|
2632 | // |
---|
2633 | // |
---|
2634 | //Function/WAVE V_getPolSANS_cellParams(fname) |
---|
2635 | // String fname |
---|
2636 | // |
---|
2637 | // String path = "entry:reduction:pol_sans:cell_parameters" |
---|
2638 | // WAVE w = V_getRealWaveFromHDF5(fname,path) |
---|
2639 | // |
---|
2640 | // return w |
---|
2641 | //end |
---|
2642 | // |
---|
2643 | //Function/S V_getPolSANS_PolSANSPurpose(fname) |
---|
2644 | // String fname |
---|
2645 | // |
---|
2646 | // String path = "entry:reduction:pol_sans:pol_sans_purpose" |
---|
2647 | // Variable num=60 |
---|
2648 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
2649 | //End |
---|
2650 | |
---|
2651 | |
---|
2652 | //////// TOP LEVEL DATA REPRESENTATION |
---|
2653 | // |
---|
2654 | // note that here the data is (supposed to be) a link, not the actual data |
---|
2655 | // Igor HDf implementation cannot follow links properly, as far as I know. |
---|
2656 | // so ignore them here, and focus on the image that may be possible to read |
---|
2657 | // |
---|
2658 | |
---|
2659 | // data_B (data folder) |
---|
2660 | // data (wave) 1 //ignore this, it's a link |
---|
2661 | // variables (wave) 320 |
---|
2662 | // thumbnail (data folder) |
---|
2663 | |
---|
2664 | ////data (wave) "binary" |
---|
2665 | //// TODO -- this will need to be completely replaced with a function that can |
---|
2666 | //// read the binary image data. should be possible, but I don't know the details on either end... |
---|
2667 | //Function/S V_getDataImage(fname,detStr) |
---|
2668 | // String fname,detStr |
---|
2669 | // |
---|
2670 | // String path = "entry:data_"+detStr+":thumbnail:data" |
---|
2671 | // Variable num=60 |
---|
2672 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
2673 | //End |
---|
2674 | // |
---|
2675 | //Function/S V_getDataImageDescription(fname,detStr) |
---|
2676 | // String fname,detStr |
---|
2677 | // |
---|
2678 | // String path = "entry:data_"+detStr+":thumbnail:description" |
---|
2679 | // Variable num=60 |
---|
2680 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
2681 | //End |
---|
2682 | // |
---|
2683 | //Function/S V_getDataImageType(fname,detStr) |
---|
2684 | // String fname,detStr |
---|
2685 | // |
---|
2686 | // String path = "entry:data_"+detStr+":thumbnail:type" |
---|
2687 | // Variable num=60 |
---|
2688 | // return(V_getStringFromHDF5(fname,path,num)) |
---|
2689 | //End |
---|
2690 | // |
---|
2691 | // |
---|
2692 | |
---|
2693 | |
---|