plotting – How can I make a FFT in Mathematica using data from an file?

I need to calculate the seismic moment of an earthquake data, but I don’t know how the FFT is applied in some data, my data is a plain text that I must import it to mathematica

data = -0.009142829110620023 -0.007237242507199119 -0.005856729791687345 -0.0016757444456758895 0.004101942711928292 0.005277199807646435 -0.0012104291223735055 -0.0068205115634768975 -0.002808109650848882 0.0040857888113286535 -0.0012738713758881984 -0.018890708886353625 -0.031091881280288357 -0.02698622184395104 -0.011821764971736771 0.006529962757055874 0.024002302834804243 0.033469218305463774 0.028144857229519135 0.008940462135516544 -0.01816283650535824 -0.04352074489975321 -0.05709770048044003 -0.05489633148359469 -0.03833782092192627 -0.00845350192267141 0.0298483267259239 0.061455825449889874 0.072268048614125 0.05738160601557756 0.02231607364790296 -0.01586381283070766 -0.041664472605338225 -0.048822603239018846 -0.03747423856755443 -0.014750787555201275 0.0069345264383843495 0.01808332570824239 0.01904777652291207 0.009880892145985403 -0.011157209173877584 -0.03230967155813778 -0.03596380350816044 -0.01937315633517632 0.00728709535709263 0.03525832276262811 0.05606242152672219 0.05840645454389285 0.04156807365180021 0.018380856021558735 -0.002305355563315299 -0.018954007639006433 -0.026156227342111465 -0.018470244011170315 -0.0027245597522543253 0.006457560184263524 0.0020006428688122482 -0.012749219546641205 -0.03145186607703128 -0.04735072562552381 -0.04723315059528739 -0.022067979280536883 0.014085326264247864 0.03723790931333207 0.035828121139498 0.016571853409565008 -0.0067240226524118716 -0.02604352874670279 -0.03579336850077075 -0.02974880522535298 -0.00829113579732785 0.01792161725638784 0.035793486414550775 0.04187419062196674 0.04468628009036788 0.04662815510553379 0.03960645825622895 0.026686956746007857 0.024381126775322542 0.04020915782409727 0.06015207140865371 0.06359596673022301 0.04291323805481557 0.007502528852522933 -0.028975649880973946 -0.055674770146941534 -0.05619900043625424 -0.026097361427974263 0.01048475843001462 0.027302786827213814 0.024285876207532548 0.01841649179573205 0.01788664798079997 0.019212977384237342 0.019220243745944474 0.02179998683193043 0.03044272988228456 0.03440590493060758 0.022072108012586814 0.001746540077376478 -0.010607865375382492 -0.01036596611498064 -0.00033481958474115424 0.01740298423434944 0.037654101847632605 0.048974525441205626 0.04138319368700481 0.01541978841411778 -0.017751778172700867 -0.04491054179073279 -0.05683353329937288 -0.04671917196852715 -0.0176246595494267 0.013939825908926352 0.03499281949538097 0.044079393676789716 0.04442399992276593 0.038426734865811996 0.02989051457086152 0.023270462889036267 0.019523140310609158 0.016657054429383127 0.00923896969597028 -0.0032859331444297615 -0.011428137494623531 -0.006120717018768457 0.0095397869057069 0.02823144047645781 0.048624310593245235 0.059928523196290176 0.04580640607232442 0.012697177688504927 -0.015331484100913714 -0.02923483603758195 -0.034713517891858434 -0.029116085873108738 -0.008291648590693888 0.018608398277614326 0.036881176640940795 0.043923630425973796 0.04459413401182003 0.03542894418299688 0.01671300498500952 0.004235143541346084 0.012404611355848166 0.032234154126411924 0.044353243833101075 0.047155845374009644 0.04445650473195265 0.032582909674489166 0.011256910802414786 -0.012963965083235596 -0.029208572114164187 -0.031131386833909116 -0.023670794796344864 -0.018037831554538076 -0.014157445723302227 0.0003009756997305986 0.024046370591387686 0.03967489174879327 0.038601382549648754 0.02843468512834806 0.014878568653338378 -0.0022957544002923627 -0.019795433596707837 -0.031040740090802578 -0.03328677628797319 -0.030327810756260978 -0.023542322873420556 -0.010920479882278181 0.006921711931432113 0.021872647054741783 0.02105642330774077 0.00369080609900962 -0.015745386820509678 -0.024966810742611013 -0.023824972335606858 -0.01276146861546147 0.009926871899174433 0.034640642048515316 0.04452395983945579 0.033794595910341056 0.012953173652292004 -0.006486342465638399 -0.020198603958907057 -0.028234506145594074 -0.034869175031498466 -0.04024671486162456 -0.036703329786664164 -0.021097911165574156 0.00012917180634882102 0.020493569063214718 0.03431771425528989 0.031106377926795267 0.007638714615137091 -0.021452326077192035 -0.03921559172408905 -0.04110083986879091 -0.03403702961078375 -0.0262934279799707 -0.014673147502764943 0.005769022788880024 0.024997312471079978 0.031022546159888257 0.024904829651907948 0.010915914965568934 -0.009781806163809784 -0.03172025741842082 -0.04711353812389592 -0.05431999748878651 -0.05496663138828756 -0.049235341281529954 -0.03703753074345294 -0.018874286713461773 0.0028484071521379557 0.0215031405316256 0.03036628314596997 0.025477611564815105 0.005740196728335251 -0.018503792533340477 -0.030168131612448256 -0.02068172879959028 0.004644652223316913 0.030404939228883054 0.041650681444176954 0.030262922378021962 0.0004838314508431755 -0.03277356027145695 -0.054566912854108876 -0.05596417411318176 -0.0409929636749862 -0.021832075363375187 -0.004730161980626762 0.008965886616805415 0.018330989562758814 0.022313495317435567 0.019796947844171228 0.01144761035688104 -0.0008447176844043589 -0.01207267315305758 -0.014237860690483587 -0.004295195119663549 0.010739930700837605 0.023470762409450348 0.034117041375061136 0.0399512219552347 0.03566656437531732 0.02594546649539159 0.020894845636880297 0.024250322477601748 0.03328198007760867 0.04381714598593863 0.052576225677435966 0.055405833814992506 0.04544965015050128 0.021420433097037686 -0.007606596911424041 -0.028686832490302825 -0.031631466206466806 -0.01609465813496181 0.0067772122663621506 0.02523176895753041 0.034317858244206564 0.03167389897317895 0.01621337098034973 -0.00816563926623941 -0.030486578839591497 -0.03797541754590567 -0.025292346042720272 0.0015698750671040026 0.030882641726433815 0.05463419889484129 0.06564734740133837 0.05610854304106464 0.029401199734364825 0.000439451847171369 -0.017415512986451432 -0.019405753055482217 -0.009921494726306573 0.0038297108600171886 0.013878851162514633 0.011314111364503627 -0.003140805975998747 -0.01959217304771261 -0.02990693759091537 -0.030470572445818227 -0.01919508271785665 0.00122432870997349 0.01895945111563394 0.01968496173092765 0.0025300580608940445 -0.019378707790353677 -0.036704789593793107 -0.04266127146829648 -0.029133596158543638 0.0012792440490472059 0.030324267702447723 0.041711973138961925 0.03687363948489132 0.02322634446452318 0.004529128499998925 -0.014520829213799373 -0.02377518355690184 -0.017413529156353722 -0.0048229756969021325 0.0010563530581663306 -0.0019362340766871902 -0.007523874456416318 -0.010030816011515875 -0.00711600795129029 -0.0013001638449975901 0.001981147087559995 0.003434495003219299 0.007337044744611396 0.009336579648684744 0.002039316496669455 -0.008523347425870709 -0.008200084465339638 0.0035647776246123825 0.01760319128509538 0.0323574815818214 0.043848439948094606 0.04244578845881937 0.03000655560356476 0.014310319094837235 -0.005883103398415883 -0.030433343230616666 -0.0473998795434279 -0.04719627318761418 -0.032771465652112086 -0.010377179371000555 0.015131596887279492 0.03279581873722413 0.028415738189050244 0.002079221903957508 -0.027089313118542294 -0.04104575800669451 -0.04090868454937531 -0.03800204477320098 -0.03396897541246585 -0.02478271678249418 -0.014716453831325452 -0.009854960208852993 -0.006078719414729748 0.0036078828595754544 0.013571167362029322 0.014921884515801091 0.008958365473030855 -0.00026374304085340734 -0.01115426345599331 -0.019848309270294757 -0.018310958978115147 -0.00702079835566933 0.002157253551825451 0.004387466250901059 0.00345764156432604 0.0012155586197797241 -0.0025789446853233915 -0.008975760422315763 -0.0183621239884553 -0.027271208613353498 -0.0321243235444114 -0.03348611649246101 -0.032415164652775295 -0.027216743077090787 -0.015913078015479566 -0.0010379058884615055 0.015035645571911734 0.03383573650810484 0.051055047262415824 0.058403301894026115 0.054254867756160945 0.041036939712053265 0.019541775382402562 -0.008460588134283013 -0.03553505872408238 -0.0530890682645106 -0.056754541608253356 -0.04502509430709582 -0.021044508609765353 0.00638652918057574 0.026470079638644572 0.03109626192490931 0.01957840234601489 0.0011171749070561531 -0.011474276868220874 -0.01412944390724262 -0.0099930651059605 -0.0003330659031559334 0.013342170169123563 0.0222388530379038 0.016687878044365213 -0.00019431327439785721 -0.01843857573396907 -0.03331518545212789 -0.042456059936267186 -0.041177886465105694 -0.029793374661441406 -0.017537483695024884 -0.012389152521749007 -0.014301429009888256 -0.018679729293335504 -0.021174682534403112 -0.01670019039386918 -0.0033062818828315144 0.012731078151608198 0.023752871157934008 0.02460884044644331 0.012562284825902815 -0.008343362452451944 -0.02806014064421279 -0.038632715955183056 -0.03636034322443972 -0.02045532300922555 0.003995157424989846 0.028305697793709637 0.045534366344356716 0.051515245733052675 0.04378981894889757 0.025766378903509676 0.008225749032746399 -0.0008257115966920249 -0.0026339459602775345 -0.004592892319386646 -0.008632122927701946 -0.01043257700901529 -0.011808479526379234 -0.014237374421208504 -0.01260180083040139 -0.0062810135994626004 -0.00019884743271227274 0.0052531619398587335 0.012116940650515712 0.015566714094592256 0.008932431180494728 -0.008644621445908968 -0.03277632864374049 -0.055617825337206064 -0.06628400928391566 -0.05475374345615798 -0.025985122710290406 0.0028265585329304214 0.02229240224534639 0.030959028030478414 0.02908245672864646 0.020366681994541745 0.01044355882470538 0.00649153953788502 0.015918234137164027 0.036663592393861084 0.054554667097975414 0.057775487345137704 0.04508325799615634 0.020212001376821675 -0.010274592030938121 -0.038301419465356326 -0.053725236402298475 -0.045983396854560016 -0.01738496467435709 0.016179607395133685 0.039879214996315436 0.04974305865242233 0.04825945987110883 0.03795944034109229 0.026132818430956568 0.01990307715043231 0.017131290766998597 0.0112386612455095 -0.001333138431253974 -0.019206994552261148 -0.037638153397797296 -0.050041468641755314 -0.04796030849984975 -0.024516603710681678 0.015127862016098604 0.05113418881558221 0.06547023095185636 0.0561706517018798 0.03141505062450095 0.002087181072853672 -0.019478004616341388 -0.0266714867854708 -0.022826963174360084 -0.015256253192679614 -0.008143537349252501 -0.003963734428499232 -0.007058691691100614 -0.0141243578307525 -0.013269851799606734 -0.0031330321754305737 0.004078619840097407 0.0035951223946683836 0.006145892316301499 0.01751094610064079 0.028551287192672012 0.031826241250553194 0.02553250884714563 0.005780135852066173 -0.025407007928988687 -0.05308271378618689 -0.06031626839896045 -0.04408273036570837 -0.01806521104146367 0.00281418752702487 0.018046183055406152 0.0339111353574389 0.04624282264387929 0.04607476454432159 0.039720743804352754 0.03807978303925365 0.034420012595534205 0.021659396200705804 0.005629307426069344 -0.01182860528487748 -0.0349572837500625 -0.057612798534499625 -0.06459027174723855 -0.04935325070096857 -0.017802189866243646 0.017195074922724627 0.037632447052658925 0.031257320761935284 0.006726739313658577 -0.01763531980122694 -0.03426832090399479 -0.038992877842244165 -0.025519010627830067 0.0003280276833739431 0.025283867859984467 0.04213939018991994 0.04452218874022967 0.030614096528968435 0.011828701986114477 -0.001502910478148746 -0.010794985506204755 -0.016889110640977444 -0.01436550546125294 -0.0020940155178921557 0.01443810616308169 0.031191897206336555 0.0453079180438889 0.049559010421004863 0.03888909859865069 0.01683679559524601 -0.008914370486548308 -0.030168550075738317 -0.04078381542810385 -0.03662611664671178 -0.016399349048951257 0.013375466626355872 0.03959524793514147 0.05274742421160421 0.054033143681891604 0.05035561974648229 0.046747199542552575 0.04178178719341281 0.03101264161888126 0.015760771372002418 0.004182911671769268 0.003003314096162656 0.010015788750896568 0.020353188925709392 0.03168961947240342 0.039977750885200065 0.04118428475166537 0.03853371840584093 0.039558200265977665 0.040701834317610305 0.029244361935642137 0.005111790323514745 -0.017207954366679507 -0.028999668180713818 -0.03317313527826677 -0.030858367583444117 -0.01929043202172967 -0.001866932011652294 0.014230448045711374 0.026368092559039324 0.03412160555953811 0.03382864503402694 0.021254725331403095 -0.00043391727152551537 -0.017814573896284415 -0.016840656730164934 0.001280284236397676 0.02112606201315798 0.03347576126006399 0.03996186376661965 0.037601691269569255 0.018960733416384462 -0.010959446939516362 -0.033544395656848094 -0.03443739943359535 -0.016001581892049515 0.006184164256291382 0.020990064825611346 0.02774664724511823 0.022691635012069826 0.00041892183415163193 -0.03209910594506914 -0.053327394379843074 -0.048496218425023364 -0.02756589812491844 -0.006975956779618944 0.00920048925699928 0.022319704985226632 0.03004107594097761 0.03066457808694729 0.025183924007697953 0.011503076748876922 -0.011235997257948604 -0.034390721356895956 -0.04693561418608561 -0.0481256355873314 -0.04569176527629535 -0.04180249555960329 -0.02896398101447927 -0.007770420084259599 0.006483472840483671 0.004148939849473189 -0.006402482866597673 -0.013452960423572032 -0.01698768661746052 -0.019547324605811562 -0.016452266135910002 -0.005286921880224435 0.006680896807438652 0.013690016512259609 0.016081413500653927 0.012963759310801171 0.00437437083873802 -0.006568300981553232 -0.015305790279363542 -0.017744252558910305 -0.012970554023484562 -0.004203670606357016 0.0016216157127756856 -0.0012314101423416238 -0.012588564648032539 -0.02491221046293412 -0.028355939675318277 -0.02055405958365326 -0.0046893866356874534 0.016284827170993617 0.03572984347866848 0.0426827800645716 0.031224811809537005 0.008394792767382527 -0.011842131600062191 -0.02159783386626071 -0.023195714837241137 -0.02118709394934409 -0.013367079519531103 0.0005852364185090203 0.010493998448766835 0.011252431822935696 0.010875638265167279 0.01255595311279935 0.007868972556941653 -0.004225672112951724 -0.01478076121111614 -0.023437863245718504 -0.03583870857071467 -0.04657763046142827 -0.041913573512117726 -0.02040085927313686 0.004914223307475643 0.021947453343383865 0.027287132451798396 0.025692313909166965 0.020277333803711967 0.00965803026544662 -0.0038285570842187403 -0.012827293519688705 -0.012548987843869916 -0.00579290342358114 0.0021715032008259947 0.007444658182675437 0.009535276801773655 0.009674846281808123 0.004683826048231455 -0.008224481001802238 -0.024017710225372545 -0.0328264193279751 -0.026638917150996002 -0.0049195811046038405 0.023089087189077186 0.04599724888239172 0.057725416934341904 0.056767584976948574 0.043332681420801426 0.018885626614716083 -0.009796944312115528 -0.031827306338480764 -0.039552933155151036 -0.03334759561361974 -0.01930186735903299 -0.002246296163495718 0.014155801989434277 0.02415727468763754 0.025928482124533348 0.0248465763690794 0.02674173530686094 0.03151072233380933 0.033255848179328834 0.02922917727180521 0.022979051232506625 0.017271840341579178 0.009649285839460684 -0.003386163284976655 -0.017574690465056164 -0.023160143377627854 -0.014673821231829812 0.002849625195981574 0.017018364246181996 0.019944157849557685 0.015788734840218307 0.013157873617485008 0.011618038920034357 0.008262033823319428 0.0061252205240089185 0.00528099268033878 0.001970645328291242 -0.0030081226511652496 -0.0032647874402679748 0.003980920552176569 0.01290811496238232 0.016939224775330792 0.013575618571142329 0.006680825414968836 0.004700850767131867 0.009015928655777102 0.012971562338945192 0.01089430678272963 0.00314438200763676 -0.004682468560829058 -0.006528472213750126 0.0003596529414493195 0.010892160458103513 0.015769544566549176 0.012970548067547666 0.006988171543801353 0.001969394639558558 0.0002456874158240903 0.0033457085697536993 0.012055911105697523 0.021342462868873917 0.02233579527480574 0.011813068173069737 -0.005230588522059721 -0.020216591241119592 -0.029392577272895074 -0.034510567075786064 -0.03478734879321251 -0.026770007773159445 -0.011971509481927906 0.0021949843340560923 0.011621988354640638 0.018625306727901143 0.02216490440108129 0.017221018292032788 0.004098971611626543 -0.012445098835411943 -0.027439390739200164 -0.03480795809216829 -0.032129737182945164 -0.024794044761442577 -0.015310885663620774 -0.00016762900647673682 0.016553064258492605 0.022823782941769188 0.016242313521405847 0.0066343800551662375 -0.0003698302702233785 -0.005609619548998825 -0.009061093614756956 -0.010323962645713789 -0.008977124222570325 -0.001575861329309267 0.013483649399630423 0.02563194252768286 0.02222391392947329 0.006156853711624707 -0.00837962178204328 -0.013203055494947878 -0.01169881029507661 -0.00805525060120969 -0.0033859169413355266 0.0004816166491334424 0.0014886158149487005 -0.0007560863152842748 -0.0023923215365283085 0.0007844337649983681 0.002733657043489288 -0.007877293341425487 -0.029974789236155864 -0.05009752020505943 -0.058341582157797355 -0.05445547134285162 -0.04096439815769841 -0.02160297832097823 -0.002761669030048402 0.009025919641819686 0.008253259876864403 -0.004622143069512241 -0.02242664105710672 -0.038994693101859546 -0.04947797305098631 -0.04669874124314346 -0.025244339481872435 0.009456503648690008 0.040301272920490815 0.05435328866216632 0.05043796163744935 0.03168756689658196 0.003326334598350012 -0.02601015007050187 -0.04476497679444235 -0.046282437161827936 -0.03426593861602244 -0.015370349166072357 0.006709682971027982 0.02719118767069274 0.0363436657663336 0.028794706606021115 0.01451384143662452 0.0091510541151672 0.013183100455232442 0.014666952296513875 0.012465901888753655 0.014139088948302478 0.016325509855400468 0.011489930915461268 0.0064241961126874445 0.01320747313783678 0.0278045036018961 0.036160671058359926 0.03302910947199434 0.023386312955554836 0.013219906675944592 0.0043668645535539135 -0.001146865441995366 0.005744802376286409 0.029991898281580893 0.05772522665947346 0.06954085958222628 0.06201915353644517 0.0472806119610132 0.029908712456999983 0.003030366440793463 -0.027199480927937367 -0.04004365416673291 -0.025607312301957154 0.001622515066478664 0.02358497784781315 0.0375395457552348 0.045662843914132424 0.04545143020802712 0.03156742218532819 0.005752905299390556 -0.019678091340800705 -0.03425615014620892 -0.03794857480209061 -0.035097285359328496 -0.02460586108750046 -0.005437480197237159 0.01287097657033814 0.017896168275752324 0.011090042208578224 0.002497637927271437 -0.007476967626205905 -0.022583320547894456 -0.03873910614020149 -0.04950757539971537 -0.051117976196969075 -0.03940400905785791 -0.014750635356218102 0.013406696482221989 0.03179880221578628 0.03079528029639436 0.014632293312817223 -0.002901176359192854 -0.012930582790095643 -0.012825553581697393 -0.004601821929205788 0.004821928112455033 0.008046706239403054 0.0038714611228237114 -0.0034673427095195156 -0.011408802037825447 -0.017733866174392085 -0.01849753375741172 -0.012928922148530383 -0.0032649997955817443 0.007825098695952994 0.016150016199009586 0.01920808101361334 0.018497615291436294 0.013307055345376009 0.0013791133627125383 -0.010320306599229943 -0.011672388590664735 -0.004322781120544804 0.004796389484462898 0.01253468221686455 0.014905162143763407 0.00679567247471084 -0.0105290046918736 -0.029099331842419304 -0.03897204192994242 -0.034168756331410005 -0.019575917020913068 -0.005702119160801004 0.003638300026746611 0.01028596047629065 0.012599852638888246 0.008854759283309371 0.00337786622846174 0.0010639267152736554 0.0020735726785952274 0.0021941049725381517 -0.0007533089288846721 -0.0024403500355634116 0.0022609602892975193 0.011533588871047384 0.01767689420806268 0.01732907676365043 0.011145245262929943 -0.001139483479657318 -0.013626745137419027 -0.014474431633738436 -0.0022099970767594395 0.012429508819366577 0.024720552696085064 0.03477961347681717 0.035474541799051795 0.021629137864313162 0.0016669562146166613 -0.012913912508597239 -0.020092955181985603 -0.021850450317742864 -0.018608520303889257 -0.011699479092206859 -0.0028704750858620964 0.00721811221298097 0.014845959127259502 0.01671098468422986 0.01694567422632643 0.018325398609438107 0.017480081630880575 0.014073967298460641 0.012476422806053905 0.01480167223040414 0.01801875404578781 0.015909561020216244 0.0030588947178051976 -0.01701856206845786 -0.032321399385104754 -0.036494782998208554 -0.032979880536489516 -0.024712549327004167 -0.010421994248010227 0.0075337657030291666 0.02002288096776444 0.020995430081462402 0.01563182656017813 0.010790045237695419 0.004182764472402604 -0.007276253429622082 -0.016876006508647085 -0.01484528821211702 -0.0019441506433474137 0.01447506931510983 0.03173019488849111 0.04685858899365925 0.05329029394288309 0.047680574179987376 0.033018284488861925 0.015645323651665557 -0.00034821161600376727 -0.01375569720135152 -0.02011746425541031 -0.013636611903709548 0.0006099834979819717 0.009028184421464901 0.006883942456058287 -0.0010398821842289312 -0.013924382498483765 -0.031579614375129884 -0.045056527695628665 -0.044273418657351994 -0.029718532381255373 -0.009201202117356767 0.011977484757263332 0.030935373638906593 0.04430147536082108 0.04746337436840904 0.03774254551917811 0.020733600563723642 0.00627511487404056 0.0003238001961499119 0.002108546987408171 0.005467890949229216 0.005810613512999542 0.004649700795896582 0.004467717638880299 0.003307386417967533 0.0032992232360301065 0.012677598307244681 0.02987997316930877 0.04463611444757838 0.05232697818235025 0.05098539786995436 0.035893429201346354 0.01003337060517019 -0.012537947423449011 -0.022089736258400716 -0.02110665619683194 -0.015056176483112886 -0.007375664347917773 -0.0014663533743771524 0.0011261584482008704 0.0026349730415893852 0.006967907972978274 0.014081296424314264 0.017476341994637882 0.010189836579638489 -0.0059140269730636975 -0.020603473188992086 -0.02482371242628626 -0.016985816867592977 -0.00023871206470876737 0.022975791434991094 0.04339281487681685 0.044976679280449475 0.024393982217130218 -0.004573500084019791 -0.027098503651912652 -0.038790037198172506 -0.038983469736263744 -0.02556060618860403 -0.002033561607505872 0.02200421460473598 0.03668284265330919 0.03713727838243076 0.024613917489119584 0.003634814456755757 -0.0201196750568429 -0.0395077913136223 -0.04726492191445459 -0.041949244484279585 -0.026822150925947887 -0.00611875743270041 0.014092691651155136 0.028733304544567195 0.0349388106230805 0.03067751258318033 0.01823077610281679 0.0034964948825102044 -0.012082958627552655 -0.031225755158632466 -0.050449880624204434 -0.0598407351833959 -0.05414104137580634 -0.03694905592082247 -0.015361026057804985 0.005645727090389231 0.023548816108325207 0.03468955348543154 0.03379763172343071 0.020888301497174716 0.0025417744963753207 -0.013663506397032944 -0.024356388463933582 -0.03289593555749574 -0.040403627303251075 -0.04191157786503661 -0.034322240644053134 -0.020922274106496084 -0.00843770451889824 -0.0016497463400875555 -0.0005898178086582818 -3.0102660278826332e-05 0.00358825248951446 0.005189988273994871 -0.0034162568765836593 -0.019857412629759385 -0.030603089866036628 -0.027969619186949377 -0.018914543709969568 -0.014641100951674927 -0.01619281227619523 -0.01885830765487488 -0.022865078866089704 -0.028231199531122526 -0.02831736587092441 -0.01673526900975172 0.0029396938294684485 0.01815831086134388 0.017180755267623377 0.0013886089606487068 -0.017022064548237084 -0.029136956448333626 -0.03379589588250882 -0.03372291224786931 -0.030699995534058853 -0.025976993932660043 -0.022053905418882344 -0.022289204236572536 -0.027436857058474966 -0.03046951587976251 -0.02348621725497177 -0.009619810043067343 0.0012578535313708219 0.00682565629469776 0.009714436591951245 0.007046566560573678 -0.004279696739953049 -0.018842068931313384 -0.028430827399188865 -0.03213798280880552 -0.03217339325551024 -0.029445957856915488 -0.02437714353245596 -0.014516871935649007 0.0003239835031350513 0.012601221858953808 0.01480509401889838 0.010280177707600391 0.006229921211675019 0.0007519152190806965 -0.008108214960872884 -0.01559144901073382 -0.018097974985538747 -0.014276530218728344 -0.0054086912619272605 0.0055906173507273785 0.017103671297606482 0.025295985743066646 0.023097986899180075 0.008157991954794925 -0.0114314497000307 -0.024888930622744387 -0.02612561581012639 -0.01447719324447927 0.004327813494392369 0.022179585374455725 0.033274209366934815 0.03425762720858981 0.025743909299796704 0.014226092898244662 0.007066088320734209 0.0033570740975639203 -0.0011457643512217432 -0.004549748638007829 -0.0050793809606867295 -0.004655418863455991 -0.004487638610647804 -0.005364454408103286 -0.008769159814305896 -0.01464043479110319 -0.019888611042415898 -0.022804478786574614 -0.02591052463960674 -0.028467719128144685 -0.022437520851607325 -0.006538340680409935 0.006310921617263068 0.005866909011251394 -0.00241059756680224 -0.010518786249623808 -0.021274887638991394 -0.03448112678670025 -0.04017049952772802 -0.03354542917535576 -0.020580953210268826 -0.010489538315142408 -0.008891765590177993 -0.016454796035161708 -0.02850874882977149 -0.0383795770828877 -0.04050136655983324 -0.031594713179578314 -0.013795720074848002 0.008095632926205782 0.030192347688473693 0.04570920012114079 0.04313892349857454 0.02153759871268756 -0.0022058686932111713 -0.014607403207205355 -0.017457167403486556 -0.01573272125647492 -0.009807086787731685 -0.00224463488997526 2.4094374535834447e-06 -0.006871310550068578 -0.020402194251239382 -0.03283442988469269 -0.03489687590070983 -0.02565229879975338 -0.014622932278192925 -0.00636480129869683 0.004169387406377517 0.015777687715496893 0.019667774499708905 0.014061609561122793 0.005268187665358338 -0.0033516289091184872 -0.010150154393800747 -0.009643733399105379 -0.0011299134983496207 0.0063049848377312485 0.004998723406748508 -0.0020343271866082443 -0.00973894954463132 -0.017418921882873223 -0.023065233929978047 -0.02377171942955724 -0.017470465285063425 -0.00471253103637956 0.008267145563113636 0.013592943256149941 0.00737910818370435 -0.007005266411152828 -0.02266780384803896 -0.0339035997354984 -0.03502302482579177 -0.023478365080353916 -0.002000424507364282 0.022599506016807908 0.040246082261617716 0.045094373169398745 0.03953804794473232 0.027600230696414214 0.010447481948285545 -0.010485470944317397 -0.028302527733833054 -0.03624409375978468 -0.03538648497153436 -0.02779543644879869 -0.012883480956064374 0.007577837248673303 0.027743583511482022 0.039194953680437475

Sorry, it so long,I’m newbie in this website.

well I did this…

sis1 = Import["data.dat"];

data1 = Flatten[sis1];

ListLinePlot[data1, AxesLabel -> {Time, Amplitude},


PlotRange -> All]

at this point I need to apply the fast fourier transform to the data, to calculate the seismic moment, it should look like this.

can someone help me? thank you

complex – How to specify that symbolic expressions are real numbers in Mathematica?

I have the following complex expression

TFilter=-((K1 w^2 wp1^2)/((w^2 wp1^2)/Q1^2+(-w^2+wp1^2)^2))-(I K1 w wp1^3)/(Q1 ((w^2 wp1^2)/Q1^2+(-w^2+wp1^2)^2))+(K1 wp1^4)/((w^2 wp1^2)/Q1^2+(-w^2+wp1^2)^2)


I want to take the real part of it. However when I do Re(TFilter) the output is:

Im((K1 w wp1^3)/(Q1 ((w^2 wp1^2)/Q1^2 + (-w^2 + wp1^2)^2))) + Re(-((K1 w^2 wp1^2)/((w^2 wp1^2)/Q1^2 + (-w^2 + wp1^2)^2)) + (K1 wp1^4)/((w^2 wp1^2)/Q1^2 + (-w^2 + wp1^2)^2))


I guess it’s because Mathematica doesn’t know if the symbolic expressions are real or complex number. How do I “tell” it that? Is there any way to specify?

calculus and analysis – Symmetric part of a 4th rank tensor in mathematica

Let’s define a symbolic rank 4 tensor (of dimension 3):

MatrixForm(symbolicRank4=Array(Subscript(a,StringJoin(ToString/@{##}))&,{3,3,3,3}))


We can symmetrize this manually using the permutations you suggest:

MatrixForm(manualSymmetrization=Simplify(Mean(TensorTranspose(symbolicRank4,#)&/@Permutations(Range(4)))))


or using the built-in Symmetrize:

MatrixForm(builtInSymmetrization=Normal(Symmetrize(symbolicRank4,Symmetric(All))))


These indeed agree, and get recognized by TensorSymmetry

In(54):= builtInSymmetrization == manualSymmetrization
TensorSymmetry(builtInSymmetrization)

Out(54)= True

Out(55)= Symmetric({1, 2, 3, 4})


Finally, if you care for the independent tensor components, you can use SymmetrizedArray directly:

MatrixForm(SymmetrizedArray(pos_:>Subscript(a,StringJoin(ToString/@pos)),{3,3,3,3},Symmetric(All)))


The particular examples given in the post can be symmetrized as:

MatrixForm(Symmetrize(TensorProduct(IdentityMatrix(3),IdentityMatrix(3)),Symmetric(All)))
MatrixForm(Symmetrize(TensorProduct(Array(a,{3,3}),Array(b,{3,3})),Symmetric(All)))


fitting – Finding astroids – Mathematica Stack Exchange

An astroid is a particular mathematical curve: a hypocycloid with four cusps.

Given a lot of data points I’m trying to fit such a curve to the data.
As an astroid is also an algebraic curve of grade 6 I used LinearModelFit:

points=Import("https://pastebin.com/raw/Bi3DPvNj","Data");
lin ={ #1 + #2, #1^2 + #2^2, #1^3 + #2^3, #1^4 + #2^4, #1^5 + #2^5, #1^6 + #2^6, #1 #2, #1^2 #2 + #1 #2^2, #1^3 #2 + #1 #2^3, #1^4 #2 + #1 #2^4, #1^5 #2 + #1 #2^5, #1^2 #2^2, #1^3 #2^2 + #1^2 #2^3, #1^4 #2^2+ #1^2 #2^4, #1^3 #2^3} & @@@ points;
lm = LinearModelFit(lin,Prepend(Table(Subscript(a,i),{i,1,14}),1),Table(Subscript(a,i),{i,1,14}));
Quiet@lm("ANOVATable")


Which results in

w(x_, y_) :=lm("BestFitParameters").{1, x+y,  x^2+y^2, x^3+ y^3, x^4+ y^4, x^5+ y^5, x^6+y^6, x y, x y^2+ x^2 y, x y^3+ x^3 y, x y^4+x^4 y, x y^5+x^5 y, x^2 y^2, x^2 y^3+x^3 y^2, x^2 y^4+ x^4 y^2}-x^3 y^3;
ContourPlot(w(x, y) == 0, {x, 0.8, 1.0}, {y, 0.8, 1.0}, Prolog -> Point(points),ContourStyle->{Red},PlotPoints->109,ImageSize->Large)


Actually, the fit is okay, except near 2 of the cusps (green). I’m pretty sure the fit could be improved, but how?

plotting – How to plot Loglinear histogram in mathematica for x and y data

I have an x and y data, x is in log scale and y is in linear scale. I am trying to plot the histogram between these two data. How to do it? and also how to customize the width of the individual rectangle of the histogram. Below is How I tried

data={{12.5,61.42},{16,56.81},{20,56.7},{25,57.62},{31.5,56.76},{40,63.88},{50,72.13},{63,76.55},{80,71.44},{100,61.58},{125,61.12},{160,52.84},{200,59.99},{250,58.84},{315,53.06},{400,55.39},{500,54.05},{630,52.82},{800,46.94},{1000,50.28},{1250.,54.56},{1600.,56.71},{2000,54.93},{2500.,52.53},{3150.,46.46},{4000,45.28},{5000,45.75},{6300.,45.14},{8000,42.27},{10000,43.35},{12500.,42.6},{16000,38.8},{20000,35.36}};


p[1] = Show[
Table[ListLogLinearPlot[data,
Joined -> True,PlotStyle -> {Red, Thickness[0.002]}], {i, 1, Length[komodo]}],
PlotRange -> All]

Histogram[data]

matrix – Need help reviewing Mathematica expression which came from Physics

Please help me check the conversion of these two expressions in physics to their respective Mathematica expression. Where sigma is the Pauli matrices in standard form, E/p0 is energy, m is mass and p is the momentum.

For eq(5.29)
I got:

w = ((e + m)/(2*m))^(1/2) {{1 + p3/(e + m), (p1 - (I *p2))/(e + m), 0,
0}, {(p1 + (I* p2))/(e + m), 1 - p3/(e + m), 0, 0}, {0, 0,
1 - p3/(e + m), -((p1 - (I* p2))/(e + m))}, {0,
0, -((p1 + (I* p2))/(e + m)), 1 + p3/(e + m)}}


And for eq(5.30)

P = (m^(-1))*(((Gamma)0*p0) +((Gamma)1*p1) + ((Gamma)2*
p2) + ((Gamma)3*p3));


Where,

(Gamma)0 = {{0, 0, 1, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}};
(Gamma)1 = {{0, 0, 0, 1}, {0, 0, 1, 0}, {0, -1, 0, 0}, {-1, 0, 0, 0}};
(Gamma)2 = {{0, 0, 0, -I}, {0, 0, I, 0}, {0, I, 0, 0}, {-I, 0, 0, 0}};
(Gamma)3 = {{0, 0, 1, 0}, {0, 0, 0, -1}, {-1, 0, 0, 0}, {0, 1, 0, 0}};


front end – What is the black-background Mathematica code editor in the movie Arrival?

Thanks for contributing an answer to Mathematica Stack Exchange!

But avoid

• Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

mathematical modeling – Plot 6 variables in Mathematica?

my first time posting to the Mathematica Stack. I was wondering if anyone knows if there is a way to plot 6 ODE’s of 6 variables in Mathematica given initial conditions?

Then here is what I tried in Mathematica, but am not having luck since I assume it has no axis to plot. Any ideas?

graphics – Adopt Mathematica codes for circumscribed and inscribed ellipsoids to related sets

Users Daniel Huber and Dominic have provided an interesting answer each to the question JohnEllipsoids of constructing circumscribing and inscribing ellipsoids for a certain three-dimensional convex set of quantum-information-theoretic interest. (The issue posed of minimality and maximality of volume has, however, not yet been addressed. Since the inscribed approach involves numerical fitting it seems unlikely to be strictly maximal, but the minimality of the circumscribed one seems less clear. Dominic has noted the availability of a python code “Inner and outer Löwner-John Ellipsoids” Mosekpythoncode for these tasks. However, it appears to require the convex set in question to be a polytope, which is not the case at hand, although the code might be adoptable to a non-polytope input (see comments in Adamaszek1 Adamaszek2).)

The defining constraint for the convex set (the “ordered spectra of two-qubit density matrices”) under study was

 1 > x && x >= y && y >= z && z >= 1 - x - y - z >= 0 &&
x - z < 2 Sqrt(y (1 - x - y - z)


Further, it was also noted that
there are two other sets of associated interest Adhikari, also circumscribing and inscribed within the convex body under examination. These are given by the constraints

 1 > x && x >= y && y >= z && z >= 1 - x - y - z >= 0 &&
x^2 + y^2 + (1 - x - y - z)^2 + z^2 < 3/8)


and

 1 > x && x >= y && y >= z && z >= 1 - x - y - z >= 0 &&
x^2 + y^2 + (1 - x - y - z)^2 + z^2 < 1/3)  .


(Certainly, at least, the latter set is convex–corresponding to separable density matrices–so the question of the John ellipsoids for it seem valid ones to ask.)

We have attempted (clearly not fully successfully) to adopt the answer of Huber to the construction of a circumscribing ellipsoid for the set defined by the latter constraint and the answer of Dominic for the former case. (The volume of the former set is $$frac{left(14-3 sqrt{6}right) pi }{3456 sqrt{3}} approx 0.0034909$$ and of the latter set, $$frac{pi }{864 sqrt{3}} approx 0.0020993$$, while that of the original main set of interest is
$$frac{1}{576} left(8-6 sqrt{2}-9 sqrt{2} pi +24 sqrt{2} cos^{-1}left(frac{1}{3}right)right) approx 0.00227243$$.)

In the circumscribed case, Huber employed the four extremal points

pts={{1/3, 1/3, 1/3}, {1/4, 1/4, 1/4}, {1/2, 1/6, 1/6}, {1/8 (2 + Sqrt(2)), 1/8 (2 + Sqrt(2)), 1/2 (1 + 1/4 (-2 - Sqrt(2)))}}


It appears possible to pursue the modified problem with three of the same points, only replacing

{1/8 (2 + Sqrt(2)), 1/8 (2 + Sqrt(2)), 1/2 (1 + 1/4 (-2 - Sqrt(2)))}


by

{1/12 (3 + Sqrt(3)), 1/12 (3 + Sqrt(3)), 1/12 (3 - Sqrt(3))}


(The second and fourth points remain the furthest apart, as Huber requires, with Norm(pts(2) – pts(4)) equalling $$frac{1}{2 sqrt{3}}$$.)

My modification of the Huber code and its output is
ModifiedHuber

However, this led to a set of semiaxes

{1/3 I Sqrt(2/949 (81 + 56 Sqrt(3))), Sqrt( 2/429 (-17 + 12 Sqrt(3))), 1/(4 Sqrt(3))}


which when inputted to the volume formula

4/3 a1 a2 a3 (Pi)


gives a clearly unacceptable (imaginary!) volume of

2/351 I Sqrt(1/803 (639 + 20 Sqrt(3))) (Pi)


approx 0. + 0.0163957 I .

Now, here is our adoption of the inscribed ellipsoid code of Dominic (only replacing the original defining constraint by the one with the 3/8 bound).

ModifiedDominic

The output certainly seems less problematical than our modification of the circumscribed ellipsoid code (no imaginary volume,…).

Incorporation into the modified Huber and Dominic two-set plots of a third–the original set (involving the x – z < 2 Sqrt(y (1 – x – y – z) inequality)–should be of interest.

Computation of the volumes of new ellipsoids should be of interest. (For thoroughness, although not of immediate relevance to the problems at hand, let us note that the volumes of the three sets of interest have also been computed when Hilbert-Schmidt measure is attached to them ThreeVolumes. Listed increasingly, these volumes are $$frac{35 pi }{23328 sqrt{3}} approx 0.00272132$$, $$frac{29902415923}{497664}-frac{50274109}{512 sqrt{2}}-frac{3072529845 pi }{32768 sqrt{2}}+frac{1024176615 cos ^{-1}left(frac{1}{3}right)}{4096 sqrt{2}} approx 0.00365826$$ and $$frac{35 sqrt{frac{1}{3} left(2692167889921345-919847607929856 sqrt{6}right)} pi}{27518828544} approx 0.0483353$$. These calculations are of relevance when the sets are viewed in the 15-dimensional context of the two-qubit density matrices, rather than strictly a three-dimensional one.)

fitting – Using LinearModelFit or Predict to attempt a multiple linear regression model in Mathematica

I’m using Mathematica for a project, in which I would like to fit a multiple linear regression model to my data (which is made up of both numerical and categorical variables).

I have been trying to use the function LinearModelFit to do this, but I have had no luck. Based on the MMA documentation available, the examples they’ve given only use simple numerical data such as {{0, 1}, {1, 0}, {3, 2}, {5, 4}}. In my case, I have 3 numerical variables, 4 categorical variables and my response variable, so I haven’t been able to achieve this with LinearModelFit.

I then tried to use Predict(list1 -> list 2, Method->”LinearRegression”), with all my variable inputs in a list which I inserted in place of list1, and then my list of response variable values in a list which I inserted in place of list 2. This resulted in an error “Incompatible variable type (!(“Numerical”)) and variable value”.

I’m wondering does anyone know if there is a different function I should be using or if I’m perhaps not using the 2 functions mentioned above correctly?

Thanks.