Exemple #1
0
def create_cam_table():
    """
    The C{cam} table defines a mapping between camera names and C{cam_id}s.
    """
    drop_table("image")
    create_table("cam",
                 [id_field("id", "TINYINT"), "name CHAR(3) NOT NULL UNIQUE"])
Exemple #2
0
def create_cam_table():
    """
    The C{cam} table defines a mapping between camera names and C{cam_id}s.
    """
    drop_table("image")
    create_table("cam",
                 [id_field("id", "TINYINT"),
                  "name CHAR(3) NOT NULL UNIQUE"])
Exemple #3
0
def create_star_table():
    """
    The C{star} table keeps track of the catalogue stars which are identified by
    AptPhot.
    """
    drop_table("phot")
    create_table("star", 
                 [id_field("star_id", "INT"),
                  int_field("cat_id", True),
                  float_field("ra"),
                  float_field("decl")])
Exemple #4
0
def create_star_table():
    """
    The C{star} table keeps track of the catalogue stars which are identified by
    AptPhot.
    """
    drop_table("phot")
    create_table("star", [
        id_field("star_id", "INT"),
        int_field("cat_id", True),
        float_field("ra"),
        float_field("decl")
    ])
Exemple #5
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)")])
Exemple #6
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)")
    ])