Trace collected at: 2010-12-06 15:27:01.285000 ---------------------------------------------------------------------- ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[12]: set_output_location('SPIN_Module_') ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[14]: log('========================================', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[15]: log('******* SPIN MODULE TEST *********', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[16]: log('========================================', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[18]: SET_RSTCTR( 0 ) #Clear Reset Counter ../../GSEOS_scripts\util.py[118]: POKE( 0xDDFF, byte ) ../../GSEOS_scripts\util.py[102]: cmd.EFW_ADRH( (addr >> 8 )& 0xff ) ../../GSEOS_scripts\util.py[103]: cmd.EFW_ADRL( addr & 0xff ) ../../GSEOS_scripts\util.py[104]: cmd.EFW_LOAD( byte ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[19]: wait(APID_267, lambda: APID_267.RSTCTR==0, flTimeout=12) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[19]: wait(APID_267, lambda: APID_267.RSTCTR==0, flTimeout=12) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[19]: wait(APID_267, lambda: APID_267.RSTCTR==0, flTimeout=12) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[20]: RESETCPU() ../../GSEOS_scripts\util.py[121]: cmd.EFW_RESET() ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[21]: wait(APID_267, lambda: APID_267.RSTCTR==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[21]: wait(APID_267, lambda: APID_267.RSTCTR==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[23]: SET_RSTCTR( 0 ) #Clear Reset Counter ../../GSEOS_scripts\util.py[118]: POKE( 0xDDFF, byte ) ../../GSEOS_scripts\util.py[102]: cmd.EFW_ADRH( (addr >> 8 )& 0xff ) ../../GSEOS_scripts\util.py[103]: cmd.EFW_ADRL( addr & 0xff ) ../../GSEOS_scripts\util.py[104]: cmd.EFW_LOAD( byte ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[24]: cmd.EFW_CLEAR() ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[25]: wait(APID_267, lambda: APID_267.ERRCODE==0, flTimeout=10) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[25]: wait(APID_267, lambda: APID_267.ERRCODE==0, flTimeout=10) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[26]: vers = APID_267.FSW_HIGH ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[27]: vers = vers + APID_267.FSW_LOW/100.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[28]: log('========================================', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[29]: log('******* FSW VERSION %5.2f *********'% vers, color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[30]: log('========================================', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[32]: errcnt=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[33]: errcnt += tryscript("TEST_SPIN_1") ../../GSEOS_scripts\util.py[208]: try: ../../GSEOS_scripts\util.py[209]: pf = startscript( script ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[10]: """ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[11]: from math import * ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[12]: from efw import * ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[13]: from util import * ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[14]: from __main__ import * # required for access to APID_nnn telemetry blocks ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[17]: def load_waveform( adr, A, B, C): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[31]: def ffptoflt( val ): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[40]: def spin_test( adr, OffsetA, CostermB, SintermC): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[70]: def main(): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[10]: """ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[11]: from math import * ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[12]: from efw import * ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[13]: from util import * ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[14]: from __main__ import * # required for access to APID_nnn telemetry blocks ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[17]: def load_waveform( adr, A, B, C): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[31]: def ffptoflt( val ): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[40]: def spin_test( adr, OffsetA, CostermB, SintermC): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[70]: def main(): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[71]: log('========================================', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[72]: log('SPIN_1 : Spin Fit Calculations Check ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[73]: log('========================================', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[74]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[75]: errs=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[76]: ebuf = 0x9a00 #EFIELD BUFFER START ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[77]: bbuf = ebuf+0x100 #BFIELD BUFFER START ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[79]: log('1.1 Increasing TM Rate, Clear Start ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[80]: cmd.EFW_FITMODE(0,1,1) #No Sampling, E12,Bx calcs ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[81]: cmd.EFW_TABLE(4,4) #OUTPTR=0 (start of buffer) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[82]: cmd.EFW_LOAD(0) # ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[83]: SC_SPIN(6) #Get Space Weather Packet faster ../../GSEOS_scripts\util.py[157]: cmd.SCE_CTRL_SET_SPIN_PULSE_TIME(sp*1000000) ../../GSEOS_scripts\util.py[158]: TAS.SpinPeriod = sp*65535.0/20.970 ../../GSEOS_scripts\util.py[159]: TAS.SpinPeriodValid = 1 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[84]: DUMPADR(ebuf) ../../GSEOS_scripts\util.py[65]: cmd.EFW_DUMPADRX( (addr >> 24 )& 0xff ) ../../GSEOS_scripts\util.py[66]: cmd.EFW_DUMPADRE( (addr >> 16 )& 0xff ) ../../GSEOS_scripts\util.py[67]: cmd.EFW_DUMPADRH( (addr >> 8 )& 0xff ) ../../GSEOS_scripts\util.py[68]: cmd.EFW_DUMPADRL( addr & 0xff ) ../../GSEOS_scripts\util.py[69]: cmd.EFW_TMDUMPCTR(255) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[85]: cmd.EFW_TMDUMPSIZE(128) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[86]: cmd.EFW_CLEAR() ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[88]: log('---------------------------------------', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[89]: log('2.0 Injecting Cosine Scales ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[90]: log('---------------------------------------', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[91]: OffsetA=0. ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[92]: CostermB=0. ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[93]: SintermC=0. ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[94]: for CostermB in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[95]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[94]: for CostermB in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[95]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[94]: for CostermB in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[95]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[94]: for CostermB in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[95]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[94]: for CostermB in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[95]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[94]: for CostermB in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[97]: log('---------------------------------------', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[98]: log('3.0 Injecting Sine Scales ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[99]: log('---------------------------------------', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[100]: OffsetA=0. ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[101]: CostermB=0. ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[102]: for SintermC in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[103]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[102]: for SintermC in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[103]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[102]: for SintermC in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[103]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[102]: for SintermC in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[103]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[102]: for SintermC in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[103]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[102]: for SintermC in (32768.0, 16384.0, 0.0, -8192.0, -8192.0*3): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[105]: log('---------------------------------------', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[106]: log('4.0 Injecting Offset Errors ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[107]: log('---------------------------------------', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[108]: CostermB=0. ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[109]: SintermC=16384. ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[110]: for OffsetA in (1024.0, 128.0, -256.0, -768.0 ): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[111]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[110]: for OffsetA in (1024.0, 128.0, -256.0, -768.0 ): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[111]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[110]: for OffsetA in (1024.0, 128.0, -256.0, -768.0 ): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[111]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[110]: for OffsetA in (1024.0, 128.0, -256.0, -768.0 ): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[111]: errs = errs+spin_test( ebuf, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[41]: log('------ GENERATING NEW WAVEFORM --------- ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[42]: PF=("FAIL","PASS") ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[43]: load_waveform( adr, OffsetA, CostermB, SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[18]: cmd.EFW_CMDS( 1 ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[19]: wait(APID_263, lambda: APID_263.CMDFLAG==1, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[20]: adstr = "0000" + hex(0x10000+adr)[3:7] ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[21]: bytes = " " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[23]: phi = 2*pi*i/32 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[24]: val = A + B*cos(phi) + C*sin(phi) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[25]: ival= int(val) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[26]: bytes = bytes + hex( 0x100+(ival&0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[27]: bytes = bytes + hex( 0x100+ ((ival>>8)& 0xff))[-2:]+" " ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[22]: for i in range(32): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[28]: efw.idpu_load(adstr, bytes) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[29]: wait(APID_263, lambda: APID_263.CMDFLAG==0, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[45]: fcnt = APID_267.FITCOUNT #We'll watch this count up ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[46]: cmd.EFW_FITSIM() #Perform Fit ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[47]: wait(APID_267, lambda: APID_267.FITCOUNT>fcnt, flTimeout=20) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[48]: log(" Simulated A,B,C = %8.3f %8.3f %8.3f" %(OffsetA,CostermB,SintermC),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[49]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[51]: wait(APID_26A, lambda:True, flTimeout=20) #SW packet ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[52]: scale = 32768.0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[53]: A = ffptoflt(APID_26A.Ex_OFFSET)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[54]: B = ffptoflt(APID_26A.Ex_COSINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[55]: C = ffptoflt(APID_26A.Ex_SINE)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[56]: S = ffptoflt(APID_26A.Ex_STDDEV)*scale ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[32]: sign = val & 0x800000 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[33]: exp = ((val & 0x7F0000) >> 16) - 64 - 16 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[34]: mant = val&0xffff ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[35]: if((val&0x8000)==0): return(0) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[36]: flt = mant*2**exp ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[37]: if(sign!=0): flt = -flt ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[38]: return(flt) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[57]: log(" SPIN Results A,B,C,S = %8.3f %8.3f %8.3f %8.3f" %(A,B,C,S), color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[59]: difA = abs(A-OffsetA) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[60]: difB = abs(B-CostermB) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[61]: difC = abs(C-SintermC) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[62]: A_range = B_range = C_range = 1 #PASS ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[63]: if( difA > max(1,.002*abs(OffsetA) ) ): A_range=0 #FAIL ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[64]: if( difB > max(1,.002*abs(CostermB)) ): B_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[65]: if( difC > max(1,.002*abs(SintermC)) ): C_range=0 ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[66]: log(" Verification A,B,C = %8s %8s %8s" % (PF[A_range],PF[B_range],PF[C_range]),\ ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[67]: color=BROWN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[68]: return( 3 - A_range - B_range - C_range) #number of errors ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[110]: for OffsetA in (1024.0, 128.0, -256.0, -768.0 ): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[113]: log('5.0 Cleaning Up ', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[114]: log('Error Summary = %d errors found.'% errs, color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[116]: log('Spin Fit Calculations : %s'% PF[errs==0], color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[117]: log('================END=====================', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN_1.py[118]: return(0) ../../GSEOS_scripts\util.py[212]: return(pf) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[35]: log('========================================', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[36]: if( errcnt == 0 ): ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[37]: log('**** SPIN Module PASS ****' , color=GREEN, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[40]: log('========================================', color=BLUE, attr=BOLD ) ../../GSEOS_scripts/FSW_scripts\TEST_SPIN.py[41]: return( errcnt )