def main():

    # Initialization
    GYRO = float(42.576 * 10 ** 6) # gyromagnetic ratio (in Hz.T^-1)
    gradamp = []
    bigdelta = []
    smalldelta = []

    parser = get_parser()
    arguments = parser.parse(sys.argv[1:])
    gradamp = arguments['-g']
    bigdelta = arguments['-b']
    smalldelta = arguments['-d']

    # print arguments
    print '\nCheck parameters:'
    print '  gradient amplitude ..... '+str(gradamp*1000)+' mT/m'
    print '  big delta .............. '+str(bigdelta*1000)+' ms'
    print '  small delta ............ '+str(smalldelta*1000)+' ms'
    print '  gyromagnetic ratio ..... '+str(GYRO)+' Hz/T'
    print ''

    bvalue = ( 2 * math.pi * GYRO * gradamp * smalldelta ) ** 2 * (bigdelta - smalldelta/3)

    print 'b-value = '+str(bvalue / 10**6)+' mm^2/s\n'
    return bvalue
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/sct_dmri_get_bvalue.py/main/original