From de09f0f9e5c43c1f74479c7306106dc4f824839e Mon Sep 17 00:00:00 2001 From: Jacob Filik Date: Thu, 22 Aug 2024 16:17:24 +0100 Subject: [PATCH] hack in the header and element selector --- .gitignore | 2 + package.json | 3 +- pnpm-lock.yaml | 34 ++ public/xdidata/Au/Au_Foil_L1_rt_2016Foils.xdi | 500 ------------------ public/xdidata/Au/Au_Foil_L2_rt_2016Foils.xdi | 500 ------------------ public/xdidata/Au/Au_Foil_L3_rt_2016Foils.xdi | 500 ------------------ public/xdidata/db.json | 1 - scripts/build_database.py | 2 +- src/App.tsx | 15 +- src/DarkModeIcon.tsx | 17 + src/ElementSelector.tsx | 6 +- src/Header.tsx | 88 +++ src/LightModeIcon.tsx | 17 + src/PeriodicTable.tsx | 4 +- src/StandardViewer.tsx | 8 +- src/StandardsTable.tsx | 53 +- src/WelcomePage.tsx | 25 + src/main.tsx | 3 + 18 files changed, 224 insertions(+), 1554 deletions(-) delete mode 100644 public/xdidata/Au/Au_Foil_L1_rt_2016Foils.xdi delete mode 100644 public/xdidata/Au/Au_Foil_L2_rt_2016Foils.xdi delete mode 100644 public/xdidata/Au/Au_Foil_L3_rt_2016Foils.xdi delete mode 100644 public/xdidata/db.json create mode 100644 src/DarkModeIcon.tsx create mode 100644 src/Header.tsx create mode 100644 src/LightModeIcon.tsx create mode 100644 src/WelcomePage.tsx diff --git a/.gitignore b/.gitignore index 892c28c..72f4b02 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ dist dist-ssr *.local +public/webxdiviewer** + .pnpm-store/** # Editor directories and files diff --git a/package.json b/package.json index cf9fb92..dd70d20 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "axios": "^1.7.4", "ndarray": "^1.0.19", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "react-router-dom": "^6.26.1" }, "devDependencies": { "@eslint/js": "^9.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8f9eb37..6fe1947 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,6 +35,9 @@ importers: react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) + react-router-dom: + specifier: ^6.26.1 + version: 6.26.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) devDependencies: '@eslint/js': specifier: ^9.9.0 @@ -578,6 +581,10 @@ packages: react-native: optional: true + '@remix-run/router@1.19.1': + resolution: {integrity: sha512-S45oynt/WH19bHbIXjtli6QmwNYvaz+vtnubvNpNDvUOoA/OWh6j1OikIP3G+v5GHdxyC6EXoChG3HgYGEUfcg==} + engines: {node: '>=14.0.0'} + '@rollup/rollup-android-arm-eabi@4.20.0': resolution: {integrity: sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==} cpu: [arm] @@ -1518,6 +1525,19 @@ packages: resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} engines: {node: '>=0.10.0'} + react-router-dom@6.26.1: + resolution: {integrity: sha512-veut7m41S1fLql4pLhxeSW3jlqs+4MtjRLj0xvuCEXsxusJCbs6I8yn9BxzzDX2XDgafrccY6hwjmd/bL54tFw==} + engines: {node: '>=14.0.0'} + peerDependencies: + react: '>=16.8' + react-dom: '>=16.8' + + react-router@6.26.1: + resolution: {integrity: sha512-kIwJveZNwp7teQRI5QmwWo39A5bXRyqpH0COKKmPnyD2vBvDwgFXSqDUYtt1h+FEyfnE8eXr7oe0MxRzVwCcvQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + react: '>=16.8' + react-slider@2.0.4: resolution: {integrity: sha512-sWwQD01n6v+MbeLCYthJGZPc0kzOyhQHyd0bSo0edg+IAxTVQmj3Oy4SBK65eX6gNwS9meUn6Z5sIBUVmwAd9g==} peerDependencies: @@ -2296,6 +2316,8 @@ snapshots: optionalDependencies: react-dom: 18.3.1(react@18.3.1) + '@remix-run/router@1.19.1': {} + '@rollup/rollup-android-arm-eabi@4.20.0': optional: true @@ -3283,6 +3305,18 @@ snapshots: react-refresh@0.14.2: {} + react-router-dom@6.26.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@remix-run/router': 1.19.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-router: 6.26.1(react@18.3.1) + + react-router@6.26.1(react@18.3.1): + dependencies: + '@remix-run/router': 1.19.1 + react: 18.3.1 + react-slider@2.0.4(react@18.3.1): dependencies: prop-types: 15.8.1 diff --git a/public/xdidata/Au/Au_Foil_L1_rt_2016Foils.xdi b/public/xdidata/Au/Au_Foil_L1_rt_2016Foils.xdi deleted file mode 100644 index 5a256fe..0000000 --- a/public/xdidata/Au/Au_Foil_L1_rt_2016Foils.xdi +++ /dev/null @@ -1,500 +0,0 @@ -#XDI/1.1 GSE/2.0 -# Column.1: energy eV -# Column.2: itrans -# Column.3: i0 -# Element.symbol: Au -# Element.edge: L1 -# Mono.d_spacing: 3.13477 -# Mono.name: Si 111 -# Sample.formula: Au -# Sample.name: Au -# Sample.prep: metal foil -# Sample.temperature: room temperature -# Facility.Name: APS -# Beamline.Name: 13-ID-E -# Beamline.xray_source: 3.6cm undulator -# Beamline.Storage_Ring_Current: 102.0 -# Beamline.I0: He, 20 cm -# Beamline.I1: N2, 10 cm -# Scan.start_time: 2016-07-05 18:29:20 -# Scan.end_time: 2016-07-05 18:36:26 -# ScanParameters.Start: Scan.Member: Value -# ScanParameters.ScanType: xafs -# ScanParameters.E0: 14353.000 -# ScanParameters.Legend: Start, Stop, Step, K-space, Time -# ScanParameters.Region1: -100.000, -20.000, 5.000 False 0.50 -# ScanParameters.Region2: -20.000, 30.000, 0.200 False 0.50 -# ScanParameters.Region3: 2.806, 13.000, 0.050 True 0.50 -# ScanParameters.End: here -#------------------------- -# energy itrans i0 - 14253.000 96671.15 72562.45 - 14258.000 101725.15 76274.45 - 14263.000 105949.15 79344.45 - 14268.000 109565.15 81973.45 - 14273.000 105902.15 79221.45 - 14278.000 102155.15 76394.45 - 14283.000 104094.15 77827.45 - 14288.000 104799.15 78334.45 - 14293.000 103043.15 77007.45 - 14298.000 104388.15 78000.45 - 14303.000 104970.15 78455.45 - 14308.000 106177.15 79335.45 - 14313.000 106468.15 79533.45 - 14318.000 107588.15 80412.45 - 14323.000 108032.15 80789.45 - 14328.000 109018.15 81648.45 - 14333.000 108832.15 81682.45 - 14333.200 107951.15 81050.45 - 14333.400 107924.15 81025.45 - 14333.600 107843.15 80989.45 - 14333.800 108027.15 81115.45 - 14334.000 107956.15 81087.45 - 14334.200 108165.15 81255.45 - 14334.400 107868.15 81021.45 - 14334.600 107597.15 80870.45 - 14334.800 107616.15 80911.45 - 14335.000 107624.15 80923.45 - 14335.200 107649.15 80948.45 - 14335.400 107857.15 81086.45 - 14335.600 107400.15 80811.45 - 14335.800 107474.15 80850.45 - 14336.000 107612.15 80961.45 - 14336.200 107861.15 81166.45 - 14336.400 107705.15 81059.45 - 14336.600 107769.15 81139.45 - 14336.800 107933.15 81270.45 - 14337.000 107885.15 81262.45 - 14337.200 108008.15 81360.45 - 14337.400 107692.15 81148.45 - 14337.600 107898.15 81342.45 - 14337.800 107481.15 81049.45 - 14338.000 107328.15 80943.45 - 14338.200 107461.15 81081.45 - 14338.400 107473.15 81105.45 - 14338.600 107492.15 81113.45 - 14338.800 107752.15 81323.45 - 14339.000 107849.15 81378.45 - 14339.200 107700.15 81227.45 - 14339.400 107683.15 81185.45 - 14339.600 107621.15 81130.45 - 14339.800 107569.15 81058.45 - 14340.000 104794.15 78963.45 - 14340.200 107946.15 81345.45 - 14340.400 107982.15 81381.45 - 14340.600 108112.15 81461.45 - 14340.800 108169.15 81574.45 - 14341.000 108465.15 81798.45 - 14341.200 108481.15 81852.45 - 14341.400 108535.15 81900.45 - 14341.600 108039.15 81631.45 - 14341.800 107729.15 81477.45 - 14342.000 107494.15 81336.45 - 14342.200 107239.15 81247.45 - 14342.400 106941.15 81077.45 - 14342.600 107001.15 81182.45 - 14342.800 106796.15 81147.45 - 14343.000 106880.15 81301.45 - 14343.200 106934.15 81403.45 - 14343.400 107164.15 81618.45 - 14343.600 106447.15 81182.45 - 14343.800 105912.15 80829.45 - 14344.000 105890.15 80915.45 - 14344.200 105682.15 80780.45 - 14344.400 105844.15 80970.45 - 14344.600 105838.15 81006.45 - 14344.800 105702.15 80946.45 - 14345.000 105991.15 81228.45 - 14345.200 105830.15 81174.45 - 14345.400 105806.15 81232.45 - 14345.600 105754.15 81267.45 - 14345.800 105807.15 81350.45 - 14346.000 105568.15 81269.45 - 14346.200 105360.15 81190.45 - 14346.400 105318.15 81234.45 - 14346.600 105423.15 81384.45 - 14346.800 105317.15 81386.45 - 14347.000 104692.15 80998.45 - 14347.200 104351.15 80860.45 - 14347.400 104171.15 80785.45 - 14347.600 103953.15 80761.45 - 14347.800 103927.15 80811.45 - 14348.000 103921.15 80912.45 - 14348.200 103716.15 80885.45 - 14348.400 103479.15 80797.45 - 14348.600 103081.15 80629.45 - 14348.800 103009.15 80691.45 - 14349.000 102947.15 80780.45 - 14349.200 102757.15 80730.45 - 14349.400 102790.15 80929.45 - 14349.600 102565.15 80869.45 - 14349.800 102179.15 80742.45 - 14350.000 102097.15 80825.45 - 14350.200 101616.15 80631.45 - 14350.400 101535.15 80728.45 - 14350.600 101056.15 80540.45 - 14350.800 100875.15 80563.45 - 14351.000 100840.15 80729.45 - 14351.200 100754.15 80832.45 - 14351.400 100575.15 80923.45 - 14351.600 100168.15 80769.45 - 14351.800 99708.15 80627.45 - 14352.000 99526.15 80675.45 - 14352.200 99354.15 80769.45 - 14352.400 99324.15 80982.45 - 14352.600 99142.15 81028.45 - 14352.800 98913.15 81110.45 - 14353.000 98342.15 80882.45 - 14353.200 97788.15 80706.45 - 14353.400 97093.15 80344.45 - 14353.600 96715.15 80283.45 - 14353.800 96255.15 80136.45 - 14354.000 96150.15 80302.45 - 14354.200 96348.15 80760.45 - 14354.400 96040.15 80729.45 - 14354.600 95703.15 80705.45 - 14354.800 95410.15 80705.45 - 14355.000 94746.15 80395.45 - 14355.200 94442.15 80430.45 - 14355.400 94376.15 80627.45 - 14355.600 93769.15 80311.45 - 14355.800 93425.15 80307.45 - 14356.000 93405.15 80556.45 - 14356.200 93088.15 80533.45 - 14356.400 92496.15 80287.45 - 14356.600 92331.15 80430.45 - 14356.800 92409.15 80743.45 - 14357.000 91858.15 80531.45 - 14357.200 91197.15 80189.45 - 14357.400 90920.15 80233.45 - 14357.600 90424.15 80045.45 - 14357.800 89791.15 79759.45 - 14358.000 89432.15 79703.45 - 14358.200 88876.15 79461.45 - 14358.400 88810.15 79675.45 - 14358.600 88672.15 79814.45 - 14358.800 88475.15 79926.45 - 14359.000 87939.15 79694.45 - 14359.200 87556.15 79633.45 - 14359.400 87365.15 79711.45 - 14359.600 87245.15 79913.45 - 14359.800 87029.15 79949.45 - 14360.000 86560.15 79810.45 - 14360.200 86090.15 79664.45 - 14360.400 85844.15 79692.45 - 14360.600 85537.15 79647.45 - 14360.800 85082.15 79496.45 - 14361.000 84647.15 79366.45 - 14361.200 84308.15 79269.45 - 14361.400 84216.15 79462.45 - 14361.600 84087.15 79556.45 - 14361.800 83653.15 79393.45 - 14362.000 83194.15 79195.45 - 14362.200 82893.15 79162.45 - 14362.400 82143.15 78673.45 - 14362.600 81871.15 78606.45 - 14362.800 81779.15 78756.45 - 14363.000 81532.15 78700.45 - 14363.200 81190.15 78564.45 - 14363.400 80857.15 78425.45 - 14363.600 80968.15 78735.45 - 14363.800 80974.15 78910.45 - 14364.000 80491.15 78594.45 - 14364.200 79982.15 78232.45 - 14364.400 79834.15 78228.45 - 14364.600 79523.15 78062.45 - 14364.800 79019.15 77646.45 - 14365.000 78988.15 77768.45 - 14365.200 78813.15 77695.45 - 14365.400 78805.15 77740.45 - 14365.600 78846.15 77885.45 - 14365.800 78750.15 77831.45 - 14366.000 78907.15 78097.45 - 14366.200 78805.15 77989.45 - 14366.400 78658.15 77904.45 - 14366.600 78710.15 77985.45 - 14366.800 78687.15 78005.45 - 14367.000 78355.15 77667.45 - 14367.200 78442.15 77764.45 - 14367.400 78181.15 77545.45 - 14367.600 77915.15 77264.45 - 14367.800 78450.15 77808.45 - 14368.000 78640.15 77948.45 - 14368.200 78630.15 77916.45 - 14368.400 78508.15 77780.45 - 14368.600 78541.15 77779.45 - 14368.800 78827.15 78030.45 - 14369.000 78740.15 77947.45 - 14369.200 78670.15 77823.45 - 14369.400 78156.15 77290.45 - 14369.600 78050.15 77116.45 - 14369.800 78174.15 77175.45 - 14370.000 78229.15 77220.45 - 14370.200 78483.15 77387.45 - 14370.400 78324.15 77215.45 - 14370.600 78196.15 77035.45 - 14370.800 78540.15 77322.45 - 14371.000 78766.15 77480.45 - 14371.200 78424.15 77053.45 - 14371.400 78255.15 76832.45 - 14371.600 78392.15 76883.45 - 14371.800 78622.15 77062.45 - 14372.000 78947.15 77309.45 - 14372.200 79080.15 77345.45 - 14372.400 79378.15 77571.45 - 14372.600 79093.15 77219.45 - 14372.800 79085.15 77130.45 - 14373.000 79008.15 76992.45 - 14373.200 79009.15 76902.45 - 14373.400 79371.15 77172.45 - 14373.600 79639.15 77374.45 - 14373.800 79459.15 77121.45 - 14374.000 79666.15 77243.45 - 14374.200 79732.15 77196.45 - 14374.400 79625.15 77045.45 - 14374.600 79583.15 76922.45 - 14374.800 79829.15 77082.45 - 14375.000 79535.15 76721.45 - 14375.200 79200.15 76359.45 - 14375.400 79414.15 76479.45 - 14375.600 79384.15 76381.45 - 14375.800 79542.15 76476.45 - 14376.000 79667.15 76541.45 - 14376.200 79861.15 76674.45 - 14376.400 79971.15 76719.45 - 14376.600 80233.15 76966.45 - 14376.800 80172.15 76830.45 - 14377.000 80358.15 76974.45 - 14377.200 80169.15 76747.45 - 14377.400 80242.15 76793.45 - 14377.600 79931.15 76471.45 - 14377.800 79958.15 76486.45 - 14378.000 79959.15 76469.45 - 14378.200 80069.15 76548.45 - 14378.400 80247.15 76706.45 - 14378.600 80491.15 76921.45 - 14378.800 80475.15 76949.45 - 14379.000 80358.15 76829.45 - 14379.200 80315.15 76793.45 - 14379.400 80078.15 76564.45 - 14379.600 80197.15 76695.45 - 14379.800 80068.15 76591.45 - 14380.000 79702.15 76272.45 - 14380.200 79891.15 76486.45 - 14380.400 80040.15 76640.45 - 14380.600 79804.15 76449.45 - 14380.800 79802.15 76488.45 - 14381.000 79702.15 76427.45 - 14381.200 79678.15 76453.45 - 14381.400 79683.15 76526.45 - 14381.600 79632.15 76480.45 - 14381.800 79608.15 76545.45 - 14382.000 79703.15 76696.45 - 14382.200 79763.15 76803.45 - 14382.400 79924.15 76984.45 - 14382.600 80007.15 77171.45 - 14382.800 80153.15 77362.45 - 14383.000 80209.15 77474.45 - 14384.082 79903.15 77590.45 - 14385.184 79744.15 77881.45 - 14386.306 79195.15 77795.45 - 14387.447 78502.15 77517.45 - 14388.607 78319.15 77672.45 - 14389.787 78206.15 77731.45 - 14390.985 77373.15 77009.45 - 14392.203 78161.15 77718.45 - 14393.440 78703.15 78082.45 - 14394.696 79012.15 78058.45 - 14395.972 79466.15 78111.45 - 14397.266 79924.15 78201.45 - 14398.580 80254.15 78139.45 - 14399.914 80446.15 78009.45 - 14401.266 81039.15 78400.45 - 14402.637 81212.15 78406.45 - 14404.028 81343.15 78498.45 - 14405.438 81446.15 78609.45 - 14406.867 81738.15 78900.45 - 14408.316 81929.15 79108.45 - 14409.783 81749.15 79016.45 - 14411.270 81858.15 79128.45 - 14412.776 81697.15 79031.45 - 14414.302 81734.15 79172.45 - 14415.846 81445.15 78965.45 - 14417.410 81406.15 79038.45 - 14418.993 80446.15 78155.45 - 14420.595 80890.15 78692.45 - 14422.216 80991.15 78884.45 - 14423.857 80983.15 79010.45 - 14425.517 80720.15 78819.45 - 14427.196 80162.15 78364.45 - 14428.894 81442.15 79637.45 - 14430.611 80817.15 78971.45 - 14432.348 81078.15 79109.45 - 14434.104 81671.15 79509.45 - 14435.879 80737.15 78395.45 - 14437.673 81238.15 78643.45 - 14439.487 80686.15 77902.45 - 14441.319 82433.15 79399.45 - 14443.171 81806.15 78641.45 - 14445.042 81563.15 78333.45 - 14446.933 81667.15 78370.45 - 14448.842 81433.15 78115.45 - 14450.771 81537.15 78170.45 - 14452.719 81278.15 77950.45 - 14454.686 80647.15 77338.45 - 14456.673 80652.15 77304.45 - 14458.679 80817.15 77420.45 - 14460.703 80215.15 76777.45 - 14462.748 80171.15 76686.45 - 14464.811 80233.15 76661.45 - 14466.893 80200.15 76548.45 - 14468.995 80291.15 76606.45 - 14471.116 80461.15 76701.45 - 14473.256 80963.15 77173.45 - 14475.416 81141.15 77351.45 - 14477.594 79842.15 76140.45 - 14479.792 77782.15 74178.45 - 14482.009 80636.15 76968.45 - 14484.245 81710.15 78013.45 - 14486.501 81511.15 77815.45 - 14488.775 81386.15 77660.45 - 14491.069 82127.15 78335.45 - 14493.382 83121.15 79185.45 - 14495.715 82885.15 78914.45 - 14498.066 81907.15 77896.45 - 14500.437 82055.15 77960.45 - 14502.827 82625.15 78394.45 - 14505.236 83103.15 78742.45 - 14507.665 83219.15 78747.45 - 14510.112 83465.15 78892.45 - 14512.579 84118.15 79399.45 - 14515.065 84317.15 79512.45 - 14517.570 84560.15 79672.45 - 14520.095 85742.15 80731.45 - 14522.639 85633.15 80562.45 - 14525.201 86193.15 80955.45 - 14527.784 86622.15 81263.45 - 14530.385 86898.15 81422.45 - 14533.006 87266.15 81680.45 - 14535.645 87635.15 81989.45 - 14538.304 87739.15 82089.45 - 14540.982 88339.15 82678.45 - 14543.680 88256.15 82636.45 - 14546.397 88475.15 82910.45 - 14549.132 88859.15 83316.45 - 14551.887 89240.15 83652.45 - 14554.662 89306.15 83721.45 - 14557.455 89626.15 84002.45 - 14560.268 90154.15 84436.45 - 14563.100 90213.15 84447.45 - 14565.951 90277.15 84396.45 - 14568.821 90525.15 84545.45 - 14571.711 90144.15 84078.45 - 14574.620 91480.15 85169.45 - 14577.548 92277.15 85683.45 - 14580.495 91874.15 85142.45 - 14583.461 90794.15 84025.45 - 14586.447 90594.15 83675.45 - 14589.452 90269.15 83221.45 - 14592.476 88721.15 81671.45 - 14595.519 87856.15 80759.45 - 14598.582 87037.15 79907.45 - 14601.664 86997.15 79852.45 - 14604.764 87236.15 80049.45 - 14607.885 87055.15 79875.45 - 14611.024 87402.15 80203.45 - 14614.183 87215.15 80064.45 - 14617.360 86769.15 79642.45 - 14620.557 86481.15 79334.45 - 14623.774 86982.15 79768.45 - 14627.009 87223.15 79873.45 - 14630.264 87225.15 79814.45 - 14633.538 87266.15 79790.45 - 14636.831 88281.15 80661.45 - 14640.143 87481.15 79898.45 - 14643.475 87748.15 80060.45 - 14646.825 87604.15 79827.45 - 14650.195 87763.15 79867.45 - 14653.584 88205.15 80110.45 - 14656.993 88752.15 80453.45 - 14660.420 87468.15 79120.45 - 14663.867 90106.15 81381.45 - 14667.333 90764.15 81834.45 - 14670.819 90608.15 81624.45 - 14674.323 90415.15 81375.45 - 14677.847 90677.15 81560.45 - 14681.390 90939.15 81748.45 - 14684.952 89376.15 80396.45 - 14688.533 87850.15 79016.45 - 14692.134 86976.15 78192.45 - 14695.753 87671.15 78740.45 - 14699.392 87140.15 78197.45 - 14703.050 88273.15 79121.45 - 14706.728 89436.15 80024.45 - 14710.425 88297.15 78984.45 - 14714.140 87899.15 78525.45 - 14717.875 89321.15 79733.45 - 14721.630 89983.15 80248.45 - 14725.403 90073.15 80236.45 - 14729.196 90584.15 80579.45 - 14733.008 91462.15 81263.45 - 14736.839 90771.15 80565.45 - 14740.689 90868.15 80508.45 - 14744.559 91242.15 80716.45 - 14748.448 92097.15 81356.45 - 14752.356 92847.15 81875.45 - 14756.283 93344.15 82190.45 - 14760.229 94016.15 82670.45 - 14764.195 94088.15 82641.45 - 14768.180 93799.15 82303.45 - 14772.184 95254.15 83496.45 - 14776.207 95065.15 83295.45 - 14780.250 95904.15 83948.45 - 14784.311 96383.15 84301.45 - 14788.392 96660.15 84485.45 - 14792.492 97593.15 85223.45 - 14796.612 96941.15 84577.45 - 14800.750 97102.15 84657.45 - 14804.908 96204.15 83766.45 - 14809.085 96211.15 83678.45 - 14813.281 97486.15 84701.45 - 14817.497 96194.15 83491.45 - 14821.731 93457.15 81038.45 - 14825.985 91529.15 79255.45 - 14830.258 92181.15 79718.45 - 14834.551 93252.15 80529.45 - 14838.862 91987.15 79357.45 - 14843.193 91455.15 78731.45 - 14847.543 92376.15 79448.45 - 14851.912 92019.15 79035.45 - 14856.300 92845.15 79644.45 - 14860.708 92610.15 79337.45 - 14865.135 93225.15 79777.45 - 14869.581 92744.15 79302.45 - 14874.046 92732.15 79205.45 - 14878.530 93625.15 79873.45 - 14883.034 94549.15 80572.45 - 14887.557 95216.15 81079.45 - 14892.099 94520.15 80434.45 - 14896.660 93356.15 79362.45 - 14901.241 93297.15 79222.45 - 14905.841 94122.15 79770.45 - 14910.460 95147.15 80566.45 - 14915.098 95118.15 80446.45 - 14919.755 94132.15 79538.45 - 14924.432 94667.15 79859.45 - 14929.128 95059.15 80072.45 - 14933.843 95598.15 80415.45 - 14938.577 94346.15 79239.45 - 14943.330 95376.15 79995.45 - 14948.103 95058.15 79591.45 - 14952.895 94830.15 79314.45 - 14957.706 95713.15 79918.45 - 14962.536 96239.15 80047.45 - 14967.386 96039.15 80034.45 - 14972.255 97047.15 80732.45 - 14977.143 98026.15 81424.45 - 14982.050 98133.15 81444.45 - 14986.976 99755.15 82640.45 - 14991.922 99649.15 82520.45 - 14996.887 100239.15 82893.45 diff --git a/public/xdidata/Au/Au_Foil_L2_rt_2016Foils.xdi b/public/xdidata/Au/Au_Foil_L2_rt_2016Foils.xdi deleted file mode 100644 index 326ae76..0000000 --- a/public/xdidata/Au/Au_Foil_L2_rt_2016Foils.xdi +++ /dev/null @@ -1,500 +0,0 @@ -#XDI/1.1 GSE/2.0 -# Column.1: energy eV -# Column.2: itrans -# Column.3: i0 -# Element.symbol: Au -# Element.edge: L2 -# Mono.d_spacing: 3.13477 -# Mono.name: Si 111 -# Sample.formula: Au -# Sample.name: Au -# Sample.prep: metal foil -# Sample.temperature: room temperature -# Facility.Name: APS -# Beamline.Name: 13-ID-E -# Beamline.xray_source: 3.6cm undulator -# Beamline.Storage_Ring_Current: 102.0 -# Beamline.I0: He, 20 cm -# Beamline.I1: N2, 10 cm -# Scan.start_time: 2016-07-05 18:20:59 -# Scan.end_time: 2016-07-05 18:28:07 -# ScanParameters.Start: Scan.Member: Value -# ScanParameters.ScanType: xafs -# ScanParameters.E0: 13734.000 -# ScanParameters.Legend: Start, Stop, Step, K-space, Time -# ScanParameters.Region1: -100.000, -20.000, 5.000 False 0.50 -# ScanParameters.Region2: -20.000, 30.000, 0.200 False 0.50 -# ScanParameters.Region3: 2.806, 13.000, 0.050 True 0.50 -# ScanParameters.End: here -#------------------------- -# energy itrans i0 - 13634.000 163420.15 77858.45 - 13639.000 169493.15 80574.45 - 13644.000 172967.15 82114.45 - 13649.000 174169.15 82580.45 - 13654.000 175875.15 83217.45 - 13659.000 178899.15 84543.45 - 13664.000 176855.15 83442.45 - 13669.000 176737.15 83275.45 - 13674.000 171304.15 80627.45 - 13679.000 177343.15 83330.45 - 13684.000 178299.15 83673.45 - 13689.000 180683.15 84691.45 - 13694.000 182377.15 85415.45 - 13699.000 181861.15 85096.45 - 13704.000 181962.15 85080.45 - 13709.000 182127.15 85187.45 - 13714.000 180434.15 84555.45 - 13714.200 175590.15 82273.45 - 13714.400 172428.15 80783.45 - 13714.600 170364.15 79825.45 - 13714.800 169214.15 79322.45 - 13715.000 168307.15 78913.45 - 13715.200 168210.15 78882.45 - 13715.400 167819.15 78700.45 - 13715.600 167726.15 78672.45 - 13715.800 167292.15 78445.45 - 13716.000 167573.15 78640.45 - 13716.200 168033.15 78817.45 - 13716.400 167364.15 78550.45 - 13716.600 166940.15 78342.45 - 13716.800 167075.15 78423.45 - 13717.000 167223.15 78528.45 - 13717.200 167487.15 78640.45 - 13717.400 167259.15 78564.45 - 13717.600 167245.15 78548.45 - 13717.800 167501.15 78698.45 - 13718.000 167939.15 78911.45 - 13718.200 166809.15 78391.45 - 13718.400 166854.15 78436.45 - 13718.600 165534.15 77846.45 - 13718.800 165849.15 77987.45 - 13719.000 165403.15 77794.45 - 13719.200 165121.15 77686.45 - 13719.400 165667.15 77971.45 - 13719.600 165711.15 78016.45 - 13719.800 165411.15 77878.45 - 13720.000 165569.15 77951.45 - 13720.200 165533.15 77958.45 - 13720.400 165659.15 78059.45 - 13720.600 165795.15 78138.45 - 13720.800 165492.15 77997.45 - 13721.000 165236.15 77917.45 - 13721.200 165343.15 78009.45 - 13721.400 165132.15 77939.45 - 13721.600 165328.15 78064.45 - 13721.800 165464.15 78163.45 - 13722.000 165611.15 78268.45 - 13722.200 165011.15 78006.45 - 13722.400 164871.15 77966.45 - 13722.600 164673.15 77896.45 - 13722.800 164321.15 77742.45 - 13723.000 164518.15 77908.45 - 13723.200 164891.15 78116.45 - 13723.400 164227.15 77846.45 - 13723.600 163898.15 77715.45 - 13723.800 163647.15 77652.45 - 13724.000 163512.15 77638.45 - 13724.200 163826.15 77834.45 - 13724.400 163789.15 77856.45 - 13724.600 163830.15 77911.45 - 13724.800 164033.15 78060.45 - 13725.000 164294.15 78293.45 - 13725.200 163846.15 78100.45 - 13725.400 162493.15 77544.45 - 13725.600 162174.15 77450.45 - 13725.800 162215.15 77529.45 - 13726.000 162394.15 77690.45 - 13726.200 158328.15 75794.45 - 13726.400 163304.15 78268.45 - 13726.600 163200.15 78300.45 - 13726.800 162560.15 78078.45 - 13727.000 162611.15 78213.45 - 13727.200 162554.15 78247.45 - 13727.400 162400.15 78337.45 - 13727.600 162235.15 78369.45 - 13727.800 161563.15 78157.45 - 13728.000 161474.15 78235.45 - 13728.200 161379.15 78310.45 - 13728.400 161171.15 78354.45 - 13728.600 161072.15 78462.45 - 13728.800 159983.15 78103.45 - 13729.000 159044.15 77842.45 - 13729.200 158875.15 77911.45 - 13729.400 158724.15 78041.45 - 13729.600 157951.15 77871.45 - 13729.800 157935.15 78100.45 - 13730.000 157656.15 78228.45 - 13730.200 157486.15 78434.45 - 13730.400 157040.15 78473.45 - 13730.600 155873.15 78219.45 - 13730.800 154976.15 78095.45 - 13731.000 154339.15 78122.45 - 13731.200 153154.15 77931.45 - 13731.400 152402.15 77925.45 - 13731.600 151801.15 78092.45 - 13731.800 150604.15 77942.45 - 13732.000 148537.15 77385.45 - 13732.200 147739.15 77530.45 - 13732.400 146882.15 77670.45 - 13732.600 145720.15 77652.45 - 13732.800 144606.15 77677.45 - 13733.000 143443.15 77775.45 - 13733.200 142243.15 77808.45 - 13733.400 141222.15 77961.45 - 13733.600 139986.15 78048.45 - 13733.800 139170.15 78327.45 - 13734.000 137907.15 78315.45 - 13734.200 136492.15 78283.45 - 13734.400 135303.15 78360.45 - 13734.600 133840.15 78236.45 - 13734.800 132766.15 78371.45 - 13735.000 131618.15 78334.45 - 13735.200 130755.15 78479.45 - 13735.400 129560.15 78408.45 - 13735.600 128349.15 78249.45 - 13735.800 127541.15 78320.45 - 13736.000 126999.15 78528.45 - 13736.200 126216.15 78514.45 - 13736.400 125817.15 78708.45 - 13736.600 125088.15 78703.45 - 13736.800 123454.15 78090.45 - 13737.000 122853.15 78080.45 - 13737.200 122495.15 78247.45 - 13737.400 122170.15 78379.45 - 13737.600 121766.15 78433.45 - 13737.800 121596.15 78645.45 - 13738.000 120445.15 78188.45 - 13738.200 120366.15 78416.45 - 13738.400 119844.15 78348.45 - 13738.600 119272.15 78186.45 - 13738.800 119065.15 78305.45 - 13739.000 118795.15 78374.45 - 13739.200 118650.15 78552.45 - 13739.400 118267.15 78516.45 - 13739.600 118013.15 78627.45 - 13739.800 117376.15 78453.45 - 13740.000 117417.15 78763.45 - 13740.200 116530.15 78461.45 - 13740.400 116082.15 78449.45 - 13740.600 115573.15 78408.45 - 13740.800 114960.15 78311.45 - 13741.000 114878.15 78595.45 - 13741.200 114378.15 78606.45 - 13741.400 113848.15 78595.45 - 13741.600 113648.15 78849.45 - 13741.800 113206.15 78934.45 - 13742.000 112825.15 79071.45 - 13742.200 111981.15 78866.45 - 13742.400 110961.15 78580.45 - 13742.600 110554.15 78648.45 - 13742.800 109935.15 78612.45 - 13743.000 109498.15 78702.45 - 13743.200 109195.15 78898.45 - 13743.400 109030.15 79170.45 - 13743.600 108481.15 79139.45 - 13743.800 108069.15 79227.45 - 13744.000 107416.15 79087.45 - 13744.200 106236.15 78565.45 - 13744.400 105899.15 78621.45 - 13744.600 105776.15 78815.45 - 13744.800 105296.15 78722.45 - 13745.000 105230.15 78946.45 - 13745.200 104499.15 78603.45 - 13745.400 103925.15 78409.45 - 13745.600 103860.15 78547.45 - 13745.800 103815.15 78689.45 - 13746.000 103542.15 78647.45 - 13746.200 103499.15 78714.45 - 13746.400 103292.15 78697.45 - 13746.600 103235.15 78733.45 - 13746.800 103020.15 78661.45 - 13747.000 103132.15 78822.45 - 13747.200 103308.15 78987.45 - 13747.400 103162.15 78912.45 - 13747.600 103182.15 78945.45 - 13747.800 103288.15 79069.45 - 13748.000 103056.15 78885.45 - 13748.200 102986.15 78848.45 - 13748.400 103122.15 78913.45 - 13748.600 103249.15 79051.45 - 13748.800 103430.15 79159.45 - 13749.000 103365.15 79117.45 - 13749.200 102829.15 78722.45 - 13749.400 102916.15 78778.45 - 13749.600 103117.15 78931.45 - 13749.800 102734.15 78696.45 - 13750.000 102733.15 78709.45 - 13750.200 102848.15 78808.45 - 13750.400 102669.15 78770.45 - 13750.600 102907.15 78957.45 - 13750.800 102922.15 79054.45 - 13751.000 102932.15 79171.45 - 13751.200 102711.15 79057.45 - 13751.400 102467.15 79021.45 - 13751.600 102592.15 79235.45 - 13751.800 102441.15 79239.45 - 13752.000 102436.15 79298.45 - 13752.200 101958.15 79093.45 - 13752.400 101761.15 79074.45 - 13752.600 101687.15 79130.45 - 13752.800 101600.15 79207.45 - 13753.000 101619.15 79320.45 - 13753.200 101573.15 79388.45 - 13753.400 101520.15 79520.45 - 13753.600 101236.15 79406.45 - 13753.800 101130.15 79418.45 - 13754.000 100704.15 79215.45 - 13754.200 100647.15 79296.45 - 13754.400 100162.15 79031.45 - 13754.600 100219.15 79247.45 - 13754.800 99850.15 79105.45 - 13755.000 99491.15 78987.45 - 13755.200 99323.15 79034.45 - 13755.400 98900.15 78882.45 - 13755.600 98892.15 79068.45 - 13755.800 98584.15 79076.45 - 13756.000 98526.15 79306.45 - 13756.200 98195.15 79288.45 - 13756.400 97970.15 79395.45 - 13756.600 97741.15 79527.45 - 13756.800 97462.15 79620.45 - 13757.000 96887.15 79517.45 - 13757.200 96268.15 79349.45 - 13757.400 95939.15 79437.45 - 13757.600 95581.15 79488.45 - 13757.800 95361.15 79674.45 - 13758.000 95022.15 79716.45 - 13758.200 94755.15 79838.45 - 13758.400 94656.15 80067.45 - 13758.600 94239.15 80043.45 - 13758.800 93388.15 79617.45 - 13759.000 93008.15 79519.45 - 13759.200 92842.15 79607.45 - 13759.400 92667.15 79656.45 - 13759.600 92485.15 79692.45 - 13759.800 92005.15 79411.45 - 13760.000 91684.15 79218.45 - 13760.200 91586.15 79182.45 - 13760.400 91778.15 79413.45 - 13760.600 91536.15 79197.45 - 13760.800 91540.15 79169.45 - 13761.000 91826.15 79333.45 - 13761.200 91941.15 79371.45 - 13761.400 92138.15 79436.45 - 13761.600 91953.15 79159.45 - 13761.800 92202.15 79212.45 - 13762.000 92514.15 79327.45 - 13762.200 92844.15 79414.45 - 13762.400 93130.15 79449.45 - 13762.600 93445.15 79554.45 - 13762.800 93827.15 79685.45 - 13763.000 93941.15 79498.45 - 13763.200 94268.15 79615.45 - 13763.400 94610.15 79694.45 - 13763.600 94946.15 79801.45 - 13763.800 95288.15 79863.45 - 13764.000 95559.15 79891.45 - 13765.082 96164.15 79654.45 - 13766.184 96600.15 79655.45 - 13767.306 96633.15 79646.45 - 13768.447 96723.15 79727.45 - 13769.607 96967.15 79747.45 - 13770.787 97307.15 79731.45 - 13771.985 97581.15 79673.45 - 13773.203 97907.15 79961.45 - 13774.440 97006.15 79708.45 - 13775.696 95880.15 79483.45 - 13776.972 94894.15 79554.45 - 13778.266 93858.15 79574.45 - 13779.580 92869.15 79632.45 - 13780.914 91902.15 79578.45 - 13782.266 91598.15 79835.45 - 13783.637 91316.15 79776.45 - 13785.028 91452.15 79695.45 - 13786.438 91619.15 79377.45 - 13787.867 92125.15 79253.45 - 13789.316 92769.15 79298.45 - 13790.783 91188.15 77478.45 - 13792.270 94092.15 79536.45 - 13793.776 94900.15 79861.45 - 13795.302 95431.15 80012.45 - 13796.846 95152.15 79542.45 - 13798.410 95317.15 79376.45 - 13799.993 95607.15 79216.45 - 13801.595 95392.15 78542.45 - 13803.216 95558.15 78281.45 - 13804.857 96128.15 78457.45 - 13806.517 95142.15 77623.45 - 13808.196 95257.15 77815.45 - 13809.894 94473.15 77389.45 - 13811.611 94280.15 77521.45 - 13813.348 93657.15 77379.45 - 13815.104 93331.15 77586.45 - 13816.879 92581.15 77433.45 - 13818.673 91642.15 77032.45 - 13820.487 91295.15 76997.45 - 13822.319 91605.15 77279.45 - 13824.171 91673.15 77251.45 - 13826.042 91999.15 77324.45 - 13827.933 92657.15 77668.45 - 13829.842 93198.15 77902.45 - 13831.771 93659.15 78120.45 - 13833.719 94834.15 78946.45 - 13835.686 95484.15 79368.45 - 13837.673 94613.15 78549.45 - 13839.679 94473.15 78357.45 - 13841.703 94684.15 78490.45 - 13843.748 95078.15 78723.45 - 13845.811 94720.15 78311.45 - 13847.893 94875.15 78276.45 - 13849.995 95920.15 78970.45 - 13852.116 96703.15 79318.45 - 13854.256 97696.15 79912.45 - 13856.416 98412.15 80237.45 - 13858.594 98418.15 80070.45 - 13860.792 98587.15 80102.45 - 13863.009 98522.15 80052.45 - 13865.245 98703.15 80262.45 - 13867.501 99103.15 80706.45 - 13869.775 99275.15 80947.45 - 13872.069 99747.15 81470.45 - 13874.382 99712.15 81561.45 - 13876.715 99887.15 81807.45 - 13879.066 99795.15 81857.45 - 13881.437 100468.15 82460.45 - 13883.827 100699.15 82704.45 - 13886.236 100530.15 82565.45 - 13888.665 100970.15 82911.45 - 13891.112 101248.15 83159.45 - 13893.579 101831.15 83584.45 - 13896.065 102436.15 84015.45 - 13898.570 101877.15 83525.45 - 13901.095 102200.15 83749.45 - 13903.639 102326.15 83928.45 - 13906.201 102435.15 83974.45 - 13908.784 102640.15 84072.45 - 13911.385 103141.15 84311.45 - 13914.006 103213.15 84100.45 - 13916.645 103447.15 83987.45 - 13919.304 103591.15 83772.45 - 13921.982 104466.15 84283.45 - 13924.680 104394.15 84091.45 - 13927.397 101321.15 81552.45 - 13930.132 105280.15 84650.45 - 13932.887 103133.15 82902.45 - 13935.662 102004.15 81946.45 - 13938.455 101374.15 81506.45 - 13941.268 100853.15 81111.45 - 13944.100 100562.15 80957.45 - 13946.951 101494.15 81869.45 - 13949.821 100980.15 81631.45 - 13952.711 99463.15 80553.45 - 13955.620 97622.15 79196.45 - 13958.548 97545.15 79262.45 - 13961.495 98122.15 79817.45 - 13964.461 98361.15 79972.45 - 13967.447 98100.15 79645.45 - 13970.452 98425.15 79744.45 - 13973.476 98070.15 79251.45 - 13976.519 99021.15 79780.45 - 13979.582 100181.15 80405.45 - 13982.664 100850.15 80639.45 - 13985.764 101015.15 80495.45 - 13988.885 99756.15 79319.45 - 13992.024 99448.15 79015.45 - 13995.183 99726.15 79196.45 - 13998.360 100302.15 79652.45 - 14001.557 99347.15 78941.45 - 14004.774 98825.15 78487.45 - 14008.009 98850.15 78456.45 - 14011.264 99554.15 78926.45 - 14014.538 99318.15 78703.45 - 14017.831 99409.15 78764.45 - 14021.143 98994.15 78498.45 - 14024.475 98207.15 77978.45 - 14027.825 95820.15 76133.45 - 14031.195 93884.15 74691.45 - 14034.584 95600.15 76038.45 - 14037.993 98518.15 78383.45 - 14041.420 98308.15 78083.45 - 14044.867 98220.15 77883.45 - 14048.333 98403.15 77801.45 - 14051.819 98662.15 77799.45 - 14055.323 99251.15 78003.45 - 14058.847 98943.15 77587.45 - 14062.390 99953.15 78220.45 - 14065.952 101400.15 79244.45 - 14069.533 100244.15 78289.45 - 14073.134 99687.15 77839.45 - 14076.753 100210.15 78150.45 - 14080.392 100703.15 78535.45 - 14084.050 101296.15 78918.45 - 14087.728 102019.15 79425.45 - 14091.425 102108.15 79341.45 - 14095.140 102633.15 79728.45 - 14098.875 102650.15 79710.45 - 14102.630 102687.15 79712.45 - 14106.403 103725.15 80541.45 - 14110.196 105618.15 81993.45 - 14114.008 106242.15 82435.45 - 14117.839 105990.15 82195.45 - 14121.689 93793.15 72712.45 - 14125.559 101937.15 78952.45 - 14129.448 106114.15 82115.45 - 14133.356 106573.15 82315.45 - 14137.283 104790.15 80768.45 - 14141.229 107135.15 82435.45 - 14145.195 105155.15 80731.45 - 14149.180 105714.15 80983.45 - 14153.184 106903.15 81757.45 - 14157.207 106672.15 81439.45 - 14161.250 104309.15 79619.45 - 14165.311 103537.15 78957.45 - 14169.392 103922.15 79221.45 - 14173.492 105900.15 80698.45 - 14177.612 105197.15 80129.45 - 14181.750 104052.15 79197.45 - 14185.908 104108.15 79222.45 - 14190.085 103470.15 78681.45 - 14194.281 103615.15 78742.45 - 14198.497 103877.15 78901.45 - 14202.731 104578.15 79376.45 - 14206.985 104579.15 79308.45 - 14211.258 95766.15 72528.45 - 14215.551 105242.15 79608.45 - 14219.862 107449.15 81189.45 - 14224.193 103742.15 78330.45 - 14228.543 103956.15 78340.45 - 14232.912 103372.15 77795.45 - 14237.300 103500.15 77794.45 - 14241.708 101234.15 76003.45 - 14246.135 101611.15 76145.45 - 14250.581 101059.15 75641.45 - 14255.046 102537.15 76655.45 - 14259.530 103468.15 77294.45 - 14264.034 103471.15 77225.45 - 14268.557 104061.15 77622.45 - 14273.099 103976.15 77513.45 - 14277.660 101481.15 75649.45 - 14282.241 102253.15 76175.45 - 14286.841 102256.15 76201.45 - 14291.460 102126.15 76081.45 - 14296.098 102838.15 76575.45 - 14300.755 103268.15 76885.45 - 14305.432 104182.15 77573.45 - 14310.128 105028.15 78207.45 - 14314.843 105441.15 78539.45 - 14319.577 105675.15 78708.45 - 14324.330 106432.15 79331.45 - 14329.103 107338.15 80118.45 - 14333.895 107146.15 80207.45 - 14338.706 106268.15 79939.45 - 14343.536 106371.15 80798.45 - 14348.386 104079.15 81019.45 - 14353.255 99800.15 82046.45 - 14358.143 92767.15 82558.45 - 14363.050 85608.15 82386.45 - 14367.976 82797.15 81726.45 - 14372.922 83476.15 81003.45 - 14377.887 84211.15 80189.45 diff --git a/public/xdidata/Au/Au_Foil_L3_rt_2016Foils.xdi b/public/xdidata/Au/Au_Foil_L3_rt_2016Foils.xdi deleted file mode 100644 index d2bd401..0000000 --- a/public/xdidata/Au/Au_Foil_L3_rt_2016Foils.xdi +++ /dev/null @@ -1,500 +0,0 @@ -#XDI/1.1 GSE/2.0 -# Column.1: energy eV -# Column.2: itrans -# Column.3: i0 -# Element.symbol: Au -# Element.edge: L3 -# Mono.d_spacing: 3.13477 -# Mono.name: Si 111 -# Sample.formula: Au -# Sample.name: Au -# Sample.prep: metal foil -# Sample.temperature: room temperature -# Facility.Name: APS -# Beamline.Name: 13-ID-E -# Beamline.xray_source: 3.6cm undulator -# Beamline.Storage_Ring_Current: 102.0 -# Beamline.I0: He, 20 cm -# Beamline.I1: N2, 10 cm -# Scan.start_time: 2016-07-05 18:10:52 -# Scan.end_time: 2016-07-05 18:19:10 -# ScanParameters.Start: Scan.Member: Value -# ScanParameters.ScanType: xafs -# ScanParameters.E0: 11919.000 -# ScanParameters.Legend: Start, Stop, Step, K-space, Time -# ScanParameters.Region1: -100.000, -20.000, 5.000 False 0.50 -# ScanParameters.Region2: -20.000, 30.000, 0.200 False 0.50 -# ScanParameters.Region3: 2.806, 13.000, 0.050 True 0.50 -# ScanParameters.End: here -#------------------------- -# energy itrans i0 - 11819.000 169674.30 94782.30 - 11824.000 165099.30 92106.30 - 11829.000 160731.30 89579.30 - 11834.000 154949.30 86271.30 - 11839.000 152698.30 84958.30 - 11844.000 156991.30 87282.30 - 11849.000 153945.30 85564.30 - 11854.000 161957.30 89961.30 - 11859.000 167482.30 93025.30 - 11864.000 172898.30 96068.30 - 11869.000 172997.30 96160.30 - 11874.000 173408.30 96434.30 - 11879.000 173074.30 96306.30 - 11884.000 172796.30 96317.30 - 11889.000 172586.30 96482.30 - 11894.000 166926.30 93772.30 - 11899.000 170340.30 96470.30 - 11899.200 170402.30 96541.30 - 11899.400 170116.30 96439.30 - 11899.600 170266.30 96550.30 - 11899.800 170021.30 96447.30 - 11900.000 170150.30 96593.30 - 11900.200 170285.30 96703.30 - 11900.400 170024.30 96624.30 - 11900.600 169955.30 96614.30 - 11900.800 169792.30 96537.30 - 11901.000 169759.30 96610.30 - 11901.200 169584.30 96535.30 - 11901.400 169568.30 96580.30 - 11901.600 169386.30 96538.30 - 11901.800 169421.30 96657.30 - 11902.000 169190.30 96528.30 - 11902.200 169046.30 96552.30 - 11902.400 168964.30 96518.30 - 11902.600 168874.30 96555.30 - 11902.800 168592.30 96475.30 - 11903.000 168762.30 96655.30 - 11903.200 168748.30 96699.30 - 11903.400 168628.30 96703.30 - 11903.600 168303.30 96586.30 - 11903.800 168109.30 96564.30 - 11904.000 168129.30 96638.30 - 11904.200 167744.30 96474.30 - 11904.400 167733.30 96629.30 - 11904.600 167797.30 96697.30 - 11904.800 167529.30 96640.30 - 11905.000 167416.30 96656.30 - 11905.200 167545.30 96820.30 - 11905.400 167464.30 96871.30 - 11905.600 166824.30 96627.30 - 11905.800 166693.30 96643.30 - 11906.000 166398.30 96570.30 - 11906.200 166236.30 96589.30 - 11906.400 165792.30 96445.30 - 11906.600 165681.30 96471.30 - 11906.800 165163.30 96269.30 - 11907.000 164981.30 96299.30 - 11907.200 163147.30 95379.30 - 11907.400 162862.30 95359.30 - 11907.600 162810.30 95429.30 - 11907.800 162939.30 95649.30 - 11908.000 162556.30 95578.30 - 11908.200 162639.30 95799.30 - 11908.400 162302.30 95778.30 - 11908.600 162212.30 95844.30 - 11908.800 162638.30 96295.30 - 11909.000 162979.30 96675.30 - 11909.200 162871.30 96805.30 - 11909.400 162551.30 96754.30 - 11909.600 162224.30 96850.30 - 11909.800 157478.30 94166.30 - 11910.000 162144.30 97186.30 - 11910.200 161880.30 97281.30 - 11910.400 161332.30 97147.30 - 11910.600 160944.30 97186.30 - 11910.800 160306.30 97042.30 - 11911.000 160007.30 97139.30 - 11911.200 159636.30 97269.30 - 11911.400 158791.30 97018.30 - 11911.600 158460.30 97147.30 - 11911.800 157685.30 96954.30 - 11912.000 157242.30 97057.30 - 11912.200 156432.30 96928.30 - 11912.400 155800.30 96958.30 - 11912.600 155128.30 96959.30 - 11912.800 154110.30 96720.30 - 11913.000 152676.30 96281.30 - 11913.200 151147.30 95793.30 - 11913.400 150242.30 95733.30 - 11913.600 149699.30 95929.30 - 11913.800 148801.30 95956.30 - 11914.000 148015.30 96064.30 - 11914.200 147003.30 96027.30 - 11914.400 145801.30 95921.30 - 11914.600 145059.30 96180.30 - 11914.800 144045.30 96370.30 - 11915.000 143797.30 97006.30 - 11915.200 142660.30 97129.30 - 11915.400 141357.30 97153.30 - 11915.600 139822.30 97183.30 - 11915.800 138356.30 97294.30 - 11916.000 136731.30 97382.30 - 11916.200 135012.30 97455.30 - 11916.400 132992.30 97384.30 - 11916.600 130913.30 97452.30 - 11916.800 128737.30 97444.30 - 11917.000 126461.30 97496.30 - 11917.200 123965.30 97454.30 - 11917.400 121561.30 97713.30 - 11917.600 118473.30 97359.30 - 11917.800 115856.30 97600.30 - 11918.000 112879.30 97524.30 - 11918.200 109949.30 97634.30 - 11918.400 106810.30 97730.30 - 11918.600 103701.30 97747.30 - 11918.800 100708.30 97842.30 - 11919.000 97694.30 97975.30 - 11919.200 94594.30 97971.30 - 11919.400 91419.30 97897.30 - 11919.600 88708.30 98085.30 - 11919.800 85874.30 97957.30 - 11920.000 83379.30 98047.30 - 11920.200 81004.30 97984.30 - 11920.400 78626.30 97863.30 - 11920.600 74354.30 94889.30 - 11920.800 75334.30 98465.30 - 11921.000 73775.30 98507.30 - 11921.200 72325.30 98515.30 - 11921.400 70870.30 98366.30 - 11921.600 69785.30 98466.30 - 11921.800 68769.30 98439.30 - 11922.000 67904.30 98476.30 - 11922.200 67085.30 98424.30 - 11922.400 66246.30 98190.30 - 11922.600 65819.30 98482.30 - 11922.800 65261.30 98348.30 - 11923.000 64816.30 98296.30 - 11923.200 64489.30 98346.30 - 11923.400 64111.30 98156.30 - 11923.600 63971.30 98220.30 - 11923.800 63858.30 98344.30 - 11924.000 63795.30 98395.30 - 11924.200 63525.30 98072.30 - 11924.400 63593.30 98221.30 - 11924.600 63447.30 98007.30 - 11924.800 63333.30 97806.30 - 11925.000 63083.30 97451.30 - 11925.200 62906.30 97084.30 - 11925.400 62910.30 97040.30 - 11925.600 63015.30 97179.30 - 11925.800 63029.30 97199.30 - 11926.000 62979.30 97123.30 - 11926.200 63088.30 97329.30 - 11926.400 63013.30 97254.30 - 11926.600 62996.30 97302.30 - 11926.800 63133.30 97638.30 - 11927.000 63180.30 97846.30 - 11927.200 63315.30 98273.30 - 11927.400 63300.30 98522.30 - 11927.600 63103.30 98449.30 - 11927.800 62955.30 98553.30 - 11928.000 62808.30 98700.30 - 11928.200 62573.30 98669.30 - 11928.400 62308.30 98675.30 - 11928.600 62214.30 98935.30 - 11928.800 61857.30 98855.30 - 11929.000 61588.30 98906.30 - 11929.200 61158.30 98759.30 - 11929.400 60867.30 98768.30 - 11929.600 60670.30 98981.30 - 11929.800 60297.30 98887.30 - 11930.000 59957.30 98830.30 - 11930.200 59685.30 98930.30 - 11930.400 59421.30 99080.30 - 11930.600 59088.30 99011.30 - 11930.800 58692.30 98804.30 - 11931.000 58490.30 98953.30 - 11931.200 58259.30 99067.30 - 11931.400 58273.30 99539.30 - 11931.600 57909.30 99331.30 - 11931.800 57673.30 99352.30 - 11932.000 57425.30 99272.30 - 11932.200 57223.30 99251.30 - 11932.400 57090.30 99336.30 - 11932.600 56942.30 99394.30 - 11932.800 56756.30 99282.30 - 11933.000 56588.30 99240.30 - 11933.200 56471.30 99244.30 - 11933.400 56372.30 99265.30 - 11933.600 56269.30 99252.30 - 11933.800 56135.30 99178.30 - 11934.000 56127.30 99261.30 - 11934.200 55979.30 99167.30 - 11934.400 55945.30 99192.30 - 11934.600 55874.30 99167.30 - 11934.800 55859.30 99199.30 - 11935.000 55877.30 99346.30 - 11935.200 55844.30 99344.30 - 11935.400 55804.30 99356.30 - 11935.600 55714.30 99248.30 - 11935.800 55606.30 99151.30 - 11936.000 55598.30 99229.30 - 11936.200 55538.30 99263.30 - 11936.400 55505.30 99354.30 - 11936.600 55399.30 99289.30 - 11936.800 55353.30 99396.30 - 11937.000 55233.30 99345.30 - 11937.200 55077.30 99275.30 - 11937.400 54929.30 99193.30 - 11937.600 54744.30 99086.30 - 11937.800 54724.30 99248.30 - 11938.000 54642.30 99338.30 - 11938.200 54420.30 99137.30 - 11938.400 54403.30 99316.30 - 11938.600 54271.30 99262.30 - 11938.800 54167.30 99250.30 - 11939.000 54100.30 99265.30 - 11939.200 53939.30 99165.30 - 11939.400 53973.30 99427.30 - 11939.600 53789.30 99234.30 - 11939.800 53643.30 99091.30 - 11940.000 53605.30 99218.30 - 11940.200 53470.30 99186.30 - 11940.400 53433.30 99399.30 - 11940.600 53320.30 99451.30 - 11940.800 53246.30 99692.30 - 11941.000 52930.30 99434.30 - 11941.200 52710.30 99450.30 - 11941.400 52366.30 99276.30 - 11941.600 52152.30 99433.30 - 11941.800 51712.30 99161.30 - 11942.000 51426.30 99255.30 - 11942.200 51017.30 99248.30 - 11942.400 50598.30 99169.30 - 11942.600 50194.30 99220.30 - 11942.800 49700.30 99108.30 - 11943.000 49407.30 99426.30 - 11943.200 48913.30 99407.30 - 11943.400 48407.30 99260.30 - 11943.600 47958.30 99305.30 - 11943.800 47550.30 99388.30 - 11944.000 47062.30 99394.30 - 11944.200 46568.30 99203.30 - 11944.400 46294.30 99469.30 - 11944.600 45965.30 99584.30 - 11944.800 45553.30 99431.30 - 11945.000 45256.30 99455.30 - 11945.200 45053.30 99625.30 - 11945.400 44780.30 99529.30 - 11945.600 44509.30 99377.30 - 11945.800 44425.30 99535.30 - 11946.000 44397.30 99737.30 - 11946.200 44187.30 99414.30 - 11946.400 44261.30 99615.30 - 11946.600 44224.30 99485.30 - 11946.800 44240.30 99414.30 - 11947.000 44334.30 99390.30 - 11947.200 44490.30 99470.30 - 11947.400 44756.30 99662.30 - 11947.600 44884.30 99506.30 - 11947.800 45092.30 99544.30 - 11948.000 45388.30 99636.30 - 11948.200 45646.30 99661.30 - 11948.400 45906.30 99648.30 - 11948.600 46175.30 99652.30 - 11948.800 46522.30 99788.30 - 11949.000 46771.30 99710.30 - 11950.082 48220.30 99644.30 - 11951.184 49325.30 99650.30 - 11952.306 49902.30 99766.30 - 11953.447 50100.30 99792.30 - 11954.607 50323.30 99844.30 - 11955.787 50698.30 99867.30 - 11956.985 51076.30 99742.30 - 11958.203 51242.30 99754.30 - 11959.440 51046.30 99867.30 - 11960.696 50404.30 99897.30 - 11961.972 49534.30 100058.30 - 11963.266 48428.30 99989.30 - 11964.580 47398.30 100132.30 - 11965.914 46394.30 100207.30 - 11967.266 45614.30 100300.30 - 11968.637 45081.30 100187.30 - 11970.028 45047.30 100195.30 - 11971.438 45493.30 100273.30 - 11972.867 46026.30 100089.30 - 11974.316 46626.30 100107.30 - 11975.783 47167.30 100096.30 - 11977.270 46348.30 97436.30 - 11978.776 48185.30 100369.30 - 11980.302 48480.30 100293.30 - 11981.846 48739.30 100284.30 - 11983.410 49001.30 100278.30 - 11984.993 49402.30 100299.30 - 11986.595 49830.30 100121.30 - 11988.216 50265.30 99914.30 - 11989.857 50654.30 99771.30 - 11991.517 50805.30 99686.30 - 11993.196 50845.30 99819.30 - 11994.894 50618.30 99601.30 - 11996.611 50298.30 99406.30 - 11998.348 49990.30 99535.30 - 12000.104 49513.30 99602.30 - 12001.879 48927.30 99625.30 - 12003.673 48264.30 99431.30 - 12005.487 47701.30 99171.30 - 12007.319 47392.30 99072.30 - 12009.171 47446.30 99236.30 - 12011.042 47505.30 99046.30 - 12012.933 47593.30 98683.30 - 12014.842 47767.30 98499.30 - 12016.771 47798.30 98082.30 - 12018.719 47955.30 97923.30 - 12020.686 48009.30 97771.30 - 12022.673 47879.30 97337.30 - 12024.679 47925.30 97421.30 - 12026.703 47864.30 97334.30 - 12028.748 47773.30 97122.30 - 12030.811 47801.30 97121.30 - 12032.893 47716.30 96686.30 - 12034.995 47552.30 95982.30 - 12037.116 47800.30 95926.30 - 12039.256 48258.30 96345.30 - 12041.416 48719.30 96665.30 - 12043.594 49172.30 97062.30 - 12045.792 49123.30 96571.30 - 12048.009 47887.30 93892.30 - 12050.245 48769.30 95631.30 - 12052.501 48891.30 96112.30 - 12054.775 48941.30 96537.30 - 12057.069 48285.30 95647.30 - 12059.382 48680.30 96850.30 - 12061.715 48157.30 96122.30 - 12064.066 48664.30 97447.30 - 12066.437 49290.30 98976.30 - 12068.827 49339.30 99271.30 - 12071.236 49291.30 99333.30 - 12073.665 49145.30 99066.30 - 12076.112 49297.30 99425.30 - 12078.579 49334.30 99440.30 - 12081.065 49431.30 99482.30 - 12083.570 49386.30 99393.30 - 12086.095 49133.30 98933.30 - 12088.639 49264.30 99318.30 - 12091.201 49104.30 99099.30 - 12093.784 49144.30 99153.30 - 12096.385 49369.30 99386.30 - 12099.006 49562.30 99306.30 - 12101.645 49838.30 99184.30 - 12104.304 50041.30 98881.30 - 12106.982 50209.30 98610.30 - 12109.680 50407.30 98663.30 - 12112.397 49096.30 95888.30 - 12115.132 50754.30 98930.30 - 12117.887 50936.30 99204.30 - 12120.662 50979.30 99250.30 - 12123.455 50810.30 98957.30 - 12126.268 50588.30 98588.30 - 12129.100 50720.30 99070.30 - 12131.951 50443.30 98829.30 - 12134.821 50197.30 98771.30 - 12137.711 49926.30 98649.30 - 12140.620 49605.30 98472.30 - 12143.548 49451.30 98613.30 - 12146.495 49578.30 99192.30 - 12149.461 49553.30 99320.30 - 12152.447 49608.30 99312.30 - 12155.452 49822.30 99456.30 - 12158.476 50111.30 99564.30 - 12161.519 50156.30 99091.30 - 12164.582 50528.30 99177.30 - 12167.664 50845.30 99121.30 - 12170.764 51182.30 99132.30 - 12173.885 51488.30 99227.30 - 12177.024 51465.30 98970.30 - 12180.183 51085.30 98169.30 - 12183.360 51176.30 98424.30 - 12186.557 51354.30 98885.30 - 12189.774 51266.30 98694.30 - 12193.009 51220.30 98513.30 - 12196.264 51063.30 97998.30 - 12199.538 51097.30 97980.30 - 12202.831 50885.30 97605.30 - 12206.143 50401.30 96817.30 - 12209.475 50063.30 96401.30 - 12212.825 50148.30 96836.30 - 12216.195 49852.30 96484.30 - 12219.584 49329.30 95668.30 - 12222.993 49239.30 95584.30 - 12226.420 48648.30 94364.30 - 12229.867 48744.30 94337.30 - 12233.333 48387.30 93244.30 - 12236.819 48116.30 92242.30 - 12240.323 48084.30 91656.30 - 12243.847 47715.30 90478.30 - 12247.390 47072.30 88952.30 - 12250.952 48059.30 90624.30 - 12254.533 47980.30 90397.30 - 12258.134 48351.30 90999.30 - 12261.753 47740.30 89784.30 - 12265.392 47689.30 89635.30 - 12269.050 47865.30 89871.30 - 12272.728 47592.30 89265.30 - 12276.425 50728.30 95035.30 - 12280.140 50896.30 95233.30 - 12283.875 49660.30 92870.30 - 12287.630 50938.30 95321.30 - 12291.403 50704.30 95002.30 - 12295.196 50172.30 94022.30 - 12299.008 50490.30 94634.30 - 12302.839 50307.30 94336.30 - 12306.689 50166.30 93987.30 - 12310.559 50767.30 95003.30 - 12314.448 50461.30 94360.30 - 12318.356 50958.30 95121.30 - 12322.283 51083.30 95079.30 - 12326.229 51563.30 95631.30 - 12330.195 51747.30 95562.30 - 12334.180 51889.30 95447.30 - 12338.184 52244.30 95784.30 - 12342.207 52255.30 95624.30 - 12346.250 52267.30 95488.30 - 12350.311 52239.30 95296.30 - 12354.392 51649.30 94208.30 - 12358.492 51853.30 94543.30 - 12362.612 52039.30 94861.30 - 12366.750 51901.30 94571.30 - 12370.908 51939.30 94648.30 - 12375.085 52867.30 96309.30 - 12379.281 52858.30 96217.30 - 12383.497 52962.30 96294.30 - 12387.731 52866.30 96064.30 - 12391.985 52654.30 95592.30 - 12396.258 52545.30 95277.30 - 12400.551 52544.30 95134.30 - 12404.862 52525.30 94899.30 - 12409.193 52055.30 93855.30 - 12413.543 52035.30 93577.30 - 12417.912 52018.30 93335.30 - 12422.300 51861.30 92828.30 - 12426.708 51718.30 92372.30 - 12431.135 51267.30 91320.30 - 12435.581 51078.30 90751.30 - 12440.046 50535.30 89573.30 - 12444.530 50433.30 89207.30 - 12449.034 50192.30 88638.30 - 12453.557 49410.30 87186.30 - 12458.099 49677.30 87506.30 - 12462.660 48777.30 85851.30 - 12467.241 49880.30 87733.30 - 12471.841 48902.30 85995.30 - 12476.460 48922.30 85886.30 - 12481.098 49436.30 86780.30 - 12485.755 49618.30 86999.30 - 12490.432 49935.30 87488.30 - 12495.128 50654.30 88635.30 - 12499.843 51225.30 89525.30 - 12504.577 52117.30 90950.30 - 12509.330 51386.30 89528.30 - 12514.103 52210.30 90729.30 - 12518.895 50587.30 87685.30 - 12523.706 49137.30 84945.30 - 12528.536 48781.30 84087.30 - 12533.386 50684.30 87214.30 - 12538.255 50932.30 87424.30 - 12543.143 52500.30 89933.30 - 12548.050 52300.30 89448.30 - 12552.976 53180.30 90762.30 - 12557.922 52657.30 89642.30 - 12562.887 52719.30 89570.30 diff --git a/public/xdidata/db.json b/public/xdidata/db.json deleted file mode 100644 index 351a561..0000000 --- a/public/xdidata/db.json +++ /dev/null @@ -1 +0,0 @@ -[{"location": "Au/Au_Foil_L1_rt_2016Foils.xdi", "element": {"symbol": "Au"}, "edge": {"name": "L1"}, "sample": {"name": "Au", "formula": "Au", "prep": "metal foil"}, "comments": " ", "beamline": {"name": "13-ID-E"}, "facility": {"name": "APS"}, "start_time": "2016-07-05 18:29:20"}, {"location": "Au/Au_Foil_L2_rt_2016Foils.xdi", "element": {"symbol": "Au"}, "edge": {"name": "L2"}, "sample": {"name": "Au", "formula": "Au", "prep": "metal foil"}, "comments": " ", "beamline": {"name": "13-ID-E"}, "facility": {"name": "APS"}, "start_time": "2016-07-05 18:20:59"}, {"location": "Au/Au_Foil_L3_rt_2016Foils.xdi", "element": {"symbol": "Au"}, "edge": {"name": "L3"}, "sample": {"name": "Au", "formula": "Au", "prep": "metal foil"}, "comments": " ", "beamline": {"name": "13-ID-E"}, "facility": {"name": "APS"}, "start_time": "2016-07-05 18:10:52"}] \ No newline at end of file diff --git a/scripts/build_database.py b/scripts/build_database.py index 8b2230e..a614408 100644 --- a/scripts/build_database.py +++ b/scripts/build_database.py @@ -67,4 +67,4 @@ def extract_metadata(path, location): with open("./xdidata/data/db.json", 'w') as fh: - fh.write(json.dumps(m)) \ No newline at end of file + fh.write(json.dumps(m,separators=(',', ':'))) \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index d035f3e..f4b8df8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -30,6 +30,8 @@ import StandardViewerMui from "./StandardViewer.tsx"; +import WelcomePage from "./WelcomePage.tsx"; +import Header from "./Header.tsx"; import { CssBaseline } from "@mui/material"; @@ -38,7 +40,9 @@ import { useMediaQuery } from "@mui/material"; import { useState, useMemo } from "react"; import { Stack } from "@mui/material"; import { createTheme, ThemeProvider } from "@mui/material/styles"; -import { MetadataContext, MetadataProvider } from "./MetadataContext.tsx"; +import { MetadataProvider } from "./MetadataContext.tsx"; +import { Routes, Route } from "react-router-dom"; + function App() { const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)"); @@ -68,8 +72,15 @@ function App() { +
- + + } /> + } /> + diff --git a/src/DarkModeIcon.tsx b/src/DarkModeIcon.tsx new file mode 100644 index 0000000..b69773a --- /dev/null +++ b/src/DarkModeIcon.tsx @@ -0,0 +1,17 @@ +import { SvgIcon } from "@mui/material"; + +export default function DarkModeIcon() { + return ( + + + + + + ); +} diff --git a/src/ElementSelector.tsx b/src/ElementSelector.tsx index d2d80d3..80e0153 100644 --- a/src/ElementSelector.tsx +++ b/src/ElementSelector.tsx @@ -39,7 +39,7 @@ function ElementSelector(props: { label="Element" onChange={(e) => props.setSelectedElement(e.target.value)} > - All Elements + All Elements {elements.map((x, y) => ( {x.symbol} @@ -67,10 +67,6 @@ function ElementSelector(props: { > { - if (el >= elements.length) { - el = 0; - } - props.setSelectedElement(el); setAnchorEl(null); }} diff --git a/src/Header.tsx b/src/Header.tsx new file mode 100644 index 0000000..b98fc83 --- /dev/null +++ b/src/Header.tsx @@ -0,0 +1,88 @@ +import AppBar from "@mui/material/AppBar"; +import Toolbar from "@mui/material/Toolbar"; +import Typography from "@mui/material/Typography"; + +import { useContext, useState } from "react"; +import { useNavigate } from "react-router-dom"; + +import ListItemButton from "@mui/material/ListItemButton"; +import ListItem from "@mui/material/ListItem"; +import List from "@mui/material/List"; +import ListItemText from "@mui/material/ListItemText"; +import Stack from "@mui/material/Stack"; +import { Checkbox } from "@mui/material"; + +import { NavLink } from "react-router-dom"; + +import LightModeIcon from "./LightModeIcon"; +import DarkModeIcon from "./DarkModeIcon"; + +// function NavListItem(props: { to: string; label: string }) { +// const to = props.to; +// const label = props.label; +// return ( +// +// theme.palette.text.secondary, +// }, +// }} +// > +// +// +// +// ); +// } + +export default function Header(props: { + colorMode: string; + toggleColorMode: () => void; +}) { + + const navitems = { + Home: "/", + View: "/view", + Terms: "/terms", + }; + + return ( + + + + + XAS Reference Data Viewer + + + {Object.entries(navitems).map(([key, value]) => ( + + theme.palette.text.secondary, + }, + }} + > + + + + ))} + + + + } + checkedIcon={} + checked={props.colorMode === "dark"} + onChange={props.toggleColorMode} + > + + + + ); +} diff --git a/src/LightModeIcon.tsx b/src/LightModeIcon.tsx new file mode 100644 index 0000000..227279e --- /dev/null +++ b/src/LightModeIcon.tsx @@ -0,0 +1,17 @@ +import { SvgIcon } from "@mui/material"; + +export default function LightModeIcon() { + return ( + + + + + + ); +} diff --git a/src/PeriodicTable.tsx b/src/PeriodicTable.tsx index b34d4b3..9cf15e0 100644 --- a/src/PeriodicTable.tsx +++ b/src/PeriodicTable.tsx @@ -63,11 +63,11 @@ function OuterNewElement({ backgroundColor, textColor }: OuterProps) { } function SimplePeriodicTable(props: { - onClickElement: React.Dispatch; + onClickElement: React.Dispatch; elementSize: number; }) { const handleClick: OnClick = (e, element) => { - props.onClickElement(Number(element.Number)); + props.onClickElement(element.Symbol); }; const theme = useTheme(); diff --git a/src/StandardViewer.tsx b/src/StandardViewer.tsx index d925b87..6d27436 100644 --- a/src/StandardViewer.tsx +++ b/src/StandardViewer.tsx @@ -13,7 +13,7 @@ import XDIFile from "./xdifile.ts"; import { MetadataContext } from "./MetadataContext.tsx"; function StandardViewer() { - const [standards, setStandardsList] = useState([]); + // const [standards, setStandardsList] = useState([]); const [xasdata, setXASData] = useState(null); const [showTrans, setShowTrans] = useState(false); @@ -27,7 +27,7 @@ function StandardViewer() { const allElementSymbol = allStandards.map(s => s.element.symbol); const elementsSymbol = [...new Set(allElementSymbol)]; const elements : Element[] = elementsSymbol.map((e) => ({symbol : e})); - const std = allStandards.slice(0,10) + // const { elements } = useContext(MetadataContext); @@ -62,10 +62,10 @@ function StandardViewer() { diff --git a/src/StandardsTable.tsx b/src/StandardsTable.tsx index 7ff8a34..40417dc 100644 --- a/src/StandardsTable.tsx +++ b/src/StandardsTable.tsx @@ -10,70 +10,47 @@ import { Element } from "./models"; import ElementSelector from "./ElementSelector"; import StandardsTableView from "./StandardsTableView"; -const standards_url = "/api/standards"; - const nResults = 7; function StandardsTable(props: { standards: XASStandard[]; elements: Element[]; - setStandards: (standards: XASStandard[]) => void; + // setStandards: (standards: XASStandard[]) => void; updatePlot: (id: string) => void; }): JSX.Element { const [selectedStandard, setSelectedStandard] = useState(); const [selectedElement, setSelectedElement] = useState("all"); - const [current, setCurrent] = useState(null); + const [current, setCurrent] = useState(0); const [prevNext, setPrevNext] = useState(null); - // const setStandards = props.setStandards; - // const elements = props.elements; - // useEffect(() => { - // const get_req = (z: number, cursor: string | null) => { - // let url = standards_url; - - // let symbol = null; - - // if (z > 0 && z <= elements.length) { - // symbol = elements[z - 1].symbol; - // } - // if (symbol != null) { - // url = - // standards_url + "?element=" + symbol + "&size=" + String(nResults); - // } else { - // url = url + "?size=" + String(nResults); - // } + let stds: XASStandard[] = []; - // if (cursor) { - // url = url + "&cursor=" + cursor; - // } + console.log(selectedElement) - // axios.get(url).then((response) => { - // const output: XASStandard[] = response.data.items as XASStandard[]; - // setPrevNext([response.data.previous_page, response.data.next_page]); - // setStandards(output); - // }); - // }; - // get_req(selectedElement, current); - // }, [selectedElement, current, setStandards, elements]); - - const stds: (XASStandard | null)[] = [null]; + if (selectedElement != "all") { + stds = props.standards.filter((s) => (s.element.symbol == selectedElement)) + } else { + stds = props.standards + } if (stds.length < nResults) { while (stds.length < nResults) { stds.push(null); } + } else { + stds = stds.slice(current,current+7) } return ( - {/* */} + /> + + Welcome to the XAS Reference Data Viewer! + + + + The XAS Standards Database is a collection of XAS data from careful + measurement "standard" materials - think pure chemicals purchased from + suppliers or well characterised mineral samples. + + + The database is open to search and download + data from. + + + + ); +} + +export default WelcomePage; diff --git a/src/main.tsx b/src/main.tsx index 6f4ac9b..8d7b4c5 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,10 +1,13 @@ import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' import App from './App.tsx' +import { BrowserRouter } from 'react-router-dom' import './index.css' createRoot(document.getElementById('root')!).render( + + , )