diff --git a/pynxtools/dataconverter/readers/xrd/files/ACZCTS_5-60_181.xrdml b/pynxtools/dataconverter/readers/xrd/files/ACZCTS_5-60_181.xrdml deleted file mode 100644 index 5af61b718..000000000 --- a/pynxtools/dataconverter/readers/xrd/files/ACZCTS_5-60_181.xrdml +++ /dev/null @@ -1,106 +0,0 @@ - - - - Configuration=XYZ Stage, Owner=User-1, Creation date=02-Nov-17 2:08:05 PM - Goniometer=PW3050/60 (Theta/Theta); Minimum step size 2Theta:0.001; Minimum step size Omega:0.001 - Sample stage=Programmable x,y,z stage; Minimum step size X:0.01; Minimum step size Y:0.01; Minimum step size Z:0.001 - Diffractometer system=XPERT-PRO - Measurement program=D:\user\Pepe\program_files\BB_10-80_18min.xrdmp, Identifier={5202C7B3-EFFD-43D7-83CA-1A77018B086F} - Batch program=D:\user\Pepe\program_files\batch_5samples.xrdmp, Identifier={49B9A751-97B5-49F0-9CAA-E07AE5E71B6A} - - - - - - - - - PHD Lower Level = 4.02 (keV), PHD Upper Level = 11.26 (keV) - - - 1.5405980 - 1.5444260 - 1.3922500 - 0.5000 - - - 240.00 - - 40 - 40 - Cu - - 12.0 - 0.4 - 6.0 - - - - 0.0400 - - - 11.60 - - - 140.00 - 0.38 - - - - 240.00 - - 8.00 - - - 0.0400 - - - Ni - 0.020 - - - - 25.0 - 70.0 - - Scanning - 3.347 - - - -
- 2018-06-12T18:34:49+02:00 - 2018-06-12T18:53:34+02:00 - - cnu_xlab - - - Data Collector - XPERT-PRO - 0000000011035964 - -
- - - 10.00656514 - 79.99097181 - - - 5.00328257 - 39.99548591 - - - 0.00 - - - 50.00 - - - 7.868 - - 49.470 - 2086 2053 2118 2024 2127 2128 2115 2093 2063 1985 2038 2118 2107 2136 2080 2150 2036 2039 2073 2025 2069 2028 2070 1975 1978 2068 2116 2075 2000 2082 1944 2037 1994 2061 2035 2132 2046 2133 1981 2066 1986 2008 2028 2052 2065 2136 2104 2096 1935 2029 2036 2023 1933 2023 2040 2080 1964 2003 1960 1940 2079 2102 1959 2058 1970 2002 1974 1955 1998 2025 2060 1908 2014 2037 1925 2028 1944 2052 2012 2002 2018 1977 2063 1963 2073 1963 1964 1904 1971 1979 1975 2012 2008 1988 1946 1990 1894 1990 1897 1979 1934 2009 1986 1978 1915 1915 2010 1953 1891 1978 1983 1997 1984 1959 2032 1990 1949 1959 1925 1978 1963 1879 2055 1883 1974 1949 1929 1987 2000 1893 1926 1961 1978 1920 1965 1962 1919 1930 2007 1970 1960 1904 2005 1946 1893 1950 1908 1906 1983 1885 1928 1882 1835 1916 1951 2040 1986 1905 1970 1889 1916 2011 1973 1898 1954 1935 1839 1977 1876 1834 1850 1844 1928 2021 1913 1858 1860 1800 1907 1844 1850 1856 1924 1896 1902 1910 1904 1881 1916 2005 1825 1881 1902 1986 1936 1860 1928 1935 1858 1918 1873 1854 1954 1807 1871 1778 1847 1898 1836 1861 1855 1907 1804 1907 1861 1833 1904 1835 1899 1862 1826 1881 1905 1876 1969 1962 1869 1888 1808 1770 1888 1865 1794 1852 1834 1851 1840 1846 1872 1850 1829 1818 1817 1869 1760 1888 1895 1866 1896 1807 1867 1834 1743 1835 1866 1817 1816 1821 1781 1828 1790 1836 1841 1774 1831 1825 1804 1795 1776 1888 1805 1771 1837 1857 1777 1758 1801 1864 1796 1808 1801 1798 1786 1758 1815 1865 1809 1767 1790 1785 1719 1869 1762 1819 1739 1855 1746 1796 1804 1748 1745 1787 1835 1826 1753 1823 1867 1833 1777 1761 1778 1806 1826 1833 1740 1735 1792 1788 1738 1704 1711 1767 1841 1749 1791 1850 1794 1735 1761 1863 1800 1673 1684 1738 1651 1779 1686 1700 1767 1737 1722 1805 1812 1746 1720 1647 1744 1746 1724 1739 1734 1697 1780 1684 1672 1699 1667 1685 1777 1647 1695 1761 1750 1700 1724 1719 1678 1726 1727 1653 1766 1753 1753 1729 1816 1708 1720 1661 1686 1812 1733 1823 1696 1716 1663 1727 1665 1731 1756 1698 1692 1726 1676 1751 1761 1628 1774 1719 1565 1690 1709 1667 1660 1663 1682 1759 1685 1673 1653 1724 1648 1745 1698 1615 1708 1691 1619 1694 1603 1620 1647 1663 1673 1646 1616 1627 1618 1615 1624 1630 1625 1629 1705 1657 1661 1633 1613 1611 1673 1643 1653 1576 1696 1649 1582 1601 1565 1696 1637 1592 1639 1579 1665 1561 1640 1716 1640 1632 1674 1712 1723 1647 1688 1666 1728 1706 1780 1731 1737 1801 1785 1910 1889 1967 1925 1833 1872 1855 1773 1799 1784 1684 1751 1765 1688 1633 1661 1699 1747 1668 1631 1607 1620 1690 1590 1594 1633 1665 1666 1698 1652 1642 1628 1662 1647 1621 1646 1674 1669 1696 1640 1717 1634 1611 1637 1670 1653 1583 1606 1620 1690 1528 1627 1596 1689 1625 1576 1612 1543 1716 1575 1690 1571 1586 1556 1637 1611 1608 1586 1670 1579 1646 1570 1695 1602 1518 1491 1679 1755 1685 1729 1572 1564 1592 1655 1661 1609 1621 1652 1676 1612 1631 1617 1571 1584 1690 1624 1660 1667 1635 1606 1670 1555 1604 1709 1646 1652 1613 1663 1588 1648 1625 1548 1654 1639 1542 1495 1639 1628 1602 1615 1609 1541 1721 1580 1640 1567 1604 1685 1610 1619 1677 1753 1667 1723 1697 1782 1777 1682 1737 1746 1654 1730 1687 1592 1552 1590 1576 1606 1608 1541 1589 1489 1596 1494 1598 1591 1610 1553 1527 1602 1626 1664 1549 1542 1580 1587 1544 1562 1563 1533 1482 1508 1602 1555 1557 1585 1507 1469 1582 1552 1575 1575 1528 1515 1518 1539 1560 1615 1491 1523 1537 1474 1537 1571 1521 1523 1560 1522 1488 1466 1627 1528 1637 1553 1580 1619 1505 1472 1552 1443 1558 1501 1542 1589 1574 1532 1566 1446 1503 1555 1563 1467 1492 1476 1570 1540 1562 1515 1480 1491 1483 1509 1455 1549 1502 1543 1531 1546 1516 1447 1527 1480 1592 1550 1496 1496 1474 1431 1468 1537 1519 1526 1507 1525 1500 1494 1503 1504 1522 1541 1584 1522 1466 1498 1435 1533 1520 1584 1415 1490 1406 1520 1481 1548 1440 1471 1559 1511 1571 1518 1544 1440 1410 1451 1516 1437 1549 1459 1493 1510 1533 1487 1419 1475 1452 1500 1415 1438 1474 1493 1436 1449 1422 1441 1404 1407 1422 1413 1477 1408 1419 1475 1425 1414 1501 1335 1431 1434 1487 1430 1496 1440 1489 1420 1435 1537 1352 1456 1438 1460 1455 1443 1533 1434 1506 1417 1441 1440 1429 1483 1400 1475 1512 1424 1454 1485 1401 1513 1449 1403 1393 1417 1432 1438 1391 1393 1380 1376 1473 1430 1387 1405 1434 1376 1441 1394 1407 1389 1363 1396 1452 1420 1396 1360 1412 1432 1427 1375 1424 1367 1372 1407 1523 1410 1372 1383 1417 1449 1330 1343 1407 1377 1416 1448 1429 1498 1464 1412 1390 1402 1313 1351 1434 1360 1410 1412 1370 1343 1359 1402 1381 1352 1419 1361 1417 1388 1388 1359 1396 1366 1369 1368 1338 1333 1406 1336 1351 1366 1369 1364 1365 1358 1346 1372 1340 1251 1314 1363 1472 1391 1344 1398 1394 1363 1410 1312 1430 1450 1381 1410 1371 1371 1378 1370 1316 1326 1355 1257 1303 1326 1388 1322 1368 1324 1350 1403 1413 1423 1403 1400 1414 1363 1403 1318 1324 1309 1360 1325 1376 1402 1391 1419 1323 1338 1477 1372 1430 1425 1427 1426 1414 1478 1515 1547 1635 1621 1653 1795 1726 1706 1611 1538 1541 1466 1505 1430 1449 1358 1377 1375 1350 1315 1356 1312 1279 1285 1303 1285 1300 1385 1283 1302 1413 1344 1327 1288 1288 1317 1321 1322 1377 1346 1385 1331 1419 1350 1271 1405 1356 1318 1283 1328 1303 1358 1352 1333 1310 1267 1276 1287 1318 1304 1277 1321 1274 1294 1292 1333 1235 1233 1249 1299 1334 1313 1266 1321 1278 1293 1267 1257 1247 1381 1313 1342 1268 1300 1239 1286 1328 1319 1300 1333 1300 1285 1355 1202 1251 1340 1255 1306 1300 1270 1277 1292 1182 1265 1332 1291 1211 1296 1366 1242 1257 1323 1296 1255 1241 1312 1310 1206 1198 1234 1269 1322 1272 1341 1339 1195 1247 1284 1278 1323 1287 1242 1251 1225 1273 1271 1231 1266 1208 1246 1289 1229 1221 1224 1266 1248 1256 1273 1227 1254 1246 1207 1296 1292 1236 1245 1275 1252 1216 1250 1241 1218 1246 1249 1253 1291 1250 1269 1266 1186 1229 1283 1243 1297 1224 1201 1200 1192 1246 1211 1275 1297 1274 1202 1239 1243 1223 1211 1250 1300 1267 1232 1233 1256 1213 1168 1234 1349 1331 1229 1280 1344 1281 1302 1265 1316 1297 1229 1284 1241 1275 1268 1292 1315 1323 1357 1363 1362 1387 1428 1480 1582 1459 1478 1425 1303 1284 1233 1312 1269 1249 1218 1215 1258 1183 1238 1224 1276 1238 1216 1148 1141 1144 1158 1159 1140 1203 1234 1224 1269 1147 1167 1192 1225 1160 1175 1169 1266 1204 1175 1227 1173 1211 1202 1143 1201 1170 1171 1255 1246 1222 1211 1132 1184 1160 1163 1158 1107 1197 1202 1143 1243 1137 1212 1182 1156 1166 1213 1232 1217 1229 1170 1203 1172 1175 1246 1214 1185 1185 1280 1136 1201 1170 1210 1164 1180 1205 1272 1156 1104 1202 1187 1190 1162 1207 1186 1184 1289 1187 1165 1156 1144 1125 1250 1222 1215 1224 1204 1247 1176 1213 1226 1270 1237 1336 1323 1295 1384 1445 1468 1431 1459 1497 1540 1510 1544 1524 1612 1554 1417 1518 1441 1484 1376 1415 1396 1443 1360 1359 1317 1347 1352 1378 1335 1360 1331 1303 1429 1285 1338 1341 1417 1356 1437 1353 1380 1410 1412 1360 1425 1516 1457 1554 1527 1489 1613 1672 1661 1901 1849 1830 2014 2074 2072 2293 2524 2763 2892 3235 3594 4081 4820 5534 6332 7671 9236 11473 14125 17900 23015 29549 33330 33088 27079 20836 18840 18681 17777 14397 9708 6420 4517 3701 3046 2821 2422 2290 2084 1966 1863 1790 1692 1678 1594 1564 1529 1448 1395 1441 1498 1455 1417 1441 1394 1403 1384 1394 1352 1303 1333 1309 1321 1279 1271 1318 1254 1327 1285 1258 1198 1261 1278 1294 1196 1197 1174 1202 1253 1179 1211 1214 1233 1231 1283 1273 1231 1340 1337 1360 1363 1362 1396 1431 1401 1420 1445 1465 1394 1373 1325 1298 1284 1235 1245 1276 1199 1192 1156 1157 1237 1179 1148 1088 1159 1145 1172 1160 1075 1136 1159 1134 1135 1158 1143 1194 1114 1122 1081 1131 1077 1119 1091 1061 1091 1113 1159 1037 1109 1065 1105 1117 1073 1134 1090 1073 1101 1094 1043 1039 1121 1075 1125 1082 1023 1045 1042 1133 1115 1070 1014 1019 1069 998 1116 983 1030 1053 1024 1022 1063 1058 1018 1089 1034 1040 1041 1099 1002 1066 1008 1048 978 1110 1041 1032 1064 1032 1047 1086 1049 1076 1088 1003 1041 1056 1099 1101 1084 1074 1110 1095 1106 1058 1145 1141 1113 1142 1177 1087 1096 1122 1108 1097 1076 1036 1041 1020 1045 1116 1056 1040 1030 1053 1030 1022 1052 1030 954 1044 1052 1013 1018 1035 1013 1010 1043 989 1009 1027 994 997 1043 962 1013 1033 1044 971 988 989 988 991 1044 1000 967 1005 1016 1037 1011 991 957 965 1031 1053 992 996 1044 969 953 986 1021 986 989 972 939 1001 1043 974 981 1020 1019 957 967 1002 1016 969 949 988 912 983 975 952 990 1015 927 1035 996 1043 933 992 1016 1005 989 920 1060 1003 955 969 1014 961 985 1030 932 987 1021 1034 1019 998 1031 1051 954 1008 946 977 980 993 973 1004 1081 1070 1027 1053 1010 1072 1120 1079 1051 1087 1064 1098 1081 1102 1189 1120 1224 1377 1318 1410 1504 1582 1717 1620 1629 1555 1488 1500 1486 1385 1416 1364 1329 1200 1227 1226 1149 1208 1182 1181 1083 1164 1187 1191 1186 1178 1154 1166 1200 1227 1249 1292 1205 1329 1246 1279 1353 1384 1390 1364 1287 1281 1338 1325 1273 1220 1303 1157 1210 1195 1148 1170 1176 1259 1163 1127 1185 1174 1123 1107 1146 1196 1065 1077 1128 1119 1200 1164 1144 1166 1248 1154 1154 1115 1122 1112 1136 1086 1155 1273 1124 1190 1151 1071 1154 1074 1167 1134 1114 1082 1077 1105 1022 1070 1051 1053 1015 980 1021 1005 997 1009 1021 952 1012 1061 1032 1008 1006 1019 1006 947 965 994 1056 907 970 981 955 955 993 1011 1002 951 1013 1017 976 984 889 984 964 970 984 931 933 933 932 916 945 946 944 930 921 924 907 917 907 1024 953 904 927 937 921 950 948 975 869 926 861 946 915 886 891 923 895 879 825 899 878 919 896 879 860 832 928 911 864 882 921 888 892 879 846 963 919 952 893 910 913 884 954 824 884 879 891 860 879 917 887 928 857 933 857 927 881 875 844 873 910 881 840 887 854 899 860 909 857 885 835 854 887 896 932 893 896 865 879 899 878 887 844 843 864 850 800 869 905 857 894 897 928 873 841 822 886 849 828 854 922 882 855 825 817 858 901 863 840 894 886 902 862 842 877 854 845 870 823 864 892 890 866 854 860 917 871 888 863 900 860 794 866 912 935 884 827 914 891 924 964 899 892 890 884 907 851 876 924 944 996 974 1058 1011 1002 1055 1089 1091 1147 1209 1167 1237 1157 1164 1107 1082 1046 1075 1041 1022 982 979 956 953 881 831 861 889 894 834 901 873 839 878 895 891 954 916 958 959 908 969 913 950 835 887 910 902 948 909 875 877 905 856 900 926 872 843 854 829 836 857 904 800 817 899 894 871 778 834 821 873 878 799 877 853 847 847 874 902 901 864 845 835 897 850 833 810 804 850 876 897 905 887 860 858 899 887 834 889 863 893 830 914 925 927 909 885 965 940 947 907 911 916 873 885 847 923 846 836 850 856 804 784 847 862 824 844 881 837 813 818 848 887 887 853 808 804 853 840 862 919 837 820 808 905 838 861 857 817 800 841 871 880 874 839 889 855 844 875 874 872 848 881 896 831 822 833 840 876 858 847 854 841 841 930 977 950 939 940 956 932 952 959 1014 992 967 984 973 950 984 1008 997 994 991 1006 1012 1063 1010 1091 1115 1160 1105 1179 1198 1202 1222 1282 1314 1311 1389 1377 1405 1312 1393 1377 1416 1385 1349 1347 1410 1391 1327 1442 1382 1349 1386 1397 1445 1386 1474 1458 1450 1414 1420 1448 1469 1521 1501 1487 1537 1531 1456 1594 1529 1635 1574 1574 1611 1675 1568 1634 1589 1642 1717 1679 1708 1737 1659 1745 1763 1717 1730 1847 1782 1803 1864 1952 2040 2017 2101 2098 2067 2177 2236 2309 2344 2535 2521 2625 2722 2983 2906 3164 3413 3643 3771 4111 4374 4700 5170 5606 5920 6519 6981 7807 8535 9324 10317 11260 12671 13820 15930 17757 19828 22311 25843 29316 33738 38285 43955 50089 56440 62996 69428 74307 77322 77919 76144 73310 68798 65125 61819 58419 55442 51345 46303 41361 35801 31152 26874 23004 19856 17349 15284 13441 12150 10675 9276 8485 7737 6932 6383 5863 5307 4915 4516 4192 4020 3706 3556 3398 3187 3064 3015 2861 2714 2625 2473 2409 2405 2286 2247 2259 2141 2098 2051 2054 1956 1979 1973 1864 1824 1795 1720 1800 1753 1688 1682 1568 1642 1570 1530 1523 1570 1583 1501 1501 1572 1478 1499 1405 1369 1423 1472 1457 1392 1361 1440 1305 1326 1352 1329 1302 1309 1278 1278 1295 1284 1252 1222 1234 1274 1212 1236 1183 1202 1161 1198 1265 1141 1123 1131 1172 1237 1158 1115 1172 1226 1122 1127 1172 1135 1089 1077 1100 1073 1033 1042 1064 1088 1121 1092 1095 1104 1061 1058 1049 1057 1040 1007 1050 1014 1042 1026 979 1082 1040 963 953 965 999 1017 1014 1025 907 935 1023 983 982 990 959 1025 939 897 917 925 998 984 948 964 936 1010 921 922 883 982 930 872 912 955 922 924 937 894 982 964 934 911 908 928 981 956 985 959 972 990 946 962 1004 967 1025 1085 1038 1068 1072 1065 1095 1119 1100 1065 1160 1138 1098 1134 1032 1072 1072 1024 1033 1015 1016 996 945 937 909 961 984 903 908 955 880 893 866 874 903 877 892 865 942 895 904 892 900 887 914 865 896 841 876 916 940 936 934 987 912 945 959 947 980 979 997 1050 1052 1105 1066 1156 1137 1118 1094 1225 1177 1199 1180 1166 1105 1174 1144 1095 1112 1066 1063 1089 1029 1004 1026 919 991 944 916 893 879 903 949 953 879 934 917 878 875 872 918 923 910 897 866 808 857 827 816 837 814 820 768 802 777 731 818 759 782 808 815 797 724 792 745 759 714 787 777 749 758 865 767 707 810 772 737 739 748 727 764 787 753 761 763 766 766 765 730 828 789 862 801 816 795 797 832 888 888 821 772 802 848 831 795 883 789 794 828 761 784 797 810 764 785 774 738 728 736 745 773 733 753 731 742 675 736 741 721 728 726 731 726 733 761 741 734 711 762 716 702 726 742 749 688 726 758 775 728 746 709 694 687 694 639 724 727 777 671 693 747 667 711 743 738 741 730 723 756 713 721 680 675 718 708 704 745 728 738 675 686 738 708 758 711 702 756 793 749 717 792 693 756 763 775 821 840 877 932 934 1009 1090 1302 1464 1448 1383 1347 1208 1126 1163 1175 1169 1176 1209 1098 1067 1056 1049 977 964 917 1034 963 1071 1236 1316 1477 1628 1928 2090 2115 1943 1715 1525 1332 1346 1373 1375 1474 1490 1406 1238 1076 994 885 851 813 804 834 780 796 713 717 689 698 803 719 735 653 718 690 617 692 702 687 671 684 742 695 720 714 716 688 701 725 681 725 642 709 713 600 680 659 648 601 642 657 682 629 689 638 685 601 635 662 665 669 666 645 682 641 663 644 672 698 669 639 636 637 697 677 603 616 669 648 619 663 621 608 678 672 663 640 667 655 683 638 631 623 626 655 598 611 622 589 642 626 636 642 668 579 639 588 667 638 685 649 609 605 671 625 608 630 622 633 627 630 629 677 647 652 623 646 622 629 621 583 682 656 630 662 659 611 596 593 590 604 585 568 676 657 605 643 638 657 598 607 597 645 578 620 590 587 635 590 644 625 601 596 656 648 612 635 653 663 646 631 631 684 646 706 664 695 714 652 657 705 702 600 691 693 708 648 694 638 651 669 643 640 705 651 728 638 611 610 578 697 729 662 686 667 690 640 615 643 638 599 665 609 635 619 614 595 582 623 612 578 614 617 587 608 586 596 564 608 600 625 597 554 592 622 602 588 624 581 589 664 610 586 659 583 598 605 607 587 584 610 600 589 593 587 605 598 581 576 580 607 615 593 641 560 585 614 619 594 593 562 598 585 551 563 605 581 644 568 578 613 616 573 609 634 601 600 593 607 606 610 596 595 624 649 631 614 642 588 592 630 664 623 610 587 598 571 580 582 595 581 604 589 564 544 557 581 593 560 608 570 573 583 602 587 574 576 586 609 588 609 593 550 588 574 577 595 576 548 557 559 553 583 514 514 602 506 564 564 619 581 578 595 580 581 524 579 596 540 588 588 540 543 557 586 578 544 573 574 581 539 572 573 607 579 567 547 540 589 619 584 542 551 548 548 571 591 574 518 525 534 534 542 547 573 548 549 521 572 560 510 569 550 589 558 547 584 552 564 548 538 591 539 585 564 598 557 566 583 551 532 581 593 497 553 621 590 565 589 593 580 570 515 565 531 553 542 583 576 545 583 530 534 558 580 548 553 580 582 541 564 541 547 549 532 566 535 536 543 560 536 550 566 530 455 525 530 550 578 533 585 576 562 525 521 542 522 575 548 529 603 522 515 510 522 571 582 521 548 577 575 588 570 589 593 604 577 599 584 612 579 615 621 577 625 579 574 551 546 592 578 558 602 567 566 559 564 551 559 534 553 613 568 498 536 504 531 544 493 563 518 527 538 539 551 534 553 529 602 533 530 542 528 541 582 586 541 512 602 540 504 507 557 516 552 527 548 539 512 504 506 539 529 527 530 552 522 516 540 510 544 550 521 556 578 517 594 520 576 490 582 563 543 588 603 570 558 561 580 521 533 542 604 512 573 549 551 548 542 546 545 536 541 572 523 600 580 577 570 559 575 561 607 591 545 601 625 571 639 647 612 617 655 690 756 864 895 957 1087 1232 1266 1418 1328 1237 1165 1057 1027 1008 944 929 1025 1043 1038 989 977 851 897 739 761 670 684 671 660 615 601 607 600 575 602 594 608 576 584 619 577 564 630 665 667 687 741 719 758 768 786 873 915 859 870 846 791 737 729 713 667 752 747 739 689 704 704 678 604 643 588 583 520 546 567 578 577 570 579 607 616 597 575 572 587 595 596 624 568 598 580 598 600 624 624 596 520 572 602 560 529 490 567 612 596 545 578 558 522 543 574 578 591 522 488 528 524 555 509 554 525 525 495 533 550 487 511 518 508 547 528 523 498 547 512 497 542 545 549 503 523 538 559 524 559 523 541 553 543 535 525 489 564 587 541 530 575 501 533 535 530 518 495 565 566 544 530 540 510 548 527 530 508 523 527 562 516 529 473 543 553 498 516 489 517 572 557 509 527 533 510 586 546 544 527 583 567 552 503 563 548 517 534 531 555 542 563 553 555 587 553 559 579 625 600 602 624 574 623 694 643 733 749 841 893 1000 974 1011 925 848 760 725 720 702 706 741 810 784 828 823 761 732 678 668 670 593 634 647 621 577 675 640 644 660 671 633 634 608 601 631 627 642 624 566 620 617 632 594 651 643 657 648 620 585 593 609 667 537 591 590 589 609 642 607 591 591 555 544 622 571 607 585 554 594 595 612 585 584 572 632 595 535 547 559 570 562 542 537 532 567 541 592 568 567 586 527 555 591 480 541 506 573 544 584 572 512 562 536 560 533 521 574 478 466 550 508 505 513 525 497 541 543 530 575 558 522 497 519 488 574 571 476 516 537 479 514 503 482 512 512 489 557 505 476 512 537 493 476 509 507 505 517 539 522 495 473 509 518 502 501 528 511 555 525 512 502 528 483 516 522 501 521 496 545 503 519 505 504 509 480 536 536 508 518 551 508 497 538 509 497 501 525 499 532 484 508 504 518 497 513 531 492 477 530 527 496 553 536 513 486 465 519 458 446 490 467 497 482 499 506 494 531 502 509 487 480 482 485 485 508 468 475 489 473 508 504 503 494 486 490 483 474 474 528 482 504 497 491 477 504 498 488 484 505 472 502 426 514 487 506 540 519 488 486 524 457 473 484 466 501 469 498 503 528 430 467 497 481 509 505 525 500 457 495 493 520 492 459 482 512 487 485 467 452 474 481 431 491 466 492 505 515 512 467 477 489 565 476 490 482 488 468 482 507 460 494 511 514 470 401 436 498 462 462 471 480 496 447 494 497 449 497 438 465 466 460 468 472 483 468 465 460 496 494 460 479 472 477 476 484 487 470 473 461 439 466 471 492 472 463 438 409 477 507 444 478 440 467 449 446 461 483 456 494 462 462 510 459 527 474 469 477 480 467 464 444 505 435 459 463 528 525 509 521 510 486 564 536 479 514 480 498 499 501 508 436 485 464 522 519 500 524 512 462 459 470 492 446 477 450 468 469 465 466 426 475 472 472 489 449 446 460 471 462 455 468 440 484 497 431 471 445 492 500 465 464 462 466 449 524 482 471 427 489 486 497 461 424 462 482 417 436 494 470 451 483 446 446 460 491 470 465 496 449 494 494 451 447 477 451 464 463 443 430 477 508 416 476 448 445 486 471 449 478 447 473 470 423 476 457 452 459 454 552 449 468 467 444 441 435 419 436 476 433 424 509 416 459 434 459 462 491 457 466 456 448 460 468 448 439 437 449 425 447 443 474 450 491 417 444 405 467 454 461 459 466 477 440 448 480 468 422 404 464 418 493 464 453 472 460 501 461 447 462 466 432 453 419 412 450 427 415 470 450 454 458 413 411 477 476 470 465 497 437 437 498 472 492 435 494 458 453 473 459 443 436 467 438 392 419 445 448 435 436 453 406 502 486 503 427 432 482 425 451 433 432 446 461 421 451 413 479 446 419 457 429 458 450 449 434 433 491 481 450 465 428 447 465 464 458 426 416 484 479 435 438 425 454 431 483 455 460 451 462 441 443 460 443 430 444 457 444 432 471 436 414 474 452 437 462 457 406 459 465 449 450 452 441 442 456 479 412 440 474 424 435 432 429 429 449 450 456 439 456 464 431 458 460 409 434 443 451 442 438 426 476 448 409 435 445 415 422 434 398 479 465 477 425 442 460 441 423 447 405 477 406 443 414 440 474 450 461 440 440 479 418 474 511 465 472 460 458 454 472 466 513 520 498 511 501 576 509 532 473 479 487 517 499 452 493 487 474 513 444 493 478 485 484 472 484 483 461 497 494 460 424 467 460 425 448 473 413 430 426 440 417 463 444 445 421 473 423 421 449 433 485 441 455 424 460 460 399 424 455 446 455 437 444 406 453 443 456 429 436 459 443 453 438 469 452 432 420 462 403 471 504 465 440 493 478 469 454 475 446 446 466 526 481 436 422 446 508 456 429 471 425 450 405 431 446 469 460 459 455 425 486 465 510 438 405 430 460 445 423 413 434 443 430 439 417 394 471 472 458 449 445 428 431 457 406 458 452 434 431 432 426 446 445 478 439 399 439 434 418 381 423 441 470 431 421 459 412 427 440 463 392 419 431 407 437 457 431 407 412 430 423 439 459 454 419 451 430 465 452 445 422 435 404 441 416 448 420 442 464 419 431 431 439 443 439 457 423 467 420 413 395 421 386 456 418 434 438 424 424 442 446 448 426 425 436 464 433 419 464 416 440 418 440 444 399 433 456 504 446 477 459 451 461 451 426 437 472 434 449 445 453 430 425 428 450 453 461 481 423 442 453 433 445 430 403 413 454 439 414 465 397 416 430 423 404 379 419 424 413 428 400 408 429 475 431 425 399 453 409 353 421 417 423 402 425 401 439 383 405 412 417 410 409 420 425 462 430 423 489 435 420 422 420 412 430 393 420 414 390 409 454 402 422 392 419 385 433 428 438 401 419 441 402 405 417 444 438 417 395 428 380 450 415 403 437 425 406 409 444 405 398 387 427 387 396 379 436 422 428 441 422 416 403 438 443 419 425 438 428 397 427 428 408 424 428 415 429 374 474 439 449 427 415 428 419 407 432 419 431 455 439 446 426 438 449 446 473 430 419 451 417 404 469 453 491 457 456 472 481 482 460 492 488 480 464 507 471 508 511 530 534 531 538 553 569 545 546 578 597 602 588 606 592 650 655 658 642 687 679 727 676 676 706 753 753 737 759 716 696 754 790 771 778 797 807 757 734 805 724 691 764 721 767 794 746 678 754 723 717 662 691 675 634 616 655 638 651 633 676 614 537 578 565 569 537 606 554 533 565 520 568 535 461 517 482 538 473 487 529 490 474 461 440 451 478 455 419 438 434 420 445 460 430 425 440 488 455 457 487 423 422 464 425 448 441 429 405 435 457 436 455 446 400 412 440 426 498 413 428 393 423 401 412 379 435 449 494 475 423 444 440 487 488 526 522 487 506 532 497 467 465 472 470 455 469 409 484 503 469 437 459 483 461 467 481 491 473 517 441 419 458 469 480 460 473 426 466 487 491 506 511 543 602 662 651 651 563 558 506 503 507 461 427 474 462 512 463 522 498 481 532 534 493 472 454 456 426 446 440 452 394 410 412 434 423 416 361 378 390 416 391 390 391 384 366 394 401 360 393 424 408 346 384 404 381 397 383 385 398 415 392 390 388 405 395 383 399 397 385 398 386 371 386 386 378 356 369 392 351 411 383 468 365 416 392 374 420 380 395 370 403 349 378 371 410 380 357 387 393 374 405 398 388 398 376 384 401 356 381 400 389 384 395 344 397 406 370 402 400 433 430 376 369 403 399 384 382 379 389 430 370 402 372 406 424 374 401 424 466 365 412 415 403 409 412 414 384 393 388 390 407 398 425 415 414 424 401 369 422 384 392 396 373 355 380 421 359 356 408 443 369 428 423 389 370 372 367 371 400 372 402 382 363 357 360 428 391 357 379 382 392 365 380 366 392 385 366 389 430 376 402 389 390 413 363 375 414 358 382 392 363 393 423 395 439 412 373 364 392 402 351 379 424 410 370 356 378 372 369 369 405 393 419 367 404 383 387 387 376 375 390 343 382 364 411 362 372 388 345 351 392 396 388 349 372 391 396 388 347 375 350 379 375 381 373 397 379 392 342 373 378 325 400 352 388 349 364 389 345 358 382 360 379 355 359 348 369 412 374 348 429 361 399 353 391 368 385 357 376 358 355 383 354 346 351 373 402 364 361 435 375 405 391 423 381 359 351 378 362 406 368 335 404 334 384 380 356 359 365 397 398 348 342 396 365 357 354 365 388 365 342 404 378 372 333 344 362 397 393 346 333 384 387 365 357 394 347 - -
-
-
diff --git a/pynxtools/dataconverter/readers/xrd/files/Test1.ipynb b/pynxtools/dataconverter/readers/xrd/files/Test1.ipynb deleted file mode 100644 index db00ebed1..000000000 --- a/pynxtools/dataconverter/readers/xrd/files/Test1.ipynb +++ /dev/null @@ -1,705 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "bc15a0fb-c139-4f5f-8602-a6644e1e92f0", - "metadata": {}, - "outputs": [], - "source": [ - "from pynxtools.dataconverter.readers.xrd.xrd_parser import parse_and_convert_file\n", - "from pynxtools.dataconverter.helpers import nested_dict_to_slash_separated_path\n", - "\n", - "from pynxtools.dataconverter.helpers import (transform_to_intended_dt,\n", - " nested_dict_to_slash_separated_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "945d80f2-9fdd-4e61-8ff2-d721e50000b0", - "metadata": {}, - "outputs": [], - "source": [ - "xrdml_file = \"/home/rubel/Documents/xrd_files/ACZCTS_5-60_181.xrdml\"\n", - "xy_file = \"/home/rubel/Documents/xrd_files/ACZCTS_5-60_181.xy\"\n" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "98f6e21d-6c50-4efa-bdce-3ac1ef4c4df0", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "dict_keys(['countTime', 'detector', 'counts', 'beamAttenuationFactors', 'hkl', '2Theta', 'Omega', 'X', 'Y', 'Z'])\n", - "counts: []\n", - "detector: [42.16696988 41.49989893 42.81382656 ... 7.21649485 7.96442288\n", - " 7.01435213]\n", - "{'measurement_type': 'Scan', 'sample_mode': 'Reflection', 'source': {'voltage': 40.0, 'current': 40.0, 'kAlpha1': 1.540598, 'kAlpha2': 1.544426, 'anode_material': 'Cu'}, 'scan_mode': 'Continuous', 'scan_axis': 'Gonio'}\n", - "####\n" - ] - }, - { - "data": { - "text/plain": [ - "{'/countTime': array([49.47]),\n", - " '/detector': array([42.16696988, 41.49989893, 42.81382656, ..., 7.21649485,\n", - " 7.96442288, 7.01435213]),\n", - " '/counts': array([], dtype=float64),\n", - " '/beamAttenuationFactors': array([], dtype=float64),\n", - " '/hkl': (nan, nan, nan),\n", - " '/2Theta': array([10.00656514, 10.01969542, 10.03282571, ..., 79.96471124,\n", - " 79.97784153, 79.99097181]),\n", - " '/Omega': array([ 5.00328257, 5.00984771, 5.01641285, ..., 39.98235563,\n", - " 39.98892077, 39.99548591]),\n", - " '/X': array([0.]),\n", - " '/Y': array([50.]),\n", - " '/Z': array([7.868]),\n", - " '/scanmotname': 'Gonio',\n", - " '/material': '',\n", - " '/metadata/measurement_type': 'Scan',\n", - " '/metadata/sample_mode': 'Reflection',\n", - " '/metadata/source/voltage': 40.0,\n", - " '/metadata/source/current': 40.0,\n", - " '/metadata/source/kAlpha1': 1.540598,\n", - " '/metadata/source/kAlpha2': 1.544426,\n", - " '/metadata/source/anode_material': 'Cu',\n", - " '/metadata/scan_mode': 'Continuous',\n", - " '/metadata/scan_axis': 'Gonio'}" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xrdml_dict = parse_and_convert_file(xrdml_file)\n", - "nested_dict = {}\n", - "nested_dict_to_slash_separated_path(xrdml_dict, nested_dict)\n", - "print('####')\n", - "nested_dict" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "3c917623-701e-49b2-a4a7-a637dd93cec1", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(5331, 5331)" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "len(nested_dict[\"/detector\"]), len(nested_dict[\"/2Theta\"]), len(nested_dict[\"/Omega\"]) " - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "42db66ae-f267-4737-85e4-6986925a5032", - "metadata": {}, - "outputs": [], - "source": [ - "import xml.etree.ElementTree as ET\n", - "import xrayutilities as xu" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "5abbf11b-8816-4bac-a0ed-5c9adbe3f8ea", - "metadata": {}, - "outputs": [], - "source": [ - "xrd_xml_file = \"/home/rubel/Documents/xrd_files/ACZCTS_5-60_181.xrdml\"" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "d88f9558-146d-4c05-913e-9797130f2eb2", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "xx : \n", - "xx : \n", - "xx : \n" - ] - } - ], - "source": [ - "tree = ET.parse(xrd_xml_file)\n", - "root = tree.getroot()\n", - "\n", - "for el in root:\n", - " print('xx : ', el)" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "fcfc3d54-8ce4-4f92-932e-3e7e892aa543", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xu.io.XRDMLFile(xrd_xml_file)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "6206cb0f-0f13-4e64-9e47-77c65888e2ae", - "metadata": {}, - "outputs": [], - "source": [ - "from pynxtools.dataconverter.helpers import generate_template_from_nxdl\n", - "from pynxtools.dataconverter.template import Template\n", - "import xml.etree.ElementTree as ET" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "dea8b0d9-4ef7-4c9f-829d-70bfd6c9c940", - "metadata": {}, - "outputs": [], - "source": [ - "nxdl_roo = ET.parse(\"/home/rubel/NOMAD-FAIRmat/GH/nexus_definitions/contributed_definitions//NXxrd_pan.nxdl.xml\").getroot()\n", - "template = Template()" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "01004a00-a2c1-40f3-96f4-14dabbcbba36", - "metadata": {}, - "outputs": [ - { - "ename": "TypeError", - "evalue": "'types.GenericAlias' object does not support item assignment", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m/tmp/ipykernel_83418/1749468834.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mgenerate_template_from_nxdl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnxdl_roo\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTemplate\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/NOMAD-FAIRmat/GH/pynxtools/pynxtools/dataconverter/helpers.py\u001b[0m in \u001b[0;36mgenerate_template_from_nxdl\u001b[0;34m(root, template, path, nxdl_root, nxdl_name)\u001b[0m\n\u001b[1;32m 173\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 174\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mchild\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mroot\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 175\u001b[0;31m \u001b[0mgenerate_template_from_nxdl\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mchild\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtemplate\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpath\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnxdl_root\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnxdl_name\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 176\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 177\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/NOMAD-FAIRmat/GH/pynxtools/pynxtools/dataconverter/helpers.py\u001b[0m in \u001b[0;36mgenerate_template_from_nxdl\u001b[0;34m(root, template, path, nxdl_root, nxdl_name)\u001b[0m\n\u001b[1;32m 140\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0moptional_parent\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0;34m\"<>\"\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mtemplate\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moptional_parents\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moptional_parent\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 142\u001b[0;31m \u001b[0mtemplate\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0moptionality\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 143\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 144\u001b[0m \u001b[0;31m# Only add units if it is a field and the the units are defined but not set to NX_UNITLESS\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: 'types.GenericAlias' object does not support item assignment" - ] - } - ], - "source": [ - "generate_template_from_nxdl(nxdl_roo, Template)" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "86857915-ecb4-4880-88f2-c7e570fa04ad", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/rubel/NOMAD-FAIRmat/GH/pynxtools/.pyenv_3_10/lib/python3.10/site-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.24.3\n", - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n", - "Using xrd reader to convert the given files: \n", - "• ./pynxtools/dataconverter/readers/xrd/files/ACZCTS_5-60_181.xrdml \n", - " ### template : {\n", - " \"/ENTRY[entry]/2theta_plot/chi\": \"None\",\n", - " \"/ENTRY[entry]/2theta_plot/intensity\": \"None\",\n", - " \"/ENTRY[entry]/2theta_plot/omega\": \"None\",\n", - " \"/ENTRY[entry]/2theta_plot/phi\": \"None\",\n", - " \"/ENTRY[entry]/2theta_plot/two_theta\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/beam_attenuation_factors\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/count_time\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/count_time/@units\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/data_file\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/goniometer_x\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/goniometer_x/@units\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/goniometer_y\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/goniometer_y/@units\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/goniometer_z\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/goniometer_z/@units\": \"None\",\n", - " \"/ENTRY[entry]/COLLECTION[collection]/measurement_type\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/integration_time\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/integration_time/@units\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/polar_angle\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/polar_angle/@units\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/scan_axis\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/scan_mode\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_one\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_one/@units\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two/@units\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/kbeta\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/kbeta/@units\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/ratio_k_alphatwo_k_alphaone\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/ratio_k_alphatwo_k_alphaone/@units\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/source_peak_wavelength\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/source_peak_wavelength/@units\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_current\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_current/@units\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_material\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_voltage\": \"None\",\n", - " \"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_voltage/@units\": \"None\",\n", - " \"/ENTRY[entry]/SAMPLE[sample]/prepared_by\": \"None\",\n", - " \"/ENTRY[entry]/SAMPLE[sample]/sample_id\": \"None\",\n", - " \"/ENTRY[entry]/SAMPLE[sample]/sample_mode\": \"None\",\n", - " \"/ENTRY[entry]/SAMPLE[sample]/sample_name\": \"None\",\n", - " \"/ENTRY[entry]/definition\": \"None\",\n", - " \"/ENTRY[entry]/method\": \"None\",\n", - " \"/ENTRY[entry]/q_plot/intensity\": \"None\",\n", - " \"/ENTRY[entry]/q_plot/q\": \"None\"\n", - "}\n", - "dict_keys(['countTime', 'detector', 'counts', 'beamAttenuationFactors', 'hkl', '2Theta', 'Omega', 'X', 'Y', 'Z'])\n", - "counts: []\n", - "detector: [42.16696988 41.49989893 42.81382656 ... 7.21649485 7.96442288\n", - " 7.01435213]\n", - "{'measurement_type': 'Scan', 'sample_mode': 'Reflection', 'source': {'voltage': 40.0, 'current': 40.0, 'kAlpha1': 1.540598, 'kAlpha2': 1.544426, 'anode_material': 'Cu'}, 'scan_mode': 'Continuous', 'scan_axis': 'Gonio'}\n", - "path_separated_dict[\"/metadata/source/voltage\"] : 40.0\n", - "The path, /ENTRY[entry]/2theta_plot/@intensity_indices, is being written but has no documentation.\n", - "The path, /ENTRY[entry]/2theta_plot/@omega_indices, is being written but has no documentation.\n", - "The path, /ENTRY[entry]/2theta_plot/@two_theta_indices, is being written but has no documentation.\n", - "The path, /ENTRY[entry]/DATA[q_plot]/intensity, is being written but has no documentation.\n", - "The path, /ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_voltage/@unita, is being written but has no documentation.\n", - "The output file generated: ACZCTS_5.nxs\n" - ] - } - ], - "source": [ - "!dataconverter \\\n", - "--input-file ./pynxtools/dataconverter/readers/xrd/files/ACZCTS_5-60_181.xrdml \\\n", - "--reader xrd \\\n", - "--nxdl NXxrd_pan \\\n", - "--output ACZCTS_5.nxs " - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "fd7e9278-ed14-43c8-88c0-51e7a5f8bfe0", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/rubel/NOMAD-FAIRmat/GH/pynxtools/.pyenv_3_10/bin/dataconverter\n" - ] - } - ], - "source": [ - "!which dataconverter" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "27919a9e-6239-4f1a-af57-1bfb2038974b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[0;31mInit signature:\u001b[0m \u001b[0mobject\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mDocstring:\u001b[0m \n", - "The base class of the class hierarchy.\n", - "\n", - "When called, it accepts no arguments and returns a new featureless\n", - "instance that has no instance attributes and cannot be given any.\n", - "\u001b[0;31mType:\u001b[0m type\n", - "\u001b[0;31mSubclasses:\u001b[0m type, async_generator, int, bytearray_iterator, bytearray, bytes_iterator, bytes, builtin_function_or_method, callable_iterator, PyCapsule, ...\n" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "object?" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "d690d763-9333-467b-8461-ebad03f477ce", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "self.__class__.name: cls1\n" - ] - } - ], - "source": [ - "# xrdml parser\n", - "\n", - "class cls0():\n", - " def _print(self):\n", - " print('self.__class__.name: ', self.__class__.__name__)\n", - "\n", - "class cls1(cls0):\n", - " pass\n", - "\n", - "cls1_obj = cls1()._print()" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "a9f445b6-2627-45ba-9731-c878bf72eed2", - "metadata": {}, - "outputs": [], - "source": [ - "xrdml = '/home/rubel/Documents/xrd_files/ACZCTS_5-60_181.xrdml'" - ] - }, - { - "cell_type": "code", - "execution_count": 65, - "id": "941ad32e-d831-4d98-be43-99e06cf0e6d0", - "metadata": {}, - "outputs": [], - "source": [ - "import xml.etree.ElementTree as ET\n", - "\n", - "xml_root = ET.parse(xrdml).getroot()\n", - "\n", - "global plain_dict\n", - "plain_dict = {}\n", - "# Important note for key-val pair separator list: preceding elements have precedence on the\n", - "# on the following elements\n", - "key_val_pair_sprtr = [';', ',']\n", - "# Important note for key-val separator list: preceding elements have precedence on the\n", - "# on the following elements\n", - "key_val_sprtr = ['=', ':']\n", - "def remove_namespace(node_tag):\n", - " \"\"\"\n", - " \"\"\"\n", - " return node_tag.split('}')[-1]\n", - " \n", - " \n", - "def process_node_text(parent_path, node_txt):\n", - " \"\"\"\n", - " \"\"\"\n", - " key_val_pairs = []\n", - " # get key-val pair\n", - " for sep in key_val_pair_sprtr:\n", - " if sep in node_txt:\n", - " key_val_pairs = node_txt.split(sep)\n", - " break\n", - " # Separate key-val, build full path and\n", - " # store them in dict\n", - " for key_val in key_val_pairs:\n", - " for k_v_sep in key_val_sprtr:\n", - " if k_v_sep in key_val:\n", - " key, val = key_val.split(k_v_sep)\n", - " key = key.replace(' ', '')\n", - " plain_dict['/'.join([parent_path, key])] = val\n", - " break\n", - " \n", - " \n", - "def parse_each_elm(parent_path, xml_node):\n", - " \"\"\"\n", - " \"\"\"\n", - " tag = remove_namespace(xml_node.tag)\n", - " # Take care of special node of 'entry' tag\n", - " if tag == 'entry':\n", - " parent_path = parse_entry_elm(parent_path, xml_node)\n", - " else:\n", - " parent_path = parse_general_elm(parent_path, xml_node)\n", - " \n", - " for child in iter(xml_node):\n", - " if child is not None:\n", - " parse_each_elm(parent_path, child)\n", - " \n", - " \n", - "def parse_general_elm(parent_path, xml_node):\n", - " \"\"\"Parse general element.\n", - " \"\"\"\n", - " tag = remove_namespace(xml_node.tag)\n", - " \n", - " if parent_path == '/':\n", - " parent_path = '/' + tag\n", - " else:\n", - " # New parent path ends with element tag\n", - " parent_path = '/'.join([parent_path, tag])\n", - "\n", - " node_attr = xml_node.attrib\n", - " if node_attr:\n", - " for key, val in node_attr.items():\n", - " key = key.replace(' ', '_')\n", - " path_extend = '/'.join([parent_path, key])\n", - " plain_dict[path_extend] = val\n", - " \n", - " node_txt = xml_node.text\n", - " if node_txt:\n", - " process_node_text(parent_path, node_txt)\n", - " \n", - " return parent_path\n", - "\n", - "\n", - "def parse_entry_elm(parent_path, xml_node):\n", - " \"\"\"\n", - " \"\"\"\n", - " tag = remove_namespace(xml_node.tag)\n", - " \n", - " if parent_path == '/':\n", - " parent_path = '/' + tag\n", - " else:\n", - " # Parent path ends with element tag\n", - " parent_path = '/'.join([parent_path, tag])\n", - "\n", - " node_attr = xml_node.attrib\n", - " if node_attr:\n", - " for key, val in node_attr.items():\n", - " path_extend = '/'.join([parent_path, key])\n", - " plain_dict[path_extend] = val\n", - " \n", - " # In entry element text must have special care on it\n", - " node_txt = xml_node.text\n", - " if node_txt:\n", - " process_node_text(parent_path, node_txt)\n", - " \n", - " return parent_path \n", - " \n", - "\n", - "parse_each_elm('/', xml_root)" - ] - }, - { - "cell_type": "code", - "execution_count": 66, - "id": "9ee25def-d246-4d01-90a8-cff73db73598", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'/xrdMeasurements/{http://www.w3.org/2001/XMLSchema-instance}schemaLocation': 'http://www.xrdml.com/XRDMeasurement/1.5 http://www.xrdml.com/XRDMeasurement/1.5/XRDMeasurement.xsd',\n", - " '/xrdMeasurements/status': 'Completed',\n", - " '/xrdMeasurements/comment/entry/Configuration': 'XYZ Stage',\n", - " '/xrdMeasurements/comment/entry/Owner': 'User-1',\n", - " '/xrdMeasurements/comment/entry/Creationdate': '02-Nov-17 2:08:05 PM',\n", - " '/xrdMeasurements/comment/entry/Goniometer': 'PW3050/60 (Theta/Theta)',\n", - " '/xrdMeasurements/comment/entry/Minimumstepsize2Theta': '0.001',\n", - " '/xrdMeasurements/comment/entry/MinimumstepsizeOmega': '0.001',\n", - " '/xrdMeasurements/comment/entry/Samplestage': 'Programmable x,y,z stage',\n", - " '/xrdMeasurements/comment/entry/MinimumstepsizeX': '0.01',\n", - " '/xrdMeasurements/comment/entry/MinimumstepsizeY': '0.01',\n", - " '/xrdMeasurements/comment/entry/MinimumstepsizeZ': '0.001',\n", - " '/xrdMeasurements/comment/entry/Measurementprogram': 'D:\\\\user\\\\Pepe\\\\program_files\\\\BB_10-80_18min.xrdmp',\n", - " '/xrdMeasurements/comment/entry/Identifier': '{49B9A751-97B5-49F0-9CAA-E07AE5E71B6A}',\n", - " '/xrdMeasurements/comment/entry/Batchprogram': 'D:\\\\user\\\\Pepe\\\\program_files\\\\batch_5samples.xrdmp',\n", - " '/xrdMeasurements/sample/type': 'To be analyzed',\n", - " '/xrdMeasurements/xrdMeasurement/measurementType': 'Scan',\n", - " '/xrdMeasurements/xrdMeasurement/status': 'Completed',\n", - " '/xrdMeasurements/xrdMeasurement/sampleMode': 'Reflection',\n", - " '/xrdMeasurements/xrdMeasurement/comment/entry/PHDLowerLevel': ' 4.02 (keV)',\n", - " '/xrdMeasurements/xrdMeasurement/comment/entry/PHDUpperLevel': ' 11.26 (keV)',\n", - " '/xrdMeasurements/xrdMeasurement/usedWavelength/intended': 'K-Alpha',\n", - " '/xrdMeasurements/xrdMeasurement/usedWavelength/kAlpha1/unit': 'Angstrom',\n", - " '/xrdMeasurements/xrdMeasurement/usedWavelength/kAlpha2/unit': 'Angstrom',\n", - " '/xrdMeasurements/xrdMeasurement/usedWavelength/kBeta/unit': 'Angstrom',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/radius/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/id': '1010048',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/name': 'Empyrean Cu LFF HR (9430 033 7310x) DK415251',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/tension/unit': 'kV',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/current/unit': 'mA',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/focus/type': 'Line',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/focus/length/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/focus/width/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/focus/takeOffAngle/unit': 'deg',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/sollerSlit/id': '21010002',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/sollerSlit/name': 'Soller slits 0.04 rad.',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/sollerSlit/opening/unit': 'rad',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/mask/id': '22080003',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/mask/name': 'Fixed incident beam mask 15 mm',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/mask/width/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/divergenceSlit/id': '22010005',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/divergenceSlit/name': 'Fixed slit 1/4°',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/divergenceSlit/{http://www.w3.org/2001/XMLSchema-instance}type': 'fixedDivergenceSlitType',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/divergenceSlit/distanceToSample/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/incidentBeamPath/divergenceSlit/height/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/radius/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/antiScatterSlit/id': '22090010',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/antiScatterSlit/name': 'AS slit 8.0 mm (PIXcel)',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/antiScatterSlit/{http://www.w3.org/2001/XMLSchema-instance}type': 'fixedAntiScatterSlitType',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/antiScatterSlit/height/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/sollerSlit/id': '21010002',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/sollerSlit/name': 'Soller slits 0.04 rad.',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/sollerSlit/opening/unit': 'rad',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/filter/id': '20030001',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/filter/name': 'Large beta-filter Nickel',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/filter/thickness/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/detector/id': '7010015',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/detector/name': 'PIXcel1D detector',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/detector/{http://www.w3.org/2001/XMLSchema-instance}type': 'rtmsDetectorType',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/detector/phd/lowerLevel/unit': '%',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/detector/phd/upperLevel/unit': '%',\n", - " '/xrdMeasurements/xrdMeasurement/diffractedBeamPath/detector/activeLength/unit': 'deg',\n", - " '/xrdMeasurements/xrdMeasurement/scan/appendNumber': '0',\n", - " '/xrdMeasurements/xrdMeasurement/scan/mode': 'Continuous',\n", - " '/xrdMeasurements/xrdMeasurement/scan/scanAxis': 'Gonio',\n", - " '/xrdMeasurements/xrdMeasurement/scan/status': 'Completed',\n", - " '/xrdMeasurements/xrdMeasurement/scan/header/source/applicationSoftware/version': '5.2a',\n", - " '/xrdMeasurements/xrdMeasurement/scan/header/source/instrumentControlSoftware/version': '2.2B 20140619',\n", - " '/xrdMeasurements/xrdMeasurement/scan/dataPoints/positions/axis': 'Z',\n", - " '/xrdMeasurements/xrdMeasurement/scan/dataPoints/positions/unit': 'mm',\n", - " '/xrdMeasurements/xrdMeasurement/scan/dataPoints/commonCountingTime/unit': 'seconds',\n", - " '/xrdMeasurements/xrdMeasurement/scan/dataPoints/intensities/unit': 'counts'}" - ] - }, - "execution_count": 66, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "plain_dict" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "aa1c52c4-8d8b-4b2e-b40f-8c27d9f44a1c", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/rubel/NOMAD-FAIRmat/GH/pynxtools/.pyenv_3_10/lib/python3.10/site-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.24.3\n", - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n" - ] - } - ], - "source": [ - "from pynxtools.dataconverter.readers.xrd.reader import get_template_from_xrd_reader" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "8b5be3e7-b1e7-4aa6-bd2d-bd9a543db40c", - "metadata": {}, - "outputs": [], - "source": [ - "xrdml_file = \"/home/rubel/Documents/xrd_files/ACZCTS_5-60_181.xrdml\"" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "c9cd61b6-da91-486e-a5af-14d9e762e3d1", - "metadata": {}, - "outputs": [], - "source": [ - "xx = get_template_from_xrd_reader('NXxrd_pan', file_paths=(xrdml_file,))" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "2f33ec28-b729-4cf1-a8a4-73b011c8599a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'/ENTRY[entry]/2theta_plot/@intensity_indices': 1, '/ENTRY[entry]/2theta_plot/@omega_indices': 1, '/ENTRY[entry]/2theta_plot/@signal': 'intensity', '/ENTRY[entry]/2theta_plot/@two_theta_indices': 0, '/ENTRY[entry]/2theta_plot/intensity': array([42.16696988, 41.49989893, 42.81382656, ..., 7.21649485,\n", - " 7.96442288, 7.01435213]), '/ENTRY[entry]/2theta_plot/omega': array([ 5.00328257, 5.00984771, 5.01641285, ..., 39.98235563,\n", - " 39.98892077, 39.99548591]), '/ENTRY[entry]/2theta_plot/two_theta': array([10.00656514, 10.01969542, 10.03282571, ..., 79.96471124,\n", - " 79.97784153, 79.99097181]), '/ENTRY[entry]/COLLECTION[collection]/beam_attenuation_factors': array([], dtype=float64), '/ENTRY[entry]/COLLECTION[collection]/count_time': array([49.47]), '/ENTRY[entry]/COLLECTION[collection]/goniometer_x': array([0.]), '/ENTRY[entry]/COLLECTION[collection]/goniometer_y': array([50.]), '/ENTRY[entry]/COLLECTION[collection]/goniometer_z': array([7.868]), '/ENTRY[entry]/COLLECTION[collection]/measurement_type': 'Scan', '/ENTRY[entry]/DATA[q_plot]/intensity': array([42.16696988, 41.49989893, 42.81382656, ..., 7.21649485,\n", - " 7.96442288, 7.01435213]), '/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/scan_axis': 'Gonio', '/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/scan_mode': 'Continuous', '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_one': 1.540598, '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_one/@units': 'nm', '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two': 1.544426, '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two/@units': 'nm', '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/ratio_k_alphatwo_k_alphaone': 1.0024847494284688, '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_current': 40.0, '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_current/@units': 'A', '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_material': 'Cu', '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_voltage': 40.0, '/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_voltage/@units': 'V', '/ENTRY[entry]/definition': 'NXxrd_pan', '/ENTRY[entry]/method': 'X-Ray Diffraction (XRD)'}" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xx" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "7e69fb39-688e-4691-b8a5-d85dd265278d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/rubel/NOMAD-FAIRmat/GH/pynxtools\n" - ] - } - ], - "source": [ - "!pwd" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4df696fa-287b-4f21-a95c-6963c3e6ef74", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/pynxtools/dataconverter/readers/xrd/files/workging_notebool.ipynb b/pynxtools/dataconverter/readers/xrd/files/workging_notebool.ipynb deleted file mode 100644 index 7937b421d..000000000 --- a/pynxtools/dataconverter/readers/xrd/files/workging_notebool.ipynb +++ /dev/null @@ -1,184 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "bc15a0fb-c139-4f5f-8602-a6644e1e92f0", - "metadata": {}, - "outputs": [], - "source": [ - "from pynxtools.dataconverter.readers.xrd.xrd_parser import parse_and_convert_file\n", - "from pynxtools.dataconverter.helpers import nested_dict_to_slash_separated_path\n", - "\n", - "from pynxtools.dataconverter.helpers import (transform_to_intended_dt,\n", - " nested_dict_to_slash_separated_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "945d80f2-9fdd-4e61-8ff2-d721e50000b0", - "metadata": {}, - "outputs": [], - "source": [ - "xrdml_file = \"/home/rubel/Documents/xrd_files/ACZCTS_5-60_181.xrdml\"\n", - "xy_file = \"/home/rubel/Documents/xrd_files/ACZCTS_5-60_181.xy\"\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "98f6e21d-6c50-4efa-bdce-3ac1ef4c4df0", - "metadata": {}, - "outputs": [], - "source": [ - "xrdml_dict = parse_and_convert_file(xrdml_file)\n", - "nested_dict = {}\n", - "nested_dict_to_slash_separated_path(xrdml_dict, nested_dict)\n", - "print('####')\n", - "nested_dict" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "3c917623-701e-49b2-a4a7-a637dd93cec1", - "metadata": {}, - "outputs": [], - "source": [ - "len(nested_dict[\"/detector\"]), len(nested_dict[\"/2Theta\"]), len(nested_dict[\"/Omega\"]) " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "42db66ae-f267-4737-85e4-6986925a5032", - "metadata": {}, - "outputs": [], - "source": [ - "import xml.etree.ElementTree as ET\n", - "import xrayutilities as xu" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5abbf11b-8816-4bac-a0ed-5c9adbe3f8ea", - "metadata": {}, - "outputs": [], - "source": [ - "xrd_xml_file = \"/home/rubel/Documents/xrd_files/ACZCTS_5-60_181.xrdml\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d88f9558-146d-4c05-913e-9797130f2eb2", - "metadata": {}, - "outputs": [], - "source": [ - "tree = ET.parse(xrd_xml_file)\n", - "root = tree.getroot()\n", - "\n", - "for el in root:\n", - " print('xx : ', el)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fcfc3d54-8ce4-4f92-932e-3e7e892aa543", - "metadata": {}, - "outputs": [], - "source": [ - "xu.io.XRDMLFile(xrd_xml_file)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6206cb0f-0f13-4e64-9e47-77c65888e2ae", - "metadata": {}, - "outputs": [], - "source": [ - "from pynxtools.dataconverter.helpers import generate_template_from_nxdl\n", - "from pynxtools.dataconverter.template import Template\n", - "import xml.etree.ElementTree as ET" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "dea8b0d9-4ef7-4c9f-829d-70bfd6c9c940", - "metadata": {}, - "outputs": [], - "source": [ - "nxdl_roo = ET.parse(\"/home/rubel/NOMAD-FAIRmat/GH/nexus_definitions/contributed_definitions//NXxrd_pan.nxdl.xml\").getroot()\n", - "template = Template()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "01004a00-a2c1-40f3-96f4-14dabbcbba36", - "metadata": {}, - "outputs": [], - "source": [ - "generate_template_from_nxdl(nxdl_roo, Template)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "86857915-ecb4-4880-88f2-c7e570fa04ad", - "metadata": {}, - "outputs": [], - "source": [ - "!dataconverter \\\n", - "--input-file ./pynxtools/dataconverter/readers/xrd/files/ACZCTS_5-60_181.xrdml \\\n", - "--reader xrd \\\n", - "--nxdl NXxrd_pan \\\n", - "--output ACZCTS_5.nxs " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fd7e9278-ed14-43c8-88c0-51e7a5f8bfe0", - "metadata": {}, - "outputs": [], - "source": [ - "!which dataconverter" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "27919a9e-6239-4f1a-af57-1bfb2038974b", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}