diff --git a/packages/essimaging/docs/odin/odin-make-tof-lookup-table.ipynb b/packages/essimaging/docs/odin/odin-make-tof-lookup-table.ipynb index 6478cfa9..a494ad57 100644 --- a/packages/essimaging/docs/odin/odin-make-tof-lookup-table.ipynb +++ b/packages/essimaging/docs/odin/odin-make-tof-lookup-table.ipynb @@ -45,10 +45,9 @@ "wf[time_of_flight.NumberOfSimulatedNeutrons] = 200_000 # Increase this number for more reliable results\n", "wf[time_of_flight.SimulationSeed] = 1234\n", "wf[time_of_flight.PulseStride] = 2\n", - "wf[time_of_flight.LtotalRange] = sc.scalar(55.0, unit=\"m\"), sc.scalar(65.0, unit=\"m\")\n", + "wf[time_of_flight.LtotalRange] = sc.scalar(5.0, unit=\"m\"), sc.scalar(65.0, unit=\"m\")\n", "wf[time_of_flight.DistanceResolution] = sc.scalar(0.1, unit=\"m\")\n", - "wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')\n", - "wf[time_of_flight.LookupTableRelativeErrorThreshold] = 0.02" + "wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')" ] }, { @@ -67,7 +66,7 @@ "outputs": [], "source": [ "table = wf.compute(time_of_flight.TimeOfFlightLookupTable)\n", - "table" + "table.array" ] }, { @@ -95,10 +94,8 @@ "metadata": {}, "outputs": [], "source": [ - "# Save chopper metadata\n", - "table.choppers = sc.DataGroup(disk_choppers)\n", "# Write to file\n", - "table.save_hdf5('ODIN-tof-lookup-table.h5')" + "table.save_hdf5('ODIN-tof-lookup-table-5m-65m.h5')" ] } ], @@ -117,7 +114,8 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3" + "pygments_lexer": "ipython3", + "version": "3.12.12" } }, "nbformat": 4, diff --git a/packages/essimaging/docs/tbl/tbl-make-tof-lookup-table.ipynb b/packages/essimaging/docs/tbl/tbl-make-tof-lookup-table.ipynb index cbb8e744..870c7579 100644 --- a/packages/essimaging/docs/tbl/tbl-make-tof-lookup-table.ipynb +++ b/packages/essimaging/docs/tbl/tbl-make-tof-lookup-table.ipynb @@ -43,10 +43,9 @@ "wf[time_of_flight.NumberOfSimulatedNeutrons] = 200_000 # Increase this number for more reliable results\n", "wf[time_of_flight.SimulationSeed] = 1234\n", "wf[time_of_flight.PulseStride] = 1\n", - "wf[time_of_flight.LtotalRange] = sc.scalar(25.0, unit=\"m\"), sc.scalar(35.0, unit=\"m\")\n", + "wf[time_of_flight.LtotalRange] = sc.scalar(5.0, unit=\"m\"), sc.scalar(35.0, unit=\"m\")\n", "wf[time_of_flight.DistanceResolution] = sc.scalar(0.1, unit=\"m\")\n", - "wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')\n", - "wf[time_of_flight.LookupTableRelativeErrorThreshold] = 1.0" + "wf[time_of_flight.TimeResolution] = sc.scalar(250.0, unit='us')" ] }, { @@ -65,7 +64,7 @@ "outputs": [], "source": [ "table = wf.compute(time_of_flight.TimeOfFlightLookupTable)\n", - "table" + "table.array" ] }, { @@ -75,7 +74,7 @@ "metadata": {}, "outputs": [], "source": [ - "table.plot()" + "table.plot(title=\"Predicted time-of-flight\") + sc.stddevs(table.array).plot(title=\"Standard deviation\")" ] }, { @@ -95,7 +94,7 @@ "source": [ "# Save chopper metadata\n", "# Write to file\n", - "table.save_hdf5('TBL-tof-lookup-table-no-choppers.h5')" + "table.save_hdf5('TBL-tof-lookup-table-no-choppers-5m-35m.h5')" ] } ], @@ -115,7 +114,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.7" + "version": "3.12.12" } }, "nbformat": 4, diff --git a/packages/essimaging/pyproject.toml b/packages/essimaging/pyproject.toml index c38d3a56..9fbed8e9 100644 --- a/packages/essimaging/pyproject.toml +++ b/packages/essimaging/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "scippneutron>=24.12.0", "scippnexus>=23.11.1", "tifffile>=2024.7.2", - "essreduce>=25.11.2", + "essreduce>=26.2.1", "scitiff>=25.7", ] diff --git a/packages/essimaging/src/ess/odin/data.py b/packages/essimaging/src/ess/odin/data.py index ac173699..dcd7f953 100644 --- a/packages/essimaging/src/ess/odin/data.py +++ b/packages/essimaging/src/ess/odin/data.py @@ -15,6 +15,7 @@ "iron_simulation_sample_large.nxs": "md5:c162b6abeccb51984880d8d5002bae95", "iron_simulation_sample_small.nxs": "md5:dda6fb30aa88780c5a3d4cef6ea05278", "ODIN-tof-lookup-table.h5": "md5:e657021f4508f167b2a2eb550853b06b", + "ODIN-tof-lookup-table-5m-65m.h5": "md5:c815eed6835a98d0b8d5252ffe250964", }, ) @@ -62,10 +63,10 @@ def iron_simulation_ob_large() -> pathlib.Path: def odin_tof_lookup_table() -> pathlib.Path: """ Odin TOF lookup table. - This file is used to convert the time-of-flight to wavelength. + This file is used to convert the raw ``event_time_offset`` to time-of-flight. This table was computed using `Create a time-of-flight lookup table for ODIN <../../odin/odin-make-tof-lookup-table.rst>`_ with ``NumberOfSimulatedNeutrons = 5_000_000``. """ - return _registry.get_path("ODIN-tof-lookup-table.h5") + return _registry.get_path("ODIN-tof-lookup-table-5m-65m.h5") diff --git a/packages/essimaging/src/ess/tbl/data.py b/packages/essimaging/src/ess/tbl/data.py index d01c58db..10200bee 100644 --- a/packages/essimaging/src/ess/tbl/data.py +++ b/packages/essimaging/src/ess/tbl/data.py @@ -12,6 +12,7 @@ files={ "tbl_sample_data_2025-03.hdf": "md5:12db6bc06721278b3abe47992eac3e77", "TBL-tof-lookup-table-no-choppers.h5": "md5:8bc98fac0ee64fc8f5decf509c75bafe", + "TBL-tof-lookup-table-no-choppers-5m-35m.h5": "md5:be7e73f32d395abd3c28b95f75934d61", # noqa: E501 'tbl-orca-focussing.hdf.zip': Entry( alg='md5', chk='f365acd9ea45dd205c0b9398d163cfa4', unzip=True ), @@ -34,9 +35,9 @@ def tbl_tof_lookup_table_no_choppers() -> pathlib.Path: This table was computed using `Create a time-of-flight lookup table for TBL <../../tbl/tbl-make-tof-lookup-table.rst>`_ - with ``NumberOfSimulatedNeutrons = 2_000_000``. + with ``NumberOfSimulatedNeutrons = 5_000_000``. """ - return _registry.get_path("TBL-tof-lookup-table-no-choppers.h5") + return _registry.get_path("TBL-tof-lookup-table-no-choppers-5m-35m.h5") def tbl_orca_focussing_data() -> pathlib.Path: