Skip to content

Conversation

skhrg
Copy link
Member

@skhrg skhrg commented Aug 15, 2025

Adds type 2 and 3 scans to the ACU agent

Description

  • Add functions to generate type 2 and 3 scans
  • Modify generate_scan to allow for these scans
  • Modify set_scan_parameters to also set el_freq for type 3

Motivation and Context

Enables the use of these new scan types for the LAT.
This is needed for ISO.

How Has This Been Tested?

Testing by running the ACU agent out of my homedir on site computing.
Scans ran successfully.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mhasself
Copy link
Member

mhasself commented Sep 11, 2025

@skhrg Can you record here (or on Slack) some specific times when you ran type 2 and type 3 with this code? I want to see the turn-arounds and the phasing behavior.

Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a quick look at this. Other than the small docstring change it looks good to me, though I didn't really focus on the math related to generating the actual scans, as I don't know the details there to really say anything critical.

The one thing you might add is some general description of what type 1/2/3 scans are in the description on the agent page.

I won't give explicit approval here, @mhasself should have final sign-off.

az_drift=None):
"""Python generator to produce times, azimuth and elevation positions,
azimuth and elevation velocities, azimuth and elevation flags for
arbitrarily long type 3 scan.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
arbitrarily long type 3 scan.
arbitrarily long type 2 scan.

@skhrg
Copy link
Member Author

skhrg commented Sep 16, 2025

@skhrg Can you record here (or on Slack) some specific times when you ran type 2 and type 3 with this code? I want to see the turn-arounds and the phasing behavior.

https://site.simonsobs.org/grafana/d/e98a3b69-7c06-46c1-bf50-b030218b6125/lat-monitoring?orgId=1&from=2025-04-27T21%3A43%3A23.541Z&to=2025-04-27T21%3A57%3A58.062Z&viewPanel=panel-5&timezone=utc

You can see that the el nods act up a bit at turnarounds.

Copy link
Member

@mhasself mhasself left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I suspect we'll be back in here soon ... but should be a good start!

A few documentation requests.

@ocs_agent.param('el_endpoint1', type=float, default=None)
@ocs_agent.param('el_endpoint2', type=float, default=None)
@ocs_agent.param('el_speed', type=float, default=0.)
@ocs_agent.param('el_freq', type=float, default=None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add to docstring.

Type 2 includes a variation in az speed that scales as sin(az).
Type 3 is a Type 2 with an sinusoidal el nod.
az_vel_ref (float or None): azimuth to center the velocity profile at.
If None then the average of the endpoints is used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please respect the docstring formatting of this function. Indentation.

batch_size=batch_size,
az_start=az_start,
az_first_pos=az_first_pos,
az_drift=az_drift)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to pass through az_vel_ref.

Copy link
Member

@mhasself mhasself left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mhasself mhasself merged commit c96be89 into main Oct 1, 2025
5 checks passed
@mhasself mhasself deleted the type23 branch October 1, 2025 18:29
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.

3 participants