Example #1
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")])
Example #2
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)")])
Example #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")
    ])
Example #4
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)")
    ])
Example #5
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 #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_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)")])
Example #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)")
    ])