source: sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_Read.ipf @ 1018

Last change on this file since 1018 was 1018, checked in by srkline, 6 years ago

changes to (mostly) PatchFiles? to be more VSANS-aware, and to update the installed version to report the correct version. Apparently people actually check, and are confused when they don't match.

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