How to use the jwql.instrument_monitors.miri_monitors.data_trending.plots.plot_functions.add_basic_layout function in jwql

To help you get started, we’ve selected a few jwql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spacetelescope / jwql / jwql / instrument_monitors / miri_monitors / data_trending / plots / power_tab.py View on Github external
#set column data source
    fpea = ColumnDataSource(_fpea)

    # create a new plot with a title and axis labels
    p = figure( tools = "pan,wheel_zoom,box_zoom,reset,save",       \
                toolbar_location = "above",                         \
                plot_width = 1120,                                   \
                plot_height = 500,                                  \
                y_range = [28.0, 28.5],                               \
                x_axis_type = 'datetime',                           \
                output_backend = "webgl",                             \
                x_axis_label = 'Date', y_axis_label='Power (W)')

    p.grid.visible = True
    p.title.text = "POWER FPE"
    pf.add_basic_layout(p)

    # add a line renderer with legend and line thickness
    scat1 = p.scatter(x = "start_time", y = "average", color = 'orange', legend = "Power FPEA", source = fpea)
    p.line(x = "start_time", y = "average", color = 'orange', legend = "Power FPEA", source = fpea)

    err_xs = []
    err_ys = []

    for index, item in _fpea.iterrows():
        err_xs.append((item['start_time'], item['start_time']))
        err_ys.append((item['average'] - item['deviation'], item['average'] + item['deviation']))

    # plot them
    p.multi_line(err_xs, err_ys, color='orange', legend='Power FPEA')

    #activate HoverTool for scatter plot
github spacetelescope / jwql / jwql / instrument_monitors / miri_monitors / data_trending / plots / temperature_tab.py View on Github external
temp['start_time'] = pd.to_datetime( Time(temp['start_time'], format = "mjd").datetime )
    plot_data = ColumnDataSource(temp)

    # create a new plot with a title and axis labels
    p = figure( tools = "pan,wheel_zoom,box_zoom,reset,save",       \
                toolbar_location = "above",                         \
                plot_width = 1120,                                   \
                plot_height = 700,                                  \
                y_range = [275,295],                             \
                x_axis_type = 'datetime',                           \
                output_backend="webgl",                             \
                x_axis_label = 'Date', y_axis_label = 'Temperature (K)')

    p.grid.visible = True
    p.title.text = "IEC Temperatures"
    pf.add_basic_layout(p)

    p.line(x = "start_time", y = "average", color = "brown", legend = "ICE Internal", source = plot_data)
    p.scatter(x = "start_time", y = "average", color = "brown", legend = "ICE Internal", source = plot_data)

    a = pf.add_to_plot(p, "ICE IEC A", "ST_ZTC1MIRIA", start, end, conn, color = "burlywood")
    b = pf.add_to_plot(p, "FPE IEC A", "ST_ZTC2MIRIA", start, end, conn, color = "cadetblue")
    j = pf.add_to_plot(p, "ICE IEC B", "ST_ZTC1MIRIB", start, end, conn, color = "blue")
    k = pf.add_to_plot(p, "FPE IEC B.", "ST_ZTC2MIRIB", start, end, conn, color = "brown")
    c = pf.add_to_plot(p, "FPE PDU", "IMIR_PDU_TEMP", start, end, conn, color = "chartreuse")
    d = pf.add_to_plot(p, "ANA IC", "IMIR_IC_SCE_ANA_TEMP1", start, end, conn, color = "chocolate")
    e = pf.add_to_plot(p, "ANA SW", "IMIR_SW_SCE_ANA_TEMP1", start, end, conn, color = "coral")
    f = pf.add_to_plot(p, "ANA LW", "IMIR_LW_SCE_ANA_TEMP1", start, end, conn, color = "darkorange")
    g = pf.add_to_plot(p, "DIG IC", "IMIR_IC_SCE_DIG_TEMP", start, end, conn, color = "crimson")
    h = pf.add_to_plot(p, "DIG SW", "IMIR_SW_SCE_DIG_TEMP", start, end, conn, color = "cyan")
    i = pf.add_to_plot(p, "DIG LW", "IMIR_LW_SCE_DIG_TEMP", start, end, conn, color = "darkblue")
github spacetelescope / jwql / jwql / instrument_monitors / miri_monitors / data_trending / plots / wheel_ratio_tab.py View on Github external
# create a new plot with a title and axis labels
    p = figure(tools="pan,wheel_zoom,box_zoom,reset,save", \
               toolbar_location="above", \
               plot_width=1120, \
               plot_height=500, \
               y_range=[-2, 2], \
               x_range=utils.time_delta(Time(end)), \
               x_axis_type='datetime', \
               x_axis_label='Date', y_axis_label='ratio (normalized)')

    p.xaxis.formatter = copy.copy(utils.plot_x_axis_format)

    p.grid.visible = True
    p.title.text = "CCC Ratio"
    pf.add_basic_layout(p)

    # add_to_wplot(p, "LOCKED", "IMIR_HK_CCC_POS_RATIO_LOCKED", start, end, conn, mn.ccc_nominals['LOCKED'], color = "green")
    pf.add_to_wplot(p, "OPEN", "IMIR_HK_CCC_POS_RATIO_OPEN", start, end, conn, mn.ccc_nominals['OPEN'], color="red")
    pf.add_to_wplot(p, "CLOSED", "IMIR_HK_CCC_POS_RATIO_CLOSED", start, end, conn, mn.ccc_nominals['CLOSED'],
                    color="blue")

    p.legend.location = "bottom_right"
    p.legend.click_policy = "hide"

    return p
github spacetelescope / jwql / jwql / instrument_monitors / miri_monitors / data_trending / plots / wheel_ratio_tab.py View on Github external
# create a new plot with a title and axis labels
    p = figure(tools="pan,wheel_zoom,box_zoom,reset,save", \
               toolbar_location="above", \
               plot_width=1120, \
               plot_height=500, \
               y_range=[-2, 2], \
               x_range=utils.time_delta(Time(end)), \
               x_axis_type='datetime', \
               x_axis_label='Date', y_axis_label='ratio (normalized)')

    p.xaxis.formatter = copy.copy(utils.plot_x_axis_format)

    p.grid.visible = True
    p.title.text = "DGA-A Ratio"
    p.title.align = "left"
    pf.add_basic_layout(p)

    pf.add_to_wplot(p, "SHORT", "IMIR_HK_GW14_POS_RATIO_SHORT", start, end, conn, mn.gw14_nominals['SHORT'],
                    color="green")
    pf.add_to_wplot(p, "MEDIUM", "IMIR_HK_GW14_POS_RATIO_MEDIUM", start, end, conn, mn.gw14_nominals['MEDIUM'],
                    color="red")
    pf.add_to_wplot(p, "LONG", "IMIR_HK_GW14_POS_RATIO_LONG", start, end, conn, mn.gw14_nominals['LONG'], color="blue")

    p.legend.location = "bottom_right"
    p.legend.click_policy = "hide"

    return p
github spacetelescope / jwql / jwql / instrument_monitors / miri_monitors / data_trending / plots / temperature_tab.py View on Github external
Bokeh plot
    '''

    # create a new plot with a title and axis labels
    p = figure( tools = "pan,wheel_zoom,box_zoom,reset,save",       \
                toolbar_location = "above",                         \
                plot_width = 1120,                                   \
                plot_height = 700,                                  \
                y_range = [5.8,6.4],                                \
                x_axis_type = 'datetime',                           \
                output_backend="webgl",                             \
                x_axis_label = 'Date', y_axis_label = 'Temperature (K)')

    p.grid.visible = True
    p.title.text = "Cryo Temperatures"
    pf.add_basic_layout(p)

    a = pf.add_to_plot(p, "T1P", "IGDP_MIR_ICE_T1P_CRYO", start, end, conn, color = "brown")
    b = pf.add_to_plot(p, "T2R", "IGDP_MIR_ICE_T2R_CRYO", start, end, conn, color = "burlywood")
    c = pf.add_to_plot(p, "T3LW", "IGDP_MIR_ICE_T3LW_CRYO", start, end, conn, color = "cadetblue")
    d = pf.add_to_plot(p, "T4SW", "IGDP_MIR_ICE_T4SW_CRYO", start, end, conn, color = "chartreuse")
    e = pf.add_to_plot(p, "T5IMG", "IGDP_MIR_ICE_T5IMG_CRYO", start, end, conn, color = "chocolate")
    f = pf.add_to_plot(p, "T6DECK", "IGDP_MIR_ICE_T6DECKCRYO", start, end, conn, color = "coral")
    g = pf.add_to_plot(p, "T7IOC", "IGDP_MIR_ICE_T7IOC_CRYO", start, end, conn, color = "darkorange")
    h = pf.add_to_plot(p, "FW", "IGDP_MIR_ICE_FW_CRYO", start, end, conn, color = "crimson")
    i = pf.add_to_plot(p, "CCC", "IGDP_MIR_ICE_CCC_CRYO", start, end, conn, color = "cyan")
    j = pf.add_to_plot(p, "GW14", "IGDP_MIR_ICE_GW14_CRYO", start, end, conn, color = "darkblue")
    k = pf.add_to_plot(p, "GW23", "IGDP_MIR_ICE_GW23_CRYO", start, end, conn, color = "darkgreen")
    l = pf.add_to_plot(p, "POMP", "IGDP_MIR_ICE_POMP_CRYO", start, end, conn, color = "darkmagenta")
    m = pf.add_to_plot(p, "POMR", "IGDP_MIR_ICE_POMR_CRYO", start, end, conn, color = "darkcyan")
    n = pf.add_to_plot(p, "IFU", "IGDP_MIR_ICE_IFU_CRYO", start, end, conn, color = "cornflowerblue")
    o = pf.add_to_plot(p, "IMG", "IGDP_MIR_ICE_IMG_CRYO", start, end, conn, color = "orange")
github spacetelescope / jwql / jwql / instrument_monitors / miri_monitors / data_trending / plots / power_tab.py View on Github external
Bokeh plot
    '''

    # create a new plot with a title and axis labels
    p = figure( tools = "pan,wheel_zoom,box_zoom,reset,save",
                toolbar_location = "above",
                plot_width = 1120,
                plot_height = 500,
                y_range = [0,1.1],
                x_axis_type = 'datetime',
                output_backend = "webgl",
                x_axis_label = 'Date', y_axis_label = 'Current (A)')

    p.grid.visible = True
    p.title.text = "FPE & ICE Currents"
    pf.add_basic_layout(p)

    a = pf.add_to_plot(p, "ICE Current idle", "SE_ZIMIRICEA_IDLE", start, end, conn, color = "red")
    b = pf.add_to_plot(p, "ICE Current HV on", "SE_ZIMIRICEA_HV_ON", start, end, conn, color = "orange")
    c = pf.add_to_plot(p, "FPE Current", "SE_ZIMIRFPEA", start, end, conn, color = "brown")

    pf.add_hover_tool(p,[a,b,c])

    p.legend.location = "bottom_right"
    p.legend.click_policy = "hide"
    p.legend.orientation = "horizontal"

    return p
github spacetelescope / jwql / jwql / instrument_monitors / miri_monitors / data_trending / plots / temperature_tab.py View on Github external
Bokeh plot
    '''

    # create a new plot with a title and axis labels
    p = figure( tools = "pan,wheel_zoom,box_zoom,reset,save",       \
                toolbar_location = "above",                         \
                plot_width = 1120,                                   \
                plot_height = 400,                                  \
                y_range = [6.395,6.41],                             \
                x_axis_type = 'datetime',                           \
                output_backend="webgl",                             \
                x_axis_label = 'Date', y_axis_label = 'Temperature (K)')

    p.grid.visible = True
    p.title.text = "Detector Temperature"
    pf.add_basic_layout(p)

    a = pf.add_to_plot(p, "Det. Temp. IC", "IGDP_MIR_IC_DET_TEMP", start, end, conn, color = "red")
    b = pf.add_to_plot(p, "Det. Temp. LW", "IGDP_MIR_LW_DET_TEMP", start, end, conn, color = "green")
    c = pf.add_to_plot(p, "Det. Temp. SW", "IGDP_MIR_SW_DET_TEMP", start, end, conn, color = "blue")

    pf.add_hover_tool(p,[a,b,c])

    p.legend.location = "bottom_right"
    p.legend.orientation = "horizontal"
    p.legend.click_policy = "hide"

    return p

jwql

The James Webb Space Telescope Quicklook Project

BSD-3-Clause
Latest version published 6 months ago

Package Health Score

69 / 100
Full package analysis

Popular jwql functions