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

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

editing the read/write routines to include the latest additions to the json file definiton, including all of the additions to the polarization components. The file structure should be largely set at this point, with hopefully only minor changes as I shake out the bugs of working with the data.

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