momentoscope / hextof-processor

Code for preprocessing data from the HEXTOF instrument at FLASH, DESY in Hamburg (DE)
https://hextof-processor.readthedocs.io/en/latest/
GNU General Public License v3.0
7 stars 4 forks source link

processor.__version__ is missing #107

Open MichaelHeber opened 2 years ago

MichaelHeber commented 2 years ago

At the read-in of old format data the error below.

I thing in init.py file of src/processor version='xxx' is missing.

I am not sure why this only happen with the old read-in

~/hextof-processor/src/processor/DldFlashDataframeCreator.py in readData(self, runNumber, pulseIdInterval, path)

    231         # print("Number of electrons: {0:,}; {1:,} e/Mb ".format(self.numOfElectrons, self.electronsPerMacrobunch))
--> 232         if not bool(self.metadata):
    233             self.metadata = self.update_metadata()

~/hextof-processor/src/processor/DldProcessor.py in metadata(self)
    222         if self._metadata is None:
--> 223             md = self.update_metadata()

~/hextof-processor/src/processor/DldProcessor.py in update_metadata(self, compute_histograms, fast_mode)
    261         metadata['DAQ channels'] = dict(self.settings._sections['DAQ channels'])#misc.parse_category('DAQ channels')
--> 262         metadata['hextof-processor'] = {'version':processor.__version__}

AttributeError: module 'processor' has no attribute '__version__'
zain-sohail commented 2 years ago

The new dataframe creator is not reterocompatible so the old format can not be loaded with it. You can download the release 1.0.4 and that should work.