original_docstring: 
      Download files to database for given element
      
docstring: Download files to database for given element
docstring_tokens: Download files to database for given element
code: def download_full(element, dens=None):
      """
      Download files to database for given element
      """
      import tables
      db = hedp.matdb(element)
      op_tot = []
      nu_tot = []
      for nu in [(10,100),(100, 1000), (1000, 9000), (9000, 30000)]:
          if dens is None:
              if db.solid_dens:
                  if db.solid_dens>0.1:
                      solid_dens = db.solid_dens
                  else:
                      solid_dens = 1e4*db.solid_dens  # this is a gas
              else:
                  solid_dens = 0.1
          else:
              solid_dens=dens
          nu_arr, op_arr =  download(db.formula, solid_dens, nu=nu)
          nu_tot.append(nu_arr)
          op_tot.append(op_arr)
      op = np.concatenate(op_tot)
      nu = np.concatenate(nu_tot)
      _, mask = np.unique(nu, return_index=True)
  
      data = {'op': op[mask], 'nu': nu[mask]}
  
      with tables.openFile(HENKE_DATA_PATH+'.h5', 'a') as f:
          atom = tables.Atom.from_dtype(data['op'].dtype)
          group = f.createGroup(f.root, element)
          for name, arr in data.iteritems():
              ds = f.createCArray(group, name, atom, arr.shape)
              ds[:] = arr
code_tokens: def download_full ( element , dens = None ) : import tables db = hedp . matdb ( element ) op_tot = [ ] nu_tot = [ ] for nu in [ ( 10 , 100 ) , ( 100 , 1000 ) , ( 1000 , 9000 ) , ( 9000 , 30000 ) ] : if dens is None : if db . solid_dens : if db . solid_dens > 0.1 : solid_dens = db . solid_dens else : solid_dens = 1e4 * db . solid_dens else : solid_dens = 0.1 else : solid_dens = dens nu_arr , op_arr = download ( db . formula , solid_dens , nu = nu ) nu_tot . append ( nu_arr ) op_tot . append ( op_arr ) op = np . concatenate ( op_tot ) nu = np . concatenate ( nu_tot ) _ , mask = np . unique ( nu , return_index = True ) data = { 'op' : op [ mask ] , 'nu' : nu [ mask ] } with tables . openFile ( HENKE_DATA_PATH + '.h5' , 'a' ) as f : atom = tables . Atom . from_dtype ( data [ 'op' ] . dtype ) group = f . createGroup ( f . root , element ) for name , arr in data . iteritems ( ) : ds = f . createCArray ( group , name , atom , arr . shape ) ds [ : ] = arr
short_docstring: Download files to database for given element
short_docstring_tokens: Download files to database for given element
comment: """
      Download files to database for given element
      """$SEP$# this is a gas