"""This script does something.
"""
from __future__ import print_function
from survey import LegacySurveyData, wcs_for_brick, ccds_touching_wcs
from sys import exit
#
#
#
def main():
    """Main program.
    """
    import argparse
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('brickname',nargs='+',help="Name(s) of brick(s).",metavar='BRICK')
    opt = parser.parse_args()

    survey = LegacySurveyData()
    CCDs = survey.get_ccds()
    for brickname in opt.brickname:
        brick = survey.get_brick_by_name(brickname)
        print('# Brick', brickname, 'RA,Dec', brick.ra, brick.dec)
        wcs = wcs_for_brick(brick)
        I = ccds_touching_wcs(wcs, CCDs)
        for i in I:
            print(i, CCDs.filter[i], CCDs.expnum[i], CCDs.extname[i], CCDs.cpimage[i], CCDs.cpimage_hdu[i], CCDs.calname[i])
    return 0
#
#
#
if __name__ == '__main__':
    exit(main())

@@ -1,11 +1,12 @@
-%22%22%22
+'''%0A
 This scr
@@ -13,27 +13,63 @@
 ipt 
-does something.%0A%22%22%22
+prints out the list of CCDs touching a given brick.%0A'''
 %0Afro
@@ -815,11 +815,11 @@
 CDs.
-ext
+ccd
 name
@@ -828,23 +828,30 @@
 %5D, CCDs.
-cp
 image
+_filename
 %5Bi%5D, CCD
@@ -856,10 +856,8 @@
 CDs.
-cp
 imag
@@ -868,25 +868,8 @@
 u%5Bi%5D
-, CCDs.calname%5Bi%5D
 )%0A  

Update brick-to-ccds.py