The .c files programs the transmit cards. The script implements the functions for the m4i.6622 transmit functions. The ‘m4iset_8ch.c’ file initiates the card for 8-channel transmit operation using 400 MHz sampling frequency (297MHz output, please see the paper for the reasoning about transmit frequency selection [1]). For 123 MHz (3T). The sampling frequency can be changed to 625MHz. The main function is named ‘m4iset’ takes three arguments as follows:
```c
/**
* Set two m4i transmitter cards
*
* @param pvData 16-bit data pointer for the first transmit card (each card has 4 transmitter)
* @param pvData1 16-bit data pointer for the second transmit card
* @param lMemsize 32-bit memory length for the transmit data
where pex_m4i_8ch_CP.f is the fortran routine m4iset_8ch.c is the code for card programming and libspcm_linux.so is the library for the m4i driver cards that needs to be pre-installed from the manufacturer's website. The name of the output file is pex_m4i_CP. To run the cards, this file needs to be used with two parameters
```console
pex_m4i_CP $mode $att
#The variable $mode determines the mode of operation. This can be either 0 or 1 as integer. The mode 0 prepares and transmits a composite pulse.
#The composite pulse is composed of 1 millisecond long signals. The 1 millisecond signals are subsequently transmitted for each channel.
#The second mode transmits a parallel transmit pulse that is generated based on a mode. The total power is normalized.
#The length of the pulse is approximately 1 ms.
#$att parameter adjusts the attenuation level for the output. It can take floating values between [0,1].