Skip to content

Commit

Permalink
Re-enable external links for eiger meta file (DiamondLightSource#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina authored Jun 21, 2024
1 parent ebc13ca commit 210097a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### Fixed
- Numpy2.0 compatibility - stop using deprecated np.string_ alias for fixed-width bytestrings.

- External links to eiger meta file in NXdetector and detectorSpecific groups re-enabled.


## 0.9.3
Expand Down
7 changes: 3 additions & 4 deletions src/nexgen/nxs_utils/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ class UnknownDetectorTypeError(Exception):
"photon_energy": "_dectris/photon_energy",
"software_version": "_dectris/software_version",
"ntrigger": "/_dectris/ntrigger",
# "serial_number": "/_dectris/detector_number",
# "eiger_fw_version": "/_dectris/eiger_fw_version",
# "data_collection_date": "/_dectris/data_collection_date",
"serial_number": "/_dectris/detector_number",
"eiger_fw_version": "/_dectris/eiger_fw_version",
"data_collection_date": "/_dectris/data_collection_date",
}
# TODO see https://github.com/DiamondLightSource/nexgen/issues/236

TRISTAN_CONST = {
"flatfield": "Tristan10M_flat_field_coeff_with_Mo_17.479keV.h5",
Expand Down
5 changes: 1 addition & 4 deletions src/nexgen/nxs_write/nxclass_writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,6 @@ def write_NXdetector(
]:
# NOTE: Software version, eiger_fw_version ntrigger & date should
# go in detectorSpecific (NXcollection)
# TODO re-enable eiger_fw_version, date & serial_number
# see https://github.com/DiamondLightSource/nexgen/issues/236
continue
nxdetector[k] = h5py.ExternalLink(meta_link, v)
else:
Expand Down Expand Up @@ -751,8 +749,7 @@ def write_NXcollection(
data=np.bytes_(detector_params.constants["software_version"]),
)
if "EIGER" in detector_params.description.upper() and meta:
for field in ["ntrigger"]: # "data_collection_date", "eiger_fw_version"]
# TODO See https://github.com/DiamondLightSource/nexgen/issues/236
for field in ["ntrigger", "data_collection_date", "eiger_fw_version"]:
grp[field] = h5py.ExternalLink(meta.name, detector_params.constants[field])
elif "TRISTAN" in detector_params.description.upper():
tick = ureg.Quantity(detector_params.constants["detector_tick"])
Expand Down

0 comments on commit 210097a

Please sign in to comment.