Commit Graph

63 Commits

Author SHA256 Message Date
fc150be724 main now turns content of realtime window analysis into nx dataset
the data is not parsed or analysed, it's written as text (well, tsv
technically) - this is only for testing and first attempts
2026-03-11 15:01:04 +01:00
aa3bf531f9 adds example realtime windows analysis 2026-03-11 15:00:15 +01:00
3f97ccee25 removes functions.py 2026-02-17 16:20:08 +01:00
3ae6b86b8e more elegant solution for deduplicating instruments
also edits help for deduplicate_instruments... to better explain what it
does; also fixes small typo ('default=' instead of 'default ='), row 448
2026-02-17 16:15:17 +01:00
d83873c763 raises IndexError if no laser, rheed sys. or chamber is ever specified
i.e. if one or more of these fields aren't specified thru all layers
2026-02-17 14:54:33 +01:00
de401b5474 adds instruments metadata to h5 file 2026-02-17 14:39:04 +01:00
fde2615107 changes method of instrument list deduplication
picks first occurrence in every set (ded_lasers, ded_chambers,
ded_rheeds) and eventually warns user if duplicates exist
2026-02-17 14:37:35 +01:00
59e173c54f adds rastering and annealing metadata incl. UoM's 2026-02-16 19:40:23 +01:00
712cbc4788 cleans code 2026-02-16 19:40:09 +01:00
207d166227 adds most of the required metadata to function build_nexus_file
the file is generated into the "output" folder w/ .h5 extension
the most has been done already (probably)
2026-02-16 15:43:07 +01:00
74b8c9cfae extends pld_fabrication dictionary with UoM's
now keys with numeric values are sub-dictionaries with a "value" and a
"units" key - unitS not unit to comply directly with NeXus format, which
turned out to be a good idea to avoid confusion since eLabFTW uses the
word "units" for the list of accepted units and "unit" for the selected
one...

NOTE: UoM = Unit of Measurement
2026-02-16 15:39:32 +01:00
1b1834d4e6 some attributes don't default to NoneType anymore
Target.description defaults to "" (empty str)
Substrate.thickness defaults to "" (empty str)
Substrate.thickness_unit is now hardcoded to "μm"
did you know? apparently h5py does NOT like null values
2026-02-16 15:35:22 +01:00
dfd3c07d2f ignores h5 and nxs files 2026-02-16 11:50:44 +01:00
d094a60725 replaces elabid with sample name in the names of output files 2026-02-16 11:49:48 +01:00
41ff025098 adds units of measurement (UoM) in Material class and children 2026-02-16 11:30:08 +01:00
ca2cdbfded adds units of measurement in Layer class
plus moves around fullname/operator, created_at and description/body so
that operator is required while the others aren't
2026-02-16 11:28:17 +01:00
b4d7373933 starts working on nexus file creation 2026-02-13 16:23:42 +01:00
2f4985c443 adds h5py to requirements 2026-02-13 16:23:24 +01:00
0a879cbfe9 removes debug line, writes json to file instead (path: output/) 2026-02-13 11:49:59 +01:00
f60b58f2f2 ignores output of main.py (output/*.json) 2026-02-13 11:49:13 +01:00
6f618b2340 adds comments 2026-02-13 01:05:32 +01:00
38940995b5 completes the dataset with instruments_used (in a way...)
only lacks units of measurement, then I'll be ready for conversion
2026-02-13 00:59:22 +01:00
f686ea65b1 adds get_instruments method to Layer class
get_instruments returns a dictionary with the names of every system used
during the deposition
unfortunately, NeXus standard allows for a single value of all three
keys per every sample - not every layer
this means that every layer has its own data for laser, rheed system and
depo chamber which IDEALLY is the same for every layer, but in practice
they COULD be different and I still don't know how to deal with this
2026-02-13 00:32:31 +01:00
23bfdefd30 adds all the remaining layer data
only lacks the instrument_used data and units of measurement
NOTE: units of measurement are hard to collect, but could be assumed
considering our instruments are standard
2026-02-13 00:18:07 +01:00
38d281543e code cleanup: deletes debug lines from main.py 2026-02-13 00:07:39 +01:00
a12506b8be MAJOR: main.py successfully produces JSON following NeXus-schema
takes API key and elabid of the "entrypoint" sample as input
returns indented JSON with the reconstructed dataset!
currently lacks instruments_used data (matter of minutes)
and all the layer data (already present in Layer-class objects)
2026-02-13 00:01:24 +01:00
43cfd788f3 adds non-req. attr. "description" to class Target 2026-02-12 23:53:21 +01:00
da42de5466 handles error 400 bad request with exit message 2026-02-12 23:52:37 +01:00
d86b35a5fe integrates sub-classes Target and Substrate in main.py 2026-02-12 16:01:10 +01:00
c4903a536b [untested] creates child classes of Material for Substrates and Targets 2026-02-12 15:53:44 +01:00
3e85940eb6 adds chained request from layer to pld target 2026-02-12 15:24:01 +01:00
820337c06e fixes category title for materials: "Substrate", not "Substrate batch"
"Substrate" is the title of the category of substrate items
"Substrate batch" is a key in a sample's dictionary
2026-02-12 15:16:35 +01:00
5a605038df fixes small residual from copy-paste in call_material_from_elabid
the fix changes "sample_data" - which was residual from copy-pasting the
call_entrypoint... function and therefore undefined - with
"material_data" which is very well defined in the previous line
2026-02-12 15:09:59 +01:00
fd4c3b718a creates chain functions to expand the dataset from the entrypoint 2026-02-12 14:58:48 +01:00
7b3bff854d adds mock layers of mock sample 26015 for testing purposes 2026-02-12 14:37:50 +01:00
4df8048e55 aligns chained requests test with main.py (Layer class) 2026-02-12 14:37:16 +01:00
97d534c5d1 documents main.py functions 2026-02-12 12:15:25 +01:00
88aacf23c1 aligns chained requests test with main.py (debug mode) 2026-02-12 11:29:40 +01:00
43a898e4e6 adds various main.py functions to call entries from elabid's
also replaces "pass" with "continue" in loops
2026-02-10 16:15:22 +01:00
5725dbfbf8 adds layer progressive number as Layer class attribute 2026-02-10 15:59:13 +01:00
ddd3775112 http error handling in APIHandler method get_entry_from_elabid() 2026-02-10 15:03:47 +01:00
2117f61f36 changes APIHandler attribute "dump" to "header" for clarity 2026-02-10 15:03:33 +01:00
5aa7527cca more use(less,ful) comments 2026-02-10 14:46:57 +01:00
c49aa23aea first attempt to refactor the test code into something more elegant 2026-02-09 17:50:35 +01:00
352a223d95 copies entire Header class in chained_requests test script 2026-02-09 16:53:16 +01:00
1d0bc6668c moves chained_requests in folder tests 2026-02-09 16:50:59 +01:00
46df7a948f completes methods for class Material 2026-02-09 16:27:52 +01:00
03d7811904 fixes Layer temperature and pressure keys (deletes trailing whitespace)
also changes default elabid to newer resource
2026-02-09 15:14:32 +01:00
c5f85b2618 Layer.__init__: ValueError on num.of pulses is fatal, not warning
error message changed accordingly
2026-02-09 15:04:35 +01:00
9dbf523190 huge improvements, read below
* function get_entry_from_elabid moved to the top to be used by classes
* class Layers renamed Layer
* class Layer expanded and completed with all NeXus-needed metadata
* classes improved with "quality" error management
* class Material added, for now it fetches just compound_elabid and
  compund chemical formula (as attribute and method respectively)
* class Material has get_compound() method which needs some commenting
* DEBUG MODE improved to cover all cases: layer, sample, substr. and pld
  target; creates a new shortcut for prompting (read line 147)
* removed herobrine (fuck i'm old aren't i)
2026-02-06 16:56:50 +01:00