Commit 7231bb80 authored by xin's avatar xin
Browse files

add out information

parent 0b2605c1
......@@ -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)
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment