Closed bendhouseart closed 11 months ago
This might partially be because having a value of n/a
in Excel (for "SpecificRadioactivity" and "SpecificRadioactivityUnits" metadata fields) get interpreted as NaN
by python. Explicitly making n/a a string value (i.e. "n/a"
) resolves this issue but triggers a new error message:
File "/usr/local/lib/python3.8/dist-packages/pypet2bids/dcm2niix4pet.py", line 991, in check_meta_radio_inputs
tmp = ((InjectedRadioactivity * (10 ** 6) / SpecificRadioactivity) * (10 ** 6))
TypeError: unsupported operand type(s) for /: 'int' and 'str'
Which seems to be caused by an improper variable type
for the "SpecificRadioactivity" and "SpecificRadioactivityUnits" metadata. Simply removing these two fields from the metadata files resolves all issues.
I may be mis-reading the BIDS-specification for PET data, but for these metadata fields, it appears that "n/a"
is acceptable and even should be entered, assuming it isn't an FDG sequence.
Yes, "n/a" is accepted as often the data simply isn't available. We'd rather people share what they have then give up entirely.
@dlevitas closing this as I believe it was fixed some time ago, just not closed. Let me know if otherwise.
Describe the bug Given the attached spreadsheet as input to the
-m
flag, pet2bids raises a flatten series error, it seems to collect two values from the csv where there should only be on,n/a
in this example. However, it's returning a series containing[0, 'n/a']
which is believed to create this error, see:pet_metadata.csv
Expected behaviour Reading in the attached spreadsheet should yield a specific radioactivity of
n/a
.Desktop (please complete the following information):