feat(dataviewer): open file manager at raw folder of current p-group
This commit is contained in:
@@ -106,7 +106,16 @@ class DataViewer(BECWidget, QWidget):
|
||||
Loads a scan from a folder. Find all files within the scan folder, sort them and
|
||||
then load the files in the scan view
|
||||
"""
|
||||
base_filepath = QFileDialog.getExistingDirectory(self, "Open Scan Folder", "/sls")
|
||||
|
||||
hostname = self.client._hostname
|
||||
start = hostname.find("x")
|
||||
if start != -1:
|
||||
beamline = hostname[start : start + 5]
|
||||
active_account = self.client.active_account
|
||||
start_folder = f"/sls/{beamline}/data/{active_account}/raw"
|
||||
else:
|
||||
start_folder = "/sls"
|
||||
base_filepath = QFileDialog.getExistingDirectory(self, "Open Scan Folder", start_folder)
|
||||
|
||||
if base_filepath != "":
|
||||
self.load_scan(base_filepath)
|
||||
|
||||
Reference in New Issue
Block a user