Skip to content

Conversation

@astronomerdave
Copy link
Contributor

@astronomerdave astronomerdave commented Nov 12, 2025

This incorporates Matt's algorithms to compensate for flexure. The basic procedure is:

  1. calculate shift of spectrum on detector
  2. given shift, calculate tip-tilt adjustments needed to compensate for that shift

Matt's position coefficients (3 per channel per axis) and flexure polynomials (20 per channel per axis) are read from the .cfg file and stored in a map indexed by the pair { channel, axis }

Matt's shift calculation function uses sine or cosine for different axes, and that is encapsulated in another map indexed by channel.

The user interface is Flexure::Interface::compensate invoked by sending comp command to the server and for each specified axis will validate tcs telemetry, calculate the compensation, then send those offsets to the motors.

flexured subscribes to tcsd to automatically keep up to date on TCS telemetry but if telemetry is older than 10 seconds then it publishes a request for tcsd to republish telemetry.

This branch was started a long time ago, so it will need some merging to catch up.

This PR will remain in draft mode until any merging and testing is done.

David Hale and others added 16 commits June 13, 2025 15:04
Adds SessionPool class, which on construction creates a pool of connected database sessions using a queue.
Modifies the existing Database class to make use of SessionPool, retrieving/returning connections from/to the pool.
Clients don't know anything about a pool.
Adds helper functions to Database to insert, update and read database records.
Updates database clients (sequencerd, acamd, thermald) to make use of this.

This addresses Issue #314
* sequencer threads can throw exceptions
* sequence_start waits for readout if not using frame transfer
* omits virtual slit mode for CAL targets
adds compensate functionality
cleans up signal handler
and adds some test functions. ready to test.
@astronomerdave astronomerdave marked this pull request as draft November 12, 2025 00:37
@astronomerdave astronomerdave marked this pull request as ready for review December 2, 2025 00:58
@astronomerdave
Copy link
Contributor Author

resolves issue #304

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants