Difference between revisions of "Read wave.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(Restore pre-bulk-edit wiki content)
Line 1: Line 1:
{{DISPLAYTITLE:read_wave.m}} __NOTOC__
+
{{DISPLAYTITLE:read_wave.m}}
 
 
 
Reads JCAMP-DX pulse waveform files. JCAMP-DX is a standard format in which pulse shaped are often distributed.
 
Reads JCAMP-DX pulse waveform files. JCAMP-DX is a standard format in which pulse shaped are often distributed.
  
 
==Syntax==
 
==Syntax==
  
[A,phi,Cx,Cy,scaling_factor]=read_wave(filename,npoints)
+
    [A,phi,Cx,Cy]=read_wave(filename,npoints)
  
 
==Arguments==
 
==Arguments==
  
filename  -  a string containing the name of the file
+
  filename  -  a string containing the name of the file
 
   
 
   
 
   npoints    -  waveform upsampling or downsampling is
 
   npoints    -  waveform upsampling or downsampling is
 
                   performed to this number of points
 
                   performed to this number of points
  
==Outputs==
+
==Returns==
 
 
A              -  polar amplitude at each slice
 
 
 
  phi            -  polar phase at each slice, radians
 
 
 
  Cx            -  Cartesian amplitude in X at each slice
 
 
 
  Cy            -  Cartesian amplitude in Y at each slice
 
  
 +
  A          -  polar amplitude at each slice
 +
 +
  phi        -  polar phase at each slice, radians
 +
 +
  Cx        -  Cartesian amplitude in X at each slice
 +
 +
  Cy        -  Cartesian amplitude in Y at each slice
 +
 
   scaling factor -  scaling factor for a given pulse shape
 
   scaling factor -  scaling factor for a given pulse shape
 
Note: put your own pulses into /kernel/pulses/pk_files; please
 
      also consider sending them to us.
 
 
ilya.kuprov@weizmann.ac.il
 
kpervushin@ntu.edu.sg
 
mariagrazia.concilio@sjtu.edu.cn
 
  
 
==Examples==
 
==Examples==
 
 
A few examples are distributed with ''Spinach'', see /kernel/pulses/pk_files directory.
 
A few examples are distributed with ''Spinach'', see /kernel/pulses/pk_files directory.
  
 
==Notes==
 
==Notes==
 
 
You can add your own pulse files to the same folder; please also consider sending them to us.
 
You can add your own pulse files to the same folder; please also consider sending them to us.
  
 
==See also==
 
==See also==
 
 
[[shaped_pulse_af.m]], [[shaped_pulse_xy.m]], [[step.m]]
 
[[shaped_pulse_af.m]], [[shaped_pulse_xy.m]], [[step.m]]
  
Line 49: Line 38:
  
 
''Version 2.2, authors: [[Ilya Kuprov]], [[Konstantin Pervushin]]''
 
''Version 2.2, authors: [[Ilya Kuprov]], [[Konstantin Pervushin]]''
 
==Returns==
 
 
A          -  polar amplitude at each slice
 
 
  phi        -  polar phase at each slice, radians
 
 
  Cx        -  Cartesian amplitude in X at each slice
 
 
  Cy        -  Cartesian amplitude in Y at each slice
 
 
  scaling factor -  scaling factor for a given pulse shape
 

Revision as of 15:49, 5 April 2026

Reads JCAMP-DX pulse waveform files. JCAMP-DX is a standard format in which pulse shaped are often distributed.

Syntax

    [A,phi,Cx,Cy]=read_wave(filename,npoints)

Arguments

  filename   -   a string containing the name of the file

  npoints    -   waveform upsampling or downsampling is
                 performed to this number of points

Returns

  A          -   polar amplitude at each slice

  phi        -   polar phase at each slice, radians

  Cx         -   Cartesian amplitude in X at each slice

  Cy         -   Cartesian amplitude in Y at each slice

  scaling factor -   scaling factor for a given pulse shape

Examples

A few examples are distributed with Spinach, see /kernel/pulses/pk_files directory.

Notes

You can add your own pulse files to the same folder; please also consider sending them to us.

See also

shaped_pulse_af.m, shaped_pulse_xy.m, step.m

Shaped pulses and gradients


Version 2.2, authors: Ilya Kuprov, Konstantin Pervushin