diff options
author | mleech | 2006-10-27 11:42:47 +0000 |
---|---|---|
committer | mleech | 2006-10-27 11:42:47 +0000 |
commit | 80a2360b43dfa95de3a54972120f47112637a266 (patch) | |
tree | ec5564708b2ce018fe480c084583a2c4c4a77784 /gr-radio-astronomy | |
parent | 359b70960f8e2d9c5288914fe6370b836d0a8167 (diff) | |
download | gnuradio-80a2360b43dfa95de3a54972120f47112637a266.tar.gz gnuradio-80a2360b43dfa95de3a54972120f47112637a266.tar.bz2 gnuradio-80a2360b43dfa95de3a54972120f47112637a266.zip |
Fixed bug in write_hits--was using wrong index variable.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3873 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-radio-astronomy')
-rwxr-xr-x | gr-radio-astronomy/src/python/usrp_ra_receiver.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gr-radio-astronomy/src/python/usrp_ra_receiver.py b/gr-radio-astronomy/src/python/usrp_ra_receiver.py index e74025240..78c9b1e47 100755 --- a/gr-radio-astronomy/src/python/usrp_ra_receiver.py +++ b/gr-radio-astronomy/src/python/usrp_ra_receiver.py @@ -141,9 +141,9 @@ class app_flow_graph(stdgui.gui_flow_graph): # The hits recording array self.nhits = 10 - self.hits_array = Numeric.zeros((self.nhits,3), Numeric.Float64) - self.hit_intensities = Numeric.zeros((self.nhits,3), Numeric.Float64) - + self.nhitlines = 3 + self.hits_array = Numeric.zeros((self.nhits,self.nhitlines), Numeric.Float64) + self.hit_intensities = Numeric.zeros((self.nhits,self.nhitlines), Numeric.Float64) # Calibration coefficient and offset self.calib_coeff = options.calib_coeff self.calib_offset = options.calib_offset @@ -239,6 +239,7 @@ class app_flow_graph(stdgui.gui_flow_graph): self.locality.lat = str(options.latitude) # We make notes about Sunset/Sunrise in Continuum log files self.sun = ephem.Sun() + self.sunstate = "??" # Set up stripchart display self.stripsize = int(options.stripsize) @@ -628,7 +629,7 @@ class app_flow_graph(stdgui.gui_flow_graph): x = self.probe.level() sidtime = self.locality.sidereal_time() # LMST - s = str(ephem.hours(sidtime)) + s = str(ephem.hours(sidtime)) + " " + self.sunstate # Continuum detector value if self.setimode == False: sx = "%7.4f" % x @@ -692,8 +693,10 @@ class app_flow_graph(stdgui.gui_flow_graph): self.sun.compute(self.locality) enow = ephem.now() sun_insky = "Down" + self.sunstate = "Dn" if ((self.sun.rise_time < enow) and (enow < self.sun.set_time)): sun_insky = "Up" + self.sunstate = "Up" self.continuum_then = now continuum_file.write(str(ephem.hours(sidtime))+" "+flt+" Dn="+str(inter)+",") @@ -847,10 +850,9 @@ class app_flow_graph(stdgui.gui_flow_graph): # Save 'n shuffle hits - self.hits_array[:,2] = self.hits_array[:,1] - self.hit_intensities[:,2] = self.hit_intensities[:,1] - self.hits_array[:,1] = self.hits_array[:,0] - self.hit_intensities[:,1] = self.hit_intensities[:,0] + for i in range(self.nhitlines,1): + self.hits_array[:,i] = self.hits_array[:,i-1] + self.hit_intensities[:,i] = self.hit_intensities[:,i-1] for i in range(0,len(hits)): self.hits_array[i,0] = hits[i] @@ -885,16 +887,16 @@ class app_flow_graph(stdgui.gui_flow_graph): hits_file = open (filenamestr+".seti","a") # Write sidtime first - hits_file.write(str(ephem.hours(sidtime))+" "+str(self.decln)+"\n") + hits_file.write(str(ephem.hours(sidtime))+" "+str(self.decln)+" ") # # Then write the hits/hit intensities buffers with enough # "syntax" to allow parsing by external (not yet written!) # "stuff". # - for i in range(0,self.nhits): + for i in range(0,self.nhitlines): hits_file.write(" ") - for j in range(0,10): + for j in range(0,self.nhits): hits_file.write(str(self.hits_array[j,i])+":") hits_file.write(str(self.hit_intensities[j,i])+",") hits_file.write("\n") |