File: cif_img_1.7.3.dic

package info (click to toggle)
cbflib 0.9.7%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 65,272 kB
  • sloc: ansic: 131,361; python: 22,780; sh: 3,108; makefile: 2,088; yacc: 659; java: 223; f90: 214; xml: 210; cpp: 58
file content (10648 lines) | stat: -rw-r--r-- 441,221 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
           # [IUCr Home Page] [CIF Home Page] [CBF/imgCIF] [CBFlib] #

                                 # imgCIF/CBF #

                           # Extensions Dictionary #

 data_cif_img.dic

     _datablock.id               cif_img.dic
     _datablock.description
 ;
 ##############################################################################
 #                                                                            #
 #                       Image CIF Dictionary (imgCIF)                        #
 #             and Crystallographic Binary File Dictionary (CBF)              #
 #            Extending the Macromolecular CIF Dictionary (mmCIF)             #
 #                                                                            #
 #                              Version 1.7.3                                 #
 #                              of 2013-10-15                                 #
 #    ###################################################################     #
 #    # *** WARNING *** THIS IS A DRAFT FOR DISCUSSSION *** WARNING *** #     #
 #    #                 SUBJECT TO CHANGE WITHOUT NOTICE                #     #
 #    #       SEND COMMENTS TO imgcif-l@iucr.org CITING THE VERSION     #     #
 #    ###################################################################     #
 #                  This draft edited by H. J. Bernstein                      #
 #                                                                            #
 #     by Andrew P. Hammersley, Herbert J. Bernstein and John D. Westbrook    #
 #                                                                            #
 # This dictionary was adapted from format discussed at the imgCIF Workshop,  #
 # held at BNL Oct 1997 and the Crystallographic Binary File Format Draft     #
 # Proposal by Andrew Hammersley.  The first DDL 2.1 Version was created by   #
 # John Westbrook.  This version was drafted by Herbert J. Bernstein and      #
 # incorporates comments by I. David Brown, John Westbrook, Brian McMahon,    #
 # Bob Sweet, Paul Ellis, Harry Powell, Wilfred Li, Gotzon Madariaga,         #
 # Frances C. Bernstein, Chris Nielsen, Nicola Ashcroft and others.           #
 ##############################################################################

 ##############################################################################
 #    CONTENTS
 #
 #        CATEGORY_GROUP_LIST
 #        SUB_CATEGORY
 #
 #        category  ARRAY_DATA
 #
 #                  _array_data.array_id
 #                  _array_data.binary_id
 #                  _array_data.data
 #                  _array_data.header_contents
 #                  _array_data.header_convention
 #                  _array_data.variant
 #
 #        category  ARRAY_ELEMENT_SIZE
 #
 #                  _array_element_size.array_id
 #                  _array_element_size.index
 #                  _array_element_size.size
 #                  _array_element_size.variant
 #
 #        category  ARRAY_INTENSITIES
 #
 #                  _array_intensities.array_id
 #                  _array_intensities.binary_id
 #                  _array_intensities.details
 #                  _array_intensities.gain
 #                  _array_intensities.gain_esd
 #                  _array_intensities.linearity
 #                  _array_intensities.offset
 #                  _array_intensities.scaling
 #                  _array_intensities.overload
 #                  _array_intensities.undefined_value
 #                  _array_intensities.pixel_fast_bin_size
 #                  _array_intensities.pixel_slow_bin_size
 #                  _array_intensities.pixel_binning_method
 #                  _array_intensities.variant
 #
 #        category  ARRAY_STRUCTURE
 #
 #                  _array_structure.byte_order
 #                  _array_structure.compression_type
 #                  _array_structure.compression_type_flag
 #                  _array_structure.encoding_type
 #                  _array_structure.id
 #                  _array_structure.variant
 #
 #        category  ARRAY_STRUCTURE_LIST
 #
 #                  _array_structure_list.axis_set_id
 #                  _array_structure_list.array_id
 #                  _array_structure_list.dimension
 #                  _array_structure_list.direction
 #                  _array_structure_list.index
 #                  _array_structure_list.precedence
 #                  _array_structure_list.variant
 #
 #        category  ARRAY_STRUCTURE_LIST_SECTION
 #
 #                  _array_structure_list_section.array_id
 #                  _array_structure_list_section.id
 #                  _array_structure_list_section.index
 #                  _array_structure_list_section.end
 #                  _array_structure_list_section.start
 #                  _array_structure_list_section.stride
 #                  _array_structure_list_section.variant
 #
 #        category  ARRAY_STRUCTURE_LIST_AXIS
 #
 #                  _array_structure_list_axis.axis_id
 #                  _array_structure_list_axis.axis_set_id
 #                  _array_structure_list_axis.angle
 #                  _array_structure_list_axis.angle_increment
 #                  _array_structure_list_axis.displacement
 #                  _array_structure_list_axis.fract_displacement
 #                  _array_structure_list_axis.displacement_increment
 #                  _array_structure_list_axis.fract_displacement_increment
 #                  _array_structure_list_axis.angular_pitch
 #                  _array_structure_list_axis.radial_pitch
 #                  _array_structure_list_axis.reference_angle
 #                  _array_structure_list_axis.reference_displacement
 #                  _array_structure_list_axis.variant
 #
 #        category  AXIS
 #
 #                  _axis.depends_on
 #                  _axis.equipment
 #                  _axis.id
 #                  _axis.offset[1]
 #                  _axis.offset[2]
 #                  _axis.offset[3]
 #                  _axis.rotation
 #                  _axis.rotation_axis
 #                  _axis.type
 #                  _axis.system
 #                  _axis.vector[1]
 #                  _axis.vector[2]
 #                  _axis.vector[3]
 #                  _axis.variant
 #
 #        category  DIFFRN_DATA_FRAME
 #
 #                  _diffrn_data_frame.array_id
 #                  _diffrn_data_frame.array_section_id
 #                  _diffrn_data_frame.binary_id
 #                  _diffrn_data_frame.center_fast
 #                  _diffrn_data_frame.center_slow
 #                  _diffrn_data_frame.center_units
 #                  _diffrn_data_frame.detector_element_id
 #                  _diffrn_data_frame.id
 #                  _diffrn_data_frame.details
 #                  _diffrn_data_frame.variant
 #
 #        category  DIFFRN_DETECTOR
 #
 #                  _diffrn_detector.details
 #                  _diffrn_detector.detector
 #                  _diffrn_detector.diffrn_id
 #                  _diffrn_detector.dtime
 #                  _diffrn_detector.id
 #                  _diffrn_detector.layer_thickness
 #                  _diffrn_detector.number_of_axes
 #                  _diffrn_detector.type
 #                  _diffrn_detector.variant
 #
 #        category  DIFFRN_DETECTOR_AXIS
 #
 #                  _diffrn_detector_axis.axis_id
 #                  _diffrn_detector_axis.detector_id
 #                  _diffrn_detector_axis.variant
 #
 #        category  DIFFRN_DETECTOR_ELEMENT
 #
 #                  _diffrn_detector_element.id
 #                  _diffrn_detector_element.detector_id
 #                  _diffrn_detector_element.reference_center_fast
 #                  _diffrn_detector_element.reference_center_slow
 #                  _diffrn_detector_element.reference_center_units
 #                  _diffrn_detector_element.variant
 #
 #        category  DIFFRN_MEASUREMENT
 #
 #                  _diffrn_measurement.diffrn_id
 #                  _diffrn_measurement.details
 #                  _diffrn_measurement.device
 #                  _diffrn_measurement.device_details
 #                  _diffrn_measurement.device_type
 #                  _diffrn_measurement.id
 #                  _diffrn_measurement.method
 #                  _diffrn_measurement.number_of_axes
 #                  _diffrn_measurement.sample_detector_distance
 #                  _diffrn_measurement.sample_detector_voffset
 #                  _diffrn_measurement.specimen_support
 #                  _diffrn_measurement.variant
 #
 #        category  DIFFRN_MEASUREMENT_AXIS
 #
 #                  _diffrn_measurement_axis.axis_id
 #                  _diffrn_measurement_axis.measurement_device
 #                  _diffrn_measurement_axis.measurement_id
 #                  _diffrn_measurement_axis.variant
 #
 #        category  DIFFRN_RADIATION
 #
 #                  _diffrn_radiation.collimation
 #                  _diffrn_radiation.diffrn_id
 #                  _diffrn_radiation.div_x_source
 #                  _diffrn_radiation.div_y_source
 #                  _diffrn_radiation.div_x_y_source
 #                  _diffrn_radiation.filter_edge'
 #                  _diffrn_radiation.inhomogeneity
 #                  _diffrn_radiation.monochromator
 #                  _diffrn_radiation.polarisn_norm
 #                  _diffrn_radiation.polarisn_ratio
 #                  _diffrn_radiation.polarizn_source_norm
 #                  _diffrn_radiation.polarizn_source_ratio
 #                  _diffrn_radiation.probe
 #                  _diffrn_radiation.type
 #                  _diffrn_radiation.xray_symbol
 #                  _diffrn_radiation.wavelength_id
 #                  _diffrn_radiation.variant
 #
 #        category  DIFFRN_REFLN
 #
 #                  _diffrn_refln.frame_id
 #                  _diffrn_refln.variant
 #
 #        category  DIFFRN_SCAN
 #
 #                  _diffrn_scan.id
 #                  _diffrn_scan.date_end
 #                  _diffrn_scan.date_start
 #                  _diffrn_scan.integration_time
 #                  _diffrn_scan.frame_id_start
 #                  _diffrn_scan.frame_id_end
 #                  _diffrn_scan.frames
 #                  _diffrn_scan.time_period
 #                  _diffrn_scan.time_rstrt_incr
 #                  _diffrn_scan.variant
 #
 #        category  DIFFRN_SCAN_AXIS
 #
 #                  _diffrn_scan_axis.axis_id
 #                  _diffrn_scan_axis.angle_start
 #                  _diffrn_scan_axis.angle_range
 #                  _diffrn_scan_axis.angle_increment
 #                  _diffrn_scan_axis.angle_rstrt_incr
 #                  _diffrn_scan_axis.displacement_start
 #                  _diffrn_scan_axis.displacement_range
 #                  _diffrn_scan_axis.displacement_increment
 #                  _diffrn_scan_axis.displacement_rstrt_incr
 #                  _diffrn_scan_axis.reference_angle
 #                  _diffrn_scan_axis.reference_displacement
 #                  _diffrn_scan_axis.scan_id
 #                  _diffrn_scan_axis.variant
 #
 #        category  DIFFRN_SCAN_FRAME
 #
 #                  _diffrn_scan_frame.date
 #                  _diffrn_scan_frame.frame_id
 #                  _diffrn_scan_frame.frame_number
 #                  _diffrn_scan_frame.integration_time
 #                  _diffrn_scan_frame.scan_id
 #                  _diffrn_scan_frame.time_period
 #                  _diffrn_scan_frame.time_rstrt_incr
 #                  _diffrn_scan_frame.variant
 #
 #        category  DIFFRN_SCAN_FRAME_AXIS
 #
 #                  _diffrn_scan_frame_axis.axis_id
 #                  _diffrn_scan_frame_axis.angle
 #                  _diffrn_scan_frame_axis.angle_increment
 #                  _diffrn_scan_frame_axis.angle_rstrt_incr
 #                  _diffrn_scan_frame_axis.displacement
 #                  _diffrn_scan_frame_axis.displacement_increment
 #                  _diffrn_scan_frame_axis.displacement_rstrt_incr
 #                  _diffrn_scan_frame_axis.reference_angle
 #                  _diffrn_scan_frame_axis.reference_displacement
 #                  _diffrn_scan_frame_axis.frame_id
 #                  _diffrn_scan_frame_axis.variant
 #
 #        category  DIFFRN_SCAN_FRAME_MONITOR
 #
 #                  _diffrn_scan_frame_monitor.id
 #                  _diffrn_scan_frame_monitor.detector_id
 #                  _diffrn_scan_frame_monitor.scan_id
 #                  _diffrn_data_frame_monitor.frame_id
 #                  _diffrn_data_frame_monitor.integration_time
 #                  _diffrn_data_frame_monitor.monitor_value
 #                  _diffrn_data_frame_monitor.variant
 #
 #        category  MAP
 #
 #                  _map.details
 #                  _map.diffrn_id
 #                  _map.entry_id
 #                  _map.id
 #                  _map.variant
 #
 #       category   MAP_SEGMENT
 #
 #                  _map_segment.array_id
 #                  _map_segment.array_section_id
 #                  _map_segment.binary_id
 #                  _map_segment.mask_array_id
 #                  _map_segment.mask_array_section_id
 #                  _map_segment.mask_binary_id
 #                  _map_segment.id
 #                  _map_segment.map_id
 #                  _map_segment.details
 #                  _map_segment.variant
 #
 #       category   VARIANT
 #
 #                  _variant.details
 #                  _variant.diffrn_id
 #                  _variant.entry_id
 #                  _variant.role
 #                  _variant.timestamp
 #                  _variant.variant
 #                  _variant.variant_of
 #
 #       ***DEPRECATED*** data items
 #
 #                  _diffrn_detector_axis.id
 #                  _diffrn_detector_element.center[1]
 #                  _diffrn_detector_element.center[2]
 #                  _diffrn_measurement_axis.id
 #
 #       ***DEPRECATED*** category  DIFFRN_FRAME_DATA
 #
 #                  _diffrn_frame_data.array_id
 #                  _diffrn_frame_data.binary_id
 #                  _diffrn_frame_data.detector_element_id
 #                  _diffrn_frame_data.id
 #                  _diffrn_frame_data.details
 #
 #
 #        ITEM_TYPE_LIST
 #        ITEM_UNITS_LIST
 #        DICTIONARY_HISTORY
 #
 ##############################################################################


+--------------------------------------------------------------------------------------------------------------------+
|ARRAY_DATA_GROUP|Categories that describe array data.                                                               |
|                |---------------------------------------------------------------------------------------------------|
|                |+-------------------------------------------------------------------------------------------------+|
|                || ARRAY_DATA               | Data items in the ARRAY_DATA category are the containers for the     ||
|                ||                          | array data items described in the category ARRAY_STRUCTURE.          ||
|                ||                          |                                                                      ||
|                ||                          | It is recognized that the data in this category needs to be used in  ||
|                ||                          | two distinct ways. During a data collection the lack of ancillary    ||
|                ||                          | data and timing constraints in processing data may dictate the need  ||
|                ||                          | to make a 'miniCBF' nothing more than an essential minimum of        ||
|                ||                          | information to record the results of the data collection. In that    ||
|                ||                          | case it is proper to use the ARRAY_DATA category as a container for  ||
|                ||                          | just a single image and a compacted, beam-line dependent list of     ||
|                ||                          | data collection parameter values. In such a case, only the tags      ||
|                ||                          | '_array_data.header_convention', '_array_data.header_contents' and   ||
|                ||                          | '_array_data.data' need be populated.                                ||
|                ||                          |                                                                      ||
|                ||                          | For full processing and archiving, most of the tags in this          ||
|                ||                          | dictionary will need to be populated.                                ||
|                ||--------------------------+----------------------------------------------------------------------||
|                || ARRAY_ELEMENT_SIZE       | Data items in the ARRAY_ELEMENT_SIZE category record the physical    ||
|                ||                          | size of array elements along each array dimension.                   ||
|                ||--------------------------+----------------------------------------------------------------------||
|                || ARRAY_INTENSITIES        | Data items in the ARRAY_INTENSITIES category record the information  ||
|                ||                          | required to recover the intensity data from the set of data values   ||
|                ||                          | stored in the ARRAY_DATA category.                                   ||
|                ||                          |                                                                      ||
|                ||                          | The detector may have a complex relationship between the raw         ||
|                ||                          | intensity values and the number of incident photons. In most cases,  ||
|                ||                          | the number stored in the final array will have a simple linear       ||
|                ||                          | relationship to the actual number of incident photons, given by      ||
|                ||                          | _array_intensities.gain. If raw, uncorrected values are presented    ||
|                ||                          | (e.g. for calibration experiments), the value of                     ||
|                ||                          | _array_intensities.linearity will be 'raw' and                       ||
|                ||                          | _array_intensities.gain will not be used.                            ||
|                ||--------------------------+----------------------------------------------------------------------||
|                || ARRAY_STRUCTURE          | Data items in the ARRAY_STRUCTURE category record the organization   ||
|                ||                          | and encoding of array data that may be stored in the ARRAY_DATA      ||
|                ||                          | category.                                                            ||
|                ||-------------------------------------------------------------------------------------------------||
|                || +---------------------------------------------------------------------------------------------+ ||
|                || |   | ARRAY_STRUCTURE_LIST         | Data items in the ARRAY_STRUCTURE_LIST category record   | ||
|                || |   |                              | the size and organization of each array dimension.       | ||
|                || |   |                              |                                                          | ||
|                || |   |                              | The relationship to physical axes may be given.          | ||
|                || |   |-----------------------------------------------------------------------------------------| ||
|                || |   | +-------------------------------------------------------------------------------------+ | ||
|                || |   | |   | ARRAY_STRUCTURE_LIST_SECTION | Data items in the ARRAY_STRUCTURE_LIST_SECTION   | | ||
|                || |   | |   |                              | category identify the dimension-by-dimension     | | ||
|                || |   | |   |                              | start, end and stride of each section of an      | | ||
|                || |   | |   |                              | array that is to be referenced.                  | | ||
|                || |   | |   |                              |                                                  | | ||
|                || |   | |   |                              | For any array of array_id, ARRAYID, array        | | ||
|                || |   | |   |                              | section ids of the form                          | | ||
|                || |   | |   |                              | ARRAYID(start1:end1:stride1,start2:end2:stride2, | | ||
|                || |   | |   |                              | ...)                                             | | ||
|                || |   | |   |                              | are defined by default.                          | | ||
|                || |   | |   |------------------------------+--------------------------------------------------| | ||
|                || |   | |   | ARRAY_STRUCTURE_LIST_AXIS    | Data items in the ARRAY_STRUCTURE_LIST_AXIS      | | ||
|                || |   | |   |                              | category describe the physical settings of sets  | | ||
|                || |   | |   |                              | of axes for the centres of pixels that           | | ||
|                || |   | |   |                              | correspond to data points described in the       | | ||
|                || |   | |   |                              | ARRAY_STRUCTURE_LIST category.                   | | ||
|                || |   | |   |                              |                                                  | | ||
|                || |   | |   |                              | In the simplest cases, the physical increments   | | ||
|                || |   | |   |                              | of a single axis correspond to the increments of | | ||
|                || |   | |   |                              | a single array index. More complex               | | ||
|                || |   | |   |                              | organizations, e.g. spiral scans, may require    | | ||
|                || |   | |   |                              | coupled motions along multiple axes.             | | ||
|                || |   | |   |                              |                                                  | | ||
|                || |   | |   |                              | Note that a spiral scan uses two coupled axes:   | | ||
|                || |   | |   |                              | one for the angular direction and one for the    | | ||
|                || |   | |   |                              | radial direction. This differs from a            | | ||
|                || |   | |   |                              | cylindrical scan for which the two axes are not  | | ||
|                || |   | |   |                              | coupled into one set.                            | | ||
|                || |   | +-------------------------------------------------------------------------------------+ | ||
|                || |   |-----------------------------------------------------------------------------------------| ||
|                || +---------------------------------------------------------------------------------------------+ ||
|                |+-------------------------------------------------------------------------------------------------+|
|----------------+---------------------------------------------------------------------------------------------------|
|AXIS_GROUP      |Categories that describe axes.                                                                     |
|                |---------------------------------------------------------------------------------------------------|
|                |+-------------------------------------------------------------------------------------------------+|
|                || AXIS | Data items in the AXIS category record the information required to describe the various  ||
|                ||      | goniometer, detector, source and other axes needed to specify a data collection or the   ||
|                ||      | axes defining the coordinate system of an image.                                         ||
|                ||      |                                                                                          ||
|                ||      | The location of each axis is specified by two vectors: the axis itself, given by a unit  ||
|                ||      | vector in the direction of the axis, and an offset to the base of the unit vector.       ||
|                ||      |                                                                                          ||
|                ||      | The vectors defining an axis are referenced to an appropriate coordinate system. The     ||
|                ||      | axis vector, itself, is a dimensionless unit vector. Where meaningful, the offset vector ||
|                ||      | is given in millimetres. In coordinate systems not measured in metres, the offset is not ||
|                ||      | specified and is taken as zero.                                                          ||
|                ||      |                                                                                          ||
|                ||      | The available coordinate systems are:                                                    ||
|                ||      |                                                                                          ||
|                ||      | The imgCIF standard laboratory coordinate system                                         ||
|                ||      | The direct lattice (fractional atomic coordinates)                                       ||
|                ||      | The orthogonal Cartesian coordinate system (real space)                                  ||
|                ||      | The reciprocal lattice                                                                   ||
|                ||      | An abstract orthogonal Cartesian coordinate frame                                        ||
|                |+-------------------------------------------------------------------------------------------------+|
|----------------+---------------------------------------------------------------------------------------------------|
|DIFFRN_GROUP    |Categories that describe details of the diffraction experiment.                                    |
|                |---------------------------------------------------------------------------------------------------|
|                |+-------------------------------------------------------------------------------------------------+|
|                || DIFFRN_DATA_FRAME          | Data items in the DIFFRN_DATA_FRAME category record the details    ||
|                ||                            | about each frame of data.                                          ||
|                ||                            |                                                                    ||
|                ||                            | The items in this category were previously in a DIFFRN_FRAME_DATA  ||
|                ||                            | category, which is now deprecated. The items from the old category ||
|                ||                            | are provided as aliases but should not be used for new work.       ||
|                ||----------------------------+--------------------------------------------------------------------||
|                || DIFFRN_DETECTOR            | Data items in the DIFFRN_DETECTOR category describe the detector   ||
|                ||                            | used to measure the scattered radiation, including any analyser    ||
|                ||                            | and post-sample collimation.                                       ||
|                ||-------------------------------------------------------------------------------------------------||
|                || +---------------------------------------------------------------------------------------------+ ||
|                || |   | DIFFRN_DETECTOR_AXIS | Data items in the DIFFRN_DETECTOR_AXIS category associate axes   | ||
|                || |   |                      | with detectors.                                                  | ||
|                || +---------------------------------------------------------------------------------------------+ ||
|                ||-------------------------------------------------------------------------------------------------||
|                || +---------------------------------------------------------------------------------------------+ ||
|                || |   | DIFFRN_DETECTOR_ELEMENT | Data items in the DIFFRN_DETECTOR_ELEMENT category record the | ||
|                || |   |                         | details about spatial layout and other characteristics of     | ||
|                || |   |                         | each element of a detector which may have multiple elements.  | ||
|                || |   |                         |                                                               | ||
|                || |   |                         | In most cases, giving more detailed information in            | ||
|                || |   |                         | ARRAY_STRUCTURE_LIST and ARRAY_STRUCTURE_LIST_AXIS is         | ||
|                || |   |                         | preferable to simply providing the centre of the detector     | ||
|                || |   |                         | element.                                                      | ||
|                || +---------------------------------------------------------------------------------------------+ ||
|                ||-------------------------------------------------------------------------------------------------||
|                || DIFFRN_MEASUREMENT         | Data items in the DIFFRN_MEASUREMENT category record details about ||
|                ||                            | the device used to orient and/or position the crystal during data  ||
|                ||                            | measurement and the manner in which the diffraction data were      ||
|                ||                            | measured.                                                          ||
|                ||-------------------------------------------------------------------------------------------------||
|                || +---------------------------------------------------------------------------------------------+ ||
|                || |   | DIFFRN_MEASUREMENT_AXIS | Data items in the DIFFRN_MEASUREMENT_AXIS category associate  | ||
|                || |   |                         | axes with goniometers.                                        | ||
|                || +---------------------------------------------------------------------------------------------+ ||
|                ||-------------------------------------------------------------------------------------------------||
|                || DIFFRN_RADIATION           | Data items in the DIFFRN_RADIATION category describe the radiation ||
|                ||                            | used for measuring diffraction intensities, its collimation and    ||
|                ||                            | monochromatization before the sample.                              ||
|                ||                            |                                                                    ||
|                ||                            | Post-sample treatment of the beam is described by data items in    ||
|                ||                            | the DIFFRN_DETECTOR category.                                      ||
|                ||----------------------------+--------------------------------------------------------------------||
|                || DIFFRN_REFLN               | This category redefinition has been added to extend the key of the ||
|                ||                            | standard DIFFRN_REFLN category.                                    ||
|                ||                            |                                                                    ||
|                ||                            | Data items in the DIFFRN_REFLN category record details about the   ||
|                ||                            | intensities in the diffraction data set identified by              ||
|                ||                            | _diffrn_refln.diffrn_id.                                           ||
|                ||                            |                                                                    ||
|                ||                            | The DIFFRN_REFLN data items refer to individual intensity          ||
|                ||                            | measurements and must be included in looped lists.                 ||
|                ||                            |                                                                    ||
|                ||                            | The DIFFRN_REFLNS data items specify the parameters that apply to  ||
|                ||                            | all intensity measurements in the particular diffraction data set  ||
|                ||                            | identified by _diffrn_reflns.diffrn_id and _diffrn_refln.frame_id  ||
|                ||----------------------------+--------------------------------------------------------------------||
|                || DIFFRN_SCAN                | Data items in the DIFFRN_SCAN category describe the parameters of  ||
|                ||                            | one or more scans, relating axis positions to frames.              ||
|                ||-------------------------------------------------------------------------------------------------||
|                || +---------------------------------------------------------------------------------------------+ ||
|                || |   | DIFFRN_SCAN_AXIS | Data items in the DIFFRN_SCAN_AXIS category describe the settings of | ||
|                || |   |                  | axes for particular scans. Unspecified axes are assumed to be at     | ||
|                || |   |                  | their zero points.                                                   | ||
|                || +---------------------------------------------------------------------------------------------+ ||
|                ||-------------------------------------------------------------------------------------------------||
|                || +---------------------------------------------------------------------------------------------+ ||
|                || |   | DIFFRN_SCAN_FRAME | Data items in the DIFFRN_SCAN_FRAME category describe the           | ||
|                || |   |                   | relationships of particular frames to scans.                        | ||
|                || +---------------------------------------------------------------------------------------------+ ||
|                ||-------------------------------------------------------------------------------------------------||
|                || +---------------------------------------------------------------------------------------------+ ||
|                || |   | +-------------------------------------------------------------------------------------+ | ||
|                || |   | |   | DIFFRN_SCAN_FRAME_AXIS | Data items in the DIFFRN_SCAN_FRAME_AXIS category      | | ||
|                || |   | |   |                        | describe the settings of axes for particular frames.   | | ||
|                || |   | |   |                        | Unspecified axes are assumed to be at their zero       | | ||
|                || |   | |   |                        | points. If, for any given frame, nonzero values apply  | | ||
|                || |   | |   |                        | for any of the data items in this category, those      | | ||
|                || |   | |   |                        | values should be given explicitly in this category and | | ||
|                || |   | |   |                        | not simply inferred from values in DIFFRN_SCAN_AXIS.   | | ||
|                || |   | +-------------------------------------------------------------------------------------+ | ||
|                || |---+-----------------------------------------------------------------------------------------| ||
|                || |   | +-------------------------------------------------------------------------------------+ | ||
|                || |   | |   | DIFFRN_SCAN_FRAME_MONITOR | Data items in the DIFFRN_SCAN_FRAME_MONITOR         | | ||
|                || |   | |   |                           | category record the values and details about each   | | ||
|                || |   | |   |                           | monitor for each frame of data during a scan.       | | ||
|                || |   | |   |                           |                                                     | | ||
|                || |   | |   |                           | Each monitor value is uniquely identified by the    | | ||
|                || |   | |   |                           | combination of the scan_id given by                 | | ||
|                || |   | |   |                           | _diffrn_scan_frame.scan_id the frame_id given by    | | ||
|                || |   | |   |                           | _diffrn_scan_frame_monitor.frame_id, the monitor's  | | ||
|                || |   | |   |                           | detector_id given by                                | | ||
|                || |   | |   |                           | _diffrn_scan_frame_monitor.monitor_id, and a        | | ||
|                || |   | |   |                           | 1-based ordinal given by                            | | ||
|                || |   | |   |                           | _diffrn_scan_frame_monitor.id.                      | | ||
|                || |   | |   |                           |                                                     | | ||
|                || |   | |   |                           | If there is only one frame for the scan, the value  | | ||
|                || |   | |   |                           | of _diffrn_scan_frame_monitor.frame_id may be       | | ||
|                || |   | |   |                           | omitted.                                            | | ||
|                || |   | |   |                           |                                                     | | ||
|                || |   | |   |                           | A single frame may have more than one monitor       | | ||
|                || |   | |   |                           | value, and each monitor value may be the result of  | | ||
|                || |   | |   |                           | integration over the entire frame integration time  | | ||
|                || |   | |   |                           | given by the value of                               | | ||
|                || |   | |   |                           | _diffrn_scan_frame.integration_time or many monitor | | ||
|                || |   | |   |                           | values may be reported over shorter times given by  | | ||
|                || |   | |   |                           | the value of                                        | | ||
|                || |   | |   |                           | _diffrn_scan_frame_monitor.integration_time. If     | | ||
|                || |   | |   |                           | only one monitor value for a given monitor is       | | ||
|                || |   | |   |                           | collected during the integration time of the frame, | | ||
|                || |   | |   |                           | the value of _diffrn_scan_frame_monitor.id may be   | | ||
|                || |   | |   |                           | omitted.                                            | | ||
|                || |   | +-------------------------------------------------------------------------------------+ | ||
|                || +---------------------------------------------------------------------------------------------+ ||
|                |+-------------------------------------------------------------------------------------------------+|
|----------------+---------------------------------------------------------------------------------------------------|
|MAP_GROUP       |Categories that describe maps.                                                                     |
|                |---------------------------------------------------------------------------------------------------|
|                |+-------------------------------------------------------------------------------------------------+|
|                || MAP     | Data items in the MAP category record the details of a maps. maps record values of    ||
|                ||         | parameters, such as density, that are functions of position within a cell or are      ||
|                ||         | functions of orthogonal coordinates in three space.                                   ||
|                ||         |                                                                                       ||
|                ||         | A map may is composed of one or more map segments specified in the MAP_SEGMENT        ||
|                ||         | category.                                                                             ||
|                ||         |                                                                                       ||
|                ||         | Examples are given in the MAP_SEGMENT category.                                       ||
|                ||-------------------------------------------------------------------------------------------------||
|                || +---------------------------------------------------------------------------------------------+ ||
|                || |   | MAP_SEGMENT | Data items in the MAP_SEGMENT category record the details about each      | ||
|                || |   |             | segment (section or brick) of a map.                                      | ||
|                || +---------------------------------------------------------------------------------------------+ ||
|                |+-------------------------------------------------------------------------------------------------+|
|----------------+---------------------------------------------------------------------------------------------------|
|VARIANT_GROUP   |Categories that describe variants                                                                  |
|                |---------------------------------------------------------------------------------------------------|
|                |+-------------------------------------------------------------------------------------------------+|
|                || VARIANT | Data items in the VARIANT category record the details about sets of variants of data  ||
|                ||         | items.                                                                                ||
|                ||         |                                                                                       ||
|                ||         | There is sometimes a need to allow for multiple versions of the same data items in    ||
|                ||         | order to allow for refinements and corrections to earlier assumptions, observations   ||
|                ||         | and calculations. In order to allow data sets to contain more than one variant of the ||
|                ||         | same information, an optional ...variant data item as a pointer to _variant.variant   ||
|                ||         | has been added to the key of every category, as an implicit data item with a null     ||
|                ||         | (empty) default value.                                                                ||
|                ||         |                                                                                       ||
|                ||         | All rows in a category with the same variant value are considered to be related to    ||
|                ||         | one another and to all rows in other categories with the same variant value. For a    ||
|                ||         | given variant, all such rows are also considered to be related to all rows with a     ||
|                ||         | null variant value, except that a row with a null variant value is for which all      ||
|                ||         | other components of its key are identical to those entries in another row with a      ||
|                ||         | non-null variant value is not related the the rows with that non-null variant value.  ||
|                ||         | This behavior is similar to the convention for identifying alternate conformers in an ||
|                ||         | atom list.                                                                            ||
|                ||         |                                                                                       ||
|                ||         | An optional role may be specified for a variant as the value of _variant.role.        ||
|                ||         | Possible roles are null, "preferred", "raw data", "unsuccessful trial".               ||
|                ||         |                                                                                       ||
|                ||         | variants may carry an optional timestamp as the value of _variant.timestamp.          ||
|                ||         |                                                                                       ||
|                ||         | variants may be related to other variants from which they were derived by the value   ||
|                ||         | of _variant.variant_of                                                                ||
|                ||         |                                                                                       ||
|                ||         | Further details about the variant may be specified as the value of _variant.details.  ||
|                ||         |                                                                                       ||
|                ||         | In order to allow variant information from multiple datasets to be combined,          ||
|                ||         | _variant.diffrn_id and/or _variant.entry_id may be used.                              ||
|                |+-------------------------------------------------------------------------------------------------+|
+--------------------------------------------------------------------------------------------------------------------+


 ;


     _dictionary.title           cif_img.dic
     _dictionary.version         1.7.2
     _dictionary.datablock_id    cif_img.dic



 #########################
 ## CATEGORY_GROUP_LIST ##
 #########################

      loop_
     _category_group_list.id
     _category_group_list.parent_id
     _category_group_list.description
              'inclusive_group'   .
 ;             Categories that belong to the dictionary extension.
 ;
              'array_data_group'
              'inclusive_group'
 ;             Categories that describe array data.
 ;
              'axis_group'
              'inclusive_group'
 ;             Categories that describe axes.
 ;
              'diffrn_group'
              'inclusive_group'
 ;            Categories that describe details of the diffraction experiment.
 ;
              'map_group'
              'inclusive_group'
 ;            Categories that describe details of map data.
 ;
              'variant_group'
              'inclusive_group'
 ;            Categories that describe details of map data.
 ;


 ##################
 ## SUB_CATEGORY ##
 ##################

      loop_
     _sub_category.id
     _sub_category.description
               'matrix'
 ;              The collection of elements of a matrix.
 ;
               'vector'
 ;              The collection of elements of a vector.
 ;




 ##############
 # ARRAY_DATA #
 ##############


 save_array_data
     _category.description
 ;    Data items in the ARRAY_DATA category are the containers for
      the array data items described in the category ARRAY_STRUCTURE.
     
      It is recognized that the data in this category needs to be used in
      two distinct ways.  During a data collection the lack of ancillary
      data and timing constraints in processing data may dictate the
      need to make a 'miniCBF' nothing more than an essential minimum
      of information to record the results of the data collection.  In that
      case it is proper to use the ARRAY_DATA category as a
      container for just a single image and a compacted, beam-line
      dependent list of data collection parameter values.  In such
      a case, only the tags '_array_data.header_convention',
      '_array_data.header_contents' and '_array_data.data' need be
      populated.
     
      For full processing and archiving, most of the tags in this
      dictionary will need to be populated.
     
 ;
     _category.id                   ARRAY_DATA
     _category.mandatory_code       no
      loop_
     _category_key.name             '_array_data.array_id'
                                    '_array_data.binary_id'
                                    '_array_data.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;
         Example 1 -

         This example shows two binary data blocks.  The first one
         was compressed by the CBF_CANONICAL compression algorithm and is
         presented as hexadecimal data.  The first character 'H' on the
         data lines means hexadecimal.  It could have been 'O' for octal
         or 'D' for decimal.  The second character on the line shows
         the number of bytes in each word (in this case '4'), which then
         requires eight hexadecimal digits per word.  The third character
         gives the order of octets within a word, in this case '<'
         for the ordering 4321 (i.e. 'big-endian').  Alternatively, the
         character '>' could have been used for the ordering 1234
         (i.e. 'little-endian').  The block has a 'message digest'
         to check the integrity of the data.

         The second block is similar, but uses CBF_PACKED compression
         and BASE64 encoding.  Note that the size and the digest are
         different.
 ;
 ;

         loop_
         _array_data.array_id
         _array_data.binary_id
         _array_data.data
         image_1 1
         ;
         --CIF-BINARY-FORMAT-SECTION--
         Content-Type: application/octet-stream;
              conversions="X-CBF_CANONICAL"
         Content-Transfer-Encoding: X-BASE16
         X-Binary-Size: 3927126
         X-Binary-ID: 1
         Content-MD5: u2sTJEovAHkmkDjPi+gWsg==

         # Hexadecimal encoding, byte 0, byte order ...21
         #
         H4< 0050B810 00000000 00000000 00000000 000F423F 00000000 00000000 ...
         ....
         --CIF-BINARY-FORMAT-SECTION----
         ;
         image_2 2
         ;
         --CIF-BINARY-FORMAT-SECTION--
         Content-Type: application/octet-stream;
              conversions="X-CBF-PACKED"
         Content-Transfer-Encoding: BASE64
         X-Binary-Size: 3745758
         X-Binary-ID: 2
         Content-MD5: 1zsJjWPfol2GYl2V+QSXrw==

         ELhQAAAAAAAA...
         ...
         --CIF-BINARY-FORMAT-SECTION----
         ;
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;
         Example 2 -

         This example shows a single image in a miniCBF, provided by
         E. Eikenberry.  The entire CBF consists of one data block
         containing one category and three tags.  The CBFlib
         program convert_miniCBF and a suitable template file
         can be used to convert this miniCBF to a full imgCIF
         file.
 ;
 ;
         ###CBF: VERSION 1.5
         # CBF file written by CBFlib v0.7.8

         data_insulin_pilatus6m

         _array_data.header_convention SLS_1.0
         _array_data.header_contents
         ;
         # Detector: PILATUS 6M SN: 60-0001
         # 2007/Jun/17 15:12:36.928
         # Pixel_size 172e-6 m x 172e-6 m
         # Silicon sensor, thickness 0.000320 m
         # Exposure_time 0.995000 s
         # Exposure_period 1.000000 s
         # Tau = 194.0e-09 s
         # Count_cutoff 1048575 counts
         # Threshold_setting 5000 eV
         # Wavelength 1.2398 A
         # Energy_range (0, 0) eV
         # Detector_distance 0.15500 m
         # Detector_Voffset -0.01003 m
         # Beam_xy (1231.00, 1277.00) pixels
         # Flux 22487563295 ph/s
         # Filter_transmission 0.0008
         # Start_angle 13.0000 deg.
         # Angle_increment 1.0000 deg.
         # Detector_2theta 0.0000 deg.
         # Polarization 0.990
         # Alpha 0.0000 deg.
         # Kappa 0.0000 deg.
         # Phi 0.0000 deg.
         # Chi 0.0000 deg.
         # Oscillation_axis  X, CW
         # N_oscillations 1
         ;

         _array_data.data
         ;
         --CIF-BINARY-FORMAT-SECTION--
         Content-Type: application/octet-stream;
              conversions="x-CBF_BYTE_OFFSET"
         Content-Transfer-Encoding: BINARY
         X-Binary-Size: 6247567
         X-Binary-ID: 1
         X-Binary-Element-Type: "signed 32-bit integer"
         X-Binary-Element-Byte-Order: LITTLE_ENDIAN
         Content-MD5: 8wO6i2+899lf5iO8QPdgrw==
         X-Binary-Number-of-Elements: 6224001
         X-Binary-Size-Fastest-Dimension: 2463
         X-Binary-Size-Second-Dimension: 2527
         X-Binary-Size-Padding: 4095

         ...
        
         --CIF-BINARY-FORMAT-SECTION----
         ;
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

     _category.NX_mapping_details
 ;
    
     _array_data.array_id ARRAYID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID
           /@CBF_array_id="ARRAYID"
    
     _array_data.binary_id BINARYID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID
           /@CBF_binary_id="BINARYID"
    
     _array_data.data  DATAARRAY -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
    
     _array_data.header_contents HEADER -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data__ARRAYID_BINARYID=DATAARRAY
           /@CBF_header_contents="HEADER"
    
     _array_data.header_convention HEADERCONVENTION -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_header_convention="HEADERCONVENTION"
 ;
 save_


 save__array_data.array_id
     _item_description.description
 ;             This item is a pointer to _array_structure.id in the
               ARRAY_STRUCTURE category.
              
               If not given, it defaults to 1.
              
 ;
     _item.name                  '_array_data.array_id'
     _item.category_id             ARRAY_DATA
     _item.mandatory_code          implicit
     _item_default.value           1
     _item_type.code               code
      save_


 save__array_data.binary_id
     _item_description.description
 ;             This item is an integer identifier which, along with
               _array_data.array_id, should uniquely identify the
               particular block of array data.

               If _array_data.binary_id is not explicitly given,
               it defaults to 1.

               The value of _array_data.binary_id distinguishes
               among multiple sets of data with the same array
               structure.

               If the MIME header of the data array specifies a
               value for X-Binary-ID, the value of  _array_data.binary_id
               should be equal to the value given for X-Binary-ID.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
              '_array_data.binary_id'            ARRAY_DATA
                                                                 implicit
              '_diffrn_data_frame.binary_id'     DIFFRN_DATA_FRAME
                                                                 implicit
              '_array_intensities.binary_id'     ARRAY_INTENSITIES
                                                                 implicit
      loop_
     _item_linked.child_name
     _item_linked.parent_name
              '_diffrn_data_frame.binary_id'     '_array_data.binary_id'
              '_array_intensities.binary_id'     '_array_data.binary_id'

     _item_default.value           1
     _item_type.code               int
      loop_
     _item_range.maximum
     _item_range.minimum
                             1  1
                             .  1
      save_


 save__array_data.data
     _item_description.description
 ;             The value of _array_data.data contains the array data
               encapsulated in a STAR string.

               The representation used is a variant on the
               Multipurpose Internet Mail Extensions (MIME) specified
               in RFC 2045-2049 by N. Freed et al.  The boundary
               delimiter used in writing an imgCIF or CBF is
               '\n--CIF-BINARY-FORMAT-SECTION--' (including the
               required initial '\n--').

               The Content-Type may be any of the discrete types permitted
               in RFC 2045; 'application/octet-stream' is recommended
               for diffraction images in the ARRAY_DATA category.
               Note:  When appropriate in other categories, e.g. for
               photographs of crystals, more precise types, such as
               'image/jpeg', 'image/tiff', 'image/png', etc. should be used.
              
               If an octet stream was compressed, the compression should
               be specified by the parameter
                 'conversions="X-CBF_PACKED"'
               or the parameter
                 'conversions="X-CBF_CANONICAL"'
               or the parameter
                 'conversions="X-CBF_BYTE_OFFSET"'
               or the parameter
                 'conversions="X-CBF_BACKGROUND_OFFSET_DELTA"'
                
               If the parameter
                 'conversions="X-CBF_PACKED"'
               is given it may be further modified with the parameters
                 '"uncorrelated_sections"'
               or
                 '"flat"'
              
               If the '"uncorrelated_sections"' parameter is
               given, each section will be compressed without using
               the prior section for averaging.
              
               If the '"flat"' parameter is given, each the
               image will be treated as one long row.
              
               Note that the X-CBF_CANONICAL and X-CBF_PACKED are
               slower but more efficient compressions that the others.
               The X-CBF_BYTE_OFFSET compression is a good compromise
               between speed and efficiency for ordinary diffraction
               images.  The X-CBF_BACKGROUND_OFFSET_DELTA compression
               is oriented towards sparse data, such as masks and
               tables of replacement pixel values for images with
               overloaded spots.

               The Content-Transfer-Encoding may be 'BASE64',
               'Quoted-Printable', 'X-BASE8', 'X-BASE10',
               'X-BASE16' or 'X-BASE32K', for an imgCIF or 'BINARY'
               for a CBF.  The octal, decimal and hexadecimal transfer
               encodings are provided for convenience in debugging and
               are not recommended for archiving and data interchange.

               In a CIF, one of the parameters 'charset=us-ascii',
               'charset=utf-8' or 'charset=utf-16' may be used on the
               Content-Transfer-Encoding to specify the character set
               used for the external presentation of the encoded data.
               If no charset parameter is given, the character set of
               the enclosing CIF is assumed.  In any case, if a BOM
               flag is detected (FE FF for big-endian UTF-16, FF FE for
               little-endian UTF-16 or EF BB BF for UTF-8) is detected,
               the indicated charset will be assumed until the end of the
               encoded data or the detection of a different BOM.  The
               charset of the Content-Transfer-Encoding is not the character
               set of the encoded data, only the character set of the
               presentation of the encoded data and should be respecified
               for each distinct STAR string.

               In an imgCIF file, the encoded binary data begins after
               the empty line terminating the header.  In an imgCIF file,
               the encoded binary data ends with the terminating boundary
               delimiter '\n--CIF-BINARY-FORMAT-SECTION----'
               in the currently effective charset or with the '\n; '
               that terminates the STAR string.

               In a CBF, the raw binary data begins after an empty line
               terminating the header and after the sequence:

               Octet   Hex   Decimal  Purpose
                 0     0C       12    (ctrl-L) Page break
                 1     1A       26    (ctrl-Z) Stop listings in MS-DOS
                 2     04       04    (Ctrl-D) Stop listings in UNIX
                 3     D5      213    Binary section begins

               None of these octets are included in the calculation of
               the message size or in the calculation of the
               message digest.

               The X-Binary-Size header specifies the size of the
               equivalent binary data in octets.  If compression was
               used, this size is the size after compression, including
               any book-keeping fields.  An adjustment is made for
               the deprecated binary formats in which eight bytes of binary
               header are used for the compression type.  In this case,
               the eight bytes used for the compression type are subtracted
               from the size, so that the same size will be reported
               if the compression type is supplied in the MIME header.
               Use of the MIME header is the recommended way to
               supply the compression type.  In general, no portion of
               the  binary header is included in the calculation of the size.

               The X-Binary-Element-Type header specifies the type of
               binary data in the octets, using the same descriptive
               phrases as in _array_structure.encoding_type.  The default
               value is 'unsigned 32-bit integer'.

               An MD5 message digest may, optionally, be used. The 'RSA Data
               Security, Inc. MD5 Message-Digest Algorithm' should be used.
               No portion of the header is included in the calculation of the
               message digest.

               If the Transfer Encoding is 'X-BASE8', 'X-BASE10' or
               'X-BASE16', the data are presented as octal, decimal or
               hexadecimal data organized into lines or words.  Each word
               is created by composing octets of data in fixed groups of
               2, 3, 4, 6 or 8 octets, either in the order ...4321 ('big-
               endian') or 1234... ('little-endian').  If there are fewer
               than the specified number of octets to fill the last word,
               then the missing octets are presented as '==' for each
               missing octet.  Exactly two equal signs are used for each
               missing octet even for octal and decimal encoding.
               The format of lines is:

               rnd xxxxxx xxxxxx xxxxxx

               where r is 'H', 'O' or 'D' for hexadecimal, octal or
               decimal, n is the number of octets per word and d is '<'
               or '>' for the '...4321' and '1234...' octet orderings,
               respectively.  The '==' padding for the last word should
               be on the appropriate side to correspond to the missing
               octets, e.g.

               H4< FFFFFFFF FFFFFFFF 07FFFFFF ====0000

               or

               H3> FF0700 00====

               For these hexadecimal, octal and decimal formats only,
               comments beginning with '#' are permitted to improve
               readability.

               BASE64 encoding follows MIME conventions.  Octets are
               in groups of three: c1, c2, c3.  The resulting 24 bits
               are broken into four six-bit quantities, starting with
               the high-order six bits (c1 >> 2) of the first octet, then
               the low-order two bits of the first octet followed by the
               high-order four bits of the second octet [(c1 & 3)<<4 | (c2>>4)],
               then the bottom four bits of the second octet followed by the
               high-order two bits of the last octet [(c2 & 15)<<2 | (c3>>6)],
               then the bottom six bits of the last octet (c3 & 63).  Each
               of these four quantities is translated into an ASCII character
               using the mapping:

                         1         2         3         4         5         6
               0123456789012345678901234567890123456789012345678901234567890123
               |         |         |         |         |         |         |
               ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/

               With short groups of octets padded on the right with one '='
               if c3 is missing, and with '==' if both c2 and c3 are missing.

               X-BASE32K encoding is similar to BASE64 encoding, except that
               sets of 15 octets are encoded as sets of 8 16-bit unicode
               characters, by breaking the 120 bits into 8 15-bit quantities.
               256 is added to each 15 bit quantity to bring it into a
               printable uncode range.  When encoding, zero padding is used
               to fill out the last 15 bit quantity.  If 8 or more bits of
               padding are used, a single equals sign (hexadecimal 003D) is
               appended.  Embedded whitespace and newlines are introduced
               to produce lines of no more than 80 characters each.  On
               decoding, all printable ascii characters and ascii whitespace
               characters are ignored except for any trailing equals signs.
               The number of trailing equals signs indicated the number of
               trailing octets to be trimmed from the end of the decoded data.
               (see Georgi Darakev, Vassil Litchev, Kostadin Z. Mitev, Herbert
               J. Bernstein, 'Efficient Support of Binary Data in the XML
               Implementation of the NeXus File Format',absract W0165,
               ACA Summer Meeting, Honolulu, HI, July 2006).

               QUOTED-PRINTABLE encoding also follows MIME conventions, copying
               octets without translation if their ASCII values are 32...38,
               42, 48...57, 59, 60, 62, 64...126 and the octet is not a ';'
               in column 1.  All other characters are translated to =nn, where
               nn is the hexadecimal encoding of the octet.  All lines are
               'wrapped' with a terminating '=' (i.e. the MIME conventions
               for an implicit line terminator are never used).
              
               The "X-Binary-Element-Byte-Order" can specify either
               '"BIG_ENDIAN"' or '"LITTLE_ENDIAN"' byte order of the imaage
               data.  Only LITTLE_ENDIAN is recommended.  Processors
               may treat BIG_ENDIAN as a warning of data that can
               only be processed by special software.

               The "X-Binary-Number-of-Elements" specifies the number of
               elements (not the number of octets) in the decompressed, decoded
               image.

               The optional "X-Binary-Size-Fastest-Dimension" specifies the
               number of elements (not the number of octets) in one row of the
               fastest changing dimension of the binary data array. This
               information must be in the MIME header for proper operation of
               some of the decompression algorithms.

               The optional "X-Binary-Size-Second-Dimension" specifies the
               number of elements (not the number of octets) in one column of
               the second-fastest changing dimension of the binary data array.
               This information must be in the MIME header for proper operation
               of some of the decompression algorithms.

               The optional "X-Binary-Size-Third-Dimension" specifies the
               number of sections for the third-fastest changing dimension of
               the binary data array.
              
               The optional "X-Binary-Size-Padding" specifies the size in
               octets of an optional padding after the binary array data and
               before the closing flags for a binary section.
 ;
     _item.name                  '_array_data.data'
     _item.category_id             ARRAY_DATA
     _item.mandatory_code          yes
     _item_type.code               binary
 save_


 save__array_data.header_contents
     _item_description.description
 ;             This item is an text field for use in minimal CBF files to carry
               essential header information to be kept with image data
               in _array_data.data when the tags that normally carry the
               structured metadata for the image have not been populated.
              
               Normally this data item should not appear when the full set
               of tags have been populated and _diffrn_data_frame.details
               appears.
 ;
     _item.name                  '_array_data.header_contents'
     _item.category_id            ARRAY_DATA
     _item.mandatory_code         no
     _item_type.code              text
      save_



 save__array_data.header_convention
     _item_description.description
 ;             This item is an identifier for the convention followed in
               constructing the contents of _array_data.header_contents
              
               The permitted values are of the of an image creator identifier
               followed by an underscore and a version string.  To avoid
               confusion about conventions, all creator identifiers
               should be registered with the IUCr and the conventions
               for all identifiers and versions should be posted on
               the MEDSBIO.org web site.
 ;
     _item.name                  '_array_data.header_convention'
     _item.category_id            ARRAY_DATA
     _item.mandatory_code         no
     _item_type.code              code
      save_

 save__array_data.variant
     _item_description.description
 ;             The value of _array_data.variant gives the variant
               to which the given ARRAY_DATA row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.

               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_array_data.variant'
     _item.category_id             ARRAY_DATA
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 ######################
 # ARRAY_ELEMENT_SIZE #
 ######################


 save_array_element_size
     _category.description
 ;    Data items in the ARRAY_ELEMENT_SIZE category record the physical
      size of array elements along each array dimension.
 ;
     _category.id                   ARRAY_ELEMENT_SIZE
     _category.mandatory_code       no
      loop_
     _category_key.name             '_array_element_size.array_id'
                                    '_array_element_size.index'
                                    '_array_element_size.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;       Example 1 - A regular 2D array with a uniform element dimension
                     of 1220 nanometres.
 ;
 ;
         loop_
        _array_element_size.array_id
        _array_element_size.index
        _array_element_size.size
         image_1   1    1.22e-6
         image_1   2    1.22e-6
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _array_element_size.array_id ARRAYID$ \rightarrow$
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /?_pixel_size_ARRAYID
           /@CBF_array_id="ARRAYID"
     where "?" is "x", "y", "z" for
     _array_element_size.index == 1,2, or 3 respectively
    
     _array_element_size.index  See _array_element_size.array_id
    
     _array_element_size.size SIZE -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /?_pixel_size_ARRAYID=SIZE
           /@units="m"
     where "?" is "x", "y", "z" for
     _array_element_size.index == 1,2, or 3 respectively
    
     _array_element_size.variant --> ??
         NeXus does not handle variants at this time
    
          
 ;

      save_


 save__array_element_size.array_id
     _item_description.description
 ;             This item is a pointer to _array_structure.id in the
               ARRAY_STRUCTURE category.
 ;
     _item.name                  '_array_element_size.array_id'
     _item.category_id             ARRAY_ELEMENT_SIZE
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 save__array_element_size.index
     _item_description.description
 ;             This item is a pointer to _array_structure_list.index in
               the ARRAY_STRUCTURE_LIST category.
 ;
     _item.name                  '_array_element_size.index'
     _item.category_id             ARRAY_ELEMENT_SIZE
     _item.mandatory_code          yes
     _item_type.code               int
      save_


 save__array_element_size.size
     _item_description.description
 ;              The size in metres of an image element in this
                dimension. This supposes that the elements are arranged
                on a regular grid.
 ;
     _item.name               '_array_element_size.size'
     _item.category_id          ARRAY_ELEMENT_SIZE
     _item.mandatory_code       yes
     _item_type.code            float
     _item_units.code           'metres'
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
      save_

 save__array_element_size.variant
     _item_description.description
 ;             The value of _array_element_size.variant gives the variant
               to which the given ARRAY_ELEMENT_SIZE row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.

               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_array_element_size.variant'
     _item.category_id             ARRAY_ELEMENT_SIZE
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 #####################
 # ARRAY_INTENSITIES #
 #####################


 save_array_intensities
     _category.description
 ;             Data items in the ARRAY_INTENSITIES category record the
               information required to recover the intensity data from
               the set of data values stored in the ARRAY_DATA category.

               The detector may have a complex relationship
               between the raw intensity values and the number of
               incident photons.  In most cases, the number stored
               in the final array will have a simple linear relationship
               to the actual number of incident photons, given by
               _array_intensities.gain.  If raw, uncorrected values
               are presented (e.g. for calibration experiments), the
               value of _array_intensities.linearity will be 'raw'
               and _array_intensities.gain will not be used.

 ;
     _category.id                   ARRAY_INTENSITIES
     _category.mandatory_code       no
     loop_
     _category_key.name             '_array_intensities.array_id'
                                    '_array_intensities.binary_id'
                                    '_array_intensities.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;
         Example 1
 ;
 ;
         loop_
         _array_intensities.array_id
         _array_intensities.linearity
         _array_intensities.gain
         _array_intensities.overload
         _array_intensities.undefined_value
         _array_intensities.pixel_fast_bin_size
         _array_intensities.pixel_slow_bin_size
         _array_intensities.pixel_binning_method
         image_1   linear  1.2    655535   0   2   2    hardware
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _array_intensities.array_id --> ARRAYID-->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID
           /@CBF_array_id="ARRAYID"
    
     _array_intensities.binary_id -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID
           /@CBF_binary_id="BINARYID"
    
     _array_intensities.details DETAILS -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__details="DETAILS"
    
     _array_intensities.gain GAIN -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__gain=GAIN
    
    
     _array_intensities.gain_esd GAINESD -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__gain_esd=GAINESD
    
    
     _array_intensities.linearity LINEARITY -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__linearity="LINEARITY"
    
    
     _array_intensities.offset OFFSET -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__offset=OFFSET
    
    
     _array_intensities.scaling SCALING -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__scaling=SCALING
    
    
     _array_intensities.overload OVERLOAD -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__overload=OVERLOAD
    
    
     _array_intensities.undefined_value UNDEFVAL -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__undefined_value=UNDEFVAL
    
    
     _array_intensities.pixel_fast_bin_size FBINSIZE -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__pixel_fast_bin_size=FBINSIZE
    
    
     _array_intensities.pixel_slow_bin_size SBINSIZE -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__pixel_slow_bin_size=SBINSIZE
    
    
     _array_intensities.pixel_binning_method METHOD -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /data_ARRAYID_BINARYID=DATAARRAY
           /@CBF_array_intensities__pixel_binning_method="METHOD"
    
    
     _array_intensities.variant --> ??
         NeXus does not handle variants at this time
          
    
     The argument has been made that these attributes are not needed
     because NeXus files are supposed to have "true values" stored.
     In many cases that is true and then none of these attributes
     are needed.  However, with some detectors and some experiments
     there are good technical and scientific reasons to bring in values
     that will need processing later to derive "true values", and in
     those case some or all of these attributes will be needed.  They
     are provided for such cases.
    
 ;
    
     save_


 save__array_intensities.array_id
     _item_description.description
 ;             This item is a pointer to _array_structure.id in the
               ARRAY_STRUCTURE category.
 ;
     _item.name                  '_array_intensities.array_id'
     _item.category_id             ARRAY_INTENSITIES
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 save__array_intensities.binary_id
     _item_description.description
 ;             This item is a pointer to _array_data.binary_id in the
               ARRAY_DATA category.
 ;
     _item.name                  '_array_intensities.binary_id'
     _item.category_id             ARRAY_INTENSITIES
     _item.mandatory_code          implicit
     _item_type.code               int
      save_

 save__array_intensities.details
     _item_description.description
 ;              A description of special aspects of the calculation of array intensities.
 ;
     _item.name                  '_array_intensities.details'
     _item.category_id             ARRAY_INTENSITIES
     _item.mandatory_code          no
     _item_type.code                   text
     _item_examples.case         'Gain_setting: low gain (vrf = -0.300)'
    
      save_


 save__array_intensities.gain
     _item_description.description
 ;              Detector 'gain'. The factor by which linearized
                intensity count values should be divided to produce
                true photon counts.
 ;
     _item.name              '_array_intensities.gain'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       yes
     _item_type.code            float
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
     _item_units.code           'counts_per_photon'
      loop_
     _item_related.related_name
     _item_related.function_code  '_array_intensities.gain_esd'
                                  'associated_value'
     save_


 save__array_intensities.gain_esd
     _item_description.description
 ;            The estimated standard deviation in detector 'gain'.
 ;
     _item.name              '_array_intensities.gain_esd'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       yes
     _item_type.code            float
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0

     _item_units.code          'counts_per_photon'
      loop_
     _item_related.related_name
     _item_related.function_code  '_array_intensities.gain'
                                  'associated_esd'
     save_


 save__array_intensities.linearity
     _item_description.description
 ;              The intensity linearity scaling method used to convert
                from the raw intensity to the stored element value:

                'linear' is linear.

                'offset'  means that the value defined by
                _array_intensities.offset should be added to each
                 element value.

                'scaling' means that the value defined by
                _array_intensities.scaling should be multiplied with each
                element value.

                'scaling_offset' is the combination of the two previous cases,
                with the scale factor applied before the offset value.

                'sqrt_scaled' means that the square root of raw
                intensities multiplied by _array_intensities.scaling is
                calculated and stored, perhaps rounded to the nearest
                integer. Thus, linearization involves dividing the stored
                values by _array_intensities.scaling and squaring the
                result.

                'logarithmic_scaled' means that the logarithm base 10 of
                raw intensities multiplied by _array_intensities.scaling
                is calculated and stored, perhaps rounded to the nearest
                integer. Thus, linearization involves dividing the stored
                values by _array_intensities.scaling and calculating 10
                to the power of this number.

                'raw' means that the data are a set of raw values straight
                from the detector.
 ;

     _item.name               '_array_intensities.linearity'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       yes
     _item_type.code            code
      loop_
     _item_enumeration.value
     _item_enumeration.detail
                               'linear' .
                               'offset'
 ;              The value defined by  _array_intensities.offset should
                be added to each element value.
 ;
                               'scaling'
 ;              The value defined by _array_intensities.scaling should be
                multiplied with each element value.
 ;
                               'scaling_offset'
 ;              The combination of the scaling and offset
                with the scale factor applied before the offset value.
 ;
                               'sqrt_scaled'
 ;              The square root of raw intensities multiplied by
                _array_intensities.scaling is calculated and stored,
                perhaps rounded to the nearest integer. Thus,
                linearization involves dividing the stored
                values by _array_intensities.scaling and squaring the
                result.
 ;
                               'logarithmic_scaled'
 ;              The logarithm base 10 of raw intensities multiplied by
                _array_intensities.scaling  is calculated and stored,
                perhaps rounded to the nearest integer. Thus,
                linearization involves dividing the stored values by
                _array_intensities.scaling and calculating 10 to the
                power of this number.
 ;
                               'raw'
 ;              The array consists of raw values to which no corrections have
                been applied.  While the handling of the data is similar to
                that given for 'linear' data with no offset, the meaning of
                the data differs in that the number of incident photons is
                not necessarily linearly related to the number of counts
                reported.  This value is intended for use either in
                calibration experiments or to allow for handling more
                complex data-fitting algorithms than are allowed for by
                this data item.
 ;

     save_


 save__array_intensities.offset
     _item_description.description
 ;              Offset value to add to array element values in the manner
                described by the item _array_intensities.linearity.
 ;
     _item.name                 '_array_intensities.offset'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       no
     _item_type.code            float
     save_


 save__array_intensities.overload
     _item_description.description
 ;              The saturation intensity level for this data array.
 ;
     _item.name                 '_array_intensities.overload'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       no
     _item_type.code            float
     _item_units.code          'counts'
     save_


 save__array_intensities.pixel_fast_bin_size
     _item_description.description
 ;              The value of _array_intensities.pixel_fast_bin_size specifies
                the number of pixels that compose one element in the direction
                of the most rapidly varying array dimension.

                Typical values are 1, 2, 4 or 8.  When there is 1 pixel per
                array element in both directions, the value given for
                _array_intensities.pixel_binning_method normally should be
                'none'.

                It is specified as a float to allow for binning algorithms that
                create array elements that are not integer multiples of the
                detector pixel size.
 ;
     _item.name              '_array_intensities.pixel_fast_bin_size'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       implicit
     _item_type.code            float
     _item_default.value        1.
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
     _item_units.code           'pixels_per_element'
     save_


 save__array_intensities.pixel_slow_bin_size
     _item_description.description
 ;              The value of _array_intensities.pixel_slow_bin_size specifies
                the number of pixels that compose one element in the direction
                of the second most rapidly varying array dimension.

                Typical values are 1, 2, 4 or 8.  When there is 1 pixel per
                array element in both directions, the value given for
                _array_intensities.pixel_binning_method normally should be
                'none'.

                It is specified as a float to allow for binning algorithms that
                create array elements that are not integer multiples of the
                detector pixel size.
 ;
     _item.name              '_array_intensities.pixel_slow_bin_size'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       implicit
     _item_type.code            float
     _item_default.value        1.
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
     _item_units.code           'pixels_per_element'
     save_


 save__array_intensities.pixel_binning_method
     _item_description.description
 ;              The value of _array_intensities.pixel_binning_method specifies
                the method used to derive array elements from multiple pixels.
 ;
     _item.name              '_array_intensities.pixel_binning_method'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       implicit
     _item_type.code            code
      loop_
     _item_enumeration.value
     _item_enumeration.detail
                                'hardware'
 ;              The element intensities were derived from the raw data of one
                or more pixels by used of hardware in the detector, e.g. by use
                of shift registers in a CCD to combine pixels into super-pixels.
 ;
                                'software'
 ;              The element intensities were derived from the raw data of more
                than one pixel by use of software.
 ;
                                'combined'
 ;              The element intensities were derived from the raw data of more
                than one pixel by use of both hardware and software, as when
                hardware binning is used in one direction and software in the
                other.
 ;
                                'none'
 ;              In the both directions, the data has not been binned.  The
                number of pixels is equal to the number of elements.

                When the value of _array_intensities.pixel_binning_method is
                'none' the values of _array_intensities.pixel_fast_bin_size
                and _array_intensities.pixel_slow_bin_size both must be 1.
 ;
                                'unspecified'
 ;              The method used to derive element intensities is not specified.
 ;
     _item_default.value        'unspecified'
     save_

 save__array_intensities.scaling
     _item_description.description
 ;              Multiplicative scaling value to be applied to array data
                in the manner described by item
                _array_intensities.linearity.
 ;
     _item.name                 '_array_intensities.scaling'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       no
     _item_type.code            float
     save_



 save__array_intensities.undefined_value
     _item_description.description
 ;              A value to be substituted for undefined values in
                the data array.
 ;
     _item.name                 '_array_intensities.undefined_value'
     _item.category_id          ARRAY_INTENSITIES
     _item.mandatory_code       no
     _item_type.code            float
     save_

 save__array_intensities.variant
     _item_description.description
 ;             The value of _array_intensities.variant gives the variant
               to which the given ARRAY_INTENSITIES row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_array_intensities.variant'
     _item.category_id             ARRAY_INTENSITIES
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 ###################
 # ARRAY_STRUCTURE #
 ###################


 save_array_structure
     _category.description
 ;    Data items in the ARRAY_STRUCTURE category record the organization and
      encoding of array data that may be stored in the ARRAY_DATA category.
 ;
     _category.id                   ARRAY_STRUCTURE
     _category.mandatory_code       no
     loop_
     _category_key.name             '_array_structure.id'
                                    '_array_structure.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 -
 ;
 ;
      loop_
     _array_structure.id
     _array_structure.encoding_type
     _array_structure.compression_type
     _array_structure.byte_order
      image_1       "unsigned 16-bit integer"  none  little_endian
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
     Note that this is essentially a type that may apply to multiple
     binary images, and corresponds to some of the detailed HDF5
     information about an array.   The following mapping is a placeholder
     for the names given for future reference, if needed.

     The information in this category is the byte order, the compression
     information, and the encoding, which is carried in and reteievable
     from the HDF5 types, properties lists, etc. 

     At present NeXus does not expose this information.  This should be
     discussed.

 ;
      save_


 save__array_structure.byte_order
     _item_description.description
 ;              The order of bytes for integer values which require more
                than 1 byte.

                (IBM-PC's and compatibles and DEC VAXs use low-byte-first
                ordered integers, whereas Hewlett Packard 700
                series, Sun-4 and Silicon Graphics use high-byte-first
                ordered integers.  DEC Alphas can produce/use either
                depending on a compiler switch.)
 ;

     _item.name                     '_array_structure.byte_order'
     _item.category_id               ARRAY_STRUCTURE
     _item.mandatory_code            yes
     _item_type.code                 ucode
      loop_
     _item_enumeration.value
     _item_enumeration.detail
                                    'big_endian'
 ;       The first byte in the byte stream of the bytes which make up an
         integer value is the most significant byte of an integer.
 ;
                                    'little_endian'
 ;       The last byte in the byte stream of the bytes which make up an
         integer value is the most significant byte of an integer.
 ;
      save_


 save__array_structure.compression_type
     _item_description.description
 ;             Type of data-compression method used to compress the array
               data.
 ;
     _item.name                   '_array_structure.compression_type'
     _item.category_id             ARRAY_STRUCTURE
     _item.mandatory_code          no
     _item_type.code               ucode
     _item_default.value           'none'
      loop_
     _item_enumeration.value
     _item_enumeration.detail
                                   'byte_offset'
 ;       Using the 'byte_offset' compression scheme as per A. Hammersley
         and the CBFlib manual, section 3.3.3
 ;
                                   'canonical'
 ;       Using the 'canonical' compression scheme (International Tables
         for Crystallography Volume G, Section 5.6.3.1) and CBFlib
         manual section 3.3.1
 ;
                                   'nibble_offset'
 ;       Using the 'nibble_offset' compression scheme as per H. Bernstein
         and the CBFlib manual, section 3.3.4
 ;
                                   'none'
 ;       Data are stored in normal format as defined by
         _array_structure.encoding_type and
         _array_structure.byte_order.
 ;
                                   'packed'
 ;       Using the 'packed' compression scheme, a CCP4-style packing
         as per J. P. Abrahams pack_c.c and CBFlib manual, section 3.3.2.
 ;
                                   'packed_v2'
 ;       Using the 'packed' compression scheme, version 2, as per
         J. P. Abrahams pack_c.c and CBFlib manual, section 3.3.2.
 ;
     save_

 save__array_structure.compression_type_flag
     _item_description.description
 ;             Flags modifying the type of data-compression method used to
               compress the arraydata.
 ;
     _item.name                   '_array_structure.compression_type_flag'
     _item.category_id             ARRAY_STRUCTURE
     _item.mandatory_code          no
     _item_type.code               ucode
      loop_
     _item_enumeration.value
     _item_enumeration.detail
                                   'uncorrelated_sections'
 ;       When applying packed or packed_v2 compression on an array with
         uncorrelated sections, do not average in points from the prior
         section.
 ;
                                   'flat'
 ;       When applying packed or packed_v2 compression on an array with
         treat the entire image as a single line set the maximum number
         of bits for an offset to 65 bits.
        
         The flag is included for compatibility with software prior to
         CBFlib_0.7.7, and should not be used for new data sets.

 ;

     save_

 save__array_structure.encoding_type
     _item_description.description
 ;              Data encoding of a single element of array data.

                The type 'unsigned 1-bit integer' is used for
                packed Booleans arrays for masks.  Each element
                of the array corresponds to a single bit
                packed in unsigned 8-bit data.
               
                In several cases, the IEEE format is referenced.
                See IEEE Standard 754-1985 (IEEE, 1985).

                Ref: IEEE (1985). IEEE Standard for Binary Floating-Point
                Arithmetic. ANSI/IEEE Std 754-1985. New York: Institute of
                Electrical and Electronics Engineers.
 ;

     _item.name                '_array_structure.encoding_type'
     _item.category_id          ARRAY_STRUCTURE
     _item.mandatory_code       yes
     _item_type.code            uline
      loop_
     _item_enumeration.value
                               'unsigned 1-bit integer'
                               'unsigned 8-bit integer'
                               'signed 8-bit integer'
                               'unsigned 16-bit integer'
                               'signed 16-bit integer'
                               'unsigned 32-bit integer'
                               'signed 32-bit integer'
                               'signed 32-bit real IEEE'
                               'signed 64-bit real IEEE'
                               'signed 32-bit complex IEEE'
      save_


 save__array_structure.id
     _item_description.description
 ;             The value of _array_structure.id must uniquely identify
               each item of array data.             

               This item has been made implicit and given a default value of 1
               as a convenience in writing miniCBF files.  Normally an
               explicit name with useful content should be used.
 ;
     loop_
     _item.name
     _item.category_id
     _item.mandatory_code
              '_array_structure.id'              ARRAY_STRUCTURE      implicit
              '_array_data.array_id'             ARRAY_DATA           implicit
              '_array_structure_list.array_id'   ARRAY_STRUCTURE_LIST implicit
              '_array_structure_list_section.array_id'   ARRAY_STRUCTURE_LIST_SECTION implicit
              '_array_intensities.array_id'      ARRAY_INTENSITIES    implicit
              '_diffrn_data_frame.array_id'      DIFFRN_DATA_FRAME    implicit


     _item_default.value           1
     _item_type.code               code
      loop_
     _item_linked.child_name
     _item_linked.parent_name
              '_array_data.array_id'
                       '_array_structure.id'
              '_array_structure_list.array_id'
                       '_array_structure.id'
              '_array_structure_list_section.array_id'
                       '_array_structure.id'
              '_array_intensities.array_id'
                       '_array_structure.id'
              '_diffrn_data_frame.array_id'
                       '_array_structure.id'

      save_

 save__array_structure.variant
     _item_description.description
 ;             The value of _array_structure.variant gives the variant
               to which the given ARRAY_STRUCTURE row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_array_structure.variant'
     _item.category_id             ARRAY_STRUCTURE
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 ########################
 # ARRAY_STRUCTURE_LIST #
 ########################


 save_array_structure_list
     _category.description
 ;    Data items in the ARRAY_STRUCTURE_LIST category record the size
      and organization of each array dimension.

      The relationship to physical axes may be given.
 ;
     _category.id                   ARRAY_STRUCTURE_LIST
     _category.mandatory_code       no
      loop_
     _category_key.name             '_array_structure_list.array_id'
                                    '_array_structure_list.index'
                                    '_array_structure_list.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;       Example 1 - An image array of 1300 x 1200 elements.  The raster
                     order of the image is left to right (increasing) in the
                     first dimension and bottom to top (decreasing) in
                     the second dimension.
 ;
 ;
         loop_
        _array_structure_list.array_id
        _array_structure_list.index
        _array_structure_list.dimension
        _array_structure_list.precedence
        _array_structure_list.direction
        _array_structure_list.axis_set_id
         image_1   1    1300    1     increasing  ELEMENT_X
         image_1   2    1200    2     decreasing  ELEMENY_Y
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _array_structure_list.axis_set_id AXISSET -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list__AXISSET=[]
    
     _array_structure_list.array_id ARRAYID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list__AXISSET=[]
           /@CBF_array_id="ARRAYID"
    
     _array_structure_list.dimension DIM-->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list__AXISSET=[]
           /@CBF_array_structure_list__dimension=DIM
    
     _array_structure_list.direction DIR-->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list__AXISSET=[]
           /@CBF_array_structure_list__direction="DIR"
    
     _array_structure_list.index INDEX-->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list__AXISSET=[]
           /@CBF_array_structure_list__index=INDEX
    
     _array_structure_list.precedence PRECEDENCE-->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list__AXISSET=[]
           /@CBF_array_structure_list__precedence=PRECEDENCE
    
     _array_structure_list.variant --> ??
         NeXus does not handle variants at this time

 ;

     save_


 save__array_structure_list.array_id
     _item_description.description
 ;             This item is a pointer to _array_structure.id in the
               ARRAY_STRUCTURE category.
 ;
     _item.name                  '_array_structure_list.array_id'
     _item.category_id             ARRAY_STRUCTURE_LIST
     _item.mandatory_code          implicit
     _item_type.code               code
 save_


 save__array_structure_list.axis_set_id
     _item_description.description
 ;              This is a descriptor for the physical axis or set of axes
                corresponding to an array index.

                This data item is related to the axes of the detector
                itself given in DIFFRN_DETECTOR_AXIS, but usually differs
                in that the axes in this category are the axes of the
                coordinate system of reported data points, while the axes in
                DIFFRN_DETECTOR_AXIS are the physical axes
                of the detector describing the 'poise' of the detector as an
                overall physical object.

                If there is only one axis in the set, the identifier of
                that axis should be used as the identifier of the set.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
            '_array_structure_list.axis_set_id'
                                   ARRAY_STRUCTURE_LIST            yes
            '_array_structure_list_axis.axis_set_id'
                                   ARRAY_STRUCTURE_LIST_AXIS       implicit
            '_array_structure_list_section.axis_set_id'
                                   ARRAY_STRUCTURE_LIST_SECTION
                                                                   implicit
     _item_type.code               code
      loop_
     _item_linked.child_name
     _item_linked.parent_name
            '_array_structure_list_axis.axis_set_id'
                                '_array_structure_list.axis_set_id'
            '_array_structure_list_section.axis_set_id'
                               '_array_structure_list.axis_set_id'

      save_


 save__array_structure_list.dimension
     _item_description.description
 ;              The number of elements stored in the array structure in
                this dimension.
 ;
     _item.name                '_array_structure_list.dimension'
     _item.category_id          ARRAY_STRUCTURE_LIST
     _item.mandatory_code       yes
     _item_type.code            int
      loop_
     _item_range.maximum
     _item_range.minimum
                             1  1
                             .  1
      save_


 save__array_structure_list.direction
     _item_description.description
 ;             Identifies the direction in which this array index changes.
 ;
     _item.name                '_array_structure_list.direction'
     _item.category_id          ARRAY_STRUCTURE_LIST
     _item.mandatory_code       yes
     _item_type.code            code
      loop_
     _item_enumeration.value
     _item_enumeration.detail

                               'increasing'
 ;        Indicates the index changes from 1 to the maximum dimension.
 ;
                               'decreasing'
 ;        Indicates the index changes from the maximum dimension to 1.
 ;
      save_


 save__array_structure_list.index
     _item_description.description
 ;              Identifies the one-based index of the row or column in the
                array structure.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
            '_array_structure_list.index'        ARRAY_STRUCTURE_LIST   yes
            '_array_structure_list.precedence'   ARRAY_STRUCTURE_LIST   yes
            '_array_element_size.index'          ARRAY_ELEMENT_SIZE     yes

     _item_type.code            int

      loop_
     _item_linked.child_name
     _item_linked.parent_name
           '_array_structure_list_section.index'
                         '_array_structure_list.index'
           '_array_element_size.index'
                         '_array_structure_list.index'

      loop_
     _item_range.maximum
     _item_range.minimum
                             1  1
                             .  1
      save_


 save__array_structure_list.precedence
     _item_description.description
 ;              Identifies the rank order in which this array index changes
                with respect to other array indices.  The precedence of 1
                indicates the index which changes fastest.
 ;
     _item.name                '_array_structure_list.precedence'
     _item.category_id          ARRAY_STRUCTURE_LIST
     _item.mandatory_code       yes
     _item_type.code            int
      loop_
     _item_range.maximum
     _item_range.minimum
                             1  1
                             .  1
      save_
     
 save__array_structure_list.variant
     _item_description.description
 ;             The value of _array_structure_list.variant gives the variant
               to which the given ARRAY_STRUCTURE_LIST row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_array_structure_list.variant'
     _item.category_id             ARRAY_STRUCTURE_LIST
     _item.mandatory_code          implicit
     _item_type.code               code
      save_

     #        category  ARRAY_STRUCTURE_LIST_SECTION
     #
     #                  _array_structure_list_section.id
     #                  _array_structure_list_section.array_id
     #                  _array_structure_list_section.index
     #                  _array_structure_list_section.end
     #                  _array_structure_list_section.start
     #                  _array_structure_list_section.stride
     #                  _array_structure_list_section.variant



 ################################
 # ARRAY_STRUCTURE_LIST_SECTION #
 ################################


 save_array_structure_list_section
     _category.description
 ;    Data items in the ARRAY_STRUCTURE_LIST_SECTION category identify
      the dimension-by-dimension start, end and stride of each section of an
      array that is to be referenced.
    
      For any array of array_id, ARRAYID, array section ids of the form
      ARRAYID(start1:end1:stride1,start2:end2:stride2, ...) are defined
      by default.
    
      For the given index, the elements in
      the section are of indices:  _array_structure_list_section.start,
        _array_structure_list_section.start
          +_array_structure_list_section.stride,
        _array_structure_list_section.start
         +2*_array_structure_list_section.stride,
        ...
      stopping either when the indices leave the limits of the indices of that dimension
      or [min(_array_structure_list_section.start,
      _array_structure_list_section.end),
      max(_array_structure_list_section.start,
      _array_structure_list_section.end)].
    
    
      The ordering of these elements is determined by the overall ordering of
      _array_structure_list_section.array_id and not by the ordering implied by the
      stride.

 ;
     _category.id                   ARRAY_STRUCTURE_LIST_SECTION
     _category.mandatory_code       no
      loop_
     _category_key.name             '_array_structure_list_section.id'
                                    '_array_structure_list_section.array_id'
                                    '_array_structure_list_section.index'
                                    '_array_structure_list_section.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;       Example 1 - An image array, myarry, of 1300 x 1200 elements,
                     700 frames is defined in ARRAY_STRUCTURE_LIST, and
                     the array section identifier
    
                     "myarray(101:1200,101:1100,1:700:10)"
    
                     is explicitly defined taking every 10th frame and
                     removing a 100 pixel border.  Note that even though
                     the slow index high is 700, the last frame that
                     will actually be included in only 691.
 ;
 ;
  
     loop_
     _array_structure_list.array_id
     _array_structure_list.index
     _array_structure_list.dimension
     _array_structure_list.precedence
     _array_structure_list.direction
     _array_structure_list.axis_set_id
     myarray   1    1300    1     increasing  ELEMENT_X
     myarray   2    1200    2     increasing  ELEMENT_Y
     myarray   3    700     3     increasing  FRAME_NO
    
     loop_
     _array_structure_list_section.id
     _array_structure_list_section.array id
     _array_structure_list_section.index
     _array_structure_list_section.start
     _array_structure_list_section.end
     _array_structure_list_section.stride
     "myarray(101:1200,101:1100,1:700:10)"  myarray 1 101 1200   .
     "myarray(101:1200,101:1100,1:700:10)"  myarray 2 101 1100   .
     "myarray(101:1200,101:1100,1:700:10)"  myarray 3   1  700  10
 
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _array_structure_list_section.array_id ARRAYID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list_section__SECTIONID=[]
           /@CBF_array_id="ARRAYID"
    
     _array_structure_list_section.id SECTIONID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list_section__SECTIONID=[]
    
     _array_structure_list_section.index INDEX-->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list_section__SECTIONID=[]
           /@CBF_array_structure_list_section__index=INDEX
    
     _array_structure_list_section.end END -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list_section__SECTIONID=[]
           /@CBF_array_structure_list_section__end=END
    
     _array_structure_list_section.start START -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list_section__SECTIONID=[]
           /@CBF_array_structure_list_section__start=START
    
     _array_structure_list_section.stride STRIDE -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_array_structure_list_section__SECTIONID=[]
           /@CBF_array_structure_list_section__stride=STRIDE
    
     _array_structure_list_section.variant --> ??
         NeXus does not handle variants at this time
          

 ;
     save_


 save__array_structure_list_section.array_id
     _item_description.description
 ;             This item is a pointer to _array_structure.id in the
               ARRAY_STRUCTURE category.
 ;
     _item.name                  '_array_structure_list_section.array_id'
     _item.category_id             ARRAY_STRUCTURE_LIST_SECTION
     _item.mandatory_code          mandatory
     _item_type.code               code
 save_


 save__array_structure_list_section.end
     _item_description.description
 ;              Identifies the ending ordinal, numbered from 1, for an array
                element of index _array_structure_list_section.index in the
                section.

                The value defaults to the dimension for index
                _array_structure_list_section.index
                of the array.
    
                Note that this agrees with the Fortran convention, rather than
                the Python convention in that, if compatible with the stride,
                the end element is included in the section as in Fortran, rather
                than being one beyond the section as in Python.
 ;

     _item.name                 _array_structure_list_section.end
     _item.category_id          ARRAY_STRUCTURE_LIST_SECTION
     _item.mandatory_code       implicit
     _item_type.code            int
     loop_
     _item_range.maximum
     _item_range.minimum
                             1  1
                             .  1
      save_
    
 save__array_structure_list_section.id
     _item_description.description
 ;             Uniquely identifies the array section chosen.
    
               To avoid confusion array section IDs that contain parentheses
               should conform to the default syntax
    
               ARRAYID(start1:end1:stride1,start2:end2:stride2, ...)
 ;
     _item.name                  '_array_structure_list_section.id'
     _item.category_id             ARRAY_STRUCTURE_LIST_SECTION
     _item.mandatory_code          yes
     _item_type.code               code
    
     loop_
     _item_linked.child_name
     _item_linked.parent_name
                             '_diffrn_data_frame.array_section_id'
                               '_array_structure_list_section.id'
                             '_map_segment.array_section_id'
                               '_array_structure_list_section.id'

 save_


 save__array_structure_list_section.index
     _item_description.description
     ;         This item is a pointer to _array_structure_list.index
               in the ARRAY_STRUCTURE_LIST category.
    
               Identifies the one-based index of the row, column, sheet ...
               the ARRAY_STRUCTURE_LIST category.
    
               For a multidimensional array, a value must be explicitly given.
    
               If an index is omitted from section then all elements for that
               index are assumed to be included in the section.
 ;
     _item.name                 '_array_structure_list_section.index'
     _item.category_id          ARRAY_STRUCTURE_LIST_SECTION
     _item.mandatory_code       implicit
     _item_type.code            int
      save_


 save__array_structure_list_section.start
     _item_description.description
 ;              Identifies the starting ordinal, numbered from 1,
                for an array element of index _array_structure_list_section.index
                in the section.
    
                The value defaults to 1.   For the given index, the elements in
                the section are of indices:  _array_structure_list_section.start,
                    _array_structure_list_section.start
                      +_array_structure_list_section.stride,
                    _array_structure_list_section.start
                      +2*_array_structure_list_section.stride,
                    ...
                stopping either when the indices leave the limits of the indices of that dimension
                or [min(_array_structure_list_section.start,
                      _array_structure_list_section.end),
                    max(_array_structure_list_section.start,
                      _array_structure_list_section.end)].
    
    
                The ordering of these elements is determined by the overall ordering of
                _array_structure_list_section.array_id and not by the ordering implied by the
                stride.
 ;
     _item.name                 '_array_structure_list_section.start'
     _item.category_id          ARRAY_STRUCTURE_LIST_SECTION
     _item.mandatory_code       implicit
     _item_type.code            int
     loop_
     _item_range.maximum
     _item_range.minimum
                             1  1
                             .  1
      save_


 save__array_structure_list_section.stride
     _item_description.description
 ;             Identifies the incremental steps to be taken when moving
               element to element in the section in that particular
               dimension.  The value of _array_structure_list_section.stride may be
               positive or negative.  If the stride is zero, the section is
               just defined by _array_structure_list_section.start.
 ;
     _item.name                '_array_structure_list_section.stride'
     _item.category_id          ARRAY_STRUCTURE_LIST_SECTION
     _item.mandatory_code       no
     _item_default.value        1
     _item_type.code            int
      loop_
     _item_range.maximum
     _item_range.minimum
                             1  1
                             .  1
      save_
     
 save__array_structure_list_section.variant
     _item_description.description
 ;             The value of _array_structure_list_section.variant gives the variant
               to which the given ARRAY_STRUCTURE_LIST_SECTION row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_array_structure_list_section.variant'
     _item.category_id             ARRAY_STRUCTURE_LIST_SECTION
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


    
 #############################
 # ARRAY_STRUCTURE_LIST_AXIS #
 #############################

 save_array_structure_list_axis
     _category.description
 ;    Data items in the ARRAY_STRUCTURE_LIST_AXIS category describe
      the physical settings of sets of axes for the centres of pixels that
      correspond to data points described in the
      ARRAY_STRUCTURE_LIST category.

      In the simplest cases, the physical increments of a single axis correspond
      to the increments of a single array index.  More complex organizations,
      e.g. spiral scans, may require coupled motions along multiple axes.

      Note that a spiral scan uses two coupled axes: one for the angular
      direction and one for the radial direction.  This differs from a
      cylindrical scan for which the two axes are not coupled into one
      set.
 ;
     _category.id                   ARRAY_STRUCTURE_LIST_AXIS
     _category.mandatory_code       no
      loop_
     _category_key.name
                                   '_array_structure_list_axis.axis_set_id'
                                   '_array_structure_list_axis.axis_id'
                                   '_array_structure_list_axis.variant'
      loop_
     _category_group.id           'inclusive_group'
                                  'array_data_group'
     _category.NX_mapping_details
 ;
    
     _array_structure_list_axis.axis_id AXISID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__axis_id="AXISID"
    
     _array_structure_list_axis.axis_set_id AXISSETID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__axis_set_id="AXISSETID"
    
     _array_structure_list_axis.angle ANGLE -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__angle=ANGLE
    
     _array_structure_list_axis.angle_increment ANGLEINC -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__angle_increment=ANGLEINC
    
     _array_structure_list_axis.displacement DISP -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__displacement=DISP
    
     _array_structure_list_axis.fract_displacement  FRACTDISP -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__displacement=FRACTDISP
    
     _array_structure_list_axis.displacement_increment DISPINC -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__displacement_increment=DISPINC
    
     _array_structure_list_axis.fract_displacement_increment FRACTINC -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__fract_displacement_increment=FRACTINC
    
     _array_structure_list_axis.angular_pitch  ANGPITCH -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__angular_pitch=ANGPITCH
    
     _array_structure_list_axis.radial_pitch  RADPITCH -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__radial_pitch=RADPITCH
    
     _array_structure_list_axis.reference_angle REFANG  -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__reference_angle=REFANG
    
     _array_structure_list_axis.reference_displacement REFDISP -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_axis__AXISID=[]
           /@CBF_array_structure_list_axis__reference_displacement=REFDISP
    
     _array_structure_list_axis.variant --> ??
         NeXus does not handle variants at this time
 ;

     save_


 save__array_structure_list_axis.axis_id
     _item_description.description
 ;              The value of this data item is the identifier of one of
                the axes in the set of axes for which settings are being
                specified.

                Multiple axes may be specified for the same value of
                _array_structure_list_axis.axis_set_id.

                This item is a pointer to _axis.id in the
                AXIS category.
 ;
     _item.name                 '_array_structure_list_axis.axis_id'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       yes
     _item_type.code            code
      save_


 save__array_structure_list_axis.axis_set_id
     _item_description.description
 ;              The value of this data item is the identifier of the
                set of axes for which axis settings are being specified.

                Multiple axes may be specified for the same value of
                _array_structure_list_axis.axis_set_id.

                This item is a pointer to
                _array_structure_list.axis_set_id
                in the ARRAY_STRUCTURE_LIST category.

                If this item is not specified, it defaults to the corresponding
                axis identifier.
 ;
     _item.name                 '_array_structure_list_axis.axis_set_id'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       implicit
     _item_type.code            code
      save_


 save__array_structure_list_axis.angle
     _item_description.description
 ;              The setting of the specified axis in degrees for the first
                data point of the array index with the corresponding value
                of _array_structure_list.axis_set_id.  If the index is
                specified as 'increasing', this will be the centre of the
                pixel with index value 1.  If the index is specified as
                'decreasing', this will be the centre of the pixel with
                maximum index value.
 ;
     _item.name                 '_array_structure_list_axis.angle'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'degrees'
      save_


 save__array_structure_list_axis.angle_increment
     _item_description.description
 ;              The pixel-centre-to-pixel-centre increment in the angular
                setting of the specified axis in degrees.  This is not
                meaningful in the case of 'constant velocity' spiral scans
                and should not be specified for this case.

                See _array_structure_list_axis.angular_pitch.

 ;
     _item.name                 '_array_structure_list_axis.angle_increment'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'degrees'
      save_


 save__array_structure_list_axis.displacement
     _item_description.description
 ;              The setting of the specified axis in millimetres for the first
                data point of the array index with the corresponding value
                of _array_structure_list.axis_set_id.  If the index is
                specified as 'increasing', this will be the centre of the
                pixel with index value 1.  If the index is specified as
                'decreasing', this will be the centre of the pixel with
                maximum index value.
 ;
     _item.name               '_array_structure_list_axis.displacement'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_

 save__array_structure_list_axis.fract_displacement
     _item_description.description
 ;              The setting of the specified axis as a decimal fraction of
                the axis unit vector for the first data point of the array
                index with the corresponding value of
                _array_structure_list.axis_set_id. 
                If the index is specified as 'increasing', this will be the
                centre of the pixel with index value 1.  If the index is
                specified as 'decreasing', this will be the centre of the
                pixel with maximum index value.
 ;
     _item.name               '_array_structure_list_axis.fract_displacement'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
      save_

 save__array_structure_list_axis.displacement_increment
     _item_description.description
 ;              The pixel-centre-to-pixel-centre increment for the displacement
                setting of the specified axis in millimetres.
 ;
     _item.name
         '_array_structure_list_axis.displacement_increment'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_

 save__array_structure_list_axis.fract_displacement_increment
     _item_description.description
 ;              The pixel-centre-to-pixel-centre increment for the displacement
                setting of the specified axis as a decimal fraction of the
                axis unit vector.
 ;
     _item.name
         '_array_structure_list_axis.fract_displacement_increment'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_


 save__array_structure_list_axis.angular_pitch
     _item_description.description
 ;              The pixel-centre-to-pixel-centre distance for a one-step
                change in the setting of the specified axis in millimetres.

                This is meaningful only for 'constant velocity' spiral scans
                or for uncoupled angular scans at a constant radius
                (cylindrical scans) and should not be specified for cases
                in which the angle between pixels (rather than the distance
                between pixels) is uniform.

                See _array_structure_list_axis.angle_increment.
 ;
     _item.name               '_array_structure_list_axis.angular_pitch'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_


 save__array_structure_list_axis.radial_pitch
     _item_description.description
 ;              The radial distance from one 'cylinder' of pixels to the
                next in millimetres.  If the scan is a 'constant velocity'
                scan with differing angular displacements between pixels,
                the value of this item may differ significantly from the
                value of _array_structure_list_axis.displacement_increment.
 ;
     _item.name               '_array_structure_list_axis.radial_pitch'
     _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_


 save__array_structure_list_axis.reference_angle
      _item_description.description
 ;              The value of _array_structure_list_axis.reference_angle
                specifies the setting of the angle of this axis used for
                determining a reference beam center and a reference detector
                distance.  It is normally expected to be identical to the
                value of _array_structure_list.angle.

 ;
      _item.name '_array_structure_list_axis.reference_angle'
      _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
      _item.mandatory_code       implicit
      _item_type.code            float
      _item_units.code           'degrees'
       save_


 save__array_structure_list_axis.reference_displacement
      _item_description.description
 ;              The value of _array_structure_list_axis.reference_displacement
                specifies the setting of the displacement of this axis used
                for determining a reference beam center and a reference detector
                distance.  It is normally expected to be identical to the value
                of _array_structure_list.displacement.

 ;
      _item.name '_array_structure_list_axis.reference_displacement'
      _item.category_id          ARRAY_STRUCTURE_LIST_AXIS
      _item.mandatory_code       implicit
      _item_type.code            float
      _item_units.code           'millimetres'
       save_

 save__array_structure_list_axis.variant
     _item_description.description
 ;             The value of _array_structure_list_axis.variant gives the variant
               to which the given ARRAY_STRUCTURE_LIST_AXIS row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_array_structure_list_axis.variant'
     _item.category_id             ARRAY_STRUCTURE_LIST_AXIS
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 ########
 # AXIS #
 ########

 save_AXIS
     _category.description
 ;    Data items in the AXIS category record the information required
      to describe the various goniometer, detector, source and other
      axes needed to specify a data collection or the axes defining the
      coordinate system of an image. 
     
      The location of each axis is specified by two vectors: the axis
      itself, given by a  unit vector in the direction of the axis, and
      an offset to the base of the unit vector. 
     
      The vectors defining an axis are referenced to an appropriate
      coordinate system.  The axis vector, itself, is a dimensionless
      unit vector.  Where meaningful, the offset vector is given in
      millimetres.  In coordinate systems not measured in metres,
      the offset is not specified and is taken as zero.
     
      The available coordinate systems are:
     
          The imgCIF standard laboratory coordinate system
          The direct lattice (fractional atomic coordinates)
          The orthogonal Cartesian coordinate system (real space)
          The reciprocal lattice
          An abstract orthogonal Cartesian coordinate frame
      
      For consistency in this discussion, we call the three coordinate
      system axes X, Y and Z.  This is appropriate for the imgCIF
      standard laboratory coordinate system, and last two Cartesian
      coordinate systems, but for the direct lattice, X corresponds
      to a, Y to b and Z to c, while for the reciprocal lattice,
      X corresponds to a*, Y to b* and Z to c*.
     
      For purposes of visualization, all the coordinate systems are
      taken as right-handed, i.e., using the convention that the extended
      thumb of a right hand could point along the first (X) axis, the
      straightened pointer finger could point along the second (Y) axis
      and the middle finger folded inward could point along the third (Z)
      axis. 
     
      THE IMGCIF STANDARD LABORATORY COORDINATE SYSTEM
     
      The imgCIF standard laboratory coordinate system is a right-handed  
      orthogonal coordinate similar to the MOSFLM coordinate system, 
      but imgCIF puts Z along the X-ray beam, rather than putting X along the
      X-ray beam as in MOSFLM.
     
      The vectors for the imgCIF standard laboratory coordinate system
      form a right-handed Cartesian coordinate system with its origin
      in the sample or specimen.  The origin of the axis system should,
      if possible, be defined in terms of mechanically stable axes to be
      be both in the sample and in the beam.  If the sample goniometer or other
      sample positioner has two axes the intersection of which defines a
      unique point at which the sample should be mounted to be bathed
      by the beam, that will be the origin of the axis system.  If no such
      point is defined, then the midpoint of the line of intersection
      between the sample and the center of the beam will define the origin.
      For this definition the sample positioning system will be set at
      its initial reference position for the experiment.


                              | Y (to complete right-handed system)
                              |
                              |
                              |
                              |
                              |
                              |________________X
                             /       principal goniometer axis
                            /
                           /
                          /
                         /
                        /Z (to source)




      Axis 1 (X): The X-axis is aligned to the mechanical axis pointing from
      the sample or specimen along the  principal axis of the goniometer or
      sample positioning system if the sample positioning system has an axis
      that intersects the origin and which form an angle of more than 22.5
      degrees with the beam axis.
     
      Axis 2 (Y): The Y-axis completes an orthogonal right-handed system
      defined by the X-axis and the Z-axis (see below).

      Axis 3 (Z): The Z-axis is derived from the source axis which goes from
      the sample to the source.  The Z-axis is the component of the source axis
      in the direction of the source orthogonal to the X-axis in the plane
      defined by the X-axis and the source axis.

      If the conditions for the X-axis can be met, the coordinate system
      will be based on the goniometer or other sample positioning system
      and the beam and not on the orientation of the detector, gravity etc. 
      The vectors necessary to specify all other axes are given by sets of
      three components in the order (X, Y, Z).
      If the axis involved is a rotation axis, it is right-handed, i.e. as
      one views the object to be rotated from the origin (the tail) of the
      unit vector, the rotation is clockwise.  If a translation axis is
      specified, the direction of the unit vector specifies the sense of
      positive translation.

      Note:  This choice of coordinate system is similar to but significantly
      different from the choice in MOSFLM (Leslie & Powell, 2004).  In MOSFLM,
      X is along the X-ray beam (the CBF/imgCIF Z axis) and Z is along the
      rotation axis.
     
      In some experimental techniques, there is no goniometer or the principal
      axis of the goniometer is at a small acute angle with respect to
      the source axis.  In such cases, other reference axes are needed
      to define a useful coordinate system.  The order of priority in
      defining directions in such cases is to use the detector, then
      gravity, then north.
     
     
      If the X-axis cannot be defined as above, then the
      direction (not the origin) of the X-axis should be parallel to the axis
      of the primary detector element corresponding to the most rapidly
      varying dimension of that detector element's data array, with its
      positive sense corresponding to increasing values of the index for
      that dimension.  If the detector is such that such a direction cannot
      be defined (as with a point detector) or that direction forms an
      angle of less than 22.5 degrees with respect to the source axis, then
      the X-axis should be chosen so that if the Y-axis is chosen
      in the direction of gravity, and the Z-axis is chosen to be along
      the source axis, a right-handed orthogonal coordinate system is chosen. 
      In the case of a vertical source axis, as a last resort, the
      X-axis should be chosen to point North.
     
      All rotations are given in degrees and all translations are given in mm.

      Axes may be dependent on one another.  The X-axis is the only goniometer
      axis the direction of which is strictly connected to the hardware.  All
      other axes are specified by the positions they would assume when the
      axes upon which they depend are at their zero points.

      When specifying detector axes, the axis is given to the beam centre.
      The location of the beam centre on the detector should be given in the
      DIFFRN_DETECTOR category in distortion-corrected millimetres from
      the (0,0) corner of the detector.
    
      For convenience when describing detector element (module) placement,
      and optional mounting rotation axis and rotation angle may be
      specified.  In such cases, the mounting rotation axis and angle
      of rotation around the mounting rotation axis are applied after
      applying the transformations upon which the given axis depends.

      It should be noted that many different origins arise in the definition
      of an experiment.  In particular, as noted above, it is necessary to
      specify the location of the beam centre on the detector in terms
      of the origin of the detector, which is, of course, not coincident
      with the centre of the sample.
     
      The unit cell, reciprocal cell and crystallographic orthogonal
      Cartesian coordinate system are defined by the CELL and the matrices
      in the ATOM_SITES category.
     
      THE DIRECT LATTICE (FRACTIONAL COORDINATES)
     
      The direct lattice coordinate system is a system of fractional
      coordinates aligned to the crystal, rather than to the laboratory.
      This is a natural coordinate system for maps and atomic coordinates.
      It is the simplest coordinate system in which to apply symmetry.
      The axes are determined by the cell edges, and are not necessarily
      othogonal.  This coordinate system is not uniquely defined and
      depends on the cell parameters in the CELL category and the
      settings chosen to index the crystal.
     
      Molecules in a crystal studied by X-ray diffracraction are organized
      into a repeating regular array of unit cells.  Each unit cell is defined
      by three vectors, a, b and c.  To quote from Drenth,
     
     
      "The choice of the unit cell is not unique and therefore, guidelines
      have been established for selecting the standard basis vectors and
      the origin.  They are based on symmetry and metric considerations:
     
       "(1)  The axial system should be right handed.
        (2)  The basis vectors should coincide as much as possible with
        directions of highest symmetry."
        (3)  The cell taken should be the smallest one that satisfies
        condition (2)
        (4)  Of all the lattice vectors, none is shorter than a.
        (5)  Of those not directed along a, none is shorter than b.
        (6)  Of those not lying in the ab plane, none is shorter than c.
        (7)  The three angles between the basis vectors a, b and c are
        either all acute (<90\%) or all obtuse (>=90\%)."
     
      These rules do not produce a unique result that is stable under
      the assumption of experimental errors, and the the resulting cell
      may not be primitive.
     
      In this coordinate system, the vector (.5, .5, .5) is in the middle
      of the given unit cell.
     
      Grid coordinates are an important variation on fractional coordinates
      used when working with maps.  In imgCIF, the conversion from
      fractional to grid coordinates is implicit in the array indexing
      specified by _array_structure_list.dimension.  Note that this
      implicit grid-coordinate scheme is 1-based, not zero-based, i.e.
      the origin of the cell for axes along the cell edges with no
      specified _array_structure_list_axis.displacement will have
      grid coordinates of (1,1,1), i.e. array indices of (1,1,1).
     
      THE ORTHOGONAL CARTESIAN COORDINATE SYSTEM (REAL SPACE)
     
      The orthogonal Cartesian coordinate system is a transformation of
      the direct lattice to the actual physical coordinates of atoms in
      space.  It is similar to the laboratory coordinate system, but
      is anchored to and moves with the crystal, rather than being
      schored to the laboratory.  The transformation from fractional
      to orthogonal cartesian coordinates is given by the
               _atom_sites.Cartn_transf_matrix[i][j]  and
               _atom_sites.Cartn_transf_vector[i]
      tags.  A common choice for the matrix of the transformation is
      given in the 1992 PDB format document
     
               | a      b cos(\g)   c cos(\b)                            |
               | 0      b sin(\g)   c (cos(\a) - cos(\b)cos(\g))/sin(\g) |
               | 0      0           V/(a b sin(\g))                      |
     
      This is a convenient coordinate system in which to do fitting
      of models to maps and in which to understand the chemistry of
      a molecule.
     
      THE RECIPROCAL LATTICE
     
      The reciprocal lattice coordinate system is used for diffraction
      intensitities.  It is based on the reciprocal cell, the dual of the cell,
      in which reciprocal cell edges are derived from direct cell faces:
     
         a* = bc sin(\a)/V  b* = ac sin(\b)/V  c* = ab sin(\g)/V
         cos(\a*) = (cos(\b) cos(\g) - cos(\a))/(sin(\b) sin(\g))
         cos(\b*) = (cos(\a) cos(\g) - cos(\b))/(sin(\a) sin(\g))
         cos(\g*) = (cos(\a) cos(\b) - cos(\g))/(sin(\a) sin(\b))
         V = abc SQRT(1 - cos(\a)^2^
                        - cos(\b)^2^
                        - cos(\g)^2^
                        + 2 cos(\a) cos(\b) cos(\g) )
     
      In this form the dimensions of the reciprocal lattice are in reciprocal
      \%Angstroms (\%A^-1^).  A dimensionless form can be obtained by
      multiplying by the wavelength.  Reflections are commonly indexed against
      this coordinate system as (h, k, l) triples.
     
     
      References:
     
      Drenth, J., "Introduction to basic crystallography." chapter
      2.1 in Rossmann, M. G. and Arnold, E. "Crystallography of
      biological macromolecules", Volume F of the IUCr's "International
      tables for crystallography", Kluwer, Dordrecht 2001, pp 44 -- 63

      Leslie, A. G. W. and Powell, H. (2004). MOSFLM v6.11.
      MRC Laboratory of Molecular Biology, Hills Road, Cambridge, England.
      http://www.CCP4.ac.uk/dist/X-windows/Mosflm/.
     
      Stout, G. H. and Jensen, L. H., "X-ray structure determination",
      2nd ed., Wiley, New York, 1989, 453 pp.
     
      __, "PROTEIN DATA BANK ATOMIC COORDINATE AND BIBLIOGRAPHIC ENTRY
      FORMAT DESCRIPTION," Brookhaven National Laboratory, February 1992.
 ;
     _category.id                   AXIS
     _category.mandatory_code       no
      loop_
     _category_key.name          '_axis.id'
                                 '_axis.equipment'
                                 '_axis.variant'
      loop_
     _category_group.id           'inclusive_group'
                                  'axis_group'
                                  'diffrn_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;       Example 1 -

         This example shows the axis specification of the axes of a kappa-
         geometry goniometer [see Stout, G. H. & Jensen, L. H. (1989). X-ray
         structure determination. A practical
         guide, 2nd ed. p. 134. New York: Wiley Interscience].

         There are three axes specified, and no offsets.  The outermost axis,
         omega, is pointed along the X axis.  The next innermost axis, kappa,
         is at a 50 degree angle to the X axis, pointed away from the source.
         The innermost axis, phi, aligns with the X axis when omega and
         phi are at their zero points.  If T-omega, T-kappa and T-phi
         are the transformation matrices derived from the axis settings,
         the complete transformation would be:
             X' = (T-omega) (T-kappa) (T-phi) X
 ;
 ;
          loop_
         _axis.id
         _axis.type
         _axis.equipment
         _axis.depends_on
         _axis.vector[1] _axis.vector[2] _axis.vector[3]
         omega rotation goniometer     .    1        0        0
         kappa rotation goniometer omega    -.64279  0       -.76604
         phi   rotation goniometer kappa    1        0        0
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;       Example 2 -

         This example shows the axis specification of the axes of a
         detector, source and gravity.  The order has been changed as a
         reminder that the ordering of presentation of tokens is not
         significant.  The centre of rotation of the detector has been taken
         to be 68 millimetres in the direction away from the source.
 ;
 ;
         loop_
         _axis.id
         _axis.type
         _axis.equipment
         _axis.depends_on
         _axis.vector[1] _axis.vector[2] _axis.vector[3]
         _axis.offset[1] _axis.offset[2] _axis.offset[3]
         source       .        source     .       0     0     1   . . .
         gravity      .        gravity    .       0    -1     0   . . .
         tranz     translation detector rotz      0     0     1   0 0 -68
         twotheta  rotation    detector   .       1     0     0   . . .
         roty      rotation    detector twotheta  0     1     0   0 0 -68
         rotz      rotation    detector roty      0     0     1   0 0 -68
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;       Example 3 -

         This example show the axis specification of the axes for a map,
         using fractional coordinates.  Each cell edge has been divided
         into a grid of 50 divisions in the ARRAY_STRUCTURE_LIST_AXIS
         category.  The map is using only the first octant of the grid
         in the ARRAY_STRUCTURE_LIST category.

         The fastest changing axis is the gris along A, then along B,
         and the slowest is along C.
        
         The map sampling is being done in the middle of each grid
         division
        
 ;
 ;
         loop_
         _axis.id
         _axis.system
         _axis.vector[1] _axis.vector[2] _axis.vector[3]
         CELL_A_AXIS    fractional       1 0 0
         CELL_B_AXIS    fractional       0 1 0
         CELL_C_AXIS    fractional       0 0 1
        
         loop_
         _array_structure_list.array_id
         _array_structure_list.index
         _array_structure_list.dimension
         _array_structure_list.precedence
         _array_structure_list.direction
         _array_structure_list.axis_id
         map 1 25 1 increasing CELL_A_AXIS
         map 1 25 2 increasing CELL_B_AXIS
         map 1 25 3 increasing CELL_C_AXIS
        
         loop_
         _array_structure_list_axis.axis_id
         _array_structure_list_axis.fract_displacement
         _array_structure_list_axis.fract_displacement_increment
         CELL_A_AXIS 0.01 0.02
         CELL_B_AXIS 0.01 0.02
         CELL_C_AXIS 0.01 0.02

        
        
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;       Example 4 -

         This example show the axis specification of the axes for a map,
         this time as orthogonal \%Angstroms, using the same coordinate system
         as for the atomic coordinates.  The map is sampling every 1.5
         \%Angstroms (1.5e-7 millimeters) in a map segment 37.5 \%Angstroms on
         a side.
        
 ;
 ;
         loop_
         _axis.id
         _axis.system
         _axis.vector[1] _axis.vector[2] _axis.vector[3]
         X    orthogonal       1 0 0
         Y    orthogonal       0 1 0
         Z    orthogonal       0 0 1
        
                 loop_
         _array_structure_list.array_id
         _array_structure_list.index
         _array_structure_list.dimension
         _array_structure_list.precedence
         _array_structure_list.direction
         _array_structure_list.axis_id
         map 1 25 1 increasing X
         map 2 25 2 increasing Y
         map 3 25 3 increasing Z
        
         loop_
         _array_structure_list_axis.axis_id
         _array_structure_list_axis.displacement
         _array_structure_list_axis.displacement_increment
         X 7.5e-8 1.5e-7
         Y 7.5e-8 1.5e-7
         Z 7.5e-8 1.5e-7


 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;       Example 5 -
    
     This example show an excerpt from the axis specification of an FEL detector
     provided by N. Sauter and A. Brewster.
    
     The detector is divided into 4 quadrants, each quadrant contains 8 sensors
     and each sensor contains 2 ASICs.  We want to be able to refine the
     placement of each of these elements, so we maintain the set of vectors
     that places them.
    
     To do this, the first vector of importance is an initial placement axis
     that moves from the origin along the Z axis a distance equal to the
     detector distance.  This is the origin for the rest of the axes and is
     called AXIS_D0_ORIGIN.
    
     Each subsequent movement involves a frame shift.  This is done by using
     two imageCIF axes: a rotation axis and a translation axis.  The rotation
     axis is listed first, and includes no offset or angle.  The actual frame
     shift is done by using a translation axis.  An offset is used first in
     the parent's frame, and then an angle is listed to rotate around the
     rotation axis.
    
     Example, sensor five of quadrant 2.  First a rotation axis is listed:
    
     AXIS_D0Q2S5_ROT rotation detector AXIS_D0Q2 0.0 0.0 1.0 0 0 0 . .
     This defines a rotation axis around the z-axis in the frame of quadrant 2.
    
     Next a translation axis is listed:
     AXIS_D0Q2S5 translation detector
         AXIS_D0Q2 . . . 34.5494875 -24.1901 0.0 89.68154 AXIS_D0Q2S5_ROT
     Here, in the frame of quadrant 2, we shift X by 34 and Y by -24
     millimeters, then rotate 89 degrees around the axis named AXIS_D0Q2S5_ROT.
    
     And so forth.
     ;
     ;
     loop_
     _diffrn_detector_axis.detector_id
     _diffrn_detector_axis.axis_id
     CSPAD_FRONT AXIS_DETECTOR_X
     CSPAD_FRONT AXIS_DETECTOR_Y
     CSPAD_FRONT AXIS_DETECTOR_Z
     CSPAD_FRONT AXIS_DETECTOR_PITCH
    
     loop_
     _diffrn_detector_element.id
     _diffrn_detector_element.detector_id
     ELE_D0Q0S0A0 CSPAD_FRONT
     ELE_D0Q0S0A1 CSPAD_FRONT
     ELE_D0Q0S1A0 CSPAD_FRONT
     ELE_D0Q0S1A1 CSPAD_FRONT
     ELE_D0Q0S2A0 CSPAD_FRONT
     ELE_D0Q0S2A1 CSPAD_FRONT
     ELE_D0Q0S3A0 CSPAD_FRONT
     ELE_D0Q0S3A1 CSPAD_FRONT
     ELE_D0Q0S4A0 CSPAD_FRONT
     ELE_D0Q0S4A1 CSPAD_FRONT
     ELE_D0Q0S5A0 CSPAD_FRONT
     ELE_D0Q0S5A1 CSPAD_FRONT
     ELE_D0Q0S6A0 CSPAD_FRONT
     ELE_D0Q0S6A1 CSPAD_FRONT
     ELE_D0Q0S7A0 CSPAD_FRONT
     ELE_D0Q0S7A1 CSPAD_FRONT
     ELE_D0Q1S0A0 CSPAD_FRONT
     ELE_D0Q1S0A1 CSPAD_FRONT
     ELE_D0Q1S1A0 CSPAD_FRONT
     ELE_D0Q1S1A1 CSPAD_FRONT
     ELE_D0Q1S2A0 CSPAD_FRONT
     ELE_D0Q1S2A1 CSPAD_FRONT
     ELE_D0Q1S3A0 CSPAD_FRONT
     ELE_D0Q1S3A1 CSPAD_FRONT
     ELE_D0Q1S4A0 CSPAD_FRONT
     ELE_D0Q1S4A1 CSPAD_FRONT
     ELE_D0Q1S5A0 CSPAD_FRONT
     ELE_D0Q1S5A1 CSPAD_FRONT
     ELE_D0Q1S6A0 CSPAD_FRONT
     ELE_D0Q1S6A1 CSPAD_FRONT
     ELE_D0Q1S7A0 CSPAD_FRONT
     ELE_D0Q1S7A1 CSPAD_FRONT
     ELE_D0Q2S0A0 CSPAD_FRONT
     ELE_D0Q2S0A1 CSPAD_FRONT
     ELE_D0Q2S1A0 CSPAD_FRONT
     ELE_D0Q2S1A1 CSPAD_FRONT
     ELE_D0Q2S2A0 CSPAD_FRONT
     ELE_D0Q2S2A1 CSPAD_FRONT
     ELE_D0Q2S3A0 CSPAD_FRONT
     ELE_D0Q2S3A1 CSPAD_FRONT
     ELE_D0Q2S4A0 CSPAD_FRONT
     ELE_D0Q2S4A1 CSPAD_FRONT
     ELE_D0Q2S5A0 CSPAD_FRONT
     ELE_D0Q2S5A1 CSPAD_FRONT
     ELE_D0Q2S6A0 CSPAD_FRONT
     ELE_D0Q2S6A1 CSPAD_FRONT
     ELE_D0Q2S7A0 CSPAD_FRONT
     ELE_D0Q2S7A1 CSPAD_FRONT
     ELE_D0Q3S0A0 CSPAD_FRONT
     ELE_D0Q3S0A1 CSPAD_FRONT
     ELE_D0Q3S1A0 CSPAD_FRONT
     ELE_D0Q3S1A1 CSPAD_FRONT
     ELE_D0Q3S2A0 CSPAD_FRONT
     ELE_D0Q3S2A1 CSPAD_FRONT
     ELE_D0Q3S3A0 CSPAD_FRONT
     ELE_D0Q3S3A1 CSPAD_FRONT
     ELE_D0Q3S4A0 CSPAD_FRONT
     ELE_D0Q3S4A1 CSPAD_FRONT
     ELE_D0Q3S5A0 CSPAD_FRONT
     ELE_D0Q3S5A1 CSPAD_FRONT
     ELE_D0Q3S6A0 CSPAD_FRONT
     ELE_D0Q3S6A1 CSPAD_FRONT
     ELE_D0Q3S7A0 CSPAD_FRONT
     ELE_D0Q3S7A1 CSPAD_FRONT
    
    
     loop_
     _axis.id
     _axis.type
     _axis.equipment
     _axis.depends_on
     _axis.vector[1]
     _axis.vector[2]
     _axis.vector[3]
     _axis.offset[1]
     _axis.offset[2]
     _axis.offset[3]
     _axis.rotation
     _axis.rotation_axis
     AXIS_SOURCE general source   . 0 0 1 . . . . .
     AXIS_GRAVITY general gravity . 0 -1 0 . . . . .
     AXIS_DETECTOR_Z translation detector
                                  . 0 0 1 0 0 0 . .
     AXIS_DETECTOR_Y translation detector
                    AXIS_DETECTOR_Z 0 1 0 0 0 0 . .
     AXIS_DETECTOR_X translation detector
                    AXIS_DETECTOR_Y 1 0 0 0 0 0 . .
     AXIS_DETECTOR_PITCH rotation detector
                    AXIS_DETECTOR_X 0 1 0 0 0 0 . .
     AXIS_DETECTOR_ROT rotation detector
                AXIS_DETECTOR_PITCH 0 0 1 0 0 0 . .
     AXIS_D0_ORIGIN translation detector
                AXIS_DETECTOR_PITCH 0 0 1 0 0 171.0104 . .
     AXIS_D0_ROT rotation detector
                     AXIS_D0_ORIGIN 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0 translation detector
                     AXIS_D0_ORIGIN . . . 0.0 0.0 0.0 0.0 AXIS_D0_ROT
     AXIS_D0Q0_ROT rotation detector
                            AXIS_D0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0 translation detector
                            AXIS_D0 . . . -49.860765625 41.643353125 0.0
                                       0.0 AXIS_D0Q0_ROT
     AXIS_D0Q0S0_ROT rotation detector
                           AXIS_D0Q0 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q0S0 translation detector
                           AXIS_D0Q0 . . . 11.3696 -23.189925 0.0
                                       89.66181 AXIS_D0Q0S0_ROT
     AXIS_D0Q0S0A0_ROT rotation detector
                         AXIS_D0Q0S0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S0A0 translation detector
                         AXIS_D0Q0S0 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q0S0A0_ROT
     AXIS_D0Q0S0A0_F translation detector
                       AXIS_D0Q0S0A0 1 0 0 0 0 0 . .
     AXIS_D0Q0S0A0_S translation detector
                       AXIS_D0Q0S0A0 0 1 0 0 0 0 . .
     AXIS_D0Q0S0A1_ROT rotation detector
                         AXIS_D0Q0S0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S0A1 translation detector
                         AXIS_D0Q0S0 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q0S0A1_ROT
     AXIS_D0Q0S0A1_F translation detector
                       AXIS_D0Q0S0A1 1 0 0 0 0 0 . .
     AXIS_D0Q0S0A1_S translation detector
                       AXIS_D0Q0S0A1 0 1 0 0 0 0 . .
     AXIS_D0Q0S1_ROT rotation detector
                           AXIS_D0Q0 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q0S1 translation detector
                           AXIS_D0Q0 . . . 34.815 -23.309825 0.0
                                       90.00132 AXIS_D0Q0S1_ROT
     AXIS_D0Q0S1A0_ROT rotation detector
                         AXIS_D0Q0S1 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S1A0 translation detector
                         AXIS_D0Q0S1 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q0S1A0_ROT
     AXIS_D0Q0S1A0_F translation detector
                       AXIS_D0Q0S1A0 1 0 0 0 0 0 . .
     AXIS_D0Q0S1A0_S translation detector
                       AXIS_D0Q0S1A0 0 1 0 0 0 0 . .
     AXIS_D0Q0S1A1_ROT rotation detector
                         AXIS_D0Q0S1 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S1A1 translation detector
                         AXIS_D0Q0S1 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q0S1A1_ROT
     AXIS_D0Q0S1A1_F translation detector
                       AXIS_D0Q0S1A1 1 0 0 0 0 0 . .
     AXIS_D0Q0S1A1_S translation detector
                       AXIS_D0Q0S1A1 0 1 0 0 0 0 . .
     AXIS_D0Q0S2_ROT rotation detector
                           AXIS_D0Q0 -0.0 -0.0 -1.0 0 0 0 . .
     AXIS_D0Q0S2 translation detector
                           AXIS_D0Q0 . . . -23.5389 -10.921625 0.0
                                      359.68548 AXIS_D0Q0S2_ROT
     AXIS_D0Q0S2A0_ROT rotation detector
                         AXIS_D0Q0S2 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S2A0 translation detector
                         AXIS_D0Q0S2 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q0S2A0_ROT
     AXIS_D0Q0S2A0_F translation detector
                         AXIS_D0Q0S2A0 1 0 0 0 0 0 . .
     AXIS_D0Q0S2A0_S translation detector
                         AXIS_D0Q0S2A0 0 1 0 0 0 0 . .
     AXIS_D0Q0S2A1_ROT rotation detector
                         AXIS_D0Q0S2 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S2A1 translation detector
                         AXIS_D0Q0S2 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q0S2A1_ROT
     AXIS_D0Q0S2A1_F translation detector
                         AXIS_D0Q0S2A1 1 0 0 0 0 0 . .
     AXIS_D0Q0S2A1_S translation detector
                         AXIS_D0Q0S2A1 0 1 0 0 0 0 . .
     AXIS_D0Q0S3_ROT rotation detector
                         AXIS_D0Q0 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q0S3 translation detector
                         AXIS_D0Q0 . . . -23.5499 -34.181125 0.0
                                    359.96513 AXIS_D0Q0S3_ROT
     AXIS_D0Q0S3A0_ROT rotation detector
                         AXIS_D0Q0S3 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S3A0 translation detector
                         AXIS_D0Q0S3 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q0S3A0_ROT
     AXIS_D0Q0S3A0_F translation detector
                         AXIS_D0Q0S3A0 1 0 0 0 0 0 . .
     AXIS_D0Q0S3A0_S translation detector
                         AXIS_D0Q0S3A0 0 1 0 0 0 0 . .
     AXIS_D0Q0S3A1_ROT rotation detector
                         AXIS_D0Q0S3 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S3A1 translation detector
                         AXIS_D0Q0S3 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q0S3A1_ROT
     AXIS_D0Q0S3A1_F translation detector
                         AXIS_D0Q0S3A1 1 0 0 0 0 0 . .
     AXIS_D0Q0S3A1_S translation detector
                         AXIS_D0Q0S3A1 0 1 0 0 0 0 . .
     AXIS_D0Q0S4_ROT rotation detector
                         AXIS_D0Q0 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q0S4 translation detector
                         AXIS_D0Q0 . . . -11.2651 24.282775 0.0
                                    270.14738 AXIS_D0Q0S4_ROT
     AXIS_D0Q0S4A0_ROT rotation detector
                         AXIS_D0Q0S4 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S4A0 translation detector
                         AXIS_D0Q0S4 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q0S4A0_ROT
     AXIS_D0Q0S4A0_F translation detector
                         AXIS_D0Q0S4A0 1 0 0 0 0 0 . .
     AXIS_D0Q0S4A0_S translation detector
                         AXIS_D0Q0S4A0 0 1 0 0 0 0 . .
     AXIS_D0Q0S4A1_ROT rotation detector
                         AXIS_D0Q0S4 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S4A1 translation detector
                         AXIS_D0Q0S4 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q0S4A1_ROT
     AXIS_D0Q0S4A1_F translation detector
                         AXIS_D0Q0S4A1 1 0 0 0 0 0 . .
     AXIS_D0Q0S4A1_S translation detector
                         AXIS_D0Q0S4A1 0 1 0 0 0 0 . .
     AXIS_D0Q0S5_ROT rotation detector
                         AXIS_D0Q0 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q0S5 translation detector
                         AXIS_D0Q0 . . . -34.7336 24.169475 0.0
                                    270.07896 AXIS_D0Q0S5_ROT
     AXIS_D0Q0S5A0_ROT rotation detector
                         AXIS_D0Q0S5 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S5A0 translation detector
                         AXIS_D0Q0S5 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q0S5A0_ROT
     AXIS_D0Q0S5A0_F translation detector
                         AXIS_D0Q0S5A0 1 0 0 0 0 0 . .
     AXIS_D0Q0S5A0_S translation detector
                         AXIS_D0Q0S5A0 0 1 0 0 0 0 . .
     AXIS_D0Q0S5A1_ROT rotation detector
                         AXIS_D0Q0S5 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S5A1 translation detector
                         AXIS_D0Q0S5 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q0S5A1_ROT
     AXIS_D0Q0S5A1_F translation detector
                         AXIS_D0Q0S5A1 1 0 0 0 0 0 . .
     AXIS_D0Q0S5A1_S translation detector
                         AXIS_D0Q0S5A1 0 1 0 0 0 0 . .
     AXIS_D0Q0S6_ROT rotation detector
                         AXIS_D0Q0 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q0S6 translation detector
                         AXIS_D0Q0 . . . 23.5488 33.320375 0.0
                                    359.78222 AXIS_D0Q0S6_ROT
     AXIS_D0Q0S6A0_ROT rotation detector
                         AXIS_D0Q0S6 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S6A0 translation detector
                         AXIS_D0Q0S6 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q0S6A0_ROT
     AXIS_D0Q0S6A0_F translation detector
                         AXIS_D0Q0S6A0 1 0 0 0 0 0 . .
     AXIS_D0Q0S6A0_S translation detector
                         AXIS_D0Q0S6A0 0 1 0 0 0 0 . .
     AXIS_D0Q0S6A1_ROT rotation detector
                         AXIS_D0Q0S6 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S6A1 translation detector
                         AXIS_D0Q0S6 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q0S6A1_ROT
     AXIS_D0Q0S6A1_F translation detector
                         AXIS_D0Q0S6A1 1 0 0 0 0 0 . .
     AXIS_D0Q0S6A1_S translation detector
                         AXIS_D0Q0S6A1 0 1 0 0 0 0 . .
     AXIS_D0Q0S7_ROT rotation detector
                         AXIS_D0Q0 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q0S7 translation detector
                         AXIS_D0Q0 . . . 23.3541 9.829875 0.0
                                    359.89604 AXIS_D0Q0S7_ROT
     AXIS_D0Q0S7A0_ROT rotation detector
                         AXIS_D0Q0S7 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S7A0 translation detector
                         AXIS_D0Q0S7 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q0S7A0_ROT
     AXIS_D0Q0S7A0_F translation detector
                         AXIS_D0Q0S7A0 1 0 0 0 0 0 . .
     AXIS_D0Q0S7A0_S translation detector
                         AXIS_D0Q0S7A0 0 1 0 0 0 0 . .
     AXIS_D0Q0S7A1_ROT rotation detector
                         AXIS_D0Q0S7 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q0S7A1 translation detector
                         AXIS_D0Q0S7 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q0S7A1_ROT
     AXIS_D0Q0S7A1_F translation detector
                         AXIS_D0Q0S7A1 1 0 0 0 0 0 . .
     AXIS_D0Q0S7A1_S translation detector
                         AXIS_D0Q0S7A1 0 1 0 0 0 0 . .
     AXIS_D0Q1_ROT rotation detector
                         AXIS_D0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1 translation detector
                         AXIS_D0 . . . 41.512521875 50.149653125 0.0
                                    0.0 AXIS_D0Q1_ROT
     AXIS_D0Q1S0_ROT rotation detector
                         AXIS_D0Q1 -0.0 -0.0 -1.0 0 0 0 . .
     AXIS_D0Q1S0 translation detector
                         AXIS_D0Q1 . . . -23.1589875 -11.451825 0.0
                                      0.27238 AXIS_D0Q1S0_ROT
     AXIS_D0Q1S0A0_ROT rotation detector
                         AXIS_D0Q1S0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S0A0 translation detector
                         AXIS_D0Q1S0 . . . -10.835 0.0 0.0
                                        0.0 AXIS_D0Q1S0A0_ROT
     AXIS_D0Q1S0A0_F translation detector
                         AXIS_D0Q1S0A0 1 0 0 0 0 0 . .
     AXIS_D0Q1S0A0_S translation detector
                         AXIS_D0Q1S0A0 0 1 0 0 0 0 . .
     AXIS_D0Q1S0A1_ROT rotation detector
                         AXIS_D0Q1S0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S0A1 translation detector
                         AXIS_D0Q1S0 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q1S0A1_ROT
     AXIS_D0Q1S0A1_F translation detector
                         AXIS_D0Q1S0A1 1 0 0 0 0 0 . .
     AXIS_D0Q1S0A1_S translation detector
                         AXIS_D0Q1S0A1 0 1 0 0 0 0 . .
     AXIS_D0Q1S1_ROT rotation detector
                         AXIS_D0Q1 -0.0 -0.0 -1.0 0 0 0 . .
     AXIS_D0Q1S1 translation detector
                         AXIS_D0Q1 . . . -23.2073875 -34.782825 0.0
                                      0.00525999986641 AXIS_D0Q1S1_ROT
     AXIS_D0Q1S1A0_ROT rotation detector
                         AXIS_D0Q1S1 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S1A0 translation detector
                         AXIS_D0Q1S1 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q1S1A0_ROT
     AXIS_D0Q1S1A0_F translation detector
                         AXIS_D0Q1S1A0 1 0 0 0 0 0 . .
     AXIS_D0Q1S1A0_S translation detector
                         AXIS_D0Q1S1A0 0 1 0 0 0 0 . .
     AXIS_D0Q1S1A1_ROT rotation detector
                         AXIS_D0Q1S1 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S1A1 translation detector
                         AXIS_D0Q1S1 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q1S1A1_ROT
     AXIS_D0Q1S1A1_F translation detector
                         AXIS_D0Q1S1A1 1 0 0 0 0 0 . .
     AXIS_D0Q1S1A1_S translation detector
                         AXIS_D0Q1S1A1 0 1 0 0 0 0 . .
     AXIS_D0Q1S2_ROT rotation detector
                         AXIS_D0Q1 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q1S2 translation detector
                         AXIS_D0Q1 . . . -10.7311875 23.286175 0.0
                                    270.02545 AXIS_D0Q1S2_ROT
     AXIS_D0Q1S2A0_ROT rotation detector
                         AXIS_D0Q1S2 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S2A0 translation detector
                         AXIS_D0Q1S2 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q1S2A0_ROT
     AXIS_D0Q1S2A0_F translation detector
                         AXIS_D0Q1S2A0 1 0 0 0 0 0 . .
     AXIS_D0Q1S2A0_S translation detector
                         AXIS_D0Q1S2A0 0 1 0 0 0 0 . .
     AXIS_D0Q1S2A1_ROT rotation detector
                         AXIS_D0Q1S2 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S2A1 translation detector
                         AXIS_D0Q1S2 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q1S2A1_ROT
     AXIS_D0Q1S2A1_F translation detector
                         AXIS_D0Q1S2A1 1 0 0 0 0 0 . .
     AXIS_D0Q1S2A1_S translation detector
                         AXIS_D0Q1S2A1 0 1 0 0 0 0 . .
     AXIS_D0Q1S3_ROT rotation detector
                         AXIS_D0Q1 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q1S3 translation detector
                         AXIS_D0Q1 . . . -34.1402875 23.344475 0.0
                                    270.03066 AXIS_D0Q1S3_ROT
     AXIS_D0Q1S3A0_ROT rotation detector
                         AXIS_D0Q1S3 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S3A0 translation detector
                         AXIS_D0Q1S3 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q1S3A0_ROT
     AXIS_D0Q1S3A0_F translation detector
                         AXIS_D0Q1S3A0 1 0 0 0 0 0 . .
     AXIS_D0Q1S3A0_S translation detector
                         AXIS_D0Q1S3A0 0 1 0 0 0 0 . .
     AXIS_D0Q1S3A1_ROT rotation detector
                         AXIS_D0Q1S3 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S3A1 translation detector
                         AXIS_D0Q1S3 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q1S3A1_ROT
     AXIS_D0Q1S3A1_F translation detector
                         AXIS_D0Q1S3A1 1 0 0 0 0 0 . .
     AXIS_D0Q1S3A1_S translation detector
                         AXIS_D0Q1S3A1 0 1 0 0 0 0 . .
     AXIS_D0Q1S4_ROT rotation detector
                         AXIS_D0Q1 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q1S4 translation detector
                         AXIS_D0Q1 . . . 24.0035125 11.407275 0.0
                                     179.96381 AXIS_D0Q1S4_ROT
     AXIS_D0Q1S4A0_ROT rotation detector
                         AXIS_D0Q1S4 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S4A0 translation detector
                         AXIS_D0Q1S4 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q1S4A0_ROT
     AXIS_D0Q1S4A0_F translation detector
                         AXIS_D0Q1S4A0 1 0 0 0 0 0 . .
     AXIS_D0Q1S4A0_S translation detector
                         AXIS_D0Q1S4A0 0 1 0 0 0 0 . .
     AXIS_D0Q1S4A1_ROT rotation detector
                         AXIS_D0Q1S4 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S4A1 translation detector
                         AXIS_D0Q1S4 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q1S4A1_ROT
     AXIS_D0Q1S4A1_F translation detector
                         AXIS_D0Q1S4A1 1 0 0 0 0 0 . .
     AXIS_D0Q1S4A1_S translation detector
                         AXIS_D0Q1S4A1 0 1 0 0 0 0 . .
     AXIS_D0Q1S5_ROT rotation detector
                         AXIS_D0Q1 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q1S5 translation detector
                         AXIS_D0Q1 . . . 24.0035125 34.876875 0.0
                                    180.02434 AXIS_D0Q1S5_ROT
     AXIS_D0Q1S5A0_ROT rotation detector
                         AXIS_D0Q1S5 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S5A0 translation detector
                         AXIS_D0Q1S5 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q1S5A0_ROT
     AXIS_D0Q1S5A0_F translation detector
                         AXIS_D0Q1S5A0 1 0 0 0 0 0 . .
     AXIS_D0Q1S5A0_S translation detector
                         AXIS_D0Q1S5A0 0 1 0 0 0 0 . .
     AXIS_D0Q1S5A1_ROT rotation detector
                         AXIS_D0Q1S5 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S5A1 translation detector
                         AXIS_D0Q1S5 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q1S5A1_ROT
     AXIS_D0Q1S5A1_F translation detector
                         AXIS_D0Q1S5A1 1 0 0 0 0 0 . .
     AXIS_D0Q1S5A1_S translation detector
                         AXIS_D0Q1S5A1 0 1 0 0 0 0 . .
     AXIS_D0Q1S6_ROT rotation detector
                         AXIS_D0Q1 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q1S6 translation detector
                         AXIS_D0Q1 . . . 33.2523125 -23.321925 0.0
                                    270.08027 AXIS_D0Q1S6_ROT
     AXIS_D0Q1S6A0_ROT rotation detector
                         AXIS_D0Q1S6 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S6A0 translation detector
                         AXIS_D0Q1S6 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q1S6A0_ROT
     AXIS_D0Q1S6A0_F translation detector
                         AXIS_D0Q1S6A0 1 0 0 0 0 0 . .
     AXIS_D0Q1S6A0_S translation detector
                         AXIS_D0Q1S6A0 0 1 0 0 0 0 . .
     AXIS_D0Q1S6A1_ROT rotation detector
                         AXIS_D0Q1S6 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S6A1 translation detector
                         AXIS_D0Q1S6 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q1S6A1_ROT
     AXIS_D0Q1S6A1_F translation detector
                         AXIS_D0Q1S6A1 1 0 0 0 0 0 . .
     AXIS_D0Q1S6A1_S translation detector
                         AXIS_D0Q1S6A1 0 1 0 0 0 0 . .
     AXIS_D0Q1S7_ROT rotation detector
                         AXIS_D0Q1 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q1S7 translation detector
                         AXIS_D0Q1 . . . 9.9785125 -23.358225 0.0
                                    270.15067 AXIS_D0Q1S7_ROT
     AXIS_D0Q1S7A0_ROT rotation detector
                         AXIS_D0Q1S7 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S7A0 translation detector
                         AXIS_D0Q1S7 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q1S7A0_ROT
     AXIS_D0Q1S7A0_F translation detector
                         AXIS_D0Q1S7A0 1 0 0 0 0 0 . .
     AXIS_D0Q1S7A0_S translation detector
                         AXIS_D0Q1S7A0 0 1 0 0 0 0 . .
     AXIS_D0Q1S7A1_ROT rotation detector
                         AXIS_D0Q1S7 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q1S7A1 translation detector
                         AXIS_D0Q1S7 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q1S7A1_ROT
     AXIS_D0Q1S7A1_F translation detector
                         AXIS_D0Q1S7A1 1 0 0 0 0 0 . .
     AXIS_D0Q1S7A1_S translation detector
                         AXIS_D0Q1S7A1 0 1 0 0 0 0 . .
     AXIS_D0Q2_ROT rotation detector
                         AXIS_D0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2 translation detector
                         AXIS_D0 . . . 49.596146875 -41.351371875 0.0
                                    0.0 AXIS_D0Q2_ROT
     AXIS_D0Q2S0_ROT rotation detector
                         AXIS_D0Q2 -0.0 -0.0 -1.0 0 0 0 . .
     AXIS_D0Q2S0 translation detector
                         AXIS_D0Q2 . . . -11.3150125 23.1242 0.0
                                     90.04803 AXIS_D0Q2S0_ROT
     AXIS_D0Q2S0A0_ROT rotation detector
                         AXIS_D0Q2S0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S0A0 translation detector
                         AXIS_D0Q2S0 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q2S0A0_ROT
     AXIS_D0Q2S0A0_F translation detector
                         AXIS_D0Q2S0A0 1 0 0 0 0 0 . .
     AXIS_D0Q2S0A0_S translation detector
                         AXIS_D0Q2S0A0 0 1 0 0 0 0 . .
     AXIS_D0Q2S0A1_ROT rotation detector
                         AXIS_D0Q2S0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S0A1 translation detector
                         AXIS_D0Q2S0 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q2S0A1_ROT
     AXIS_D0Q2S0A1_F translation detector
                         AXIS_D0Q2S0A1 1 0 0 0 0 0 . .
     AXIS_D0Q2S0A1_S translation detector
                         AXIS_D0Q2S0A1 0 1 0 0 0 0 . .
     AXIS_D0Q2S1_ROT rotation detector
                         AXIS_D0Q2 -0.0 -0.0 -1.0 0 0 0 . .
     AXIS_D0Q2S1 translation detector
                         AXIS_D0Q2 . . . -34.6999125 23.155 0.0
                                     90.00592 AXIS_D0Q2S1_ROT
     AXIS_D0Q2S1A0_ROT rotation detector
                         AXIS_D0Q2S1 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S1A0 translation detector
                         AXIS_D0Q2S1 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q2S1A0_ROT
     AXIS_D0Q2S1A0_F translation detector
                         AXIS_D0Q2S1A0 1 0 0 0 0 0 . .
     AXIS_D0Q2S1A0_S translation detector
                         AXIS_D0Q2S1A0 0 1 0 0 0 0 . .
     AXIS_D0Q2S1A1_ROT rotation detector
                         AXIS_D0Q2S1 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S1A1 translation detector
                         AXIS_D0Q2S1 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q2S1A1_ROT
     AXIS_D0Q2S1A1_F translation detector
                         AXIS_D0Q2S1A1 1 0 0 0 0 0 . .
     AXIS_D0Q2S1A1_S translation detector
                         AXIS_D0Q2S1A1 0 1 0 0 0 0 . .
     AXIS_D0Q2S2_ROT rotation detector
                         AXIS_D0Q2 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q2S2 translation detector
                         AXIS_D0Q2 . . . 23.4746875 10.7811 0.0
                                     180.11318 AXIS_D0Q2S2_ROT
     AXIS_D0Q2S2A0_ROT rotation detector
                         AXIS_D0Q2S2 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S2A0 translation detector
                         AXIS_D0Q2S2 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q2S2A0_ROT
     AXIS_D0Q2S2A0_F translation detector
                         AXIS_D0Q2S2A0 1 0 0 0 0 0 . .
     AXIS_D0Q2S2A0_S translation detector
                         AXIS_D0Q2S2A0 0 1 0 0 0 0 . .
     AXIS_D0Q2S2A1_ROT rotation detector
                         AXIS_D0Q2S2 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S2A1 translation detector
                         AXIS_D0Q2S2 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q2S2A1_ROT
     AXIS_D0Q2S2A1_F translation detector
                         AXIS_D0Q2S2A1 1 0 0 0 0 0 . .
     AXIS_D0Q2S2A1_S translation detector
                         AXIS_D0Q2S2A1 0 1 0 0 0 0 . .
     AXIS_D0Q2S3_ROT rotation detector
                         AXIS_D0Q2 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q2S3 translation detector
                         AXIS_D0Q2 . . . 23.6220875 34.2221 0.0
                                    179.92104 AXIS_D0Q2S3_ROT
     AXIS_D0Q2S3A0_ROT rotation detector
                         AXIS_D0Q2S3 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S3A0 translation detector
                         AXIS_D0Q2S3 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q2S3A0_ROT
     AXIS_D0Q2S3A0_F translation detector
                         AXIS_D0Q2S3A0 1 0 0 0 0 0 . .
     AXIS_D0Q2S3A0_S translation detector
                         AXIS_D0Q2S3A0 0 1 0 0 0 0 . .
     AXIS_D0Q2S3A1_ROT rotation detector
                         AXIS_D0Q2S3 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S3A1 translation detector
                         AXIS_D0Q2S3 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q2S3A1_ROT
     AXIS_D0Q2S3A1_F translation detector
                         AXIS_D0Q2S3A1 1 0 0 0 0 0 . .
     AXIS_D0Q2S3A1_S translation detector
                         AXIS_D0Q2S3A1 0 1 0 0 0 0 . .
     AXIS_D0Q2S4_ROT rotation detector
                         AXIS_D0Q2 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q2S4 translation detector
                         AXIS_D0Q2 . . . 11.1953875 -23.9954 0.0
                                       89.63875 AXIS_D0Q2S4_ROT
     AXIS_D0Q2S4A0_ROT rotation detector
                         AXIS_D0Q2S4 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S4A0 translation detector
                         AXIS_D0Q2S4 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q2S4A0_ROT
     AXIS_D0Q2S4A0_F translation detector
                         AXIS_D0Q2S4A0 1 0 0 0 0 0 . .
     AXIS_D0Q2S4A0_S translation detector
                         AXIS_D0Q2S4A0 0 1 0 0 0 0 . .
     AXIS_D0Q2S4A1_ROT rotation detector
                         AXIS_D0Q2S4 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S4A1 translation detector
                         AXIS_D0Q2S4 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q2S4A1_ROT
     AXIS_D0Q2S4A1_F translation detector
                         AXIS_D0Q2S4A1 1 0 0 0 0 0 . .
     AXIS_D0Q2S4A1_S translation detector
                         AXIS_D0Q2S4A1 0 1 0 0 0 0 . .
     AXIS_D0Q2S5_ROT rotation detector
                         AXIS_D0Q2 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q2S5 translation detector
                         AXIS_D0Q2 . . . 34.5494875 -24.1901 0.0
                                     89.68154 AXIS_D0Q2S5_ROT
     AXIS_D0Q2S5A0_ROT rotation detector
                         AXIS_D0Q2S5 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S5A0 translation detector
                         AXIS_D0Q2S5 . . . -10.835 0.0 0.0
                                        0.0 AXIS_D0Q2S5A0_ROT
     AXIS_D0Q2S5A0_F translation detector
                         AXIS_D0Q2S5A0 1 0 0 0 0 0 . .
     AXIS_D0Q2S5A0_S translation detector
                         AXIS_D0Q2S5A0 0 1 0 0 0 0 . .
     AXIS_D0Q2S5A1_ROT rotation detector
                         AXIS_D0Q2S5 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S5A1 translation detector
                         AXIS_D0Q2S5 . . . 10.835 0.0 0.0
                                        0.0 AXIS_D0Q2S5A1_ROT
     AXIS_D0Q2S5A1_F translation detector
                         AXIS_D0Q2S5A1 1 0 0 0 0 0 . .
     AXIS_D0Q2S5A1_S translation detector
                         AXIS_D0Q2S5A1 0 1 0 0 0 0 . .
     AXIS_D0Q2S6_ROT rotation detector
                         AXIS_D0Q2 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q2S6 translation detector
                         AXIS_D0Q2 . . . -23.4854125 -33.2552 0.0
                                    179.83473 AXIS_D0Q2S6_ROT
     AXIS_D0Q2S6A0_ROT rotation detector
                         AXIS_D0Q2S6 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S6A0 translation detector
                         AXIS_D0Q2S6 . . . -10.835 0.0 0.0
                                        0.0 AXIS_D0Q2S6A0_ROT
     AXIS_D0Q2S6A0_F translation detector
                         AXIS_D0Q2S6A0 1 0 0 0 0 0 . .
     AXIS_D0Q2S6A0_S translation detector
                         AXIS_D0Q2S6A0 0 1 0 0 0 0 . .
     AXIS_D0Q2S6A1_ROT rotation detector
                         AXIS_D0Q2S6 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S6A1 translation detector
                         AXIS_D0Q2S6 . . . 10.835 0.0 0.0
                                        0.0 AXIS_D0Q2S6A1_ROT
     AXIS_D0Q2S6A1_F translation detector
                         AXIS_D0Q2S6A1 1 0 0 0 0 0 . .
     AXIS_D0Q2S6A1_S translation detector
                         AXIS_D0Q2S6A1 0 1 0 0 0 0 . .
     AXIS_D0Q2S7_ROT rotation detector
                         AXIS_D0Q2 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q2S7 translation detector
                         AXIS_D0Q2 . . . -23.3413125 -9.8417 0.0
                                    180.092 AXIS_D0Q2S7_ROT
     AXIS_D0Q2S7A0_ROT rotation detector
                         AXIS_D0Q2S7 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S7A0 translation detector
                         AXIS_D0Q2S7 . . . -10.835 0.0 0.0
                                        0.0 AXIS_D0Q2S7A0_ROT
     AXIS_D0Q2S7A0_F translation detector
                         AXIS_D0Q2S7A0 1 0 0 0 0 0 . .
     AXIS_D0Q2S7A0_S translation detector
                         AXIS_D0Q2S7A0 0 1 0 0 0 0 . .
     AXIS_D0Q2S7A1_ROT rotation detector
                         AXIS_D0Q2S7 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q2S7A1 translation detector
                         AXIS_D0Q2S7 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q2S7A1_ROT
     AXIS_D0Q2S7A1_F translation detector
                         AXIS_D0Q2S7A1 1 0 0 0 0 0 . .
     AXIS_D0Q2S7A1_S translation detector
                         AXIS_D0Q2S7A1 0 1 0 0 0 0 . .
     AXIS_D0Q3_ROT rotation detector
                         AXIS_D0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3 translation detector
                         AXIS_D0 . . . -41.247903125 -50.441634375 0.0
                                    0.0 AXIS_D0Q3_ROT
     AXIS_D0Q3S0_ROT rotation detector
                         AXIS_D0Q3 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q3S0 translation detector
                         AXIS_D0Q3 . . . 23.1056375 11.6367625 0.0
                                    180.12436 AXIS_D0Q3S0_ROT
     AXIS_D0Q3S0A0_ROT rotation detector
                         AXIS_D0Q3S0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S0A0 translation detector
                         AXIS_D0Q3S0 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q3S0A0_ROT
     AXIS_D0Q3S0A0_F translation detector
                         AXIS_D0Q3S0A0 1 0 0 0 0 0 . .
     AXIS_D0Q3S0A0_S translation detector
                         AXIS_D0Q3S0A0 0 1 0 0 0 0 . .
     AXIS_D0Q3S0A1_ROT rotation detector
                         AXIS_D0Q3S0 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S0A1 translation detector
                         AXIS_D0Q3S0 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q3S0A1_ROT
     AXIS_D0Q3S0A1_F translation detector
                         AXIS_D0Q3S0A1 1 0 0 0 0 0 . .
     AXIS_D0Q3S0A1_S translation detector
                         AXIS_D0Q3S0A1 0 1 0 0 0 0 . .
     AXIS_D0Q3S1_ROT rotation detector
                         AXIS_D0Q3 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q3S1 translation detector
                         AXIS_D0Q3 . . . 23.1298375 34.9864625 0.0
                                    180.00263 AXIS_D0Q3S1_ROT
     AXIS_D0Q3S1A0_ROT rotation detector
                         AXIS_D0Q3S1 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S1A0 translation detector
                         AXIS_D0Q3S1 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q3S1A0_ROT
     AXIS_D0Q3S1A0_F translation detector
                         AXIS_D0Q3S1A0 1 0 0 0 0 0 . .
     AXIS_D0Q3S1A0_S translation detector
                         AXIS_D0Q3S1A0 0 1 0 0 0 0 . .
     AXIS_D0Q3S1A1_ROT rotation detector
                         AXIS_D0Q3S1 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S1A1 translation detector
                         AXIS_D0Q3S1 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q3S1A1_ROT
     AXIS_D0Q3S1A1_F translation detector
                         AXIS_D0Q3S1A1 1 0 0 0 0 0 . .
     AXIS_D0Q3S1A1_S translation detector
                         AXIS_D0Q3S1A1 0 1 0 0 0 0 . .
     AXIS_D0Q3S2_ROT rotation detector
                         AXIS_D0Q3 -0.0 -0.0 -1.0 0 0 0 . .
     AXIS_D0Q3S2 translation detector
                         AXIS_D0Q3 . . . 10.9572375 -23.5830375 0.0
                                    269.55191 AXIS_D0Q3S2_ROT
     AXIS_D0Q3S2A0_ROT rotation detector
                         AXIS_D0Q3S2 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S2A0 translation detector
                         AXIS_D0Q3S2 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q3S2A0_ROT
     AXIS_D0Q3S2A0_F translation detector
                         AXIS_D0Q3S2A0 1 0 0 0 0 0 . .
     AXIS_D0Q3S2A0_S translation detector
                         AXIS_D0Q3S2A0 0 1 0 0 0 0 . .
     AXIS_D0Q3S2A1_ROT rotation detector
                         AXIS_D0Q3S2 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S2A1 translation detector
                         AXIS_D0Q3S2 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q3S2A1_ROT
     AXIS_D0Q3S2A1_F translation detector
                         AXIS_D0Q3S2A1 1 0 0 0 0 0 . .
     AXIS_D0Q3S2A1_S translation detector
                         AXIS_D0Q3S2A1 0 1 0 0 0 0 . .
     AXIS_D0Q3S3_ROT rotation detector
                         AXIS_D0Q3 -0.0 -0.0 -1.0 0 0 0 . .
     AXIS_D0Q3S3 translation detector
                         AXIS_D0Q3 . . . 34.4180375 -23.4818375 0.0
                                    269.74206 AXIS_D0Q3S3_ROT
     AXIS_D0Q3S3A0_ROT rotation detector
                         AXIS_D0Q3S3 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S3A0 translation detector
                         AXIS_D0Q3S3 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q3S3A0_ROT
     AXIS_D0Q3S3A0_F translation detector
                         AXIS_D0Q3S3A0 1 0 0 0 0 0 . .
     AXIS_D0Q3S3A0_S translation detector
                         AXIS_D0Q3S3A0 0 1 0 0 0 0 . .
     AXIS_D0Q3S3A1_ROT rotation detector
                         AXIS_D0Q3S3 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S3A1 translation detector
                         AXIS_D0Q3S3 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q3S3A1_ROT
     AXIS_D0Q3S3A1_F translation detector
                         AXIS_D0Q3S3A1 1 0 0 0 0 0 . .
     AXIS_D0Q3S3A1_S translation detector
                         AXIS_D0Q3S3A1 0 1 0 0 0 0 . .
     AXIS_D0Q3S4_ROT rotation detector
                         AXIS_D0Q3 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q3S4 translation detector
                         AXIS_D0Q3 . . . -24.1283625 -11.5336375 0.0
                                    359.81971 AXIS_D0Q3S4_ROT
     AXIS_D0Q3S4A0_ROT rotation detector
                         AXIS_D0Q3S4 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S4A0 translation detector
                         AXIS_D0Q3S4 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q3S4A0_ROT
     AXIS_D0Q3S4A0_F translation detector
                         AXIS_D0Q3S4A0 1 0 0 0 0 0 . .
     AXIS_D0Q3S4A0_S translation detector
                         AXIS_D0Q3S4A0 0 1 0 0 0 0 . .
     AXIS_D0Q3S4A1_ROT rotation detector
                         AXIS_D0Q3S4 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S4A1 translation detector
                         AXIS_D0Q3S4 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q3S4A1_ROT
     AXIS_D0Q3S4A1_F translation detector
                         AXIS_D0Q3S4A1 1 0 0 0 0 0 . .
     AXIS_D0Q3S4A1_S translation detector
                         AXIS_D0Q3S4A1 0 1 0 0 0 0 . .
     AXIS_D0Q3S5_ROT rotation detector
                         AXIS_D0Q3 0.0 0.0 1.0 0 0 0 . .
     AXIS_D0Q3S5 translation detector
                         AXIS_D0Q3 . . . -24.1701625 -34.9548375 0.0
                                    359.99883 AXIS_D0Q3S5_ROT
     AXIS_D0Q3S5A0_ROT rotation detector
                         AXIS_D0Q3S5 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S5A0 translation detector
                         AXIS_D0Q3S5 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q3S5A0_ROT
     AXIS_D0Q3S5A0_F translation detector
                         AXIS_D0Q3S5A0 1 0 0 0 0 0 . .
     AXIS_D0Q3S5A0_S translation detector
                         AXIS_D0Q3S5A0 0 1 0 0 0 0 . .
     AXIS_D0Q3S5A1_ROT rotation detector
                         AXIS_D0Q3S5 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S5A1 translation detector
                         AXIS_D0Q3S5 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q3S5A1_ROT
     AXIS_D0Q3S5A1_F translation detector
                         AXIS_D0Q3S5A1 1 0 0 0 0 0 . .
     AXIS_D0Q3S5A1_S translation detector
                         AXIS_D0Q3S5A1 0 1 0 0 0 0 . .
     AXIS_D0Q3S6_ROT rotation detector
                         AXIS_D0Q3 -0.0 -0.0 -1.0 0 0 0 . .
     AXIS_D0Q3S6 translation detector
                         AXIS_D0Q3 . . . -33.3089625 23.4474625 0.0
                                    269.67299 AXIS_D0Q3S6_ROT
     AXIS_D0Q3S6A0_ROT rotation detector
                         AXIS_D0Q3S6 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S6A0 translation detector
                         AXIS_D0Q3S6 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q3S6A0_ROT
     AXIS_D0Q3S6A0_F translation detector
                         AXIS_D0Q3S6A0 1 0 0 0 0 0 . .
     AXIS_D0Q3S6A0_S translation detector
                         AXIS_D0Q3S6A0 0 1 0 0 0 0 . .
     AXIS_D0Q3S6A1_ROT rotation detector
                         AXIS_D0Q3S6 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S6A1 translation detector
                         AXIS_D0Q3S6 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q3S6A1_ROT
     AXIS_D0Q3S6A1_F translation detector
                         AXIS_D0Q3S6A1 1 0 0 0 0 0 . .
     AXIS_D0Q3S6A1_S translation detector
                         AXIS_D0Q3S6A1 0 1 0 0 0 0 . .
     AXIS_D0Q3S7_ROT rotation detector
                         AXIS_D0Q3 -0.0 -0.0 -1.0 0 0 0 . .
     AXIS_D0Q3S7 translation detector
                         AXIS_D0Q3 . . . -10.0032625 23.4826625 0.0
                                    269.67561 AXIS_D0Q3S7_ROT
     AXIS_D0Q3S7A0_ROT rotation detector
                         AXIS_D0Q3S7 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S7A0 translation detector
                         AXIS_D0Q3S7 . . . -10.835 0.0 0.0 0.0 AXIS_D0Q3S7A0_ROT
     AXIS_D0Q3S7A0_F translation detector
                         AXIS_D0Q3S7A0 1 0 0 0 0 0 . .
     AXIS_D0Q3S7A0_S translation detector
                         AXIS_D0Q3S7A0 0 1 0 0 0 0 . .
     AXIS_D0Q3S7A1_ROT rotation detector
                         AXIS_D0Q3S7 0.0 0.0 0.0 0 0 0 . .
     AXIS_D0Q3S7A1 translation detector
                         AXIS_D0Q3S7 . . . 10.835 0.0 0.0 0.0 AXIS_D0Q3S7A1_ROT
     AXIS_D0Q3S7A1_F translation detector
                         AXIS_D0Q3S7A1 1 0 0 0 0 0 . .
     AXIS_D0Q3S7A1_S translation detector
                         AXIS_D0Q3S7A1 0 1 0 0 0 0 . .
    
 ;
    
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _axis.depends_on DEPNAME-->
         /CBF_axis__AXISID=[]
           @depends_on="DEPNAME"
     provided the DEPNAME is in the same NeXus class instance as AXISID.
     Otherwise a full path needs to be provided.
    
     _axis.equipment EQUIP -->
         see _axis.id AXISID, below
    
     _axis.id AXISID -->
         /instrument:NXinstrument
           /CBF_diffrn_detector__DETECTORNAME:NXdetector
             /CBF_axis__AXISID=[]
     for EQUIP=="detector"
         /instrument:NXinstrument
           /CBF_diffrn_measurement__GONIOMETERNAME:NXgoniometer
             /CBF_axis__AXISID=[]
     for EQUIP=="goniometer"
         /instrument:NXinstrument
           /coordinate_system:NXcoordinate_system
             /CBF_axis__AXISID=[]
         for EQUIP=="general"
     note that @units="mm" or @units="deg" should also be specified if
     the settings array is populated

     _axis.rotation_axis ROTNAME-->
         /CBF_axis__AXISID=[]
           @rotation_axis="ROTNAME"
     provided the ROTNAME is in the same NeXus class instance as AXISID.
     Otherwise a full path needs to be provided.

     _axis.rotation_axis ROTANGLE-->
         /CBF_axis__AXISID=[]
             @rotation=ROTANGLE
             @rotation_units="deg"

     _axis.offset[1] O1-->
         /CBF_axis__AXISID=[]
             @offset=offsetxform([O1,O2,O3])
             @offset_units="mm"
    
     _axis.offset[2] O2-->
         /CBF_axis__AXISID=[]
             @offset=offsetxform([O1,O2,O3])
             @offset_units="mm"
    
     _axis.offset[3] O3-->
         /CBF_axis__AXISID=[]
           @offset=offsetxform([O1,O2,O3])
           @offset_units="mm"
    
     _axis.type TYPE-->
         /CBF_axis__AXISID=[]
           @transformation_type="TYPE"
    
     _axis.system -->
         Only a laboratory coordinate system is handled in NeXus.
         See the discussion of transformation to the McStas coordinate system
         below.
     _axis.vector[1] V1 -->
         /CBF_axis__AXISID=[]
           @vector=coordxform([V1,V2,V3])
    
     _axis.vector[2] V2 -->
         /CBF_axis__AXISID=[]
           @vector=coordxform([V1,V2,V3])
    
     _axis.vector[3] V3 -->
         /CBF_axis__AXISID=[]
           @vector=coordxform([V1,V2,V3])
    
     _axis.variant --> ??
         NeXus does not handle variants at this time
    


     Differences in Coordinate Frames
    

     The standard coordinate frame in NeXus is the McStas coordinate frame,
     in which the Z-axis points in the direction of the incident beam, the
     X-axis is orthogonal to the Z-axis in the horizontal plane and pointing
     left as seen from the source and the Y-axis points upwards.  The
     origin is in the sample.

     The standard coordinate frame in imgCIF/CBF aligns the X-axis to the
     principal goniometer axis, chooses the Z-axis to point from the sample
     into the beam.  If the beam is not orthogonal to the X-axis, the Z-axis
     is the component of the vector points into the beam orthogonal to the
     X-axis.  The Y-axis is chosen to complete a right-handed axis system.

     Let us call the NeXus coordinate axes, X_nx, Y_nx and Z_nx and the
     imgCIF/CBF coordinate axes, X_cbf, Y_cbf and $Z_cbf and the direction
     of gravity, Gravity.  In order to translate a vector v_nx = ( x, y, z)
     from the NeXus coordinate system to the imgCIF coordinate system, we
     also need two additional axes, as unit vectors, Gravity_cbf the downwards
     direction, and  Beam_cbf, the direction of the beam e.g. ( 0, 0, -1)).  

     In practice, the beam is not necessarily perfectly horizontal, so Y_nx
     is not necessarily perfectly vertical. Therefore, in order to generate
     X_nx, Y_nx and Z_nx some care is needed.  The cross product between two
     vectors a and b is a new vector c orthogonal to both a and b,
     chosen so that a, b, c is a right handed system.  If a and b are
     orthogonal unit vectors, this right-handed system is an orthonormal
     coordinate system.

     In the CBF coordinate frame, Z_nx is aligned to Beam_cbf
 
         Z_nx = Beam_cbf
    
     X_nx is defined as being horizontal at right angles to the beam,
     pointing to the left when seen from the source.  Assuming the beam is
     not vertical, we can compute X_nx as the normalized cross product of
     the  beam and the gravity:

         X_nx = (Beam_cbf x Gravity_cbf)/||Beam_cbf x Gravity_cbf||

     To see that this satisfies the constraint of being horizontal and
     pointing to the left, consider the case of Beam = ( 0, 0, -1 )
     and Gravity = ( 0, 0, 1 ) then we would have X_nx = ( 1, 0, 0 )
     from the cross product above.  The normalization is only necessary
     if the beam is not horizontal.

     Finally Y_nx is computed as the cross product of the beam and X_nx,
     completing an orthonormal right-handed system with Y_nx pointing upwards

         Y_nx = Beam_cbf x X_nx

     Then we know that in the imgCIF/CBF coordinate frame
    
         v_nx = X.X_nx + Y.Y_nx + Z.Z_nx

     Thus, given the imgCIF/CBF vectors for the true direction of the beam
     and the true direction of gravity, we have a linear transformation from
     the NeXus coordinate frame to the imgCIF/CBF coordinate frame.   The
     origins of the two frames agree.   The inverse linear transformation will
     transform a vector in the imgCIF/CBF coordinate frame into the NeXus
     coordinate frame.

     In the common case in which the beam is orthogonal to the principal
     goniometer axis so that Beam_cbf = ( 0, 0, -1 ) and the imgCIF/CBF
     Y-axis points upwards, the transformation inverts the X and Z axes.
     In the other common case in which the beam is orthogonal to the
     principal goniometer axis and the imgCIF/CBF Y-axis points
     downwards, the transformation inverts the Y and Z axes.
                                          
     mapping Axes

     There are two transformations needed:  coordxform(v) which takes a vector,
     v, the the CBF imgCIF Standard Laboratory Coordinate System and returns the
     equivalent McStas coordinate vector, and offsetxform(o) which takes an
     offset, o, in the the CBF imgCIF Standard Laboratory Coordinate System and
     returns the equivalent NeXus offset.  As of this writing, it has not
     been decided as to whether the NeXus offset should also be relative
     (in which case offsetxform = coordxform) or whether the NeXus offset should
     be absolute.

     In imgCIF/CBF all the information about all axes other than their
     settings are gathered in one AXIS category.  The closest equivalent
     container in NeXus is the NXinstrument class.  We put the information
     about detector axes into an detector:NXdetector NeXus class instance,
     information about the goniometer into an goniometer:NXgoniometer NeXus
     class instance, etc.  Additionally, in view of the general nature of
     some axes, such as the coordinate frame axes and gravity, we add a
     coordinate_system:NXcoordinate_system NeXus class instance with
     axis__gravity, axis__beam and other axes not tied to specific equipment.

     We have applied the coordinate frame transformation changing
     the CBF laboratory coordinates into McStas coordinates.  Notice that X and
     Z have changed direction, but Y has not.   In other experimental setup,
     other transformations may occur.   The offsets for dependent axes are
     given relative to the total offset of axes on which that axis is dependent.
     Note that the axis settings do not enter into this calculation, because the
     offsets of dependent axes are given with all axes at their zero settings


     The cbf_location attribute gives a mapping back into the CBF AXIS category
     in dotted notation.  The first component is the data block.  The second
     component is "axis".  The third component is either "vector" or
     "offset"  for information drawn from the AXIS.VECTOR[...] or
     AXIS.OFFSET[...] respectively.  The last component is the CBF row number
     to facilitate recovering the original CBF layout.


 ;
     save_


 save__axis.depends_on
     _item_description.description
 ;             The value of _axis.depends_on specifies the next outermost
               axis upon which this axis depends, unless
               _axis.rotation_axis is
               specified, in which case, _axis.rotation_axis is
               next outermost and _axis.depends_on is second
               outermost.

               This item is a pointer to _axis.id in the same category.
 ;
     _item.name                      '_axis.depends_on'
     _item.category_id                 AXIS
     _item.mandatory_code              no

      save_


 save__axis.equipment
     _item_description.description
 ;             The value of  _axis.equipment specifies the type of
               equipment using the axis:  'goniometer', 'detector',
               'gravity', 'source' or 'general'.
 ;
     _item.name                      '_axis.equipment'
     _item.category_id                 AXIS
     _item.mandatory_code              implicit
     _item_type.code                   ucode
     _item_default.value               general
      loop_
     _item_enumeration.value
     _item_enumeration.detail   goniometer
                               'equipment used to orient or position samples'
                                detector
                               'equipment used to detect reflections'
                                general
                               'equipment used for general purposes'
                                gravity
                               'axis specifying the downward direction'
                                source
                               'axis specifying the direction sample to source'

      save_


 save__axis.offset[1]
     _item_description.description
 ;              The [1] element of the three-element vector used to specify
                the offset to the base of a rotation or translation axis.

                The vector is specified in millimetres.
 ;
     _item.name                  '_axis.offset[1]'
     _item.category_id             AXIS
     _item.mandatory_code          no
     _item_default.value           0.0
     _item_sub_category.id         vector
     _item_type.code               float
     _item_units.code              millimetres
      save_


 save__axis.offset[2]
     _item_description.description
 ;              The [2] element of the three-element vector used to specify
                the offset to the base of a rotation or translation axis.

                The vector is specified in millimetres.
 ;
     _item.name                  '_axis.offset[2]'
     _item.category_id             AXIS
     _item.mandatory_code          no
     _item_default.value           0.0
     _item_sub_category.id         vector
     _item_type.code               float
     _item_units.code              millimetres
      save_


 save__axis.offset[3]
     _item_description.description
 ;              The [3] element of the three-element vector used to specify
                the offset to the base of a rotation or translation axis.

                The vector is specified in millimetres.
 ;
     _item.name                  '_axis.offset[3]'
     _item.category_id             AXIS
     _item.mandatory_code          no
     _item_default.value           0.0
     _item_sub_category.id         vector
     _item_type.code               float
     _item_units.code              millimetres
      save_


 save__axis.id
     _item_description.description
 ;             The value of _axis.id must uniquely identify
               each axis relevant to the experiment.  Note that multiple
               pieces of equipment may share the same axis (e.g. a twotheta
               arm), so the category key for AXIS also includes the
               equipment.
 ;
     loop_
     _item.name
     _item.category_id
     _item.mandatory_code
          '_axis.id'                         AXIS                    yes
          '_array_structure_list_axis.axis_id'
                                             ARRAY_STRUCTURE_LIST_AXIS
                                                                     yes
          '_diffrn_detector_axis.axis_id'    DIFFRN_DETECTOR_AXIS    yes
          '_diffrn_measurement_axis.axis_id' DIFFRN_MEASUREMENT_AXIS yes
          '_diffrn_scan_axis.axis_id'        DIFFRN_SCAN_AXIS        yes
          '_diffrn_scan_frame_axis.axis_id'  DIFFRN_SCAN_FRAME_AXIS  yes

     _item_type.code               code
      loop_
     _item_linked.child_name
     _item_linked.parent_name
          '_axis.depends_on'                   '_axis.id'
          '_array_structure_list_axis.axis_id' '_axis.id'
          '_diffrn_detector_axis.axis_id'      '_axis.id'
          '_diffrn_measurement_axis.axis_id'   '_axis.id'
          '_diffrn_scan_axis.axis_id'          '_axis.id'
          '_diffrn_scan_frame_axis.axis_id'    '_axis.id'

      save_
    
 save__axis.rotation
     _item_description.description
 ;             The value of _axis.rotation specifies
               the fixed base rotation angle for _axis.rotation_axis
               to which the value of any frame-by-frame setting, if any, should
               be added.  Normally, ony the fixed value would be given.

     ;
     _item.name                      '_axis.depends_on'
     _item.category_id                 AXIS
     _item.mandatory_code              no
     _item_default.value               0.0
     _item_type.code                   float
     _item_units.code                  degrees
    
     save_

 save__axis.rotation_axis
     _item_description.description
 ;             The value of _axis.rotation_axis specifies
               and optional addtional dependency for this axis to be applied
               after applying _axis.depends_on.
    
               This item is a pointer to _axis.id in the same category.
 ;
     _item.name                      '_axis.depends_on'
     _item.category_id                 AXIS
     _item.mandatory_code              no
    
     save_


 save__axis.system
     _item_description.description
 ;             The value of  _axis.system specifies the coordinate
               system used to define the axis: 'laboratory', 'direct',
               'orthogonal', 'reciprocal' or 'abstract'.
 ;
     _item.name                      '_axis.system'
     _item.category_id                 AXIS
     _item.mandatory_code              no
     _item_type.code                   ucode
     _item_default.value               laboratory
      loop_
     _item_enumeration.value
     _item_enumeration.detail  

 laboratory
 ;  the axis is referenced to the imgCIF standard laboratory Cartesian
    coordinate system
 ;

 direct
 ;  the axis is referenced to the direct lattice
 ;

 orthogonal
 ;  the axis is referenced to the cell Cartesian orthogonal coordinates
 ;

 reciprocal
 ;  the axis is referenced to the reciprocal lattice
 ;

 abstract
 ;  the axis is referenced to abstract Cartesian cooridinate system
 ;

      save_


 save__axis.type
     _item_description.description
 ;             The value of _axis.type specifies the type of
               axis:  'rotation' or 'translation' (or 'general' when
               the type is not relevant, as for gravity).
 ;
     _item.name                      '_axis.type'
     _item.category_id                 AXIS
     _item.mandatory_code              no
     _item_type.code                   ucode
     _item_default.value               general
      loop_
     _item_enumeration.value
     _item_enumeration.detail      rotation
                                  'right-handed axis of rotation'
                                   translation
                                  'translation in the direction of the axis'
                                   general
                                  'axis for which the type is not relevant'

      save_


 save__axis.vector[1]
     _item_description.description
 ;              The [1] element of the three-element vector used to specify
                the direction of a rotation or translation axis.
                The vector should be normalized to be a unit vector and
                is dimensionless.
 ;
     _item.name                  '_axis.vector[1]'
     _item.category_id             AXIS
     _item.mandatory_code          no
     _item_default.value           0.0
     _item_sub_category.id         vector
     _item_type.code               float
      save_

 save__axis.vector[2]
     _item_description.description
 ;              The [2] element of the three-element vector used to specify
                the direction of a rotation or translation axis.
                The vector should be normalized to be a unit vector and
                is dimensionless.
 ;
     _item.name                  '_axis.vector[2]'
     _item.category_id             AXIS
     _item.mandatory_code          no
     _item_default.value           0.0
     _item_sub_category.id         vector
     _item_type.code               float
      save_

 save__axis.vector[3]
     _item_description.description
 ;              The [3] element of the three-element vector used to specify
                the direction of a rotation or translation axis.
                The vector should be normalized to be a unit vector and
                is dimensionless.
 ;
     _item.name                  '_axis.vector[3]'
     _item.category_id             AXIS
     _item.mandatory_code          no
     _item_default.value           0.0
     _item_sub_category.id         vector
     _item_type.code               float
      save_

 save__axis.variant
     _item_description.description
 ;             The value of _axis.variant gives the variant
               to which the given AXIS row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_axis.variant'
     _item.category_id             AXIS
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 #####################
 # DIFFRN_DATA_FRAME #
 #####################


 save_DIFFRN_DATA_FRAME
     _category.description
 ;             Data items in the DIFFRN_DATA_FRAME category record
               the details about each frame of data.

               The items in this category were previously in a
               DIFFRN_FRAME_DATA category, which is now deprecated.
               The items from the old category are provided
               as aliases but should not be used for new work.
 ;
     _category.id                   DIFFRN_DATA_FRAME
     _category.mandatory_code       no
      loop_
     _category_key.name             '_diffrn_data_frame.id'
                                    '_diffrn_data_frame.detector_element_id'
                                    '_diffrn_data_frame.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
                                    'diffrn_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 - A frame containing data from 4 frame elements.
                 Each frame element has a common array configuration
                 'array_1' described in ARRAY_STRUCTURE and related
                 categories.  The data for each detector element are
                 stored in four groups of binary data in the
                 ARRAY_DATA category, linked by the array_id and
                 binary_id.
 ;
 ;
         loop_
         _diffrn_data_frame.id
         _diffrn_data_frame.detector_element_id
         _diffrn_data_frame.array_id
         _diffrn_data_frame.binary_id
         frame_1   d1_ccd_1  array_1  1
         frame_1   d1_ccd_2  array_1  2
         frame_1   d1_ccd_3  array_1  3
         frame_1   d1_ccd_4  array_1  4
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _diffrn_data_frame.array_id ARRAYID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_data_frame__section_id=SECTIONIDARRAY
     inserts either ARRAYID (if not SECTIONID is specified or the SECTIONID
     into the element of SECTIONIDARRY for this frame and for this detector element (see below)
    
     _diffrn_data_frame.array_section_id SECTIONID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_data_frame__section_id=SECTIONIDARRAY
     inserts either ARRAYID (if not SECTIONID is specified or the SECTIONID
     into the element of SECTIONIDARRY for this frame and for this detector element (see below)
    
     _diffrn_data_frame.binary_id BINID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_data_frame__binary_id=BINARYIDARRAY
     inserts BINID
     into the element of BINARYIDARRAY for this frame and for this detector element (see below)
    
     _diffrn_data_frame.center_fast CENF-->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_data_frame__center_fast_slow=CENTERARRAY
     inserts CENF
     into the element of CENTERARRAY for this frame, for this detector element
     and for the fast center (see below)
    
     _diffrn_data_frame.center_slow CENS -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_data_frame__center_fast_slow=CENTERARRAY
     inserts CENS
     into element of CENTERARRAY for this frame, for this detector element
     and for the slow center (see below)
    
     _diffrn_data_frame.center_units UNITS -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_data_frame__center_fast_slow=CENTERARRAY
           @units="UNITS"
     only one unit is provided.  If there is variation, the values in
     CENTERARRAY should be rescaled to uniform units.
    
     _diffrn_data_frame.detector_element_id ELEMENTID -->
     used to index into the arrays of this category by the ordinal of
     the matching ELEMENTID in DIFFRN_DETECTOR_ELEMENT__id for the fast index
    
     _diffrn_data_frame.id FRAMEID -->
     used to index into the arrays of this category by the ordinal of
     the matching ELEMENTID in DIFFRN_DETECTOR_ELEMENT__id for the slow index
     by matching FRAMEID against _diffrn_scan_frame.frame_id and using
     _diffrn_scan_frame.frame_number from the same row.
    
     _diffrn_data_frame.details DETAILS -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_data_frame__details=DETAILSARRAY
     inserts DETAILS
     into the element of DETAILSARRAY for this frame and for this detector element (see below)
    
     _diffrn_data_frame.variant --> ??
         NeXus does not handle variants at this time
    
          
    
     The arrays created in the mapping have a slow index of the number of frames
     and a fast index of the number of detector elements.  There is a middle index
     for CENTERARRAY in the order fast and then slow.

 ;
     save_


 save__diffrn_data_frame.array_id
     _item_description.description
 ;             This item is a pointer to _array_structure.id in the
               ARRAY_STRUCTURE category.
 ;
     _item.name                  '_diffrn_data_frame.array_id'
     _item.category_id             DIFFRN_DATA_FRAME
     _item.mandatory_code          implicit
     _item_aliases.alias_name    '_diffrn_frame_data.array_id'
     _item_aliases.dictionary      cif_img.dic
     _item_aliases.version         1.0
     _item_type.code               code
      save_


 save__diffrn_data_frame.array_section_id
     _item_description.description
 ;             This item is a pointer to _array_structure_list_section.id
               in the ARRAY_STRUCTURE_LIST_SECTION category.
 ;
     _item.name                  '_diffrn_data_frame.array_section_id'
     _item.category_id             DIFFRN_DATA_FRAME
     _item.mandatory_code          implicit
     _item_type.code               code
      save_

 save__diffrn_data_frame.binary_id
     _item_description.description
 ;             This item is a pointer to _array_data.binary_id in the
               ARRAY_DATA category.
 ;
     _item.name                  '_diffrn_data_frame.binary_id'
     _item.category_id             DIFFRN_DATA_FRAME
     _item.mandatory_code          implicit
     _item_aliases.alias_name    '_diffrn_frame_data.binary_id'
     _item_aliases.dictionary      cif_img.dic
     _item_aliases.version         1.0
     _item_type.code               int
      save_


 save__diffrn_data_frame.center_fast
      _item_description.description
 ;             The value of _diffrn_data_frame.center_fast is
               the fast index axis beam center position relative to the detector
               element face in the units specified in the data item
               '_diffrn_data_frame.center_units' along the fast
               axis of the detector from the center of the first pixel to
               the point at which the Z-axis (which should be colinear with the
               beam) intersects the face of the detector, if in fact is does.
               At the time of the measurement the current setting of detector
               positioner given frame are used.

               It is important to note that for measurements in millimetres,
               the sense of the axis is used, rather than the sign of the
               pixel-to-pixel increments.

 ;
      _item.name '_diffrn_data_frame.center_fast'
      _item.category_id             DIFFRN_DATA_FRAME
      _item.mandatory_code          no
      _item_type.code               float

      save_


 save__diffrn_data_frame.center_slow
      _item_description.description
 ;             The value of _diffrn_data_frame.center_slow is
               the slow index axis beam center position relative to the detector
               element face in the units specified in the data item
               '_diffrn_data_frame.center_units' along the slow
               axis of the detector from the center of the first pixel to
               the point at which the Z-axis (which should be colinear with the
               beam) intersects the face of the detector, if in fact is does.
               At the time of the measurement the current setting of detector
               positioner given frame are used.

               It is important to note that the sense of the axis is used,
               rather than the sign of the pixel-to-pixel increments.

 ;
      _item.name '_diffrn_data_frame.center_slow'
      _item.category_id             DIFFRN_DATA_FRAME
      _item.mandatory_code          no
      _item_type.code               float

      save_


 save__diffrn_data_frame.center_units
      _item_description.description
 ;             The value of _diffrn_data_frame.center_units
               specifies the units in which the values of
               '_diffrn_data_frame.center_fast' and
               '_diffrn_data_frame.center_slow'
               are presented.  The default is 'mm' for millimetres.  The
               alternatives are 'pixels' and 'bins'.  In all cases the
               center distances are measured from the center of the
               first pixel, i.e. in a 2x2 binning, the measuring origin
               is offset from the centers of the bins by one half pixel
               towards the first pixel.
              
               If 'bins' is specified, the data in
                   '_array_intensities.pixel_fast_bin_size',
                   '_array_intensities.pixel_slow_bin_size', and
                   '_array_intensities.pixel_binning_method'
               is used to define the binning scheme.


 ;
      _item.name '_diffrn_data_frame.center_units'
      _item.category_id             DIFFRN_DATA_FRAME
      _item.mandatory_code          no
      _item_type.code               code
       loop_
      _item_enumeration.value
      _item_enumeration.detail
                                    mm        'millimetres'
                                    pixels    'detector pixels'
                                    bins      'detector bins'

      save_




 save__diffrn_data_frame.detector_element_id
     _item_description.description
 ;              This item is a pointer to _diffrn_detector_element.id
                in the DIFFRN_DETECTOR_ELEMENT category.
 ;
     _item.name                  '_diffrn_data_frame.detector_element_id'
     _item.category_id             DIFFRN_DATA_FRAME
     _item.mandatory_code          yes
     _item_aliases.alias_name    '_diffrn_frame_data.detector_element_id'
     _item_aliases.dictionary      cif_img.dic
     _item_aliases.version         1.0
     _item_type.code               code
      save_


 save__diffrn_data_frame.id
     _item_description.description
 ;             The value of _diffrn_data_frame.id must uniquely identify
               each complete frame of data.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
            '_diffrn_data_frame.id'        DIFFRN_DATA_FRAME  yes
            '_diffrn_refln.frame_id'       DIFFRN_REFLN       yes
            '_diffrn_scan.frame_id_start'  DIFFRN_SCAN        yes
            '_diffrn_scan.frame_id_end'    DIFFRN_SCAN        yes
            '_diffrn_scan_frame.frame_id'  DIFFRN_SCAN_FRAME  yes
            '_diffrn_scan_frame_axis.frame_id'
                                           DIFFRN_SCAN_FRAME_AXIS
                                                              yes
            '_diffrn_scan_frame_monitor.frame_id'
                                           DIFFRN_SCAN_FRAME_MONITOR
                                                              implicit
     _item_aliases.alias_name    '_diffrn_frame_data.id'
     _item_aliases.dictionary      cif_img.dic
     _item_aliases.version         1.0
     _item_type.code               code
      loop_
     _item_linked.child_name
     _item_linked.parent_name
            '_diffrn_refln.frame_id'        '_diffrn_data_frame.id'
            '_diffrn_scan.frame_id_start'   '_diffrn_data_frame.id'
            '_diffrn_scan.frame_id_end'     '_diffrn_data_frame.id'
            '_diffrn_scan_frame.frame_id'   '_diffrn_data_frame.id'
            '_diffrn_scan_frame_axis.frame_id'
                                            '_diffrn_data_frame.id'
            '_diffrn_scan_frame_monitor.frame_id'
                                            '_diffrn_data_frame.id'
      save_


 save__diffrn_data_frame.details
      _item_description.description
 ;              The value of _diffrn_data_frame.details should give a
                description of special aspects of each frame of data.

                This is an appropriate location in which to record
                information from vendor headers as presented in those
                headers, but it should never be used as a substitute
                for providing the fully parsed information within
                the appropriate imgCIF/CBF categories.
               
                Normally, when a conversion from a miniCBF has been done
                the data from '_array_data.header_convention'
                should be transferred to this data item and
                '_array_data.header_convention'
                should be removed.
 ;
     _item.name                  '_diffrn_data_frame.details'
     _item.category_id             DIFFRN_DATA_FRAME
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_frame_data.details'
     _item_aliases.dictionary      cif_img.dic
     _item_aliases.version         1.4
     _item_type.code               text
      loop_
     _item_examples.case
     _item_examples.detail
 ;
  HEADER_BYTES = 512;
  DIM = 2;
  BYTE_ORDER = big_endian;
  TYPE = unsigned_short;
  SIZE1 = 3072;
  SIZE2 = 3072;
  PIXEL_SIZE = 0.102588;
  BIN = 2x2;
  DETECTOR_SN = 901;
  TIME = 29.945155;
  DISTANCE = 200.000000;
  PHI = 85.000000;
  OSC_START = 85.000000;
  OSC_RANGE = 1.000000;
  WAVELENGTH = 0.979381;
  BEAM_CENTER_X = 157.500000;
  BEAM_CENTER_Y = 157.500000;
  PIXEL SIZE = 0.102588;
  OSCILLATION RANGE = 1;
  EXPOSURE TIME = 29.9452;
  TWO THETA = 0;
  BEAM CENTRE = 157.5 157.5;
 ;
 ;               Example of header information extracted from an ADSC Quantum
                 315 detector header by CBFlib_0.7.6.  Image provided by Chris
                 Nielsen of ADSC from a data collection at SSRL beamline 1-5.
 ;
       save_

 save__diffrn_data_frame.variant
     _item_description.description
 ;             The value of _diffrn_data_frame.variant gives the variant
               to which the given DIFFRN_DATA_FRAME row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_data_frame.variant'
     _item.category_id             DIFFRN_DATA_FRAME
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 ##########################################################################
 #  The following is a restatement of the mmCIF DIFFRN_DETECTOR,          #
 #  DIFFRN_MEASUREMENT and DIFFRN_RADIATION categories, modified for      #
 #  the CBF/imgCIF extensions                                             #
 ##########################################################################

 ###################
 # DIFFRN_DETECTOR #
 ###################


 save_DIFFRN_DETECTOR
     _category.description
 ;              Data items in the DIFFRN_DETECTOR category describe the
                detector used to measure the scattered radiation, including
                any analyser and post-sample collimation.
 ;
     _category.id                  DIFFRN_DETECTOR
     _category.mandatory_code      no
      loop_
     _category_key.name          '_diffrn_detector.diffrn_id'
                                 '_diffrn_detector.id'
                                 '_diffrn_detector.variant'
      loop_
     _category_group.id           'inclusive_group'
                                  'diffrn_group'
      loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 - based on PDB entry 5HVP and laboratory records for the
                 structure corresponding to PDB entry 5HVP.
 ;
 ;
     _diffrn_detector.diffrn_id             'd1'
     _diffrn_detector.detector              'multiwire'
     _diffrn_detector.type                  'Siemens'
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _diffrn_detector.diffrn_id DIFFRNID -->
     /CBF_diffrn_scan__SCANID:NXentry
       /CBF_diffrn_id="DIFFRNID"
    
    
     _diffrn_detector.id DETECTORNAME -->
     /instrument:NXinstrument/CBF_diffrn_detector__DETECTORNAME:NXdetector
    
     _diffrn_detector.details -->
     /instrument:NXinstrument/CBF_diffrn_detector__DETECTORNAME:NXdetector/details
    
     _diffrn_detector.detector -->
     /instrument:NXinstrument/CBF_diffrn_detector__DETECTORNAME:NXdetector/type
    
     _diffrn_detector.dtime -->
     /instrument:NXinstrument/CBF_diffrn_detector__DETECTORNAME:NXdetector/deadtime
    
     _diffrn_detector.number_of_axes -->
     /instrument:NXinstrument/CBF_diffrn_detector__DETECTORNAME:NXdetector/number_of_axes
    
     _diffrn_detector.type -->
     /instrument:NXinstrument/CBF_diffrn_detector__DETECTORNAME:NXdectector/description
    
     _diffrn_detector.variant --> ??
         NeXus does not handle variants at this time
    
 ;
      save_


 save__diffrn_detector.details
     _item_description.description
 ;              A description of special aspects of the radiation detector.
 ;
     _item.name                  '_diffrn_detector.details'
     _item.category_id             DIFFRN_DETECTOR
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_detector_details'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code                   text
     _item_examples.case        'slow mode'
      save_


 save__diffrn_detector.detector
     _item_description.description
 ;              The general class of the radiation detector.
 ;
     _item.name                  '_diffrn_detector.detector'
     _item.category_id             DIFFRN_DETECTOR
     _item.mandatory_code          no
      loop_
     _item_aliases.alias_name
     _item_aliases.dictionary
     _item_aliases.version       '_diffrn_radiation_detector'
                                   cifdic.c91
                                   1.0
                                 '_diffrn_detector'
                                   cif_core.dic
                                   2.0
     _item_type.code               text
      loop_
     _item_examples.case          'photographic film'
                                  'scintillation counter'
                                  'CCD plate'
                                  'BF~3~ counter'
      save_


 save__diffrn_detector.diffrn_id
     _item_description.description
 ;              This data item is a pointer to _diffrn.id in the DIFFRN
                category.

                The value of _diffrn.id uniquely defines a set of
                diffraction data.
 ;
     _item.name                  '_diffrn_detector.diffrn_id'
     _item.category_id             DIFFRN_DETECTOR
     _item.mandatory_code          yes
     _item_type.code               code
      save_


 save__diffrn_detector.dtime
     _item_description.description
 ;              The deadtime in microseconds of the detector(s) used to
                measure the diffraction intensities.
 ;
     _item.name                  '_diffrn_detector.dtime'
     _item.category_id             DIFFRN_DETECTOR
     _item.mandatory_code          no
      loop_
     _item_aliases.alias_name
     _item_aliases.dictionary
     _item_aliases.version       '_diffrn_radiation_detector_dtime'
                                   cifdic.c91
                                   1.0
                                 '_diffrn_detector_dtime'
                                   cif_core.dic
                                   2.0
      loop_
     _item_range.maximum
     _item_range.minimum            .    0.0
                                   0.0   0.0
     _item_type.code               float
     _item_units.code              microseconds
      save_


 save__diffrn_detector.id
     _item_description.description
 ;              The value of _diffrn_detector.id must uniquely identify
                each detector used to collect each diffraction data set.

                If the value of _diffrn_detector.id is not given, it is
                implicitly equal to the value of
                _diffrn_detector.diffrn_id.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
              '_diffrn_detector.id'         DIFFRN_DETECTOR       implicit
              '_diffrn_detector_axis.detector_id'
                                            DIFFRN_DETECTOR_AXIS       yes
              '_diffrn_scan_frame_monitor.detector_id'
                                            DIFFRN_SCAN_FRAME_MONITOR  yes
      loop_
     _item_linked.child_name
     _item_linked.parent_name
              '_diffrn_detector_axis.detector_id'
                                          '_diffrn_detector.id'
              '_diffrn_scan_frame_monitor.detector_id'
                                          '_diffrn_detector.id'

     _item_type.code               code
      save_


 save__diffrn_detector.layer_thickness
     _item_description.description
     ;            The thickness in mm of the sensing layer of the detector
                  for use in anglular corrections.
     ;
     _item.name                  '_diffrn_detector.layer_thickness'
     _item.category_id             DIFFRN_DETECTOR
     _item.mandatory_code          no
     loop_
     _item_range.maximum
     _item_range.minimum            .    0.0
                                   0.0   0.0
     _item_type.code               float
     _item_units.code              millimetres
     save_


 save__diffrn_detector.number_of_axes
     _item_description.description
 ;              The value of _diffrn_detector.number_of_axes gives the
                number of axes of the positioner for the detector identified
                by _diffrn_detector.id.

                The word 'positioner' is a general term used in
                instrumentation design for devices that are used to change
                the positions of portions of apparatus by linear
                translation, rotation or combinations of such motions.

                Axes which are used to provide a coordinate system for the
                face of an area detetctor should not be counted for this
                data item.

                The description of each axis should be provided by entries
                in DIFFRN_DETECTOR_AXIS.
 ;
     _item.name                  '_diffrn_detector.number_of_axes'
     _item.category_id             DIFFRN_DETECTOR
     _item.mandatory_code          no
      loop_
     _item_range.maximum
     _item_range.minimum           .   1
                                   1   1
     _item_type.code               int
      save_



 save__diffrn_detector.type
     _item_description.description
 ;              The make, model or name of the detector device used.
 ;
     _item.name                  '_diffrn_detector.type'
     _item.category_id             DIFFRN_DETECTOR
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_detector_type'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               text
      save_

 save__diffrn_detector.variant
     _item_description.description
 ;             The value of _diffrn_detector.variant gives the variant
               to which the given DIFFRN_DETECTOR row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_detector.variant'
     _item.category_id             DIFFRN_DETECTOR
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 ########################
 # DIFFRN_DETECTOR_AXIS #
 ########################


 save_diffrn_detector_axis
     _category.description
 ;    Data items in the DIFFRN_DETECTOR_AXIS category associate
      axes with detectors.
 ;
     _category.id                   DIFFRN_DETECTOR_AXIS
     _category.mandatory_code       no
      loop_
     _category_key.name          '_diffrn_detector_axis.detector_id'
                                 '_diffrn_detector_axis.axis_id'
                                 '_diffrn_detector_axis.variant'
      loop_
     _category_group.id           'inclusive_group'
                                  'diffrn_group'
     _category.NX_mapping_details
 ;
    
     _diffrn_detector_axis.axis_id AXISID -->
         /instrument:NXinstrument
           /CBF_diffrn_detector__DETECTORNAME:NXdetector
             /CBF_axis__AXISID=[]
    
     _diffrn_detector_axis.detector_id DETECTORNAME -->
         /instrument:NXinstrument
           /CBF_diffrn_detector__DETECTORNAME:NXdetector
    
     _diffrn_detector_axis.variant --> ??
         NeXus does not handle variants at this time
    
      

 This information normally will duplicate information obtained from
 the ARRAY_STRUCTURE_LIST_AXIS.

 ;
      save_


 save__diffrn_detector_axis.axis_id
     _item_description.description
 ;              This data item is a pointer to _axis.id in
                the AXIS category.
 ;
     _item.name                  '_diffrn_detector_axis.axis_id'
     _item.category_id             DIFFRN_DETECTOR_AXIS
     _item.mandatory_code          yes
     _item_type.code               code
      save_


 save__diffrn_detector_axis.detector_id
     _item_description.description
 ;              This data item is a pointer to _diffrn_detector.id in
                the DIFFRN_DETECTOR category.

                This item was previously named _diffrn_detector_axis.id
                which is now a deprecated name.  The old name is
                provided as an alias but should not be used for new work.
 ;
     _item.name                  '_diffrn_detector_axis.detector_id'
     _item.category_id             DIFFRN_DETECTOR_AXIS
     _item.mandatory_code          yes
     _item_aliases.alias_name    '_diffrn_detector_axis.id'
     _item_aliases.dictionary      cif_img.dic
     _item_aliases.version         1.0
     _item_type.code               code
      save_
     
 save__diffrn_detector_axis.variant
     _item_description.description
 ;             The value of _diffrn_detector_axis.variant gives the variant
               to which the given DIFFRN_DETECTOR_AXIS row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_detector_axis.variant'
     _item.category_id             DIFFRN_DETECTOR_AXIS
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 ###########################
 # DIFFRN_DETECTOR_ELEMENT #
 ###########################


 save_diffrn_detector_element
     _category.description
 ;             Data items in the DIFFRN_DETECTOR_ELEMENT category record
               the details about spatial layout and other characteristics
               of each element of a detector which may have multiple elements.

               In most cases, giving more detailed information
               in ARRAY_STRUCTURE_LIST and ARRAY_STRUCTURE_LIST_AXIS
               is preferable to simply providing the centre of the
               detector element.
 ;
     _category.id                   DIFFRN_DETECTOR_ELEMENT
     _category.mandatory_code       no
      loop_
     _category_key.name             '_diffrn_detector_element.id'
                                    '_diffrn_detector_element.detector_id'
                                    '_diffrn_detector_element.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
                                    'diffrn_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;       Example 1 - Detector d1 is composed of four CCD detector elements,
         each 200 mm by 200 mm, arranged in a square, in the pattern

                    1     2
                       *
                    3     4

         Note that the beam centre is slightly displaced from each of the
         detector elements, just beyond the lower right corner of 1,
         the lower left corner of 2, the upper right corner of 3 and
         the upper left corner of 4.  For each element, the detector
         face coordiate system, is assumed to have the fast axis
         running from left to right and the slow axis running from
         top to bottom with the origin at the top left corner.
 ;
 ;
         loop_
         _diffrn_detector_element.detector_id
         _diffrn_detector_element.id
         _diffrn_detector_element.reference_center_fast
         _diffrn_detector_element.reference_center_slow
         _diffrn_detector_element.reference_center_units
         d1     d1_ccd_1  201.5 201.5  mm
         d1     d1_ccd_2  -1.8  201.5  mm
         d1     d1_ccd_3  201.6  -1.4  mm
         d1     d1_ccd_4  -1.7   -1.5  mm
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _diffrn_detector_element.id ELEMENTID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_detector_element__id="ELEMENTID1:ELEMENTID2:..."
     inserts ELEMENTID into the colon-separated list of element IDs
    
     _diffrn_detector_element.detector_id DETECTORNAME -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
    
     _diffrn_detector_element.reference_center_fast RCF -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_detector_element__reference_center_fast=[RCF1,RCF2,...]
     inserts RCF into the array of reference centers
    
     _diffrn_detector_element.reference_center_slow RCS -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_detector_element__reference_center_slow=[RCS1,RCS2,...]
     inserts RCS into the array of reference centers
    
     _diffrn_detector_element.reference_center_units UNITS -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_detector_element__id="UNITS1:UNITS2:..."
     inserts ELEMENTID into the colon-separated list of units
    
     _diffrn_detector_element.variant --> ??
         NeXus does not handle variants at this time
    
 ;
     save_



 save__diffrn_detector_element.id
     _item_description.description
 ;             The value of _diffrn_detector_element.id must uniquely
               identify each element of a detector.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
            '_diffrn_detector_element.id'
            DIFFRN_DETECTOR_ELEMENT
            yes
     _item_type.code               code
      loop_
     _item_linked.child_name
     _item_linked.parent_name
            '_diffrn_data_frame.detector_element_id'
            '_diffrn_detector_element.id'

      save_


 save__diffrn_detector_element.detector_id
     _item_description.description
 ;              This item is a pointer to _diffrn_detector.id
                in the DIFFRN_DETECTOR category.
 ;
     _item.name                  '_diffrn_detector_element.detector_id'
     _item.category_id             DIFFRN_DETECTOR_ELEMENT
     _item.mandatory_code          yes
     _item_type.code               code
      save_

 save__diffrn_detector_element.reference_center_fast
      _item_description.description
 ;             The value of _diffrn_detector_element.reference_center_fast is
               the fast index axis beam center position relative to the detector
               element face in the units specified in the data item
               '_diffrn_detector_element.reference_center_units' along the fast
               axis of the detector from the center of the first pixel to
               the point at which the Z-axis (which should be colinear with the
               beam) intersects the face of the detector, if in fact is does.  
               At the time of the measurement all settings of the detector
               positioner should be at their reference settings.  If more than
               one reference setting has been used the value given whould be
               representive of the beam center as determined from the ensemble
               of settings.

               It is important to note that for measurements in millimetres,
               the sense of the axis is used, rather than the sign of the
               pixel-to-pixel increments.

 ;
      _item.name '_diffrn_detector_element.reference_center_fast'
      _item.category_id             DIFFRN_DETECTOR_ELEMENT
      _item.mandatory_code          no
      _item_type.code               float

      save_


 save__diffrn_detector_element.reference_center_slow
      _item_description.description
 ;             The value of _diffrn_detector_element.reference_center_slow is
               the slow index axis beam center position relative to the detector
               element face in the units specified in the data item
               '_diffrn_detector_element.reference_center_units' along the slow
               axis of the detector from the center of the first pixel to
               the point at which the Z-axis (which should be colinear with the
               beam) intersects the face of the detector, if in fact is does.
               At the time of the measurement all settings of the detector
               positioner should be at their reference settings.  If more than
               one reference setting has been used the value givien whould be
               representive of the beam center as determined from the ensemble
               of settings.

               It is important to note that the sense of the axis is used,
               rather than the sign of the pixel-to-pixel increments.

 ;
      _item.name '_diffrn_detector_element.reference_center_slow'
      _item.category_id             DIFFRN_DETECTOR_ELEMENT
      _item.mandatory_code          no
      _item_type.code               float

      save_


 save__diffrn_detector_element.reference_center_units
      _item_description.description
 ;             The value of _diffrn_detector_element.reference_center_units
               specifies the units in which the values of
               '_diffrn_detector_element.reference_center_fast' and
               '_diffrn_detector_element.reference_center_slow'
               are presented.  The default is 'mm' for millimetres.  The
               alternatives are 'pixels' and 'bins'.  In all cases the
               center distances are measured from the center of the
               first pixel, i.e. in a 2x2 binning, the measuring origin
               is offset from the centers of the bins by one half pixel
               towards the first pixel.
              
               If 'bins' is specified, the data in
                   '_array_intensities.pixel_fast_bin_size',
                   '_array_intensities.pixel_slow_bin_size', and
                   '_array_intensities.pixel_binning_method'
               is used to define the binning scheme.


 ;
      _item.name '_diffrn_detector_element.reference_center_units'
      _item.category_id             DIFFRN_DETECTOR_ELEMENT
      _item.mandatory_code          no
      _item_type.code               code
       loop_
      _item_enumeration.value
      _item_enumeration.detail
                                    mm        'millimetres'
                                    pixels    'detector pixels'
                                    bins      'detector bins'

      save_

 save__diffrn_detector_element.variant
     _item_description.description
 ;             The value of _diffrn_detector_element.variant gives the variant
               to which the given DIFFRN_DETECTOR_ELEMENT row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_detector_element.variant'
     _item.category_id             DIFFRN_DETECTOR_ELEMENT
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 ########################
 ## DIFFRN_MEASUREMENT ##
 ########################


 save_diffrn_measurement
     _category.description
 ;              Data items in the DIFFRN_MEASUREMENT category record details
                about the device used to orient and/or position the crystal
                during data measurement and the manner in which the
                diffraction data were measured.
 ;
     _category.id                  DIFFRN_MEASUREMENT
     _category.mandatory_code      no
      loop_
     _category_key.name          '_diffrn_measurement.device'
                                 '_diffrn_measurement.diffrn_id'
                                 '_diffrn_measurement.id'
                                 '_diffrn_measurement.variant'
      loop_
     _category_group.id           'inclusive_group'
                                  'diffrn_group'
      loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;    Example 1 - based on PDB entry 5HVP and laboratory records for the
                  structure corresponding to PDB entry 5HVP
 ;
 ;
     _diffrn_measurement.diffrn_id          'd1'
     _diffrn_measurement.device             '3-circle camera'
     _diffrn_measurement.device_type        'Supper model X'
     _diffrn_measurement.device_details     'none'
     _diffrn_measurement.method             'omega scan'
     _diffrn_measurement.details
     ; 440 frames, 0.20 degrees, 150 sec, detector distance 12 cm, detector
       angle 22.5 degrees
     ;
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;     Example 2 - based on data set TOZ of Willis, Beckwith & Tozer
                   [Acta Cryst. (1991), C47, 2276-2277].
 ;
 ;
     _diffrn_measurement.diffrn_id       's1'
     _diffrn_measurement.device_type     'Philips PW1100/20 diffractometer'
     _diffrn_measurement.method          'theta/2theta (\q/2\q)'
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _diffrn_measurement.diffrn_id DIFFRNID -->
     /CBF_diffrn_scan__SCANID:NXentry
       /CBF_diffrn_id="DIFFRNID"
    
    
     _diffrn_measurement.details DETAILS-->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /CBF_diffrn_measurement__details="DETAILS"
    
     _diffrn_measurement.device DEVICE -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /CBF_diffrn_measurement__device="DEVICE"
    
     _diffrn_measurement.device_details DEVDETAILS -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /CBF_diffrn_measurement__device_details="DEVDETAILS"
    
     _diffrn_measurement.device_type DEVTYPE -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /CBF_diffrn_measurement__device_type="DEVTYPE"
    
     _diffrn_measurement.id GONIOMETER -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
    
     _diffrn_measurement.method METHOD -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /CBF_diffrn_measurement__method="METHOD"
    
     _diffrn_measurement.number_of_axes NUMBER -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /number_of_axes=NUMBER
    
     _diffrn_measurement.sample_detector_distance DIST-->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /distance=DIST
           /@units="mm"
     and create a link from NXdetector/NXinstrument/NXDetector/distance to here
    
     _diffrn_measurement.sample_detector_voffset VOFST -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /CBF_diffrn_measurement__sample_detector_voffset=VOFST
           /@units="mm"
    
     _diffrn_measurement.specimen_support SPECSPRT -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /CBF_diffrn_measurement__specimen_support="SPECSPRT"
    
     _diffrn_measurement.variant --> ??
         NeXus does not handle variants at this time
 ;
      save_


 save__diffrn_measurement.device
     _item_description.description
 ;              The general class of goniometer or device used to support
                and orient the specimen.

                If the value of _diffrn_measurement.device is not given,
                it is implicitly equal to the value of
                _diffrn_measurement.diffrn_id.

                Either _diffrn_measurement.device or
                _diffrn_measurement.id may be used to link to other
                categories.  If the experimental setup admits multiple
                devices, then _diffrn_measurement.id is used to provide
                a unique link.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
              '_diffrn_measurement.device'  DIFFRN_MEASUREMENT      implicit
              '_diffrn_measurement_axis.measurement_device'
                                            DIFFRN_MEASUREMENT_AXIS implicit
      loop_
     _item_linked.child_name
     _item_linked.parent_name
              '_diffrn_measurement_axis.measurement_device'
                                          '_diffrn_measurement.device'
     _item_aliases.alias_name    '_diffrn_measurement_device'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               text
      loop_
     _item_examples.case          '3-circle camera'
                                  '4-circle camera'
                                  'kappa-geometry camera'
                                  'oscillation camera'
                                  'precession camera'
      save_


 save__diffrn_measurement.device_details
     _item_description.description
 ;              A description of special aspects of the device used to
                measure the diffraction intensities.
 ;
     _item.name                  '_diffrn_measurement.device_details'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_measurement_device_details'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               text
     _item_examples.case
 ;                                 commercial goniometer modified locally to
                                   allow for 90\% \t arc
 ;
      save_


 save__diffrn_measurement.device_type
     _item_description.description
 ;              The make, model or name of the measurement device
                (goniometer) used.
 ;
     _item.name                  '_diffrn_measurement.device_type'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_measurement_device_type'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               text
      loop_
     _item_examples.case          'Supper model q'
                                  'Huber model r'
                                  'Enraf-Nonius model s'
                                  'home-made'
      save_


 save__diffrn_measurement.diffrn_id
     _item_description.description
 ;              This data item is a pointer to _diffrn.id in the DIFFRN
                category.
 ;
     _item.name                  '_diffrn_measurement.diffrn_id'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          yes
     _item_type.code               code
      save_


 save__diffrn_measurement.details
     _item_description.description
 ;              A description of special aspects of the intensity
                measurement.
 ;
     _item.name                  '_diffrn_measurement.details'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_measurement_details'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               text
     _item_examples.case
 ;                                 440 frames, 0.20 degrees, 150 sec, detector
                                   distance 12 cm, detector angle 22.5 degrees
 ;
      save_


 save__diffrn_measurement.id
     _item_description.description
 ;              The value of _diffrn_measurement.id must uniquely identify
                the set of mechanical characteristics of the device used to
                orient and/or position the sample used during the collection
                of each diffraction data set.

                If the value of _diffrn_measurement.id is not given, it is
                implicitly equal to the value of
                _diffrn_measurement.diffrn_id.

                Either _diffrn_measurement.device or
                _diffrn_measurement.id may be used to link to other
                categories.  If the experimental setup admits multiple
                devices, then _diffrn_measurement.id is used to provide
                a unique link.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
              '_diffrn_measurement.id'      DIFFRN_MEASUREMENT      implicit
              '_diffrn_measurement_axis.measurement_id'
                                            DIFFRN_MEASUREMENT_AXIS implicit
      loop_
     _item_linked.child_name
     _item_linked.parent_name
              '_diffrn_measurement_axis.measurement_id'
                                          '_diffrn_measurement.id'

     _item_type.code               code
      save_


 save__diffrn_measurement.method
     _item_description.description
 ;              Method used to measure intensities.
 ;
     _item.name                  '_diffrn_measurement.method'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_measurement_method'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               text
     _item_examples.case
       'profile data from theta/2theta (\q/2\q) scans'
      save_


 save__diffrn_measurement.number_of_axes
     _item_description.description
 ;              The value of _diffrn_measurement.number_of_axes gives the
                number of axes of the positioner for the goniometer or
                other sample orientation or positioning device identified
                by _diffrn_measurement.id.

                The description of the axes should be provided by entries in
                DIFFRN_MEASUREMENT_AXIS.
 ;
     _item.name                  '_diffrn_measurement.number_of_axes'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          no
      loop_
     _item_range.maximum
     _item_range.minimum           .   1
                                   1   1
     _item_type.code               int
      save_


 #                  _diffrn_measurement.sample_detector_distance
 #                  _diffrn_measurement.sample_detector_voffset

 save__diffrn_measurement.sample_detector_distance
     _item_description.description
 ;              The value of _diffrn_measurement.sample_detector_distance gives
                the unsigned distance in millimetres from the sample to the
                detector along the beam.
 ;
     _item.name                  '_diffrn_measurement.sample_detector_distance'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          no
      loop_
     _item_range.maximum
     _item_range.minimum           .   0.0
     _item_type.code               float
     _item_units.code              mm
      save_

 save__diffrn_measurement.sample_detector_voffset
     _item_description.description
 ;              The value of _diffrn_measurement.sample_detector_voffset gives
                the signed distance in millimetres in the vertical
                direction (positive for up) from the center of
                the beam to the center of the detector.
 ;
     _item.name                  '_diffrn_measurement.sample_detector_voffset'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          no
      loop_
     _item_range.maximum
     _item_range.minimum           .   .
                                   .   .
     _item_type.code               float
     _item_units.code              mm
      save_


 save__diffrn_measurement.specimen_support
     _item_description.description
 ;              The physical device used to support the crystal during data
                collection.
 ;
     _item.name                  '_diffrn_measurement.specimen_support'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_measurement_specimen_support'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               text
      loop_
     _item_examples.case          'glass capillary'
                                  'quartz capillary'
                                  'fiber'
                                  'metal loop'
      save_

 save__diffrn_measurement.variant
     _item_description.description
 ;             The value of _diffrn_measurement.variant gives the variant
               to which the given DIFFRN_MEASUREMENT row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_measurement.variant'
     _item.category_id             DIFFRN_MEASUREMENT
     _item.mandatory_code          implicit
     _item_type.code               code
      save_




 ###########################
 # DIFFRN_MEASUREMENT_AXIS #
 ###########################


 save_diffrn_measurement_axis
     _category.description
 ;    Data items in the DIFFRN_MEASUREMENT_AXIS category associate
      axes with goniometers.
 ;
     _category.id                   DIFFRN_MEASUREMENT_AXIS
     _category.mandatory_code       no
      loop_
     _category_key.name
                               '_diffrn_measurement_axis.measurement_device'
                                 '_diffrn_measurement_axis.measurement_id'
                                 '_diffrn_measurement_axis.axis_id'
                                 '_diffrn_measurement_axis.variant'
      loop_
     _category_group.id           'inclusive_group'
                                  'diffrn_group'
     _category.NX_mapping_details
 ;
    
     _diffrn_measurement_axis.axis_id AXISID -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /CBF_axis__AXISID=[]
    
     _diffrn_measurement_axis.measurement_device DEVICE -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
         /CBF_diffrn_measurement__details="DEVICE"
    
     _diffrn_measurement_axis.measurement_id GONIOMETER -->
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETER:NXgoniometer
    
     _diffrn_measurement_axis.variant --> ??
         NeXus does not handle variants at this time
    
          
 ;
      save_


 save__diffrn_measurement_axis.axis_id
     _item_description.description
 ;              This data item is a pointer to _axis.id in
                the AXIS category.
 ;
     _item.name                  '_diffrn_measurement_axis.axis_id'
     _item.category_id             DIFFRN_MEASUREMENT_AXIS
     _item.mandatory_code          yes
     _item_type.code               code
      save_


 save__diffrn_measurement_axis.measurement_device
     _item_description.description
 ;              This data item is a pointer to _diffrn_measurement.device
                in the DIFFRN_MEASUREMENT category.
 ;
     _item.name
       '_diffrn_measurement_axis.measurement_device'
     _item.category_id             DIFFRN_MEASUREMENT_AXIS
     _item.mandatory_code          implicit
     _item_type.code               text
      save_


 save__diffrn_measurement_axis.measurement_id
     _item_description.description
 ;              This data item is a pointer to _diffrn_measurement.id in
                the DIFFRN_MEASUREMENT category.

                This item was previously named _diffrn_measurement_axis.id,
                which is now a deprecated name.  The old name is
                provided as an alias but should not be used for new work.
 ;
     _item.name                  '_diffrn_measurement_axis.measurement_id'
     _item.category_id             DIFFRN_MEASUREMENT_AXIS
     _item.mandatory_code          implicit
     _item_aliases.alias_name    '_diffrn_measurement_axis.id'
     _item_aliases.dictionary      cif_img.dic
     _item_aliases.version         1.0
     _item_type.code               code
      save_

 save__diffrn_measurement_axis.variant
     _item_description.description
 ;             The value of _diffrn_measurement_axis.variant gives the variant
               to which the given DIFFRN_MEASUREMENT_AXIS row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_measurement_axis.variant'
     _item.category_id             DIFFRN_MEASUREMENT_AXIS
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 ####################
 # DIFFRN_RADIATION #
 ####################


 save_diffrn_radiation
     _category.description
 ;              Data items in the DIFFRN_RADIATION category describe
                the radiation used for measuring diffraction intensities,
                its collimation and monochromatization before the sample.

                Post-sample treatment of the beam is described by data
                items in the DIFFRN_DETECTOR category.
 ;
     _category.id                  DIFFRN_RADIATION
     _category.mandatory_code      no
     loop_
     _category_key.name          '_diffrn_radiation.diffrn_id'
                                 '_diffrn_radiation.variant'
      loop_
     _category_group.id           'inclusive_group'
                                  'diffrn_group'
      loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 - based on PDB entry 5HVP and laboratory records for the
                 structure corresponding to PDB entry 5HVP
 ;
 ;
     _diffrn_radiation.diffrn_id            'set1'

     _diffrn_radiation.collimation          '0.3 mm double pinhole'
     _diffrn_radiation.monochromator        'graphite'
     _diffrn_radiation.type                 'Cu K\a'
     _diffrn_radiation.wavelength_id         1
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;    Example 2 - based on data set TOZ of Willis, Beckwith & Tozer
                 [Acta Cryst. (1991), C47, 2276-2277].
 ;
 ;
     _diffrn_radiation.wavelength_id    1
     _diffrn_radiation.type             'Cu K\a'
     _diffrn_radiation.monochromator    'graphite'
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _diffrn_radiation.collimation COLLIMATION -->
     /instrument:NXinstrument
       /collimator:NXcollimator
         /CBF_diffrn_radiation__collimation="COLLIMATION"
    
     _diffrn_radiation.diffrn_id DIFFRNID -->
     /CBF_diffrn_scan__SCANID:NXentry
       /CBF_diffrn_id="DIFFRNID"
    
    
     _diffrn_radiation.div_x_source DIVX -->
     /instrument:NXinstrument
       /collimator:NXcollimator
         /divergence_x=DIVX
           /@units="deg"
    
     _diffrn_radiation.div_y_source DIVY -->
     /instrument:NXinstrument
       /collimator:NXcollimator
         /divergence_y=DIVY
           /@units="deg"
    
     _diffrn_radiation.div_x_y_source DIVXY -->
     /instrument:NXinstrument
       /collimator:NXcollimator
         /CBF_diffrn_radiation__div_x_y_source=DIVXY
           /@units="deg\verb|^|2"
    
     _diffrn_radiation.filter_edge ABSEDGE -->
     /instrument:NXinstrument
       /collimator:NXcollimator
         /CBF_diffrn_radiation__filter_edge=ABSEDGE
           /@units="angstroms"
    
     _diffrn_radiation.inhomogeneity HWIDTH -->
     /instrument:NXinstrument
       /collimator:NXcollimator
         /CBF_diffrn_radiation__inhomogeneity=HWIDTH
           /@units="mm"
    
     _diffrn_radiation.monochromator MONOCHROMATOR -->
     /instrument:NXinstrument
       /collimator:NXmonochromator
         /CBF_diffrn_radiation__monochromator="MONOCHROMATOR"
    
     _diffrn_radiation.polarisn_norm POLNANG-->
     /instrument:NXinstrument
       /collimator:NXmonochromator
         /CBF_diffrn_radiation__polarisn_norm=POLNANG
           /@units="deg"
    
     _diffrn_radiation.polarisn_ratio POLRAT -->
     /instrument:NXinstrument
       /collimator:NXmonochromator
         /CBF_diffrn_radiation__polarisn_ratio=POLRAT
    
     _diffrn_radiation.polarizn_source_norm POLSNANG -->
     /instrument:NXinstrument
       /collimator:NXmonochromator
         /CBF_diffrn_radiation__polarisn_source_norm=POLSNANG
           /@units="deg"
    
     _diffrn_radiation.polarizn_source_ratio  POLSRAT -->
     /instrument:NXinstrument
       /collimator:NXmonochromator
         /CBF_diffrn_radiation__polarizn_source_ratio=POLSRAT
    
     _diffrn_radiation.probe RADIATION -->
     /instrument:NXinstrument
       /collimator:NXmonochromator
         /CBF_diffrn_radiation__probe="RADIATION"
    
     _diffrn_radiation.type SIEGBAHNTYPE -->
     /instrument:NXinstrument
       /collimator:NXmonochromator
         /CBF_diffrn_radiation__type="SIEGBAHNTYPE"
    
     _diffrn_radiation.xray_symbol IUPACXRAYSYMB -->
     /instrument:NXinstrument
       /collimator:NXmonochromator
         /CBF_diffrn_radiation__xray_symbol="IUPACXRAYSYMB"
    
     _diffrn_radiation.wavelength_id ID -->
     /instrument:NXinstrument
       /collimator:NXmonochromator
         /wavelength=WAVELENGTH
           @units="angstroms"
     where WAVELENGTH is the value of _diffrn_radiation_wavelength.wavelength
     for which  _diffrn_radiation_wavelength.id==ID
    
     _diffrn_radiation.variant --> ??
     NeXus does not handle variants at this timeand for which
     _diffrn_radiation_wavelength.wt is maximized.  This is the dominant
     wavelength.  See the mapping of the
     DIFFRN\_RADIATION\_WAVELENGTH category, below, for more complex cases.
    
          
    
     _diffrn_radiation_wavelength.id ID -->
     /instrument:NXinstrument
       /CBF_diffrn_radiation_wavelength__id=["ID"]
    
     _diffrn_radiation_wavelength.wavelength_id WAVELENGTH_ID$ -->
     /instrument:NXinstrument
       /CBF_diffrn_radiation_wavelength__wavelength_id=["WAVELENGTH\_ID"]
    
     _diffrn_radiation_wavelength.wavelength WAVELENGTH  -->
     /instrument:NXinstrument
       /CBF_diffrn_radiation_wavelength__wavelength=[WAVELENGTH]
    
     _diffrn_radiation_wavelength.wt WEIGHT -->
     /instrument:NXinstrument
       /CBF_diffrn_radiation_wavelength__wt=[WEIGHT]
    
     _diffrn_radiation_wavelength.variant --> ??
         NeXus does not handle variants at this time
    
 ;
     save_

 save__diffrn_radiation.collimation
     _item_description.description
 ;              The collimation or focusing applied to the radiation.
 ;
     _item.name                  '_diffrn_radiation.collimation'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_radiation_collimation'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               text
      loop_
     _item_examples.case          '0.3 mm double-pinhole'
                                  '0.5 mm'
                                  'focusing mirrors'
      save_


 save__diffrn_radiation.diffrn_id
     _item_description.description
 ;              This data item is a pointer to _diffrn.id in the DIFFRN
                category.
 ;
     _item.name                  '_diffrn_radiation.diffrn_id'
     _item.mandatory_code          yes
     _item_type.code               code
      save_



 save__diffrn_radiation.div_x_source
     _item_description.description
 ;              Beam crossfire in degrees parallel to the laboratory X axis
                (see AXIS category).

                This is a characteristic of the X-ray beam as it illuminates
                the sample (or specimen) after all monochromation and
                collimation.

                This is the standard uncertainty (e.s.d.)  of the directions of
                photons in the XZ plane around the mean source beam
                direction.

                Note that for some synchrotrons this value is specified
                in milliradians, in which case a conversion is needed.
                To convert a value in milliradians to a value in degrees,
                multiply by 0.180 and divide by \p.
 ;
     _item.name                  '_diffrn_radiation.div_x_source'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_type.code               float
     _item_units.code              degrees
      save_


 save__diffrn_radiation.div_y_source
     _item_description.description
 ;              Beam crossfire in degrees parallel to the laboratory Y axis
                (see AXIS category).

                This is a characteristic of the X-ray beam as it illuminates
                the sample (or specimen) after all monochromation and
                collimation.

                This is the standard uncertainty (e.s.d.) of the directions
                of photons in the YZ plane around the mean source beam
                direction.

                Note that for some synchrotrons this value is specified
                in milliradians, in which case a conversion is needed.
                To convert a value in milliradians to a value in degrees,
                multiply by 0.180 and divide by \p.
 ;
     _item.name                  '_diffrn_radiation.div_y_source'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_type.code               float
     _item_units.code              degrees
     _item_default.value           0.0
      save_


 save__diffrn_radiation.div_x_y_source
     _item_description.description
 ;              Beam crossfire correlation degrees^2^ between the
                crossfire laboratory X-axis component and the crossfire
                laboratory Y-axis component (see AXIS category).

                This is a characteristic of the X-ray beam as it illuminates
                the sample (or specimen) after all monochromation and
                collimation.

                This is the mean of the products of the deviations of the
                direction of each photon in XZ plane times the deviations
                of the direction of the same photon in the YZ plane
                around the mean source beam direction.  This will be zero
                for uncorrelated crossfire.

                Note that some synchrotrons, this value is specified in
                milliradians^2^, in which case a conversion would be needed.
                To go from a value in milliradians^2^ to a value in
                degrees^2^, multiply by 0.180^2^ and divide by \p^2^.

 ;
     _item.name                  '_diffrn_radiation.div_x_y_source'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_type.code               float
     _item_units.code              degrees_squared
     _item_default.value           0.0
      save_

 save__diffrn_radiation.filter_edge
     _item_description.description
 ;              Absorption edge in \%Angstroms of the radiation filter used.
 ;
     _item.name                  '_diffrn_radiation.filter_edge'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_radiation_filter_edge'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
      loop_
     _item_range.maximum
     _item_range.minimum            .    0.0
                                   0.0   0.0
     _item_type.code               float
     _item_units.code              angstroms
      save_

 save__diffrn_radiation.inhomogeneity
     _item_description.description
 ;              Half-width in millimetres of the incident beam in the
                direction perpendicular to the diffraction plane.
 ;
     _item.name                  '_diffrn_radiation.inhomogeneity'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_radiation_inhomogeneity'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
      loop_
     _item_range.maximum
     _item_range.minimum            .    0.0
                                   0.0   0.0
     _item_type.code               float
     _item_units.code              millimetres
      save_

 save__diffrn_radiation.monochromator
     _item_description.description
 ;              The method used to obtain monochromatic radiation. If a
                monochromator crystal is used, the material and the
                indices of the Bragg reflection are specified.
 ;
     _item.name                  '_diffrn_radiation.monochromator'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_radiation_monochromator'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               text
      loop_
     _item_examples.case          'Zr filter'
                                  'Ge 220'
                                  'none'
                                  'equatorial mounted graphite'
      save_

 save__diffrn_radiation.polarisn_norm
     _item_description.description
 ;              The angle in degrees, as viewed from the specimen, between the
                perpendicular component of the polarization and the diffraction
                plane. See _diffrn_radiation_polarisn_ratio.
 ;
     _item.name                  '_diffrn_radiation.polarisn_norm'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_radiation_polarisn_norm'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
      loop_
     _item_range.maximum
     _item_range.minimum           90.0  90.0
                                   90.0 -90.0
                                  -90.0 -90.0
     _item_type.code               float
     _item_units.code              degrees
      save_

 save__diffrn_radiation.polarisn_ratio
     _item_description.description
 ;              Polarization ratio of the diffraction beam incident on the
                crystal. This is the ratio of the perpendicularly polarized to
                the parallel polarized component of the radiation. The
                perpendicular component forms an angle of
                _diffrn_radiation.polarisn_norm to the normal to the
                diffraction plane of the sample (i.e. the plane containing
                the incident and reflected beams).
 ;
     _item.name                  '_diffrn_radiation.polarisn_ratio'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_radiation_polarisn_ratio'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
      loop_
     _item_range.maximum
     _item_range.minimum            .    0.0
                                   0.0   0.0
     _item_type.code               float
      save_



 save__diffrn_radiation.polarizn_source_norm
     _item_description.description
 ;              The angle in degrees, as viewed from the specimen, between
                the normal to the polarization plane and the laboratory Y
                axis as defined in the AXIS category.

                Note that this is the angle of polarization of the source
                photons, either directly from a synchrotron beamline or
                from a monochromater.

                This differs from the value of
                _diffrn_radiation.polarisn_norm
                in that _diffrn_radiation.polarisn_norm refers to
                polarization relative to the diffraction plane rather than
                to the laboratory axis system.

                In the case of an unpolarized beam, or a beam with true
                circular polarization, in which no single plane of
                polarization can be determined, the plane should be taken
                as the XZ plane and the angle as 0.

                See _diffrn_radiation.polarizn_source_ratio.
 ;
     _item.name                  '_diffrn_radiation.polarizn_source_norm'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
      loop_
     _item_range.maximum
     _item_range.minimum           90.0   90.0
                                   90.0  -90.0
                                  -90.0  -90.0
     _item_type.code               float
     _item_units.code              degrees
     _item_default.value           0.0
      save_


 save__diffrn_radiation.polarizn_source_ratio
     _item_description.description
 ;              (Ip-In)/(Ip+In), where Ip is the intensity
                (amplitude squared) of the electric vector in the plane of
                polarization and In is the intensity (amplitude squared)
                of the electric vector in the plane of the normal to the
                plane of polarization.

                In the case of an unpolarized beam, or a beam with true
                circular polarization, in which no single plane of
                polarization can be determined, the plane is to be taken
                as the XZ plane and the normal is parallel to the Y axis.

                Thus, if there was complete polarization in the plane of
                polarization, the value of
                _diffrn_radiation.polarizn_source_ratio would be 1, and
                for an unpolarized beam
                _diffrn_radiation.polarizn_source_ratio would have a
                value of 0.

                If the X axis has been chosen to lie in the plane of
                polarization, this definition will agree with the definition
                of 'MONOCHROMATOR' in the Denzo glossary, and values of near
                1 should be expected for a bending-magnet source.  However,
                if the X axis were perpendicular to the polarization plane
                (not a common choice), then the Denzo value would be the
                negative of _diffrn_radiation.polarizn_source_ratio.

                See http://www.hkl-xray.com for information on Denzo and
                Otwinowski & Minor (1997).

                This differs both in the choice of ratio and choice of
                orientation from _diffrn_radiation.polarisn_ratio, which,
                unlike _diffrn_radiation.polarizn_source_ratio, is
                unbounded.

                Reference: Otwinowski, Z. & Minor, W. (1997). 'Processing of
                X-ray diffraction data collected in oscillation mode.' Methods
                Enzymol. 276, 307-326.
 ;
     _item.name                  '_diffrn_radiation.polarizn_source_ratio'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
      loop_
     _item_range.maximum
     _item_range.minimum           1.0    1.0
                                   1.0   -1.0
                                  -1.0   -1.0
     _item_type.code               float
      save_


 save__diffrn_radiation.probe
     _item_description.description
 ;              Name of the type of radiation used. It is strongly
                recommended that this be given so that the
                probe radiation is clearly specified.
 ;
     _item.name                  '_diffrn_radiation.probe'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_radiation_probe'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               line
      loop_
     _item_enumeration.value      'X-ray'
                                  'neutron'
                                  'electron'
                                  'gamma'
      save_

 save__diffrn_radiation.type
     _item_description.description
 ;              The nature of the radiation. This is typically a description
                of the X-ray wavelength in Siegbahn notation.
 ;
     _item.name                  '_diffrn_radiation.type'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_radiation_type'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               line
      loop_
     _item_examples.case          'CuK\a'
                                  'Cu K\a~1~'
                                  'Cu K-L~2,3~'
                                  'white-beam'

      save_

 save__diffrn_radiation.xray_symbol
     _item_description.description
 ;              The IUPAC symbol for the X-ray wavelength for the probe
                radiation.
 ;
     _item.name                  '_diffrn_radiation.xray_symbol'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          no
     _item_aliases.alias_name    '_diffrn_radiation_xray_symbol'
     _item_aliases.dictionary      cif_core.dic
     _item_aliases.version         2.0.1
     _item_type.code               line
      loop_
     _item_enumeration.value
     _item_enumeration.detail     'K-L~3~'
                                  'K\a~1~ in older Siegbahn notation'
                                  'K-L~2~'
                                  'K\a~2~ in older Siegbahn notation'
                                  'K-M~3~'
                                  'K\b~1~ in older Siegbahn notation'
                                  'K-L~2,3~'
                                  'use where K-L~3~ and K-L~2~ are not resolved'
      save_

 save__diffrn_radiation.wavelength_id
     _item_description.description
 ;              This data item is a pointer to
                _diffrn_radiation_wavelength.id in the
                DIFFRN_RADIATION_WAVELENGTH category.
 ;
     _item.name                  '_diffrn_radiation.wavelength_id'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          yes
     _item_type.code               code
      save_


 save__diffrn_radiation.variant
     _item_description.description
 ;             The value of _diffrn_radiation.variant gives the variant
               to which the given DIFFRN_RADIATION row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_radiation.variant'
     _item.category_id             DIFFRN_RADIATION
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 ################
 # DIFFRN_REFLN #
 ################


 save_diffrn_refln
     _category.description
 ;    This category redefinition has been added to extend the key of
      the standard DIFFRN_REFLN category.

      Data items in the DIFFRN_REFLN category record details about
      the intensities in the diffraction data set
      identified by _diffrn_refln.diffrn_id.

      The DIFFRN_REFLN data items refer to individual intensity
      measurements and must be included in looped lists.

      The DIFFRN_REFLNS data items specify the parameters that apply
      to all intensity  measurements in the particular diffraction
      data set identified by _diffrn_reflns.diffrn_id and
      _diffrn_refln.frame_id
 ;
     _category.id                   DIFFRN_REFLN
     _category.mandatory_code       no
     loop_
     _category_key.name             '_diffrn_refln.diffrn_id'
                                    '_diffrn_refln.id'
                                    '_diffrn_refln.frame_id'
                                    '_diffrn_refln.variant'
      loop_
     _category_group.id             'inclusive_group'
                                    'diffrn_group'
     _category.NX_mapping_details
 ;
     This category will be addressed at a future date.
 ;
      save_


 save__diffrn_refln.frame_id
     _item_description.description
 ;              This item is a pointer to _diffrn_data_frame.id
                in the DIFFRN_DATA_FRAME category.
 ;
     _item.name                  '_diffrn_refln.frame_id'
     _item.category_id             DIFFRN_REFLN
     _item.mandatory_code          yes
     _item_type.code               code
      save_

 save__diffrn_refln.variant
     _item_description.description
 ;             The value of _diffrn_refln.variant gives the variant
               to which the given DIFFRN_REFLN row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_refln.variant'
     _item.category_id             DIFFRN_REFLN
     _item.mandatory_code          implicit
     _item_type.code               code
      save_

 save__diffrn_refln.id
     _item_description.description
     ;              This item is a placeholder for the definition in the PDBx/mmCIF dictionary.
     ;
     _item.name                  '_diffrn_refln.id'
     _item.category_id             DIFFRN_REFLN
     _item.mandatory_code          yes
     _item_type.code               code
     save_
    
 save__diffrn_refln.diffrn_id
     _item_description.description
     ;              This item is a placeholder for the definition in the PDBx/mmCIF dictionary
     ;
     _item.name                  '_diffrn_refln.diffrn_id'
     _item.category_id             DIFFRN_REFLN
     _item.mandatory_code          yes
     _item_type.code               code
     save_
    


 ###############
 # DIFFRN_SCAN #
 ###############

 save_diffrn_scan
     _category.description
 ;    Data items in the DIFFRN_SCAN category describe the parameters of one
      or more scans, relating axis positions to frames.

 ;
     _category.id                   DIFFRN_SCAN
     _category.mandatory_code       no
      loop_
     _category_key.name            '_diffrn_scan.id'
                                   '_diffrn_scan.variant'
      loop_
     _category_group.id            'inclusive_group'
                                   'diffrn_group'
      loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 - derived from a suggestion by R. M. Sweet.

    The vector of each axis is not given here, because it is provided in
    the AXIS category.  By making _diffrn_scan_axis.scan_id and
    _diffrn_scan_axis.axis_id keys of the DIFFRN_SCAN_AXIS category,
    an arbitrary number of scanning and fixed axes can be specified for a
    scan.  In this example, three rotation axes and one translation axis
    at nonzero values are specified, with one axis stepping.  There is no
    reason why more axes could not have been specified to step. Range
    information has been specified, but note that it can be calculated from
    the  number of frames and the increment, so the data item
    _diffrn_scan_axis.angle_range could be dropped.

    Both the sweep data and the data for a single frame are specified.

    Note that the information on how the axes are stepped is given twice,
    once in terms of the overall averages in the value of
    _diffrn_scan.integration_time and the values for DIFFRN_SCAN_AXIS,
    and precisely for the given frame in the value for
    _diffrn_scan_frame.integration_time and the values for
    DIFFRN_SCAN_FRAME_AXIS.  If dose-related adjustments are made to
    scan times and nonlinear stepping is done, these values may differ.
    Therefore, in interpreting the data for a particular frame it is
    important to use the frame-specific data.
 ;
 ;
       _diffrn_scan.id                   1
       _diffrn_scan.date_start         '2001-11-18T03:26:42'
       _diffrn_scan.date_end           '2001-11-18T03:36:45'
       _diffrn_scan.integration_time    3.0
       _diffrn_scan.frame_id_start      mad_L2_000
       _diffrn_scan.frame_id_end        mad_L2_200
       _diffrn_scan.frames              201

        loop_
       _diffrn_scan_axis.scan_id
       _diffrn_scan_axis.axis_id
       _diffrn_scan_axis.angle_start
       _diffrn_scan_axis.angle_range
       _diffrn_scan_axis.angle_increment
       _diffrn_scan_axis.displacement_start
       _diffrn_scan_axis.displacement_range
       _diffrn_scan_axis.displacement_increment

        1 omega 200.0 20.0 0.1 . . .
        1 kappa -40.0  0.0 0.0 . . .
        1 phi   127.5  0.0 0.0 . . .
        1 tranz  . . .   2.3 0.0 0.0

       _diffrn_scan_frame.scan_id                   1
       _diffrn_scan_frame.date               '2001-11-18T03:27:33'
       _diffrn_scan_frame.integration_time    3.0
       _diffrn_scan_frame.frame_id            mad_L2_018
       _diffrn_scan_frame.frame_number        18

       loop_
       _diffrn_scan_frame_axis.frame_id
       _diffrn_scan_frame_axis.axis_id
       _diffrn_scan_frame_axis.angle
       _diffrn_scan_frame_axis.angle_increment
       _diffrn_scan_frame_axis.displacement
       _diffrn_scan_frame_axis.displacement_increment

        mad_L2_018 omega 201.8  0.1 . .
        mad_L2_018 kappa -40.0  0.0 . .
        mad_L2_018 phi   127.5  0.0 . .
        mad_L2_018 tranz  .     .  2.3 0.0
 ;

 ;  Example 2 - a more extensive example (R. M. Sweet, P. J. Ellis &
    H. J. Bernstein).

    A detector is placed 240 mm along the Z axis from the goniometer.
    This leads to a choice:  either the axes of
    the detector are defined at the origin, and then a Z setting of -240
    is entered, or the axes are defined with the necessary Z offset.
    In this case, the setting is used and the offset is left as zero.
    This axis is called DETECTOR_Z.

    The axis for positioning the detector in the Y direction depends
    on the detector Z axis.  This axis is called DETECTOR_Y.

    The axis for positioning the detector in the X direction depends
    on the detector Y axis (and therefore on the detector Z axis).
    This axis is called DETECTOR_X.

    This detector may be rotated around the Y axis.  This rotation axis
    depends on the three translation axes.  It is called DETECTOR_PITCH.

    A coordinate system is defined on the face of the detector in terms of
    2300 0.150 mm pixels in each direction.  The ELEMENT_X axis is used to
    index the first array index of the data array and the ELEMENT_Y
    axis is used to index the second array index.  Because the pixels
    are 0.150mm X 0.150mm, the centre of the first pixel is at (0.075,
    0.075) in this coordinate system.
 ;

 ;    ###CBF: VERSION 1.1

      data_image_1

      # category DIFFRN
      _diffrn.id P6MB
      _diffrn.crystal_id P6MB_CRYSTAL7

      # category DIFFRN_SOURCE
      loop_
      _diffrn_source.diffrn_id
      _diffrn_source.source
      _diffrn_source.type
       P6MB synchrotron 'SSRL beamline 9-1'

      # category DIFFRN_RADIATION
      loop_
      _diffrn_radiation.diffrn_id
      _diffrn_radiation.wavelength_id
      _diffrn_radiation.monochromator
      _diffrn_radiation.polarizn_source_ratio
      _diffrn_radiation.polarizn_source_norm
      _diffrn_radiation.div_x_source
      _diffrn_radiation.div_y_source
      _diffrn_radiation.div_x_y_source
       P6MB WAVELENGTH1 'Si 111' 0.8 0.0 0.08
      0.01 0.00

      # category DIFFRN_RADIATION_WAVELENGTH
      loop_
      _diffrn_radiation_wavelength.id
      _diffrn_radiation_wavelength.wavelength
      _diffrn_radiation_wavelength.wt
       WAVELENGTH1 0.98 1.0

      # category DIFFRN_DETECTOR
      loop_
      _diffrn_detector.diffrn_id
      _diffrn_detector.id
      _diffrn_detector.type
      _diffrn_detector.number_of_axes
       P6MB MAR345-SN26 'MAR 345' 4

      # category DIFFRN_DETECTOR_AXIS
      loop_
      _diffrn_detector_axis.detector_id
      _diffrn_detector_axis.axis_id
       MAR345-SN26 DETECTOR_X
       MAR345-SN26 DETECTOR_Y
       MAR345-SN26 DETECTOR_Z
       MAR345-SN26 DETECTOR_PITCH

      # category DIFFRN_DETECTOR_ELEMENT
      loop_
      _diffrn_detector_element.id
      _diffrn_detector_element.detector_id
       ELEMENT1 MAR345-SN26

      # category DIFFRN_DATA_FRAME
      loop_
      _diffrn_data_frame.id
      _diffrn_data_frame.detector_element_id
      _diffrn_data_frame.array_id
      _diffrn_data_frame.binary_id
       FRAME1 ELEMENT1 ARRAY1 1

      # category DIFFRN_MEASUREMENT
      loop_
      _diffrn_measurement.diffrn_id
      _diffrn_measurement.id
      _diffrn_measurement.number_of_axes
      _diffrn_measurement.method
       P6MB GONIOMETER 3 rotation

      # category DIFFRN_MEASUREMENT_AXIS
      loop_
      _diffrn_measurement_axis.measurement_id
      _diffrn_measurement_axis.axis_id
       GONIOMETER GONIOMETER_PHI
       GONIOMETER GONIOMETER_KAPPA
       GONIOMETER GONIOMETER_OMEGA

      # category DIFFRN_SCAN
      loop_
      _diffrn_scan.id
      _diffrn_scan.frame_id_start
      _diffrn_scan.frame_id_end
      _diffrn_scan.frames
       SCAN1 FRAME1 FRAME1 1

      # category DIFFRN_SCAN_AXIS
      loop_
      _diffrn_scan_axis.scan_id
      _diffrn_scan_axis.axis_id
      _diffrn_scan_axis.angle_start
      _diffrn_scan_axis.angle_range
      _diffrn_scan_axis.angle_increment
      _diffrn_scan_axis.displacement_start
      _diffrn_scan_axis.displacement_range
      _diffrn_scan_axis.displacement_increment
       SCAN1 GONIOMETER_OMEGA 12.0 1.0 1.0 0.0 0.0 0.0
       SCAN1 GONIOMETER_KAPPA 23.3 0.0 0.0 0.0 0.0 0.0
       SCAN1 GONIOMETER_PHI -165.8 0.0 0.0 0.0 0.0 0.0
       SCAN1 DETECTOR_Z 0.0 0.0 0.0 -240.0 0.0 0.0
       SCAN1 DETECTOR_Y 0.0 0.0 0.0 0.6 0.0 0.0
       SCAN1 DETECTOR_X 0.0 0.0 0.0 -0.5 0.0 0.0
       SCAN1 DETECTOR_PITCH 0.0 0.0 0.0 0.0 0.0 0.0

      # category DIFFRN_SCAN_FRAME
      loop_
      _diffrn_scan_frame.frame_id
      _diffrn_scan_frame.frame_number
      _diffrn_scan_frame.integration_time
      _diffrn_scan_frame.scan_id
      _diffrn_scan_frame.date
       FRAME1 1 20.0 SCAN1 1997-12-04T10:23:48

      # category DIFFRN_SCAN_FRAME_AXIS
      loop_
      _diffrn_scan_frame_axis.frame_id
      _diffrn_scan_frame_axis.axis_id
      _diffrn_scan_frame_axis.angle
      _diffrn_scan_frame_axis.displacement
       FRAME1 GONIOMETER_OMEGA 12.0 0.0
       FRAME1 GONIOMETER_KAPPA 23.3 0.0
       FRAME1 GONIOMETER_PHI -165.8 0.0
       FRAME1 DETECTOR_Z 0.0 -240.0
       FRAME1 DETECTOR_Y 0.0 0.6
       FRAME1 DETECTOR_X 0.0 -0.5
       FRAME1 DETECTOR_PITCH 0.0 0.0

      # category AXIS
      loop_
      _axis.id
      _axis.type
      _axis.equipment
      _axis.depends_on
      _axis.vector[1] _axis.vector[2] _axis.vector[3]
      _axis.offset[1] _axis.offset[2] _axis.offset[3]
       GONIOMETER_OMEGA rotation goniometer . 1 0 0 . . .
       GONIOMETER_KAPPA rotation goniometer GONIOMETER_OMEGA 0.64279
       0 0.76604 . . .
       GONIOMETER_PHI   rotation goniometer GONIOMETER_KAPPA 1 0 0
      . . .
       SOURCE           general source . 0 0 1 . . .
       GRAVITY          general gravity . 0 -1 0 . . .
       DETECTOR_Z       translation detector . 0 0 1 0 0 0
       DETECTOR_Y       translation detector DETECTOR_Z 0 1 0 0 0 0
       DETECTOR_X       translation detector DETECTOR_Y 1 0 0 0 0 0
       DETECTOR_PITCH   rotation    detector DETECTOR_X 0 1 0 0 0 0
       ELEMENT_X        translation detector DETECTOR_PITCH
      1 0 0 172.43 -172.43 0
       ELEMENT_Y        translation detector ELEMENT_X
      0 1 0 0 0 0

      # category ARRAY_STRUCTURE_LIST
      loop_
      _array_structure_list.array_id
      _array_structure_list.index
      _array_structure_list.dimension
      _array_structure_list.precedence
      _array_structure_list.direction
      _array_structure_list.axis_set_id
       ARRAY1 1 2300 1 increasing ELEMENT_X
       ARRAY1 2 2300 2 increasing ELEMENT_Y

      # category ARRAY_STRUCTURE_LIST_AXIS
      loop_
      _array_structure_list_axis.axis_set_id
      _array_structure_list_axis.axis_id
      _array_structure_list_axis.displacement
      _array_structure_list_axis.displacement_increment
       ELEMENT_X ELEMENT_X 0.075 0.150
       ELEMENT_Y ELEMENT_Y 0.075 0.150

      # category ARRAY_ELEMENT_SIZE
      loop_
      _array_element_size.array_id
      _array_element_size.index
      _array_element_size.size
       ARRAY1 1 150e-6
       ARRAY1 2 150e-6

      # category ARRAY_INTENSITIES
      loop_
      _array_intensities.array_id
      _array_intensities.binary_id
      _array_intensities.linearity
      _array_intensities.gain
      _array_intensities.gain_esd
      _array_intensities.overload
      _array_intensities.undefined_value
       ARRAY1 1 linear 1.15 0.2 240000 0

       # category ARRAY_STRUCTURE
       loop_
       _array_structure.id
       _array_structure.encoding_type
       _array_structure.compression_type
       _array_structure.byte_order
       ARRAY1 "signed 32-bit integer" packed little_endian

      # category ARRAY_DATA
      loop_
      _array_data.array_id
      _array_data.binary_id
      _array_data.data
       ARRAY1 1
      ;
      --CIF-BINARY-FORMAT-SECTION--
      Content-Type: application/octet-stream;
          conversions="X-CBF_PACKED"
      Content-Transfer-Encoding: BASE64
      X-Binary-Size: 3801324
      X-Binary-ID: 1
      X-Binary-Element-Type: "signed 32-bit integer"
      Content-MD5: 07lZFvF+aOcW85IN7usl8A==

      AABRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZBQSr1sKNBOeOe9HITdMdDUnbq7bg
      ...
      8REo6TtBrxJ1vKqAvx9YDMD6J18Qg83OMr/tgssjMIJMXATDsZobL90AEXc4KigE

      --CIF-BINARY-FORMAT-SECTION----
      ;
 ;

 ;   Example 3 - Example 2 revised for a spiral scan (R. M. Sweet,
     P. J. Ellis & H. J. Bernstein).

    A detector is placed 240 mm along the Z axis from the
    goniometer, as in Example 2 above, but in this example the
    image plate is scanned in a spiral pattern from the outside edge in.

    The axis for positioning the detector in the Y direction depends
    on the detector Z axis.  This axis is called DETECTOR_Y.

    The axis for positioning the detector in the X direction depends
    on the detector Y axis (and therefore on the detector Z axis).
    This axis is called DETECTOR_X.

    This detector may be rotated around the Y axis.  This rotation axis
    depends on the three translation axes.  It is called DETECTOR_PITCH.

    A coordinate system is defined on the face of the detector in
    terms of a coupled rotation axis and radial scan axis to form
    a spiral scan.  The rotation axis is called  ELEMENT_ROT  and the
    radial axis is called ELEMENT_RAD.  A 150 micrometre radial pitch
    and a 75 micrometre 'constant velocity' angular pitch are assumed.

    Indexing is carried out first on the rotation axis and the radial axis
    is made to be dependent on it.

    The two axes are coupled to form an axis set ELEMENT_SPIRAL.
 ;
 ;    ###CBF: VERSION 1.1

      data_image_1

      # category DIFFRN
      _diffrn.id P6MB
      _diffrn.crystal_id P6MB_CRYSTAL7

      # category DIFFRN_SOURCE
      loop_
      _diffrn_source.diffrn_id
      _diffrn_source.source
      _diffrn_source.type
       P6MB synchrotron 'SSRL beamline 9-1'

      # category DIFFRN_RADIATION
           loop_
      _diffrn_radiation.diffrn_id
      _diffrn_radiation.wavelength_id
      _diffrn_radiation.monochromator
      _diffrn_radiation.polarizn_source_ratio
      _diffrn_radiation.polarizn_source_norm
      _diffrn_radiation.div_x_source
      _diffrn_radiation.div_y_source
      _diffrn_radiation.div_x_y_source
       P6MB WAVELENGTH1 'Si 111' 0.8 0.0 0.08
      0.01 0.00

      # category DIFFRN_RADIATION_WAVELENGTH
      loop_
      _diffrn_radiation_wavelength.id
      _diffrn_radiation_wavelength.wavelength
      _diffrn_radiation_wavelength.wt
       WAVELENGTH1 0.98 1.0

      # category DIFFRN_DETECTOR
      loop_
      _diffrn_detector.diffrn_id
      _diffrn_detector.id
      _diffrn_detector.type
      _diffrn_detector.number_of_axes
       P6MB MAR345-SN26 'MAR 345' 4

      # category DIFFRN_DETECTOR_AXIS
      loop_
      _diffrn_detector_axis.detector_id
      _diffrn_detector_axis.axis_id
       MAR345-SN26 DETECTOR_X
       MAR345-SN26 DETECTOR_Y
       MAR345-SN26 DETECTOR_Z
       MAR345-SN26 DETECTOR_PITCH

      # category DIFFRN_DETECTOR_ELEMENT
      loop_
      _diffrn_detector_element.id
      _diffrn_detector_element.detector_id
       ELEMENT1 MAR345-SN26

      # category DIFFRN_DATA_FRAME
      loop_
      _diffrn_data_frame.id
      _diffrn_data_frame.detector_element_id
      _diffrn_data_frame.array_id
      _diffrn_data_frame.binary_id
       FRAME1 ELEMENT1 ARRAY1 1

      # category DIFFRN_MEASUREMENT
      loop_
      _diffrn_measurement.diffrn_id
      _diffrn_measurement.id
      _diffrn_measurement.number_of_axes
      _diffrn_measurement.method
       P6MB GONIOMETER 3 rotation

      # category DIFFRN_MEASUREMENT_AXIS
      loop_
      _diffrn_measurement_axis.measurement_id
      _diffrn_measurement_axis.axis_id
       GONIOMETER GONIOMETER_PHI
       GONIOMETER GONIOMETER_KAPPA
       GONIOMETER GONIOMETER_OMEGA

      # category DIFFRN_SCAN
      loop_
      _diffrn_scan.id
      _diffrn_scan.frame_id_start
      _diffrn_scan.frame_id_end
      _diffrn_scan.frames
       SCAN1 FRAME1 FRAME1 1

      # category DIFFRN_SCAN_AXIS
      loop_
      _diffrn_scan_axis.scan_id
      _diffrn_scan_axis.axis_id
      _diffrn_scan_axis.angle_start
      _diffrn_scan_axis.angle_range
      _diffrn_scan_axis.angle_increment
      _diffrn_scan_axis.displacement_start
      _diffrn_scan_axis.displacement_range
      _diffrn_scan_axis.displacement_increment
       SCAN1 GONIOMETER_OMEGA 12.0 1.0 1.0 0.0 0.0 0.0
       SCAN1 GONIOMETER_KAPPA 23.3 0.0 0.0 0.0 0.0 0.0
       SCAN1 GONIOMETER_PHI -165.8 0.0 0.0 0.0 0.0 0.0
       SCAN1 DETECTOR_Z 0.0 0.0 0.0 -240.0 0.0 0.0
       SCAN1 DETECTOR_Y 0.0 0.0 0.0 0.6 0.0 0.0
       SCAN1 DETECTOR_X 0.0 0.0 0.0 -0.5 0.0 0.0
       SCAN1 DETECTOR_PITCH 0.0 0.0 0.0 0.0 0.0 0.0

      # category DIFFRN_SCAN_FRAME
      loop_
      _diffrn_scan_frame.frame_id
      _diffrn_scan_frame.frame_number
      _diffrn_scan_frame.integration_time
      _diffrn_scan_frame.scan_id
      _diffrn_scan_frame.date
       FRAME1 1 20.0 SCAN1 1997-12-04T10:23:48

      # category DIFFRN_SCAN_FRAME_AXIS
      loop_
      _diffrn_scan_frame_axis.frame_id
      _diffrn_scan_frame_axis.axis_id
      _diffrn_scan_frame_axis.angle
      _diffrn_scan_frame_axis.displacement
       FRAME1 GONIOMETER_OMEGA 12.0 0.0
       FRAME1 GONIOMETER_KAPPA 23.3 0.0
       FRAME1 GONIOMETER_PHI -165.8 0.0
       FRAME1 DETECTOR_Z 0.0 -240.0
       FRAME1 DETECTOR_Y 0.0 0.6
       FRAME1 DETECTOR_X 0.0 -0.5
       FRAME1 DETECTOR_PITCH 0.0 0.0

      # category AXIS
      loop_
      _axis.id
      _axis.type
      _axis.equipment
      _axis.depends_on
      _axis.vector[1] _axis.vector[2] _axis.vector[3]
      _axis.offset[1] _axis.offset[2] _axis.offset[3]
       GONIOMETER_OMEGA rotation goniometer . 1 0 0 . . .
       GONIOMETER_KAPPA rotation goniometer GONIOMETER_OMEGA 0.64279
       0 0.76604 . . .
       GONIOMETER_PHI   rotation goniometer GONIOMETER_KAPPA 1 0 0
      . . .
       SOURCE           general source . 0 0 1 . . .
       GRAVITY          general gravity . 0 -1 0 . . .
       DETECTOR_Z       translation detector . 0 0 1 0 0 0
       DETECTOR_Y       translation detector DETECTOR_Z 0 1 0 0 0 0
       DETECTOR_X       translation detector DETECTOR_Y 1 0 0 0 0 0
       DETECTOR_PITCH   rotation    detector DETECTOR_X 0 1 0 0 0 0
       ELEMENT_ROT      translation detector DETECTOR_PITCH 0 0 1 0 0 0
       ELEMENT_RAD      translation detector ELEMENT_ROT 0 1 0 0 0 0

      # category ARRAY_STRUCTURE_LIST
      loop_
      _array_structure_list.array_id
      _array_structure_list.index
      _array_structure_list.dimension
      _array_structure_list.precedence
      _array_structure_list.direction
      _array_structure_list.axis_set_id
       ARRAY1 1 8309900 1 increasing ELEMENT_SPIRAL

      # category ARRAY_STRUCTURE_LIST_AXIS
      loop_
      _array_structure_list_axis.axis_set_id
      _array_structure_list_axis.axis_id
      _array_structure_list_axis.angle
      _array_structure_list_axis.displacement
      _array_structure_list_axis.angular_pitch
      _array_structure_list_axis.radial_pitch
       ELEMENT_SPIRAL ELEMENT_ROT 0    .  0.075   .
       ELEMENT_SPIRAL ELEMENT_RAD . 172.5  .    -0.150

      # category ARRAY_ELEMENT_SIZE
      # the actual pixels are 0.075 by 0.150 mm
      # We give the coarser dimension here.
      loop_
      _array_element_size.array_id
      _array_element_size.index
      _array_element_size.size
       ARRAY1 1 150e-6

      # category ARRAY_INTENSITIES
      loop_
      _array_intensities.array_id
      _array_intensities.binary_id
      _array_intensities.linearity
      _array_intensities.gain
      _array_intensities.gain_esd
      _array_intensities.overload
      _array_intensities.undefined_value
       ARRAY1 1 linear 1.15 0.2 240000 0

       # category ARRAY_STRUCTURE
       loop_
       _array_structure.id
       _array_structure.encoding_type
       _array_structure.compression_type
       _array_structure.byte_order
       ARRAY1 "signed 32-bit integer" packed little_endian

      # category ARRAY_DATA
      loop_
      _array_data.array_id
      _array_data.binary_id
      _array_data.data
       ARRAY1 1
      ;
      --CIF-BINARY-FORMAT-SECTION--
      Content-Type: application/octet-stream;
          conversions="X-CBF_PACKED"
      Content-Transfer-Encoding: BASE64
      X-Binary-Size: 3801324
      X-Binary-ID: 1
      X-Binary-Element-Type: "signed 32-bit integer"
      Content-MD5: 07lZFvF+aOcW85IN7usl8A==

      AABRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZBQSr1sKNBOeOe9HITdMdDUnbq7bg
      ...
      8REo6TtBrxJ1vKqAvx9YDMD6J18Qg83OMr/tgssjMIJMXATDsZobL90AEXc4KigE

      --CIF-BINARY-FORMAT-SECTION----
      ;
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _diffrn_scan.id -->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
    
     _diffrn_scan.date_end ENDDATETIME-->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /end_time=ENDDATETIME
    
     _diffrn_scan.date_start STARTDATETIME-->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /start_time=STARTDATETIME
    
     _diffrn_scan.integration_time AVGCOUNTTIME -->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /average_count_time=AVGCOUNTTIME
             /@units="sec"
    
     _diffrn_scan.frame_id_start FRAMESTARTID -->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /frame_start_number=FRAMESTARTNO
     where FRAMESTARTNO is the value of _diffrn_scan_frame.frame_number
     for which the value of _diffrn_scan_frame.frame_id equals FRAMESTARTID
    
     _diffrn_scan.frame_id_end FRAMEENDID
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /frame_end_number=FRAMEENDNO
     where FRAMEENDNO is the value of _diffrn_scan_frame.frame_number
     for which the value of
     _diffrn_scan_frame.frame_id equals FRAMEENDID
    
     _diffrn_scan.frames FRAMES -->
     carried in NeXus as the slow dimension of arrays that are organized
     by frame.
    
     _diffrn_scan.time_period TIMEPER -->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /frame_time=TIMEPER
             /@units="sec"
    
     _diffrn_scan.time_rstrt_incr RSTRTTIME -->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /frame_restart_time=RSTRTTIME
             /@units="sec"
    
     _diffrn_scan.variant --> ??
         NeXus does not handle variants at this time
    
          
 ;
        save_


 save__diffrn_scan.id
     _item_description.description
 ;             The value of _diffrn_scan.id uniquely identifies each
               scan.  The identifier is used to tie together all the
               information about the scan.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
        '_diffrn_scan.id'                 DIFFRN_SCAN             yes
        '_diffrn_scan_axis.scan_id'       DIFFRN_SCAN_AXIS        yes
        '_diffrn_scan_frame.scan_id'      DIFFRN_SCAN_FRAME       yes
     _item_type.code               code
      loop_
     _item_linked.child_name
     _item_linked.parent_name
        '_diffrn_scan_axis.scan_id'          '_diffrn_scan.id'
        '_diffrn_scan_frame.scan_id'         '_diffrn_scan.id'
      save_


 save__diffrn_scan.date_end
     _item_description.description
 ;              The date and time of the end of the scan.  Note that this
                may be an estimate generated during the scan, before the
                precise time of the end of the scan is known.
 ;
     _item.name                 '_diffrn_scan.date_end'
     _item.category_id          DIFFRN_SCAN
     _item.mandatory_code       no
     _item_type.code            yyyy-mm-dd
      save_


 save__diffrn_scan.date_start
     _item_description.description
 ;              The date and time of the start of the scan.
 ;
     _item.name                 '_diffrn_scan.date_start'
     _item.category_id          DIFFRN_SCAN
     _item.mandatory_code       no
     _item_type.code            yyyy-mm-dd
      save_


 save__diffrn_scan.integration_time
     _item_description.description
 ;              Approximate average time in seconds to integrate each
                step of the scan.  The precise time for integration
                of each particular step must be provided in
                _diffrn_scan_frame.integration_time, even
                if all steps have the same integration time.
 ;
     _item.name                 '_diffrn_scan.integration_time'
     _item.category_id          DIFFRN_SCAN
     _item.mandatory_code       no
     _item_type.code            float
     _item_units.code           'seconds'
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
      save_


 save__diffrn_scan.frame_id_start
     _item_description.description
 ;              The value of this data item is the identifier of the
                first frame in the scan.

                This item is a pointer to _diffrn_data_frame.id in the
                DIFFRN_DATA_FRAME category.
 ;
     _item.name                 '_diffrn_scan.frame_id_start'
     _item.category_id          DIFFRN_SCAN
     _item.mandatory_code       yes
     _item_type.code            code
      save_


 save__diffrn_scan.frame_id_end
     _item_description.description
 ;              The value of this data item is the identifier of the
                last frame in the scan.

                This item is a pointer to _diffrn_data_frame.id in the
                DIFFRN_DATA_FRAME category.
 ;
     _item.name                 '_diffrn_scan.frame_id_end'
     _item.category_id          DIFFRN_SCAN
     _item.mandatory_code       yes
     _item_type.code            code
      save_


 save__diffrn_scan.frames
     _item_description.description
 ;              The value of this data item is the number of frames in
                the scan.
 ;
     _item.name                 '_diffrn_scan.frames'
     _item.category_id          DIFFRN_SCAN
     _item.mandatory_code       no
     _item_type.code            int
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   1
                             1   1
      save_
     
 save__diffrn_scan.time_period
     _item_description.description
 ;              Approximate average time in seconds between the start
                of each step of the scan.  The precise start-to-start
                time increment of each particular step may be provided in
                _diffrn_scan_frame.time_period.
 ;
     _item.name                 '_diffrn_scan.time_period'
     _item.category_id          DIFFRN_SCAN
     _item.mandatory_code       no
     _item_type.code            float
     _item_units.code           'seconds'
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
      save_


 save__diffrn_scan.time_rstrt_incr
     _item_description.description
 ;              Approximate average time in seconds between the end
                of integration of each step of the scan than the start
                of integration of the next step.
              
                In general, this will agree with
                _diffrn_scan_frame.time_rstrt_incr.  The
                sum of the values of _diffrn_scan_frame.integration_time
                and  _diffrn_scan_frame.time_rstrt_incr is the
                time from the start of integration of one frame and the start of
                integration for the next frame and should equal the value of
                _diffrn_scan_frame.time_period for this
                frame.   If the individual frame values vary, then the value of
                _diffrn_scan.time_rstrt_incr will be
                representative of the ensemble of values of
                _diffrn_scan_frame_axis.time_rstrt_incr (e.g.
                the mean).
 ;
     _item.name                 '_diffrn_scan.time_rstrt_incr'
     _item.category_id          DIFFRN_SCAN
     _item.mandatory_code       no
     _item_type.code            float
     _item_units.code           'seconds'
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
      save_


 save__diffrn_scan.variant
     _item_description.description
 ;             The value of _diffrn_scan.variant gives the variant
               to which the given DIFFRN_SCAN row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.

              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_scan.variant'
     _item.category_id             DIFFRN_SCAN
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 ####################
 # DIFFRN_SCAN_AXIS #
 ####################

 save_diffrn_scan_axis
     _category.description
 ;    Data items in the DIFFRN_SCAN_AXIS category describe the settings of
      axes for particular scans.  Unspecified axes are assumed to be at
      their zero points.
 ;
     _category.id                   DIFFRN_SCAN_AXIS
     _category.mandatory_code       no
      loop_
     _category_key.name
                                   '_diffrn_scan_axis.scan_id'
                                   '_diffrn_scan_axis.axis_id'
                                   '_diffrn_scan_axis.variant'
      loop_
     _category_group.id           'inclusive_group'
                                  'diffrn_group'
     _category.NX_mapping_details
 ;
    
     _diffrn_scan_axis.axis_id AXISID-->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@CBF_axis_id=AXISID
     placed under the NXdetector or NXgoniometer to which
     the axis belongs.
    
     _diffrn_scan_axis.angle_start ANGSTART -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__angle_start=ANGSTART
    
     _diffrn_scan_axis.angle_range ANGRANGE -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__angle_range=ANGRANGE
    
     _diffrn_scan_axis.angle_increment ANGINC -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__angle_increment=ANGINC
    
     _diffrn_scan_axis.angle_rstrt_incr ANGRSTRT -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__angle_rstrt_incr=ANGRSTRT
    
     _diffrn_scan_axis.displacement_start DISPSTART -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__displacement_start=DISPSTART
    
     _diffrn_scan_axis.displacement_range DISPRANGE -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__displacement_range=DISPRANGE
    
     _diffrn_scan_axis.displacement_increment DISPINC -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__displacement_increment=DISPINC
    
     _diffrn_scan_axis.displacement_rstrt_incr DISPRSTRT -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__displacement_rstrt_incr=DISPRSTRT
    
     _diffrn_scan_axis.reference_angle ANG -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__reference_angle=ANG
    
     _diffrn_scan_axis.reference_displacement DISP -->
               /CBF_diffrn_scan_axis__AXISID=[]
                 /@diffrn_scan_axis__reference_displacement=DISP
    
     _diffrn_scan_axis.scan_id SCANID-->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
    
     _diffrn_scan_axis.variant --> ??
         NeXus does not handle variants at this time
    
 ;
      save_


 save__diffrn_scan_axis.scan_id
     _item_description.description
 ;              The value of this data item is the identifier of the
                scan for which axis settings are being specified.

                Multiple axes may be specified for the same value of
                _diffrn_scan.id.

                This item is a pointer to _diffrn_scan.id in the
                DIFFRN_SCAN category.
 ;
     _item.name                 '_diffrn_scan_axis.scan_id'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       yes
     _item_type.code            code
      save_


 save__diffrn_scan_axis.axis_id
     _item_description.description
 ;              The value of this data item is the identifier of one of
                the axes for the scan for which settings are being specified.

                Multiple axes may be specified for the same value of
                _diffrn_scan.id.

                This item is a pointer to _axis.id in the
                AXIS category.
 ;
     _item.name                 '_diffrn_scan_axis.axis_id'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       yes
     _item_type.code            code
      save_


 save__diffrn_scan_axis.angle_start
     _item_description.description
 ;              The starting position for the specified axis in degrees.
 ;
     _item.name                 '_diffrn_scan_axis.angle_start'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'degrees'
      save_


 save__diffrn_scan_axis.angle_range
     _item_description.description
 ;              The range from the starting position for the specified axis
                in degrees.
 ;
     _item.name                 '_diffrn_scan_axis.angle_range'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'degrees'
      save_


 save__diffrn_scan_axis.angle_increment
     _item_description.description
 ;              The increment for each step for the specified axis
                in degrees.  In general, this will agree with
                _diffrn_scan_frame_axis.angle_increment. The
                sum of the values of _diffrn_scan_frame_axis.angle and
                _diffrn_scan_frame_axis.angle_increment is the
                angular setting of the axis at the end of the integration
                time for a given frame.  If the individual frame values
                vary, then the value of
                _diffrn_scan_axis.angle_increment will be
                representative
                of the ensemble of values of
                _diffrn_scan_frame_axis.angle_increment (e.g.
                the mean).
 ;
     _item.name                 '_diffrn_scan_axis.angle_increment'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'degrees'
      save_


 save__diffrn_scan_axis.angle_rstrt_incr
     _item_description.description
 ;              The increment after each step for the specified axis
                in degrees.  In general, this will agree with
                _diffrn_scan_frame_axis.angle_rstrt_incr.  The
                sum of the values of _diffrn_scan_frame_axis.angle,
                _diffrn_scan_frame_axis.angle_increment
                and  _diffrn_scan_frame_axis.angle_rstrt_incr is the
                angular setting of the axis at the start of the integration
                time for the next frame relative to a given frame and
                should equal _diffrn_scan_frame_axis.angle for this
                next frame.   If the individual frame values
                vary, then the value of
                _diffrn_scan_axis.angle_rstrt_incr will be
                representative
                of the ensemble of values of
                _diffrn_scan_frame_axis.angle_rstrt_incr (e.g.
                the mean).
 ;
     _item.name                 '_diffrn_scan_axis.angle_rstrt_incr'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'degrees'
      save_


 save__diffrn_scan_axis.displacement_start
     _item_description.description
 ;              The starting position for the specified axis in millimetres.
 ;
     _item.name                 '_diffrn_scan_axis.displacement_start'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_


 save__diffrn_scan_axis.displacement_range
     _item_description.description
 ;              The range from the starting position for the specified axis
                in millimetres.
 ;
     _item.name                 '_diffrn_scan_axis.displacement_range'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_


 save__diffrn_scan_axis.displacement_increment
     _item_description.description
 ;              The increment for each step for the specified axis
                in millimetres.  In general, this will agree with
                _diffrn_scan_frame_axis.displacement_increment.
                The sum of the values of
                _diffrn_scan_frame_axis.displacement and
                _diffrn_scan_frame_axis.displacement_increment is the
                angular setting of the axis at the end of the integration
                time for a given frame.  If the individual frame values
                vary, then the value of
                _diffrn_scan_axis.displacement_increment will be
                representative
                of the ensemble of values of
                _diffrn_scan_frame_axis.displacement_increment (e.g.
                the mean).
 ;
     _item.name                 '_diffrn_scan_axis.displacement_increment'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_


 save__diffrn_scan_axis.displacement_rstrt_incr
     _item_description.description
 ;              The increment for each step for the specified axis
                in millimetres.  In general, this will agree with
                _diffrn_scan_frame_axis.displacement_rstrt_incr.
                The sum of the values of
                _diffrn_scan_frame_axis.displacement,
                _diffrn_scan_frame_axis.displacement_increment and
                _diffrn_scan_frame_axis.displacement_rstrt_incr is the
                angular setting of the axis at the start of the integration
                time for the next frame relative to a given frame and
                should equal _diffrn_scan_frame_axis.displacement
                for this next frame.  If the individual frame values
                vary, then the value of
                _diffrn_scan_axis.displacement_rstrt_incr will be
                representative
                of the ensemble of values of
                _diffrn_scan_frame_axis.displacement_rstrt_incr (e.g.
                the mean).
 ;
     _item.name                 '_diffrn_scan_axis.displacement_rstrt_incr'
     _item.category_id          DIFFRN_SCAN_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_

 save__diffrn_scan_axis.reference_angle
      _item_description.description
 ;              The setting of the specified axis in degrees
                against which measurements of the reference beam center
                and reference detector distance should be made.

                In general, this will agree with
                _diffrn_scan_frame_axis.reference_angle.

                If the individual frame values vary, then the value of
                _diffrn_scan_axis.reference_angle will be
                representative of the ensemble of values of
                _diffrn_scan_frame_axis.reference_angle (e.g.
                the mean).

                If not specified, the value defaults to zero.
 ;
      _item.name                 '_diffrn_scan_axis.reference_angle'
      _item.category_id          DIFFRN_SCAN_AXIS
      _item.mandatory_code       implicit
      _item_default.value        0.0
      _item_type.code            float
      _item_units.code           'degrees'
       save_


 save__diffrn_scan_axis.reference_displacement
      _item_description.description
 ;              The setting of the specified axis in millimetres
                against which measurements of the reference beam center
                and reference detector distance should be made.

                In general, this will agree with
                _diffrn_scan_frame_axis.reference_displacement.

                If the individual frame values vary, then the value of
                _diffrn_scan_axis.reference_displacement will be
                representative of the ensemble of values of
                _diffrn_scan_frame_axis.reference_displacement (e.g.
                the mean).

                If not specified, the value defaults to to the value of
                _diffrn_scan_axis.displacement.
 ;
      _item.name                 '_diffrn_scan_axis.reference_displacement'
      _item.category_id          DIFFRN_SCAN_AXIS
      _item.mandatory_code       implicit
      _item_type.code            float
      _item_units.code           'millimetres'
       save_

 save__diffrn_scan_axis.variant
     _item_description.description
 ;             The value of _diffrn_scan_axis.variant gives the variant
               to which the given DIFFRN_SCAN_AXIS row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_scan_axis.variant'
     _item.category_id             DIFFRN_SCAN_AXIS
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 #####################
 # DIFFRN_SCAN_FRAME #
 #####################

 save_diffrn_scan_frame
     _category.description
 ;           Data items in the DIFFRN_SCAN_FRAME category describe
             the relationships of particular frames to scans.
 ;
     _category.id                   DIFFRN_SCAN_FRAME
     _category.mandatory_code       no
      loop_
     _category_key.name
                                   '_diffrn_scan_frame.scan_id'
                                   '_diffrn_scan_frame.frame_id'
                                   '_diffrn_scan_frame.variant'
      loop_
     _category_group.id            'inclusive_group'
                                   'diffrn_group'
     _category.NX_mapping_details
 ;
    
     _diffrn_scan_frame.date DATETIME-->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /CBF_diffrn_scan_frame__date=DATES
     inserts DATETIME as the element at index _diffrn_scan_frame.frame_number
     in the array DATES
    
     _diffrn_scan_frame.frame_id ID -->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /CBF_diffrn_scan_frame__frame_id=IDS
     inserts ID  as the element at index _diffrn_scan_frame.frame_number
     in the array IDS
    
     _diffrn_scan_frame.frame_number -->
     is the slow index for each of the arrays in this category??
    
     _diffrn_scan_frame.integration_time COUNTTIME -->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /count_time=COUNTTIMES
     inserts COUNTTIME  as the element at index _diffrn_scan_frame.frame_number
     in the array COUNTTIMES
    
     _diffrn_scan_frame.scan_id -->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
    
     _diffrn_scan_frame.time_period FRAMETIME -->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /frame_time=FRAMETIMES
     inserts FRAMETIME  as the element at index _diffrn_scan_frame.frame_number
     in the array FRAMETIMES
    
    
     _diffrn_scan_frame.time_rstrt_incr RSTRTTIME -->
         /CBF_diffrn_scan__SCANID:NXentry
           /CBF_scan_id="SCANID"
           /frame_restart_time=RSTRTTIMES
     inserts RSTRTTIME  as the element at index _diffrn_scan_frame.frame_number
     in the array RSTRTTIMES
    
    
     _diffrn_scan_frame.variant --> ??
         NeXus does not handle variants at this time
    
          

 ;
      save_


 save__diffrn_scan_frame.date
     _item_description.description
 ;              The date and time of the start of the frame being scanned.
 ;
     _item.name                 '_diffrn_scan_frame.date'
     _item.category_id          DIFFRN_SCAN_FRAME
     _item.mandatory_code       no
     _item_type.code            yyyy-mm-dd
      save_


 save__diffrn_scan_frame.frame_id
     _item_description.description
 ;              The value of this data item is the identifier of the
                frame being examined.

                This item is a pointer to _diffrn_data_frame.id in the
                DIFFRN_DATA_FRAME category.
 ;
     _item.name                 '_diffrn_scan_frame.frame_id'
     _item.category_id          DIFFRN_SCAN_FRAME
     _item.mandatory_code       yes
     _item_type.code            code
      save_


 save__diffrn_scan_frame.frame_number
     _item_description.description
 ;              The value of this data item is the number of the frame
                within the scan, starting with 1.  It is not necessarily
                the same as the value of _diffrn_scan_frame.frame_id,
                but it may be.

 ;
     _item.name                 '_diffrn_scan_frame.frame_number'
     _item.category_id          DIFFRN_SCAN_FRAME
     _item.mandatory_code       no
     _item_type.code            int
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0
                             0   0
      save_


 save__diffrn_scan_frame.integration_time
     _item_description.description
 ;              The time in seconds to integrate this step of the scan.
                This should be the precise time of integration of each
                particular frame.  The value of this data item should
                be given explicitly for each frame and not inferred
                from the value of _diffrn_scan.integration_time.
 ;
     _item.name                 '_diffrn_scan_frame.integration_time'
     _item.category_id          DIFFRN_SCAN_FRAME
     _item.mandatory_code       yes
     _item_type.code            float
     _item_units.code           'seconds'
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
      save_


 save__diffrn_scan_frame.scan_id
     _item_description.description
 ;             The value of _diffrn_scan_frame.scan_id identifies the scan
               containing this frame.

               This item is a pointer to _diffrn_scan.id in the
               DIFFRN_SCAN category.
 ;
     _item.name             '_diffrn_scan_frame.scan_id'
     _item.category_id        DIFFRN_SCAN_FRAME
     _item.mandatory_code     yes
     _item_type.code          code
      save_
     
     
 save__diffrn_scan_frame.time_period
     _item_description.description
 ;              The time in seconds between the start of this frame and the
                start of the next frame, if any.  If there is no next frame,
                a null value should be given.
 ;
     _item.name                 '_diffrn_scan_frame.time_period'
     _item.category_id          DIFFRN_SCAN_FRAME
     _item.mandatory_code       no
     _item_type.code            float
     _item_units.code           'seconds'
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
      save_


 save__diffrn_scan_frame.time_rstrt_incr
     _item_description.description
 ;              The time in seconds between the end of integration of this step of the scan
                and the start of integration of the next step.
              
                The sum of the values of _diffrn_scan_frame.integration_time
                and  _diffrn_scan_frame.time_rstrt_incr is the
                time from the start of integration of one frame and the start of
                integration for the next frame and should equal the value of
                _diffrn_scan_frame.time_period for this
                frame.   The value of _diffrn_scan.time_rstrt_incr will be
                representative of the ensemble of values of
                _diffrn_scan_frame_axis.time_rstrt_incr (e.g.
                the mean).
               
                If there is no next frame, a null value should be given.
 ;
     _item.name                 '_diffrn_scan.time_rstrt_incr'
     _item.category_id          DIFFRN_SCAN_FRAME
     _item.mandatory_code       no
     _item_type.code            float
     _item_units.code           'seconds'
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
      save_


 save__diffrn_scan_frame.variant
     _item_description.description
 ;             The value of _diffrn_scan_frame.variant gives the variant
               to which the given DIFFRN_SCAN_FRAME row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
              
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_scan_frame.variant'
     _item.category_id             DIFFRN_SCAN_FRAME
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 ##########################
 # DIFFRN_SCAN_FRAME_AXIS #
 ##########################

 save_diffrn_scan_frame_axis
     _category.description
 ;    Data items in the DIFFRN_SCAN_FRAME_AXIS category describe the
      settings of axes for particular frames.  Unspecified axes are
      assumed to be at their zero points.  If, for any given frame,
      nonzero values apply for any of the data items in this category,
      those values should be given explicitly in this category and not
      simply inferred from values in DIFFRN_SCAN_AXIS.
 ;
     _category.id                   DIFFRN_SCAN_FRAME_AXIS
     _category.mandatory_code       no
      loop_
     _category_key.name
                                   '_diffrn_scan_frame_axis.frame_id'
                                   '_diffrn_scan_frame_axis.axis_id'
                                   '_diffrn_scan_frame_axis.variant'
      loop_
     _category_group.id           'inclusive_group'
                                  'diffrn_group'
     _category.NX_mapping_details
 ;
    
     _diffrn_scan_frame_axis.axis_id AXISID-->
     /instrument:NXinstrument
       /CBF_diffrn_detector__DETECTORNAME:NXdetector
         /CBF_diffrn_scan_axis__AXISID=[]
     for _axis.equipment=="detector" for _axis.id==AXISID
     /instrument:NXinstrument
       /CBF_diffrn_measurement__GONIOMETERNAME:NXgoniometer
         /CBF_diffrn_scan_axis__AXISID=[]
     for _axis.equipment=="goniometer" for _axis.id==AXISID
     /instrument:NXinstrument
       /coordinate_system:NXcoordinate_system
         /CBF_diffrn_scan_axis__AXISID=[]
     for _axis.equipment=="general" for _axis.id==AXISID
     note that @units="mm" or @units="deg" should also be specified.
    
     The dimensions of the array depend on np (the number of frames = the
     value of _diffrn_scan.frames), and the presence of any of the
     ..._increment and ..._rstrt values.  Using Fortran memory layout
     for this discussion, if the increments are
     present, the array is a 2-dimensional np by 3 array, with np
     as the fast axis and the [np,1] column being the settings,
     the [np,2] column being the increments, and the [np,3] column
     being the restart increments.  If the ...reference_... values are
     present, the the array is extended with be np by 4 array with
     the last column handling the ...reference_... values   If the
     frame-by-frame increments and reference values are not present
     the array is a 1-dimensional array of np settings.
    
    
     _diffrn_scan_frame_axis.angle ANGLE -->
         inserts this as the i-th element, counting from 1,
         in /CBF_diffrn_scan_axis__AXISID
         if this is a rotation axis, where i is the value of
         _diffrn_scan_frame.frame_number for which the value
         of _diffrn_scan_frame.frame_id agrees with the
         value of _diffrn_scan_frame_axis.frame_id
    
     _diffrn_scan_frame_axis.angle_increment -->
         see _diffrn_scan_frame_axis.axis_id
    
     _diffrn_scan_frame_axis.angle_rstrt_incr -->
         see _diffrn_scan_frame_axis.axis_id
    
     _diffrn_scan_frame_axis.displacement DISP -->
         inserts this as the i-th element, counting from 1,
         in /CBF_diffrn_scan_axis__AXISID
         if this is a translation axis, where $i$ is the value of
         _diffrn_scan_frame.frame_number for which the value
         of _diffrn_scan_frame.frame_id agrees with the
         value of _diffrn_scan_frame_axis.frame_id
    
     _diffrn_scan_frame_axis.displacement_increment -->
         see _diffrn_scan_frame_axis.axis_id
    
     _diffrn_scan_frame_axis.displacement_rstrt_incr -->
         see _diffrn_scan_frame_axis.axis_id
    
     _diffrn_scan_frame_axis.reference_angle -->
        see _diffrn_scan_frame_axis.axis_id
    
     _diffrn_scan_frame_axis.reference_displacement -->
         see _diffrn_scan_frame_axis.axis_id
    
     _diffrn_scan_frame_axis.frame_id -->
     used to find the frame number
    
     _diffrn_scan_frame_axis.variant category -->
         NeXus does not handle variants at this time
    
          
 ;
      save_


 save__diffrn_scan_frame_axis.axis_id
     _item_description.description
 ;              The value of this data item is the identifier of one of
                the axes for the frame for which settings are being specified.

                Multiple axes may be specified for the same value of
                _diffrn_scan_frame.frame_id.

                This item is a pointer to _axis.id in the
                AXIS category.
 ;
     _item.name                 '_diffrn_scan_frame_axis.axis_id'
     _item.category_id          DIFFRN_SCAN_FRAME_AXIS
     _item.mandatory_code       yes
     _item_type.code            code
      save_


 save__diffrn_scan_frame_axis.angle
     _item_description.description
 ;              The setting of the specified axis in degrees for this frame.
                This is the setting at the start of the integration time.
 ;
     _item.name                 '_diffrn_scan_frame_axis.angle'
     _item.category_id          DIFFRN_SCAN_FRAME_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'degrees'
      save_


 save__diffrn_scan_frame_axis.angle_increment
     _item_description.description
 ;              The increment for this frame for the angular setting of
                the specified axis in degrees.  The sum of the values
                of _diffrn_scan_frame_axis.angle and
                _diffrn_scan_frame_axis.angle_increment is the
                angular setting of the axis at the end of the integration
                time for this frame.
 ;
     _item.name                 '_diffrn_scan_frame_axis.angle_increment'
     _item.category_id          DIFFRN_SCAN_FRAME_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'degrees'
      save_


 save__diffrn_scan_frame_axis.angle_rstrt_incr
     _item_description.description
 ;              The increment after this frame for the angular setting of
                the specified axis in degrees.  The sum of the values
                of _diffrn_scan_frame_axis.angle,
                _diffrn_scan_frame_axis.angle_increment and
                _diffrn_scan_frame_axis.angle_rstrt_incr is the
                angular setting of the axis at the start of the integration
                time for the next frame and should equal
                _diffrn_scan_frame_axis.angle for this next frame.
 ;
     _item.name               '_diffrn_scan_frame_axis.angle_rstrt_incr'
     _item.category_id          DIFFRN_SCAN_FRAME_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'degrees'
      save_


 save__diffrn_scan_frame_axis.displacement
     _item_description.description
 ;              The setting of the specified axis in millimetres for this
                frame.  This is the setting at the start of the integration
                time.
 ;
     _item.name               '_diffrn_scan_frame_axis.displacement'
     _item.category_id          DIFFRN_SCAN_FRAME_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_


 save__diffrn_scan_frame_axis.displacement_increment
     _item_description.description
 ;              The increment for this frame for the displacement setting of
                the specified axis in millimetres.  The sum of the values
                of _diffrn_scan_frame_axis.displacement and
                _diffrn_scan_frame_axis.displacement_increment is the
                angular setting of the axis at the end of the integration
                time for this frame.
 ;
     _item.name               '_diffrn_scan_frame_axis.displacement_increment'
     _item.category_id          DIFFRN_SCAN_FRAME_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_


 save__diffrn_scan_frame_axis.displacement_rstrt_incr
     _item_description.description
 ;              The increment for this frame for the displacement setting of
                the specified axis in millimetres.  The sum of the values
                of _diffrn_scan_frame_axis.displacement,
                _diffrn_scan_frame_axis.displacement_increment and
                _diffrn_scan_frame_axis.displacement_rstrt_incr is the
                angular setting of the axis at the start of the integration
                time for the next frame and should equal
                _diffrn_scan_frame_axis.displacement for this next frame.
 ;
     _item.name               '_diffrn_scan_frame_axis.displacement_rstrt_incr'
     _item.category_id          DIFFRN_SCAN_FRAME_AXIS
     _item.mandatory_code       no
     _item_default.value        0.0
     _item_type.code            float
     _item_units.code           'millimetres'
      save_

 save__diffrn_scan_frame_axis.frame_id
     _item_description.description
 ;              The value of this data item is the identifier of the
                frame for which axis settings are being specified.

                Multiple axes may be specified for the same value of
                _diffrn_scan_frame.frame_id.

                This item is a pointer to _diffrn_data_frame.id in the
                DIFFRN_DATA_FRAME category.
 ;
     _item.name               '_diffrn_scan_frame_axis.frame_id'
     _item.category_id          DIFFRN_SCAN_FRAME_AXIS
     _item.mandatory_code       yes
     _item_type.code            code
      save_

 save__diffrn_scan_frame_axis.reference_angle
      _item_description.description
 ;              The setting of the specified axis in degrees
                against which measurements of the reference beam center
                and reference detector distance should be made.

                This is normally the same for all frames, but the
                option is provided here of making changes when
                needed.

                If not provided, it is assumed to be zero.
 ;
      _item.name               '_diffrn_scan_frame_axis.reference_angle'
      _item.category_id          DIFFRN_SCAN_FRAME_AXIS
      _item.mandatory_code       implicit
      _item_default.value        0.0
      _item_type.code            float
      _item_units.code           'degrees'
       save_


 save__diffrn_scan_frame_axis.reference_displacement
      _item_description.description
 ;              The setting of the specified axis in millimetres for this
                frame against which measurements of the reference beam center
                and reference detector distance should be made.

                This is normally the same for all frames, but the
                option is provided here of making changes when
                needed.

                If not provided, it is assumed to be equal to
                _diffrn_scan_frame_axis.displacement.
 ;
      _item.name               '_diffrn_scan_frame_axis.reference_displacement'
      _item.category_id          DIFFRN_SCAN_FRAME_AXIS
      _item.mandatory_code       implicit
      _item_type.code            float
      _item_units.code           'millimetres'
       save_

 save__diffrn_scan_frame_axis.variant
     _item_description.description
 ;             The value of _diffrn_scan_frame_axis.variant gives the variant
               to which the given DIFFRN_SCAN_FRAME_AXIS row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.

               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_scan_frame_axis.variant'
     _item.category_id             DIFFRN_SCAN_FRAME_AXIS
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 #############################
 # DIFFRN_SCAN_FRAME_MONITOR #
 #############################


 save_diffrn_scan_frame_monitor
     _category.description
 ;             Data items in the DIFFRN_SCAN_FRAME_MONITOR category record
               the values and details about each monitor for each frame of data
               during a scan.
              
               Each monitor value is uniquely identified by the combination of
               the scan_id given by _diffrn_scan_frame.scan_id
               the frame_id given by _diffrn_scan_frame_monitor.frame_id,
               the monitor's detector_id given by
               _diffrn_scan_frame_monitor.monitor_id,
               and a 1-based ordinal given by _diffrn_scan_frame_monitor.id.
              
               If there is only one frame for the scan, the value of
               _diffrn_scan_frame_monitor.frame_id may be
               omitted.
                            
               A single frame may have more than one monitor value, and each
               monitor value may be the result of integration over the entire
               frame integration time given by the value of
               _diffrn_scan_frame.integration_time
               or many monitor values may be reported over shorter times given
               by the value of _diffrn_scan_frame_monitor.integration_time.  If
               only one monitor value for a given monitor is collected during
               the integration time of the frame, the value of
               _diffrn_scan_frame_monitor.id may be
               omitted.

 ;
     _category.id                   DIFFRN_DATA_FRAME_MONITOR
     _category.mandatory_code       no
      loop_
     _category_key.name             '_diffrn_scan_frame_monitor.id'
                                    '_diffrn_scan_frame_monitor.detector_id'
                                    '_diffrn_scan_frame_monitor.scan_id'
                                    '_diffrn_data_frame_monitor.frame_id'
                                    '_diffrn_data_frame_monitor.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'diffrn_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 - The beam intensity for frame FRAME1 is being tracked
     by a beamstop monitor detector BSM01, made from metal foil and
     a PIN diode, locate 20 mm in front of a MAR345 detector and being
     sampled every 2 seconds in a 20 second scan.

 ;
 ;
        
      # category DIFFRN_DETECTOR
      loop_
      _diffrn_detector.diffrn_id
      _diffrn_detector.id
      _diffrn_detector.type
      _diffrn_detector.number_of_axes
       P6MB MAR345-SN26 'MAR 345' 4
       P6MB BSM01 'metal foil and PIN diode' 1

      # category DIFFRN_DETECTOR_AXIS
      loop_
      _diffrn_detector_axis.detector_id
      _diffrn_detector_axis.axis_id
       MAR345-SN26 DETECTOR_X
       MAR345-SN26 DETECTOR_Y
       MAR345-SN26 DETECTOR_Z
       MAR345-SN26 DETECTOR_PITCH
       BSM01 MONITOR_Z


      # category DIFFRN_DATA_FRAME
      loop_
      _diffrn_data_frame.id
      _diffrn_data_frame.detector_element_id
      _diffrn_data_frame.array_id
      _diffrn_data_frame.binary_id
       FRAME1 ELEMENT1 ARRAY1 1


      # category DIFFRN_SCAN
      loop_
      _diffrn_scan.id
      _diffrn_scan.frame_id_start
      _diffrn_scan.frame_id_end
      _diffrn_scan.frames
       SCAN1 FRAME1 FRAME1 1

      # category DIFFRN_SCAN_AXIS
      loop_
      _diffrn_scan_axis.scan_id
      _diffrn_scan_axis.axis_id
      _diffrn_scan_axis.angle_start
      _diffrn_scan_axis.angle_range
      _diffrn_scan_axis.angle_increment
      _diffrn_scan_axis.displacement_start
      _diffrn_scan_axis.displacement_range
      _diffrn_scan_axis.displacement_increment
       SCAN1 GONIOMETER_OMEGA 12.0 1.0 1.0 0.0 0.0 0.0
       SCAN1 GONIOMETER_KAPPA 23.3 0.0 0.0 0.0 0.0 0.0
       SCAN1 GONIOMETER_PHI -165.8 0.0 0.0 0.0 0.0 0.0
       SCAN1 DETECTOR_Z 0.0 0.0 0.0 -240.0 0.0 0.0
       SCAN1 DETECTOR_Y 0.0 0.0 0.0 0.6 0.0 0.0
       SCAN1 DETECTOR_X 0.0 0.0 0.0 -0.5 0.0 0.0
       SCAN1 DETECTOR_PITCH 0.0 0.0 0.0 0.0 0.0 0.0
       SCAN1 MONITOR_Z 0.0 0.0 0.0 -220.0 0.0 0.0

      # category DIFFRN_SCAN_FRAME
      loop_
      _diffrn_scan_frame.frame_id
      _diffrn_scan_frame.frame_number
      _diffrn_scan_frame.integration_time
      _diffrn_scan_frame.scan_id
      _diffrn_scan_frame.date
       FRAME1 1 20.0 SCAN1 1997-12-04T10:23:48
      
      # category DIFFRN_SCAN_FRAME_MONITOR
      loop_
      _diffrn_scan_frame_monitor.id
      _diffrn_scan_frame_monitor.detector_id
      _diffrn_scan_frame_monitor.scan_id
      _diffrn_data_frame_monitor.frame_id
      _diffrn_data_frame_monitor.integration_time
      _diffrn_data_frame_monitor.monitor_value
       1  BSM01 SCAN1 FRAME1 2.0 23838345642
       2  BSM01 SCAN1 FRAME1 2.0 23843170669
       3  BSM01 SCAN1 FRAME1 2.0 23839478690
       4  BSM01 SCAN1 FRAME1 2.0 23856642085
       5  BSM01 SCAN1 FRAME1 2.0 23781717656
       6  BSM01 SCAN1 FRAME1 2.0 23788850775
       7  BSM01 SCAN1 FRAME1 2.0 23815576677
       8  BSM01 SCAN1 FRAME1 2.0 23789299964
       9  BSM01 SCAN1 FRAME1 2.0 23830195536
       10 BSM01 SCAN1 FRAME1 2.0 23673082270

      # category DIFFRN_SCAN_FRAME_AXIS
      loop_
      _diffrn_scan_frame_axis.frame_id
      _diffrn_scan_frame_axis.axis_id
      _diffrn_scan_frame_axis.angle
      _diffrn_scan_frame_axis.displacement
       FRAME1 GONIOMETER_OMEGA 12.0 0.0
       FRAME1 GONIOMETER_KAPPA 23.3 0.0
       FRAME1 GONIOMETER_PHI -165.8 0.0
       FRAME1 DETECTOR_Z 0.0 -240.0
       FRAME1 DETECTOR_Y 0.0 0.6
       FRAME1 DETECTOR_X 0.0 -0.5
       FRAME1 DETECTOR_PITCH 0.0 0.0
       FRAME1 MONITOR_Z 0.0 -220.0

      # category AXIS
      loop_
      _axis.id
      _axis.type
      _axis.equipment
      _axis.depends_on
      _axis.vector[1] _axis.vector[2] _axis.vector[3]
      _axis.offset[1] _axis.offset[2] _axis.offset[3]
       GONIOMETER_OMEGA rotation goniometer . 1 0 0 . . .
       GONIOMETER_KAPPA rotation goniometer GONIOMETER_OMEGA 0.64279
       0 0.76604 . . .
       GONIOMETER_PHI   rotation goniometer GONIOMETER_KAPPA 1 0 0
      . . .
       SOURCE           general source . 0 0 1 . . .
       GRAVITY          general gravity . 0 -1 0 . . .
       DETECTOR_Z       translation detector . 0 0 1 0 0 0
       DETECTOR_Y       translation detector DETECTOR_Z 0 1 0 0 0 0
       DETECTOR_X       translation detector DETECTOR_Y 1 0 0 0 0 0
       DETECTOR_PITCH   rotation    detector DETECTOR_X 0 1 0 0 0 0
       ELEMENT_X        translation detector DETECTOR_PITCH
      1 0 0 172.43 -172.43 0
       ELEMENT_Y        translation detector ELEMENT_X
      0 1 0 0 0 0
       MONITOR_Z        translation detector . 0 0 1 0 0 0

 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     _category.NX_mapping_details
 ;
    
     _diffrn_scan_frame_monitor.id MONID -->
         selects the column (fast index) into which the monitor data
         will be stored
    
     _diffrn_scan_frame_monitor.detector_id DETECTORNAME -->
         /instrument:NXinstrument
           /CBF_diffrn_scan_frame_monitor__DETECTORNAME_SCANID:NXmonitor
    
     _diffrn_scan_frame_monitor.scan_id SCANID -->
         /instrument:NXinstrument
           /CBF_diffrn_scan_frame_monitor__DETECTORNAME_SCANID:NXmonitor
    
     _diffrn_data_frame_monitor.frame_id FRAMEID -->
         selects the row (slow index) into which the monitor data will be
         stored by conversion of the FRAMEID to a frame number
    
     _diffrn_data_frame_monitor.integration_time INTEGRATIONTIME -->
         /instrument:NXinstrument
           /CBF_diffrn_scan_frame_monitor__DETECTORNAME_SCANID:NXmonitor
             /count_time=INTEGRATIONTIMES
         stores INTEGRATIONTIME into slow index np==frame, nm==MONID
    
     _diffrn_data_frame_monitor.monitor_value MONITORVALUE -->
         /instrument:NXinstrument
           /CBF_diffrn_scan_frame_monitor__DETECTORNAME_SCANID:NXmonitor
             /data=MONITORVALUES
         stores MONITORVALUE into slow index np=frame, fast index nm=MONID
    
     _diffrn_data_frame_monitor.variant category -->
         NeXus does not handle variants at this time

 ;
     save_


 save__diffrn_scan_frame_monitor.id
     _item_description.description
 ;             This item is an integer identifier which, along with
               _diffrn_scan_frame_monitor.detector_id,
               _diffrn_scan_frame_monitor.scan_id, and
               _diffrn_data_frame_monitor.frame_id
               should uniquely identify the monitor value being recorded

               If _array_data.binary_id is not explicitly given,
               it defaults to 1.
 ;
      loop_
     _item.name             '_diffrn_scan_frame_monitor.id'
     _item.category_id      DIFFRN_SCAN_FRAME_MONITOR
     _item.mandatory_code   implicit
     _item_default.value           1
     _item_type.code               int
      loop_
     _item_range.maximum
     _item_range.minimum
                             1  1
                             .  1
      save_

 save__diffrn_scan_frame_monitor.detector_id
     _item_description.description
 ;              This data item is a pointer to _diffrn_detector.id in
                the DIFFRN_DETECTOR category.

 ;
     _item.name                  '_diffrn_scan_frame_monitor.detector_id'
     _item.category_id             DIFFRN_SCAN_FRAME_MONITOR
     _item.mandatory_code          yes
     _item_type.code               code
      save_

 save__diffrn_scan_frame_monitor.frame_id
     _item_description.description
 ;              This item is a pointer to _diffrn_data_frame.id
                in the DIFFRN_DATA_FRAME category.
 ;
     _item.name                  '_diffrn_scan_frame_monitor.frame_id'
     _item.category_id             DIFFRN_SCAN_FRAME_MONITOR
     _item.mandatory_code          yes
     _item_type.code               code
      save_

 save__diffrn_scan_frame_monitor.scan_id
     _item_description.description
     ;              This item is a pointer to _diffrn_scan.id in
                    the DIFFRN_SCAN category.
     ;
     _item.name                  '_diffrn_scan_frame_monitor.scan_id'
     _item.category_id             DIFFRN_SCAN_FRAME_MONITOR
     _item.mandatory_code          yes
     _item_type.code               code
     save_

    
 save__diffrn_scan_frame_monitor.integration_time
     _item_description.description
 ;              The precise time for integration of the monitor value given in
                _diffrn_scan_frame_monitor.value
                must be given in _diffrn_scan_frame_monitor.integration_time.
 ;
     _item.name                 '_diffrn_scan_frame_monitor.integration_time'
     _item.category_id          DIFFRN_SCAN_FRAME_MONITOR
     _item.mandatory_code       no
     _item_type.code            float
     _item_units.code           'seconds'
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
      save_

 save__diffrn_scan_frame_monitor.value
     _item_description.description
 ;              The value reported by the monitor detector should be given in
                _diffrn_scan_frame_monitor.value.
               
                The value is typed as float to allow of monitors for very intense beams
                that cannot report all digits, but when available, all digits of the
                monitor should be recorded.
 ;
     _item.name                 '_diffrn_scan_frame_monitor.value'
     _item.category_id          DIFFRN_SCAN_FRAME_MONITOR
     _item.mandatory_code       no
     _item_type.code            float
     _item_units.code           'seconds'
      loop_
     _item_range.maximum
     _item_range.minimum
                             .   0.0
      save_

 save__diffrn_scan_frame_monitor.variant
     _item_description.description
 ;             The value of _diffrn_scan_frame_monitor.variant gives the variant
               to which the given DIFFRN_SCAN_FRAME_MONITOR row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.
            
               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_diffrn_scan_frame_monitor.variant'
     _item.category_id             DIFFRN_SCAN_FRAME_MONITOR
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 #######
 # MAP #
 #######

 save_map
     _category.description
 ;             Data items in the MAP category record
               the details of a maps. Maps record values of parameters,
               such as density, that are functions of position within
               a cell or are functions of orthogonal coordinates in
               three space.
              
               A map may is composed of one or more map segments
               specified in the MAP_SEGMENT category.
                            
               Examples are given in the MAP_SEGMENT category.
 ;
     _category.id                   MAP
     _category.mandatory_code       no
      loop_
     _category_key.name             '_map.id'
                                    '_map.diffrn_id'
                                    '_map.entry_id'
                                    '_map.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
                                    'map_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 - Identifying an observed density map
                 and a calculated density map
 ;
 ;
        
         loop_
         _map.id
         _map.details
        
         rho_calc
    ;
         density calculated from F_calc derived from the ATOM_SITE list
    ;
         rho_obs
    ;
         density combining the observed structure factors with the
         calculated phases
    ;
 ;

 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     save_


 save__map.details
      _item_description.description
 ;              The value of _map.details should give a
                description of special aspects of each map.

 ;
     _item.name                  '_map.details'
     _item.category_id             MAP
     _item.mandatory_code          no
     _item_type.code               text
      loop_
     _item_examples.case
     _item_examples.detail
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 - Identifying an observed density map
                 and a calculated density map
 ;
 ;
        
         loop_
         _map.id
         _map.details
        
         rho_calc
     ;
         density calculated from F_calc derived from the ATOM_SITE list
     ;
         rho_obs
     ;
         density combining the observed structure factors with the
         calculated phases
     ;
 ;

 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       save_
      
 save__map.diffrn_id
     _item_description.description
 ;             This item is a pointer to _diffrn.id in the
               DIFFRN category.
 ;
     _item.name                  '_map.diffrn_id'
     _item.category_id             MAP
     _item.mandatory_code          implicit
     _item_type.code               code
      save_

 save__map.entry_id
     _item_description.description
 ;             This item is a pointer to _entry.id in the
               ENTRY category.
 ;
     _item.name                  '_map.entry_id'
     _item.category_id             MAP
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 save__map.id
     _item_description.description
 ;             The value of _map.id must uniquely identify
               each map for the given diffrn.id or entry.id.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
            '_map.id'                MAP          yes
            '_map_segment.id'        MAP_SEGMENT  yes
     _item_type.code               code
      loop_
     _item_linked.child_name
     _item_linked.parent_name
            '_map_segment.id'        '_map.id'
      save_

 save__map.variant
     _item_description.description
 ;             The value of _map.variant gives the variant
               to which the given map row is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.

               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_map.variant'
     _item.category_id             MAP
     _item.mandatory_code          implicit
     _item_type.code               code
      save_



 ###############
 # MAP_SEGMENT #
 ###############


 save_map_segment
     _category.description
 ;             Data items in the MAP_SEGMENT category record
               the details about each segment (section or brick) of a map.
 ;
     _category.id                   MAP_SEGMENT
     _category.mandatory_code       no
      loop_
     _category_key.name             '_map_segment.id'
                                    '_map_segment.map_id'
                                    '_map_segment.variant'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
                                    'map_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 - Identifying an observed density map
                 and a calculated density map, each consisting of one
                 segment, both using the same array structure
                 and mask.
 ;
 ;
        
         loop_
         _map.id
         _map.details
        
         rho_calc
      ;
         density calculated from F_calc derived from the ATOM_SITE list
      ;
         rho_obs
      ;
         density combining the observed structure factors with the
         calculated phases
      ;

         loop_
         _map_segment.map_id
         _map_segment.id
         _map_segment.array_id
         _map_segment.binary_id
         _map_segment.mask_array_id
         _map_segment.mask_binary_id
         rho_calc rho_calc map_structure 1 mask_structure 1
         rho_obs  rho_obs  map_structure 2 mask_structure 1
 ;

 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     save_


 save__map_segment.array_id
     _item_description.description
 ;             The value of _map_segment.array_id identifies the array
               structure into which the map is organized.

               This item is a pointer to _array_structure.id in the
               ARRAY_STRUCTURE category.
 ;
     _item.name                  '_map_segment.array_id'
     _item.category_id             MAP_SEGMENT
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 save__map_segment.binary_id
     _item_description.description
 ;             The value of _map_segment.binary_id distinguishes the particular
               set of data organized according to _map_segment.array_id in
               which the data values of the map are stored.

               This item is a pointer to _array_data.binary_id in the
               ARRAY_DATA category.
 ;
     _item.name                  '_map_segment.binary_id'
     _item.category_id             MAP_SEGMENT
     _item.mandatory_code          implicit
     _item_type.code               int
      save_

 save__map_segment.mask_array_id
     _item_description.description
 ;             The value of _map_segment.mask_array_id, if given, the array
               structure into which the mask for the map is organized.  If no
               value is given, then all elements of the map are valid.  If a
               value is given, then only elements of the map for which the
               corresponding element of the mask is non-zero are valid.  The
               value of _map_segment.mask_array_id differs from the value of
               _map_segment.array_id in order to permit the mask to be given
               as, say, unsigned 8-bit integers, while the map is given as
               a data type with more range.  However, the two array structures
               must be aligned, using the same axes in the same order with the
               same displacements and increments

               This item is a pointer to _array_structure.id in the
               ARRAY_STRUCTURE category.
 ;
     _item.name                  '_map_segment.mask_array_id'
     _item.category_id             MAP_SEGMENT
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 save__map_segment.mask_binary_id
     _item_description.description
 ;             The value of _map_segment.mask_binary_id identifies the
               particular set of data organized according to
               _map_segment.mask_array_id specifying the mask for the map.

               This item is a pointer to _array_data.mask_binary_id in the
               ARRAY_DATA category.
 ;
     _item.name                  '_map_segment.mask_binary_id'
     _item.category_id             MAP_SEGMENT
     _item.mandatory_code          implicit
     _item_type.code               int
      save_


 save__map_segment.id
     _item_description.description
 ;             The value of _map_segment.id must uniquely
               identify each segment of a map.
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
            '_map_segment.id'
            MAP_SEGMENT
            yes
     _item_type.code               code

      save_


 save__map_segment.map_id
     _item_description.description
 ;              This item is a pointer to _map.id
                in the MAP category.
 ;
     _item.name                  '_map_segment.map_id'
     _item.category_id             MAP_SEGMENT
     _item.mandatory_code          yes
     _item_type.code               code
      save_

 save__map_segment.details
      _item_description.description
 ;              The value of _map_segment.details should give a
                description of special aspects of each segment of a map.

 ;
     _item.name                  '_map_segment.details'
     _item.category_id             MAP_SEGMENT
     _item.mandatory_code          no
     _item_type.code               text
      loop_
     _item_examples.case
     _item_examples.detail
 ;               Example to be provided
 ;
 ;              

 ;
       save_

 save__map_segment.variant
     _item_description.description
 ;             The value of _map_segment.variant gives the variant
               to which the given map segment is related.
              
               If this value is not given, the variant is assumed to the default
               null variant.

               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_map_segment.variant'
     _item.category_id             MAP_SEGMENT
     _item.mandatory_code          implicit
     _item_type.code               code
      save_


 ###########
 # VARIANT #
 ###########


 save_variant
     _category.description
 ;             Data items in the VARIANT category record
               the details about sets of variants of data items.
              
               There is sometimes a need to allow for multiple versions of the
               same data items in order to allow for refinements and corrections
               to earlier assumptions, observations and calculations.  In order
               to allow data sets to contain more than one variant of the same
               information, an optional ...variant data item as a pointer to
               _variant.variant has been added to the key of every category,
               as an implicit data item with a null (empty) default value.
              
               All rows in a category with the same variant value are considered
               to be related to one another and to all rows in other categories
               with the same variant value.  For a given variant, all such rows
               are also considered to be related to all rows with a null variant
               value, except that a row with a null variant value is for which
               all other components of its key are identical to those entries
               in another row with a non-null variant value is not related the
               the rows with that non-null variant value.  This behavior is
               similar to the convention for identifying alternate conformers
               in an atom list.
              
               An optional role may be specified for a variant as the value of
               _variant.role.  Possible roles are null, "preferred",
               "raw data", "unsuccessful trial".
              
               variants may carry an optional timestamp as the value of
               _variant.timestamp.
              
               variants may be related to other variants from which they were
               derived by the value of _variant.variant_of
              
               Further details about the variant may be specified as the value
               of _variant.details.
              
               In order to allow variant information from multiple datasets to
               be combined, _variant.diffrn_id and/or _variant.entry_id may
               be used.
              
 ;
     _category.id                   VARIANT
     _category.mandatory_code       no
     loop_
     _category_key.name             '_variant.variant'
                                    '_variant.diffrn_id'
                                    '_variant.entry_id'
     loop_
     _category_group.id             'inclusive_group'
                                    'variant_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;   Example 1 - Distinguishing between a raw beam center and a refined beam
        center inferred after indexing.  Detector d1 is composed of
        four CCD detector elements, each 200 mm by 200 mm, arranged
        in a square, in the pattern

                    1     2
                       *
                    3     4

        Note that the beam centre is slightly displaced from each of the
        detector elements, just beyond the lower right corner of 1,
        the lower left corner of 2, the upper right corner of 3 and
        the upper left corner of 4.  For each element, the detector
        face coordiate system, is assumed to have the fast axis
        running from left to right and the slow axis running from
        top to bottom with the origin at the top left corner.
       
        After indexing and refinement, the center is shifted by .2 mm
        left and .1 mm down.
        
        
 ;
 ;

         loop_
         _variant.variant
         _variant.role
         _variant.timestamp
         _variant.variant_of
         _variant.details
             . "raw data" 2007-08-03T23:20:00 . .
             indexed "preferred" 2007-08-04T01:17:28 .
               "indexed cell and refined beam center"
              
         loop_
         _diffrn_detector_element.detector_id
         _diffrn_detector_element.id
         _diffrn_detector_element.reference_center_fast
         _diffrn_detector_element.reference_center_slow
         _diffrn_detector_element.reference_center_units
         _diffrn_detector_element.variant
         d1     d1_ccd_1  201.5 201.5  mm  .
         d1     d1_ccd_2  -1.8  201.5  mm  .
         d1     d1_ccd_3  201.6  -1.4  mm  .
         d1     d1_ccd_4  -1.7   -1.5  mm  .
         d1     d1_ccd_1  201.3 201.6  mm  indexed
         d1     d1_ccd_2  -2.0  201.6  mm  indexed
         d1     d1_ccd_3  201.3  -1.5  mm  indexed
         d1     d1_ccd_4  -1.9   -1.6  mm  indexed
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

     save_

 save__variant.details
     _item_description.description
 ;              A description of special aspects of the variant.
 ;
     _item.name                  '_variant.details'
     _item.category_id             VARIANT
     _item.mandatory_code          no
     _item_type.code               text
     _item_examples.case
 ;                                indexed cell and refined beam center
 ;
      save_

 save__variant.diffrn_id
     _item_description.description
     ;             This item is a pointer to _diffrn.id in the
                   diffrn category.
     ;
     _item.name                  '_variant.diffrn_id'
     _item.category_id             VARIANT
     _item.mandatory_code          implicit
     _item_type.code               code
     save_
    
 save__variant.entry_id
     _item_description.description
     ;             This item is a pointer to _entry.id in the
                   entry category
     ;
     _item.name                  '_variant.entry_id'
     _item.category_id             VARIANT
     _item.mandatory_code          yes
     _item_type.code               code
     save_

    
 save__variant.role
     _item_description.description
 ;             The value of _variant.role  specified a role
               for this variant.  Possible roles are null, "preferred",
               "raw data", and "unsuccessful trial".
 ;
     _item.name                  '_variant.role'
     _item.category_id            VARIANT
     _item.mandatory_code         no
     _item_type.code              uline
      loop_
     _item_enumeration.value
     _item_enumeration.detail
      .
 ;    A null value for _variant.role leaves the precise role of
      the variant unspecified.  No inference should be made that the variant
      with the latest time stamp is preferred.
 ;
      "preferred"
 ;    A value of "preferred" indicates that rows of any categories specifying
      this variant should be used in preference to rows with the same key
      specifying other variants or the null variant.  It is an error to specify
      two variants that appear in the same category with the same key as being
      preferred, but it is not an error to specify more than one variant as
      preferred in other cases.
 ;
      "raw data"
 ;    A value of "raw data" indicates data prior to any corrections,
      calculations or refinements.  It is not necessarily an error for raw data
      to also be a variant of an earlier variant.  It may be replacement raw
      data for earlier data believed to be erroneous.
 ;
      "unsuccessful trial"
 ;    A value of "unsuccessful trial" indicates data that should not be used
      for further calculation.
 ;
      save_


 save__variant.timestamp
     _item_description.description
 ;              The date and time identifying a variant.  This is not
                necessarily the precise time of the measurement or calculation
                of the individual related data items, but a timestamp that
                reflects the order in which the variants were defined.
 ;
     _item.name                 '_variant.timestamp'
     _item.category_id          VARIANT
     _item.mandatory_code       no
     _item_type.code            yyyy-mm-dd
      save_

    
 save__variant.variant
     _item_description.description
 ;             The value of _variant.variant must uniquely identify
               each variant for the given diffraction experiment and/or entry
                    
               This item has been made implicit and given a default value of
               null.
 ;
     loop_
     _item.name
     _item.category_id
     _item.mandatory_code
              '_variant.variant'                    VARIANT             implicit
              '_variant.variant_of'                 VARIANT             implicit
              '_array_data.variant'                 ARRAY_DATA          implicit
              '_array_element_size.variant'         ARRAY_ELEMENT_SIZE  implicit
              '_array_intensities.variant'          ARRAY_INTENSITIES   implicit
              '_array_structure.variant'            ARRAY_STRUCTURE     implicit
              '_array_structure_list.variant'       ARRAY_STRUCTURE_LIST
                                                                        implicit
              '_array_structure_list_axis.variant'  ARRAY_STRUCTURE_LIST_AXIS
                                                                        implicit
              '_axis.variant'                       AXIS                implicit
              '_diffrn_data_frame.variant'          DIFFRN_DATA_FRAME   implicit
              '_diffrn_detector.variant'            DIFFRN_DETECTOR     implicit
              '_diffrn_detector_axis.variant'       DIFFRN_DETECTOR_AXIS
                                                                        implicit
              '_diffrn_detector_element.variant'    DIFFRN_DETECTOR_ELEMENT
                                                                        implicit
              '_diffrn_measurement.variant'         DIFFRN_MEASUREMENT  implicit
              '_diffrn_measurement_axis.variant'    DIFFRN_MEASUREMENT_AXIS
                                                                        implicit
              '_diffrn_radiation.variant'           DIFFRN_RADIATION    implicit
              '_diffrn_refln.variant'               DIFFRN_REFLN        implicit
              '_diffrn_scan.variant'                DIFFRN_SCAN         implicit
              '_diffrn_scan_axis.variant'           DIFFRN_SCAN_AXIS    implicit
              '_diffrn_scan_frame.variant'          DIFFRN_SCAN_FRAME   implicit
              '_diffrn_scan_frame_axis.variant'     DIFFRN_SCAN_FRAME_AXIS
                                                                        implicit
              '_diffrn_scan_frame_monitor.variant'  DIFFRN_SCAN_FRAME_MONITOR
                                                                        implicit
              '_map.variant'                        MAP                 implicit
              '_map_segment.variant'                MAP_SEGMENT         implicit


     _item_default.value           .
     _item_type.code               code
      loop_
     _item_linked.child_name
     _item_linked.parent_name
              '_array_data.variant'                 '_variant.variant'
              '_array_element_size.variant'         '_variant.variant'
              '_array_intensities.variant'          '_variant.variant'
              '_array_structure.variant'            '_variant.variant'
              '_array_structure_list.variant'       '_variant.variant'
              '_array_structure_list_axis.variant'  '_variant.variant'
              '_axis.variant'                       '_variant.variant'
              '_diffrn_data_frame.variant'          '_variant.variant'
              '_diffrn_detector.variant'            '_variant.variant'
              '_diffrn_detector_axis.variant'       '_variant.variant'
              '_diffrn_detector_element.variant'    '_variant.variant'
              '_diffrn_measurement.variant'         '_variant.variant'
              '_diffrn_measurement_axis.variant'    '_variant.variant'
              '_diffrn_radiation.variant'           '_variant.variant'
              '_diffrn_refln.variant'               '_variant.variant'
              '_diffrn_scan.variant'                '_variant.variant'
              '_diffrn_scan_axis.variant'           '_variant.variant'
              '_diffrn_scan_frame.variant'          '_variant.variant'
              '_diffrn_scan_frame_axis.variant'     '_variant.variant'
              '_diffrn_scan_frame_monitor.variant'  '_variant.variant'
              '_map.variant'                        '_variant.variant'
              '_map_segment.variant'                '_variant.variant'

      save_


 save__variant.variant_of
     _item_description.description
 ;             The value of _variant.variant_of gives the variant
               from which this variant was derived.  If this value is not given,
               the variant is assumed to be derived from the default null
               variant.

               This item is a pointer to _variant.variant in the
               VARIANT category.
 ;
     _item.name                  '_variant.variant_of'
     _item.category_id             VARIANT
     _item.mandatory_code          no
     _item_type.code               code
      save_




 ########################   DEPRECATED DATA ITEMS ########################

 save__diffrn_detector_axis.id
     _item_description.description
 ;              This data item is a pointer to _diffrn_detector.id in
                the DIFFRN_DETECTOR category.

                DEPRECATED -- DO NOT USE
 ;
     _item.name                  '_diffrn_detector_axis.id'
     _item.category_id             DIFFRN_DETECTOR_AXIS
     _item.mandatory_code          no
     _item_type.code               code
      save_

 save__diffrn_detector_element.center[1]
     _item_description.description
 ;             The value of _diffrn_detector_element.center[1] is the X
               component of the distortion-corrected beam centre in
               millimetres from the (0, 0) (lower-left) corner of the
               detector element viewed from the sample side.

               The X and Y axes are the laboratory coordinate system
               coordinates defined in the AXIS category measured
               when all positioning axes for the detector are at their zero
               settings.  If the resulting X or Y axis is then orthogonal to the
               detector, the Z axis is used instead of the orthogonal axis.
              
               Because of ambiguity about the setting used to determine this
               center, use of this data item is deprecated.  The data item
               _diffrn_data_frame.center_fast
               which is referenced to the detector coordinate system and not
               directly to the laboratory coordinate system should be used
               instead.

 ;
     _item.name                  '_diffrn_detector_element.center[1]'
     _item.category_id             DIFFRN_DETECTOR_ELEMENT
     _item.mandatory_code          no
     _item_default.value           0.0
     _item_sub_category.id         vector
     _item_type.code               float
     _item_units.code              millimetres

     save_


 save__diffrn_detector_element.center[2]
     _item_description.description
 ;             The value of _diffrn_detector_element.center[2] is the Y
               component of the distortion-corrected beam centre in
               millimetres from the (0, 0) (lower-left) corner of the
               detector element viewed from the sample side.

               The X and Y axes are the laboratory coordinate system
               coordinates defined in the AXIS category measured
               when all positioning axes for the detector are at their zero
               settings.  If the resulting X or Y axis is then orthogonal to the
               detector, the Z axis is used instead of the orthogonal axis.
              
               Because of ambiguity about the setting used to determine this
               center,  use of this data item is deprecated. The data item
               _diffrn_data_frame.center_slow
               which is referenced to the detector coordinate system and not
               directly to the laboratory coordinate system should be used
               instead.

 ;
     _item.name                  '_diffrn_detector_element.center[2]'
     _item.category_id             DIFFRN_DETECTOR_ELEMENT
     _item.mandatory_code          no
     _item_default.value           0.0
     _item_sub_category.id         vector
     _item_type.code               float
     _item_units.code              millimetres

     save_



 save__diffrn_measurement_axis.id
     _item_description.description
 ;              This data item is a pointer to _diffrn_measurement.id in
                the DIFFRN_MEASUREMENT category.

                DEPRECATED -- DO NOT USE
 ;
     _item.name                  '_diffrn_measurement_axis.id'
     _item.category_id             DIFFRN_MEASUREMENT_AXIS
     _item.mandatory_code          no
     _item_type.code               code
      save_

 #########################   DEPRECATED CATEGORY #########################
 #####################
 # DIFFRN_FRAME_DATA #
 #####################


 save_diffrn_frame_data
     _category.description
 ;             Data items in the DIFFRN_FRAME_DATA category record
               the details about each frame of data.

               The items in this category are now in the
               DIFFRN_DATA_FRAME category.

               The items in the DIFFRN_FRAME_DATA category
               are now deprecated.  The items from this category
               are provided as aliases in the 1.0 dictionary
               or, in the case of _diffrn_frame_data.details,
               in the 1.4 dictionary.  THESE ITEMS SHOULD NOT
               BE USED FOR NEW WORK.

               The items from the old category are provided
               in this dictionary for completeness
               but should not be used or cited.  To avoid
               confusion, the example has been removed
               and the redundant parent-child links to other
               categories have been removed.
              
               All _item.mandatory_code values have been changed to no
 ;
     _category.id                   DIFFRN_FRAME_DATA
     _category.mandatory_code       no
      loop_
     _category_key.name             '_diffrn_frame_data.id'
                                    '_diffrn_frame_data.detector_element_id'
     loop_
     _category_group.id             'inclusive_group'
                                    'array_data_group'
     loop_
     _category_examples.detail
     _category_examples.case
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ;
     THE DIFFRN_FRAME_DATA category is deprecated and should not be used.
 ;
 ;
        # EXAMPLE REMOVED #
 ;
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     save_


 save__diffrn_frame_data.array_id
     _item_description.description
 ;             This item is a pointer to _array_structure.id in the
               ARRAY_STRUCTURE category.

               DEPRECATED -- DO NOT USE
 ;
     _item.name                  '_diffrn_frame_data.array_id'
     _item.category_id             DIFFRN_FRAME_DATA
     _item.mandatory_code          no
     _item_type.code               code
      save_


 save__diffrn_frame_data.binary_id
     _item_description.description
 ;             This item is a pointer to _array_data.binary_id in the
               ARRAY_STRUCTURE category.

               DEPRECATED -- DO NOT USE
 ;
     _item.name                  '_diffrn_frame_data.binary_id'
     _item.category_id             DIFFRN_FRAME_DATA
     _item.mandatory_code          no
     _item_type.code               int
      save_


 save__diffrn_frame_data.detector_element_id
     _item_description.description
 ;             This item is a pointer to _diffrn_detector_element.id
               in the DIFFRN_DETECTOR_ELEMENT category.

               DEPRECATED -- DO NOT USE
 ;
     _item.name                  '_diffrn_frame_data.detector_element_id'
     _item.category_id             DIFFRN_FRAME_DATA
     _item.mandatory_code          yes
     _item_type.code               code
      save_


 save__diffrn_frame_data.id
     _item_description.description
 ;             The value of _diffrn_frame_data.id must uniquely identify
               each complete frame of data.

               DEPRECATED -- DO NOT USE
 ;
      loop_
     _item.name
     _item.category_id
     _item.mandatory_code
            '_diffrn_frame_data.id'        DIFFRN_FRAME_DATA  yes
     _item_type.code               code
      save_

 save__diffrn_frame_data.details
      _item_description.description
 ;             The value of _diffrn_data_frame.details should give a
               description of special aspects of each frame of data.

               DEPRECATED -- DO NOT USE
 ;
      _item.name                  '_diffrn_frame_data.details'
      _item.category_id             DIFFRN_FRAME_DATA
      _item.mandatory_code          no
      _item_type.code               text
       save_

 ################ END DEPRECATED SECTION ###########


 ####################
 ## ITEM_TYPE_LIST ##
 ####################
 #
 #
 #  The regular expressions defined here are not compliant
 #  with the POSIX 1003.2 standard as they include the
 #  '\n' and '\t' special characters.  These regular expressions
 #  have been tested using version 0.12 of Richard Stallman's
 #  GNU regular expression library in POSIX mode.
 #  In order to allow presentation of a regular expression
 #  in a text field concatenate any line ending in a backslash
 #  with the following line, after discarding the backslash.
 #
 #  A formal definition of the '\n' and '\t' special characters
 #  is most properly done in the DDL, but for completeness, please
 #  note that '\n' is the line termination character ('newline')
 #  and '\t' is the horizontal tab character.  There is a formal
 #  ambiguity in the use of '\n' for line termination, in that
 #  the intention is that the equivalent machine/OS-dependent line
 #  termination character sequence should be accepted as a match, e.g.
 #
 #      '\r' (control-M) under MacOS
 #      '\n' (control-J) under Unix
 #      '\r\n' (control-M control-J) under DOS and MS Windows
 #
      loop_
     _item_type_list.code
     _item_type_list.primitive_code
     _item_type_list.construct
     _item_type_list.detail
                code      char
                '[_,.;:"&<>()/\{}'`~!@#$%A-Za-z0-9*|+-]*'
 ;              code item types/single words ...
 ;
                ucode      uchar
                '[_,.;:"&<>()/\{}'`~!@#$%A-Za-z0-9*|+-]*'
 ;              code item types/single words (case insensitive) ...
 ;
                line      char
                '[][ \t_(),.;:"&<>/\{}'`~!@#$%?+=*A-Za-z0-9|^-]*'
 ;              char item types / multi-word items ...
 ;
                uline     uchar
                '[][ \t_(),.;:"&<>/\{}'`~!@#$%?+=*A-Za-z0-9|^-]*'
 ;              char item types / multi-word items (case insensitive)...
 ;
                text      char
              '[][ \n\t()_,.;:"&<>/\{}'`~!@#$%?+=*A-Za-z0-9|^-]*'
 ;              text item types / multi-line text ...
 ;
                binary    char
 ;\n--CIF-BINARY-FORMAT-SECTION--\n\
 [][ \n\t()_,.;:"&<>/\{}'`~!@#$%?+=*A-Za-z0-9|^-]*\
 \n--CIF-BINARY-FORMAT-SECTION----
 ;
 ;              binary items are presented as MIME-like ascii-encoded
                sections in an imgCIF.  In a CBF, raw octet streams
                are used to convey the same information.
 ;
                int       numb
                '-?[0-9]+'
 ;              int item types are the subset of numbers that are the negative
                or positive integers.
 ;
                float     numb
           '-?(([0-9]+)[.]?|([0-9]*[.][0-9]+))([(][0-9]+[)])?([eE][+-]?[0-9]+)?'
 ;              float item types are the subset of numbers that are the floating
                point numbers.
 ;
                any       char
                '.*'
 ;              A catch all for items that may take any form...
 ;
                yyyy-mm-dd  char
 ;\
 [0-9]?[0-9]?[0-9][0-9]-[0-9]?[0-9]-[0-9]?[0-9]\
 ((T[0-2][0-9](:[0-5][0-9](:[0-5][0-9](.[0-9]+)?)?)?)?\
 ([+-][0-5][0-9]:[0-5][0-9]))?
 ;
 ;
                Standard format for CIF date and time strings (see
                http://www.iucr.org/iucr-top/cif/spec/datetime.html),
                consisting of a yyyy-mm-dd date optionally followed by
                the character 'T' followed by a 24-hour clock time,
                optionally followed by a signed time-zone offset.

                The IUCr standard has been extended to allow for an optional
                decimal fraction on the seconds of time.

                Time is local time if no time-zone offset is given.

                Note that this type extends the mmCIF yyyy-mm-dd type
                but does not conform to the mmCIF yyyy-mm-dd:hh:mm
                type that uses a ':' in place if the 'T' specified
                by the IUCr standard.  For reading, both forms should
                be accepted,  but for writing, only the IUCr form should
                be used.

                For maximal compatibility, the special time zone
                indicator 'Z' (for 'zulu') should be accepted on
                reading in place of '+00:00' for GMT.
 ;


 #####################
 ## ITEM_UNITS_LIST ##
 #####################

      loop_
     _item_units_list.code
     _item_units_list.detail
 #
      'metres'                 'metres'
      'centimetres'            'centimetres (metres * 10^( -2)^)'
      'millimetres'            'millimetres (metres * 10^( -3)^)'
      'nanometres'             'nanometres  (metres * 10^( -9)^)'
      'angstroms'              '\%Angstroms   (metres * 10^(-10)^)'
      'picometres'             'picometres  (metres * 10^(-12)^)'
      'femtometres'            'femtometres (metres * 10^(-15)^)'
 #
      'reciprocal_metres'      'reciprocal metres (metres^(-1)^)'
      'reciprocal_centimetres'
         'reciprocal centimetres ((metres * 10^( -2)^)^(-1)^)'
      'reciprocal_millimetres'
         'reciprocal millimetres ((metres * 10^( -3)^)^(-1)^)'
      'reciprocal_nanometres'
         'reciprocal nanometres  ((metres * 10^( -9)^)^(-1)^)'
      'reciprocal_angstroms'
         'reciprocal \%Angstroms   ((metres * 10^(-10)^)^(-1)^)'
      'reciprocal_picometres'
         'reciprocal picometres  ((metres * 10^(-12)^)^(-1)^)'
 #
      'nanometres_squared'     'nanometres squared (metres * 10^( -9)^)^2^'
      'angstroms_squared'      '\%Angstroms squared  (metres * 10^(-10)^)^2^'
      '8pi2_angstroms_squared'
        '8\p^2^ * \%Angstroms squared (metres * 10^(-10)^)^2^'
      'picometres_squared'     'picometres squared (metres * 10^(-12)^)^2^'
 #
      'nanometres_cubed'       'nanometres cubed (metres * 10^( -9)^)^3^'
      'angstroms_cubed'        '\%Angstroms cubed  (metres * 10^(-10)^)^3^'
      'picometres_cubed'       'picometres cubed (metres * 10^(-12)^)^3^'
 #
      'kilopascals'            'kilopascals'
      'gigapascals'            'gigapascals'
 #
      'hours'                  'hours'
      'minutes'                'minutes'
      'seconds'                'seconds'
      'microseconds'           'microseconds'
 #
      'degrees'                'degrees (of arc)'
      'degrees_squared'        'degrees (of arc) squared'
 #
      'degrees_per_minute'     'degrees (of arc) per minute'
 #
      'celsius'                'degrees (of temperature) Celsius'
      'kelvins'                'degrees (of temperature) Kelvin'
 #
      'counts'                 'counts'
      'counts_per_photon'      'counts per photon'
 #
      'electrons'              'electrons'
 #
      'electrons_squared'      'electrons squared'
 #
      'electrons_per_nanometres_cubed'
 ; electrons per nanometres cubed (electrons/(metres * 10^( -9)^)^(-3)^)
 ;
      'electrons_per_angstroms_cubed'
 ; electrons per \%Angstroms cubed (electrons/(metres * 10^(-10)^)^(-3)^)
 ;
      'electrons_per_picometres_cubed'
 ; electrons per picometres cubed (electrons/(metres * 10^(-12)^)^(-3)^)
 ;
      'kilowatts'              'kilowatts'
      'milliamperes'           'milliamperes'
      'kilovolts'              'kilovolts'
 #
      'pixels_per_element'     '(image) pixels per (array) element'
 #
      'arbitrary'
 ; arbitrary system of units.
 ;
 #

      loop_
     _item_units_conversion.from_code
     _item_units_conversion.to_code
     _item_units_conversion.operator
     _item_units_conversion.factor
 ###
      'metres'                   'centimetres'              '*'   1.0E+02
      'metres'                   'millimetres'              '*'   1.0E+03
      'metres'                   'nanometres'               '*'   1.0E+09
      'metres'                   'angstroms'                '*'   1.0E+10
      'metres'                   'picometres'               '*'   1.0E+12
      'metres'                   'femtometres'              '*'   1.0E+15
 #
      'centimetres'              'metres'                   '*'   1.0E-02
      'centimetres'              'millimetres'              '*'   1.0E+01
      'centimetres'              'nanometres'               '*'   1.0E+07
      'centimetres'              'angstroms'                '*'   1.0E+08
      'centimetres'              'picometres'               '*'   1.0E+10
      'centimetres'              'femtometres'              '*'   1.0E+13
 #
      'millimetres'              'metres'                   '*'   1.0E-03
      'millimetres'              'centimetres'              '*'   1.0E-01
      'millimetres'              'nanometres'               '*'   1.0E+06
      'millimetres'              'angstroms'                '*'   1.0E+07
      'millimetres'              'picometres'               '*'   1.0E+09
      'millimetres'              'femtometres'              '*'   1.0E+12
 #
      'nanometres'               'metres'                   '*'   1.0E-09
      'nanometres'               'centimetres'              '*'   1.0E-07
      'nanometres'               'millimetres'              '*'   1.0E-06
      'nanometres'               'angstroms'                '*'   1.0E+01
      'nanometres'               'picometres'               '*'   1.0E+03
      'nanometres'               'femtometres'              '*'   1.0E+06
 #
      'angstroms'                'metres'                   '*'   1.0E-10
      'angstroms'                'centimetres'              '*'   1.0E-08
      'angstroms'                'millimetres'              '*'   1.0E-07
      'angstroms'                'nanometres'               '*'   1.0E-01
      'angstroms'                'picometres'               '*'   1.0E+02
      'angstroms'                'femtometres'              '*'   1.0E+05
 #
      'picometres'               'metres'                   '*'   1.0E-12
      'picometres'               'centimetres'              '*'   1.0E-10
      'picometres'               'millimetres'              '*'   1.0E-09
      'picometres'               'nanometres'               '*'   1.0E-03
      'picometres'               'angstroms'                '*'   1.0E-02
      'picometres'               'femtometres'              '*'   1.0E+03
 #
      'femtometres'              'metres'                   '*'   1.0E-15
      'femtometres'              'centimetres'              '*'   1.0E-13
      'femtometres'              'millimetres'              '*'   1.0E-12
      'femtometres'              'nanometres'               '*'   1.0E-06
      'femtometres'              'angstroms'                '*'   1.0E-05
      'femtometres'              'picometres'               '*'   1.0E-03
 ###
      'reciprocal_centimetres'   'reciprocal_metres'        '*'   1.0E+02
      'reciprocal_centimetres'   'reciprocal_millimetres'   '*'   1.0E-01
      'reciprocal_centimetres'   'reciprocal_nanometres'    '*'   1.0E-07
      'reciprocal_centimetres'   'reciprocal_angstroms'     '*'   1.0E-08
      'reciprocal_centimetres'   'reciprocal_picometres'    '*'   1.0E-10
 #
      'reciprocal_millimetres'   'reciprocal_metres'        '*'   1.0E+03
      'reciprocal_millimetres'   'reciprocal_centimetres'   '*'   1.0E+01
      'reciprocal_millimetres'   'reciprocal_nanometres'    '*'   1.0E-06
      'reciprocal_millimetres'   'reciprocal_angstroms'     '*'   1.0E-07
      'reciprocal_millimetres'   'reciprocal_picometres'    '*'   1.0E-09
 #
      'reciprocal_nanometres'    'reciprocal_metres'        '*'   1.0E+09
      'reciprocal_nanometres'    'reciprocal_centimetres'   '*'   1.0E+07
      'reciprocal_nanometres'    'reciprocal_millimetres'   '*'   1.0E+06
      'reciprocal_nanometres'    'reciprocal_angstroms'     '*'   1.0E-01
      'reciprocal_nanometres'    'reciprocal_picometres'    '*'   1.0E-03
 #
      'reciprocal_angstroms'     'reciprocal_metres'        '*'   1.0E+10
      'reciprocal_angstroms'     'reciprocal_centimetres'   '*'   1.0E+08
      'reciprocal_angstroms'     'reciprocal_millimetres'   '*'   1.0E+07
      'reciprocal_angstroms'     'reciprocal_nanometres'    '*'   1.0E+01
      'reciprocal_angstroms'     'reciprocal_picometres'    '*'   1.0E-02
 #
      'reciprocal_picometres'    'reciprocal_metres'        '*'   1.0E+12
      'reciprocal_picometres'    'reciprocal_centimetres'   '*'   1.0E+10
      'reciprocal_picometres'    'reciprocal_millimetres'   '*'   1.0E+09
      'reciprocal_picometres'    'reciprocal_nanometres'    '*'   1.0E+03
      'reciprocal_picometres'    'reciprocal_angstroms'     '*'   1.0E+01
 ###
      'nanometres_squared'       'angstroms_squared'        '*'   1.0E+02
      'nanometres_squared'       'picometres_squared'       '*'   1.0E+06
 #
      'angstroms_squared'        'nanometres_squared'       '*'   1.0E-02
      'angstroms_squared'        'picometres_squared'       '*'   1.0E+04
      'angstroms_squared'        '8pi2_angstroms_squared'   '*'   78.9568

 #
      'picometres_squared'       'nanometres_squared'       '*'   1.0E-06
      'picometres_squared'       'angstroms_squared'        '*'   1.0E-04
 ###
      'nanometres_cubed'         'angstroms_cubed'          '*'   1.0E+03
      'nanometres_cubed'         'picometres_cubed'         '*'   1.0E+09
 #
      'angstroms_cubed'          'nanometres_cubed'         '*'   1.0E-03
      'angstroms_cubed'          'picometres_cubed'         '*'   1.0E+06
 #
      'picometres_cubed'         'nanometres_cubed'         '*'   1.0E-09
      'picometres_cubed'         'angstroms_cubed'          '*'   1.0E-06
 ###
      'kilopascals'              'gigapascals'              '*'   1.0E-06
      'gigapascals'              'kilopascals'              '*'   1.0E+06
 ###
      'hours'                    'minutes'                  '*'   6.0E+01
      'hours'                    'seconds'                  '*'   3.6E+03
      'hours'                    'microseconds'             '*'   3.6E+09
 #
      'minutes'                  'hours'                    '/'   6.0E+01
      'minutes'                  'seconds'                  '*'   6.0E+01
      'minutes'                  'microseconds'             '*'   6.0E+07
 #
      'seconds'                  'hours'                    '/'   3.6E+03
      'seconds'                  'minutes'                  '/'   6.0E+01
      'seconds'                  'microseconds'             '*'   1.0E+06
 #
      'microseconds'             'hours'                    '/'   3.6E+09
      'microseconds'             'minutes'                  '/'   6.0E+07
      'microseconds'             'seconds'                  '/'   1.0E+06
 ###
      'celsius'                  'kelvins'                  '-'     273.0
      'kelvins'                  'celsius'                  '+'     273.0
 ###
      'electrons_per_nanometres_cubed'
      'electrons_per_angstroms_cubed'                       '*'   1.0E+03
      'electrons_per_nanometres_cubed'
      'electrons_per_picometres_cubed'                      '*'   1.0E+09
 #
      'electrons_per_angstroms_cubed'
      'electrons_per_nanometres_cubed'                      '*'   1.0E-03
      'electrons_per_angstroms_cubed'
      'electrons_per_picometres_cubed'                      '*'   1.0E+06
 #
      'electrons_per_picometres_cubed'
      'electrons_per_nanometres_cubed'                      '*'   1.0E-09
      'electrons_per_picometres_cubed'
      'electrons_per_angstroms_cubed'                       '*'   1.0E-06
 ###

 ########################
 ## DICTIONARY_HISTORY ##
 ########################

      loop_
     _dictionary_history.version
     _dictionary_history.update
     _dictionary_history.revision
    
     1.7.3   2013-10-15
    
 ;  Major cleanup of dcitionary typos, misplaced loops, etc
        by John Westbrook
    
     +  Change _item.mandatory_code of all *.variant to implicit
     +  Add _diffrn_refln.id and _diffrn_refln.diffrn_id
     +  Correct many _item.name values that were wrong or missing
        quote marks
    
 ;


    
     1.7.2   2013-10-07
    
 ;  Add FEL detector positioning tags and change back to NXgoniometer
    
     +  Add
        _axis.rotation_axis and
        _axis.rotation and
     +  Change NXsample back to NXgoniometer
    
 ;

     1.7.1   2013-08-10
    
 ;  Minor cleanup (HJB)
    
     +  Correction to description of
          _diffrn_data_frame.array_section_id
     +  Change NXgoniometer to NXsample
     +  Fix typos in NeXus mappings
    
 ;
    
     1.7     2013-06-18
    
 ;  Additions to start merge of CBF, HDF5 and NeXus (HJB)
    
     +  Define new ARRAY_STRUCTURE_LIST_SECTION category
     +  Add new _category.NX_mapping_details DDL tag to carry
        details on NeXus category mappings.
     +  Define new tags _array_structure_list_section.array_id,
        _array_structure_list_section.id,
        _array_structure_list_section.index,
        _array_structure_list_section.end,
        _array_structure_list_section.start,
        _array_structure_list_section.stride,
        _array_structure_list_section.variant,
        _diffrn_data_frame.array_section_id,
        _diffrn_detector.layer_thickness,
        _map_segment.array_section_id,
        _map_segment.mask_array_section_id

 ;
    
     1.6.4   2011-07-02
   
 ;  Corrections to support DLS Dectris header as per G. Winter (HJB)

     +  Define new tags _diffrn_scan.time_period,
        _diffrn_scan.time_rstrt_incr,
        _diffrn_scan_frame.time_period,
        _diffrn_scan_frame.time_rstrt_incr
     +  fix bad category name in loop in _diffrn_detector.id
     +  remove stray text field terminator at line 4642
     +  fix unquoted tag as a value in _diffrn_scan_frame_monitor.id
     +  make formerly mandatory and implicit deprecated items non-mandatory

 ;

    1.6.3   2010-08-26
   
 ;  Cummulative corrections from 1.6.0, 1, 2 drafts (HJB)

     +  Move descriptive dictionary comments into
     _datablock.description with catgeory tree described
     +  add default _array_data.array_id value of 1
     +  add option of CBF_BACKGROUND_OFFSET_DELTA compression
     +  add VARIANT category and tags
     +  add DIFFRN_SCAN_FRAME_MONITOR category

 ;

    1.5.4   2007-07-28

 ;  Typographics corrections (HJB)

      + Corrected embedded degree characters to \%
      + Corrected embedded Aring to \%A
      + Added trailing ^ for a power
      + Removed 2 cases of a space after an underscore
        in tag name.
 ;
  
    1.5.3   2007-07-08
   
 ;  Changes to support SLS miniCBF and suggestions
    from the 24 May 07 BNL imgCIF workshop (HJB)
 
      + Added new data items
        '_array_data.header_contents',
        '_array_data.header_convention',
        '_diffrn_data_frame.center_fast',
        '_diffrn_data_frame.center_slow',
        '_diffrn_data_frame.center_units',
        '_diffrn_measurement.sample_detector_distance',
        '_diffrn_measurement.sample_detector_voffset
      + Deprecated data items
        '_diffrn_detector_element.center[1]',
        '_diffrn_detector_element.center[2]'
      + Added comments and example on miniCBF
      + Changed all array_id data items to implicit
 ;
   
    1.5.2   2007-05-06
   
 ;  Further clarifications of the coordinate system. (HJB)
 ;

    1.5.1   2007-04-26
   
 ;  Improve defintion of X-axis to cover the case of no goniometer
    and clean up more line folds (HJB)
 ;

    1.5     2007-07-25
   
 ;  This is a cummulative list of the changes proposed since the
    imgCIF workshop in Hawaii in July 2006.  It is the result
    of contributions by H. J. Bernstein, A. Hammersley,
    J. Wright and W. Kabsch.
   
    2007-02-19 Consolidated changes (edited by HJB)
      + Added new data items
        '_array_structure.compression_type_flag',
        '_array_structure_list_axis.fract_displacement',
        '_array_structure_list_axis.displacement_increment',
        '_array_structure_list_axis.reference_angle',
        '_array_structure_list_axis.reference_displacement',
        '_axis.system',
        '_diffrn_detector_element.reference_center_fast',
        '_diffrn_detector_element.reference_center_slow',
        '_diffrn_scan_axis.reference_angle',
        '_diffrn_scan_axis.reference_displacement',
        '_map.details', '_map.diffrn_id',
        '_map.entry_id', '_map.id',
        '_map_segment.array_id', '_map_segment.binary_id',
        '_map_segment.mask_array_id', '_map_segment.mask_binary_id',
        '_map_segment.id', '_map_segment.map_id',
        '_map_segment.details.
      + Change type of
        '_array_structure.byte_order' and
        '_array_structure.compression_type'
        to ucode to make these values case-insensitive
      + Add values 'packed_v2' and 'byte_offset' to enumeration of values for
        '_array_structure.compression_type'
      + Add to definitions for the binary data type to handle new compression
        types, maps, and a variety of new axis types.
     2007-07-25 Cleanup of typos for formal release (HJB)
      + Corrected text fields for reference_ tag descriptions that
        were off by one column
      + Fix typos in comments listing fract_ tags
      + Changed name of release from 1.5_DRAFT to 1.5
      + Fix unclosed text fields in various map definitions
      
 ;

    1.4     2006-07-04

 ;  This is a change to reintegrate all changes made in the course of
    publication of ITVG, by the RCSB from April 2005 through
    August 2008 and changes for the 2006 imgCIF workshop in
    Hawaii.

    2006-07-04 Consolidated changes for the 2006 imgCIF workshop (edited by HJB)
      + Correct type of '_array_structure_list.direction' from 'int' to 'code'.
      + Added new data items suggested by CN
        '_diffrn_data_frame.details'
        '_array_intensities.pixel_fast_bin_size',
        '_array_intensities.pixel_slow_bin_size and
        '_array_intensities.pixel_binning_method
      + Added deprecated item for completeness
        '_diffrn_frame_data.details'
      + Added entry for missing item in contents list
        '_array_structure_list_axis.displacement'
      + Added new MIME type X-BASE32K based on work by VL, KM, GD, HJB
      + Correct description of MIME boundary delimiter to start in
        column 1.
      + General cleanup of text fields to conform to changes for ITVG
        by removing empty lines at start and finish of text field.
      + Amend example for ARRAY_INTENSITIES to include binning.
      + Add local copy of type specification (as 'code') for all children
        of '_diffrn.id'.
      + For consistency, change all references to 'pi' to '\p' and all
        references to 'Angstroms' to '\%Angstroms'.
      + Clean up all powers to use IUCr convention of '^power^', as in
        '10^3^' for '10**3'.
      + Update 'yyyy-mm-dd' type regex to allow truncation from the right
        and improve comments to explain handling of related mmCIF
        'yyyy-mm-dd:hh:mm' type, and use of 'Z' for GMT time zone.

    2005-03-08 and
    2004-08-08 fixed cases where _item_units.code  used
               instead of _item_type.code (JDW)
    2004-04-15 fixed item ordering in
                _diffrn_measurement_axis.measurement_id
                added sub_category 'vector' (JDW)
 ;

    1.3.2   2005-06-25

 ;  2005-06-25 ITEM_TYPE_LIST: code, ucode, line, uline regexps updated
               to those of current mmCIF; float modified by allowing integers
               terminated by a point as valid. The 'time' part of
               yyyy-mm-dd types made optional in the regexp. (BM)

    2005-06-17 Minor corrections as for proofs for IT G Chapter 4.6
    (NJA)

    2005-02-21  Minor corrections to spelling and punctuation
    (NJA)

    2005-01-08 Changes as per Nicola Ashcroft.
    + Updated example 1 for DIFFRN_MEASUREMENT to agree with mmCIF.
    + Spelled out "micrometres" for "um" and "millimetres" for "mm".
    + Removed phrase "which may be stored" from ARRAY_STRUCTURE
      description.
    + Removed unused 'byte-offsets' compressions and updated
      cites to ITVG for '_array_structure.compression_type'.
    (HJB)
 ;

    1.3.1   2003-08-13
 ;
    Changes as per Frances C. Bernstein.
    + Identify initials.
    + Adopt British spelling for centre in text.
    + Set \p and \%Angstrom and powers.
    + Clean up commas and unclear wordings.
    + Clean up tenses in history.
    Changes as per Gotzon Madariaga.
    + Fix the ARRAY_DATA example to align '_array_data.binary_id'
    and X-Binary-ID.
    + Add a range to '_array_intensities.gain_esd'.
    + In the example of DIFFRN_DETECTOR_ELEMENT,
    '_diffrn_detector_element.id' and
    '_diffrn_detector_element.detector_id' interchanged.
    + Fix typos for direction, detector and axes.
    + Clarify description of polarisation.
    + Clarify axes in '_diffrn_detector_element.center[1]'
     '_diffrn_detector_element.center[2]'.
    + Add local item types for items that are pointers.
    (HJB)
 ;


    1.3.0   2003-07-24
 ;
    Changes as per Brian McMahon.
    + Consistently quote tags embedded in text.
    + Clean up introductory comments.
    + Adjust line lengths to fit in 80 character window.
    + Fix several descriptions in AXIS category which
      referred to '_axis.type' instead of the current item.
    + Fix erroneous use of deprecated item
      '_diffrn_detector_axis.id' in examples for
      DIFFRN_SCAN_AXIS.
    + Add deprecated items '_diffrn_detector_axis.id'
      and '_diffrn_measurement_axis.id'.
    (HJB)
 ;


    1.2.4   2003-07-14
 ;
    Changes as per I. David Brown.
    + Enhance descriptions in DIFFRN_SCAN_AXIS to make them less
      dependent on the descriptions in DIFFRN_SCAN_FRAME_AXIS.
    + Provide a copy of the deprecated DIFFRN_FRAME_DATA
      category for completeness.
    (HJB)
 ;


    1.2.3   2003-07-03
 ;
    Cleanup to conform to ITVG.
    + Correct sign error in ..._cubed units.
    + Correct '_diffrn_radiation.polarisn_norm' range.
    (HJB)
 ;


    1.2.2   2003-03-10
 ;
    Correction of typos in various DIFFRN_SCAN_AXIS descriptions.
    (HJB)
 ;


    1.2.1   2003-02-22
 ;
    Correction of ATOM_ for ARRAY_ typos in various descriptions.
    (HJB)
 ;


    1.2     2003-02-07
 ;
    Corrections to encodings (remove extraneous hyphens) remove
    extraneous underscore in '_array_structure.encoding_type'
    enumeration.  Correct typos in items units list.  (HJB)
 ;


    1.1.3   2001-04-19
 ;
    Another typo corrections by Wilfred Li, and cleanup by HJB.
 ;


    1.1.2   2001-03-06
 ;
    Several typo corrections by Wilfred Li.
 ;


    1.1.1   2001-02-16
 ;
    Several typo corrections by JW.
 ;


    1.1     2001-02-06
 ;
    Draft resulting from discussions on header for use at NSLS.  (HJB)

    + Change DIFFRN_FRAME_DATA to DIFFRN_DATA_FRAME.

    + Change '_diffrn_detector_axis.id' to '_diffrn_detector_axis.detector_id'.

    + Add '_diffrn_measurement_axis.measurement_device' and change
      '_diffrn_measurement_axis.id' to
      '_diffrn_measurement_axis.measurement_id'.

    + Add '_diffrn_radiation.div_x_source', '_diffrn_radiation.div_y_source',
     '_diffrn_radiation.div_x_y_source',
     '_diffrn_radiation.polarizn_source_norm',
    '_diffrn_radiation.polarizn_source_ratio', '_diffrn_scan.date_end',
    '_diffrn_scan.date_start', '_diffrn_scan_axis.angle_rstrt_incr',
    '_diffrn_scan_axis.displacement_rstrt_incr',
    '_diffrn_scan_frame_axis.angle_increment',
    '_diffrn_scan_frame_axis.angle_rstrt_incr',
    '_diffrn_scan_frame_axis.displacement',
    '_diffrn_scan_frame_axis.displacement_increment',and
    '_diffrn_scan_frame_axis.displacement_rstrt_incr'.

    + Add '_diffrn_measurement.device' to category key.

    + Update yyyy-mm-dd to allow optional time with fractional seconds
      for time stamps.

    + Fix typos caught by RS.

    + Add ARRAY_STRUCTURE_LIST_AXIS category, and use concept of axis sets to
      allow for coupled axes, as in spiral scans.

    + Add examples for fairly complete headers thanks to R. Sweet and P.
      Ellis.
 ;


    1.0     2000-12-21
 ;
    Release version - few typos and tidying up.  (BM & HJB)

    + Move ITEM_TYPE_LIST, ITEM_UNITS_LIST and DICTIONARY_HISTORY to end
    of dictionary.

    + Alphabetize dictionary.
 ;


    0.7.1   2000-09-29
 ;
    Cleanup fixes.  (JW)

    + Correct spelling of DIFFRN_MEASUREMENT_AXIS in '_axis.id'

    + Correct ordering of uses of '_item.mandatory_code' and
    '_item_default.value'.
 ;


    0.7.0   2000-09-09
 ;
    Respond to comments by I. David Brown.  (HJB)

    + Add further comments on '\n' and '\t'.

    + Update ITEM_UNITS_LIST by taking section from mmCIF dictionary
      and adding metres.  Change 'meter' to 'metre' throughout.

    + Add missing enumerations to '_array_structure.compression_type'
      and make 'none' the default.

    + Remove parent-child relationship between
      '_array_structure_list.index' and '_array_structure_list.precedence'.

    + Improve alphabetization.

    + Fix '_array_intensities_gain.esd' related function.

    + Improve comments in AXIS.

    + Fix DIFFRN_FRAME_DATA example.

    + Remove erroneous DIFFRN_MEASUREMENT example.

    + Add '_diffrn_measurement_axis.id' to the category key.
 ;


    0.6.0   1999-01-14
 ;
    Remove redundant information for ENC_NONE data.  (HJB)

    + After the D5 remove binary section identifier, size and
      compression type.

    + Add Control-L to header.
 ;


    0.5.1   1999-01-03
 ;
    Cleanup of typos and syntax errors.  (HJB)

    + Cleanup example details for DIFFRN_SCAN category.

    + Add missing quote marks for '_diffrn_scan.id' definition.
 ;


    0.5   1999-01-01
 ;
    Modifications for axis definitions and reduction of binary header.  (HJB)

    + Restore '_diffrn_detector.diffrn_id' to DIFFRN_DETECTOR KEY.

    + Add AXIS category.

    + Bring in complete DIFFRN_DETECTOR and DIFFRN_MEASUREMENT categories
      from cif_mm.dic for clarity.

    + Change '_array_structure.encoding_type' from type code to uline and
      added X-Binary-Element-Type to MIME header.

    + Add detector beam centre '_diffrn_detector_element.center[1]' and
      '_diffrn_detector_element.center[2]'.

    + Correct item name of '_diffrn_refln.frame_id'.

    + Replace reference to '_array_intensities.undefined' by
      '_array_intensities.undefined_value'.

    + Replace references to '_array_intensity.scaling' with
      '_array_intensities.scaling'.

    + Add DIFFRN_SCAN... categories.
 ;


    0.4   1998-08-11
 ;
    Modifications to the 0.3 imgCIF draft.  (HJB)

    + Reflow comment lines over 80 characters and corrected typos.

    + Update examples and descriptions of MIME encoded data.

    + Change name to cbfext98.dic.
 ;


    0.3   1998-07-04
 ;
    Modifications for imgCIF.  (HJB)

    + Add binary type, which is a text field containing a variant on
      MIME encoded data.

    + Change type of '_array_data.data' to binary and specify internal
      structure of raw binary data.

    + Add '_array_data.binary_id', and make
      '_diffrn_frame_data.binary_id' and '_array_intensities.binary_id'
      into pointers to this item.
 ;


    0.2   1997-12-02
 ;
    Modifications to the CBF draft.  (JW)

    + Add category hierarchy for describing frame data developed from
      discussions at the BNL imgCIF Workshop Oct 1997.   The following
      changes are made in implementing the workshop draft.  Category
      DIFFRN_array_data is renamed to DIFFRN_FRAME_DATA.  Category
      DIFFRN_FRAME_TYPE is renamed to DIFFRN_DETECTOR_ELEMENT.   The
      parent item for '_diffrn_frame_data.array_id' is changed from
      '_array_structure_list.array_id' to '_array_structure.id'. Item
      '_diffrn_detector.array_id' is deleted.
    + Add data item '_diffrn_frame_data.binary_id' to identify data
      groups within a binary section.  The formal identification of the
      binary section is still fuzzy.
 ;


    0.1   1997-01-24
 ;
    First draft of this dictionary in DDL 2.1 compliant format by John
    Westbrook (JW).  This version is adapted from the Crystallographic
    Binary File (CBF) Format Draft Proposal provided by Andy Hammersley
    (AH).

    Modifications to the CBF draft.  (JW)

    + In this version the array description has been cast in the categories
      ARRAY_STRUCTURE and ARRAY_STRUCTURE_LIST.  These categories
      have been generalized to describe array data  of arbitrary dimension.

    + Array data in this description are contained in the category
      ARRAY_DATA.  This departs from the CBF notion of data existing
      in some special comment. In this description, data are handled as an
      ordinary data item encapsulated in a character data type.   Although
      data this manner deviates from CIF conventions, it does not violate
      any DDL 2.1 rules.  DDL 2.1 regular expressions can be used to define
      the binary representation which will permit some level of data
      validation.  In this version, the placeholder type code "any" has
      been used. This translates to a regular expression which will match
      any pattern.

      It should be noted that DDL 2.1 already supports array data objects
      although these have not been used in the current mmCIF dictionary.
      It may be possible to use the DDL 2.1 ITEM_STRUCTURE and
      ITEM_STRUCTURE_LIST categories to provide the information that is
      carried in by the ARRAY_STRUCTURE and ARRAY_STRUCTURE_LIST.  By
      moving the array structure to the DDL level it would be possible to
      define an array type as well as a regular expression defining the
      data format.

    + Multiple array sections can be properly handled within a single
      datablock.
 ;


 #-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof-eof