Skip to content

Christian timetagger refactoring #6

Merged
merged 16 commits into from
Jun 4, 2025
Merged

Conversation

lange50
Copy link
Contributor

@lange50 lange50 commented Jun 4, 2025

This PR includes several improvements to the timetagger handling and Terascan logic to improve stability and enable persistent automated scans:

  1. Timetagger Queue Redesign
    The timetagger no longer drops counts. It now uses a continuously running queue, which buffers incoming events. The GUI scrapes this queue whenever it updates, decoupling GUI refresh rate from timetagger data acquisition. This implementation has been tested by Arya over a two-week period and appears stable.

  2. Persistent Scan Logic in terascan_logic
    The terascan_logic module now supports persistent scanning. It continually checks whether a scan should be running and ensures the scan resumes as needed until completion. The module remains locked during scanning and only unlocks once it is confident the scan has finished successfully.

  3. Separation of Logic and GUI in Terascan
    Refactored terascan_logic and terascan_logic_gui to allow automated scans to be triggered purely through terascan_logic, without GUI interaction. This avoids crashes when modifying scan behavior from code and makes the logic module safe for headless operation.

The main change is that the timetagger doesn't ever stop the measurement. It just gets the most recent data. So there is no down time between collections.
The scan is working. But you cannot take more than one scan in a row. I am working on getting confident that there is no lost data.
Data is now packaged in TerascanLogicData

I also added some more signals to connect logic and gui.

This code is untested.
This is not carefully tested.
default scan tyep and rate still not working

Save data is not working
I added a function written by ChatGPT. I have not tested it yet.
I changed the photon counts window to work with the new swabian internal logic. I also added a number of counts that updates with the plot.
To keep logic and laser from having copied enums, I put the enum classes as a subclass in solstis laser. We still need to get ried of the redundant ocde in get_scan_type etc., and we also need to get rid of the redundant code where solsits_funcs also has the enum.
I added a file to scan many times using terascan_logic. I also changed save_data so you can specify a path.
@lange50 lange50 merged commit b584da1 into main Jun 4, 2025
@lange50 lange50 deleted the christian-timetagger-refactoring branch June 4, 2025 14:51
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant