title: Arrays returning as empty when using an 'if statement' after glob.glob on FITS Files
body: <p>I am using glob.glob make my script only read the data from certain FITS files (<em>astropy.io.fits</em> is brought in as <em>pf</em> and <em>numpy</em> as <em>np</em>). For this <em>x</em> is the value that I change to get these certain files (For reference the 'x = np.arrange(0) and y1 = np.arange(0) simply creates an empty array that I then fill with data later.</p>
  
  <pre><code>def Graph(Pass):
      x = np.arange(0)
      y1 = np.arange(0)
  
      pathfile = '*_v0' + str(Pass) + '_stis_f25srf2_proj.fits'
  
          for name in glob.glob(pathfile):
               imn = 'FilePath' + str(name)
  </code></pre>
  
  <p>However, I wanted to add another filter to the files that I use. In each FITS file's header there is a quality I will call <em>a</em>. <em>a</em> is a non-integer numerical value that each file has. I only want to read files that have <em>a</em> within a specific range. I then take the data I need from the FITS file and add it to an array (for this is is 'power' <em>p1</em> being added to <em>y1</em> and 'time' <em>t</em> being added to <em>x</em>).</p>
  
  <pre><code>            imh = pf.getheader(imn)
              a = imh['a']
  
              if (192 &lt;= a &lt;= 206) is False:
                  pass
  
              if (192 &lt;= a &lt;= 206) is True:
                  im = pf.getdata(imn, origin='lower')
                  subim1 = im[340:390, 75:120]
                  p1 = np.mean(subim1)
  
                  t = SubfucntionToGetTime
  
                  y1 = np.append(y1, p1)
                  x = np.append(x, t)
  </code></pre>
  
  <p>However when I run this function it returns with arrays with no values. I believe it is something to do with my code not working properly when it encounters a file without the appropriate <em>a</em> value, but I can't know how to fix this.</p>
  
  <p>For additional reference I have tested this for a smaller subgroup of FITS files that I know have the correct <em>a</em> values and it works fine, that is why I suspect it is experiencing <em>a</em> values that messes-up the code as the first few files don't have the correct <em>a</em> values.</p>