POCS icon indicating copy to clipboard operation
POCS copied to clipboard

Set _last_light_position in FWs during initialisation

Open danjampro opened this issue 4 years ago • 1 comments

The current behaviour for FWs is to set the _last_light_position only when transitioning between a light and dark filter. This means that _last_light_position is not necessarily set during normal usage, which can lead to errors such as the FW staying in the dark position during autofocusing.

Suggestion is either to set the initial light position explicitly in the config, or to select one from filter_names during initialisation.

Code: https://github.com/panoptes/POCS/blob/804e48d3e66fb6d413aef6ac2f675349bcd0f819/src/panoptes/pocs/filterwheel/filterwheel.py#L62

danjampro avatar Oct 13 '20 22:10 danjampro

I'm not sure I like either suggestion.

_last_light_position is supposed to be the most recently used filter that is not the 'blank' used for taking darks. If the blank is the only filter that has been used since starting up it should be None, nothing else makes sense in this context.

The fact that _last_light_position is initially not set is not the real problem here, the problem is that we have code that takes exposures (that are not darks) without specifying a filter. We should be fixing that instead.

AnthonyHorton avatar Oct 13 '20 22:10 AnthonyHorton