code: def build_reference_wcs(inputs, sciname='sci'):
      
      # start by creating a composite field-of-view for all inputs
      wcslist = []
      for img in inputs:
          nsci = countExtn(img)
          for num in range(nsci):
              extname = (sciname, num + 1)
              if sciname == 'sci':
                  extwcs = wcsutil.HSTWCS(img, ext=extname)
              else:
                  # Working with HDRLET as input and do the best we can...
                  extwcs = read_hlet_wcs(img, ext=extname)
  
              wcslist.append(extwcs)
  
      # This default output WCS will have the same plate-scale and orientation
      # as the first chip in the list, which for WFPC2 data means the PC.
      # Fortunately, for alignment, this doesn't matter since no resampling of
      # data will be performed
      outwcs = utils.output_wcs(wcslist)
  
      return outwcs
docs: Create the reference WCS based on all the inputs for a field