int dump_puzzle(const struct puzzle *p) { int i; printf("Board:\n"); dump_shape(&p->board, ' ', 'X'); printf("\n"); for (i = 0; i < p->no_tiles; i++) { printf("Tile %u (%c):\n", i + 1, 'A' + i); dump_shape(&p->tiles[i], ' ', 'A' + i); printf("\n"); } return (0); }
pulsesequence() { // Define Variables and Objects and Get Parameter Values SHAPE dfs = getdfspulse("dfsX",0.0,0.0,0,1); strncpy(dfs.pars.ch,"obs",3); putCmd("chXdfs='obs'\n"); DSEQ dec = getdseq("H"); strncpy(dec.t.ch,"dec",3); putCmd("chHtppm='dec'\n"); strncpy(dec.s.ch,"dec",3); putCmd("chHspinal='dec'\n"); dump_shape(dfs); //-------------------------------------- // Copy Current Parameters to Processed //------------------------------------- putCmd("groupcopy('current','processed','acquisition')"); // Dutycycle Protection DUTY d = init_dutycycle(); d.dutyon = getval("pwX90") + dfs.pars.t; d.dutyoff = d1 + 4.0e-6 + 200.0e-6; d.c1 = d.c1 + (!strcmp(dec.seq,"tppm")); d.c1 = d.c1 + ((!strcmp(dec.seq,"tppm")) && (dec.t.a > 0.0)); d.t1 = getval("rd") + getval("ad") + at; d.c2 = d.c2 + (!strcmp(dec.seq,"spinal")); d.c2 = d.c2 + ((!strcmp(dec.seq,"spinal")) && (dec.s.a > 0.0)); d.t2 = getval("rd") + getval("ad") + at; d = update_dutycycle(d); abort_dutycycle(d,10.0); // Set Phase Tables settable(phXdfs,4,table1); settable(phX90,4,table2); settable(phRec,4,table3); setreceiver(phRec); // Begin Sequence txphase(phXdfs); decphase(zero); obspwrf(getval("aXdfs")); obsunblank(); decunblank(); _unblank34(); delay(d1); sp1on(); delay(2.0e-6); sp1off(); delay(2.0e-6); // Start Decoupling on H _dseqon(dec); // X Double Frequency Sweep Pulse _shape(dfs,phXdfs); txphase(phX90); obspwrf(getval("aX90")); delay(200.0e-6); // X Direct Polarization rgpulse(getval("pwX90"),phX90,0.0,0.0); // Begin Acquisition obsblank(); _blank34(); delay(getval("rd")); startacq(getval("ad")); acquire(np, 1/sw); endacq(); _dseqoff(dec); obsunblank(); decunblank(); _unblank34(); }