-------------------------------------------------------------------------------
--                                                                           --
--                          Experiment Source Code                           --
--              Delta NMR Experiment & Machine Control Interface             --
--                                                                           --
--                     Copyright (c) 2009 JEOL Ltd                           --
--                            All Rights Reserved                            --
--                                                                           --
-------------------------------------------------------------------------------
-- HELP.eng: 2D Inadequate, Refocused, CPMAS
-- Category: solids, 2D, homonuclear correlation, inadequate
-- By Rongchun Zhang 2022/05/02
header
	filename			=> "inadequate_hetNOE_2d";
	sample_id			=> "";
	comment				=> "2D Inadequate, Refocused, NOE";
  process			=  "2d_inadequate_phase.list";
	include "header_solid";
end header;

instrument
	include "instrument_solid";
end instrument;


acquisition
	x_domain			=>	"Carbon13";
	x_offset			=>	100[ppm];
	x_sweep				=>	400[ppm];
	x_points			=>	2048;
	scans				=>	128,help"scans=16*n";
	x_prescans			=>	0;
	mod_return			=>	1;
	y_domain			=?	x_domain;
	y_offset			=?	x_offset*2;
	y_sweep				=> 1.5*x_sweep,help"y_sweep = about 1.5*x_sweep";
	y_points			=> 64;

	include "acquisition_solid";
	include "acquisition_2d";
	y_dwell				=? 1 / y_sweep;
end acquisition;

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

	irr_Setup			=? "#Setup Irradiation#";
	irr_domain			=>	"Proton",									help "decoupled nucleus";
	irr_offset			=>	5[ppm],										help "decoupler offset";
	

	HX_pulse			=? "#Setup Obs and IRR Pulse#";
	obs_width_90				=> x90, help "obs channel 90 deg pulse";
	obs_width_180				=> x90*2, help "obs channel 180 deg pulse";
	obs_amp_pulse			=> 100[%],  0[%]->100[%]:0.01[%], help "amp of excite pulse";
   
	irr_width_90				=> irr90, help "obs channel 90 deg pulse";
	irr_width_180				=> irr90*2, help "obs channel 180 deg pulse";
	irr_amp_pulse			=> 100[%],  0[%]->100[%]:0.01[%], help "amp of excite pulse";

	jj_constant			=? "#Setup Double Qunatum Generation Delta#";
	j_constant			=> 44[Hz], help "J(XX) coupling constant(Hz)";
  tau=>     1/(4*j_constant);
  Total_DQ               =?  tau*4;
  tauNOE   =>  0.5[s];
	t1					=  0[us];
  z_filter  => 1[ms];
	include "dec_solid";

   recycle_Setup		=? "#Setup Recycle Times#";
	relaxation_delay	=>	5.0[s],										help "relaxation delay";
	repetition_time		=?	relaxation_delay + x_acq_time,				help"relaxation_delay+x_acq_time";

   atn_Setup           =? "#Experiment Attenuator Settings#";
	obs_atn				=>	xatn,										help "attenuator for obs";
	irr_atn				=>	irratn,										help "attenuator for irr";

	irr_phs_NOE     =  {0};
  obs_phs_read    =   { {90,180,270,0}, {135,225,315,45} }.ystep(90%2);
  phase_4		=  {{ 0,90,180,270, 90,180,270,0, 180,270,0,90, 270,0,90,180}, {45,135,225,315, 135,225,315,45, 225,315,45,135, 315,45,135,225} }.ystep(90%2);
	phase_5		={ {90,180,270,0},{ 135,225,315,45} }.ystep(90%2);
	phase_6		={ 0};
	phase_7		={ 16(90),16(180),16(270),16(0)};
  phase_8           ={0};
  phase_9         ={180};  
   obs_phs_acq	={2(0,180,0,180, 180,0,180,0),2(180,0,180,0,0,180,0,180),2(0,180,0,180, 180,0,180,0),2(180,0,180,0,0,180,0,180)}.ystep(180%2);
	irr_phs_dec	={0};

	module_config		= "solid_sample";

begin
	initial_wait;
	relaxation_delay;
  irr_width_180,	(irr.gate,	irr.phs.irr_phs_NOE,	irr.amp.irr_amp_pulse,irr.atn.irr_atn);

  tauNOE;
  obs_width_90,	(obs.gate,	obs.phs.obs_phs_read,	obs.amp.obs_amp_pulse,obs.atn.obs_atn);
  on (irr.gate, irr.phs.irr_phs_dec, irr.amp.irr_amp_dec, irr.atn.irr_atn, irr.noise.irr_noise);
  tau;
	obs_width_180, (obs.gate, obs.phs.phase_4, obs.amp.obs_amp_pulse, obs.atn.obs_atn);
	tau;
	obs_width_90,   (obs.gate, obs.phs.phase_5, obs.amp.obs_amp_pulse, obs.atn.obs_atn);
	t1 ystep 1/y_sweep;
	obs_width_90,   (obs.gate, obs.phs.phase_6, obs.amp.obs_amp_pulse, obs.atn.obs_atn);
	tau;
	obs_width_180, (obs.gate, obs.phs.phase_7, obs.amp.obs_amp_pulse, obs.atn.obs_atn);
	tau;
  obs_width_90,   (obs.gate, obs.phs.phase_8, obs.amp.obs_amp_pulse, obs.atn.obs_atn);
  off (irr.gate);
  z_filter;
  on (irr.gate, irr.phs.irr_phs_dec, irr.amp.irr_amp_dec, irr.atn.irr_atn, irr.noise.irr_noise);
     obs_width_90,   (obs.gate, obs.phs.phase_9, obs.amp.obs_amp_pulse, obs.atn.obs_atn);
	acq( dead_time, delay, obs_phs_acq );
	off (irr.gate);

end pulse;