Open jonwright opened 2 months ago
To apply to a sinogram there are a couple of options:
To be decided:
Further thought... We also have the Lorentz and Polarisation factor for each reflection to add. There can be long tails on peaks, so it is not the same to have sum( (intensity/monitor) )
versus (sum of intensity)/(sum of monitor)
for an integrated peak intensity.
Or, we could apply the Lorentz + Polarisation directly on the raw_intensity.
Probably: we should be reading a monitor via the sparse file anyway.
"""
KeyError Traceback (most recent call last) Cell In[42], line 6 4 correct_sinos_with_ring_current = True 5 if correct_sinos_with_ring_current: ----> 6 ds.get_ring_current_per_scan() 8 for gs in grainsinos: 9 gs.correct_ring_current(is_half_scan=is_half_scan)
File ~/git/ImageD11_clean/ImageD11/sinograms/dataset.py:490, in DataSet.get_ring_current_per_scan(self) 488 with h5py.File(self.masterfile, "r") as h5in: 489 for scan in self.scans: --> 490 ring_current = float(h5in[scan]["instrument/machine/current"][()]) 491 ring_currents.append(ring_current) 493 self.ring_currents_per_scan = np.array(ring_currents)
File h5py/_objects.pyx:54, in h5py._objects.with_phil.wrapper()
File h5py/_objects.pyx:55, in h5py._objects.with_phil.wrapper()
File /cvmfs/hpc.esrf.fr/software/packages/linux/x86_64/jupyter-slurm/2023.10.7/envs/jupyter-slurm/lib/python3.11/site-packages/h5py/_hl/group.py:357, in Group.getitem(self, name) 355 raise ValueError("Invalid HDF5 object reference") 356 elif isinstance(name, (bytes, str)): --> 357 oid = h5o.open(self.id, self._e(name), lapl=self._lapl) 358 else: 359 raise TypeError("Accessing a group is done with bytes or str, " 360 "not {}".format(type(name)))
File h5py/_objects.pyx:54, in h5py._objects.with_phil.wrapper()
File h5py/_objects.pyx:55, in h5py._objects.with_phil.wrapper()
File h5py/h5o.pyx:189, in h5py.h5o.open()
KeyError: "Unable to synchronously open object (object '1.1::[0:7200]' doesn't exist)" """