16 auto m_plotting = m.def_submodule(
"plotting");
17 m_plotting.doc() =
"This is a Python binding of MaCh3s C++ based plotting library.";
19 py::class_<MaCh3Plotting::PlottingManager>(m_plotting,
"PlottingManager")
21 py::init<const std::string &>(),
22 "construct a PlottingManager using the specified config file",
23 py::arg(
"config_file_name")
28 "default constructor, will initialise the PlottingManager with the default plotting config"
33 &MaCh3Plotting::PlottingManager::initialise,
34 "initalise this PlottingManager"
40 "Print a usage message for the current executable"
45 &MaCh3Plotting::PlottingManager::parseInputsVec,
46 "Parse command line variables",
52 &MaCh3Plotting::PlottingManager::setExec,
53 "Set the name of the current executable, which will be used when getting executable specific options from the plotting config file",
59 &MaCh3Plotting::PlottingManager::getFileName,
60 "Get the path to a particular file",
61 py::arg(
"input_file_id")
66 &MaCh3Plotting::PlottingManager::getFileLabel,
67 "Get the specified label of a particular input file",
68 py::arg(
"input_file_id")
73 &MaCh3Plotting::PlottingManager::getDrawOptions,
74 "Get any additional root drawing options specified by the user"
79 py::overload_cast<const std::string &>(&MaCh3Plotting::PlottingManager::getOutputName),
80 "Get the output name specified by the user, can specify an additional *suffix* to append to the file name but before the file extension",
81 py::arg(
"suffix") =
""
86 &MaCh3Plotting::PlottingManager::getFileNames,
87 "Get the list of all file names"
92 &MaCh3Plotting::PlottingManager::getFileLabels,
93 "Get the list of all file labels"
98 &MaCh3Plotting::PlottingManager::getNFiles,
99 "Get the number of specified files"
103 "get_split_by_sample",
104 &MaCh3Plotting::PlottingManager::getSplitBySample,
105 "Get whether or not the user has set the 'split by sample' (-s) option"
110 &MaCh3Plotting::PlottingManager::getPlotRatios,
111 "Get whether or not the user specified the 'plot ratios' (-r) option"
116 &MaCh3Plotting::PlottingManager::getDrawGrid,
117 "Get wheter or not the user has specified the 'draw grid' (-g) option"
122 &MaCh3Plotting::PlottingManager::style, py::return_value_policy::reference,
123 "Get the StyleManager associated with this PlottingManager"
128 &MaCh3Plotting::PlottingManager::input, py::return_value_policy::reference,
129 "Get the InputManager associated with this PlottingManager"
137 py::class_<MaCh3Plotting::InputManager>(m_plotting,
"InputManager")
140 &MaCh3Plotting::InputManager::print,
141 "Print a summary of everything this manager knows"
146 &MaCh3Plotting::InputManager::getLLHScan,
147 "Get the LLH scan for a particular parameter from a particular file",
148 py::arg(
"input_file_id"),
149 py::arg(
"param_name"),
150 py::arg(
"LLH_type") =
"total"
154 "get_llh_scan_by_sample",
155 &MaCh3Plotting::InputManager::getSampleSpecificLLHScan,
156 "Get the LLH scan for a particular parameter from a particular file for a particular sample",
157 py::arg(
"input_file_id"),
164 &MaCh3Plotting::InputManager::getEnabledLLH,
165 "Get whether a particular file has LLH scans for a particular parameter",
166 py::arg(
"input_file_id"),
168 py::arg(
"LLH_type") =
"total"
172 "get_enabled_llh_by_sample",
173 &MaCh3Plotting::InputManager::getEnabledLLHBySample,
174 "Get whether a particular file has LLH scans for a particular parameter for a particular sample",
175 py::arg(
"input_file_id"),
181 "get_post_fit_error",
182 &MaCh3Plotting::InputManager::getPostFitError,
183 "Get the post fit error for a parameter from a particular file",
184 py::arg(
"input_file_id"),
186 py::arg(
"error_type") =
""
190 "get_post_fit_value",
191 &MaCh3Plotting::InputManager::getPostFitValue,
192 "Get the post fit value for a parameter from a particular file",
193 py::arg(
"input_file_id"),
195 py::arg(
"error_type") =
""
199 "get_known_parameters",
200 &MaCh3Plotting::InputManager::getKnownParameters,
201 "Get all the parameters that this manager knows about. Useful for iterating over"
206 &MaCh3Plotting::InputManager::getKnownSamples,
207 "Get all the samples that this manager knows about. Useful for iterating over"
211 "get_tagged_parameters",
212 &MaCh3Plotting::InputManager::getTaggedParameters,
213 "Get all the parameters whose tags match some specified list",
215 py::arg(
"check_type") =
"all"
219 "get_tagged_samples",
220 &MaCh3Plotting::InputManager::getTaggedSamples,
221 "Get all the samples whose tags match some specified list",
223 py::arg(
"check_type") =
"all"
228 &MaCh3Plotting::InputManager::getNInputFiles,
229 "Get the number of input files registered with this manager"
233 "get_known_llh_parameters",
234 &MaCh3Plotting::InputManager::getKnownLLHParameters,
235 "Get all the parameters that a file has LLH scans for",
240 "get_known_llh_samples",
241 &MaCh3Plotting::InputManager::getKnownLLHSamples,
242 "Get all the samples that a file has individual LLH scans for",
247 "get_known_post_fit_parameters",
248 &MaCh3Plotting::InputManager::getKnownPostFitParameters,
249 "Get all the parameters that a file has post fit values and errors for",
254 "get_known_MCMC_parameters",
255 &MaCh3Plotting::InputManager::getKnownMCMCParameters,
256 "Get all the parameters that a file has MCMC chain entries for",
261 "get_known_1d_posterior_parameters",
262 &MaCh3Plotting::InputManager::getKnown1dPosteriorParameters,
263 "Get all the parameters that a file has processed 1d posteriors for",
269 &MaCh3Plotting::InputManager::getMCMCentry,
270 "Load up a particular step in the MCMC chain for a particular input file",
277 &MaCh3Plotting::InputManager::getMCMCvalue,
278 "Get the value of a particular parameter for the current entry (set by set_MCMC_entry) in the chain for a particular file",
284 "get_n_MCMC_entries",
285 &MaCh3Plotting::InputManager::getnMCMCentries,
286 "Get the number of entries in the MCMC chain in a particular file"
291 &MaCh3Plotting::InputManager::get1dPosterior,
292 "Get the 1d posterior for a particular parameter from a particular file",
298 py::class_<MaCh3Plotting::StyleManager>(m_plotting,
"StyleManager")
300 "prettify_parameter_name",
301 &MaCh3Plotting::StyleManager::prettifyParamName,
302 "Convert internally used parameter name to a nice pretty name that can be used in plots",
307 "prettify_sample_name",
308 &MaCh3Plotting::StyleManager::prettifyParamName,
309 "Convert internally used sample name to a nice pretty name that can be used in plots",