alj alj / Mbed 2 deprecated PGSE_diffusion

Dependencies:   mbed

Revision:
2:24f3bc487c01
Parent:
1:9c47e011f1bf
Child:
3:797df32f2344
diff -r 9c47e011f1bf -r 24f3bc487c01 main.cpp
--- a/main.cpp	Mon Jan 27 14:03:37 2014 +0000
+++ b/main.cpp	Mon Jan 27 14:28:34 2014 +0000
@@ -4,7 +4,7 @@
               ref : E.O. Stejskal and J.E. tanner, J. Chem. Phys. 42, 288 (1965)
               THE PGSE SEQUENCE IS
               1H ---> 90° -   DELTA/2 - 180   - DELTA/2  - FID
-              Gz ---> --  - Gz(sdelta)- DELTA - Gz(sdelta)   
+              Gz ---> --  - Gz(sdelta)- DELTA - Gz(sdelta)
               *************************************************************************************
               Gradient strength (or duration) must be increase to measure the diffusion coefficient (2D DOSY spectroscopy)
               The maximum diffusion time (DELAT) is limited by T2 in PGSE.
@@ -14,7 +14,7 @@
               diffusion time (DELTA) is limited by T1.
               IN THIS VERSION THE GRADIENT PULSE DURATION IS USED
               *************************************************************************************
-                
+
                 DESIGN FOR NXPLPC1768 ARM CORTEX M3 MCU BOARD:
                 INPUT : NONE (reset on board)
                 OUTPUT :  ACQU                  ---> P26 AND LED1
@@ -30,6 +30,12 @@
               Ecole Polytechnique
               91128 Palaiseau CEDEX France
               *************************************************************************************
+              This program comes as is with its flaws and bugs.
+              NO WARRANTY IS PROVIDED.
+              This program is distributed in the hope that it will be useful,
+              but WITHOUT ANY WARRANTY; without even the implied warranty of
+              FITNESS FOR A PARTICULAR PURPOSE
+              *************************************************************************************
                 UNLESS OTHERWISE SPECIFIED THE PARAMETERS OF THE PULSE SEQUENCE ARE SET :
  D1           : relaxation delay ( ms to s)
  DELTA        : Diffusion time (ms to s)
@@ -55,7 +61,7 @@
  PHn          : Phase for pulse number n (ie : PH1 for pulse P1)
  PH0          : Receiver phase
               *************************************************************************************
-              
+
 */
 
 #include "mbed.h"
@@ -91,7 +97,7 @@
     PH1PH2=0x00;  //0 init
 
     for (float i = 0.0f ; i < NS ; i += 1.0f) {
-        
+
         Relaxation = 1;         /* LED1 light*/
         wait(D1);               // relaxation
         Relaxation = 0;         // turn off the led
@@ -99,22 +105,22 @@
         p1=1;
         wait(P90);              // 90°
         p1=0;
-        
+
         Gsdelta = 1;
         wait(sdelta); //gradient Z;
         Gsdelta = 0;
-        
-        wait(DELTA - sdelta);               // diffusion time 
+
+        wait(DELTA - sdelta);               // diffusion time
 
         p2=1;
         wait(2*P90);            //180°
         p2=0;
-        
+
         Gsdelta = 1;
         wait(sdelta); //gradient Z;
         Gsdelta = 0;
-        
-        
+
+
         wait(D21) ;             //recovery time
 
         Acqu=0x11;              // Acquire FID (we can write 3 in decimal)
@@ -122,12 +128,12 @@
         Acqu=0x00;
 
         PH1PH2=PH1PH2+1;        //Phase cycling
-        
+
         //IncGsdelta += stepG ;
 
-        }
-   
     }
+
+}
 //}
 
 /* INCREMENTATION DE LA DUREE D'ECLAIREMENT DE LED1 AVEC PwmOut