Example #1
0
def group_darks(cam, key1, key2):
    """
    Group the dark frames into a nested dictionary of Images,
    keyed by key1, then key2.
    """
    filenames = darkfiles(cam)
    images = valid_images(filenames)
    groups = groupby(images, key1)
    for key in groups:
        groups[key] = groupby(groups[key], key2)
    return groups
Example #2
0
def group_darks(cam, key1, key2):
    """
    Group the dark frames into a nested dictionary of Images,
    keyed by key1, then key2.
    """
    filenames = darkfiles(cam)
    images = valid_images(filenames)
    groups = groupby(images, key1)
    for key in groups:
        groups[key] = groupby(groups[key], key2)
    return groups
Example #3
0
def image_sort_example():
    """
    Sort a bunch of images based on different keys
    """
    files = darkfiles("sbc")
    images = valid_images(files)

    image = Image(files[0])
    print image.MIN
    print image.BSCALE

    sortby(images, "MAX")
    print [image.MAX for image in images]
Example #4
0
def image_sort_example():
    """
    Sort a bunch of images based on different keys
    """
    files = darkfiles("sbc")
    images = valid_images(files)

    image = Image(files[0])
    print image.MIN
    print image.BSCALE

    sortby(images, "MAX")
    print[image.MAX for image in images]

    sortby(images, "MEAN")
    print[image.MEAN for image in images]