def __init__(self, **kwargs): """C'tor Keyword arguements --------------- config_maker : `ConfigMaker' Object used to translate arguments Must have functions 'add_arguments' and 'build_job_configs' Defaults to ConfigMaker() usage : str Usage string for argument parser description : str Description string for argument parser job_archive : `fermipy.job_archive.JobArchive` [optional] Archive used to track jobs and associated data products Defaults to None initialize : `fermipy.chain.Link` [optional] Link run for the initialization stage Defaults to None scatter : `fermipy.chain.Link` Link run for the scatter stage Defaults to None gather : `fermipy.chain.Link` [optional] Link run for the gather stage Defaults to None no_batch : bool If true, do not send jobs to the batch to run Defaults to False """ linkname = kwargs.pop('linkname', 'ScatterGather') self._config_maker = kwargs.pop('config_maker', None) self._usage = kwargs.pop('usage', "") self._description = kwargs.pop('description', "") self._job_archive = kwargs.pop('job_archive', None) self._initialize_link = kwargs.pop('initialize', None) self._scatter_link = kwargs.pop('scatter', None) self._gather_link = kwargs.pop('gather', None) self._no_batch = kwargs.pop('no_batch', False) options = kwargs.get('options', self.default_options.copy()) self._config_maker.add_options(options) Link.__init__(self, linkname, options=options, parser=self._make_parser(), **kwargs) self._base_config = None self._input_config = {} self._job_configs = {} self._output_config = {}
def __init__(self, **kwargs): """C'tor """ parser = argparse.ArgumentParser(usage="dmpipe-prepare-targets [options]", description="Prepare directories for target analyses") Link.__init__(self, kwargs.pop('linkname', 'prepare-targets'), parser=parser, appname='dmpipe-prepare-targets', options=TargetPreparer.default_options.copy(), **kwargs)
def __init__(self, **kwargs): """C'tor """ parser = argparse.ArgumentParser(usage="dmpipe-analyze-roi [options]", description="Run analysis of a single ROI") Link.__init__(self, kwargs.pop('linkname', 'analyze-roi'), parser=parser, appname='dmpipe-analyze-roi', options=TargetAnalysis.default_options.copy(), **kwargs)
def __init__(self, **kwargs): """C'tor """ parser = argparse.ArgumentParser(usage='dmpipe-analyze-sed', description="Extract the SED for a single target") Link.__init__(self, kwargs.pop('linkname', 'analyze-sed'), parser=parser, appname='dmpipe-analyze-sed', options=SEDAnalysis.default_options.copy(), **kwargs)
def __init__(self, **kwargs): """C'tor Keyword arguements --------------- config_maker : `ConfigMaker' Object used to translate arguments Must have functions 'add_arguments' and 'build_job_configs' Defaults to ConfigMaker() usage : str Usage string for argument parser description : str Description string for argument parser job_archive : `fermipy.job_archive.JobArchive` [optional] Archive used to track jobs and associated data products Defaults to None initialize : `fermipy.chain.Link` [optional] Link run for the initialization stage Defaults to None scatter : `fermipy.chain.Link` Link run for the scatter stage Defaults to None gather : `fermipy.chain.Link` [optional] Link run for the gather stage Defaults to None no_batch : bool If true, do not send jobs to the batch to run Defaults to False """ linkname = kwargs.pop('linkname', 'ScatterGather') self._config_maker = kwargs.pop('config_maker', None) self._usage = kwargs.pop('usage', "") self._description = kwargs.pop('description', "") self._job_archive = kwargs.pop('job_archive', None) self._initialize_link = kwargs.pop('initialize', None) self._scatter_link = kwargs.pop('scatter', None) self._gather_link = kwargs.pop('gather', None) self._no_batch = kwargs.pop('no_batch', False) options = kwargs.get('options', self.default_options.copy()) self._config_maker.add_options(options) Link.__init__(self, linkname, options=options, parser=self._make_parser(), **kwargs) self._base_config = None self._input_config = {} self._job_configs = {} self._output_config = {}
def __init__(self, **kwargs): """C'tor """ parser = argparse.ArgumentParser(usage="dmpipe-plot-dm [options]", description="Make castro plots") Link.__init__(self, kwargs.pop('linkname', 'plot-dm'), parser=parser, appname='dmpipe-plot-dm', options=CastroPlotterDM.default_options.copy(), **kwargs)
def __init__(self, **kwargs): """C'tor """ self.parser = argparse.ArgumentParser( usage="fermipy-assemble-model [options]", description="Initialize model fitting directory") Link.__init__(self, kwargs.pop('linkname', 'init-model'), appname='fermipy-init-model', options=GtInitModel.default_options.copy(), **kwargs)
def __init__(self, **kwargs): """ C'tor to build this object from energy binning and spectral values tables. """ parser = argparse.ArgumentParser( usage="dmpipe-stack-likelihood [options]", description="Stack the likelihood from targets") Link.__init__(self, kwargs.pop('linkname', 'stack-likelihood'), parser=parser, appname='dmpipe-stack-likelihood', options=DMCastroStacker.default_options.copy(), **kwargs)
def __init__(self, **kwargs): """ C'tor to build this object from energy binning and spectral values tables. """ parser = argparse.ArgumentParser( usage="dmpipe-spec-table [options]", description="Build a table with the spectra") Link.__init__(self, kwargs.pop('linkname', 'spec-table'), parser=parser, appname=kwargs.pop('appname', 'dmpipe-spec-table'), options=DMSpecTableBuilder.default_options.copy(), **kwargs)
def __init__(self, linkname, **kwargs): """C'tor See help for `chain.Link` for details This calls the base class c'tor then builds a GtApp object """ Link.__init__(self, linkname, **kwargs) try: self.__app = build_gtapp(self.appname, **self.args) except: raise ValueError("Failed to build link %s" % self.linkname)
def __init__(self, linkname, **kwargs): """C'tor See help for `chain.Link` for details This calls the base class c'tor then builds a GtApp object """ Link.__init__(self, linkname, **kwargs) try: self.__app = build_gtapp(self.appname, **self.args) except: raise ValueError("Failed to build link %s %s %s" % self.linkname, self.appname, self.args)
def __init__(self, **kwargs): """C'tor """ self.parser = argparse.ArgumentParser( usage="fermipy-assemble-model [options]", description= "Copy source maps from the library to a analysis directory") Link.__init__(self, kwargs.pop('linkname', 'assemble-model'), appname='fermipy-assemble-model', options=GtAssembleModel.default_options.copy(), file_args=dict(input=FileFlags.input_mask), **kwargs)
def __init__(self, **kwargs): """C'tor """ parser = argparse.ArgumentParser( usage="dmpipe-convert-castro [options]", description="Convert SED to DMCastroData") Link.__init__(self, kwargs.pop('linkname', 'convert-castro'), parser=parser, appname=kwargs.pop('appname', 'dmpipe-convert-castro'), options=DMCastroConvertor.default_options.copy(), file_args=dict(), **kwargs)
def __init__(self, **kwargs): """C'tor """ parser = argparse.ArgumentParser(usage="fermipy-srcmaps-diffuse [options]", description="Run gtsrcmaps for one or more energy planes for a single source") Link.__init__(self, kwargs.pop('linkname', 'srcmaps-diffuse'), parser=parser, appname='fermipy-srcmaps-diffuse', options=GtSrcmapPartial.default_options.copy(), file_args=dict(expcube=FileFlags.input_mask, cmap=FileFlags.input_mask, bexpmap=FileFlags.input_mask, srcmdl=FileFlags.input_mask, outfile=FileFlags.output_mask))
def __init__(self, **kwargs): """C'tor """ parser = argparse.ArgumentParser(usage="fermipy-srcmaps-catalog [options]", description="Run gtsrcmaps for all the sources in a catalog") Link.__init__(self, kwargs.pop('linkname', 'srcmaps-diffuse'), parser=parser, appname='fermipy-srcmaps-catalog', options=GtSrcmapsCatalog.default_options.copy(), file_args=dict(expcube=FileFlags.input_mask, cmap=FileFlags.input_mask, bexpmap=FileFlags.input_mask, srcmdl=FileFlags.input_mask, outfile=FileFlags.output_mask))
def __init__(self, **kwargs): """C'tor """ parser = argparse.ArgumentParser( usage='fermipy-residual-cr', description="Compute the residual cosmic-ray contamination.") Link.__init__(self, kwargs.pop('linkname', 'residual_cr'), appname='fermipy-residual-cr', options=ResidualCRAnalysis.default_options.copy(), parser=parser, file_args=dict(ccube_dirty=FileFlags.input_mask, bexpcube_dirty=FileFlags.input_mask, ccube_clean=FileFlags.input_mask, bexpcube_clean=FileFlags.input_mask, outfile=FileFlags.output_mask), **kwargs)