diff --git a/bin/rsValidation_html.py b/bin/rsValidation_html.py index 14bf33d..61ee5d7 100644 --- a/bin/rsValidation_html.py +++ b/bin/rsValidation_html.py @@ -18,8 +18,6 @@ import warnings -mugatu_version = mugatu.__version__ - plt.rcParams.update({'font.size': 18}) plt.rcParams['savefig.facecolor'] = 'white' @@ -336,7 +334,7 @@ def create_summary_dist_plots(valid_apo, valid_lco, designmode): def write_html_jinja(valid_apo, valid_lco, designmode, rs_run, mugatu_v, kaiju_v, coordio_v, - path): + fps_calib_v, path): """ Write HTML file using jinja """ @@ -440,6 +438,7 @@ def write_html_jinja(valid_apo, valid_lco, designmode, html_dict['mugatu_v'] = mugatu_v html_dict['kaiju_v'] = kaiju_v html_dict['coordio_v'] = coordio_v + html_dict['fps_calib_v'] = fps_calib_v template = env.get_template('main_validation_page.html') page = template.render(html_dict) fp = open('%s/%s_validation.html' % (path, rs_run), 'w') @@ -458,16 +457,10 @@ def write_html_jinja(valid_apo, valid_lco, designmode, parser.add_argument('-p', '--plan', dest='plan', type=str, help='name of plan', required=True) - parser.add_argument('-k', '--kaiju_v', dest='kaiju_v', - type=str, help='kaiju_v', required=True) - parser.add_argument('-c', '--coordio_v', dest='coordio_v', - type=str, help='coordio_v', required=True) parser.add_argument('-i','--ignore_prev', help='True if want to ignore previously observed designs in validation', type=bool, required=False, default=True) args = parser.parse_args() plan = args.plan - kaiju_v = args.kaiju_v - coordio_v = args.coordio_v ignore_prev = args.ignore_prev targetdb.database.connect_from_parameters(user='sdss_user', @@ -490,6 +483,12 @@ def write_html_jinja(valid_apo, valid_lco, designmode, try: valid_apo = fits.open(path + '/rs_%s_apo_design_validation_results.fits' % plan)[1].data + header = fits.open(path + + '/rs_%s_apo_design_validation_results.fits' % plan)[0].header + kaiju_v = header['kaiju_version'] + coordio_v = header['coordio_version'] + fps_calib_v = header['fps_calibrations_version'] + mugatu_version = header['mugatu_version'] # ignore previously observed designs with designid_status != -1 if ignore_prev: valid_apo = valid_apo[valid_apo['designid_status'] == -1] @@ -500,6 +499,12 @@ def write_html_jinja(valid_apo, valid_lco, designmode, try: valid_lco = fits.open(path + '/rs_%s_lco_design_validation_results.fits' % plan)[1].data + header = fits.open(path + + '/rs_%s_lco_design_validation_results.fits' % plan)[0].header + kaiju_v = header['kaiju_version'] + coordio_v = header['coordio_version'] + fps_calib_v = header['fps_calibrations_version'] + mugatu_version = header['mugatu_version'] if ignore_prev: valid_lco = valid_lco[valid_lco['designid_status'] == -1] except FileNotFoundError: @@ -512,5 +517,5 @@ def write_html_jinja(valid_apo, valid_lco, designmode, designmode = fits.open(path + '/designmodes_rs_%s.fits' % plan)[1].data write_html_jinja(valid_apo, valid_lco, designmode, - plan, mugatu_version, kaiju_v, coordio_v, + plan, mugatu_version, kaiju_v, coordio_v, fps_calib_v, path) diff --git a/python/mugatu/templates/main_validation_page.html b/python/mugatu/templates/main_validation_page.html index 756ceb5..25be752 100644 --- a/python/mugatu/templates/main_validation_page.html +++ b/python/mugatu/templates/main_validation_page.html @@ -5,7 +5,7 @@ border:1px solid black; } -

{{rs_run}} Validation Results

Below are links to summaries of each design validation criteria used for the {{rs_run}} run of robostrategy. These designs were validated using v{{mugatu_v}} of mugatu, v{{kaiju_v}} of kaiju and v{{coordio_v}} of coordio.

+

{{rs_run}} Validation Results

Below are links to summaries of each design validation criteria used for the {{rs_run}} run of robostrategy. These designs were validated using v{{mugatu_v}} of mugatu, v{{kaiju_v}} of kaiju, v{{coordio_v}} of coordio and v{{fps_calib_v}} of fps_calibrations.

Design Validations

decolide: A check on if the FPS grid was able to be decolided if any collisions existed.

bright_safety: A check if any assigned fibers in the grid were too close to a bright neighbor such that the total flux down the fiber would be greater than the bright_limit_targets for the designmode. This check only considers a subset of very bright stars with G < 13 (for BOSS) and H < 7 (for APOGEE) in the FOV.