Skip to content

Commit

Permalink
Merge pull request #42 from momentoscope/development
Browse files Browse the repository at this point in the history
beamtime release
  • Loading branch information
balerion authored Dec 1, 2020
2 parents 9dac64e + 7a4a399 commit f81275a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions processor/DldFlashDataframeCreator.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,13 @@ def createDataframePerElectronRange(self, mbIndexStart, mbIndexEnd):
colNames.append('gmdBda')

if 'monochromatorPhotonEnergy' in self.daqAddresses:
monochromatorPhotonEnergyArray = assignToMircobunch(
self.dldMicrobunchId[mbIndexStart:mbIndexEnd, :].astype(np.float64),
self.monochromatorPhotonEnergy[mbIndexStart:mbIndexEnd, :].astype(np.float64))
daMonochromatorPhotonEnergy = monochromatorPhotonEnergyArray.flatten()
# monochromatorPhotonEnergyArray = assignToMircobunch(
# self.dldMicrobunchId[mbIndexStart:mbIndexEnd, :].astype(np.float64),
# self.monochromatorPhotonEnergy[mbIndexStart:mbIndexEnd, :].astype(np.float64))
# daMonochromatorPhotonEnergy = monochromatorPhotonEnergyArray.flatten()
monochromatorPhotonEnergyArray = np.zeros_like(self.dldMicrobunchId[mbIndexStart:mbIndexEnd, :])
monochromatorPhotonEnergyArray[:, :] = (self.monochromatorPhotonEnergyArray[mbIndexStart:mbIndexEnd])[:, None]
daMonochromatorPhotonEnergy = delayStageArray.flatten()
arrayCols.append(daMonochromatorPhotonEnergy)
colNames.append('monochromatorPhotonEnergy')

Expand Down
4 changes: 2 additions & 2 deletions processor/DldProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import h5py
import numpy as np
import pandas as pd
from tqdm import tqdm, tqdm_notebook
from tqdm.auto import tqdm
from configparser import ConfigParser
from processor.utilities import misc, io, dfops
# warnings.resetwarnings()
Expand Down Expand Up @@ -1210,7 +1210,7 @@ def analyzePartNumpy(part):
with warnings.catch_warnings():
warnings.simplefilter(warnString)

for i in tqdm_notebook(range(0, self.dd.npartitions, self.N_CORES),disable=not usePbar):
for i in tqdm(range(0, self.dd.npartitions, self.N_CORES),disable=not usePbar):
resultsToCalculate = []
# process the data in blocks of n partitions (given by the number
# of cores):
Expand Down

0 comments on commit f81275a

Please sign in to comment.