Skip to content

Conversation

mmccrackan
Copy link
Collaborator

@mmccrackan mmccrackan commented Sep 24, 2025

When running the same schedule with what appear to be the same versions for basically all packages (scheduler, scheduler-scripts, SAT-scan-schedules, numpy, ocs, socs, etc) there is a difference in when some scans are considered sun-safe between running on site and running on my Mac with the latter being more restrictive by a few minutes. This reduces the refresh rate of the sun safety tracker to one hour instead of 6, which makes the site agree with my Mac.

Also makes the gap finding re-use the same sun tracker object when possible. Won't be a big improvement for most cases, but when we run into sun-safety difficulties, this can speed that part of the code up by a large factor.

Example config where this problem occurs:

platform: satp3

# yaml loads iso format automatically into datetimes
t0: 2025-09-30T16:00:00+00:00
t1: 2025-10-01T16:00:00+00:00
t0_state_file: None
t0_state_file: /so/home/mmccrackan/so/scheduler/20250923_satp3_test/scheduler-scripts/sat/satp3/state_files/state_2025-09-30T16:00:00+00:00.npy

elevation: 60
boresight: 0
az_speed: 0.5
az_accel: 0.25
min_hwp_el: 48

# optional, only needed if running non-defaults
apply_boresight_rotation: False
disable_hwp: False
brake_hwp: False
no_cmb: False
#hwp_override: True # True: positive frequency, False: negative frequency
az_motion_override: True # True: overwrite azspeed as set above, False: use azspeed written in the master schedule.
relock_cadence: 86400 # Relock every 24 hours
home_at_end: False # If true spin down HWP and go to (180,40), otherwise scheduler will find a sun-safe parking spot and go there until the end of the specified time-frame.
bias_step_cadence: 1800
use_cal_file: False # If true scheduler will find plant observations from planet cal files
use_wiregrid_file: True
wiregrid_el: 60

# can comment out completely if only wanting CMB
# BE CAREFUL - scheduler does not spin down HWP for boresight rotations 
#              in cal targets. Probably best not to use them
cal_targets:
  - source: moon
    # boresight: # if not specified, use scan boresight
    elevation: 55
    focus: 'ws6'
    allow_partial: False
  #  az_branch: 270 ## maybe need to scan one side of jupiter
  #- source: moon
    # boresight: # if not specified, use scan boresight
    #elevation: 60
    #focus: 'ws1'
    #allow_partial: False

@mmccrackan mmccrackan marked this pull request as ready for review September 29, 2025 13:25
Copy link
Collaborator

@yoshinori-0778 yoshinori-0778 left a comment

Choose a reason for hiding this comment

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

Thank you for making this pr.
Do you want me to test this on site computer as well? If so I will do once the network recovered.
I do not get details of this. Only what I can do is to test thist brach for what I got this error.

@mmccrackan
Copy link
Collaborator Author

Thank you for making this pr. Do you want me to test this on site computer as well? If so I will do once the network recovered. I do not get details of this. Only what I can do is to test thist brach for what I got this error.

Yeah this was largely to fix the sun-safety issue you had with SATp3 so if you find that this fixes that problem on site we can probably merge it.

Copy link
Collaborator

@yoshinori-0778 yoshinori-0778 left a comment

Choose a reason for hiding this comment

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

I tested this branch to the yaml file that I got the error, and this works sucessfully without any sun-safer error!

@mmccrackan mmccrackan merged commit 1fb1c5e into main Sep 29, 2025
@mmccrackan mmccrackan deleted the 20250923_wait branch September 29, 2025 15:45
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