Skip to content

Commit

Permalink
Updates for deployment on USDF.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctslater committed Oct 18, 2024
1 parent bcdeda5 commit e58a71b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/lsst/production/tools/bokeh.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from datetime import datetime, timezone
from flask import Blueprint, Flask, render_template, url_for
import urllib.parse
bp = Blueprint("bokeh", __name__, url_prefix="/bokeh")
bp = Blueprint("bokeh", __name__, url_prefix="/plot-navigator/bokeh", static_folder="../../../../static")

from bokeh.embed import json_item
from bokeh.plotting import figure
Expand Down
17 changes: 14 additions & 3 deletions python/lsst/production/tools/bokehPlotUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import math
import numpy as np
import pandas as pd
from dataclasses import dataclass

import bokeh
import bokeh.palettes as palettes
Expand All @@ -16,8 +17,8 @@
from bokeh.plotting import figure, reset_output
from bokeh.transform import factor_cmap, factor_mark, transform

from lsst.afw.cameraGeom import FOCAL_PLANE
from lsst.pipe.base import Struct
#from lsst.afw.cameraGeom import FOCAL_PLANE
#from lsst.pipe.base import Struct

# This is a collection of plotting utilities, mostly for creating standalone
# interactive Bokeh plots of various visit-level, per-detector parameters and
Expand Down Expand Up @@ -260,6 +261,16 @@ def setAxisLimitsDict(instrument=None, threshStruct=None):
return axisLimitsDict


@dataclass
class TaskConfigParams:
maxMeanDistanceArcsec: float
maxEllipResidual: float
maxScaledSizeScatter: float
maxPsfTraceRadiusDelta: float
maxPsfTraceRadiusSigmaScaledDelta: float
maxPsfApFluxDelta: float
maxPsfApCorrSigmaScaledDelta: float

def introspectConfigs(instrument=None, butler=None):
# Stack Defaults:
maxMeanDistanceArcsec = 0.5
Expand Down Expand Up @@ -334,7 +345,7 @@ def introspectConfigs(instrument=None, butler=None):
maxPsfApFluxDelta = 0.075
maxPsfApCorrSigmaScaledDelta = 0.118

return Struct(
return TaskConfigParams(
maxMeanDistanceArcsec=maxMeanDistanceArcsec,
maxEllipResidual=maxEllipResidual,
maxScaledSizeScatter=maxScaledSizeScatter,
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
flask>2
lsst-daf-butler
lsst-efd-client
lsst-pex-config
gunicorn
psycopg2
boto3
botocore
eventlet
bokeh
numpy>=1.26.0

0 comments on commit e58a71b

Please sign in to comment.