示例#1
0
                   logging.INFO,
                   filename=os.path.join(currPath, 'logs/sample.log'))
    argParser = argparse.ArgumentParser()
    argParser.add_argument('--filesremote',
                           '-x',
                           default=False,
                           action='store_true',
                           help='dicom files retrieved from remote server')
    argParser.add_argument('--config',
                           '-c',
                           default=defaultConfig,
                           type=str,
                           help='experiment file (.json or .toml)')
    argParser.add_argument(
        '--test',
        '-t',
        default=False,
        action='store_true',
        help='start projectInterface in test mode, unsecure')
    args = argParser.parse_args()

    params = StructDict({
        'fmriPyScript': scriptToRun,
        'initScript': initScript,
        'finalizeScript': finalizeScript,
        'filesremote': args.filesremote,
    })

    web = Web()
    web.start(params, args.config, testMode=args.test)
示例#2
0
defaultConfig = os.path.join(currPath, 'conf/faceMatching_organized.toml')

if __name__ == "__main__":
    installLoggers(logging.INFO,
                   logging.INFO,
                   filename=os.path.join(currPath, 'logs/webServer.log'))

    argParser = argparse.ArgumentParser()
    argParser.add_argument('--filesremote',
                           '-x',
                           default=False,
                           action='store_true',
                           help='dicom files retrieved from remote server')
    argParser.add_argument('--config',
                           '-c',
                           default=defaultConfig,
                           type=str,
                           help='experiment file (.json or .toml)')
    args = argParser.parse_args()
    # HERE: Set the path to the fMRI Python script to run here
    params = StructDict({
        'fmriPyScript': 'projects/faceMatching/faceMatching.py',
        'filesremote': args.filesremote,
    })

    cfg = loadConfigFile(args.config)

    web = Web()
    web.start(params, cfg)