AstroHuntsman / huntsman-pocs

POCS on the Huntsman Telescope
MIT License
7 stars 8 forks source link

Limit number of times we enter the darks state #530

Closed danjampro closed 2 years ago

danjampro commented 2 years ago

Adds new should_take_darks property to the HuntsmanPOCS class.

New config items: calibs.dark.max_blocks_per_interval: The maximum number of times to enter the state. calibs.dark.dark_interval_hours: The time interval in which the maximum number pertains.

Each time the dark state is completed, the time is registered inside the HuntsmanPOCS instance. If there have been too many darks collected recently (defined by the new config items) then the dark state will be vetoed.

Closes #527

codecov[bot] commented 2 years ago

Codecov Report

Merging #530 (256dfb8) into develop (404bedb) will decrease coverage by 0.01%. The diff coverage is 59.25%.

:exclamation: Current head 256dfb8 differs from pull request most recent head 2e87a15. Consider uploading reports for the commit 2e87a15 to get more accurate results Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #530      +/-   ##
===========================================
- Coverage    55.89%   55.88%   -0.02%     
===========================================
  Files           62       62              
  Lines         4011     4037      +26     
  Branches       432      436       +4     
===========================================
+ Hits          2242     2256      +14     
- Misses        1656     1665       +9     
- Partials       113      116       +3     
Impacted Files Coverage Δ
src/huntsman/pocs/states/huntsman/starting.py 0.00% <0.00%> (ø)
src/huntsman/pocs/states/huntsman/taking_darks.py 0.00% <0.00%> (ø)
src/huntsman/pocs/core.py 61.17% <64.00%> (+1.17%) :arrow_up:
src/huntsman/pocs/archive/archiver.py 88.28% <0.00%> (-1.81%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 404bedb...2e87a15. Read the comment docs.