Example #1
0
def create_flat_table():
    """
    The C{flat} table keeps track of which images have been flat fielded and
    where the names of the resulting images.
    """
    create_table("flat", 
                 [pk_field("image_id", "INT"),
                  str_field("flatfile", 25),
                  str_field("outputfile", 50),
                  fk_field("image_id", "image(id)")])
Example #2
0
def create_flat_table():
    """
    The C{flat} table keeps track of which images have been flat fielded and
    where the names of the resulting images.
    """
    create_table("flat", [
        pk_field("image_id", "INT"),
        str_field("flatfile", 25),
        str_field("outputfile", 50),
        fk_field("image_id", "image(id)")
    ])
Example #3
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)")])
Example #4
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)")
    ])
Example #5
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)")])
Example #6
0
def create_phot_table():
    """
    The C{phot} table keeps track of the individual stars which are identified
    in each image by AptPhot.
    """
    create_table("phot", 
                 [int_field("image_id"),
                  int_field("star_id"),
                  float_field("vmag"),
                  float_field("smag"),
                  float_field("mag3"),
                  float_field("mag4"),
                  str_field("err3", 100),
                  str_field("err4", 100),
                  float_field("X"),
                  float_field("Y"),
                  fk_field("star_id", "star(star_id)"),
                  fk_field("image_id", "image(id)"),
                  "KEY (image_id, star_id)"])
Example #7
0
def create_phot_table():
    """
    The C{phot} table keeps track of the individual stars which are identified
    in each image by AptPhot.
    """
    create_table("phot", [
        int_field("image_id"),
        int_field("star_id"),
        float_field("vmag"),
        float_field("smag"),
        float_field("mag3"),
        float_field("mag4"),
        str_field("err3", 100),
        str_field("err4", 100),
        float_field("X"),
        float_field("Y"),
        fk_field("star_id", "star(star_id)"),
        fk_field("image_id", "image(id)"), "KEY (image_id, star_id)"
    ])
Example #8
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)")
    ])