@@ -0,0 +1,845 @@
+#!/usr/bin/env python%0A# encoding: utf-8%0A%22%22%22%0ABuild a JSON file specifying all patches in a PHAT footprint.%0A%0A2015-05-31 - Created by Jonathan Sick%0A%22%22%22%0A%0Aimport argparse%0Aimport json%0A%0Afrom androcmd import build_patches%0A%0A%0Adef main():%0A    args = parse_args()%0A%0A    patches = %5B%5D%0A%0A    for brick in args.bricks:%0A        patches.extend(build_patches(brick, proj_size=args.size))%0A%0A    with open(args.json_name, 'w') as f:%0A        json.dump(patches, f, indent=4)%0A%0A%0Adef parse_args():%0A    parser = argparse.ArgumentParser()%0A    parser.add_argument('json_name')%0A    parser.add_argument('--bricks', nargs='*', type=int,%0A                        default=range(2, 24))%0A    parser.add_argument('--size', type=float,%0A                        help='Projected size of patch in pc on each side')%0A    return parser.parse_arguments()%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

Create build_phat_patches.py to build patch json