Protocol: AhXXX  Sequence: ahXXX.c  Apptype: solidseq1d

Description: 

A multifunctional 3D sequence to provide XXX correlation
with HX cross polarization, followed by XX mixing, using DARR,
C7, SPC5, RFDR or PARIS. The C7 amd SPC5 can be executed
optionally with or without a double quantum filter. The F2
period follows HX CP, the F1 period follows the first mixing
period and F3 acquisition follows  the second mixing period.
Both F2 and F1 optionally employ bandselective refocusing of
X with refocusing of Y or a delay with composite refocusing
of Y. Decoupling during F1,F2 and F3 uses either 2-angle
SPINAL or TPPM and a constant time option is provided.
Optional Y decoupling is provided during F3 acquisition.

Acknowledgement:

Sequence provided by Chad Reinstra UIUC as hXXX.c. 

Setup:

Load an exisiting dataset or type Settancpx. Type AhXXX, select 
the desired options and determine calibrations for the desired
experiment. 

Decoupling H: Hseq='tppm' or 'spinal'.
d3 Refocusing (first evolution): bandselective X softpul='y', composite Y softpul='n'
d2 Refocusing (second evolution: bandselective X softpul2='y', composite Y softpul2='n'
Constant Time Decoupling H : Set ctd='y' and tRFmax > d2 and d3
Mixing after d3: mMix = 'dar','c7','spc5','rfdr' and 'paris'
Mixing after d2: mMix1 = 'darr'
Double Quantum Mixing (C7 and SPC5) dqfXspc5(c7)='y' else 'n'
Optional Y Decoupling (acquisition only) ddec2='y', else 'n.

Parameter Groups: 

cpHX:  Module:  yes
Sequence:  tancpx.c
Description:  Implements constant, linear or tangent-ramped cross
              polarization from dec to obs.
Parameters:  Sequence Page
       shHX - 'c', constant, 'l', linear and 't', tangent shape on the
              channel designated with chHX.
       chHX - the variable-amplitude channel, 'fr' from or 'to', to.
       aHhx - median amplitude of the dec channel.
       aXhx - median amplitude of the obs channel.
       bHX - +/- tangent curvature (>0 to 1.0e5).
       dHX - amplitude width of the ramp. A negative width sets a ramp
              that starts high and decreases in amplitude.
       tHX - contact time
       ofHX - overall offset on the variable channel
       frHX = 'dec' -  channel with the initial polarization (must be
              set - not shown).
       toHX = 'obs' -  channel with the final polarization (must be set
              - not shown).
Implementation:  CP hx = getcp("HX",0.0,0.0,0,1);
Underscore function: _cp_(hx,phHhx,phXhx); phHhx is the overall phase
              table for the H channel and phXhx is that for the X channel.

mMix: Parameter: 
Description:  A flag that sets the mixing sequence, for 'c7', 'spc5',
              'rfdr', 'paris' and darr', after the d3 period before 
              the d2 period. 

mMix1: Parameter: 
Description:  A flag that sets the mixing sequence, 'darr', after 
              the d2 period before acquisition. 

c7X: Module:  yes
Sequence:  c7inad2d.c
Description:  Implements the Post C7 recoupling sequence on the obs
              channel during XX mixing. 
Parameters:  Sequence Page
       aXc7 - amplitude of obs pulses.
       pwXc7 - 360-degree flip on obs.
       qXc7 - C7 cycles represented in the .DEC file.
       ofXc7 - overall frequency offset.
       chXc7 = 'obs' must be set (not shown).
       dqfXc7 ='y' for double quantum mixing
       tXc7ret - total mix time returned
       aHmixc7 - amplitude of dec during c7
Implementation: MPSEQ c7 = getpostc7("c7X",0,0.0,0.0,0,1);
Underscore functions: _MPSEQ functions.

spc5X:  Module:  yes
Sequence:  inad2dspc5.c
Description:  Implements the SPC5 recoupling sequence on the obs
              channel.
Parameters:  Sequence Page
       aXspc5 - amplitude of obs pulses.
       pwXspc5 - 360-degree flip on obs.
       qXspc5 - SPC5 cycles represented in the .DEC file.
       ofXspc5 - overall frequency offset.
       chXspc5 = 'obs' must be set (not shown).
       dqfXspc5 = 'y' for double quantum mixing
       tXspc5 - total mix time returned
       aHmixc7 - amplitude of dec during spc5
Implementation: MPSEQ spc5 = getspc5("spc5X",0,0.0,0.0,0,1);
Underscore functions: _MPSEQ functions.

rfdrX:  Module:  yes
Sequence:  rocsa2d.c
Description:  Implements RFDR with a single pi pulse per rotor period
              and an XY8 phase cycle.
Parameters:  Sequence Page
       aXrfdr - amplitude of obs pulses.
       pwXrfdr - 180-degree flip on obs.
       qXrfdr - RFDR cycles represented in the .DEC file.
       ofXrfdr - overall frequency offset.
       chXrfdr = 'obs' must be set (not shown).
       tXrfdrret - total mix time returned
       aHrfdr - amplitude of dec during rfdr
Implementation: MPSEQ rfdr = getrfdr("rfdrX",0,0.0,0.0,0,1);
Underscore functions: _MPSEQ functions.

mixX:  Module:  no (First Mixing tXmix, Second Mixing tXmix1)
Sequence:  tancp2drad.c
Description:  Implements a mixing delay in sequences where mixing occurs
              among the obs nuclei. CW decoupling is allowed on DEC.
              Typically used for DARR (RAD) mixing periods where decoupling
              at a field strength of srate/2.0 enhances obs spin diffusion.
Parameters:  Sequence Page
       tXmix - the mixing delay time. The delay may or may not be rotor
              synchronized, depending on the sequence.
       aHmix - amplitude of decoupling.


mparisH: Module: no
Description:  Implements PARIS mixing with irradiation on dec. 
Parameters: 
       aHmparis - amplitude of dec.
       pwHmparis - pulse length on dec.
       ofHmparis - overall frequency offset.

softpul: Parameter: yes 
Description:  A flag for which softpul='y' selects a bandselective X refocusing 
              pulse during the d3 period, else or if softpul='n' selects 
              d3 evolution with composite Y refocusing.

softpul1: Parameter: yes 
Description:  A flag for which softpul='y' selects a bandselective X refocusing 
              pulse during the d2 period, else or if softpul='n' selects 
              mixing with composite Y refocusing. 

shp1X:  Module: yes
Sequence:  ahX.c
Description:  Implements a named shaped pulse in wavelib with 
              pBox to be sed on the obs channel for refocusing
              during F1.
Parameters:  Sequence Page
       chXshp1 - must be 'obs'. 
       wvXshp1 - pBox pulse waveshape from wavelib.
       aXshp1 - amplitude of pBox pulse.
       dbXshp1 - attenuator setting for pBox pulse.
       tXshp1 - predelay for pBox pulse.
       pwXshp1 - width of pBox pulse.
       phXshp1 - starting small angle phase adjust.
       stXshp1 - shape parameter - see pBox documentation
Implementation:  PBOXPULSE shp1 = getpboxpulse("shp1X",0);
Underscore function: _pboxpulse(shp1,phXshp1);
              _pboxsimpulse(shp1,shp2,phXshp1,phHshp2);
              _pboxsim3pulse(shp1,shp2,shp3,phXshp1,phHshp2,phYshp3);
Notes:  phXshp1 (and 2 or 3) is the overall phase table for the shape.
        _pboxsim(3)pulse uses multiple shapes where the arguments are 
        obs, dec, dec2 in order.  Label the shapes with the correct 
        channel identifier X, H, Y using getpboxpulse depending on the 
        channel for which it is used. _pboxsim(3)pulse cannot accept 
        shapes on dec (identifier Z). 

shp2X:  Module: yes
Sequence:  ahX.c
Description:  Implements a named shaped pulse in wavelib with 
              pBox to be sed on the obs channel for refocusing
              during F1.
Parameters:  Sequence Page
       chXshp2 - must be 'obs'. 
       wvXshp2 - pBox pulse waveshape from wavelib.
       aXshp2 - amplitude of pBox pulse.
       dbXshp2 - attenuator setting for pBox pulse.
       tXshp2 - predelay for pBox pulse.
       pwXshp2 - width of pBox pulse.
       phXshp2 - starting small angle phase adjust.
       stXshp2 - shape parameter - see pBox documentation
Implementation:  PBOXPULSE shp2 = getpboxpulse("shp2X",0);
Underscore function: _pboxpulse(shp2,phXshp2);
              _pboxsimpulse(shp1,shp2,phXshp1,phHshp2);
              _pboxsim3pulse(shp1,shp2,shp3,phXshp1,phHshp2,phYshp3);
Notes:  phXshp1 (and 2 or 3) is the overall phase table for the shape.
        _pboxsim(3)pulse uses multiple shapes where the arguments are 
        obs, dec, dec2 in order.  Label the shapes with the correct 
        channel identifier X, H, Y using getpboxpulse depending on the 
        channel for which it is used. _pboxsim(3)pulse cannot accept 
        shapes on dec (identifier Z). 

ddec2: Parameter: yes 
Description:  A flag for which ddec2='y' selects TPPM, SPINAL, or WALTZ 
              decoupling on dec2.

Note:  This sequence uses getdseq2() instead of getdseq(). The getdseq2() router
       calls 2-angle spinal by default when Yseq = 'spinal'. Calls to 1-angle
       SPINAL should use getdseq(). Calls to TPPM and WALTZ are similar to 
       those of getdseq(). 

Yseq:  Module: yes 
Sequence:  ahX.c
Description:  Chooses SPINAL, SPINAL2, TPPM or WALTZ decoupling on 
              the dec2 channel during acquisition.
Parameters:   Sequence Page - the Yspinal, Ytppm and other groups
              overlap.  Yseq chooses the decoupling sequences TPPM
              SPINAL, SPINAL2 or WALTZ. 
Implementation:  DSEQ dec2 = getdseq("Y"); The router implements
              getspinal(), getspinal2(), gettppm() or getwaltz(), as
              selected.
Implementation2: DSEQ dec2 = getdseq2("Y"); The router implements
              getspinal2s(), gettppm() or getwaltz(), as selected.
Underscore functions:  _dseqon(dec2); runs _tppm(); _spinal(); _spinal2 
              or _waltz, as selected. dseqoff(dec2); runs dec2prgoff();
Underscore functions2:  _dseqon2(dec2); runs _tppm(); _spinal2(); or _waltz()
             _dseqoff(dec2); runs dec2prgoff();

Ytppm:  Module: yes
Sequence:  ahX.c
Description:  Implements TPPM decoupling on the dec2 channel during
              acquisition.
Parameters:  Sequence Page
       aYtppm - amplitude of the dec2 channel.
       pwYtppm - approximate 180-degree flip angle on resonance.
       phYtppm - +/- small angle phase. TPPM is implemented
              with phases = +/- 1.0 times phYtppm for alternating
              pulses.
       chYtppm = 'dec2' must be set (not shown).
Implementation: TPPM dec2 = gettppm("Y"); or DSEQ dec2 = getdseq("Y");
Implementation2: DSEQ dec2 = getdseq2("Y");
Underscore functions: _tppm(dec2); and dec2prgoff(); or _dseqon(dec2); and
              _dseqoff(dec2);
Underscore functions2: _dseqon2(dec2); and _dseqoff2(dec2);

Ywaltz:  Module:  yes
Sequence: ahX.c
Description:  Implements WALTZ16 decoupling on the dec2 channel during
              acquisition.
Parameters:  Sequence Page
       aYwaltz - amplitude of the dec2 channel.
       pwYwaltz - 90-degree flip angle on resonance.       
       chYwaltz = 'dec2' must be set (not shown).
Implementation: WALTZ dec2 = getwaltz("Y"); or DSEQ dec = getdseq("Y");
Implementation2: DSEQ dec = getdseq2("Y");
Underscore functions: _waltz(dec2); and dec2prgoff(); or _dseqon(dec2);
              and _dseqoff(dec2);
Underscore functions2: _dseqon2(dec2); and _dseqoff2(dec2);

tRFmax: Parameter: 
Description:  The total constant decoupling time during d2, d3 and tRFmax-d2-d3
              after acquisition is complete. Set if ctd='y'. 
ctd: Parameter: 
Description:  A flag set to ctd='y' for constant time decoupling and 'n' for no 
              constant-time decoupling.

Note:  This sequence uses getdseq2() instead of getdseq(). The getdseq2() router
       calls 2-angle spinal by default when Hseq = 'spinal'. Calls to 1-angle
       SPINAL should use getdseq(). Calls to TPPM and WALTZ are similar to 
       those of getdseq(). 

Hseq:  Module: yes (implementation 2 for SPINAL (2-angle) and TPPM)
Sequence:  tancpx.c and ahX.c
Description:  Chooses SPINAL, SPINAL2, TPPM or WALTZ decoupling on 
              the dec channel during acquisition.
Parameters:   Sequence Page - The Hspinal, Htppm and other groups
              overlap.  Hseq chooses the decoupling sequences TPPM
              SPINAL, SPINAL2 or WALTZ. 
Implementation:  DSEQ dec = getdseq("H"); The router implements
              getspinal(), getspinal2(), gettppm() or getwaltz(), as
              selected.
Implementation2: DSEQ dec = getdseq2("H"); The router implements
              getspinal2s(), gettppm() or getwaltz(), as selected.
Underscore functions:  _dseqon(dec); runs _tppm(); _spinal(); _spinal2 
              or _waltz, as selected. dseqoff(dec); runs decprgoff(dec);
Underscore functions2:  _dseqon2(dec); runs _tppm(); _spinal2() or _waltz();
             _dseqoff2(dec); runs decprgoff();

Hspinal:  Module: yes
Sequence:  tancpx.c and ahX.c
Description:  Implements SPINAL decoupling on the dec channel during
              acquisition. Implements SPINAL2 (2-angle) decoupling with 
              getdseq2() or getspinal2s().
Parameters:  Sequence Page
       aHspinal - amplitude of the dec channel.
       pwHspinal - approximate 180-degree flip.
       phHspinal - +/- small angle phase. SPINAL64 (1) is implemented
              with phases = +/- 1.0, +/- 1.5 and +/-2.0 times
              phHspinal or (2) is implemented with phases = +/- phHspinal, 
              +/- (phHspinal + alpHspinal) and +/- (phHspinal + 2.0*alpHspinal).
       alpHspinal - second angle - set 0.0 for TPPM and phHspinal/2.0
                     for standard SPINAL64.             
       chHspinal = 'dec' must be set (not shown).
Implementation: SPINAL dec = getspinal("H"); or DSEQ dec = getdseq("H");
Implementation2: SPINAL2 dec = getspinal2s("H"); or DSEQ dec = getdseq2("H");
Underscore functions: _spinal(dec); and decprgoff(); or _dseqon(dec);
             and _dseqoff(dec);
Underscore functions2: _spinal2(dec); and decprgoff(); or _dseqon2(dec);
             and _dseqoff2(dec);
        
Htppm:  Module: yes
Sequence:  tancpx.c and ahX.c
Description:  Implements TPPM decoupling on the dec channel during
              acquisition.
Parameters:  Sequence Page
       aHtppm - amplitude of the dec channel.
       pwHtppm - approximate 180-degree flip angle on resonance.
       phHtppm - +/- small angle phase. TPPM is implemented
              with phases = +/- 1.0 times phHtppm for alternating
              pulses.
       chHtppm = 'dec' must be set (not shown).
Implementation: TPPM dec = gettppm("H"); or DSEQ dec = getdseq("H");
Implementation2: DSEQ dec = getdseq2("H");
Underscore functions: _tppm(dec); and decprgoff(); or _dseqon(dec); and
              _dseqoff(dec);
Underscore functions2: _dseqon2(dec); and _dseqoff2(dec);
