From 6a752e591fdf5396ce71fd3c81abb3c04a8dbef6 Mon Sep 17 00:00:00 2001 From: imedan Date: Mon, 27 May 2024 14:31:55 -0500 Subject: [PATCH] add bits to validate design_status --- bin/validate_designs_batches.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/bin/validate_designs_batches.py b/bin/validate_designs_batches.py index f6aed96..021c68b 100644 --- a/bin/validate_designs_batches.py +++ b/bin/validate_designs_batches.py @@ -39,12 +39,18 @@ primary_hdu.header['fps_calibrations_version'] = fps_calib_ver -def valid_field(all_files, offset_min_skybrightness, cache_bs): +def valid_field(all_files, offset_min_skybrightness, cache_bs, + observatory): # need import here for create new connection from mugatu.fpsdesign import FPSDesign from mugatu.designmode import (build_brigh_neigh_query, DesignModeCheck, - allDesignModes) + allDesignModes, + designid_status_valid) + # set up correct opsdb schema + from sdssdb.peewee.sdss5db import opsdb + os.environ["OBSERVATORY"] = observatory.upper() + opsdb.database.connect() def validate_design(design_file, exp, obsTime, db_query_results_boss, db_query_results_apogee, @@ -98,6 +104,7 @@ def design_outputs_to_array(des, decolide, ('deccen', np.float64), ('designmode', '