opihiexarata.gui.automatic module
This is where the automatic mode window is implemented.
- class opihiexarata.gui.automatic.OpihiAutomaticWindow[source]
Bases:
QMainWindow
- __connect_push_button_change_directory() None
The connection for the button to change the automatic fetch directory.
- Parameters:
None –
- Return type:
None
- __connect_push_button_start() None
This enables the automatic active mode by changing the flag and starting the process.
- Parameters:
None –
- Return type:
None
- __connect_push_button_stop() None
This disables the automatic active mode by changing the flag. The loop itself should detect that the flag has changed. It finishes the current process but does not fetch any more.
- Parameters:
None –
- Return type:
None
- __connect_push_button_trigger() None
This does one process, fetching a single image and processing it as normal. However, it does not trigger the automatic mode loop as it is built for a single image only.
- Parameters:
None –
- Return type:
None
- __init__() None [source]
The automatic GUI window for OpihiExarata. This interacts with the user with regards to the automatic solving mode of Opihi.
- Parameters:
None –
- Return type:
None
- __init_gui_connections() None
Creating the function connections for the GUI interface.
- Parameters:
None –
- Return type:
None
- __init_preprocess_solution()
Initialize the preprocessing solution. The preprocessing files should be specified in the configuration file.
- Parameters:
None –
- Return type:
None
- __refresh_dynamic_label_text() None
Refreshes the GUI window’s dynamic text.
- Parameters:
None –
- Return type:
None
- automatic_opihi_image_solve() None [source]
This function contains the loop which runs to do automatic solving.
We just model automatic mode as repeatedly clicking the trigger button.
- Parameters:
None –
- Return type:
None
- check_automatic_stops() bool [source]
This function checks for the stops to stop the automatic triggering of the next image.
- Parameters:
None –
- Returns:
stop – This is the flag which signifies if the triggering should stop or not. If True, the triggering should stop.
- Return type:
bool
- closeEvent(event) None [source]
We override the original Qt close event to take into account the automatic loop.
- Parameters:
event – The event that occurs.
- Return type:
None
- fetch_new_filename() str [source]
This function fetches a new fits filename based on the most recent filename within the automatic fetching directory.
- Parameters:
None –
- Returns:
fetched_filename – The filename that was fetched. It is the most recent file added to the automatic fetching directory.
- Return type:
string
- preprocess_opihi_image(filename: str) str [source]
This function preprocess an Opihi image, where available and returns the filename of the preprocessed file.
- Parameters:
filename (string) – The filename of file which will be preprocessed.
- Returns:
preprocess_filename – The filename of the file which has been preprocessed with the preprocessed solution of this class instance.
- Return type:
string
- refresh_window() None [source]
Refreshes the GUI window with new information where available.
- Parameters:
None –
- Return type:
None
- reset_window() None [source]
This function resets the window to the default values or parameters
- Parameters:
None –
- Return type:
None
- static solve_opihi_image(filename: str, astrometry_engine: AstrometryEngine, photometry_engine: PhotometryEngine) OpihiSolution [source]
This function solves the Opihi image provided by the filename.
We use a static method here to be a little more thread safe.
- Parameters:
filename (string) – The filename to load and solve.
astrometry_engine (AstrometryEngine) – The astrometry engine to use.
photometry_engine (PhotometryEngine) – The photometry engine to use.
- Returns:
opihi_solution – The solution class of the Opihi image after it has been solved (or at least attempted to be).
- Return type:
- staticMetaObject = PySide6.QtCore.QMetaObject("OpihiAutomaticWindow" inherits "QMainWindow": )
- threaded_automatic_opihi_image_solve() None [source]
This function is just a wrapper around the original function to allow for threading.
- Parameters:
None –
- Return type:
None
- threaded_trigger_opihi_image_solve() None [source]
This function is just a wrapper around the original function to allow for threading.
- Parameters:
None –
- Return type:
None
- trigger_opihi_image_solve() None [source]
This function does a single instance of the automatic solving.
- Parameters:
None –
- Return type:
None
- verify_new_filename(filename: str) bool [source]
This function verifies a filename. Basically, it checks that the file exists and has not already been done before.
- Parameters:
filename (string) – The filename to verify.
- Returns:
verification – If the filename is good, it it True.
- Return type:
bool
- write_zero_point_record_to_database(opihi_solution: OpihiSolution) None [source]
This function writes the zero point information assuming a solved photometric solution. This function is so that threading this process away is a lot easier.
- Parameters:
opihi_solution (OpihiSolution) – The solution class of the image.
- Return type:
None