Skip to content

Commit

Permalink
Merge pull request #156 from lsst-ts/tickets/DM-46003
Browse files Browse the repository at this point in the history
DM-46003: Increase minimum exposure time for electrometer in ATCalsys
  • Loading branch information
parfa30 authored Sep 6, 2024
2 parents a43ac20 + 271cf8f commit 1c64a8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/news/DM-46003.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Increase minimum electrometer exposure time to 1 second for Keithley electrometer
13 changes: 10 additions & 3 deletions python/lsst/ts/observatory/control/auxtel/atcalsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ async def _calculate_electrometer_exposure_times(
electrometer_buffer_size = 16667
electrometer_integration_overhead = 0.00254
electrometer_time_separation_vs_integration = 3.07
keithley_min_exptime = 1.0

electrometer_exptimes: list[float | None] = []
for exptime in exptimes:
Expand All @@ -319,13 +320,19 @@ async def _calculate_electrometer_exposure_times(
* electrometer_time_separation_vs_integration
) + electrometer_integration_overhead
max_exp_time = electrometer_buffer_size * time_sep
if exptime > max_exp_time:
electrometer_exptimes.append(max_exp_time)
if exptime < keithley_min_exptime:
elec_exptime = keithley_min_exptime
self.log.info(
f"Electrometer exposure time increased from {exptime} to {keithley_min_exptime} sec."
)
elif exptime > max_exp_time:
elec_exptime = max_exp_time
self.log.info(
f"Electrometer exposure time reduced to {max_exp_time}"
)
else:
electrometer_exptimes.append(exptime)
elec_exptime = exptime
electrometer_exptimes.append(elec_exptime)
else:
electrometer_exptimes.append(None)
return electrometer_exptimes
Expand Down

0 comments on commit 1c64a8a

Please sign in to comment.