Difference between revisions of "Read wave.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Returns)
(Update function See also links and function index membership)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:read_wave.m}}
+
{{DISPLAYTITLE:read_wave.m}} __NOTOC__
 
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]=read_wave(filename,npoints)
 
  
==Arguments==
+
    [A,phi,Cx,Cy,scaling_factor]=read_wave(filename,npoints)
 +
 
 +
==Parameters==
  
 
   filename  -  a string containing the name of the file
 
   filename  -  a string containing the name of the file
Line 12: Line 13:
 
   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==
 +
 +
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==
 
==Returns==
Line 29: Line 43:
  
 
==Notes==
 
==Notes==
You can add your own pulse files to the same folder; please also consider sending them to us.
+
 
 +
Put your own pulses into /kernel/pulses/pk_files; please also consider sending them to us.
  
 
==See also==
 
==See also==
[[shaped_pulse_af.m]], [[shaped_pulse_xy.m]], [[chirp_pulse_af.m]], [[chirp_pulse_xy.m]], [[step.m]]
+
[[shaped_pulse_af.m]], [[shaped_pulse_xy.m]], [[step.m]], [[bruker_write.m]], [[cartesian2polar.m]], [[chirp_pulse.m]], [[ctrl_trajan.m]], [[fapt2sfo.m]], [[grad_pulse.m]], [[grad_sandw.m]], [[heterodyne.m]], [[inst_freq.m]], [[pmlg5.m]], [[polar2cartesian.m]], [[pulse_shape.m]], [[restrans.m]], [[rseq_compiler.m]], [[rsequence.m]], [[sawtooth.m]], [[sech_pulse.m]], [[spinal.m]], [[triwave.m]], [[vg_pulse.m]], [[wave_basis.m]], [[Optimal_control_module]], [[Kernel_functions]]
 
 
  
''Version 1.10, authors: [[Ilya Kuprov]], [[Konstantin Pervushin]]''
+
''Version 2.2, authors: [[Ilya Kuprov]], [[Konstantin Pervushin]]''

Latest revision as of 19:40, 6 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)

Parameters

  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, bruker_write.m, cartesian2polar.m, chirp_pulse.m, ctrl_trajan.m, fapt2sfo.m, grad_pulse.m, grad_sandw.m, heterodyne.m, inst_freq.m, pmlg5.m, polar2cartesian.m, pulse_shape.m, restrans.m, rseq_compiler.m, rsequence.m, sawtooth.m, sech_pulse.m, spinal.m, triwave.m, vg_pulse.m, wave_basis.m, Optimal_control_module, Kernel_functions

Version 2.2, authors: Ilya Kuprov, Konstantin Pervushin