Skip to content

Commit

Permalink
Merge pull request #87 from lsst/tickets/PREOPS-5118
Browse files Browse the repository at this point in the history
tickets/PREOPS-5118: Prepare for USDF deployment of the scheduler snapshot dashboard
  • Loading branch information
ehneilsen authored May 3, 2024
2 parents c3498e7 + e80d984 commit 2d0ba17
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ RUN mkdir -p ${TEST_DATA_DIR} && \

# Container execution
ENV RUBIN_SIM_DATA_DIR=/home/${MAMBA_USER}/schedview/rubin_sim_data
ENV SCHEDULER_SNAPSHOT_DASHBOARD_PORT=8080
ENV LSST_DISABLE_BUCKET_VALIDATION=1
ENV LSST_S3_USE_THREADS=False
ENV S3_ENDPOINT_URL=https://s3dfrgw.slac.stanford.edu
ENV SIMS_SKYBRIGHTNESS_DATA=https://s3df.slac.stanford.edu/groups/rubin/static/sim-data/sims_skybrightness_pre/h5_2023_09_12_small/
CMD prenight --port 8080
7 changes: 5 additions & 2 deletions container_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ dependencies:
- numpy
- pandas
- astropy >= 5.3
- rubin-scheduler
- rubin-sim
- uranography >= 1.1.0
- bokeh >= 3.1.1
- panel >= 1.1.0
- uranography
- param
- git
- botocore
- boto3
- wget
- lsst-efd-client
- rubin-scheduler
- rubin-sim
- pip
- pip:
- lsst.resources
4 changes: 2 additions & 2 deletions schedview/app/scheduler_dashboard/scheduler_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -1807,8 +1807,8 @@ def main():
print("Starting scheduler dashboard.")
commandline_args = parse_arguments()

if "SCHEDULER_PORT" in os.environ:
scheduler_port = int(os.environ["SCHEDULER_PORT"])
if "SCHEDULER_SNAPSHOT_DASHBOARD_PORT" in os.environ:
scheduler_port = int(os.environ["SCHEDULER_SNAPSHOT_DASHBOARD_PORT"])
else:
scheduler_port = 8888

Expand Down
15 changes: 11 additions & 4 deletions schedview/plot/survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,19 @@ def map_survey_healpix(

if survey is not None:
try:
try:
ra_deg = list(survey.ra_deg)
dec_deg = list(survey.dec_deg)
except TypeError:
ra_deg = [survey.ra_deg]
dec_deg = [survey.dec_deg]

survey_field_data_source = bokeh.models.ColumnDataSource(
data={
"ra": list(survey.ra_deg),
"decl": list(survey.dec_deg),
"name": ["survey_pointing {i}" for i, ra in enumerate(list(survey.ra_deg))],
"glyph_size": [20] * len(list(survey.ra_deg)),
"ra": ra_deg,
"decl": dec_deg,
"name": ["survey_pointing {i}" for i, ra in enumerate(ra_deg)],
"glyph_size": [20] * len(ra_deg),
},
name="survey_pointings",
)
Expand Down

0 comments on commit 2d0ba17

Please sign in to comment.