From a61b58107dc5a44617e22df37721a1868da2d0ea Mon Sep 17 00:00:00 2001 From: Ryan Staten Date: Thu, 24 Jan 2019 13:47:22 -0500 Subject: [PATCH] add total counts per fiber metric --- py/desispec/qa/qa_quicklook.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/py/desispec/qa/qa_quicklook.py b/py/desispec/qa/qa_quicklook.py index e8b407a0e..1fa08c805 100644 --- a/py/desispec/qa/qa_quicklook.py +++ b/py/desispec/qa/qa_quicklook.py @@ -1147,8 +1147,9 @@ def run_qa(self,frame,inputs): threshold=[param['CUTBINS']*ii for ii in rdnoise_fib] #- compare the flux sum to threshold - passfibers=np.where(frame.flux.sum(axis=1)>threshold)[0] - ngoodfibers=passfibers.shape[0] - param["N_KNOWN_BROKEN_FIBERS"] + totcounts=frame.flux.sum(axis=1) + passfibers=np.where(totcounts>threshold)[0] + ngoodfibers=passfibers.shape[0] good_fibers=np.array([0]*frame.nspec) good_fibers[passfibers]=1 #- assign 1 for good fiber @@ -1166,7 +1167,7 @@ def run_qa(self,frame,inputs): retval["BOTTOM_MAX_WAVE_INDEX"]=int(bottommax) retval["TOP_MIN_WAVE_INDEX"]=int(topmin) - retval["METRICS"]={"NGOODFIB": ngoodfibers, "GOOD_FIBERS": good_fibers} + retval["METRICS"]={"NGOODFIB": ngoodfibers, "GOOD_FIBERS": good_fibers, "TOTCOUNT_FIB": totcounts} ############################################################### # This section is for adding QA metrics for plotting purposes #