code
stringlengths
3
6.57k
port_name_size()
colon (:)
_lib.jack_port_name_size()
set_error_function(callback=None)
function (which prints the error message plus a newline to stderr)
callback(message: str)
_set_error_or_info_function(callback, _lib.jack_set_error_function)
set_info_function(callback=None)
function (which prints the info message plus a newline to stderr)
callback(message: str)
_set_error_or_info_function(callback, _lib.jack_set_info_function)
client_pid(name)
_lib.jack_get_client_pid(name.encode()
_set_error_or_info_function(callback, setter)
set_error_function()
set_info_function()
_ffi.callback('void (*)
callback_wrapper(msg)
callback(_ffi.string(msg)
decode()
setter(callback_wrapper)
_check(error_code, msg)
JackError('{0} ({1})
format(msg, error_code)
logging.getLogger(__name__)
re.compile('[^a-zA-Z0-9]')
bids_from_config(yaxil_session, scans_metadata, config, out_base)
next(iter(scans_metadata)
check_dataset_description(out_base)
format(legal.sub('', subject)
format(legal.sub('', session)
format(legal.sub('', subject)
format(legal.sub('', session)
proc_func(config, args)
proc_anat(config, args)
proc_dwi(config, args)
proc_fmap(config, args, func_refs)
check_dataset_description(bids_dir, bids_version='1.4.0', ds_type='raw')
os.path.exists(bids_dir)
os.makedirs(bids_dir)
os.path.join(bids_dir, 'dataset_description.json')
os.path.exists(ds_desc)
open(ds_desc, 'w')
fo.write(json.dumps(js)
proc_func(config, args)
dict()
iterconfig(config, 'func')
scan.get('id', None)
string.Template(templ)
legal.sub('', args.subject)
legal.sub('', args.session)
scan.get('task', None)
scan.get('acquisition', None)
scan.get('run', None)
scan.get('direction', None)
scan.get('modality', None)
os.path.join(args.sourcedata, scan['type'])
os.path.exists(sourcedata_dir)
os.makedirs(sourcedata_dir)
os.path.join(sourcedata_dir, '{0}.dicom'.format(fbase)
logger.info('downloading session=%s, scan=%s, loc=%s', args.session, scan['scan'], dicom_dir)
args.xnat.download(args.session, [scan['scan']], out_dir=dicom_dir)
format(fbase)
os.path.join(scan['type'], fname)
os.path.join(args.bids, scan['type'], fname)
logger.info('converting %s to %s', dicom_dir, fullfile)
convert(dicom_dir, fullfile)
os.path.join(args.bids, scan['type'], fbase + '.json')
open(sidecar_file)
json.load(fo)
commons.atomic_write(sidecar_file, json.dumps(sidecarjs, indent=2)
proc_anat(config, args)
dict()
iterconfig(config, 'anat')
scan.get('id', None)
string.Template(templ)
legal.sub('', args.subject)
legal.sub('', args.session)
scan.get('acquisition', None)
scan.get('run', None)
scan.get('modality', None)
os.path.join(args.sourcedata, scan['type'])
os.path.exists(sourcedata_dir)
os.makedirs(sourcedata_dir)
os.path.join(sourcedata_dir, '{0}.dicom'.format(fbase)
logger.info('downloading session=%s, scan=%s, loc=%s', args.session, scan['scan'], dicom_dir)
args.xnat.download(args.session, [scan['scan']], out_dir=dicom_dir)
nifti (edge cases for T1w_vNav_setter)
format(fbase)
os.path.join(scan['type'], fname)
os.path.join(args.bids, scan['type'], fname)
logger.info('converting %s to %s', dicom_dir, fullfile)
scan.get('modality', None)
list()
fullfile.replace('_T1vnav', '_split-%r_T1vnav')
glob.glob(os.path.join(dicom_dir, '*.dcm')
logger.debug('converting single file %s to %s', f, fullfile)
convert(f, fullfile, single_file=True)
re.sub('.nii(.gz)
ffbase.replace('%r', '*')