code: def main():
      
      usage = "usage: %(prog)s [options] "
      description = "Merge a set of Fermi-LAT files."
  
      parser = argparse.ArgumentParser(usage=usage, description=description)
  
      parser.add_argument('-o', '--output', default=None, type=str,
                          help='Output file.')
      parser.add_argument('--ccube', default=None, type=str,
                          help='Input counts cube file .')
      parser.add_argument('--bexpcube', default=None, type=str,
                          help='Input binned exposure cube.')
      parser.add_argument('--hpx_order', default=None, type=int,
                          help='Order of output map: default = counts map order')
      parser.add_argument('--clobber', action='store_true',
                          help='Overwrite output file')
  
      args = parser.parse_args()
  
      ccube = HpxMap.create_from_fits(args.ccube, hdu='SKYMAP')
      bexpcube = HpxMap.create_from_fits(args.bexpcube, hdu='HPXEXPOSURES')
  
      if args.hpx_order:
          hpx_order = args.hpx_order
      else:
          hpx_order = ccube.hpx.order
  
      out_cube = intensity_cube(ccube, bexpcube, hpx_order)
      out_cube.hpx.write_fits(out_cube.data, args.output, clobber=args.clobber)
docs: Main function for command line usage