Ejemplo n.º 1
0
def get_images_by_plate(plateid, download=None, release=None):
    ''' Get Images by Plate

    Gets Marvin Images by a plate id.  Optionally can download them
    in bulk.

    Parameters:
        plateid (int):
            The plate id to grab images for
        download (bool):
            If True, also downloads all the images locally
        release (str):
            The release of the data to grab images for

    Returns:
        A list of Marvin Images

    '''

    from marvin.tools.image import Image
    assert str(plateid).isdigit(), 'Plateid must be a numeric integer value'

    images = Image.by_plate(plateid, release=release)

    if download:
        _download_images(images, label='by_plate')

    return images
Ejemplo n.º 2
0
 def test_byplate(self):
     images = Image.by_plate(8485)
     assert isinstance(images, list)
     assert images[0].plate == 8485