Closed prjemian closed 4 years ago
With .h5
extension per #354, right? And with additional metadata per #355, #356, right?
Yes, with all changes if possible.
@jilavsky -- Here is everything but the SPEC_data_file
:
# directory: /share1/USAXS_data/2020-06
-rw-rw-r-- 1 usaxs usaxs 2.3M Jul 24 23:46 20200610-135050-S00049-uascan-78b4801.h5
-rw-rw-r-- 1 usaxs usaxs 2.3M Jul 24 23:50 20200618-105527-S00029-uascan-355d8b5.h5
-rw-rw-r-- 1 usaxs usaxs 2.3M Jul 24 23:50 20200618-121245-S00020-uascan-e904886.h5
Here's how the files were regenerated:
bash $ blueskyUSAXS
# ... startup ...
from instrument.callbacks.nxwriter_usaxs import NXWriterUascan
my_writer = NXWriterUascan()
run= db["78b4801c"]
replay(run, callback=my_writer.receiver)
run = db["355d8b5"]
replay(run, callback=my_writer.receiver)
run = db["e904886"]
replay(run, callback=my_writer.receiver)
I am unable to find new metadata there. Can you provide locations?
To get new metadata, don't we need to collect it? The NX writer works on info it gets from the databroker.
On Sat, Jul 25, 2020, 9:05 PM Jan Ilavsky notifications@github.com wrote:
Reopened #357 https://github.com/APS-USAXS/ipython-usaxs/issues/357.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/APS-USAXS/ipython-usaxs/issues/357#event-3586706107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMHJ43RYKAD6DWZXW7LR5OFQNANCNFSM4OR5FPEA .
If I understand, you found the new ,h5 files but did not find the metadata in them, right?
On Sat, Jul 25, 2020, 10:08 PM Pete Jemian prjemian@gmail.com wrote:
To get new metadata, don't we need to collect it? The NX writer works on info it gets from the databroker.
On Sat, Jul 25, 2020, 9:05 PM Jan Ilavsky notifications@github.com wrote:
Reopened #357 https://github.com/APS-USAXS/ipython-usaxs/issues/357.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/APS-USAXS/ipython-usaxs/issues/357#event-3586706107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMHJ43RYKAD6DWZXW7LR5OFQNANCNFSM4OR5FPEA .
revision on how the files were regenerated:
bash $ blueskyUSAXS
# ... startup ...
from instrument.callbacks.nxwriter_usaxs import NXWriterUascan
my_writer = NXWriterUascan()
for uid in "78b4801c 355d8b5 e904886".split():
replay(db[uid], callback=my_writer.receiver)
Here's a check of the new content:
import pyRestTable, h5py
addresses = []
addresses.append("/entry/SPEC_data_file")
addresses.append("/entry/program_name")
addresses.append("/entry/sample/name")
addresses.append("/entry/sample/thickness")
files = []
files.append("20200610-135050-S00049-uascan-78b4801.h5")
files.append("20200618-105527-S00029-uascan-355d8b5.h5")
files.append("20200618-121245-S00020-uascan-e904886.h5")
table = pyRestTable.Table()
table.labels = "file address value".split()
for fname in files:
with h5py.File(fname, "r") as nx:
for addr in addresses:
table.addRow((fname, addr, nx[addr][()]))
print(table)
Here is the output:
======================================== ======================= ============================
file address value
======================================== ======================= ============================
20200610-135050-S00049-uascan-78b4801.h5 /entry/SPEC_data_file b'06_10_StepScans.dat'
20200610-135050-S00049-uascan-78b4801.h5 /entry/program_name bluesky
20200610-135050-S00049-uascan-78b4801.h5 /entry/sample/name b'Blank'
20200610-135050-S00049-uascan-78b4801.h5 /entry/sample/thickness 1.0
20200618-105527-S00029-uascan-355d8b5.h5 /entry/SPEC_data_file b'06_18_test.dat'
20200618-105527-S00029-uascan-355d8b5.h5 /entry/program_name bluesky
20200618-105527-S00029-uascan-355d8b5.h5 /entry/sample/name b'AirBlank-Step'
20200618-105527-S00029-uascan-355d8b5.h5 /entry/sample/thickness 0.0
20200618-121245-S00020-uascan-e904886.h5 /entry/SPEC_data_file b'06_18_testAutoCollect.dat'
20200618-121245-S00020-uascan-e904886.h5 /entry/program_name bluesky
20200618-121245-S00020-uascan-e904886.h5 /entry/sample/name b'GlassyCarbonM5-Step'
20200618-121245-S00020-uascan-e904886.h5 /entry/sample/thickness 1.0
======================================== ======================= ============================
Files re-generated now. Confirm you find the content.
tree structure of 20200610-135050-S00049-uascan-78b4801.h5
(all 2,493 lines of it)
Let's check with a new data collection tomorrow and identify if anything is missing.
Collecting new data now ... Look at scan_id 27 or 29
from instrument.callbacks.nxwriter_usaxs import NXWriterUascan
my_writer = NXWriterUascan()
uids = "b034490 e44696d".split()
for uid in uids:
replay(db[uid], my_writer.receiver)
We found the content we expected.
As noted in #352:
should be enough.