Beispiel #1
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm','misc']):
    '''Return a catalog containing the listed sources.'''
#    custom_srcs = ['J1615-605','J1935-461','J2154-692','J2358-605']
    log.info("get_catalog")
    specials = ['Sun', 'Moon', 'Mercury', 'Venus', 'Mars', 'Jupiter',
    'Saturn', 'Uranus', 'Neptune']
    srclist =[]
    for c in catalogs:
        log.info("looking for %s in a local file"%(c,))
        this_srcs = generic_catalog.get_srcs(srcs=srcs,
              cutoff=cutoff,catalogs=[c],loglevel=loglevel)
        if len(this_srcs)==0:
            log.warning("no sources found with genericfile, trying built in catalog")
            tcat = a.src.get_catalog(srcs=srcs, 
                   cutoff=cutoff, catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else: srclist += this_srcs
    #test bit. make all source indexes 0
    #for i in range(len(srclist)):
    #    srclist[i].index=0
    
    cat = a.fit.SrcCatalog(srclist)
    #Add specials.  All fixed radio sources must be in catalog, for completeness
    if not srcs is None:
        for src in srcs:
            if src in src_prms.keys():
                if src in specials:
                    cat[src] = a.fit.RadioSpecial(src,**src_prms[src])
    return cat
Beispiel #2
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm','misc']):
    '''Return a catalog containing the listed sources.'''
    custom_srcs = ['J1347-603','J1615-610', 'J1336-340', 'J1248-412', 'J1531-423', 'J1359-415']
    srclist =[]
    for c in catalogs:
        log.info("looking for %s in a local file"%(c,))
        this_srcs = generic_catalog.get_srcs(srcs=srcs,
              cutoff=cutoff,catalogs=[c],loglevel=loglevel)
        if len(this_srcs)==0:
            log.warning("no sources found with genericfile, trying built in catalog")
            tcat = a.src.get_catalog(srcs=srcs, 
                   cutoff=cutoff, catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else: srclist += this_srcs    
    cat = a.fit.SrcCatalog(srclist)
    #Add specials.  All fixed radio sources must be in catalog, for completeness
    if not srcs is None:
        for src in srcs:
            if src in src_prms.keys():
                if src in custom_srcs:
                    cat[src] = a.fit.RadioSpecial(src,**src_prms[src])
    return cat    
#    if srcs is None:
#        cat = a.src.get_catalog(srcs=srcs, cutoff=cutoff, catalogs=catalogs)
#    else:
#        cat = a.src.get_catalog(srcs=[s for s in srcs if not s in custom_srcs],
#            cutoff=cutoff, catalogs=catalogs)
#        for src in [s for s in srcs if s in custom_srcs]:
#            cat[src] = a.fit.RadioFixedBody(0., 0., janskies=0., mfreq=.15, name=src)
    cat.set_params(src_prms)
    return cat
Beispiel #3
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm', 'misc']):
    '''Return a catalog containing the listed sources.'''
    log.info("psa743_v002_gc")
    specials = ['pic', 'forA', 'forB', 'J0445-23', 'J0522-36', 'J0625-53']
    srclist = []
    for c in catalogs:
        log.info("looking for %s in a local file" % (c, ))
        this_srcs = generic_catalog.get_srcs(srcs=srcs,
                                             cutoff=cutoff,
                                             catalogs=[c])
        if len(this_srcs) == 0:
            log.warning(
                "no sources found with genericfile, trying built in catalog")
            tcat = a.src.get_catalog(srcs=srcs, cutoff=cutoff, catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else:
            srclist += this_srcs
    cat = a.fit.SrcCatalog(srclist)
    #Add specials.  All fixed radio sources must be in catalog, for completeness
    if not srcs is None:
        for src in srcs:
            if src in src_prms.keys():
                if src in specials:
                    cat[src] = a.fit.RadioFixedBody(**src_prms[src])
    return cat
Beispiel #4
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm', 'misc']):
    '''Return a catalog containing the listed sources.'''
    #    custom_srcs = ['J1615-605','J1935-461','J2154-692','J2358-605']
    log.info("get_catalog")
    specials = [
        'Sun', 'Moon', 'Mercury', 'Venus', 'Mars', 'Jupiter', 'Saturn',
        'Uranus', 'Neptune'
    ]
    srclist = []
    for c in catalogs:
        log.info("looking for %s in a local file" % (c, ))
        this_srcs = generic_catalog.get_srcs(srcs=srcs,
                                             cutoff=cutoff,
                                             catalogs=[c],
                                             loglevel=loglevel)
        if len(this_srcs) == 0:
            log.warning(
                "no sources found with genericfile, trying built in catalog")
            tcat = a.src.get_catalog(srcs=srcs, cutoff=cutoff, catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else:
            srclist += this_srcs
    #test bit. make all source indexes 0
    #for i in range(len(srclist)):
    #    srclist[i].index=0

    cat = a.fit.SrcCatalog(srclist)
    #Add specials.  All fixed radio sources must be in catalog, for completeness
    if not srcs is None:
        for src in srcs:
            if src in src_prms.keys():
                if src in specials:
                    cat[src] = a.fit.RadioSpecial(src, **src_prms[src])
    return cat
Beispiel #5
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm','misc']):
    '''Return a catalog containing the listed sources.'''
#    custom_srcs = ['J1615-605','J1935-461','J2154-692','J2358-605']
    srclist =[]
    for c in catalogs:
        this_srcs = generic_catalog.get_srcs(srcs=srcs,
              cutoff=cutoff,catalogs=[c])
        if len(this_srcs)==0:
            tcat = a.src.get_catalog(srcs=srcs, 
                   cutoff=cutoff, catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else: srclist += this_srcs
    cat = a.fit.SrcCatalog(srclist)
    return cat
Beispiel #6
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm','misc']):
    '''Return a catalog containing the listed sources.'''
#    custom_srcs = ['J1615-605','J1935-461','J2154-692','J2358-605']
    srclist =[]
    for c in catalogs:
        this_srcs = generic_catalog.get_srcs(srcs=srcs,
              cutoff=cutoff,catalogs=[c])
        if len(this_srcs)==0:
            tcat = a.src.get_catalog(srcs=srcs, 
                   cutoff=cutoff, catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else: srclist += this_srcs
    cat = a.fit.SrcCatalog(srclist)
    return cat
Beispiel #7
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm','misc']):
    '''Return a catalog containing the listed sources.'''
    specials = ['pic','forA','forB','J0445-23','J0522-36','J0625-53','forone','fortwo','forcore']
    srclist =[]
    for c in catalogs:     
        this_srcs = generic_catalog.get_srcs(srcs=srcs,
              cutoff=cutoff,catalogs=[c])
        if len(this_srcs)==0:
            tcat = a.src.get_catalog(srcs=srcs, 
                   cutoff=cutoff, catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else: srclist += this_srcs
    cat = a.fit.SrcCatalog(srclist)
    #Add specials.  All fixed radio sources must be in catalog, for completeness
    if not srcs is None:
        for src in srcs:
            if src in src_prms.keys():
                if src in specials:
                    cat[src] = a.fit.RadioFixedBody(**src_prms[src])
    return cat
Beispiel #8
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm','misc']):
    '''Return a catalog containing the listed sources.'''
    specials = ['pic', 'forA', 'forB', 'J0445-23', 'J0522-36', 'J0625-53']
    srclist =[]
    for c in catalogs:   
        this_srcs = generic_catalog.get_srcs(srcs=srcs, cutoff=cutoff, catalogs=[c])
        if len(this_srcs)==0:
            tcat = a.src.get_catalog(srcs=srcs,  
                   cutoff=cutoff,  catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else:
            srclist += this_srcs
    cat = a.fit.SrcCatalog(srclist)
    #Add specials.  All fixed radio sources must be in catalog,  for completeness
    if srcs is not None:
        for src in srcs:
            if src in src_prms.keys():
                if src in specials:
                    cat[src] = a.fit.RadioFixedBody(**src_prms[src])
    return cat
Beispiel #9
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm','misc']):
    '''Return a catalog containing the listed sources.'''
    log.info("psa743_v002_gc")
    specials = ['pic','forA','forB','J0445-23','J0522-36','J0625-53']
    srclist =[]
    for c in catalogs:     
        log.info("looking for %s in a local file"%(c,))
        this_srcs = generic_catalog.get_srcs(srcs=srcs,
              cutoff=cutoff,catalogs=[c])
        if len(this_srcs)==0:
            log.warning("no sources found with genericfile, trying built in catalog")
            tcat = a.src.get_catalog(srcs=srcs, 
                   cutoff=cutoff, catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else: srclist += this_srcs
    cat = a.fit.SrcCatalog(srclist)
    #Add specials.  All fixed radio sources must be in catalog, for completeness
    if not srcs is None:
        for src in srcs:
            if src in src_prms.keys():
                if src in specials:
                    cat[src] = a.fit.RadioFixedBody(**src_prms[src])
    return cat
Beispiel #10
0
def get_catalog(srcs=None, cutoff=None, catalogs=['helm', 'misc']):
    '''Return a catalog containing the listed sources.'''
    custom_srcs = [
        'J1347-603', 'J1615-610', 'J1336-340', 'J1248-412', 'J1531-423',
        'J1359-415'
    ]
    srclist = []
    for c in catalogs:
        log.info("looking for %s in a local file" % (c, ))
        this_srcs = generic_catalog.get_srcs(srcs=srcs,
                                             cutoff=cutoff,
                                             catalogs=[c],
                                             loglevel=loglevel)
        if len(this_srcs) == 0:
            log.warning(
                "no sources found with genericfile, trying built in catalog")
            tcat = a.src.get_catalog(srcs=srcs, cutoff=cutoff, catalogs=[c])
            srclist += [tcat[src] for src in tcat]
        else:
            srclist += this_srcs
    cat = a.fit.SrcCatalog(srclist)
    #Add specials.  All fixed radio sources must be in catalog, for completeness
    if not srcs is None:
        for src in srcs:
            if src in src_prms.keys():
                if src in custom_srcs:
                    cat[src] = a.fit.RadioSpecial(src, **src_prms[src])
    return cat
    #    if srcs is None:
    #        cat = a.src.get_catalog(srcs=srcs, cutoff=cutoff, catalogs=catalogs)
    #    else:
    #        cat = a.src.get_catalog(srcs=[s for s in srcs if not s in custom_srcs],
    #            cutoff=cutoff, catalogs=catalogs)
    #        for src in [s for s in srcs if s in custom_srcs]:
    #            cat[src] = a.fit.RadioFixedBody(0., 0., janskies=0., mfreq=.15, name=src)
    cat.set_params(src_prms)
    return cat