%!PS % Simulate SSCS spread spectrum carrier supressed magic sinewaves in PostScript %%%%%%%%% use better reporter % ========= % This file requires the previous download of gonzo.psl % available from https://www.tinaja.com/pssamp1.shtml % Make sure the following line agrees with your own gonzo.psl location (C:/Users/don/Desktop/gonzo/gonzo.psl) run % use internal gonzo % ========== % PostScript normally reports real values only to six decimal point precision. % Internally, nearly eight decimal points of precision are available per the % IEEE floating point routines. Certain custom PostScript-as-language apps may % demand ( or at least welcome ) more than six decimal points of precision. % /realto8dstring converts any signed PostScript real in the absolute range % of 0.000000001 to 999,999,999 to a reportable string accurate to nearly eight % decimal points of precision. Larger absolute values create an error while % smaller ones truncate and report as 0.0000000 or -0.0000000. % To use, place a real number or its variable on the stack and call % realto8dstring. The equvalent reportable string returns to the stack top. % Operation is based on converting any real over the allowable range to % an integer in the 10 to 100 million range, converting that integer to % a string, and modifying the string as needed for a decimal point and sign. % This utility presently operates over an absolute value range of 0.0000001 % to 99,999,999. Larger values are reported as errors. Smaller values are % truncated to 0.00000000. % One count or more uncertainties may exist in the eighth decimal place. % /mergestr is a string merger from my gonzo utilities. Complete utilities % are found at http://www.tinaja.com/post01.asp#gonzo ... /mergestr {2 copy length exch length add string dup dup 4 3 roll 4 index length exch putinterval 3 1 roll exch 0 exch putinterval} def % /realto8dstring is the high level code for the reporting conversion. It % determines the sign and then tests for values too large or too small. % It then goes to processgoodreal for actual report conversions. % A final deferencing is done to provide a unique output string. /realto8dstring {dup 0 lt % test and flag negatives /isneg exch store abs /val exch store % save real as absolute value val 100000000 ge { % report and error trap values (real is too big! )== % that are too large to process real_is_too_big! } if val 0.00000001 le % truncate small numbers to zero {(0.0000000)} {processgoodreal} ifelse % process numbers versus zeros isneg {(-)}{( )} ifelse % create leading space or minus exch mergestr % add leading space or minus 20 string cvs % dereference string to avoid % any possible rude surprises } store % /processgoodreal continues the realto8string processing after numbers too % large and too small have been dealt with. Subprocs are called for tenmillions, % unitsormore, and fractions. Note that log floor cvi tells you the decade % size and position of any positive number. /processgoodreal { val log floor cvi % evaluate decimal location /posn exch store % posn 7 eq {tenmillions} % treat ten millions special {posn 0 ge {unitsormore} % handle >1 as a class {fractions} % handle fractions as a class ifelse } ifelse } store % /tenmillions handles ten millions as a special case needing no reformatting. /tenmillions { val round cvi % use ten millions val as is. 20 string cvs } store % /unitsormore handles units through millions... /unitsormore { /workstring val % scale val as needed to 10-99 megs 1 7 posn sub {10 mul} % this may give more accuracy repeat mul round cvi 20 string cvs store % and convert to string workstring 0 posn 1 add % stuff decimal point getinterval (.) mergestr workstring % post remainder of string posn 1 add workstring length 1 sub posn sub getinterval mergestr 20 string cvs % dereference } store % /fractions handles fractional values /fractions {/workstring val % scale workstring 1 7 posn sub {10 mul} repeat % this may give more accuracy mul round cvi 20 string cvs store % and convert to string (0.) % prepend leading zero and dp posn neg 1 sub % add intermediate zeros {(0) mergestr} repeat workstring mergestr % postpend value 20 string cvs % dereference } store %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%% demo - remove or alter before reuse %%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % An "Empty job. No PDF file produced." message is normal and expected. % 2 sqrt 10000000 mul realto8dstring == %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % DATA AREA %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % data for 0.01 amplitude BBE8 through BEF11 from JS calculator /angsBBE8.01 [ 11.2389804767 % p1s 11.2609279451 % p1e 22.4783896057 % p2s 22.5214411789 % p2e 33.7186387847 % p3s 33.7811401232 % p3e 44.9601056811 % p4s 45.0396550086 % p4e 56.2031192702 % p5s 56.2966596339 % p5e 67.4479470302 % p6s 67.5518837491 % p6e 78.6947848093 % p7s 78.8051236087 % p7e 89.9437497379 % p8s 90 % p8e ] store /distBBE8.01 [ % starting with H29 -0.00000000000 -0.99991775465 0.99983551200 0.00008223994 0.00000000271 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF8.01 [ % angle-position pairs 10.5784662267 % p1s 10.5979218951 % p1e 21.1572692672 % p2s 21.1955181134 % p2e 31.7367339103 % p3s 31.7924734991 % p3e 42.3171613788 % p4s 42.3884936578 % p4e 52.8988187278 % p5s 52.9833146362 % p5e 63.4819295913 % p6s 63.5767117558 % p6e 74.0666666126 % p7s 74.1685073232 % p7e 84.6531458131 % p8s 84.7585769437 % p8e ] store /distBEF8.01 [ % starting with H29 -0.00000000000 -0.00000000000 -0.99991775465 0.99983551200 0.00008223994 0.00000000271 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE9.01 [ % angle-position pairs 9.99128035131 % p1s 10.0086450302 % p1e 19.9828289922 % p2s 20.0170307703 % p2e 29.9749056596 % p3s 30.0249053978 % p3e 39.9677532923 % p4s 40.0320318485 % p4e 49.9615903859 % p5s 50.0381947533 % p5e 59.9566042111 % p6s 60.0432068421 % p6e 69.9529451201 % p7s 70.0469146376 % p7e 79.9507221139 % p8s 80.0492032644 % p8e 89.9499997906 % p9s 90 % p9e ] store /distBBE9.01 [ % starting with H29 -0.00000000000 -0.00000000000 -0.00000000000 -0.99991775465 0.99983551200 0.00008223994 0.00000000271 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF9.01 [ % angle-position pairs 9.4658537755 % p1s 9.4814468279 % p1e 18.9319238797 % p2s 18.9626846756 % p2e 28.3984204464 % p3s 28.4435099621 % p3e 37.8655414189 % p4s 37.9237297903 % p4e 47.3334669478 % p5s 47.4031670032 % p5e 56.8023543543 % p6s 56.8816648952 % p6e 66.2723338125 % p7s 66.359091464 % p7e 75.7435048684 % p8s 75.8353430883 % p8e 85.2159338869 % p9s 85.3103475234 % p9e ] store /distBEF9.01 [ % starting with H29 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.99991775465 0.99983551200 0.00008223994 0.00000000271 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE10.01 [ % angle-position pairs 8.9929295557 % p1s 9.0070085544 % p1e 17.9860354649 % p2s 18.0138468131 % p2e 26.9794895193 % p3s 27.0203484495 % p3e 35.9734545205 % p4s 36.0263549993 % p4e 44.9680801133 % p5s 45.0317196026 % p5e 53.9634989989 % p6s 54.0363105183 % p6e 62.9598236305 % p7s 63.0400143341 % p7e 71.9571434775 % p8s 72.0427387963 % p8e 80.9555229218 % p9s 81.0444151858 % p9e 89.9549998288 % p10s 90 % p10e ] store /distBBE10.01 [ % starting with H29 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.99991775465 0.99983551200 0.00008223994 0.00000000271 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF10.01 [ % angle-position pairs 8.5650127432 % p1s 8.5777877048 % p1e 17.1301706819 % p2s 17.1554352513 % p2e 25.6956156024 % p3s 25.7328054431 % p3e 34.2614825636 % p4s 34.309766956 % p4e 42.8278967561 % p5s 42.8861971467 % p5e 51.3949706213 % p6s 51.4619847079 % p6e 59.9628013011 % p7s 60.0370321175 % p7e 68.5314684787 % p8s 68.6112578311 % p8e 77.1010326592 % p9s 77.1845981676 % p9e 85.6715339214 % p10s 85.7570088383 % p10e ] store /distBEF10.01 [ % starting with H29 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.99991775465 0.99983551200 0.00008223994 0.00000000271 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE11.01 [ % angle-position pairs 8.1759701911 % p1s 8.1876140538 % p1e 16.3520610039 % p2s 16.375111708 % p2e 24.5283904778 % p3s 24.5623788033 % p3e 32.7050715504 % p4s 32.749305626 % p4e 40.8822096615 % p5s 40.9357890429 % p5e 49.0599005362 % p6s 49.1217345306 % p6e 57.2382282002 % p7s 57.3070580642 % p7e 65.4172632672 % p8s 65.4916878282 % p8e 73.5970615374 % p9s 73.6755657164 % p9e 81.7776629299 % p10s 81.8586485856 % p10e 89.9590907666 % p11s 90 % p11e ] store /distBBE11.01 [ % starting with H29 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.99991775465 0.99983551200 0.00008223994 0.00000000271 0.00000000000 0.00000000000 ] store /angsBEF11.01 [ % angle-position pairs 7.8207346968 % p1s 7.8313911479 % p1e 15.641570425 % p2s 15.6626848291 % p2e 23.462606236 % p3s 23.4937852929 % p3e 31.2839372651 % p4s 31.3246001951 % p4e 39.1056528827 % p5s 39.155042241 % p5e 46.9278349713 % p6s 46.9850307533 % p6e 54.7505563669 % p7s 54.8144931417 % p7e 62.573879495 % p8s 62.643366249 % p8e 70.3978552263 % p9s 70.471597549 % p9e 78.222521975 % p10s 78.2991461714 % p10e 86.0479050498 % p11s 86.1259837326 % p11e ] store /distBEF11.01 [ % starting with H29 0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.00000000000 -0.99991775465 0.99983551200 0.00008223994 0.00000000271 0.00000000000 ] store % data for 0.33 amplitude BEF8B through BEF11 /angsBBE8.33 [ % angle-position pairs 10.8404428964 % p1s 11.557665485 % p1e 21.7007962635 % p2s 23.1099282036 % p2e 32.5999765301 % p3s 34.6507183814 % p3e 43.5548432807 % p4s 46.1726806394 % p4e 54.5790477127 % p5s 57.6667131477 % p5e 65.6818756504 % p6s 69.1218668022 % p6e 76.8673132718 % p7s 80.5258550976 % p7e 88.1336811464 % p8s 90 % p8e ] store /distBBE8.33 [ % starting with H29 -0.00000000000 -0.91199510747 0.82718170835 0.08168395140 0.00000000271 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF8.33 [ % angle-position pairs 10.2243373118 % p1s 10.8604229431 % p1e 20.4644511286 % p2s 21.7166488456 % p2e 30.7354061925 % p3s 32.5640192632 % p3e 41.0508029549 % p4s 43.396979798 % p4e 51.4219703293 % p5s 54.2087327362 % p5e 61.8571464049 % p6s 64.9910915823 % p6e 72.3607716121 % p7s 75.7346926293 % p7e 82.933095915 % p8s 86.4296882578 % p8e ] store /distBEF8.33 [ % starting with H29 -0.00000000000 -0.00000000000 -0.91199510747 0.82718170835 0.08168395140 0.00306815091 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE9.33 [ % angle-position pairs 9.6745430663 % p1s 10.2425060304 % p1e 19.3617477004 % p2s 20.481701859 % p2e 29.073756701 % p3s 30.7139513359 % p3e 38.8216505291 % p4s 40.9349818458 % p4e 48.6148693858 % p5s 51.1396236057 % p5e 58.4606234748 % p6s 61.3216653612 % p6e 68.3633612701 % p7s 71.473922152 % p7e 78.3244147106 % p8s 81.5886076285 % p8e 88.3419605836 % p9s 90 % p9e ] store /distBBE9.33 [ % starting with H29 -0.00000000000 0.00000000000 -0.00000000000 -0.91199510747 0.82718170835 0.08168395140 0.00306815091 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF9.33 [ % angle-position pairs 9.1808930422 % p1s 9.6911085622 % p1e 18.3720646892 % p2s 19.3795710701 % p2e 27.5834093708 % p3s 29.0625068445 % p3e 36.8240377262 % p4s 38.7365751057 % p4e 46.1018550409 % p5s 48.3977788323 % p5e 55.423129964 % p6s 58.0413375122 % p6e 64.7920937076 % p7s 67.6616881376 % p7e 74.2106409673 % p8s 77.2526789687 % p8e 83.6782226846 % p9s 86.8079935228 % p9e ] store /distBEF9.33 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 -0.00000000000 -0.91199510747 0.82718170835 0.08168395140 0.00306815091 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE10.33 [ % angle-position pairs 8.7351992927 % p1s 9.1960395553 % p1e 17.4788292005 % p2s 18.3899384552 % p2e 26.2390317179 % p3s 27.579384277 % p3e 35.0233617813 % p4s 36.7617266452 % p4e 43.8384745746 % p5s 45.9338287985 % p5e 52.6898053768 % p6s 55.0919609487 % p6e 61.581265677 % p7s 64.231772653 % p7e 70.5149989669 % p8s 73.3483880626 % p8e 79.4912543494 % p9s 82.4366576064 % p9e 88.5084340449 % p10s 90 % p10e ] store /distBBE10.33 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.00000000000 -0.91199510747 0.82718170835 0.08168395140 0.00306815091 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF10.33 [ % angle-position pairs 8.3307933709 % p1s 8.7490882298 % p1e 16.6685665061 % p2s 17.4964259423 % p2e 25.0200794898 % p3s 26.2401349352 % p3e 33.3916466836 % p4s 34.978085129 % p4e 41.788901278 % p5s 43.7077813908 % p5e 50.2165543021 % p6s 52.4262762971 % p6e 58.6781624176 % p7s 61.1301324924 % p7e 67.1759314252 % p8s 69.8154641815 % p8e 75.7105931348 % p9s 78.478084291 % p9e 84.2813955051 % p10s 87.1137668954 % p10e ] store /distBEF10.33 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.00000000000 -0.91199510747 0.82718170835 0.08168395140 0.00306815091 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE11.33 [ % angle-position pairs 7.9621892025 % p1s 8.3435654183 % p1e 15.9302063263 % p2s 16.685685385 % p2e 23.9097100847 % p3s 25.0248182073 % p3e 31.9060165791 % p4s 33.3592319461 % p4e 39.9239195993 % p5s 41.6869174049 % p5e 47.9675068647 % p6s 50.005517565 % p6e 56.0399810515 % p7s 58.3122887185 % p7e 64.1435025996 % p8s 66.6041131791 % p8e 72.2790788798 % p9s 74.8775834192 % p9e 80.4465276139 % p10s 83.1291693013 % p10e 88.6445372023 % p11s 90 % p11e ] store /distBBE11.33 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.00000000000 -0.91199510747 0.82718170835 0.08168395140 0.00306815091 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF11.33 [ % angle-position pairs 7.6248319744 % p1s 7.9739667528 % p1e 15.254568059 % p2s 15.9467293919 % p2e 22.8939806039 % p3s 23.91701034 % p3e 30.5475756288 % p4s 31.8833865543 % p4e 38.2194539789 % p5s 39.8442220583 % p5e 45.9131695291 % p6s 47.7976111107 % p6e 53.6315900046 % p7s 55.7413419859 % p7e 61.3767713297 % p8s 63.6728948046 % p8e 69.1498617146 % p9s 71.5894878678 % p9e 76.9510548418 % p10s 79.4881832341 % p10e 84.7796098493 % p11s 87.3660525871 % p11e ] store /distBEF11.33 [ % starting with H29 -0.00000000000 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.00000000000 -0.91199510747 0.82718170835 0.08168395140 0.00306815091 0.00000000000 0.00000000000 ] store % data for 0.67 amplitude BEF8B through BEF11 /angsBBE8.67 [ % angle-position pairs 10.3183231846 % p1s 11.7256899757 % p1e 20.6804238912 % p2s 23.4570370054 % p2e 31.1305852559 % p3s 35.1996222212 % p3e 41.7136877331 % p4s 46.9579299034 % p4e 52.4740279412 % p5s 58.7317382224 % p5e 63.4509905807 % p6s 70.5076803266 % p6e 74.6686987785 % p7s 82.2468452249 % p7e 86.1194946743 % p8s 90 % p8e ] store /distBBE8.67 [ % starting with H29 -0.00000000000 -0.65451964400 0.36332192177 0.24148066875 0.04538750473 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF8.67 [ % angle-position pairs 9.7582165513 % p1s 11.0084639283 % p1e 19.5514370278 % p2s 22.0213217161 % p2e 29.4149633963 % p3s 33.042936774 % p3e 39.3844381353 % p4s 44.0770640873 % p4e 49.4951361872 % p5s 55.1247935248 % p5e 59.7794615758 % p6s 66.1796112395 % p6e 70.2609295036 % p7s 77.2191350597 % p7e 80.9436262518 % p8s 88.1984005036 % p8e ] store /distBEF8.67 [ % starting with H29 -0.00000000000 0.00000000000 -0.65451964400 0.36332192177 0.24148066875 0.04538750473 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE9.67 [ % angle-position pairs 9.2558801973 % p1s 10.3739362633 % p1e 18.5400857443 % p2s 20.7513367445 % p2e 27.8811171859 % p3s 31.1356564578 % p3e 37.3076630499 % p4s 41.530003321 % p4e 46.8481542299 % p5s 51.9359271454 % p5e 56.529257099 % p6s 62.3504726557 % p6e 66.3722789158 % p7s 72.7608591224 % p7e 76.3865412583 % p8s 83.1385120058 % p8e 86.56110444 % p9s 90 % p9e ] store /distBBE9.67 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 -0.65451964400 0.36332192177 0.24148066875 0.04538750473 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF9.67 [ % angle-position pairs 8.8027986354 % p1s 9.8085807743 % p1e 17.628765491 % p2s 19.6199294189 % p2e 26.5011703312 % p3s 29.4368142927 % p3e 35.4433801723 % p4s 39.2618011365 % p4e 44.4785662765 % p5s 49.0965184103 % p5e 53.6287632515 % p6s 58.9398589238 % p6e 62.9126602452 % p7s 68.7845827017 % p7e 72.3414209241 % p8s 78.6127918918 % p8e 81.9127762765 % p9s 88.3934697375 % p9e ] store /distBEF9.67 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.65451964400 0.36332192177 0.24148066875 0.04538750473 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE10.67 [ % angle-position pairs 8.3920549168 % p1s 9.3016691837 % p1e 16.8032442142 % p2s 18.6055763579 % p2e 25.2527592799 % p3s 27.9139641149 % p3e 33.7598349912 % p4s 37.2289545883 % p4e 42.3435493954 % p5s 46.5520915844 % p5e 51.0222162 % p6s 55.8832177125 % p6e 59.811989014 % p7s 65.2182951282 % p7e 68.7241920132 % p8s 74.5461893212 % p8e 77.7612563147 % p9s 83.8458748677 % p9e 86.912623444 % p10s 90 % p10e ] store /distBBE10.67 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.65451964400 0.36332192177 0.24148066875 0.04538750473 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF10.67 [ % angle-position pairs 8.0179715585 % p1s 8.8445831031 % p1e 16.0518853899 % p2s 17.6909952482 % p2e 24.117713743 % p3s 26.5410715028 % p3e 32.2314408798 % p4s 35.396574336 % p4e 40.4089213351 % p5s 44.258901241 % p5e 48.6654754957 % p6s 53.1283678628 % p6e 57.014983685 % p7s 62.002794552 % p7e 65.4681530094 % p8s 70.8752814609 % p8e 74.0297574512 % p9s 79.7317854271 % p9e 82.6953803602 % p10s 88.5504005867 % p10e ] store /distBEF10.67 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.65451964400 0.36332192177 0.24148066875 0.04538750473 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE11.67 [ % angle-position pairs 7.6758443068 % p1s 8.4303195588 % p1e 15.365078055 % p2s 16.8621484917 % p2e 23.0811042925 % p3s 25.2970023532 % p3e 30.8373201056 % p4s 33.7363525551 % p4e 38.6470132755 % p5s 42.1814355365 % p5e 46.5230854515 % p6s 50.6327853533 % p6e 54.4774491567 % p7s 59.0893040135 % p7e 62.5198815312 % p8s 67.5467359873 % p8e 70.6561502548 % p9s 75.9957718323 % p9e 78.8855759534 % p10s 84.4207969812 % p10e 87.1990324358 % p11s 90 % p11e ] store /distBBE11.67 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.65451964400 0.36332192177 0.24148066875 0.04538750473 0.00000000000 0.00000000000 ] store /angsBEF11.67 [ % angle-position pairs 7.3617418313 % p1s 8.0531293819 % p1e 14.7348117542 % p2s 16.1075153528 % p2e 22.1305416548 % p3s 24.1644202737 % p3e 29.5602476739 % p4s 32.2250795723 % p4e 37.0351528802 % p5s 40.2905747104 % p5e 44.5661929135 % p6s 48.3615223783 % p6e 52.1636050618 % p7s 56.4374536648 % p7e 59.8361556607 % p8s 64.5157674189 % p8e 67.5898590701 % p9s 72.5903148154 % p9e 75.4262044207 % p10s 80.6501287304 % p10e 83.3403773878 % p11s 88.6793867688 % p11e ] store /distBEF11.67 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.65451964400 0.36332192177 0.24148066875 0.04538750473 0.00000000000 ] store % data for 1.00 amplitude BEF8B through BEF11 /angsBBE8.100 [ % angle-position pairs 9.5278031985 % p1s 11.417194774 % p1e 19.0941200388 % p2s 22.8233904369 % p2e 28.7371596161 % p3s 34.2059258347 % p3e 38.4942384594 % p4s 45.5486787587 % p4e 48.4005846714 % p5s 56.8302097151 % p5e 58.487181208 % p6s 68.0224446659 % p6e 68.7774277485 % p7s 79.0912012454 % p7e 79.2829523684 % p8s 90 % p8e ] store /distBBE8.100 [ % starting with H29 -0.00000000000 -0.17793396023 -0.23955340853 0.10680354390 0.22916440196 0.07019739379 0.01033151185 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF8.100 [ % angle-position pairs 9.0743675608 % p1s 10.7732451888 % p1e 18.1818096078 % p2s 21.5405680968 % p2e 27.3555375949 % p3s 32.2957190522 % p3e 36.6290853322 % p4s 43.0323267942 % p4e 46.0368307945 % p5s 53.7462752728 % p5e 55.6161990212 % p6s 64.4473398749 % p6e 65.4181519398 % p7s 75.2276706145 % p7e 75.5728789572 % p8s 89.9753282214 % p8e ] store /distBEF8.100 [ % starting with H29 -0.00000000000 0.00000000000 -0.19932049758 -0.22300261278 0.12989336356 0.21800633364 0.06358976180 0.01053783884 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE9.100 [ % angle-position pairs 8.6147482293 % p1s 10.1321861945 % p1e 17.2552425175 % p2s 20.25760378 % p2e 25.9469908954 % p3s 30.3686715531 % p3e 34.7149048597 % p4s 40.4561194413 % p4e 43.5826882086 % p5s 50.5080450582 % p5e 52.5718320244 % p6s 60.5090485281 % p6e 61.7001063882 % p7s 70.4398395309 % p7e 70.9795812871 % p8s 80.2779410384 % p8e 80.4145292731 % p9s 90 % p9e ] store /distBBE9.100 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 -0.17793396023 -0.23955340853 0.10680354390 0.22916440196 0.07019739379 0.01033151185 0.00000000000 0.00000000000 0.00000000000 0.00000000000 ] store /angsBEF9.100 [ % angle-position pairs 8.240242975 % p1s 9.6186845522 % p1e 16.5028760237 % p2s 19.2334430494 % p2e 24.8102809788 % p3s 28.8401258717 % p3e 33.1848287107 % p4s 38.4342998807 % p4e 41.6489552738 % p5s 48.0117844831 % p5e 50.2256469821 % p6s 57.571265076 % p6e 58.9406562435 % p7s 67.1252854057 % p7e 67.8325197274 % p8s 76.762075035 % p8e 77.0125829609 % p9s 89.9821346177 % p9e ] store /distBEF9.100 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.19702578135 -0.22502468402 0.12787906920 0.21895651234 0.06444384200 0.01027896049 0.00000000000 0.00000000000 0.00000000000 ] store /angsBBE10.100 [ % angle-position pairs 7.8615865381 % p1s 9.1071012836 % p1e 15.7410341748 % p2s 18.2098098044 % p2e 23.6560318459 % p3s 27.3033041095 % p3e 31.6238688482 % p4s 36.3818749421 % p4e 39.6610930758 % p5s 45.4384243938 % p5e 47.7829931243 % p6s 54.4639596314 % p6e 56.0028515786 % p7s 63.4472036107 % p7e 64.3309585058 % p8s 72.3745555485 % p8e 72.7734737331 % p9s 81.2306943586 % p9e 81.3313888056 % p10s 90 % p10e ] store /distBBE10.100 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.17793396023 -0.23955340853 0.10680354390 0.22916440196 0.07019739379 0.01033151185 0.00000000000 0.00000000000 ] store /angsBEF10.100 [ % angle-position pairs 7.5470614498 % p1s 8.6880606003 % p1e 15.1098232346 % p2s 17.3734210726 % p2e 22.7039405316 % p3s 26.0532365445 % p3e 30.3449756349 % p4s 34.724429648 % p4e 38.0483674028 % p5s 43.3837956489 % p5e 45.8295133099 % p6s 52.0287024592 % p6e 53.7043068456 % p7s 60.6597252903 % p7e 61.6913839341 % p8s 69.2908725588 % p8e 69.8216323629 % p9s 78.0057731332 % p9e 78.1932470063 % p10s 89.9866502377 % p10e ] store /distBEF10.100 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.19517578166 -0.22661178430 0.12616990374 0.21977822098 0.06508917523 0.01013370647 0.00000000000 ] store /angsBBE11.100 [ % angle-position pairs 7.229647134 % p1s 8.2703402344 % p1e 14.472072427 % p2s 16.5377055446 % p2e 21.7399320602 % p3s 24.7988804746 % p3e 29.0456111835 % p4s 33.0501533116 % p4e 36.4010194871 % p5s 41.2870367604 % p5e 43.817302177 % p6s 49.5039734252 % p6e 51.3044402413 % p7s 57.694065906 % p7e 58.870727744 % p8s 65.8489173832 % p8e 66.5221475997 % p9s 73.9587139716 % p9e 74.2617270944 % p10s 82.0126856317 % p10e 82.089030698 % p11s 90 % p11e ] store /distBBE11.100 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.17793396023 -0.23955340853 0.10680354390 0.22916440196 0.07019739379 0.01033151185 ] store /angsBEF11.100 [ % angle-position pairs 6.9617671974 % p1s 7.921892682 % p1e 13.9348708337 % p2s 15.8418695589 % p2e 20.9305990761 % p3s 23.7579211948 % p3e 27.9601403613 % p4s 31.6678727584 % p4e 35.0345338053 % p5s 39.5693825928 % p5e 42.1646522976 % p6s 47.4601408495 % p6e 49.3613236697 % p7s 55.3386392651 % p7e 56.635926235 % p8s 63.2067255597 % p8e 64.0026279763 % p9s 71.0790749642 % p9e 71.4873595377 % p10s 79.0346147628 % p10e 79.1785298069 % p11s 89.9897633582 % p11e ] store /distBEF11.100 [ % starting with H29 -0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 0.00000000000 -0.19517578166 -0.22661178430 0.12616990374 0.21977822098 0.06508917523 0.01013370647 ] store % fourier math utilities... %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % find1q reruns the original single quadrant math %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /find1q {/cd exch store % save current data array 0 % start accumulating cosines 0 2 cd length 1 sub {/posn exch store % find the amplitude first cd posn get cos cd posn 1 add get cos sub add } for 4 mul pi div /ampl exch store ampl realto8dstring == (\n\n) print flush mark ampl % start harmonic array 3 2 51 {/harmnum exch store % then find the harmonics 0 % start accumulating harmonic amplitudes 0 2 cd length 1 sub {/posn exch store % find the amplitude first cd posn get harmnum mul cos cd posn 1 add get harmnum mul cos sub add } for harmnum div 4 mul pi div ampl div } for ] /curharms exch store (\n\n single quadrant BBE8 math check: \n [\n) print flush curharms {( ) print realto8dstring ==} forall ( ] \n\n) print flush finddist % check for zeroed harms } store %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % find2q does a full half cycle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /find2q {/cd1b exch store /cd1a exch store % save current data arrays 0 % start accumulating cosines % for left half 0 2 cd1a length 1 sub {/posn exch store % find the amplitude first cd1a posn get cos cd1a posn 1 add get cos sub add } for %%%%%% start right half % add to previous qudrant cd1b length 1 sub -2 1 {/posn exch store % find the amplitude first % signs reverse!!!! cd1b posn get 180 exch sub cos cd1b posn 1 sub get 180 exch sub cos sub add } for 2 mul pi div /ampl exch store % half amplitude (ampl for half cycle is --->) print flush ampl realto8dstring == (\n\n) print flush % start harmonics with similar approach mark ampl % start harmonic array 3 2 51 {/harmnum exch store % then find the left harmonics 0 % start accumulating harmonic amplitudes 0 2 cd1a length 1 sub {/posn exch store % find the amplitude first cd1a posn get harmnum mul cos cd1a posn 1 add get harmnum mul cos sub add } for cd1b length 1 sub -2 1 {/posn exch store % now the right harmonics % signs reverse!!!! cd1b posn get 180 exch sub harmnum mul cos cd1b posn 1 sub get 180 exch sub harmnum mul cos sub add } for harmnum div 2 mul pi div ampl div } for ] /curharms exch store (\n\n double quadrant BBE8 math check: \n [\n) print flush curharms {( ) print realto8dstring ==} forall ( ] \n\n) print flush finddist % check for zeroed harms } store %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % find4q does a full cycle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /find4q {/cd1d exch store /cd1c exch store /cd1b exch store /cd1a exch store % save current data arrays 0 % begin accumulating amplitude 0 2 cd1a length 1 sub {/posn exch store % first quadrant add cd1a posn get cos cd1a posn 1 add get cos sub add } for 0 2 cd1b length 1 sub {/posn exch store % second quadrant add cd1b posn get cos cd1b posn 1 add get cos sub add } for 0 2 cd1c length 1 sub {/posn exch store % third quadrant add cd1c posn get cos cd1c posn 1 add get cos sub add } for 0 2 cd1d length 1 sub {/posn exch store % fourth quadrant add cd1d posn get cos cd1d posn 1 add get cos sub add } for 1 mul pi div /ampl exch store % full amplitude full cycle (ampl for full cycle is --->) print flush ampl realto8dstring == (\n\n) print flush mark ampl % start harmonic array 3 2 51 {/harmnum exch store % loop for harmonics 0 % begin accumulating hamplitude 0 2 cd1a length 1 sub {/posn exch store % first quadrant add cd1a posn get harmnum mul cos cd1a posn 1 add get harmnum mul cos sub add } for 0 2 cd1b length 1 sub {/posn exch store % first quadrant add cd1b posn get harmnum mul cos cd1b posn 1 add get harmnum mul cos sub add } for 0 2 cd1c length 1 sub {/posn exch store % first quadrant add cd1c posn get harmnum mul cos cd1c posn 1 add get harmnum mul cos sub add } for 0 2 cd1d length 1 sub {/posn exch store % first quadrant add cd1d posn get harmnum mul cos cd1d posn 1 add get harmnum mul cos sub add } for harmnum div 1 mul pi div ampl div % normalize to amplitude } for % for all odd harmonics ] /curharms exch store (\n\n quad quadrant BBE8 math check: \n [\n) print flush curharms {( ) print realto8dstring ==} forall ( ] \n\n) print flush finddist % check for zeroed harms } store %%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % find8q does two cycles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /find8q {/cd1h exch store /cd1g exch store /cd1f exch store /cd1e exch store /cd1d exch store /cd1c exch store /cd1b exch store /cd1a exch store % save current data arrays 0 % begin accumulating amplitude 0 2 cd1a length 1 sub {/posn exch store % first quadrant add cd1a posn get cos cd1a posn 1 add get cos sub add } for 0 2 cd1b length 1 sub {/posn exch store % second quadrant add cd1b posn get cos cd1b posn 1 add get cos sub add } for 0 2 cd1c length 1 sub {/posn exch store % third quadrant add cd1c posn get cos cd1c posn 1 add get cos sub add } for 0 2 cd1d length 1 sub {/posn exch store % fourth quadrant add cd1d posn get cos cd1d posn 1 add get cos sub add } for 0 2 cd1e length 1 sub {/posn exch store % fifth quadrant add cd1e posn get cos cd1e posn 1 add get cos sub add } for 0 2 cd1f length 1 sub {/posn exch store % sixth quadrant add cd1f posn get cos cd1f posn 1 add get cos sub add } for 0 2 cd1g length 1 sub {/posn exch store % seventh quadrant add cd1g posn get cos cd1g posn 1 add get cos sub add } for 0 2 cd1h length 1 sub {/posn exch store % eighth quadrant add cd1h posn get cos cd1h posn 1 add get cos sub add } for 0.5 mul pi div /ampl exch store % half amplitude double cycle (ampl for full cycle is --->) print flush ampl realto8dstring == (\n\n) print flush mark ampl % start harmonic array 3 2 51 {/harmnum exch store % loop for harmonics 0 % begin accumulating hamplitude 0 2 cd1a length 1 sub {/posn exch store % first quadrant add cd1a posn get harmnum mul cos cd1a posn 1 add get harmnum mul cos sub add } for 0 2 cd1b length 1 sub {/posn exch store % second quadrant add cd1b posn get harmnum mul cos cd1b posn 1 add get harmnum mul cos sub add } for 0 2 cd1c length 1 sub {/posn exch store % third quadrant add cd1c posn get harmnum mul cos cd1c posn 1 add get harmnum mul cos sub add } for 0 2 cd1d length 1 sub {/posn exch store % fourth quadrant add cd1d posn get harmnum mul cos cd1d posn 1 add get harmnum mul cos sub add } for 0 2 cd1e length 1 sub {/posn exch store % fifth quadrant add cd1e posn get harmnum mul cos cd1e posn 1 add get harmnum mul cos sub add } for 0 2 cd1f length 1 sub {/posn exch store % sixth quadrant add cd1f posn get harmnum mul cos cd1f posn 1 add get harmnum mul cos sub add } for 0 2 cd1g length 1 sub {/posn exch store % seventh quadrant add cd1g posn get harmnum mul cos cd1g posn 1 add get harmnum mul cos sub add } for 0 2 cd1h length 1 sub {/posn exch store % eighth quadrant add cd1h posn get harmnum mul cos cd1h posn 1 add get harmnum mul cos sub add } for harmnum div 0.5 mul pi div ampl div % normalize to amplitude } for % for all odd harmonics ] /curharms exch store (\n\n quad quadrant BBE8 math check: \n [\n) print flush curharms {( ) print realto8dstring ==} forall ( ] \n\n) print flush finddist % check for zeroed harms } store %%%%%%%%%%%%%%%%%% /finddist { 0 1 1 curharms length 1 sub {/posn exch store curharms posn get dup mul add } for sqrt /totalharm exch store (RMS uncontrolled low harmonic amplitudes ---> ) print totalharm realto8dstring == (\n\n) print flush } store %%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DEMO AREA % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % first verify math with one quadrant angsBBE8.01 find1q % single quadrant check DONE OK!!! % next verify math with full cycle angsBBE8.01 angsBBE8.01 find2q % double quadrant repeating check DONE MAYBE! % next try spread 2 (\n amplitude 01 2:1\n\n) print flush angsBBE8.01 angsBEF8.01 find2q % double quadrant 2:1 spread check (\n amplitude 33 2:1\n\n) print flush angsBBE8.33 angsBEF8.33 find2q % double quadrant 2:1 spread check (\n amplitude 67 2:1\n\n) print flush angsBBE8.67 angsBEF8.67 find2q % double quadrant 2:1 spread check (\n amplitude 100 2:1\n\n) print flush angsBBE8.100 angsBEF8.100 find2q % double quadrant 2:1 spread check % next verify math on spread 4 (\n\n\n\n\n\n\n) print flush (\n no spread 4:1\n\n) print flush angsBBE8.01 angsBBE8.01 angsBBE8.01 angsBBE8.01 find4q % quad quadrant 4:1 math check (\n half spread 4:1\n\n) print flush angsBBE8.01 angsBEF8.01 angsBBE8.01 angsBEF8.01 find4q % quad quadrant 4:1 math check (\n\n\n amplitude 01 4:1\n\n) print flush angsBBE8.01 angsBEF8.01 angsBBE9.01 angsBEF9.01 find4q % quad quadrant 4:1 spread check (\n amplitude 33 4:1\n\n) print flush angsBBE8.33 angsBEF8.33 angsBBE9.33 angsBEF9.33 find4q % quad quadrant 4:1 spread check (\n amplitude 67 4:1\n\n) print flush angsBBE8.67 angsBEF8.67 angsBBE9.67 angsBEF9.67 find4q % quad quadrant 4:1 spread check (\n amplitude 100 4:1\n\n) print flush angsBBE8.100 angsBEF8.100 angsBBE9.100 angsBEF9.100 find4q % quad quadrant 4:1 spread check %%%%%%%%%%% finally the eights %%%%%%%%%%%%%% (\n\n\n\n\n\n\n) print flush (\n no spread 8:1\n\n) print flush angsBBE8.01 angsBBE8.01 angsBBE8.01 angsBBE8.01 angsBBE8.01 angsBBE8.01 angsBBE8.01 angsBBE8.01 find8q % quad quadrant 8:1 math check (\n half spread 8:1\n\n) print flush angsBBE8.01 angsBEF8.01 angsBBE8.01 angsBEF8.01 angsBBE8.01 angsBEF8.01 angsBBE8.01 angsBEF8.01 find8q % quad quadrant 8:1 math check (\n\n\n variables check amplitude 01 8:1\n\n) print flush angsBBE8.01 angsBEF8.01 angsBBE9.01 angsBEF9.01 angsBBE10.01 angsBEF10.01 angsBBE11.01 angsBEF11.01 find8q % quad quadrant 8:1 spread check (\n\n\n amplitude 01 8:1\n\n) print flush angsBBE8.01 angsBEF8.01 angsBBE9.01 angsBEF9.01 angsBBE10.01 angsBEF10.01 angsBBE11.01 angsBEF11.01 find8q % quad quadrant 8:1 spread check (\n amplitude 33 8:1\n\n) print flush angsBBE8.33 angsBEF8.33 angsBBE9.33 angsBEF9.33 angsBBE10.33 angsBEF10.33 angsBBE11.33 angsBEF11.33 find8q % quad quadrant 8:1 spread check (\n amplitude 67 8:1\n\n) print flush angsBBE8.67 angsBEF8.67 angsBBE9.67 angsBEF9.67 angsBBE10.67 angsBEF10.67 angsBBE11.67 angsBEF11.67 find8q % quad quadrant 4:1 spread check (\n amplitude 100 8:1\n\n) print flush angsBBE8.100 angsBEF8.100 angsBBE9.100 angsBEF9.100 angsBBE10.100 angsBEF10.100 angsBBE11.100 angsBEF11.100 find8q % quad quadrant 4:1 spread check % EOF