sbailey / surveyqa

DESI Survey QA Dashboard
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Overlaid hists #19

Closed rdoshi99 closed 5 years ago

rdoshi99 commented 5 years ago

Added the overlaid histograms function, and called in the makeplots function as well which should generate the components of it. Also made sure to save the state of the entire exposures/calibrations table initially to ensure that the overlaid_histogram plots can access the overall variable data to compare the distributions.

@ana-lyons I tried adding it to the template like you suggested by putting it inside a similar div container, but was unsuccessful in seeing it actually appear on the generated nightly page.

Also changed the colors of the nightly summary plots to match the corresponding variables on the summary page, and updated the arguments of some functions to ensure that height/width are changeable from the layout and removed an unnecessary argument to the get_timeseries function.

ana-lyons commented 5 years ago

i think that you need to add the components to the jinja template at the end of the makeplots function.

sbailey commented 5 years ago

Good catch, @ana-lyons . I added the overlaidhists_script/div to the render call:

html = jinja2.Template(template).render(
    skypathplot_script=skypathplot_script, skypathplot_div=skypathplot_div,
    exptypecounts_script=exptypecounts_script, exptypecounts_div=exptypecounts_div,
    timeseries_script=timeseries_script, timeseries_div=timeseries_div,
    overlaidhists_script=overlaidhists_script, overlaidhists_div=overlaidhists_div,
    table_script=table_script, table_div=table_div,
    )

and now the plots appear. I made a few other cosmetic changes:

Ready to merge.