From 7231bb809b26785b42d8b361777809f80036c4e1 Mon Sep 17 00:00:00 2001 From: xin <zhangxinbjfu@gmail.com> Date: Thu, 5 Jan 2023 12:05:02 +0800 Subject: [PATCH] add out information --- SpecGen/SpecGenerator.py | 12 ++++++++---- SpecWindow/specWin.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/SpecGen/SpecGenerator.py b/SpecGen/SpecGenerator.py index 6342053..d9e85e8 100644 --- a/SpecGen/SpecGenerator.py +++ b/SpecGen/SpecGenerator.py @@ -185,13 +185,15 @@ class SpecGenerator(object): Aimg_cal = Aimg_[y_cent_pos-y_range:y_cent_pos+y_range+1, specRangeImg] ids = Aimg_cal > self.saturation - #1. saturation pixel number, 2. total pixel number, 3 saturation ratio, 4.flux ratio in photo aperture - saturePix = [0,0,0, 0] + #1. saturation pixel number, 2. total pixel number, 3 saturation ratio, 4.flux ratio in photo aperture,5.max value,6.min value + saturePix = np.zeros(6) saturePix[0] = Aimg_cal[ids].shape[0] saturePix[1] = Aimg_cal.shape[0]*Aimg_cal.shape[1] saturePix[2] = saturePix[0]/saturePix[1] saturePix[3] = fluxRatio + saturePix[4] = np.amax(Aimg_cal) + saturePix[5] = np.amin(Aimg_cal) idx = (wave_pix >= bRange[0]-100) idx1 = (wave_pix[idx] <= bRange[1]+100) @@ -308,13 +310,15 @@ class SpecGenerator(object): Aimg_cal = Aimg_[y_cent_pos-y_range:y_cent_pos+y_range+1, specRangeImg] ids = Aimg_cal > self.saturation - #1. saturation pixel number, 2. total pixel number, 3 saturation ratio, 4.flux ratio in photo aperture - saturePix = [0,0,0,0] + #1. saturation pixel number, 2. total pixel number, 3 saturation ratio, 4.flux ratio in photo aperture,5.max value,6.min value + saturePix = np.zeros(6) saturePix[0] = Aimg_cal[ids].shape[0] saturePix[1] = Aimg_cal.shape[0]*Aimg_cal.shape[1] saturePix[2] = saturePix[0]/saturePix[1] saturePix[3] = fluxRatio + saturePix[4] = np.amax(Aimg_cal) + saturePix[5] = np.amin(Aimg_cal) idx = (wave_pix >= bRange[0]-100) idx1 = (wave_pix[idx] <= bRange[1]+100) diff --git a/SpecWindow/specWin.py b/SpecWindow/specWin.py index d9aa5ce..659e96c 100644 --- a/SpecWindow/specWin.py +++ b/SpecWindow/specWin.py @@ -423,7 +423,7 @@ class Example(QMainWindow): g_q = float(self.gqText.text()) specTab, specImg, img, sutPix=specG.generateSpec1dforGal(s_n = g_sn, re = g_re, pa = g_pa,q_ell = g_q,limitfluxratio=0.8) - self.outinfo.setText('saturation: 90000 e- , saturation pixel number: %d, total pixel number: %d, saturation ratio: %f'%(sutPix[0],sutPix[1],sutPix[2])) + self.outinfo.setText('saturation: 90000 e- , saturation pixel number: %d, total pixel number: %d, saturation ratio: %f, pixel value maximun: %d e-, pixel value minimum: %d e-'%(sutPix[0],sutPix[1],sutPix[2],sutPix[4],sutPix[5])) # self.outinfo.adjustSize() spec_orig = np.loadtxt(sedFn) -- GitLab