changing setup

This commit is contained in:
Stalberg Jonathan
2023-04-18 15:15:36 +02:00
parent a9abbb227c
commit 68abc169e0
2 changed files with 7 additions and 5 deletions

View File

@ -25,6 +25,8 @@ class BECAdapter:
self.scan_nr = None
self.scan_running = False
self.eaccount = "e20642" # change to e20632 for testing
# To decide what should be plotted
self.monitor = monitor
self.motor_pos = motor_pos
@ -109,9 +111,9 @@ class BECAdapter:
print("last plotted scan nr: ", self.last_plotted_scan_nr)
if self.latest_reconstructed > self.last_plotted_scan_nr:
eaccount = "e20632" #TODO: change to e20642
ending_path = self._get_scan_dir(1000, self.latest_reconstructed, leading_zeros = 5)
mypath = "/sls/X12SA/data/" + eaccount + "/Data10/analysis/" + ending_path
mypath = "/sls/X12SA/data/" + self.eaccount + "/Data10/analysis/" + ending_path
recon_file = self.get_recon_file(mypath)
with h5py.File(mypath + '/' + recon_file, 'r') as hf:
recon_img_abs, recon_img_angle = self.get_recon_imgs(hf)
@ -149,7 +151,7 @@ class BECAdapter:
return recon_img_abs, recon_img_angle
def update_latest_reconstructed(self):
mypath = '/sls/X12SA/Data10/e20632/analysis/online/ptycho/gallery' #TODO: change hardcoded eaccount to e20642
mypath = '/sls/X12SA/Data10/' + self.eaccount + '/analysis/online/ptycho/gallery'
file_list = listdir(mypath)
scans = [file_name.split('_')[0] for file_name in file_list]
self.latest_reconstructed = max([int(scan[1:6]) for scan in scans])

View File

@ -6,10 +6,10 @@ from setuptools import setup
CURRENT_PATH = pathlib.Path(__file__).parent.resolve()
bec_utils = os.path.join(os.getenv("BEC_PATH", f"{CURRENT_PATH}/../bec"), "bec_utils")
# bec_utils = os.path.join(os.getenv("BEC_PATH", f"{CURRENT_PATH}/../bec"), "bec_utils")
if __name__ == "__main__":
subprocess.run(f"pip install -e {bec_utils}", shell=True, check=True)
# subprocess.run(f"pip install -e {bec_utils}", shell=True, check=True)
setup(
install_requires=["pyqt5", "pyqtgraph", "h5py", "PyQtWebEngine"],