8000 EM refactoring / EMv2 by mkuehbach · Pull Request #193 · FAIRmat-NFDI/pynxtools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

EM refactoring / EMv2 #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 85 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
52c2c51
Starting a refactoring of EM parsers using the refactored EM appdef a…
Aug 15, 2023
1638344
Using also the forwarded converter NXDL files from the base_class_tem…
Aug 15, 2023
39d6a19
Workpackage
Aug 15, 2023
79709b3
Store initial work that it does not get lost but this is not even a d…
Aug 16, 2023
71371c7
dataconverter, added and tested successfully an option to append to a…
Aug 17, 2023
e1bb68b
Added control logic to instruct the dataconverter to create the outpu…
Aug 17, 2023
6ddf56e
Implemented nxs_mtex subparser, default plot annotator, and NeXus roo…
Aug 18, 2023
5dd2c66
Updated nxdefs to use latest refactored NXem appdef
Aug 18, 2023
be663d2
Added logic and code for annotating original references and atom_type…
Aug 18, 2023
d20e49e
Returning an intermediate result for now, but the verification with f…
Aug 18, 2023
d5ae63f
Prepped HDF5 parsing using subparsers
Oct 19, 2023
9c708da
Refactoring and implementation for normalization oxford, bruker, apex…
Oct 22, 2023
4076096
Bug fixing, implementation for normalization old edax, community hebs…
Oct 23, 2023
f947f9d
Implemented xmap mapping, runthrough tests with all datasets in HDF5 …
Oct 23, 2023
ba45b67
Implemented phase-specific plots, bugfixing
Oct 24, 2023
fea7842
Runthrough with all HDF5 examples from the community was successful b…
Oct 24, 2023
0a2307f
Bugfix proper reading and handling of scan positions into calibrated …
Oct 25, 2023
1459b8c
Added EBSD map downsampling and bugfixing of non working AM example, …
Oct 26, 2023
acf860d
Designed logic to probe if DREAM3D instance has relevant data to be m…
Nov 7, 2023
e16d8ea
Tested auto-detection of relevant group to harvest 3D EBSD data from …
Nov 7, 2023
08a001a
Parsing of content from three different DREAM3D cases working, ROI co…
Nov 8, 2023
0c118b5
Fixed ROI overview for all examples, resolved successfully now, IPF n…
Nov 9, 2023
5be172a
DREAM3D to pyxem phase id management, 4d to 2d array reshaping to byp…
Nov 9, 2023
8e1af84
Implemented IPF color mapping without using an xmap but there is stil…
Nov 9, 2023
33688c1
3D EBSD working
Nov 9, 2023
dcb0cec
Potentially breaking refactoring from the train-ride back from the FA…
Dec 4, 2023
96fb1c4
Update definitions to use fairmat 615ff37 which contains the merged i…
Dec 4, 2023
7e1cfd9
Manual merging in of fairmat 8620c4e into the em_refactoring branch t…
Dec 4, 2023
460e49e
Revert nxdefs to 9998376
Dec 4, 2023
abc99b6
Removed nyaml2nxdl and related tools and test to manually sync with p…
Dec 4, 2023
58ca8ca
Merged fairmat in
Dec 4, 2023
8540700
Rename nxs_hfive parser to signify that the difference with the nxs_ …
atomprobe-tc Dec 6, 2023
71a6a56
Testing pyxem workflow and the large 3D EBSD dataset which takes abou…
atomprobe-tc Dec 6, 2023
97fcaa1
Started the refactoring to discretize always all point cloud data whi…
atomprobe-tc Dec 6, 2023
19dd554
Fixed bug for 207_2081
atomprobe-tc Dec 7, 2023
23c28d4
Implemented xmap-free twod IPF rendering function tested successfully…
atomprobe-tc Dec 7, 2023
c2ce3a0
Remove code using now obsolete xmap
atomprobe-tc Dec 7, 2023
1824163
Proliferate tiling and phase_id, scan_point consistency for other par…
atomprobe-tc Dec 7, 2023
2090418
Fixed one of two failing tests, mpes test still fails, pycodestyling
atomprobe-tc Dec 7, 2023
ff5cfa0
pylinting, mypy, removal of unnecessary imports
atomprobe-tc Dec 7, 2023
6cde0e9
Passing pycodestyle, pylinting, mypy now locally using py3.10.13 conda
atomprobe-tc Dec 7, 2023
013c59c
Successful run-through of all pyxem-processed examples (2D/3D) none o…
atomprobe-tc Dec 7, 2023
cb17fde
Manual rebase against master 0c69581b014d0ef7a65e54e9cc8a2e25916c26c8…
atomprobe-tc Dec 7, 2023
f949e3b
Initial steps generic reader for images (TIF) to start with for IKZ (…
atomprobe-tc Dec 7, 2023
00f4556
Decode tech partner magic
atomprobe-tc Dec 8, 2023
020dea0
Added working skeleton code for the TFS-specific TIFF parser, which f…
atomprobe-tc Dec 8, 2023
981e3c2
Added initial version for the configuration, i.e. concept mapping tab…
atomprobe-tc Dec 11, 2023
df72956
image_tiff_tfs: generalized logic to read in all TFS/FEI metadata
atomprobe-tc Dec 11, 2023
345d8e1
Fixed error in floating point value interpretation logic, added writi…
atomprobe-tc Dec 11, 2023
99d55ba
Made also now the mapping of TFS vocabulary to NeXus work, awaiting n…
atomprobe-tc Dec 11, 2023
5aa9977
linting, styling, mypying
atomprobe-tc Dec 11, 2023
49fb0a3
Added rosettasciio, added skeleton for refactoring EDS, EELS, ADF usi…
atomprobe-tc Dec 13, 2023
2ae1cb2
Added prioritization level 1 and 2 quantities for all five imaging mo…
atomprobe-tc Dec 14, 2023
76d25fe
Added code to read EDAX's FOVIMAGE their cumbersome SPD from APEX fil…
atomprobe-tc Dec 15, 2023
d471f03
Added skeleton for collection of image files from the Reduction of Fe…
atomprobe-tc Dec 18, 2023
eccccb5
Add xmltodict to flatten xml to Python dictionaries
atomprobe-tc Dec 18, 2023
a065978
Not yet finished code to read metadata but includes already working n…
atomprobe-tc Dec 18, 2023
97c7f8a
Fixed bug, refactored get_metadata, added and tested successfully has…
atomprobe-tc Dec 19, 2023
4c113ca
Removed deprecated zipfile37 in all remaining places using zipfile in…
atomprobe-tc Dec 19, 2023
9d3b8e7
Working parsing and mapping of some Protochips/AXONStudio metadata on…
atomprobe-tc Dec 19, 2023
a729d1f
Functionally working version of the collection-of-PNG-files from Prot…
atomprobe-tc Dec 19, 2023
d1ecede
Started refactoring of the em_nion parser to the so that zip-compress…
atomprobe-tc Dec 19, 2023
0ec6243
Pylinting, styling, myping
atomprobe-tc Dec 19, 2023
5ea8824
Found possible metadata quantity to decipher used nionswift version f…
atomprobe-tc Dec 20, 2023
7f9cf4e
Fixed and confirmed that HdfFiveBaseParser can be used to analyze str…
atomprobe-tc Jan 5, 2024
f28abcf
Continuing on the spctrscpy examples, local dev directory tidied up
atomprobe-tc Jan 11, 2024
69e738f
Further tidying up
atomprobe-tc Jan 11, 2024
ad768bc
Reorganize location of tests, etc.
atomprobe-tc Jan 11, 2024
518a706
Reading and normalizing FOV, SPC, SPD, and LSD, next steps: i) add e…
atomprobe-tc Jan 12, 2024
baa02a6
Added other relevant conceptual groups from the three APEX examples s…
atomprobe-tc Jan 12, 2024
bd4edec
Added xraydb to get all X-ray emission lines
atomprobe-tc Jan 12, 2024
712e384
Tested parsing on IKZ and PDI examples
atomprobe-tc Jan 13, 2024
bc2dc04
Started writing of normalized content to template, fov and h5web, and…
atomprobe-tc Jan 15, 2024
4ae24cc
Added plotting of spectrum
atomprobe-tc Jan 15, 2024
458e129
Added simple id management for objects written to HDF5, bugfixes for …
atomprobe-tc Jan 15, 2024
bfcd666
Fixed VInP reading and 2D EDS element maps showing up now, started im…
atomprobe-tc Jan 16, 2024
1b2bd49
Styling, linting, mypy
atomprobe-tc Jan 16, 2024
fb0a996
Minor edit batch files
atomprobe-tc Jan 16, 2024
4a9de81
Edit to make version a child of definitions
atomprobe-tc Jan 17, 2024
3892c70
Added first version of a imaging mode case distinction logic, tested …
atomprobe-tc Jan 17, 2024
020225d
Added eds_map tested FHI Rohner emd file
atomprobe-tc Jan 17, 2024
1948a47
Added support for y, x, energy, and energy EDS spectra, all content f…
atomprobe-tc Jan 18, 2024
c185901
Added i) schema version, started ii) mapping table for microscope met…
atomprobe-tc Jan 18, 2024
1bd6c59
A working version for parsing some of the Velox/FEI metadata and map …
atomprobe-tc Jan 19, 2024
84b473d
Hooked in the correct NeXus definitions branch to use for the em_refa…
atomprobe-tc Jan 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,10 @@ cython_debug/
build/
nexusparser.egg-info/PKG-INFO
.python-version

# em-reader-specific custom settings
*.h5
*.oh5
*.edaxh5
*.h5oina
*.nxs
83 changes: 83 additions & 0 deletions debug/apex.dev.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "f39f5e57-4926-4ccd-b187-9c1aba568a95",
"metadata": {},
"outputs": [],
"source": [
"from pynxtools.dataconverter.readers.em.subparsers.hfive_base import HdfFiveBaseParser\n",
"from jupyterlab_h5web import H5Web\n",
"! which python"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f1617083-f6ab-4bad-ad6d-aaa6beffec89",
"metadata": {},
"outputs": [],
"source": [
"# fpath = f\"/home/kaiobach/Research/paper_paper_paper/scidat_nomad_ebsd/bb_analysis/\" \\\n",
"# f\"data/development_spctrscpy/pdi/APEX-single-spectrum/InGaN_nanowires_spectra.edaxh5\"\n",
"fpath = f\"/home/kaiobach/Research/paper_paper_paper/scidat_nomad_ebsd/bb_analysis/\" \\\n",
" f\"data/development_spctrscpy/ikz/GeSn_13.nxs\"\n",
"H5Web(fpath)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a7191dce-db83-4252-bfe3-ffc36efb5e71",
"metadata": {},
"outputs": [],
"source": [
"hdf = HdfFiveBaseParser(file_path=fpath)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "944c0809-4ec6-406a-be61-1dd56dcf6d00",
"metadata": {},
"outputs": [],
"source": [
"hdf.get_content()\n",
"hdf.report_content()\n",
"hdf.store_report(store_instances=True,\n",
" store_instances_templatized=True,\n",
" store_templates=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ac77fbda-ae54-4c1d-9441-e4d771605052",
"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.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
12 changes: 12 additions & 0 deletions debug/axon.batch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

datasource="../../../../paper_paper_paper/scidat_nomad_ebsd/bb_analysis/data/development_axon/axon/"

# comments is detector mode
examples="axon/20210426T224437.049Raw0.png" #axon
examples="ReductionOfFeOx.zip" # Small.zip"

for example in $examples; do
echo $example
dataconverter --reader em --nxdl NXroot --input-file $datasource$example --output debug.$example.nxs 1>stdout.$example.nxs.txt 2>stderr.$example.nxs.txt
done
74 changes: 74 additions & 0 deletions debug/concept_mapper.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "4f240b8f-71d4-4004-ab56-d7480b44d96e",
"metadata": {},
"source": [
"# Generate Python list of tuple with concept mapping to be used for the configuration of tech-partner-specific subparsers."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "869670b4-0780-4bf4-bc08-d802288fa5df",
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"fnm = \"image_tiff_tfs_to_nexus.ods\"\n",
"fnm = \"image_png_protochips_to_nexus.ods\"\n",
"\n",
"ods = pd.read_excel(fnm, engine=\"odf\")\n",
"ods = ods.fillna(\"\")\n",
"# print(ods)\n",
"cfg = []\n",
"for row_idx in np.arange(1, ods.shape[0]):\n",
" nxpath = ods.iloc[row_idx, 0]\n",
" functor = ods.iloc[row_idx, 1]\n",
" if nxpath != \"\" and ods.iloc[row_idx, 4] != \"\": # not in [\"IGNORE\", \"UNCLEAR\"]:\n",
" if functor != \"fun\":\n",
" cfg.append((f\"{nxpath}\", f\"{ods.iloc[row_idx, 4]}\"))\n",
" else:\n",
" cfg.append((f\"{nxpath}\", f\"{ods.iloc[row_idx, 2]}\", ods.iloc[row_idx, 4])) # not fstring because can be a list!\n",
"\n",
"indent = \" \"\n",
"for entry in cfg:\n",
" print(f\"{indent}{entry},\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f27812fa-d023-4ed6-a5ee-d417a8705828",
"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.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
21 changes: 21 additions & 0 deletions debug/imgs.batch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

datasource="../../../../paper_paper_paper/scidat_nomad_ebsd/bb_analysis/data/development_imgs/ikz_robert/"

# comments is detector mode

# Reetu some SEM
# examples="kit/FeMoOx_AntiA_04_1k5x_CN.tif"

# IKZ SEM TFS Apreo for all imaging modes
# examples="ikz_robert/0c8nA_3deg_003_AplusB_test.tif" # T1
# examples="ikz_martin/ALN_baoh_021.tif" # T2
# examples="ikz_robert/T3_image.tif" # T3
# examples="ikz_robert/ETD_image.tif" # ETD
# examples="ikz_martin/NavCam_normal_vis_light_ccd.tif" # NavCam
examples="0c8nA_3deg_003_AplusB_test.tif ALN_baoh_021.tif T3_image.tif ETD_image.tif NavCam_normal_vis_light_ccd.tif"

for example in $examples; do
echo $example
dataconverter --reader em --nxdl NXroot --input-file $datasource$example --output debug.$example.nxs 1>stdout.$example.nxs.txt 2>stderr.$example.nxs.txt
done
Loading
0