Skip to content

Commit c186dc6

Browse files
author
eir17846
committed
first
1 parent fe41594 commit c186dc6

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

IIDCalibrationTable.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#I09 Hard X-ray ID calibration parameters, created 18 July 2012
2+
ScannableNames n Ee Br Epmin Epmax Gmin Gmax Goffset
3+
ScannableUnits ONE GeV T KeV Kev mm mm
4+
1 3.00089 0.98928 2.12 3.05 14.2650 23.7200 0.0
5+
2 3.04129 1.02504 2.50 2.80 5.05165 8.88007 0.0
6+
3 3.05798 1.03065 2.40 4.30 5.20000 8.99036 0.0
7+
4 3.03635 1.02332 3.20 5.70 5.26183 8.99640 0.0
8+
5 3.06334 1.03294 4.00 7.20 5.22735 9.02065 0.0
9+
6 3.04963 1.02913 4.70 8.60 5.13939 9.02527 0.0
10+
7 3.06515 1.03339 5.50 10.1 5.12684 9.02602 0.0
11+
8 3.05775 1.03223 6.30 11.5 5.16289 9.02873 0.0
12+
9 3.06829 1.03468 7.10 13.0 5.16357 9.03049 0.0
13+
10 3.06164 1.03328 7.90 14.4 5.17205 9.02845 0.0
14+
11 3.07056 1.03557 8.60 15.9 5.11350 9.04750 0.0
15+
12 3.06627 1.03482 9.40 17.3 5.12051 9.02826 0.0
16+
13 3.07176 1.03623 10.2 18.3 5.13027 8.84940 0.0
17+
14 3.06964 1.03587 11.0 18.3 5.13985 8.30146 0.0
18+
15 3.06515 1.03391 11.8 18.3 5.14643 7.82380 0.0
19+
16 3.08317 1.04191 12.6 18.3 5.15437 7.39118 0.0
20+
17 3.08294 1.04240 13.4 18.3 5.15906 7.00038 0.0
21+
18 3.09725 1.04819 14.2 18.3 5.16369 6.64312 0.0
22+
19 3.09824 1.04921 15.0 18.3 5.16749 6.31454 0.0
23+
20 3.11042 1.05404 15.7 18.3 5.13513 6.00821 0.0
24+
21 3.11112 1.05472 16.5 18.3 5.13986 5.72405 0.0
25+
22 3.11920 1.05799 17.3 18.3 5.14342 5.45745 0.0
26+
23 3.10218 1.05042 18.1 18.3 5.14564 5.20688 0.0

src/daq_config_server/models/converters/_file_converter_map.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@
4040
"/dls_sw/i03/software/daq_configuration/lookup/BeamLineEnergy_DCM_Pitch_converter.txt": beamline_pitch_lut, # noqa
4141
"/dls_sw/i03/software/daq_configuration/lookup/BeamLineEnergy_DCM_Roll_converter.txt": beamline_roll_lut, # noqa
4242
"/dls_sw/i03/software/daq_configuration/lookup/BeamLine_Undulator_toGap.txt": undulator_energy_gap_lut, # noqa
43+
"IIDCalibrationTable.txt": undulator_energy_gap_lut, # noga
4344
}

src/daq_config_server/models/converters/convert.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def get_converted_file_contents(file_path: Path) -> dict[str, Any]:
1414
if converter := file_converter_map.FILE_TO_CONVERTER_MAP.get(str(file_path)):
1515
try:
1616
contents = converter(raw_contents)
17+
raise TypeError(contents)
1718
if isinstance(contents, ConfigModel):
1819
return contents.model_dump()
1920
return contents

src/daq_config_server/models/converters/lookup_tables/_converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def parse_lut(contents: str, *params: tuple[str, type | None]) -> GenericLookupT
1818
column_names = [param[0] for param in params]
1919
types = [param[1] for param in params]
2020
for line in remove_comments(contents.splitlines()):
21-
if line.startswith("Units"):
21+
if line.startswith("Units") or line.startswith("ScannableUnits"):
2222
continue
2323
rows.append(
2424
[parse_value(value, types[i]) for i, value in enumerate(line.split())]

0 commit comments

Comments
 (0)