Difference between revisions of "Read wave.m"

From Spinach Documentation Wiki
Jump to: navigation, search
m (Update function page arguments and outputs from current Spinach source)
m (Add missing leading spaces to function header blocks)
Line 17: Line 17:
 
==Outputs==
 
==Outputs==
  
A              - polar amplitude at each slice
+
A              - polar amplitude at each slice
  
phi            - polar phase at each slice, radians
+
phi            - polar phase at each slice, radians
  
Cx            - Cartesian amplitude in X at each slice
+
Cx            - Cartesian amplitude in X at each slice
  
Cy            - Cartesian amplitude in Y 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
  
 
==Returns==
 
==Returns==

Revision as of 16:47, 5 June 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,scaling_factor]=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


Outputs

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

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

Put your own pulses into /kernel/pulses/pk_files; 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