Пример #1
0
def create_starcount_table():
    """
    The C{starcount} table stores the number of stars identified by AptPhot in
    each image.
    """
    create_table("starcount", 
                 [int_field("image_id"),
                  int_field("nstars"),
                  fk_field("image_id", "image(id)")])
Пример #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)")])
Пример #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_starcount_table():
    """
    The C{starcount} table stores the number of stars identified by AptPhot in
    each image.
    """
    create_table("starcount", [
        int_field("image_id"),
        int_field("nstars"),
        fk_field("image_id", "image(id)")
    ])
Пример #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)"])
Пример #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)"
    ])
Пример #7
0
def create_imstat_table():
    """
    The C{imstat} table stores the result of running C{imstat} on each image.
    """
    create_table("imstat", 
                 [pk_field("image_id", "INT"),
                  int_field("min"),
                  int_field("max"),
                  int_field("mean"),
                  int_field("stddev"),
                  fk_field("image_id", "image(id)")])
Пример #8
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)")
    ])
Пример #9
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)")
    ])
Пример #10
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)")])
Пример #11
0
def create_imstat_table():
    """
    The C{imstat} table stores the result of running C{imstat} on each image.
    """
    create_table("imstat", [
        pk_field("image_id", "INT"),
        int_field("min"),
        int_field("max"),
        int_field("mean"),
        int_field("stddev"),
        fk_field("image_id", "image(id)")
    ])
Пример #12
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)")])
Пример #13
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)")
    ])
Пример #14
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)")
    ])
Пример #15
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)")])
Пример #16
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)")
    ])