我有多个输入文件,我从中产生平均值。
我想将这些平均值合并到一个数组中。这是我的代码,
#! /usr/bin/env python
#peice of code to find the information from a star catalog for the brightest star from each indiviual CCD
import os, sys, glob, pyfits, numpy
data1='/home/desar2.cosmology.illinois.edu+7443/DESFiles/desardata/OPS/red/20130321211637_20130106/red/DECam_00166306/DECam_00166306_01_star_catalog.fits'
a=pyfits.getdata(data1).MAG_AUTO
i=numpy.mean(a)
print "mean mag=", q
s=pyfits.getdata(data1).X2WIN_IMAGE
j= numpy.mean(s)
f=pyfits.getdata(data1).Y2WIN_IMAGE
print numpy.mean(f)
z=numpy.mean(f)
print z
g=pyfits.getdata(data1).XYWIN_IMAGE
w= numpy.mean(g)
print '---done---'
如何使用j
、i
和z
in创建一个数组w
?