diff --git a/nimare/reports/base.py b/nimare/reports/base.py index a80715ba5..e26be2c5a 100644 --- a/nimare/reports/base.py +++ b/nimare/reports/base.py @@ -484,15 +484,12 @@ def __init__( ) elif meta_type == "IBMA": # Use "z_maps", for Fishers, and Stouffers; otherwise use "beta_maps". - if "z_maps" in self.results.estimator.inputs_: - key_maps = "z_maps" - x_label = "Z" - elif "t_maps" in self.results.estimator.inputs_: - key_maps = "t_maps" - x_label = "T" - else: - key_maps = "beta_maps" - x_label = "Beta" +INPUT_TYPE_LABELS = {'z_maps': 'Z', 't_maps': 'T', 'beta_maps': 'Beta'} +for key_maps, x_label in INPUT_TYPE_LABELS.items(): + if key_maps in self.results.estimator.inputs_: + break +else: + key_maps, x_label = 'beta_maps', 'Beta' maps_arr = self.results.estimator.inputs_[key_maps] ids_ = self.results.estimator.inputs_["id"]