Skip to content

Commit

Permalink
Count number of tiles in each pass & band
Browse files Browse the repository at this point in the history
  • Loading branch information
dstndstn committed Mar 4, 2016
1 parent 10026fe commit 7a7f923
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions copilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,12 @@ def limitstyle(band):
while i < len(TJ):
t = TJ[i]
p0 = t.passnumber
# print('Start: exposure', i, 'has pass', p0)
j = 0
for j,tj in enumerate(TJ[i+1:]):
# print(' j=%i: pass %i' % (j+i+1, tj.passnumber))
if tj.passnumber != p0:
break
j += i+1
print('Exposures from [%i,%i) have pass %i' % (i, j, p0))
#print('Exposures from [%i,%i) have pass %i' % (i, j, p0))
tend = TJ[j-1]

y = yl + 0.1 * (yh-yl)
Expand Down Expand Up @@ -500,6 +498,14 @@ def limitstyle(band):

plt.axis(ax)

Tcount = T[(T.passnumber > 0) * (T.bad_pixcnt == False) *
(T.nmatched > 10)]
for band in np.unique(Tcount.band):
for passnum in [1,2,3]:
N = np.sum((Tcount.band == band) * (Tcount.passnumber == passnum))
print('Band %s: total of %i pass %i tiles' % (band, N, passnum))


if show_plot:
plt.draw()
plt.show(block=False)
Expand Down

0 comments on commit 7a7f923

Please sign in to comment.