示例#1
0
def create_sg_split_and_mktime(**kwargs):
    """Build and return a `fermipy.jobs.ScatterGather` object that can invoke this script"""
    linkname = kwargs.pop('linkname', 'split-and-mktime')
    chain = SplitAndMktime(linkname, **kwargs)
    appname = kwargs.pop('appname', 'fermipy-split-and-mktime-sg')

    batch_args = get_lsf_default_args()    
    batch_interface = LSF_Interface(**batch_args)

    usage = "%s [options]"%(appname)
    description = "Prepare data for diffuse all-sky analysis"

    config_maker = ConfigMaker_SplitAndMktime(chain)
    lsf_sg = build_sg_from_link(chain, config_maker,
                                interface=batch_interface,
                                usage=usage,
                                description=description,
                                linkname=linkname,
                                appname=appname,
                                **kwargs)
    return lsf_sg
示例#2
0
def create_sg_healview_diffuse(**kwargs):
    """Build and return a ScatterGather object that can invoke fermipy-healview"""
    appname = kwargs.pop('appname', 'fermipy-healview-sg')
    link = create_link_fermipy_healview(**kwargs)
    linkname = kwargs.pop('linkname', link.linkname)

    batch_args = get_lsf_default_args()
    batch_interface = LSF_Interface(**batch_args)

    usage = "%s [options]" % (appname)
    description = "Sum gasmaps to build diffuse model components"

    config_maker = ConfigMaker_healview(link)
    lsf_sg = build_sg_from_link(link,
                                config_maker,
                                interface=batch_interface,
                                usage=usage,
                                description=description,
                                linkname=linkname,
                                appname=appname,
                                **kwargs)
    return lsf_sg
示例#3
0
def create_sg_fermipy_coadd(**kwargs):
    """Build and return a ScatterGather object that can invoke fermipy-coadd"""
    appname = kwargs.pop('appname', 'fermipy-coadd-sg')
    link = create_link_fermipy_coadd(**kwargs)
    linkname = kwargs.pop('linkname', link.linkname)

    batch_args = get_lsf_default_args()
    batch_interface = LSF_Interface(**batch_args)

    usage = "%s [options]" % (appname)
    description = "Run fermipy-coadd for a series of event types."

    config_maker = ConfigMaker_CoaddSplit(link)
    lsf_sg = build_sg_from_link(link,
                                config_maker,
                                interface=batch_interface,
                                usage=usage,
                                description=description,
                                linkname=linkname,
                                appname=appname,
                                **kwargs)
    return lsf_sg
示例#4
0
def create_sg_srcmap_partial(**kwargs):
    """Build and return a ScatterGather object that can invoke this script"""
    gtsmp = GtSrcmapPartial(**kwargs)
    link = gtsmp
    link.linkname = kwargs.pop('linkname', link.linkname)
    appname = kwargs.pop('appname', 'fermipy-srcmaps-diffuse-sg')

    batch_args = get_lsf_default_args()    
    batch_interface = LSF_Interface(**batch_args)

    usage = "%s [options]"%(appname)
    description = "Build source maps for diffuse model components"

    config_maker = ConfigMaker_SrcmapPartial(link)
    lsf_sg = build_sg_from_link(link, config_maker,
                                interface=batch_interface,
                                usage=usage,
                                description=description,
                                linkname=link.linkname,
                                appname=appname,
                                **kwargs)
    return lsf_sg
示例#5
0
def create_sg_gtsrcmaps_catalog(**kwargs):
    """Build and return a ScatterGather object that can invoke gtsrcmaps for catalog sources"""
    appname = kwargs.pop('appname', 'fermipy-srcmaps-catalog-sg')
    link = create_link_gtsrcmaps_catalog(**kwargs)
    linkname=kwargs.pop('linkname', link.linkname)

    batch_args = get_lsf_default_args()    
    batch_args['lsf_args']['W'] = 6000
    batch_interface = LSF_Interface(**batch_args)

    usage = "%s [options]"%(appname)
    description = "Run gtsrcmaps for catalog sources"

    config_maker = ConfigMaker_SrcmapsCatalog(link)
    lsf_sg = build_sg_from_link(link, config_maker,
                                interface=batch_interface,
                                usage=usage,
                                description=description,
                                linkname=linkname,
                                appname=appname,
                                **kwargs)
    return lsf_sg
示例#6
0
def create_sg_merge_srcmaps(**kwargs):
    """Build and return a ScatterGather object that can invoke this script"""
    gtmerge = GtMergeSourceMaps()
    link = gtmerge.link
    link.linkname = kwargs.pop('linkname', link.linkname)
    appname = kwargs.pop('appname', 'fermipy-merge-srcmaps-sg')

    batch_args = get_lsf_default_args()
    batch_args['lsf_args']['W'] = 6000
    batch_interface = LSF_Interface(**batch_args)

    usage = "%s [options]" % (appname)
    description = "Prepare data for diffuse all-sky analysis"

    config_maker = ConfigMaker_MergeSrcmaps(link)
    lsf_sg = build_sg_from_link(link,
                                config_maker,
                                interface=batch_interface,
                                usage=usage,
                                description=description,
                                appname=appname,
                                **kwargs)
    return lsf_sg
示例#7
0
def create_sg_assemble_model(**kwargs):
    """Build and return a ScatterGather object that can invoke this script"""

    gtassemble = GtAssembleModel(**kwargs)
    link = gtassemble

    appname = kwargs.pop('appname', 'fermipy-assemble-model-sg')

    batch_args = get_lsf_default_args()
    batch_interface = LSF_Interface(**batch_args)

    usage = "%s [options]" % (appname)
    description = "Copy source maps from the library to a analysis directory"

    config_maker = ConfigMaker_AssembleModel(link)
    sg = build_sg_from_link(link,
                            config_maker,
                            interface=batch_interface,
                            usage=usage,
                            description=description,
                            appname=appname,
                            **kwargs)
    return sg
示例#8
0
def create_sg_residual_cr(**kwargs):
    """Build and return a ScatterGather object that can invoke this script"""
    analyzer = ResidualCRAnalysis(**kwargs)
    link = analyzer
    link.linkname = kwargs.pop('linkname', link.linkname)
    appname = kwargs.pop('appname', 'gt-residual-cr-sg')

    batch_args = get_lsf_default_args()
    batch_interface = LSF_Interface(**batch_args)

    usage = "%s [options]" % (appname)
    description = "Copy source maps from the library to a analysis directory"

    config_maker = ConfigMaker_ResidualCR(link)
    lsf_sg = build_sg_from_link(link,
                                config_maker,
                                interface=batch_interface,
                                usage=usage,
                                description=description,
                                linkname=link.linkname,
                                appname=appname,
                                **kwargs)
    return lsf_sg