Пример #1
0
                else:
                    OutputFileName.append(ScanMeta.get('Name')[j])
                    FileName.append(ScanMeta.get('Name')[j])
            
                FilePathName.append(currPath)
                FileURIName.append(currURI)
    
    
#Write = True    
#if Write:        
if FilePathNameReadable and all(FilePathNameReadable):
    print ('cp %s %s' % (FilePathName, writeHCP.DestinationDir))
    writeHCP.writeFileFromPath(FilePathName, OutputFileName)
    print 'Written bytes: ' + ', '.join(map(str, writeHCP.BytesWrite))
else:
    print ('Destination: %s  URI: %s' % (OutputDir, FileName))
    writeHCP.writeFileFromURL(getHCP, FileURIName, FileName)
    print 'Streamed bytes: ' + ', '.join(map(str, writeHCP.BytesStream))
    print 'Written bytes: ' + ', '.join(map(str, writeHCP.BytesWrite))
    print 'Delta bytes: ' + ', '.join(map(str, list(itertools.imap(operator.sub, writeHCP.BytesStream, writeHCP.BytesWrite))))
    


print 'Total bytes: %s' % (sum(writeHCP.BytesWrite))
print("Duration: %s" % (time.time() - sTime))
    
    
    
    
    
    
Пример #2
0
# getSubjectsSessions
# getURLString
#==============================================================================

    Projects = getHCP.getProjects()
    getHCP.Subject = getHCP.Subjects[0]
    getHCP.SubjectSessions = getHCP.getSubjectSessions()
    getHCP.Session = getHCP.SubjectSessions.get('Sessions')[0]
    getHCP.SessionMeta = getHCP.getSessionMeta()
    

    ScanParms = getHCP.getScanParms()
    ScanMeta = getHCP.getScanMeta()
    
    print ScanMeta.get('URIs')[ScanMeta.get('Collections').index('NIFTI')]
    writeHCP.writeFileFromURL(getHCP, ScanMeta.get('URIs')[ScanMeta.get('Collections').index('NIFTI')])
    
    if (getHCP.Server.find('intradb') != -1):
        AssessorIDs = getHCP.getAssessorIDs( )
        AssessorFileURIList = getHCP.getAssessorOutputFile( AssessorIDs )
        
        
    print getHCP.getProjects()
    print getHCP.SessionId, getHCP.getSessionId()
    print getHCP.Subjects
    print getHCP.getSubjectSessions()
    
#    print getHCP.getFileInfo('https://intradb.humanconnectome.org/data/projects/HCP_Phase2/subjects/192439/experiments/192439_strc/resources/Details/files/StructuralHCP.log')
#    print 'Bytes: ' +getHCP.getFileInfo('https://intradb.humanconnectome.org/data/projects/HCP_Phase2/subjects/197550/experiments/197550_diff/resources/Diffusion/files/Diffusion/data/bvals').get('Bytes')
    print getHCP.getProjects()
    print getHCP.Session
Пример #3
0
                        os.path.normpath(OutputDir + os.sep + OutputFile))
                    OutputFileURIName.append(
                        os.path.normpath(OutputDir + os.sep + OutputFile))
                else:
                    OutputFileName.append(ScanMeta.get('Name')[j])
                    FileName.append(ScanMeta.get('Name')[j])

                FilePathName.append(currPath)
                FileURIName.append(currURI)

#Write = True
#if Write:
if FilePathNameReadable and all(FilePathNameReadable):
    print('cp %s %s' % (FilePathName, writeHCP.DestinationDir))
    writeHCP.writeFileFromPath(FilePathName, OutputFileName)
    print 'Written bytes: ' + ', '.join(map(str, writeHCP.BytesWrite))
else:
    print('Destination: %s  URI: %s' % (OutputDir, FileName))
    writeHCP.writeFileFromURL(getHCP, FileURIName, FileName)
    print 'Streamed bytes: ' + ', '.join(map(str, writeHCP.BytesStream))
    print 'Written bytes: ' + ', '.join(map(str, writeHCP.BytesWrite))
    print 'Delta bytes: ' + ', '.join(
        map(
            str,
            list(
                itertools.imap(operator.sub, writeHCP.BytesStream,
                               writeHCP.BytesWrite))))

print 'Total bytes: %s' % (sum(writeHCP.BytesWrite))
print("Duration: %s" % (time.time() - sTime))
Пример #4
0
    # getSubjectSessions
    # getSubjectsSessions
    # getURLString
    # ==============================================================================

    Projects = getHCP.getProjects()
    getHCP.Subject = getHCP.Subjects[0]
    getHCP.SubjectSessions = getHCP.getSubjectSessions()
    getHCP.Session = getHCP.SubjectSessions.get("Sessions")[0]
    getHCP.SessionMeta = getHCP.getSessionMeta()

    ScanParms = getHCP.getScanParms()
    ScanMeta = getHCP.getScanMeta()

    print ScanMeta.get("URIs")[ScanMeta.get("Collections").index("NIFTI")]
    writeHCP.writeFileFromURL(getHCP, ScanMeta.get("URIs")[ScanMeta.get("Collections").index("NIFTI")])

    if getHCP.Server.find("intradb") != -1:
        AssessorIDs = getHCP.getAssessorIDs()
        AssessorFileURIList = getHCP.getAssessorOutputFile(AssessorIDs)

    print getHCP.getProjects()
    print getHCP.SessionId, getHCP.getSessionId()
    print getHCP.Subjects
    print getHCP.getSubjectSessions()

    #    print getHCP.getFileInfo('https://intradb.humanconnectome.org/data/projects/HCP_Phase2/subjects/192439/experiments/192439_strc/resources/Details/files/StructuralHCP.log')
    #    print 'Bytes: ' +getHCP.getFileInfo('https://intradb.humanconnectome.org/data/projects/HCP_Phase2/subjects/197550/experiments/197550_diff/resources/Diffusion/files/Diffusion/data/bvals').get('Bytes')
    print getHCP.getProjects()
    print getHCP.Session