-------------------------------------------------------------------------------
--                                                                           --
--                          Experiment Source Code                           --
--              Delta NMR Experiment & Machine Control Interface             --
--                                                                           --
--                     Copyright (c) 2005 JEOL Ltd                           --
--                            All Rights Reserved                            --
--                                                                           --
-------------------------------------------------------------------------------
-- HELP.eng: Proton High Reso
-- Category: solids, 2D, homonuclear correlation
-- File name : 1H_solid_noesy
--
-- Sequence name : Proton NOESY for solid state NMR.
--
-- Reference :
--

header
    filename  => "1H_solid_NOESY";
    sample_id => "";
    comment   => "high resolution 1H_solid_NOESY";
    process   =  "2d_solid.list";
    include "header_solid";
end header;

instrument
    include "instrument_solid";
end instrument;

acquisition
    x_domain         => "Proton";
    x_offset         => 0[ppm];
    x_sweep          => 100[kHz];
    x_points         => 1024;
    scans            => 8;
    x_prescans       => 0;
    mod_return       => 1;

    y_domain         =  x_domain;
    y_offset         =  x_offset;
    y_sweep          => x_sweep;
    y_dwell          =? 1/y_sweep;
    y_points         => 64;
    y_acq_time       =? y_points*y_dwell;
    include "acquisition_solid";
end acquisition;

pulse
    collect COMPLEX,OBS COMPLEX,OBS;
    initial_wait     =  10.0[ms];

    x_90_width       => x90;
    x_pulse_1        =  x_90_width;
    x_amp_pulse      => 100[%], 0[%]->100[%]:0.01[%], help "set ampliper for x pulse";


    mas_freq         => mas_spin_get, help "Spinning Speed";
    acq_time_y      =? y_points *y_dwell;

RFDR_Setup	=? "-----------Setup RFDR-----------";
	obs_width_rfdr	=>	x90*2;
	obs_amp_rfdr	=> 100.0[%],  0[%]->100[%]:0.01[%], help "set ampliper for x pulse";
	spinning_freq	=	mas_freq ;
	tau1		=	(1/spinning_freq-obs_width_rfdr)/2;
	number_rfdr	=>	1, 0->400:1;
	taumix		=? 16*number_rfdr/spinning_freq;


Others_Setup =? "#Setup Others#";
    
    relaxation_delay => 5[s], help"inter-pulse delay";
    repetition_time  =? relaxation_delay + x_acq_time,help"relaxation_delay+x_acq_time";

    x_atn            =>  xatn, help "set attenuator for x pulse";

    phase_1          =  {{0,180},{90,270}}.ystep(180%2);
    phase_2          =  {0,0,180,180};
    phase_3          =  {4(0),4(90),4(180),4(270)};
    phase_acq        =  {0,180,180,0,90,270,270,90,180,0,0,180,270,90,90,270}.ystep(180%2);
    obs_phs_rfdr	={  0};
    include "pulse_solid";
    module_config = "solid_sample ";

begin
    initial_wait;
    relaxation_delay;

    x_pulse_1, (obs.gate, obs.phs.phase_1, obs.amp.x_amp_pulse, obs.atn.x_atn);
	0[us] ystep 1/y_sweep;
    x_pulse_1, (obs.gate, obs.phs.phase_2, obs.amp.x_amp_pulse, obs.atn.x_atn);
    ----RFDR---------------------------------------
loop number_rfdr times
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+  0,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+ 90,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+  0,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+ 90,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;

		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+ 90,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+180,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+ 90,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+180,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;

		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+180,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+270,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+180,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+270,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;

		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+270,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+  0,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+270,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;
		tau1;
		obs_width_rfdr,	(obs.gate,	obs.phs.obs_phs_rfdr+  0,	obs.amp.obs_amp_rfdr,	obs.atn.x_atn);
		tau1;

	end loop;
---------------------RFDR-----------------------------------------------------
    x_pulse_1, (obs.gate, obs.phs.phase_3, obs.amp.x_amp_pulse, obs.atn.x_atn);
    acq( dead_time, delay, phase_acq );
end pulse;