Skip to content

Commit

Permalink
create mapping for the variables
Browse files Browse the repository at this point in the history
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
  • Loading branch information
jdkent and sourcery-ai[bot] authored Aug 14, 2024
1 parent 12bcf1e commit 05de9c2
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions nimare/reports/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 05de9c2

Please sign in to comment.