Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaNs in QC metrics lead to opaque errors #8

Open
tsalo opened this issue Jan 23, 2022 · 0 comments
Open

NaNs in QC metrics lead to opaque errors #8

tsalo opened this issue Jan 23, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@tsalo
Copy link
Member

tsalo commented Jan 23, 2022

QCRSFC and high-low end up with no values after the moving average calculation, because the analysis values are all NaNs and the moving average involves dropping NaNs.

 Traceback (most recent call last):
  File "/home/data/nbc/misc-projects/Salo_PowerReplication/code/experiment-2/05_ddmra.py", line 124, in <module>
    run_ddmra_analyses(project_dir, participants_file, target_file_patterns, confounds_pattern)
  File "/home/data/nbc/misc-projects/Salo_PowerReplication/code/experiment-2/05_ddmra.py", line 92, in run_ddmra_analyses
    qc_thresh=0.2,
  File "/home/data/nbc/misc-projects/Salo_PowerReplication/ddmra/ddmra/workflows.py", line 210, in run_analyses
    smoothing_curves.loc[smoothing_curve_distances, "scrubbing"] = scrub_smoothing_curve
  File "/home/data/nbc/misc-projects/Salo_PowerReplication/code/conda_env/lib/python3.7/site-packages/pandas/core/indexing.py", line 719, in __setitem__
    indexer = self._get_setitem_indexer(key)
  File "/home/data/nbc/misc-projects/Salo_PowerReplication/code/conda_env/lib/python3.7/site-packages/pandas/core/indexing.py", line 660, in _get_setitem_indexer
    return self._convert_tuple(key, is_setter=True)
  File "/home/data/nbc/misc-projects/Salo_PowerReplication/code/conda_env/lib/python3.7/site-packages/pandas/core/indexing.py", line 785, in _convert_tuple
    idx = self._convert_to_indexer(k, axis=i, is_setter=is_setter)
  File "/home/data/nbc/misc-projects/Salo_PowerReplication/code/conda_env/lib/python3.7/site-packages/pandas/core/indexing.py", line 1257, in _convert_to_indexer
    return self._get_listlike_indexer(key, axis)[1]
  File "/home/data/nbc/misc-projects/Salo_PowerReplication/code/conda_env/lib/python3.7/site-packages/pandas/core/indexing.py", line 1314, in _get_listlike_indexer
    self._validate_read_indexer(keyarr, indexer, axis)
  File "/home/data/nbc/misc-projects/Salo_PowerReplication/code/conda_env/lib/python3.7/site-packages/pandas/core/indexing.py", line 1374, in _validate_read_indexer
    raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Float64Index([19.313207915827967, 19.339079605813716, 19.390719429665317,\n                19.4164878389476,  19.44222209522358, 19.467922333931785,\n              19.519221295943137, 19.544820285692065, 19.621416870348583,\n                19.6468827043885,\n              ...\n              142.89506639488994,    142.89856542317,  142.9160592795645,\n              142.93355099485913, 142.95104056983985, 142.95453822806746,\n              142.97202523570826, 142.97552238058094, 143.01048912579805,\n              143.05942821079637],\n             dtype='float64', name='distance', length=11910)] are in the [index]"
@tsalo tsalo added the bug Something isn't working label Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant