예제 #1
0
def create_image_table():
    """
    The C{image} table defines a mapping between filenames and C{image_id}s.
    These C{image_id}s are used as the primary method of identifying images in
    the rest of the system.
    """
    create_table("image", 
                 [id_field("id", "INT"),
                  str_field("filename", 100, True),
                  str_field("basename", 50, True),
                  type_field("cam_id", "TINYINT"),
                  type_field("time", "DATETIME"),
                  fk_field("cam_id", "cam(id)")])
예제 #2
0
def create_image_table():
    """
    The C{image} table defines a mapping between filenames and C{image_id}s.
    These C{image_id}s are used as the primary method of identifying images in
    the rest of the system.
    """
    create_table("image", [
        id_field("id", "INT"),
        str_field("filename", 100, True),
        str_field("basename", 50, True),
        type_field("cam_id", "TINYINT"),
        type_field("time", "DATETIME"),
        fk_field("cam_id", "cam(id)")
    ])
예제 #3
0
def create_unzip_table():
    """
    The C{unzip} table keeps track of which images have been unzipped and the
    resulting filenames.
    """
    create_table("unzip", 
                 [pk_field("image_id", "INT"),
                  type_field("success", "TINYINT"),
                  str_field("outputfile", 50, True),
                  fk_field("image_id", "image(id)")])
예제 #4
0
def create_unzip_table():
    """
    The C{unzip} table keeps track of which images have been unzipped and the
    resulting filenames.
    """
    create_table("unzip", [
        pk_field("image_id", "INT"),
        type_field("success", "TINYINT"),
        str_field("outputfile", 50, True),
        fk_field("image_id", "image(id)")
    ])
예제 #5
0
def create_astrom_table():
    """
    The C{astrom} table records the results of running C{AptAstrom} on each
    image.
    """
    create_table("astrom", 
                 [pk_field("image_id", "INT"),
                  type_field("success", "TINYINT"),
                  float_field("smag"),
                  float_field("zmag"),
                  float_field("sky"),
                  fk_field("image_id", "image(id)")])
예제 #6
0
def create_astrom_table():
    """
    The C{astrom} table records the results of running C{AptAstrom} on each
    image.
    """
    create_table("astrom", [
        pk_field("image_id", "INT"),
        type_field("success", "TINYINT"),
        float_field("smag"),
        float_field("zmag"),
        float_field("sky"),
        fk_field("image_id", "image(id)")
    ])
예제 #7
0
def create_header_table():
    """
    The C{header} table stores a selection of FITS header fields from each image.
    """
    create_table("header", 
                 [pk_field("image_id", "INT"),
                  float_field("temp"),
                  float_field("exposure"),
                  type_field("time", "DATETIME"),
                  float_field("sunzd"),
                  float_field("moonzd"),
                  float_field("moondist"),
                  float_field("moonphase"),
                  float_field("moonmag"),
                  float_field("ra"),
                  float_field("decl"),
                  float_field("lst"),
                  float_field("jd"),
                  float_field("crval1"),
                  float_field("crval2"),
                  fk_field("image_id", "image(id)")])
예제 #8
0
def create_header_table():
    """
    The C{header} table stores a selection of FITS header fields from each image.
    """
    create_table("header", [
        pk_field("image_id", "INT"),
        float_field("temp"),
        float_field("exposure"),
        type_field("time", "DATETIME"),
        float_field("sunzd"),
        float_field("moonzd"),
        float_field("moondist"),
        float_field("moonphase"),
        float_field("moonmag"),
        float_field("ra"),
        float_field("decl"),
        float_field("lst"),
        float_field("jd"),
        float_field("crval1"),
        float_field("crval2"),
        fk_field("image_id", "image(id)")
    ])