Skip to content

Commit

Permalink
CandID -> DDCID and Powerline Freq field type
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Oct 5, 2021
1 parent d5c18c5 commit cac627e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions python/libs/iEEG.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion python/libs/loris_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
14 changes: 11 additions & 3 deletions src/jsx/Configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ const Configuration = (props) => {
} else {
if (appContext.getFromTask('participantCandID')) {
participantCandIDStatus = formatPass(
`LORIS CandID: ${state.participantCandID.get}`,
`LORIS DCCID: ${state.participantCandID.get}`,
);
}

Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -1646,11 +1650,15 @@ const Configuration = (props) => {
/>
</div>
<div className='small-pad'>
<NumberInput id='lineFreq'
<SelectInput id='lineFreq'
name='lineFreq'
label='Powerline frequency'
value={state.lineFreq.get}
placeholder='n/a'
emptyOption='n/a'
options={{
'50': '50',
'60': '60',
}}
onUserInput={onUserInput}
help='See BIDS specification for more information'
/>
Expand Down

0 comments on commit cac627e

Please sign in to comment.