obstools.deveny_collfocus module
DeVeny Collimator Focus Range Estimator GUI Module
LDTObserverTools contains python ports of various LDT Observer Tools
Lowell Discovery Telescope (Lowell Observatory: Flagstaff, AZ) https://lowell.edu
This file contains the deveny_collfocus
routine for computing the estimated
collimator focus value and range for the LOUI Focus Sequence tab. The GUI can
gather current information (mount temperature and grating angle) from the
ActiveMQ broker, if available, but the user may also manually enter these
values when the tool is used away from the telescope.
This calculator was originally written by B. Shafransky (LDT TO), and has been incorporated into the LDTObserverTools package.
- class obstools.deveny_collfocus.DevenyCollfocus[source]
Bases:
ScriptBase
Script class for
deveny_collfocus
toolScript structure borrowed from
pypeit.scripts.scriptbase.ScriptBase
.- classmethod get_parser(width=None)[source]
Construct the command-line argument parser.
- Parameters:
description (
str
, optional) – A short description of the purpose of the script.width (
int
, optional) – Restrict the width of the formatted help output to be no longer than this number of characters, if possible given the help formatter. If None, the width is the same as the terminal width.formatter (
HelpFormatter
) – Class used to format the help output.
- Returns:
ArgumentParser
– Command-line interpreter.
- obstools.deveny_collfocus.calculate_collimator_focus(mount_temp: float, grating_tilt: float, order_blocker: bool) float [source]
Calculate Collimator Focus Value
Using the formula presented in the DeVeny manual (built from collimator focus values from 2017-2020), compute the approximate focus value given the current conditions.
The smallest value returned is 7.75mm – a physical limit due to the limit switch on the collimator focus stage.
- obstools.deveny_collfocus.calculate_focus_sequence(estimated_focus: float) tuple[float, float, int] [source]
Calculate Estimated Focus Sequence
The DeVeny LOUI Focus Sequence tab requests three pieces of information in order to execute a focus run: starting position, step size, and number of steps. This function computes these three values based on the estimated focus value (from temperature and tilt) and some prior information about the behavior of the collimator.
- obstools.deveny_collfocus.deveny_collfocus(debug: bool = False)[source]
Main Driver for the DeVeny Collimator Focus Sequence Estimator GUI
Compute the estimated focus and LOUI Focus Sequence range given the mount temperature, grating tilt angle, and presence of an order-blocking filter. Optionally, read in the current mount temperature and grating tilt angle from the ActiveMQ broker, if running at the site.
- Parameters:
debug (
bool
, optional) – Print debug statements? (Default: False)
- obstools.deveny_collfocus.extract_broker_values(status_dict: dict) tuple[str, str] [source]
Get Current Values from the Broker
When running at LDT, we can use the ActiveMQ broker to get the current mount temperature and grating tilt. This is a fancy little trick that will make the software developer very happy.