Esempio n. 1
0
def get_anns(cal, nbright=0):
    wcsfn = cal.get_wcs_file()
    from astrometry.util.util import anwcs
    wcs = anwcs(wcsfn,0)
    catdir = settings.CAT_DIR
    uzcfn = os.path.join(catdir, 'uzc2000.fits')
    abellfn = os.path.join(catdir, 'abell-all.fits')
    ngcfn = os.path.join(catdir, 'ngc2000.fits')
    ngcnamesfn = os.path.join(catdir, 'ngc2000name.fits')
    icfn = os.path.join(catdir, 'ic2000.fits')
    brightfn = os.path.join(catdir, 'brightstars.fits')
    hdfn = settings.HENRY_DRAPER_CAT
    tycho2fn = settings.TYCHO2_KD
    
    import astrometry.blind.plotann as plotann
    opt = plotann.get_empty_opts()
    if nbright:
        opt.nbright = nbright
    rad = cal.get_radius()
    # These are the same limits used in views/image.py for annotations
    if rad < 1.:
        opt.abellcat = abellfn
        opt.hdcat = hdfn
    if rad < 0.25:
        opt.t2cat = tycho2fn
    if rad < 10:
        opt.ngc = True
        opt.ngccat = ngcfn
        opt.ngcname = ngcnamesfn
        opt.iccat = icfn
    opt.brightcat = brightfn
    
    jobjs = plotann.get_annotations_for_wcs(wcs, opt)
    return jobjs
Esempio n. 2
0
def get_anns(cal, nbright=0):
    wcsfn = cal.get_wcs_file()
    from astrometry.util.util import anwcs
    wcs = anwcs(wcsfn,0)
    catdir = settings.CAT_DIR
    uzcfn = os.path.join(catdir, 'uzc2000.fits')
    abellfn = os.path.join(catdir, 'abell-all.fits')
    ngcfn = os.path.join(catdir, 'ngc2000.fits')
    ngcnamesfn = os.path.join(catdir, 'ngc2000name.fits')
    icfn = os.path.join(catdir, 'ic2000.fits')
    brightfn = os.path.join(catdir, 'brightstars.fits')
    hdfn = settings.HENRY_DRAPER_CAT
    tycho2fn = settings.TYCHO2_KD
    
    import astrometry.blind.plotann as plotann
    opt = plotann.get_empty_opts()
    if nbright:
        opt.nbright = nbright
    rad = cal.get_radius()
    # These are the same limits used in views/image.py for annotations
    if rad < 1.:
        opt.abellcat = abellfn
        opt.hdcat = hdfn
    if rad < 0.25:
        opt.t2cat = tycho2fn
    if rad < 10:
        opt.ngc = True
        opt.ngccat = ngcfn
        opt.ngcname = ngcnamesfn
        opt.iccat = icfn
    opt.brightcat = brightfn
    
    jobjs = plotann.get_annotations_for_wcs(wcs, opt)
    return jobjs