From cac627e5f92f6d937e155c53f4eaa87c10e7e90c Mon Sep 17 00:00:00 2001 From: Laetitia Fesselier Date: Tue, 5 Oct 2021 01:24:59 -0400 Subject: [PATCH] CandID -> DDCID and Powerline Freq field type --- python/libs/iEEG.py | 2 ++ python/libs/loris_api.py | 2 +- src/jsx/Configuration.js | 14 +++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/python/libs/iEEG.py b/python/libs/iEEG.py index 54cafa7..901276e 100644 --- a/python/libs/iEEG.py +++ b/python/libs/iEEG.py @@ -233,6 +233,8 @@ def to_bids(self, m_info['subject_id'] = subject_id subject = m_info['subject_id'].replace('_', '').replace('-', '').replace(' ', '') + if line_freq.isnumeric(): + line_freq = int(line_freq) raw.info['line_freq'] = line_freq raw._init_kwargs = { diff --git a/python/libs/loris_api.py b/python/libs/loris_api.py index 7d3f33d..fbfb23d 100644 --- a/python/libs/loris_api.py +++ b/python/libs/loris_api.py @@ -231,6 +231,6 @@ def get_candidate(self, candid): # validate candid if json_resp.get('error'): - return {'error': 'CandID is not valid.'} + return {'error': 'DCCID is not valid.'} return json_resp.get('Meta') diff --git a/src/jsx/Configuration.js b/src/jsx/Configuration.js index 441ff6c..232c391 100644 --- a/src/jsx/Configuration.js +++ b/src/jsx/Configuration.js @@ -783,7 +783,7 @@ const Configuration = (props) => { } else { if (appContext.getFromTask('participantCandID')) { participantCandIDStatus = formatPass( - `LORIS CandID: ${state.participantCandID.get}`, + `LORIS DCCID: ${state.participantCandID.get}`, ); } @@ -1160,6 +1160,10 @@ const Configuration = (props) => { * @param {object|string|boolean} value - element value */ const onUserInput = (name, value) => { + if (typeof value === 'string') { + value = value.trim(); + } + // Update the state of Configuration. switch (name) { case 'recordingID': @@ -1646,11 +1650,15 @@ const Configuration = (props) => { />
-