bart ones#

=================================================================================================================

The command bart ones is used in BART to create an array filled with ones. You specify the number of dimensions (dims) and the size of each dimension (dim1, dim2, …, dimN).

Such as:#

\[\begin{split} \begin{pmatrix} 1 & 1 & \cdots & 1 \\ 1 & 1 & \cdots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \cdots & 1 \end{pmatrix} \end{split}\]

We can use -h for every BART command.

!bart ones -h
Usage: ones dims dim1 ... dimN <output> 

Create an array filled with ones with {dims} dimensions of size {dim1} to {dimn}.

-h  help

where:

dims: The number of dimensions of the array.

dim1 dim2 ... dimN: The size of each dimension.

<output>: The output prefix for the file that will be created (.cfl and .hdr).

Example 1(Using Bash)#

!bart ones 2 2 3 output_1

This will create:

A 2D array with dimensions 2 x 3 filled with ones.

The output files will be output.cfl and output.hdr.

!bart show -m output_1
Type: complex float
Dimensions: 16
AoD:	2	3	1	1	1	1	1	1	1	1	1	1	1	1	1	1
!bart show output_1 # Display information about a .cfl file (without the .cfl extension)
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i

Example 2 (Using Bash)#

!bart ones 3 5 5 6 output_2

This will create:

A 3D array with dimensions 5 x 5 x 6 filled with ones.

!bart show -m output_2
Type: complex float
Dimensions: 16
AoD:	5	5	6	1	1	1	1	1	1	1	1	1	1	1	1	1
!bart show output_2 # Display information about a .cfl file (without the .cfl extension)
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i
+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i	+1.000000e+00+0.000000e+00i