Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow longer exposure times #44

Merged
merged 3 commits into from
Jul 18, 2023
Merged

Conversation

albireox
Copy link
Member

@albireox albireox commented Jul 18, 2023

This PR fixes an issue that prevented exposure times longer than 1000 seconds.

Parameters in the Archon language cannot have values larger than one million. Since the exposure time was set in milliseconds, a 1000 seconds exposure was 1,000,000 milliseconds and thus the limit. This PR introduces a breaking change in which we set the exposure time in centiseconds (yes, centiseconds) allowing exposure times of up to 10,000 seconds. This requires changing the ACF files that work with Archon to use a new IntCS parameter which stores the integration time in centiseconds. Then we need to change from

X; CALL IntUnit(IntMS)

to

X; CALL IntUnitCS(IntCS)

and add a new function

IntUnitCS:
X; CALL IntUnit(10)
X; RETURN IntUnitCS

All in all this is not a super satisfying solution but it's unlikely we need exposure times longer than 10,000 seconds and any other solution would either be limiting (for example setting the exposure time in seconds, which would limit us to an integer number of seconds) or more complicated (e.g., adding an additional parameter in which we count the number of times the IntMS variables goes over one million).

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #44 (97ac69f) into main (5e7f8d7) will not change coverage.
The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main     #44   +/-   ##
=====================================
  Coverage   85.3%   85.3%           
=====================================
  Files         21      21           
  Lines       1929    1929           
  Branches     485     485           
=====================================
  Hits        1644    1644           
  Misses       195     195           
  Partials      90      90           
Impacted Files Coverage Δ
archon/controller/controller.py 89.6% <100.0%> (ø)

@albireox albireox merged commit 0260352 into main Jul 18, 2023
@albireox albireox deleted the albireox/fix-exposure-time-limit branch July 18, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant