mangadap.config.analysisplan module

Classes to handle MaNGA DAP analysis plans.


License

Copyright © 2019, SDSS-IV/MaNGA Pipeline Group


class mangadap.config.analysisplan.AnalysisPlan(plan, cube=None, analysis_path=None)[source]

Bases: object

Container class for a set of analysis plans.

_validate()[source]

Validate the provided plans.

common_path()[source]

Return the path for data common to all plans.

Parameters:

cube (DataCube, optional) – Cube being analyzed. Passed for cube-specific path specification. Not used by this base class.

Returns:

Path object for the “common” output

Return type:

Path

dap_file_root(cube, mode=None, plan_index=None)[source]

Return the general root name for an output file.

The default returned by this base class is:

{cube.output_root}-{mode}-{self['key'][plan_index]}

where mode and self['key'][plan_index] are only included if mode or plan_index are provided.

Parameters:
  • cube (DataCube) – Cube being analyzed. This is used to provide the primary root of the output name.

  • mode (str, optional) – An optional “mode” included in the file name. If None, not include in the output string.

  • plan_index (int, optional) – The index of the plan. This is used to select the ‘key’ of the analysis plan being used, which is included in the file name. If None, this is not included in the file name.

Returns:

General root for output DAP file names.

Return type:

str

classmethod default(**kwargs)[source]

Return the default analysis plan set.

classmethod from_toml(ifile, **kwargs)[source]

Instantiate the plan from a TOML file.

keys()[source]
method_path(plan_index=0, qa=False, ref=False)[source]

Return the path for method-specific output.

Parameters:
  • cube (DataCube, optional) – Cube being analyzed. Passed for cube-specific path specification. Not used by this base class.

  • plan_index (int, optional) – The index of the plan. This is used to select the ‘key’ of the analysis plan being used, which is used as the subdirectory for the output.

  • qa (bool, optional) – Flag that the output is specifically quality assessment plots.

  • ref (bool, optional) – Flag that the output is specifically reference data.

Returns:

Path object for the method-specific output

Return type:

Path

Raises:

ValueError – Raised if the plan index is invalid or if both qa and ref are true.

parse()[source]