Skip to content

Commit

Permalink
Merge pull request #12 from simonsobs/new-satp-interface
Browse files Browse the repository at this point in the history
Add TauA and remove unused import
  • Loading branch information
kmharrington authored Sep 4, 2024
2 parents 1551b8c + 7e7abcb commit 5fe2e34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 4 additions & 1 deletion src/pages/2_Sun_Avoidance.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ def plot_sun_angles(Az, El, start, end, delta, thre=45, site=site, zone=CHILE):
)

keep_out = st.number_input(
"Keep Out Angle (deg)", min_value=0, max_value=90, value=41
"Keep Out Angle (deg)",
min_value=0, max_value=90, value=49
)
st.write("Absorptive Baffle: 41 deg")
st.write("Reflective Baffle: 49 deg")
run_calculation = st.form_submit_button("Calculate")

if run_calculation:
Expand Down
15 changes: 7 additions & 8 deletions src/pages/3_SAT_Source_Planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from schedlib import policies, core, utils
from schedlib import rules as ru, source as src, instrument as inst
from scheduler_server.configs import get_config

from schedlib.policies.satp1 import make_geometry
from schedlib.thirdparty import SunAvoidance
Expand All @@ -30,12 +29,6 @@
geometry = make_geometry()


basedir = '/so/home/kmharrin/software/scheduler-scripts/satp1'
schedule_files = {
50 : os.path.join(basedir, 'master_files/cmb_2024_el50_20240423.txt'),
60 : os.path.join(basedir, 'master_files/cmb_2024_el60_20240423.txt'),
}

array_focus = {
0 : {
'left' : 'ws3,ws2',
Expand All @@ -60,7 +53,7 @@
},
}

SOURCES = ['Moon', 'Jupiter', 'Saturn']
SOURCES = ['Moon', 'Jupiter', 'Saturn', 'TauA']

def tod_from_block( block, ndet=100 ):
# pretty sure these are in degrees
Expand Down Expand Up @@ -339,6 +332,12 @@ def get_focal_plane(tod):
csl = CelestialSightLine.az_el(
tod.timestamps, tod.boresight.az, tod.boresight.el, weather='vacuum')
ra, dec, _ = quat.decompose_lonlat(csl.Q)
if source.lower() == 'taua':
x = [
x for x in coords.planets.SOURCE_LIST if isinstance(x, tuple) and x[0] =='tauA'
][0]
source = f"J{x[1]}+{x[2]}"

src_path = coords.planets.SlowSource.for_named_source(
source, tod.timestamps.mean()
)
Expand Down

0 comments on commit 5fe2e34

Please sign in to comment.