Skip to content

Commit a99e4ef

Browse files
committed
Added pause/stop hyperspectral scan feature
1 parent b4ada4f commit a99e4ef

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

Diff for: src/qt3utils/applications/controllers/princeton_spectrometer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def stop(self) -> None:
4141
"""
4242
Implementations should do necessary steps to stop acquiring data.
4343
"""
44-
#TODO: Need to implement a feature to pause scan here. If there is a way to interrupt data acquistion, do that here. Otherwise, do nothing
44+
self.spectrometer.stop_scan()
4545
self.logger.debug('calling QT3ScanPrincetonSpectrometerController stop')
4646

4747
def close(self) -> None:

Diff for: src/qt3utils/datagenerators/princeton.py

+6-14
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,6 @@ def load_experiment(self, value: str) -> None:
9292
def file_setup(self) -> None:
9393
self.set(lf.AddIns.ExperimentSettings.FileNameGenerationBaseFileName, str(uuid.uuid4()))
9494

95-
#TODO: Need to actually implement the three methods below so that you can:
96-
# - save a new experiment
97-
# - save what you are currently working on
98-
# - stop the scan
99-
100-
def save_current_experiment(self) -> None:
101-
self.experiment.Save()
102-
103-
def save_new_experient(self, value) -> None:
104-
self.experiment.SaveAs(value)
105-
106-
def stop_scan(self) -> None:
107-
self.experiment.Stop()
108-
10995
#NOTE: Thw while loop in here will not be needed once you fix the "FileNameGeneration" problem.
11096
def start_acquisition_and_wait(self) -> None:
11197
"""
@@ -186,6 +172,12 @@ def finalize(self) -> None:
186172
Closes the Lightfield application without saving the settings.
187173
"""
188174
self.light.close()
175+
176+
def stop_scan(self) -> None:
177+
"""
178+
Stop/Pause the current acquisition. If you click "Start" you will be able to continue the scan.
179+
"""
180+
self.light.experiment.Stop()
189181

190182
def get_wavelengths(self) -> np.ndarray:
191183
"""

0 commit comments

Comments
 (0)