dmpipe package¶
Module contents¶
Standalone Analysis Classes¶
-
class
dmpipe.
PrepareTargets
(**kwargs)[source]¶ Bases:
fermipy.jobs.link.Link
Small class to preprare analysis pipeline.
Parameters: - sims (<type 'list'>) – Names of the simulation scenario. [[]]
- alias_dict (<type 'str'>) – File to rename target version keys. [None]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- rosters (<type 'list'>) – Name of a dmsky target roster. [[]]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- config (<type 'str'>) – Path to fermipy config file. [None]
- spatial_models (<type 'list'>) – Types of spatial models to use [[]]
-
appname
= 'dmpipe-prepare-targets'¶
-
default_options
= {'alias_dict': (None, 'File to rename target version keys.', <type 'str'>), 'config': (None, 'Path to fermipy config file.', <type 'str'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'rosters': ([], 'Name of a dmsky target roster.', <type 'list'>), 'sims': ([], 'Names of the simulation scenario.', <type 'list'>), 'spatial_models': ([], 'Types of spatial models to use', <type 'list'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Prepare directories for target analyses'¶
-
linkname_default
= 'prepare-targets'¶
-
usage
= 'dmpipe-prepare-targets [options]'¶
-
class
dmpipe.
SpecTable
(**kwargs)[source]¶ Bases:
fermipy.jobs.link.Link
Small class to build a table with all the DM spectra for this analysis
Parameters: - specconfig (<type 'str'>) – Path to DM yaml file defining DM spectra of interest. [None]
- specfile (<type 'str'>) – Path to DM spectrum file. [None]
- config (<type 'str'>) – Path to fermipy config file. [None]
- clobber (<type 'bool'>) – Overwrite existing files. [False]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
-
appname
= 'dmpipe-spec-table'¶
-
default_options
= {'clobber': (False, 'Overwrite existing files.', <type 'bool'>), 'config': (None, 'Path to fermipy config file.', <type 'str'>), 'specconfig': (None, 'Path to DM yaml file defining DM spectra of interest.', <type 'str'>), 'specfile': (None, 'Path to DM spectrum file.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Build a table with the spectra for DM signals'¶
-
linkname_default
= 'spec-table'¶
-
usage
= 'dmpipe-spec-table [options]'¶
-
class
dmpipe.
ConvertCastro
(**kwargs)[source]¶ Bases:
fermipy.jobs.link.Link
Small class to convert SED to DM space.
Parameters: - astro_value_file (<type 'str'>) – Path to yaml file with target j_value or d_value [None]
- limitfile (<type 'str'>) – Path to file with limits. [None]
- outfile (<type 'str'>) – Path to output file. [None]
- clobber (<type 'bool'>) – Overwrite existing files. [False]
- sed_file (<type 'str'>) – Path to SED file. [None]
- seed (<type 'int'>) – Seed number for first simulation. [0]
- nsims (<type 'int'>) – Number of simulations to run. [-1]
- astro_prior (<type 'str'>) – Types of Prior on J-factor or D-factor [None]
- specfile (<type 'str'>) – Path to DM spectrum file. [None]
-
appname
= 'dmpipe-convert-castro'¶
-
static
convert_sed
(spec_table, channels, sed_file, outfile, limitfile, **kwargs)[source]¶ Convert a single SED to DM space.
Parameters: Keyword Arguments:
-
static
convert_sed_to_dm
(spec_table, sed, channels, **kwargs)[source]¶ Convert an SED file to a DMCastroData object
Parameters: - spec_table (DMSpecTable) – Object with all the DM spectra
- sed (CastroData) – Object with the SED data
- channels (list) – List of the channels to convert
Keyword Arguments: Returns: - castro_list (list) – List of the DMCastroData objects with the Likelihood data
- table_list (list) – List of astropy.table.Table objects with the Likelihood data
- name_list (list) – List of names
-
default_options
= {'astro_prior': (None, 'Types of Prior on J-factor or D-factor', <type 'str'>), 'astro_value_file': (None, 'Path to yaml file with target j_value or d_value', <type 'str'>), 'clobber': (False, 'Overwrite existing files.', <type 'bool'>), 'limitfile': (None, 'Path to file with limits.', <type 'str'>), 'nsims': (-1, 'Number of simulations to run.', <type 'int'>), 'outfile': (None, 'Path to output file.', <type 'str'>), 'sed_file': (None, 'Path to SED file.', <type 'str'>), 'seed': (0, 'Seed number for first simulation.', <type 'int'>), 'specfile': (None, 'Path to DM spectrum file.', <type 'str'>)}¶
-
description
= 'Convert SED to DMCastroData'¶
-
static
extract_dm_limits
(dm_castro_list, channels, alphas, mass_table)[source]¶ Extract limits from a series of DMCastroData objects for a set of channels and masses
Parameters: - dm_castro_lsit (list) – DMCastroData objects with all the DM spectra
- channels (list) – List of the channels to convert
- alphas (list) – List of the confidence level threshold to extract limits
- mass_table (astropy.table.Table) – Table with the masses. This just gets appended to the lists of output tables.
Returns: - castro_list (list) – List of the DMCastroData objects with the Likelihood data
- table_list (list) – List of astropy.table.Table objects with the Likelihood data
- name_list (list) – List of names
-
linkname_default
= 'convert-castro'¶
-
usage
= 'dmpipe-convert-castro [options]'¶
-
class
dmpipe.
StackLikelihood
(**kwargs)[source]¶ Bases:
fermipy.jobs.link.Link
Small class to stack likelihoods that were written to DMCastroData objects.
Parameters: - specconfig (<type 'str'>) – Path to DM yaml file defining DM spectra of interest. [None]
- rosterlist (<type 'str'>) – Path to the roster list. [None]
- clobber (<type 'bool'>) – Overwrite existing files. [False]
- seed (<type 'int'>) – Seed number for first simulation. [0]
- nsims (<type 'int'>) – Number of simulations to run. [20]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
- astro_prior (<type 'str'>) – Types of Prior on J-factor or D-factor [None]
-
appname
= 'dmpipe-stack-likelihood'¶
-
default_options
= {'astro_prior': (None, 'Types of Prior on J-factor or D-factor', <type 'str'>), 'clobber': (False, 'Overwrite existing files.', <type 'bool'>), 'nsims': (20, 'Number of simulations to run.', <type 'int'>), 'rosterlist': (None, 'Path to the roster list.', <type 'str'>), 'seed': (0, 'Seed number for first simulation.', <type 'int'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>), 'specconfig': (None, 'Path to DM yaml file defining DM spectra of interest.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Stack the likelihood from a set of targets'¶
-
linkname_default
= 'stack-likelihood'¶
-
static
stack_roster
(rost, ttype, channels, astro_prior_key, sim, seed)[source]¶ Stack all of the DMCastroData in a roster
Parameters: - rost (list) – List of the targets
- ttype (str) – Type of target, used for bookkeeping and file names
- channels (list) – List of the channels to convert
- j_prior_key (str) – String that identifies the type of prior on the J-factor
- sim (str) – String that specifies the simulation scenario
- seed (int or None) – Key for the simulation instance, used for bookkeeping and file names
Returns: output – Dictionary of DMCastroData objects, keyed by channel
Return type:
-
static
stack_rosters
(roster_dict, ttype, channels, astro_prior_key, sim, seed, clobber)[source]¶ Stack all of the DMCastroData in a dictionary of rosters
Parameters: - roster_dict (dict) – Dictionary of all the roster being used.
- ttype (str) – Type of target, used for bookkeeping and file names
- channels (list) – List of the channels to convert
- astro_prior_key (str) – String that identifies the type of prior on the J-factor
- sim (str) – String that specifies the simulation scenario
- seed (int or None) – Key for the simulation instance, used for bookkeeping and file names
- clobber (bool) – Flag to overwrite existing files.
-
usage
= 'dmpipe-stack-likelihood [options]'¶
-
static
write_fits_files
(stacked_dict, resultsfile, limitfile, clobber=False)[source]¶ Write the stacked DMCastroData object and limits a FITS files
Parameters:
-
static
write_stacked
(ttype, roster_name, stacked_dict, astro_prior_key, sim, seed, clobber)[source]¶ Write the stacked DMCastroData object to a FITS file
Parameters: - ttype (str) – Type of target, used for bookkeeping and file names
- roster_name (str) – Name of the roster, used for bookkeeping and file names
- stacked_dict (dict) – Dictionary of DMCastroData objects, keyed by channel
- astro_prior_key (str) – String that identifies the type of prior on the J-factor
- sim (str) – String that specifies the simulation scenario
- seed (int or None) – Key for the simulation instance, used for bookkeeping and file names
- clobber (bool) – Flag to overwrite existing files.
-
class
dmpipe.
CollectLimits
(**kwargs)[source]¶ Bases:
fermipy.jobs.link.Link
Small class to collect limit results from a series of simulations.
Parameters: - outfile (<type 'str'>) – Path to output file. [None]
- seed (<type 'int'>) – Seed number for first simulation. [0]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- limitfile (<type 'str'>) – Path to file with limits. [None]
- summaryfile (<type 'str'>) – Path to file with results summaries. [None]
- specconfig (<type 'str'>) – Path to DM yaml file defining DM spectra of interest. [None]
- nsims (<type 'int'>) – Number of simulations to run. [20]
-
appname
= 'dmpipe-collect-limits'¶
-
default_options
= {'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'limitfile': (None, 'Path to file with limits.', <type 'str'>), 'nsims': (20, 'Number of simulations to run.', <type 'int'>), 'outfile': (None, 'Path to output file.', <type 'str'>), 'seed': (0, 'Seed number for first simulation.', <type 'int'>), 'specconfig': (None, 'Path to DM yaml file defining DM spectra of interest.', <type 'str'>), 'summaryfile': (None, 'Path to file with results summaries.', <type 'str'>)}¶
-
description
= 'Collect Limits from simulations'¶
-
linkname_default
= 'collect-limits'¶
-
usage
= 'dmpipe-collect-limits [options]'¶
Job-dispatch Analysis Classes¶
-
class
dmpipe.
ConvertCastro_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for the ConvertCastro script
This does a triple loop over targets, spatial profiles and J-factor priorsParameters: - astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- clobber (<type 'bool'>) – Overwrite existing files. [False]
- seed (<type 'int'>) – Seed number for first simulation. [0]
- nsims (<type 'int'>) – Number of simulations to run. [20]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- targetlist (<type 'str'>) – Path to the target list. [None]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
- specfile (<type 'str'>) – Path to DM spectrum file. [None]
-
appname
= 'dmpipe-convert-castro-sg'¶
-
clientclass
¶ alias of
ConvertCastro
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'clobber': (False, 'Overwrite existing files.', <type 'bool'>), 'nsims': (20, 'Number of simulations to run.', <type 'int'>), 'seed': (0, 'Seed number for first simulation.', <type 'int'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>), 'specfile': (None, 'Path to DM spectrum file.', <type 'str'>), 'targetlist': (None, 'Path to the target list.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Run analyses on a series of ROIs'¶
-
job_time
= 600¶
-
usage
= 'dmpipe-convert-castro-sg [options]'¶
-
class
dmpipe.
StackLikelihood_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for StackLikelihood
This loops over the types of priors on the J-factorParameters: - specconfig (<type 'str'>) – Path to DM spectrum file. [None]
- astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- clobber (<type 'bool'>) – Overwrite existing files. [False]
- rosterlist (<type 'str'>) – Path to the roster list. [None]
- nsims (<type 'int'>) – Number of simulations to run. [20]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- seed (<type 'int'>) – Seed number for first simulation. [0]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
-
appname
= 'dmpipe-stack-likelihood-sg'¶
-
clientclass
¶ alias of
StackLikelihood
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'clobber': (False, 'Overwrite existing files.', <type 'bool'>), 'nsims': (20, 'Number of simulations to run.', <type 'int'>), 'rosterlist': (None, 'Path to the roster list.', <type 'str'>), 'seed': (0, 'Seed number for first simulation.', <type 'int'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>), 'specconfig': (None, 'Path to DM spectrum file.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Run analyses on a series of ROIs'¶
-
job_time
= 120¶
-
usage
= 'dmpipe-stack-likelihood-sg [options]'¶
-
class
dmpipe.
CollectLimits_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for CollectLimits
This does a triple loop over all targets, profiles and j-factor priors.Parameters: - astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- nsims (<type 'int'>) – Number of simulations to run. [20]
- write_full (<type 'bool'>) – Write file with full collected results [False]
- seed (<type 'int'>) – Seed number for first simulation. [0]
- specconifg (<type 'str'>) – Path to DM yaml file defining DM spectra of interest. [None]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- targetlist (<type 'str'>) – Path to the target list. [None]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
-
appname
= 'dmpipe-collect-limits-sg'¶
-
clientclass
¶ alias of
CollectLimits
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'nsims': (20, 'Number of simulations to run.', <type 'int'>), 'seed': (0, 'Seed number for first simulation.', <type 'int'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>), 'specconifg': (None, 'Path to DM yaml file defining DM spectra of interest.', <type 'str'>), 'targetlist': (None, 'Path to the target list.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>), 'write_full': (False, 'Write file with full collected results', <type 'bool'>)}¶
-
description
= 'Run analyses on a series of ROIs'¶
-
job_time
= 120¶
-
usage
= 'dmpipe-collect-limits-sg [options]'¶
-
class
dmpipe.
CollectStackedLimits_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for this script
This adds the following arguments:Parameters: - rosterlist (<type 'str'>) – Path to the target list. [None]
- write_summary (<type 'bool'>) – Write file with summary of collected results [False]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- write_full (<type 'bool'>) – Write file with full collected results [False]
- astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- nsims (<type 'int'>) – Number of simulations to run. [20]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- seed (<type 'int'>) – Seed number for first simulation. [0]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
-
appname
= 'dmpipe-collect-stacked-limits-sg'¶
-
clientclass
¶ alias of
CollectLimits
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'nsims': (20, 'Number of simulations to run.', <type 'int'>), 'rosterlist': (None, 'Path to the target list.', <type 'str'>), 'seed': (0, 'Seed number for first simulation.', <type 'int'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>), 'write_full': (False, 'Write file with full collected results', <type 'bool'>), 'write_summary': (False, 'Write file with summary of collected results', <type 'bool'>)}¶
-
description
= 'Run analyses on a series of ROIs'¶
-
job_time
= 120¶
-
usage
= 'dmpipe-collect-stacked-limits-sg [options]'¶
Standalone Plotting Classes¶
-
class
dmpipe.
PlotDMSpectra
(**kwargs)[source]¶ Bases:
fermipy.jobs.link.Link
Small class to plot the DM spectra from pre-computed tables.
Parameters: - mass (<type 'float'>) – DM particle mass [100]
- outfile (<type 'str'>) – Path to output file. [None]
- chan (<type 'str'>) – DM annihilation channel [bb]
- infile (<type 'str'>) – Path to input file. [None]
- spec_type (<type 'str'>) – Type of flux to consider [eflux]
-
appname
= 'dmpipe-plot-dm-spectra'¶
-
default_options
= {'chan': ('bb', 'DM annihilation channel', <type 'str'>), 'infile': (None, 'Path to input file.', <type 'str'>), 'mass': (100, 'DM particle mass', <type 'float'>), 'outfile': (None, 'Path to output file.', <type 'str'>), 'spec_type': ('eflux', 'Type of flux to consider', <type 'str'>)}¶
-
description
= 'Plot the DM spectra stored in pre-computed tables'¶
-
linkname_default
= 'plot-dm-spectra'¶
-
usage
= 'dmpipe-plot-dm-spectra [options]'¶
-
class
dmpipe.
PlotDM
(**kwargs)[source]¶ Bases:
fermipy.jobs.link.Link
Small class to plot the likelihood vs <sigma v> and DM particle mass
Parameters: - outfile (<type 'str'>) – Path to output file. [None]
- chan (<type 'str'>) – DM annihilation channel [bb]
- infile (<type 'str'>) – Path to input file. [None]
- global_min (<type 'bool'>) – Use global min for castro plots. [False]
-
appname
= 'dmpipe-plot-dm'¶
-
default_options
= {'chan': ('bb', 'DM annihilation channel', <type 'str'>), 'global_min': (False, 'Use global min for castro plots.', <type 'bool'>), 'infile': (None, 'Path to input file.', <type 'str'>), 'outfile': (None, 'Path to output file.', <type 'str'>)}¶
-
description
= 'Plot the likelihood vs <sigma v> and DM particle mass'¶
-
linkname_default
= 'plot-dm'¶
-
usage
= 'dmpipe-plot-dm [options]'¶
-
class
dmpipe.
PlotLimits
(**kwargs)[source]¶ Bases:
fermipy.jobs.link.Link
Small class to Plot DM limits on <sigma v> versus mass.
Parameters: - bands (<type 'str'>) – Name of file with expected limit bands. [None]
- chan (<type 'str'>) – DM annihilation channel [bb]
- infile (<type 'str'>) – Path to input file. [None]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
- outfile (<type 'str'>) – Path to output file. [None]
-
appname
= 'dmpipe-plot-limits'¶
-
default_options
= {'bands': (None, 'Name of file with expected limit bands.', <type 'str'>), 'chan': ('bb', 'DM annihilation channel', <type 'str'>), 'infile': (None, 'Path to input file.', <type 'str'>), 'outfile': (None, 'Path to output file.', <type 'str'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>)}¶
-
description
= 'Plot DM limits on <sigma v> versus mass'¶
-
linkname_default
= 'plot-limits'¶
-
usage
= 'dmpipe-plot-limits [options]'¶
Job-dispatch Plotting Classes¶
-
class
dmpipe.
PlotLimits_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for PlotLimits
This does a triple nested loop over targets, profiles and j-factor priorsParameters: - channels (<type 'list'>) – DM annihilation channels [[]]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- targetlist (<type 'str'>) – Path to the target list. [None]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
-
appname
= 'dmpipe-plot-limits-sg'¶
-
clientclass
¶ alias of
PlotLimits
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'channels': ([], 'DM annihilation channels', <type 'list'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'targetlist': (None, 'Path to the target list.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Make castro plots for set of targets'¶
-
job_time
= 60¶
-
usage
= 'dmpipe-plot-limits-sg [options]'¶
-
class
dmpipe.
PlotStackedLimits_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for PlotStackedLimits
This does a double nested loop over rosters and j-factor priorsParameters: - rosterlist (<type 'str'>) – Path to the roster list. [None]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- bands (<type 'str'>) – Name of file with expected limit bands. [None]
- channels (<type 'list'>) – DM annihilation channels [[]]
- astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- nsims (<type 'int'>) – Number of simulations to run. [20]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- seed (<type 'int'>) – Seed number for first simulation. [0]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
-
appname
= 'dmpipe-plot-stacked-limits-sg'¶
-
clientclass
¶ alias of
PlotLimits
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'bands': (None, 'Name of file with expected limit bands.', <type 'str'>), 'channels': ([], 'DM annihilation channels', <type 'list'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'nsims': (20, 'Number of simulations to run.', <type 'int'>), 'rosterlist': (None, 'Path to the roster list.', <type 'str'>), 'seed': (0, 'Seed number for first simulation.', <type 'int'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Make castro plots for set of targets'¶
-
job_time
= 60¶
-
usage
= 'dmpipe-plot-stacked-limits-sg [options]'¶
-
class
dmpipe.
PlotDM_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for PlotDM
This does a quadruple nested loop over targets, profiles, j-factor priors and channelsParameters: - channels (<type 'list'>) – DM annihilation channels [[]]
- astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- global_min (<type 'bool'>) – Use global min for castro plots. [False]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- targetlist (<type 'str'>) – Path to the target list. [None]
-
appname
= 'dmpipe-plot-dm-sg'¶
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'channels': ([], 'DM annihilation channels', <type 'list'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'global_min': (False, 'Use global min for castro plots.', <type 'bool'>), 'targetlist': (None, 'Path to the target list.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Make castro plots for set of targets'¶
-
job_time
= 60¶
-
usage
= 'dmpipe-plot-dm-sg [options]'¶
-
class
dmpipe.
PlotStackedDM_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for PlotDM
This does a triple loop over rosters, j-factor priors and channelsParameters: - rosterlist (<type 'str'>) – Path to the roster list. [None]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- channels (<type 'list'>) – DM annihilation channels [[]]
- astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- global_min (<type 'bool'>) – Use global min for castro plots. [False]
- nsims (<type 'int'>) – Number of simulations to run. [20]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- seed (<type 'int'>) – Seed number for first simulation. [0]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
-
appname
= 'dmpipe-plot-stacked-dm-sg'¶
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'channels': ([], 'DM annihilation channels', <type 'list'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'global_min': (False, 'Use global min for castro plots.', <type 'bool'>), 'nsims': (20, 'Number of simulations to run.', <type 'int'>), 'rosterlist': (None, 'Path to the roster list.', <type 'str'>), 'seed': (0, 'Seed number for first simulation.', <type 'int'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Make castro plots for set of targets'¶
-
job_time
= 60¶
-
usage
= 'dmpipe-plot-stacked-dm-sg [options]'¶
-
class
dmpipe.
PlotControlLimits_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for PlotLimits
This does a quadruple loop over rosters, j-factor priors, channels, and expectation bandsParameters: - channels (<type 'list'>) – DM annihilation channels [[]]
- rosterlist (<type 'str'>) – Path to the target list. [None]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
-
appname
= 'dmpipe-plot-control-limits-sg'¶
-
clientclass
¶ alias of
PlotLimits
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'channels': ([], 'DM annihilation channels', <type 'list'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'rosterlist': (None, 'Path to the target list.', <type 'str'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Make limits plots for positve controls'¶
-
job_time
= 60¶
-
usage
= 'dmpipe-plot-control-limits-sg [options]'¶
-
class
dmpipe.
PlotFinalLimits_SG
(link, **kwargs)[source]¶ Bases:
fermipy.jobs.scatter_gather.ScatterGather
Small class to generate configurations for PlotLimits
This does a quadruple loop over rosters, j-factor priors, channels, and expectation bandsParameters: - sims (<type 'list'>) – Names of the simulation scenario. [[]]
- channels (<type 'list'>) – DM annihilation channels [[]]
- rosterlist (<type 'str'>) – Path to the roster list. [None]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- astro_priors (<type 'list'>) – Types of Prior on J-factor or D-factor [[]]
- ttype (<type 'str'>) – Type of target being analyzed. [None]
-
appname
= 'dmpipe-plot-final-limits-sg'¶
-
clientclass
¶ alias of
PlotLimits
-
default_options
= {'astro_priors': ([], 'Types of Prior on J-factor or D-factor', <type 'list'>), 'channels': ([], 'DM annihilation channels', <type 'list'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'rosterlist': (None, 'Path to the roster list.', <type 'str'>), 'sims': ([], 'Names of the simulation scenario.', <type 'list'>), 'ttype': (None, 'Type of target being analyzed.', <type 'str'>)}¶
-
description
= 'Make final limits plots'¶
-
job_time
= 60¶
-
usage
= 'dmpipe-plot-final-limits-sg [options]'¶
Pipeline Classes¶
-
class
dmpipe.
PipelineData
(**kwargs)[source]¶ Bases:
fermipy.jobs.chain.Chain
Chain together the steps of the dSphs pipeline
This chain consists of:
- analyze-roi : AnalyzeROI_SG
- Do the baseline analysis for each target in the target list.
- analyze-sed : AnalyzeSED_SG
- Extract the SED for each profile for each target in the target list.
- convert-castro : ConvertCastro_SG
- Convert the SED to DM-space for each target, profile and J-factor prior type
- stack-likelihood : StackLikelihood_SG
- Stack the likelihoods for each roster in the analysis, for each J-factor prior type.
Optional plotting modules includde
- plot-castro : PlotCastro
- Make ‘Castro’ plots of the SEDs for each profile for each target in the target list.
- plot-dm : PlotDM_SG
- Make DM ‘Castro’ plots for each profile, target, J-factor prior type and channel.
- plot-limits : PlotLimits_SG
- Make DM ‘Castro’ plots for each profile, target, J-factor prior type and channel.
- plot-stacked-dm : PlotStackedDM_SG
- Make DM ‘Castro’ plots for each roster, J-factor prior type and channel.
- plot-stacked-limits : PlotStackedLimits_SG
- Make DM ‘Castro’ plots for each roster, J-factor prior type and channel.
Parameters: - config (<type 'str'>) – Path to fermipy config file. [None]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
-
appname
= 'dmpipe-pipeline-data'¶
-
default_options
= {'config': (None, 'Path to fermipy config file.', <type 'str'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>)}¶
-
description
= 'Data analysis pipeline'¶
-
linkname_default
= 'pipeline-data'¶
-
usage
= 'dmpipe-pipeline-data [options]'¶
-
class
dmpipe.
PipelineSim
(**kwargs)[source]¶ Bases:
fermipy.jobs.chain.Chain
Chain together the steps of the dSphs pipeline for simulations
This chain consists of:
- copy-base-roi : CopyBaseROI_SG
- Copy the baseline analysis directory files for each target.
- simulate-roi : AnalyzeROI_SG
- Simulate the SED analysis for each target and profile in the target list.
- convert-castro : ConvertCastro_SG
- Convert the SED to DM-space for each target, profile and J-factor prior type
- stack-likelihood : StackLikelihood_SG
- Stack the likelihoods for each roster in the analysis, for each J-factor prior type.
- collect-sed : CollectSED_SG
- Collect and summarize the SED results for all the simulations.
- collect-limits : CollectLimits_SG
- Collect and summarize the limits for all the targets for all the simulations.
- collect-stacked-limits : CollectStackedLimits_SG
- Collect and summarize the stacked imits for all the targets for all the simulations.
Optional plotting modules includde
- plot-stacked-dm : PlotStackedDM_SG
- Make DM ‘Castro’ plots for each roster, J-factor prior type and channel.
- plot-stacked-limits : PlotStackedLimits_SG
- Make DM ‘Castro’ plots for each roster, J-factor prior type and channel.
- plot-control-limits : PlotControlLimits_SG
- Make DM ‘Castro’ plots for each roster, J-factor prior type and channel.
- plot-control-mles : PlotControlMLEs_SG
- Make DM Maximum Likelihood estimate plots for each roster, J-factor prior type and channel.
Parameters: - config (<type 'str'>) – Path to fermipy config file. [None]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
- sim (<type 'str'>) – Name of the simulation scenario. [None]
-
appname
= 'dmpipe-pipeline-sim'¶
-
default_options
= {'config': (None, 'Path to fermipy config file.', <type 'str'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>), 'sim': (None, 'Name of the simulation scenario.', <type 'str'>)}¶
-
description
= 'Run gtselect and gtbin together'¶
-
linkname_default
= 'pipeline-sim'¶
-
usage
= 'dmpipe-pipeline-sim [options]'¶
-
class
dmpipe.
PipelineRandom
(**kwargs)[source]¶ Bases:
fermipy.jobs.chain.Chain
- Chain together the steps of the dSphs pipeline for random
direction studies.
This chain consists of:
- copy-base-roi : CopyBaseROI_SG
- Copy the baseline analysis directory files for each target.
- random-dir-gen : RandomDirGen_SG
- Select random directions inside the ROI and generate approriate target files.
- analyze-sed : AnalyzeSED_SG
- Extract the SED for each profile for each target in the target list.
- convert-castro : ConvertCastro_SG
- Convert the SED to DM-space for each target, profile and J-factor prior type
- stack-likelihood : StackLikelihood_SG
- Stack the likelihoods for each roster in the analysis, for each J-factor prior type.
- collect-sed : CollectSED_SG
- Collect and summarize the SED results for all the simulations.
- collect-limits : CollectLimits_SG
- Collect and summarize the limits for all the targets for all the simulations.
- collect-stacked-limits : CollectStackedLimits_SG
- Collect and summarize the stacked imits for all the targets for all the simulations.
Optional plotting modules includde
- plot-stacked-dm : PlotStackedDM_SG
- Make DM ‘Castro’ plots for each roster, J-factor prior type and channel.
- plot-stacked-limits : PlotStackedLimits_SG
- Make DM ‘Castro’ plots for each roster, J-factor prior type and channel.
Parameters: - config (<type 'str'>) – Path to fermipy config file. [None]
- dry_run (<type 'bool'>) – Print commands but do not run them. [False]
-
appname
= 'dmpipe-pipeline-random'¶
-
default_options
= {'config': (None, 'Path to fermipy config file.', <type 'str'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>)}¶
-
description
= 'Data analysis pipeline for random directions'¶
-
linkname_default
= 'pipeline-random'¶
-
usage
= 'dmpipe-pipeline-random [options]'¶
-
class
dmpipe.
Pipeline
(**kwargs)[source]¶ Bases:
fermipy.jobs.chain.Chain
Top level DM pipeline analysis chain.
This chain consists of:
- prepare-targets : PrepareTargets
- Make the input files need for all the targets in the analysis.
- spec-table : SpecTable
- Build the FITS table with the DM spectra for all the channels being analyzed.
- data : PipelineData
- Data analysis pipeline
- sim_{sim_name} : PipelineSim
- Simulation pipeline for each simulation scenario
- random : PipelineRandom
- Analysis pipeline for random direction control studies
- final-plots : PlotFinalLimits_SG
- Make the final analysis results plots
-
appname
= 'dmpipe-pipeline'¶
-
default_options
= {'config': (None, 'Path to fermipy config file.', <type 'str'>), 'dry_run': (False, 'Print commands but do not run them.', <type 'bool'>)}¶
-
description
= 'Data analysis pipeline'¶
-
linkname_default
= 'pipeline'¶
-
preconfigure
(config_yaml)[source]¶ Run any links needed to build files that are used in _map_arguments
-
usage
= 'dmpipe-pipeline [options]'¶