diff --git a/cherab/core/atomic/__init__.pxd b/cherab/core/atomic/__init__.pxd index 3b2aa5c6..e602d722 100644 --- a/cherab/core/atomic/__init__.pxd +++ b/cherab/core/atomic/__init__.pxd @@ -22,5 +22,6 @@ from cherab.core.atomic.line cimport Line from cherab.core.atomic.interface cimport AtomicData from cherab.core.atomic.rates cimport * from cherab.core.atomic.zeeman cimport ZeemanStructure +from cherab.core.atomic.stark cimport StarkStructure, InterpolatedStarkStructure from cherab.core.atomic.gaunt cimport * diff --git a/cherab/core/atomic/__init__.py b/cherab/core/atomic/__init__.py index 35a7f80e..eaf6f82c 100644 --- a/cherab/core/atomic/__init__.py +++ b/cherab/core/atomic/__init__.py @@ -22,4 +22,5 @@ from .interface import AtomicData from .rates import * from .zeeman import ZeemanStructure +from .stark import StarkStructure, InterpolatedStarkStructure from .gaunt import * diff --git a/cherab/core/atomic/data/lineshape/mse/h/0.json b/cherab/core/atomic/data/lineshape/mse/h/0.json new file mode 100644 index 00000000..92357105 --- /dev/null +++ b/cherab/core/atomic/data/lineshape/mse/h/0.json @@ -0,0 +1,1529 @@ +{ + "3 -> 2": { + "b": [ + 1, + 3, + 5, + 8 + ], + "energy": [ + 20000, + 30000, + 50000, + 80000, + 100000, + 150000, + 200000 + ], + "index": [ + 0, + 1, + 2, + 3, + 4 + ], + "ne": [ + 1e+16, + 1e+17, + 1e+18, + 1e+19, + 1e+20, + 1e+21, + 1e+22 + ], + "polarisation": [ + 1, + 1, + 0, + 0, + 0 + ], + "ratio": [ + [ + [ + [ + 0.19203816493564074, + 0.06766741306556562, + 0.10331608673077844, + 0.08054225121530627, + 0.1524551665205293 + ], + [ + 0.19251287196747033, + 0.06744496012410221, + 0.10387941316447888, + 0.08030226057102276, + 0.152116930156661 + ], + [ + 0.19262131693518741, + 0.06745157965998147, + 0.1039188152459229, + 0.08033492505300997, + 0.151984021573492 + ], + [ + 0.19278550732619607, + 0.06737006579756813, + 0.10413349373896272, + 0.08027495830515773, + 0.1518287284952134 + ] + ], + [ + [ + 0.18483005280675444, + 0.07161821026725088, + 0.09503829120242933, + 0.08524475255683889, + 0.1556837195701037 + ], + [ + 0.18492135987368394, + 0.07079719148977351, + 0.09695755224438647, + 0.08429354110740628, + 0.15549103522159177 + ], + [ + 0.18486288296955472, + 0.0711786968813757, + 0.09600049459598653, + 0.08477392683997821, + 0.15561544019788218 + ], + [ + 0.18457857483636309, + 0.0710241288113475, + 0.09639645843850612, + 0.08462896557237562, + 0.15566115975958922 + ] + ], + [ + [ + 0.19264680642550763, + 0.0841074160453192, + 0.06401016101750624, + 0.10011023512349425, + 0.15544878460092645 + ], + [ + 0.18703014071113924, + 0.08203118351735848, + 0.06818803101485368, + 0.09766911362449254, + 0.15859660148772572 + ], + [ + 0.18992320719074937, + 0.08319678282571831, + 0.06541990585198434, + 0.09908748389062508, + 0.15733422383629758 + ], + [ + 0.18876439077347165, + 0.08290807104408987, + 0.06604755668381788, + 0.098789304529158, + 0.1578728723561984 + ] + ], + [ + [ + 0.23487681515807515, + 0.09630350235556336, + 0.04185054026591261, + 0.11462682742312083, + 0.12978072237636568 + ], + [ + 0.22275309596564383, + 0.0947294276256241, + 0.04291727245686699, + 0.11278807440822054, + 0.13818867752646644 + ], + [ + 0.23007572738518464, + 0.09562544883876024, + 0.04212194161941693, + 0.11389004237331382, + 0.13332470347591666 + ], + [ + 0.22843512851896544, + 0.09541682237891042, + 0.04227081346690628, + 0.11369413622205732, + 0.13440066367264322 + ] + ], + [ + [ + 0.2633432921847469, + 0.10052020699748283, + 0.03896194508854774, + 0.11964582946833206, + 0.109200372353264 + ], + [ + 0.2539647510771519, + 0.09961360990886049, + 0.03920243670706462, + 0.11860334774611167, + 0.1155982300993872 + ], + [ + 0.2600549615950209, + 0.10017097498532987, + 0.03895811733556681, + 0.11930377032678707, + 0.11153965655480583 + ], + [ + 0.25906214541843553, + 0.10007040029584807, + 0.03896300126675933, + 0.11923911779257343, + 0.11219640793560134 + ] + ], + [ + [ + 0.2788784522401652, + 0.10192975830032053, + 0.03874671452807249, + 0.12132357108709345, + 0.09856072996443091 + ], + [ + 0.2735573111425332, + 0.10143380159296705, + 0.03890141091658119, + 0.12077052979555442, + 0.10211560212363073 + ], + [ + 0.2771552791254718, + 0.10175313751439113, + 0.03874037393637107, + 0.12118812809623493, + 0.09974072089026698 + ], + [ + 0.27665472592094315, + 0.10170045179371828, + 0.03873520661509749, + 0.12118140943913308, + 0.10005556919157958 + ] + ], + [ + [ + 0.2818556279728569, + 0.10217774483447827, + 0.03872721057292283, + 0.12161874113759903, + 0.09654848946857145 + ], + [ + 0.2776039044869715, + 0.10178239035701407, + 0.038847272696464194, + 0.12118557141928916, + 0.09938281328374683 + ], + [ + 0.2804700142208438, + 0.10203541577288072, + 0.03872129490555893, + 0.12152432189412918, + 0.09748396031700929 + ], + [ + 0.28005947566846157, + 0.10199076202539849, + 0.0387163158718858, + 0.12152732926966604, + 0.09773585499881891 + ] + ] + ], + [ + [ + [ + 0.18358543965110874, + 0.07038876293359143, + 0.09836460820986419, + 0.08378429003698874, + 0.1556696189940013 + ], + [ + 0.1840277941659251, + 0.07017014344683314, + 0.09890268459889252, + 0.08355564874783908, + 0.1553576261234727 + ], + [ + 0.18414042768725547, + 0.07015579044387216, + 0.09897203930184907, + 0.08357012353538817, + 0.15523183287526285 + ], + [ + 0.18424484915298556, + 0.07007722607889184, + 0.09915711361487758, + 0.08352381186905404, + 0.15511942386068378 + ] + ], + [ + [ + 0.1783090094224914, + 0.07351709819610759, + 0.09166100243483927, + 0.08750797174474764, + 0.15815942291305984 + ], + [ + 0.17827640916794535, + 0.07288119959522454, + 0.09318131230136688, + 0.08678386012298461, + 0.15801542339645128 + ], + [ + 0.1782771737942652, + 0.07315540547625883, + 0.09244807578220905, + 0.08714328830524015, + 0.15811464353915936 + ], + [ + 0.17798913149819343, + 0.07302378060065887, + 0.09276467122347201, + 0.08703575832168496, + 0.15818122410508748 + ] + ], + [ + [ + 0.18555469949685865, + 0.08391855533390366, + 0.06462860339940524, + 0.09988890678778306, + 0.15878658473047877 + ], + [ + 0.18051827832674683, + 0.08219781290595646, + 0.06833165137876081, + 0.09787769050542902, + 0.1613337060464803 + ], + [ + 0.18300943566959801, + 0.08318307773322894, + 0.06586005552167859, + 0.099088329533987, + 0.16036381937630648 + ], + [ + 0.18190098699318702, + 0.08293735467548888, + 0.06639397758176492, + 0.09885157270685857, + 0.16086660153929416 + ] + ], + [ + [ + 0.22345381754403454, + 0.09537029081415749, + 0.04195848360493938, + 0.11351999628156606, + 0.13742432052731982 + ], + [ + 0.21065984146309247, + 0.09382805898631136, + 0.04313493468796554, + 0.111726497257226, + 0.14598058833695085 + ], + [ + 0.21838240858593663, + 0.09471785614216909, + 0.04228226874979165, + 0.11282864733939565, + 0.1409800234756753 + ], + [ + 0.21670730307858788, + 0.09451256189852036, + 0.042428805305828, + 0.11264785838393979, + 0.1420571228724179 + ] + ], + [ + [ + 0.25602117915640416, + 0.09991455922603126, + 0.03882534705347362, + 0.11892907419057216, + 0.1143204299517209 + ], + [ + 0.24497546669539488, + 0.09886576165613922, + 0.03915663667450469, + 0.11772518122878037, + 0.12176468709287824 + ], + [ + 0.2522147338833036, + 0.09952174280030295, + 0.038857642402497894, + 0.11855107451084115, + 0.11696217334470617 + ], + [ + 0.251161760466016, + 0.09941134031518901, + 0.03885633857942929, + 0.11848662612285375, + 0.11766481474951994 + ] + ], + [ + [ + 0.2740669999769788, + 0.10147701280024829, + 0.03865344564601411, + 0.12078887478907162, + 0.10204716677617662 + ], + [ + 0.2669115346351809, + 0.10080207089922899, + 0.038915544340265916, + 0.12003085664905919, + 0.10679576079385551 + ], + [ + 0.27185197394635574, + 0.10124902865743965, + 0.03867401019729568, + 0.12060863086575571, + 0.10354234330633112 + ], + [ + 0.2712924216778366, + 0.1011855773998502, + 0.03866304836649149, + 0.12060130806393841, + 0.10390385533080165 + ] + ], + [ + [ + 0.2772900768644771, + 0.10173600526557275, + 0.03863937745417244, + 0.12109715552775448, + 0.09988242332026177 + ], + [ + 0.27118701531801054, + 0.10115618867162156, + 0.03886325688644369, + 0.12045252516435614, + 0.1039345216185733 + ], + [ + 0.27540874080039446, + 0.10154042204206713, + 0.03865686618522322, + 0.12095574093317342, + 0.10114260043933897 + ], + [ + 0.2749289186335807, + 0.10148412856265275, + 0.03864649263061085, + 0.1209571459381022, + 0.10144777355184385 + ] + ] + ], + [ + [ + [ + 0.1739976222843985, + 0.07401169132255175, + 0.09064585746394428, + 0.08810153733105816, + 0.16024210274024653 + ], + [ + 0.17454311274110695, + 0.07376199188386653, + 0.09122177292311193, + 0.08784715829415893, + 0.15989752052830913 + ], + [ + 0.1746392118465155, + 0.07372590671796932, + 0.0913103100960081, + 0.08784699873700165, + 0.15979717852576322 + ], + [ + 0.17467873185375235, + 0.07364758526234812, + 0.09145257945049415, + 0.08781779548219058, + 0.15974267387809093 + ] + ], + [ + [ + 0.16899524158949553, + 0.07639180936384556, + 0.08590369890115027, + 0.09093476617261384, + 0.1622721047676426 + ], + [ + 0.1689908196361048, + 0.07591336174486027, + 0.08702389793017626, + 0.0904093413901029, + 0.1621579891168082 + ], + [ + 0.16903126064088786, + 0.07607459937977337, + 0.08652650235921311, + 0.09064554826294213, + 0.16223771967762746 + ], + [ + 0.16876111159221813, + 0.07596076873681196, + 0.08675314596187396, + 0.09057604848600093, + 0.16232948101920408 + ] + ], + [ + [ + 0.17551070527628035, + 0.08433041229449498, + 0.06420721121202007, + 0.10038466672147411, + 0.1633223571338707 + ], + [ + 0.17133357138967534, + 0.08306570361255113, + 0.06709092846774742, + 0.09892745339030778, + 0.16524912883455598 + ], + [ + 0.1733995233604464, + 0.08378725076442407, + 0.06510249751897479, + 0.09983544238032717, + 0.1645750476560508 + ], + [ + 0.17232410825787503, + 0.08359443814701537, + 0.06549516354335781, + 0.09967847888688768, + 0.16506986529380158 + ] + ], + [ + [ + 0.20966417903737658, + 0.09443057716918733, + 0.04184579116189383, + 0.11240763278070821, + 0.14648390936952235 + ], + [ + 0.19713546422511222, + 0.09303433117261634, + 0.04301136894152988, + 0.1107996328268843, + 0.15458693494641337 + ], + [ + 0.2047974106473521, + 0.09383516379608174, + 0.04216753179030767, + 0.11180788249934977, + 0.14979071659058474 + ], + [ + 0.20317835939382328, + 0.09364422433662611, + 0.04229509805087979, + 0.11166190054416472, + 0.15080959737141772 + ] + ], + [ + [ + 0.24691148637208932, + 0.09918408072942414, + 0.038519147842596024, + 0.11806607624932698, + 0.12077495199260813 + ], + [ + 0.23478918977807653, + 0.09802405577809989, + 0.03889605348730701, + 0.11674216659078128, + 0.12894312925477353 + ], + [ + 0.24279822051190403, + 0.09874609600414955, + 0.03858391615871015, + 0.11765943013958359, + 0.12361144744160468 + ], + [ + 0.24173604592039508, + 0.09862731044600762, + 0.03857180826628072, + 0.1176037604879086, + 0.1243290978396055 + ] + ], + [ + [ + 0.2683832202849167, + 0.10092850479447632, + 0.03846636000891829, + 0.12014259198815273, + 0.10627093306599437 + ], + [ + 0.2595884759556618, + 0.10007230587880053, + 0.038838802221445555, + 0.11918153876914611, + 0.11211311515277686 + ], + [ + 0.2657333797506136, + 0.10064087254696881, + 0.038526927352097846, + 0.1199171227197601, + 0.10804838750586644 + ], + [ + 0.2651574067187189, + 0.100567361866758, + 0.03850660195431026, + 0.11991708872922835, + 0.10843024409034392 + ] + ], + [ + [ + 0.27214965918081924, + 0.10121540699278633, + 0.03846730600536226, + 0.1204841126895864, + 0.10375834472185544 + ], + [ + 0.26435869609310203, + 0.10044740986007904, + 0.03880585101642896, + 0.11962827045274846, + 0.10893912062419252 + ], + [ + 0.26982531133518206, + 0.10095955855324595, + 0.03852348306361182, + 0.12029684825230624, + 0.10530745446324495 + ], + [ + 0.2693211915207391, + 0.10089263690649612, + 0.03850438631548465, + 0.12030494851870316, + 0.10563743249894651 + ] + ] + ], + [ + [ + [ + 0.16961653887645162, + 0.07675135483507277, + 0.08322319273960886, + 0.09136866726503953, + 0.16384851572205306 + ], + [ + 0.1662058612358378, + 0.07680004603596888, + 0.08435843840623973, + 0.09148306739866968, + 0.1642555175412027 + ], + [ + 0.1662726404158785, + 0.07674931700898242, + 0.08444613286849598, + 0.09147900585476393, + 0.16418922405981848 + ], + [ + 0.16625822977485452, + 0.07666443119344481, + 0.08455993420249862, + 0.0914622230308574, + 0.16418429668577184 + ] + ], + [ + [ + 0.1673745555680502, + 0.07865194117534928, + 0.0791722103796289, + 0.09363122069235506, + 0.16485734996864165 + ], + [ + 0.16064060308000266, + 0.07867649674276377, + 0.08102735523690985, + 0.09371826744528945, + 0.16625757903503555 + ], + [ + 0.16068473924924812, + 0.078772363556434, + 0.08065324582369779, + 0.09389031443927058, + 0.16634170655597352 + ], + [ + 0.16039980431894288, + 0.07865873298759256, + 0.08082925988344287, + 0.09384146556416373, + 0.1664706394053294 + ] + ], + [ + [ + 0.17086464625374775, + 0.08537302882889923, + 0.06159618896044255, + 0.10163234096959281, + 0.1659661181141916 + ], + [ + 0.16413794831699333, + 0.0844824233341689, + 0.06433612523065378, + 0.10063420045689841, + 0.16847827681978217 + ], + [ + 0.16601497829448844, + 0.08500523320292726, + 0.06272611952816433, + 0.10131939317383191, + 0.16794176494783228 + ], + [ + 0.1648717785627485, + 0.0848345608611888, + 0.0630309820261974, + 0.10120935361318305, + 0.16848921421805646 + ] + ], + [ + [ + 0.20275890935336252, + 0.09421347006804502, + 0.041133074329526564, + 0.11215644618951183, + 0.15111755473623542 + ], + [ + 0.1900385685686571, + 0.09297611218274358, + 0.042230377868675145, + 0.11075175571244565, + 0.15902246995180694 + ], + [ + 0.19740166482440044, + 0.09365072398359936, + 0.04149400603710958, + 0.11162412203089588, + 0.15453031553619495 + ], + [ + 0.19574253610051512, + 0.09346250477711096, + 0.04160027918283557, + 0.1115026658891799, + 0.1555632821006161 + ] + ], + [ + [ + 0.2424702825052651, + 0.09886858719826115, + 0.03810934603616855, + 0.11769813140229379, + 0.12408879411064397 + ], + [ + 0.22999600711482274, + 0.09769725790817793, + 0.03845078173821469, + 0.1163755139637958, + 0.1324784428324003 + ], + [ + 0.23801173130328648, + 0.09840300415170958, + 0.038190618397123656, + 0.11728845732747127, + 0.12711205447205223 + ], + [ + 0.2368844417112865, + 0.098271997410446, + 0.03816806506544702, + 0.11724048825409644, + 0.12787722841436736 + ] + ], + [ + [ + 0.26624313416662176, + 0.1006926392687541, + 0.03825850803236107, + 0.11986957459129165, + 0.10805771102428226 + ], + [ + 0.2568978959769952, + 0.09977610404522398, + 0.03865659590138563, + 0.11885180442301999, + 0.11426654764187283 + ], + [ + 0.2632946655919018, + 0.10036984867599096, + 0.03834421164353574, + 0.11963277762586674, + 0.11000582925865568 + ], + [ + 0.26268011700902544, + 0.10028526966108751, + 0.03831664627993006, + 0.11964236292718156, + 0.11041566262728816 + ] + ], + [ + [ + 0.2704850022818803, + 0.1009997582893385, + 0.03828754510283959, + 0.12023518449697788, + 0.10523501096990383 + ], + [ + 0.2621481411330238, + 0.100167091671037, + 0.038659338324692545, + 0.11931754304129566, + 0.11078195639646285 + ], + [ + 0.267882479641925, + 0.10070919100562717, + 0.038369262370350286, + 0.12003724635821947, + 0.10694306044484052 + ], + [ + 0.26734361712919413, + 0.10063157193923505, + 0.03834367646984411, + 0.12005550857643453, + 0.10729743444988922 + ] + ] + ], + [ + [ + [ + 0.16491105395889186, + 0.07817253675806961, + 0.08020667654044299, + 0.09306390469003294, + 0.1661013550320085 + ], + [ + 0.16210475106006672, + 0.07816518774159399, + 0.08126961451514636, + 0.09311936999190361, + 0.16639345222132268 + ], + [ + 0.16215416891084242, + 0.07810765123627958, + 0.08135475389688601, + 0.09311495169983999, + 0.16634555871157322 + ], + [ + 0.1621115946958683, + 0.07801857421125681, + 0.08145513015874875, + 0.09310476032351865, + 0.16636573795854168 + ] + ], + [ + [ + 0.16319606497815253, + 0.07986107703473382, + 0.07657891531608646, + 0.0950741010823937, + 0.16688787407770975 + ], + [ + 0.1565481797333264, + 0.07991884378632423, + 0.0783181670958629, + 0.09520852695276992, + 0.16828037229837975 + ], + [ + 0.15658414621537642, + 0.07998709544557568, + 0.07799391787240936, + 0.09535550501313517, + 0.1683714085611916 + ], + [ + 0.15629276671966444, + 0.07987156139309755, + 0.07814713694759291, + 0.0953160533289597, + 0.1685188649705176 + ] + ], + [ + [ + 0.16724976551478407, + 0.0859086536624101, + 0.06053940386827526, + 0.10227370235189757, + 0.16765335736002504 + ], + [ + 0.16039151611588495, + 0.08514918145164689, + 0.06308451693720024, + 0.10143950729468239, + 0.17013103625852802 + ], + [ + 0.16215605212843842, + 0.08558518364251184, + 0.061639634907460106, + 0.10202918811355641, + 0.16966796727225245 + ], + [ + 0.16097964354342717, + 0.0854228379059934, + 0.06190217611931704, + 0.10194076128405807, + 0.1702444029189179 + ] + ], + [ + [ + 0.19889588816651652, + 0.09411521368700494, + 0.0408098483277343, + 0.11204355953749146, + 0.15358343436451105 + ], + [ + 0.18630260106039362, + 0.09296180638163751, + 0.04186606400388754, + 0.11074680549844065, + 0.1612740235858376 + ], + [ + 0.19349632204827732, + 0.09356898581883319, + 0.04117718652903822, + 0.11154696700285346, + 0.15695869962513642 + ], + [ + 0.19181522301873685, + 0.09338156661736845, + 0.04127328144466252, + 0.11143844227404939, + 0.15799909815455115 + ] + ], + [ + [ + 0.23999300087705824, + 0.09870768595032904, + 0.03789250383011337, + 0.1175108683742038, + 0.12589244140682468 + ], + [ + 0.227427636885941, + 0.09753689341820847, + 0.038212394867138, + 0.11619717585911862, + 0.13433971741256445 + ], + [ + 0.2354229747727938, + 0.09822890326070793, + 0.037978465805831196, + 0.11710222286649241, + 0.1289789206805716 + ], + [ + 0.23425720246316972, + 0.09809121515984345, + 0.03795068396299308, + 0.11705877952307178, + 0.12977072012250693 + ] + ], + [ + [ + 0.2653034599931177, + 0.10059186007394452, + 0.038153921731743264, + 0.11975396560926282, + 0.1088485225884905 + ], + [ + 0.25574601607978714, + 0.09965041384208566, + 0.03856663049923584, + 0.11871504469590947, + 0.11519490292287546 + ], + [ + 0.2622425014842846, + 0.10025235789448465, + 0.03825121795998941, + 0.11951445620738467, + 0.11086071719599892 + ], + [ + 0.2616101904085794, + 0.10016236214954773, + 0.038219857770449533, + 0.11953041715578527, + 0.11128226771992782 + ] + ], + [ + [ + 0.26990301510907433, + 0.10091617112723361, + 0.03819902326765436, + 0.1201400558425455, + 0.10579324220802931 + ], + [ + 0.26136800404712984, + 0.10005760464780289, + 0.03858937640277345, + 0.11920013725936923, + 0.11146887966648948 + ], + [ + 0.2671991878469647, + 0.10060962150513839, + 0.03829276256130161, + 0.1199403630593203, + 0.10755765895075729 + ], + [ + 0.266646501645361, + 0.10052697356108652, + 0.03826380082870571, + 0.1199655322347999, + 0.10792044255272738 + ] + ] + ], + [ + [ + [ + 0.15363433571729393, + 0.08080661688305493, + 0.07580699903692216, + 0.09620722208387499, + 0.17036199413750094 + ], + [ + 0.15528212395485697, + 0.08029189801880189, + 0.07645467314495638, + 0.09567517931991414, + 0.16993718753889916 + ], + [ + 0.15529578728391472, + 0.08022227713172338, + 0.07653247202773279, + 0.09567286011626237, + 0.16992449708232413 + ], + [ + 0.1552000373342141, + 0.08012261153000498, + 0.07661192688562007, + 0.09567468771355389, + 0.1699907552037141 + ] + ], + [ + [ + 0.15434950432373268, + 0.08207662081695329, + 0.0726137204750733, + 0.09771927091389569, + 0.17041563563221135 + ], + [ + 0.14987462242390626, + 0.08185768154116448, + 0.07404899551925447, + 0.09754095436041857, + 0.17161505736720936 + ], + [ + 0.1498832584015166, + 0.08188561989282861, + 0.07378945429336747, + 0.09765655797424413, + 0.1717267386388015 + ], + [ + 0.14957171250786636, + 0.0817624026619346, + 0.07390773890257328, + 0.09763276797912375, + 0.17191123420243518 + ] + ], + [ + [ + 0.1611396813018234, + 0.08691794824283987, + 0.05874923889554458, + 0.10348328728791488, + 0.17027968492278894 + ], + [ + 0.15431376839568622, + 0.08624909467479144, + 0.06101407384512204, + 0.10277372689905251, + 0.17280622038319093 + ], + [ + 0.15587763371537844, + 0.08655894478703186, + 0.05980618596209438, + 0.10322995198482308, + 0.1724661004083615 + ], + [ + 0.15462737338042107, + 0.0864059750015746, + 0.0599999580988279, + 0.1031776737802031, + 0.17310270642918382 + ] + ], + [ + [ + 0.1927501405378048, + 0.09402448314274313, + 0.040277690242247775, + 0.11194422783627699, + 0.15737852850982972 + ], + [ + 0.18050546801573691, + 0.09299394642179247, + 0.041261956204976545, + 0.11081083794392341, + 0.1646805254214391 + ], + [ + 0.18738638383995795, + 0.09348709355314862, + 0.04064643872438687, + 0.11149244254809872, + 0.1606808332543868 + ], + [ + 0.18564609935008985, + 0.09330126954698391, + 0.04072462329235616, + 0.11141136885987428, + 0.16173968862574067 + ] + ], + [ + [ + 0.23510648817559351, + 0.09839637774500344, + 0.03762685825443752, + 0.11714934408975984, + 0.12927417582300246 + ], + [ + 0.22327959901932162, + 0.09728461946393231, + 0.037821661433213256, + 0.115923569400511, + 0.1373303501926826 + ], + [ + 0.23128721222294873, + 0.09795464582623417, + 0.03761972470058384, + 0.11682043271451073, + 0.13196159064719687 + ], + [ + 0.23005082319989092, + 0.09780728600359728, + 0.03758121185740229, + 0.1167920187049829, + 0.13279407183407205 + ] + ], + [ + [ + 0.26269394317202044, + 0.10034609253545071, + 0.03813149988035498, + 0.11947064711023209, + 0.11070478888795199 + ], + [ + 0.2539058378515741, + 0.09944256865478766, + 0.03846703524076932, + 0.11849496428458763, + 0.11664251289406834 + ], + [ + 0.26077223492293417, + 0.10007328888458748, + 0.038116953395767095, + 0.11934712041530117, + 0.1120765198428771 + ], + [ + 0.2601200553626451, + 0.09997577927750445, + 0.0380768848541308, + 0.1193814240280023, + 0.11250588415903995 + ] + ], + [ + [ + 0.2680708410466634, + 0.10070960393259368, + 0.03819754041286275, + 0.11990343866943773, + 0.10715399646177415 + ], + [ + 0.2602319302347135, + 0.0998807703116967, + 0.03852946097961621, + 0.11901712185138517, + 0.11245668173994514 + ], + [ + 0.2664379029215371, + 0.10046554169534906, + 0.03819063504483484, + 0.11981492000459212, + 0.1083099517944554 + ], + [ + 0.2658730658366746, + 0.10037589373971784, + 0.0381539815021686, + 0.11985920209203366, + 0.10867438974774261 + ] + ] + ], + [ + [ + [ + 0.14854422136712694, + 0.08221913216790068, + 0.0727554403650848, + 0.09789534310917687, + 0.17285797367427413 + ], + [ + 0.15066886728760015, + 0.08166318387205336, + 0.07334309337553818, + 0.09732824712618934, + 0.17233104198241903 + ], + [ + 0.15065354265779685, + 0.08158438861422602, + 0.07341419381405515, + 0.097329010126494, + 0.17234563611632633 + ], + [ + 0.15051699298461513, + 0.08147480885296911, + 0.07347979118433283, + 0.09733993552286246, + 0.17244696794752806 + ] + ], + [ + [ + 0.14920391726972643, + 0.08333436951391777, + 0.07001855947441979, + 0.09922321582879595, + 0.17282189654800328 + ], + [ + 0.14538938583412925, + 0.08310721473804203, + 0.07127701558556443, + 0.0990492796198892, + 0.17387179713943965 + ], + [ + 0.14537030990469477, + 0.08310970316148229, + 0.07105306033381494, + 0.0991486885911814, + 0.17400339296117398 + ], + [ + 0.14504213764471774, + 0.08297786026973603, + 0.07114862154502052, + 0.09913566760318765, + 0.1742167817596969 + ] + ], + [ + [ + 0.15680737393139957, + 0.08755592410862872, + 0.0575906287026756, + 0.10424966800125873, + 0.17220009222173716 + ], + [ + 0.15003785142823123, + 0.08698960871489521, + 0.059655928724344186, + 0.10367641491518238, + 0.1746591219314626 + ], + [ + 0.15144510545653858, + 0.08722269403356442, + 0.05858969296017918, + 0.10405542794461276, + 0.17440963233337436 + ], + [ + 0.15014768293994765, + 0.08707145785171837, + 0.05873557742932729, + 0.1040263881865988, + 0.17509273506238165 + ] + ], + [ + [ + 0.18586379580062823, + 0.0938490097619438, + 0.04031434426054543, + 0.11174261718477295, + 0.16116213089242368 + ], + [ + 0.17623763944135232, + 0.09302926751027103, + 0.04090120176521761, + 0.11087463296060161, + 0.16707607804323363 + ], + [ + 0.18298456571306265, + 0.09344573041468368, + 0.0403113997437143, + 0.11147942144684365, + 0.16327116553822707 + ], + [ + 0.18123527872802223, + 0.09325758970547551, + 0.04037265848090965, + 0.11141711035284914, + 0.16433500209675464 + ] + ], + [ + [ + 0.24746161847464807, + 0.09929959125561978, + 0.03567166618766417, + 0.11823242717666507, + 0.123065506142727 + ], + [ + 0.21698109113069197, + 0.09686847002226104, + 0.037895701790383485, + 0.11545029157611543, + 0.14129499104589402 + ], + [ + 0.2276355579610665, + 0.09771609828124382, + 0.03740523713486519, + 0.11657390930644641, + 0.1344869762969114 + ], + [ + 0.22670798959876867, + 0.09758429033717061, + 0.03731880415012687, + 0.1165863248185862, + 0.13515658589473203 + ] + ], + [ + [ + 0.2709057395074843, + 0.1009203916203264, + 0.03709886088135364, + 0.12016225547368983, + 0.10636562227088794 + ], + [ + 0.23967752228093353, + 0.09829239221622155, + 0.03973260262846845, + 0.11714735804610989, + 0.1249888859687333 + ], + [ + 0.25873846693319397, + 0.09987602614468574, + 0.038101510423299845, + 0.11915067239144644, + 0.11350255757397104 + ], + [ + 0.2586871073813553, + 0.09981794634252565, + 0.03799253414117494, + 0.11925492796847369, + 0.11359103785714803 + ] + ], + [ + [ + 0.27532039201525477, + 0.10120109878274189, + 0.0373530020102156, + 0.12049648332617739, + 0.1032892198732377 + ], + [ + 0.242884852548099, + 0.09846160332495245, + 0.04018900277205837, + 0.11734902812344683, + 0.12255793950549283 + ], + [ + 0.26502283582855224, + 0.1003000580029296, + 0.038196515632403845, + 0.11965653634073853, + 0.1093354721096519 + ], + [ + 0.2650403052134353, + 0.10024894228352481, + 0.038095029997216694, + 0.11976984930057748, + 0.10936602581196335 + ] + ] + ] + ], + "reference": "A.V. Demura, D.S. Leontiev, V.S. Lisitsa. Polarization characteristics of electrodynamic Stark effect. Accepted to J. Exp. Theor. Phys. (2024). Data provided by Dmitry Leontiev." + } +} \ No newline at end of file diff --git a/cherab/core/atomic/interface.pxd b/cherab/core/atomic/interface.pxd index 1dacfb57..492dca35 100644 --- a/cherab/core/atomic/interface.pxd +++ b/cherab/core/atomic/interface.pxd @@ -19,6 +19,7 @@ from cherab.core.atomic.elements cimport Element from cherab.core.atomic.line cimport Line from cherab.core.atomic.zeeman cimport ZeemanStructure +from cherab.core.atomic.stark cimport StarkStructure from cherab.core.atomic.gaunt cimport FreeFreeGauntFactor from cherab.core.atomic.rates cimport * @@ -61,6 +62,8 @@ cdef class AtomicData: cpdef tuple zeeman_triplet_parameters(self, Line line) + cpdef StarkStructure stark_structure(self, Line line) + cpdef tuple stark_model_coefficients(self, Line line) cpdef FreeFreeGauntFactor free_free_gaunt_factor(self) diff --git a/cherab/core/atomic/interface.pyx b/cherab/core/atomic/interface.pyx index 52c396d6..6c07d5fa 100644 --- a/cherab/core/atomic/interface.pyx +++ b/cherab/core/atomic/interface.pyx @@ -17,6 +17,8 @@ # under the Licence. from .gaunt import MaxwellianFreeFreeGauntFactor +from .stark import InterpolatedStarkStructure +from .elements import Isotope import json from os import path @@ -195,6 +197,34 @@ cdef class AtomicData: return tuple(coefficients) + cpdef StarkStructure stark_structure(self, Line line): + """ + Returns interpolated ratios of linear Stark components of the MSE spectrum when + the observation direction is perependicular to the electric field. + + Use data from A.V. Demura, D.S. Leontiev, V.S. Lisitsa. Polarization characteristics + of electrodynamic Stark effect. Accepted to J. Exp. Theor. Phys. (2024) + provided by Dmitry Leontiev. + """ + + element = line.element + if isinstance(element, Isotope): + element = element.element + + symbol = element.symbol.lower() + upper, lower = line.transition + encoded_transition = '{} -> {}'.format(str(upper).lower(), str(lower).lower()) + + try: + with open(path.join(path.dirname(__file__), "data/lineshape/mse/{}/{}.json".format(symbol, line.charge))) as f: + data = json.load(f) + data = data[encoded_transition] + except (FileNotFoundError, KeyError): + raise RuntimeError('Requested MSE Stark component ratios (element={}, charge={}, transition={})' + ' are not available.'.format(symbol, line.charge, line.transition)) + + return InterpolatedStarkStructure(data, extrapolate=True) + cpdef FreeFreeGauntFactor free_free_gaunt_factor(self): """ Returns the Maxwellian-averaged free-free Gaunt factor interpolated over the data diff --git a/cherab/core/atomic/stark.pxd b/cherab/core/atomic/stark.pxd new file mode 100644 index 00000000..05f05902 --- /dev/null +++ b/cherab/core/atomic/stark.pxd @@ -0,0 +1,44 @@ +# Copyright 2016-2023 Euratom +# Copyright 2016-2023 United Kingdom Atomic Energy Authority +# Copyright 2016-2023 Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas +# +# Licensed under the EUPL, Version 1.1 or – as soon they will be approved by the +# European Commission - subsequent versions of the EUPL (the "Licence"); +# You may not use this work except in compliance with the Licence. +# You may obtain a copy of the Licence at: +# +# https://joinup.ec.europa.eu/software/page/eupl5 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. +# +# See the Licence for the specific language governing permissions and limitations +# under the Licence. + + +from numpy cimport ndarray + + +cdef class StarkStructure: + + cdef: + readonly ndarray index + readonly ndarray polarisation + const int[::1] index_mv + const int[::1] polarisation_mv + + cdef double[::1] evaluate(self, double energy, double density, double b_field) + + +cdef class InterpolatedStarkStructure(StarkStructure): + + cdef: + readonly dict raw_data + readonly tuple beam_energy_range + readonly tuple density_range + readonly tuple b_field_range + list _ratio_functions + double _cached_energy, _cached_density, _cached_b_field + ndarray _ratios + double[::1] _ratios_mv diff --git a/cherab/core/atomic/stark.pyx b/cherab/core/atomic/stark.pyx new file mode 100644 index 00000000..fd459423 --- /dev/null +++ b/cherab/core/atomic/stark.pyx @@ -0,0 +1,202 @@ +# Copyright 2016-2023 Euratom +# Copyright 2016-2023 United Kingdom Atomic Energy Authority +# Copyright 2016-2023 Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas +# +# Licensed under the EUPL, Version 1.1 or – as soon they will be approved by the +# European Commission - subsequent versions of the EUPL (the "Licence"); +# You may not use this work except in compliance with the Licence. +# You may obtain a copy of the Licence at: +# +# https://joinup.ec.europa.eu/software/page/eupl5 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. +# +# See the Licence for the specific language governing permissions and limitations +# under the Licence. + +import numpy as np + +from raysect.core.math.function.float cimport Interpolator3DArray, Function3D + +from libc.math cimport INFINITY, log10 + +cimport cython + + +DEF ZERO_THRESHOLD = 1.e-300 + + +cdef class StarkStructure(): + """ + Provides ratios of linear Stark components of the MSE spectrum for any given values of + beam energy, electron density and magnetic field strength when the observation direction + is perependicular to the electric field. + + :ivar ndarray index: Stark component indices: :math:`\\Delta E = \\frac{3}{2} e a_0 (\\pm i) E`. + Contains only non-negative values. It is assumed that components with negative and positive + indices have the same intensity (electric field vector is perpendicular to collisional axis). + :ivar ndarray polarisation: Polarisation of the Stark components. + 0 stands for :math:`\\pi` polarisation and 1 stands for :math:`\\sigma` polarisation. + """ + + cdef double[::1] evaluate(self, double energy, double density, double b_field): + + raise NotImplementedError("The evaluate() virtual method must be implemented.") + + def __call__(self, double energy, double density, double b_field): + """ + Returns an array with Stark component relative intensities for the given values of + beam energy, electron density and magnetic field strength. + + The intensities are normalised as follows: :math:`I_0 + 2\\sum_{i\\geq 1}I_i = 1`. + + :param double energy: Beam energy in eV/amu. + :param double density: Electron density in m-3. + :param double b_field: Magnetic field in T. + """ + + return np.asarray(self.evaluate(energy, density, b_field)) + + +cdef class InterpolatedStarkStructure(StarkStructure): + """ + Provides interpolated ratios of linear Stark components of the MSE spectrum when + the observation direction is perependicular to the electric field. + + :param dict data: Dictionary containing the relative + intensities of Stark components with the following keys: + | 'energy': A 1D array of shape (N,) with beam energy in eV/amu, + | 'ne: A 1D array of shape (M,) with electron density in m-3, + | 'b': A 1D array of shape (K,) with magnetic field strength in T. + | 'index': A 1D integer array of shape (L,) with Stark component indices: + | :math:`\\Delta E = \\frac{3}{2} e a_0 (\\pm i) E`. + | Contains only non-negative values. + | 'polarisation': A 1D integer array of shape (L,) with component polarisation + | 0 for :math:`\\pi`-polarisation, + | 1 for :math:`\\sigma`-polarisation. + | 'ratio': A 4D array of shape (N, M, K, L) with Stark component relative intensities. + | The intensities are normalised as follows: + | :math:`I_0 + 2\\sum_{i\\geq 1}I_i = 1`. + + :param bint extrapolate: Enable extrapolation (default=False). + + :ivar tuple beam_energy_range: The interpolation range of beam energy. + :ivar tuple density_range: The interpolation range of electron density. + :ivar tuple b_field_range: The interpolation range of magnetic field strength. + :ivar dict raw_data: Dictionary containing the raw data. + :ivar ndarray index: Stark component indices: :math:`\\Delta E = \\frac{3}{2} e a_0 (\\pm i) E`. + Contains only non-negative values. It is assumed that components with negative and positive + indices have the same intensity (electric field vector is perpendicular to collisional axis). + :ivar ndarray polarisation: Polarisation of the Stark components. + 0 stands for :math:`\\pi` polarisation and 1 stands for :math:`\\sigma` polarisation. + """ + + def __init__(self, dict data, bint extrapolate=False): + + self.raw_data = data + + b = np.asarray(data['b']) + ne = np.asarray(data['ne']) + energy = np.asarray(data['energy']) + ratio = np.asarray(data['ratio']) + polarisation = np.array(data['polarisation'], dtype=np.int32) + index = np.array(data['index'], dtype=np.int32) + + if ratio.shape[3] != index.shape[0] != polarisation.shape[0]: + raise ValueError("Fields: 'index', 'polarisation' and 'ratio' must provide data for the same number of Stark components.") + + if np.any((polarisation < 0) + (polarisation > 1)): + raise ValueError("Field 'polarisation' must contain only 0 (pi) or 1 (sigma).") + + if np.any(index < 0): + raise ValueError("Field 'index' must contain non-negative values.") + + # protect polarisation and index arrays + polarisation.flags.writeable = False + index.flags.writeable = False + self.polarisation = polarisation + self.index = index + + # argument ranges + self.beam_energy_range = energy.min(), energy.max() + self.density_range = ne.min(), ne.max() + self.b_field_range = b.min(), b.max() + + extrapolation_type = 'nearest' if extrapolate else 'none' + + # normalise input ratios + ratio_sum = 0 + for i in range(ratio.shape[3]): + ratio_sum += 2 * ratio[:, :, :, i] if index[i] else ratio[:, :, :, i] + ratio /= ratio_sum[:, :, :, None] + + ratio_functions = [] + for i in range(ratio.shape[3]): + ratio_func = Interpolator3DArray(energy, np.log10(ne), b, ratio[:, :, :, i], 'cubic', extrapolation_type, INFINITY, INFINITY, INFINITY) + ratio_functions.append(ratio_func) + self._ratio_functions = ratio_functions + + self._ratios = np.zeros(index.size, dtype=np.float64) + self._ratios_mv = self._ratios + + self.index_mv = self.index + self.polarisation_mv = self.polarisation + + self._cached_energy = 0 + self._cached_density = 0 + self._cached_b_field = 0 + + @cython.boundscheck(False) + @cython.wraparound(False) + @cython.initializedcheck(False) + @cython.cdivision(True) + cdef double[::1] evaluate(self, double energy, double density, double b_field): + """ + Returns an array with Stark component relative intensities for the given values of + beam energy, electron density and magnetic field strength. + + The intensities are normalised as follows: :math:`I_0 + 2\\sum_{i\\geq 1}I_i = 1` + + :param double energy: Beam energy in eV/amu. + :param double density: Electron density in m-3. + :param double b_field: Magnetic field in T. + """ + + cdef int i + cdef double ratio_sum + cdef Function3D ratio + + if self._cached_energy == energy and self._cached_density == density and self._cached_b_field == b_field: + + return self._ratios_mv + + # safety check in case if used stand-alone + if energy < 0: + raise ValueError('Argument "energy" (beam energy) must be non-negative.') + if density < 0: + raise ValueError('Argument "density" (electron density) must be non-negative.') + if b_field < 0: + raise ValueError('Argument "b_field" (magnetic field strength) must be non-negative.') + + if density < ZERO_THRESHOLD: + density = ZERO_THRESHOLD + + ratio_sum = 0 + for i in range(self._ratios_mv.shape[0]): + ratio = self._ratio_functions[i] + self._ratios_mv[i] = ratio.evaluate(energy, log10(density), b_field) + + ratio_sum += 2 * self._ratios_mv[i] if self.index_mv[i] else self._ratios_mv[i] + + # normalise output ratios + if ratio_sum > 0: + for i in range(self._ratios_mv.shape[0]): + self._ratios_mv[i] /= ratio_sum + + self._cached_energy = energy + self._cached_density = density + self._cached_b_field = b_field + + return self._ratios_mv diff --git a/cherab/core/model/beam/beam_emission.pxd b/cherab/core/model/beam/beam_emission.pxd index eb7acb03..fc36597a 100644 --- a/cherab/core/model/beam/beam_emission.pxd +++ b/cherab/core/model/beam/beam_emission.pxd @@ -1,6 +1,6 @@ -# Copyright 2016-2018 Euratom -# Copyright 2016-2018 United Kingdom Atomic Energy Authority -# Copyright 2016-2018 Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas +# Copyright 2016-2023 Euratom +# Copyright 2016-2023 United Kingdom Atomic Energy Authority +# Copyright 2016-2023 Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas # # Licensed under the EUPL, Version 1.1 or – as soon they will be approved by the # European Commission - subsequent versions of the EUPL (the "Licence"); @@ -19,7 +19,6 @@ from raysect.core.math cimport Vector3D from cherab.core cimport Line -from cherab.core.math cimport Function1D, Function2D from cherab.core.beam cimport BeamModel from cherab.core.model.lineshape cimport BeamLineShapeModel @@ -31,9 +30,8 @@ cdef class BeamEmissionLine(BeamModel): double _wavelength list _rates_list BeamLineShapeModel _lineshape - Function2D _sigma_to_pi - Function1D _sigma1_to_sigma0, _pi2_to_pi3, _pi4_to_pi3 - + object _lineshape_class, _lineshape_args, _lineshape_kwargs + cdef double _beam_emission_rate(self, double x, double y, double z, Vector3D beam_velocity) except? -1e999 cdef int _populate_cache(self) except -1 diff --git a/cherab/core/model/beam/beam_emission.pyx b/cherab/core/model/beam/beam_emission.pyx index e00aaf5d..64ca10dc 100644 --- a/cherab/core/model/beam/beam_emission.pyx +++ b/cherab/core/model/beam/beam_emission.pyx @@ -24,8 +24,6 @@ from libc.math cimport sqrt from raysect.core cimport Point3D, Vector3D from raysect.optical cimport Spectrum from cherab.core cimport Species, Plasma, Beam, Element, BeamEmissionPEC, AtomicData -from cherab.core.math.function cimport autowrap_function1d, autowrap_function2d -from cherab.core.atomic.elements import Isotope, hydrogen from cherab.core.model.lineshape cimport BeamEmissionMultiplet from cherab.core.utility.constants cimport RECIP_4_PI, ELEMENTARY_CHARGE, ATOMIC_MASS @@ -41,35 +39,40 @@ cdef double ms_to_evamu(double x): return 0.5 * (x ** 2) * RECIP_ELEMENTARY_CHARGE * ATOMIC_MASS -# example statistical weights supplied by E. Delabie for JET like plasmas - # [ Sigma group ][ Pi group ] -# STARK_STATISTICAL_WEIGHTS = [0.586167, 0.206917, 0.153771, 0.489716, 0.356513] -SIGMA_TO_PI = 0.56 -SIGMA1_TO_SIGMA0 = 0.7060001671878492 # s1*2/s0 -PI2_TO_PI3 = 0.3140003593919741 # pi2/pi3 -PI4_TO_PI3 = 0.7279994935840365 # pi4/pi3 - - -# TODO - the sigma/pi line ratios should be moved to an atomic data source cdef class BeamEmissionLine(BeamModel): """Calculates beam emission multiplets for a single beam component. :param Line line: the transition of interest. + :param Beam beam: The emitting beam object. + :param Plasma plasma: The plasma object. + :param AtomicData atomic_data: The atomic data provider. + :param object lineshape: The spectral line shape class. Must be a subclass of `BeamLineShapeModel`. + Defaults to `BeamEmissionMultiplet`. + :param object lineshape_args: The arguments of spectral line shape class. Defaults is None. + :param object lineshape_kwargs: The keyword arguments of spectral line shape class. + Defaults is None. """ def __init__(self, Line line not None, Beam beam=None, Plasma plasma=None, AtomicData atomic_data=None, - sigma_to_pi=SIGMA_TO_PI, sigma1_to_sigma0=SIGMA1_TO_SIGMA0, - pi2_to_pi3=PI2_TO_PI3, pi4_to_pi3=PI4_TO_PI3): + object lineshape=None, object lineshape_args=None, object lineshape_kwargs=None): super().__init__(beam, plasma, atomic_data) - self._sigma_to_pi = autowrap_function2d(sigma_to_pi) - self._sigma1_to_sigma0 = autowrap_function1d(sigma1_to_sigma0) - self._pi2_to_pi3 = autowrap_function1d(pi2_to_pi3) - self._pi4_to_pi3 = autowrap_function1d(pi4_to_pi3) - self.line = line + self._lineshape_class = lineshape or BeamEmissionMultiplet + if not issubclass(self._lineshape_class, BeamLineShapeModel): + raise TypeError("The attribute lineshape must be a subclass of BeamLineShapeModel.") + + if lineshape_args: + self._lineshape_args = lineshape_args + else: + self._lineshape_args = [] + if lineshape_kwargs: + self._lineshape_kwargs = lineshape_kwargs + else: + self._lineshape_kwargs = {} + # ensure that cache is initialised self._change() @@ -79,16 +82,6 @@ cdef class BeamEmissionLine(BeamModel): @line.setter def line(self, Line value not None): - - # extract element from isotope - if isinstance(value.element, Isotope): - element = value.element.element - else: - element = value.element - - if element != hydrogen or value.charge != 0 or value.transition != (3, 2): - raise ValueError('The BeamEmissionLine model currently only support Balmer-Alpha as the line choice.') - # the data cache depends on the line configuration self._line = value self._change() @@ -125,7 +118,7 @@ cdef class BeamEmissionLine(BeamModel): radiance = RECIP_4_PI * beam_density * rate return self._lineshape.add_line(radiance, beam_point, plasma_point, - beam_direction, observation_direction, spectrum) + beam_velocity, observation_direction, spectrum) @cython.cdivision(True) cdef double _beam_emission_rate(self, double x, double y, double z, Vector3D beam_velocity) except? -1e999: @@ -212,8 +205,8 @@ cdef class BeamEmissionLine(BeamModel): self._rates_list.append((species, rate)) # instance line shape renderer - self._lineshape = BeamEmissionMultiplet(self._line, self._wavelength, self._beam, self._atomic_data, - self._sigma_to_pi, self._sigma1_to_sigma0, self._pi2_to_pi3, self._pi4_to_pi3) + self._lineshape = self._lineshape_class(self._line, self._wavelength, self._beam, self._atomic_data, + *self._lineshape_args, **self._lineshape_kwargs) def _change(self): diff --git a/cherab/core/model/lineshape/beam/base.pxd b/cherab/core/model/lineshape/beam/base.pxd index e5633446..34ebf08f 100644 --- a/cherab/core/model/lineshape/beam/base.pxd +++ b/cherab/core/model/lineshape/beam/base.pxd @@ -34,4 +34,4 @@ cdef class BeamLineShapeModel: AtomicData atomic_data cpdef Spectrum add_line(self, double radiance, Point3D beam_point, Point3D plasma_point, - Vector3D beam_direction, Vector3D observation_direction, Spectrum spectrum) + Vector3D beam_velocity, Vector3D observation_direction, Spectrum spectrum) diff --git a/cherab/core/model/lineshape/beam/base.pyx b/cherab/core/model/lineshape/beam/base.pyx index d333dd6e..9bb89058 100644 --- a/cherab/core/model/lineshape/beam/base.pyx +++ b/cherab/core/model/lineshape/beam/base.pyx @@ -37,5 +37,5 @@ cdef class BeamLineShapeModel: self.atomic_data = atomic_data cpdef Spectrum add_line(self, double radiance, Point3D beam_point, Point3D plasma_point, - Vector3D beam_direction, Vector3D observation_direction, Spectrum spectrum): + Vector3D beam_velocity, Vector3D observation_direction, Spectrum spectrum): raise NotImplementedError('Child lineshape class must implement this method.') diff --git a/cherab/core/model/lineshape/beam/mse.pxd b/cherab/core/model/lineshape/beam/mse.pxd index a7b6131a..46976fae 100644 --- a/cherab/core/model/lineshape/beam/mse.pxd +++ b/cherab/core/model/lineshape/beam/mse.pxd @@ -18,7 +18,7 @@ # See the Licence for the specific language governing permissions and limitations # under the Licence. -from cherab.core.math cimport Function1D, Function2D +from cherab.core.atomic.stark cimport StarkStructure from cherab.core.model.lineshape.beam.base cimport BeamLineShapeModel @@ -26,5 +26,5 @@ cdef class BeamEmissionMultiplet(BeamLineShapeModel): cdef: - Function2D _sigma_to_pi - Function1D _sigma1_to_sigma0, _pi2_to_pi3, _pi4_to_pi3 + StarkStructure _stark_structure + int _polarisation diff --git a/cherab/core/model/lineshape/beam/mse.pyx b/cherab/core/model/lineshape/beam/mse.pyx index 9c64d435..f234705d 100644 --- a/cherab/core/model/lineshape/beam/mse.pyx +++ b/cherab/core/model/lineshape/beam/mse.pyx @@ -18,29 +18,25 @@ # See the Licence for the specific language governing permissions and limitations # under the Licence. -from libc.math cimport fabs, sqrt +from libc.math cimport fabs, sqrt, M_PI from raysect.optical cimport Spectrum, Point3D, Vector3D from cherab.core.plasma cimport Plasma from cherab.core.beam cimport Beam -from cherab.core.atomic cimport AtomicData -from cherab.core.atomic cimport Line -from cherab.core.math.function cimport autowrap_function1d, autowrap_function2d -from cherab.core.utility.constants cimport ATOMIC_MASS, ELEMENTARY_CHARGE +from cherab.core.atomic cimport Line, AtomicData +from cherab.core.utility.constants cimport ELEMENTARY_CHARGE, ELECTRON_REST_MASS, VACUUM_PERMITTIVITY, PLANCK_CONSTANT, HC_EV_NM from cherab.core.model.lineshape.gaussian cimport add_gaussian_line from cherab.core.model.lineshape.doppler cimport thermal_broadening, doppler_shift cimport cython -cdef double RECIP_ATOMIC_MASS = 1 / ATOMIC_MASS +# (3/2 * e0 * h^2)/(2pi * Me * e^2) in [eV*m/V] +cdef double STARK_ENERGY_SPLITTING_FACTOR = 3 * VACUUM_PERMITTIVITY * PLANCK_CONSTANT**2 / (2 * M_PI * ELECTRON_REST_MASS * ELEMENTARY_CHARGE**2) - -cdef double evamu_to_ms(double x): - return sqrt(2 * x * ELEMENTARY_CHARGE * RECIP_ATOMIC_MASS) - - -DEF STARK_SPLITTING_FACTOR = 2.77e-8 +DEF PI_POLARISATION = 0 +DEF SIGMA_POLARISATION = 1 +DEF NO_POLARISATION = 2 cdef class BeamEmissionMultiplet(BeamLineShapeModel): @@ -49,27 +45,47 @@ cdef class BeamEmissionMultiplet(BeamLineShapeModel): """ def __init__(self, Line line, double wavelength, Beam beam, AtomicData atomic_data, - object sigma_to_pi, object sigma1_to_sigma0, object pi2_to_pi3, object pi4_to_pi3): + StarkStructure stark_structure=None, polarisation='no'): super().__init__(line, wavelength, beam, atomic_data) - self._sigma_to_pi = autowrap_function2d(sigma_to_pi) - self._sigma1_to_sigma0 = autowrap_function1d(sigma1_to_sigma0) - self._pi2_to_pi3 = autowrap_function1d(pi2_to_pi3) - self._pi4_to_pi3 = autowrap_function1d(pi4_to_pi3) + self._stark_structure = stark_structure or self.atomic_data.stark_structure(line) + + self.polarisation = polarisation + + @property + def polarisation(self): + if self._polarisation == PI_POLARISATION: + return 'pi' + if self._polarisation == SIGMA_POLARISATION: + return 'sigma' + if self._polarisation == NO_POLARISATION: + return 'no' + + @polarisation.setter + def polarisation(self, value): + if value.lower() == 'pi': + self._polarisation = PI_POLARISATION + elif value.lower() == 'sigma': + self._polarisation = SIGMA_POLARISATION + elif value.lower() == 'no': + self._polarisation = NO_POLARISATION + else: + raise ValueError('Select between "pi", "sigma" or "no", {} is unsupported.'.format(value)) @cython.cdivision(True) cpdef Spectrum add_line(self, double radiance, Point3D beam_point, Point3D plasma_point, - Vector3D beam_direction, Vector3D observation_direction, Spectrum spectrum): - - cdef double x, y, z - cdef Plasma plasma - cdef double te, ne, beam_energy, sigma, stark_split, beam_ion_mass, beam_temperature - cdef double natural_wavelength, central_wavelength - cdef double sigma_to_pi, d, intensity_sig, intensity_pi, e_field - cdef double s1_to_s0, intensity_s0, intensity_s1 - cdef double pi2_to_pi3, pi4_to_pi3, intensity_pi2, intensity_pi3, intensity_pi4 - cdef Vector3D b_field, beam_velocity + Vector3D beam_velocity, Vector3D observation_direction, Spectrum spectrum): + + cdef: + int i, index + double x, y, z + Plasma plasma + double te, ne, beam_energy, sigma, stark_split, beam_ion_mass, beam_temperature, e_magn, b_magn + double shifted_wavelength, photon_energy + double cos_sqr, sin_sqr, sigma_to_total, intensity + double[:] ratios_mv + Vector3D b_field, e_field # extract for more compact code x = plasma_point.x @@ -90,46 +106,59 @@ cdef class BeamEmissionMultiplet(BeamLineShapeModel): # calculate Stark splitting b_field = plasma.get_b_field().evaluate(x, y, z) - beam_velocity = beam_direction.normalise().mul(evamu_to_ms(beam_energy)) - e_field = beam_velocity.cross(b_field).get_length() - stark_split = fabs(STARK_SPLITTING_FACTOR * e_field) # TODO - calculate splitting factor? Reject other lines? + e_field = beam_velocity.cross(b_field) + e_magn = e_field.get_length() + stark_split = STARK_ENERGY_SPLITTING_FACTOR * e_magn # calculate emission line central wavelength, doppler shifted along observation direction - natural_wavelength = self.wavelength - central_wavelength = doppler_shift(natural_wavelength, observation_direction, beam_velocity) + shifted_wavelength = doppler_shift(self.wavelength, observation_direction, beam_velocity) + photon_energy = HC_EV_NM / shifted_wavelength # calculate doppler broadening beam_ion_mass = self.beam.get_element().atomic_weight beam_temperature = self.beam.get_temperature() sigma = thermal_broadening(self.wavelength, beam_temperature, beam_ion_mass) - # calculate relative intensities of sigma and pi lines - sigma_to_pi = self._sigma_to_pi.evaluate(ne, beam_energy) - d = 1 / (1 + sigma_to_pi) - intensity_sig = sigma_to_pi * d * radiance - intensity_pi = 0.5 * d * radiance + if e_magn == 0: + # no splitting if electric field strength is zero + if self._polarisation == NO_POLARISATION: + return add_gaussian_line(radiance, shifted_wavelength, sigma, spectrum) - # add Sigma lines to output - s1_to_s0 = self._sigma1_to_sigma0.evaluate(ne) - intensity_s0 = 1 / (s1_to_s0 + 1) - intensity_s1 = 0.5 * s1_to_s0 * intensity_s0 + return add_gaussian_line(0.5 * radiance, shifted_wavelength, sigma, spectrum) + + # coefficients for intensities parallel and perpendicular to electric field + cos_sqr = e_field.normalise().dot(observation_direction.normalise())**2 + sin_sqr = 1. - cos_sqr - spectrum = add_gaussian_line(intensity_sig * intensity_s0, central_wavelength, sigma, spectrum) - spectrum = add_gaussian_line(intensity_sig * intensity_s1, central_wavelength + stark_split, sigma, spectrum) - spectrum = add_gaussian_line(intensity_sig * intensity_s1, central_wavelength - stark_split, sigma, spectrum) + # get relative ratios of Stark intensities perpendicular to electric field + b_magn = b_field.get_length() + ratios_mv = self._stark_structure.evaluate(beam_energy, ne, b_magn) + + # add Sigma lines to output + if self._polarisation != PI_POLARISATION: + sigma_to_total = 0 + for i in range(ratios_mv.shape[0]): + if self._stark_structure.polarisation_mv[i] == SIGMA_POLARISATION: + sigma_to_total += 2 * ratios_mv[i] if self._stark_structure.index_mv[i] else ratios_mv[i] + + if sigma_to_total: + intensity = (sin_sqr + cos_sqr / sigma_to_total) * radiance + for i in range(ratios_mv.shape[0]): + if self._stark_structure.polarisation_mv[i] == SIGMA_POLARISATION: + index = self._stark_structure.index_mv[i] + if index == 0: + spectrum = add_gaussian_line(intensity * ratios_mv[i], shifted_wavelength, sigma, spectrum) + else: + spectrum = add_gaussian_line(intensity * ratios_mv[i], HC_EV_NM / (photon_energy - index * stark_split), sigma, spectrum) + spectrum = add_gaussian_line(intensity * ratios_mv[i], HC_EV_NM / (photon_energy + index * stark_split), sigma, spectrum) # add Pi lines to output - pi2_to_pi3 = self._pi2_to_pi3.evaluate(ne) - pi4_to_pi3 = self._pi4_to_pi3.evaluate(ne) - intensity_pi3 = 1 / (1 + pi2_to_pi3 + pi4_to_pi3) - intensity_pi2 = pi2_to_pi3 * intensity_pi3 - intensity_pi4 = pi4_to_pi3 * intensity_pi3 - - spectrum = add_gaussian_line(intensity_pi * intensity_pi2, central_wavelength + 2 * stark_split, sigma, spectrum) - spectrum = add_gaussian_line(intensity_pi * intensity_pi2, central_wavelength - 2 * stark_split, sigma, spectrum) - spectrum = add_gaussian_line(intensity_pi * intensity_pi3, central_wavelength + 3 * stark_split, sigma, spectrum) - spectrum = add_gaussian_line(intensity_pi * intensity_pi3, central_wavelength - 3 * stark_split, sigma, spectrum) - spectrum = add_gaussian_line(intensity_pi * intensity_pi4, central_wavelength + 4 * stark_split, sigma, spectrum) - spectrum = add_gaussian_line(intensity_pi * intensity_pi4, central_wavelength - 4 * stark_split, sigma, spectrum) + if self._polarisation != SIGMA_POLARISATION: + intensity = sin_sqr * radiance + for i in range(ratios_mv.shape[0]): + if self._stark_structure.polarisation_mv[i] == PI_POLARISATION: + index = self._stark_structure.index_mv[i] + spectrum = add_gaussian_line(intensity * ratios_mv[i], HC_EV_NM / (photon_energy - index * stark_split), sigma, spectrum) + spectrum = add_gaussian_line(intensity * ratios_mv[i], HC_EV_NM / (photon_energy + index * stark_split), sigma, spectrum) return spectrum diff --git a/cherab/core/tests/test_lineshapes.py b/cherab/core/tests/test_lineshapes.py index e2122d41..a72dd8e4 100644 --- a/cherab/core/tests/test_lineshapes.py +++ b/cherab/core/tests/test_lineshapes.py @@ -39,6 +39,9 @@ SPEED_OF_LIGHT = 299792458.0 BOHR_MAGNETON = 5.78838180123e-5 # in eV/T HC_EV_NM = 1239.8419738620933 # (Planck constant in eV s) x (speed of light in nm/s) +VACUUM_PERMITTIVITY = 8.8541878128e-12 +ELECTRON_REST_MASS = 9.1093837015e-31 +PLANCK_CONSTANT = 6.62607015e-34 class TestLineShapes(unittest.TestCase): @@ -393,12 +396,7 @@ def test_beam_emission_multiplet(self): # setting up a line shape model line = Line(deuterium, 0, (3, 2)) # D-alpha line wavelength = 656.104 - sigma_to_pi = 0.56 - sigma1_to_sigma0 = 0.7060001671878492 - pi2_to_pi3 = 0.3140003593919741 - pi4_to_pi3 = 0.7279994935840365 - mse_line = BeamEmissionMultiplet(line, wavelength, self.beam, self.atomic_data, - sigma_to_pi, sigma1_to_sigma0, pi2_to_pi3, pi4_to_pi3) + mse_line = BeamEmissionMultiplet(line, wavelength, self.beam, self.atomic_data) # spectrum parameters min_wavelength = wavelength - 3 @@ -407,23 +405,37 @@ def test_beam_emission_multiplet(self): point = Point3D(0.5, 0.5, 0.5) direction = Vector3D(-1, 1, 0) / np.sqrt(2) beam_direction = self.beam.direction(point.x, point.y, point.z) + beam_velocity = beam_direction.normalise() * np.sqrt(2 * self.beam.energy * ELEMENTARY_CHARGE / ATOMIC_MASS) # obtaining spectrum radiance = 1.0 - spectrum = Spectrum(min_wavelength, max_wavelength, bins) - spectrum = mse_line.add_line(radiance, point, point, beam_direction, direction, spectrum) + spectrum = {} + for pol in ('no', 'pi', 'sigma'): + spectrum[pol] = Spectrum(min_wavelength, max_wavelength, bins) + mse_line.polarisation = pol + spectrum[pol] = mse_line.add_line(radiance, point, point, beam_velocity, direction, spectrum[pol]) # validating # calculate Stark splitting b_field = self.plasma.b_field(point.x, point.y, point.z) - beam_velocity = beam_direction.normalise() * np.sqrt(2 * self.beam.energy * ELEMENTARY_CHARGE / ATOMIC_MASS) - e_field = beam_velocity.cross(b_field).length - STARK_SPLITTING_FACTOR = 2.77e-8 - stark_split = np.abs(STARK_SPLITTING_FACTOR * e_field) + e_field = beam_velocity.cross(b_field) + e_field_magn = e_field.length + STARK_ENERGY_SPLITTING_FACTOR = 3 * VACUUM_PERMITTIVITY * PLANCK_CONSTANT**2 / (2 * np.pi * ELECTRON_REST_MASS * ELEMENTARY_CHARGE**2) + stark_split = STARK_ENERGY_SPLITTING_FACTOR * e_field_magn + + # obtain Stark relative ratios + ne = self.plasma.electron_distribution.density(point.x, point.y, point.z) + stark_structure = self.atomic_data.stark_structure(line) + ratios = stark_structure(self.beam.energy, ne, b_field.length) + indx_sigma, = np.where(stark_structure.polarisation == 1) + weight = np.ones(indx_sigma.size) + weight[stark_structure.index[indx_sigma] > 0] = 2. + sigma_to_total = (ratios[indx_sigma] * weight).sum() # calculate emission line central wavelength, doppler shifted along observation direction - central_wavelength = wavelength * (1 + beam_velocity.dot(direction.normalise()) / SPEED_OF_LIGHT) + shifted_wavelength = wavelength * (1 + beam_velocity.dot(direction.normalise()) / SPEED_OF_LIGHT) + photon_energy = HC_EV_NM / shifted_wavelength # calculate doppler broadening beam_ion_mass = self.beam.element.atomic_weight @@ -431,45 +443,39 @@ def test_beam_emission_multiplet(self): sigma = np.sqrt(beam_temperature * ELEMENTARY_CHARGE / (beam_ion_mass * ATOMIC_MASS)) * wavelength / SPEED_OF_LIGHT temp = 1. / (np.sqrt(2.) * sigma) + # coefficients for intensities parallel and perpendicular to electric field + cos_sqr = e_field.normalise().dot(direction.normalise())**2 + sin_sqr = 1. - cos_sqr + # calculate relative intensities of sigma and pi lines - d = 1 / (1 + sigma_to_pi) - intensity_sig = sigma_to_pi * d * radiance - intensity_pi = 0.5 * d * radiance + intensity_sig = (sin_sqr + cos_sqr / sigma_to_total) * radiance + intensity_pi = sin_sqr * radiance wavelengths, delta = np.linspace(min_wavelength, max_wavelength, bins + 1, retstep=True) + test_spectrum = {'sigma': 0, 'pi': 0} + + for indx, pol, ratio in zip(stark_structure.index, stark_structure.polarisation, ratios): + if pol == 1: # sigma + if indx == 0: + erfs = erf((wavelengths - shifted_wavelength) * temp) + test_spectrum['sigma'] += 0.5 * intensity_sig * ratio * (erfs[1:] - erfs[:-1]) / delta + else: + erfs = erf((wavelengths - HC_EV_NM / (photon_energy + indx * stark_split)) * temp) + test_spectrum['sigma'] += 0.5 * intensity_sig * ratio * (erfs[1:] - erfs[:-1]) / delta + erfs = erf((wavelengths - HC_EV_NM / (photon_energy - indx * stark_split)) * temp) + test_spectrum['sigma'] += 0.5 * intensity_sig * ratio * (erfs[1:] - erfs[:-1]) / delta + else: # pi + erfs = erf((wavelengths - HC_EV_NM / (photon_energy + indx * stark_split)) * temp) + test_spectrum['pi'] += 0.5 * intensity_pi * ratio * (erfs[1:] - erfs[:-1]) / delta + erfs = erf((wavelengths - HC_EV_NM / (photon_energy - indx * stark_split)) * temp) + test_spectrum['pi'] += 0.5 * intensity_pi * ratio * (erfs[1:] - erfs[:-1]) / delta + + test_spectrum['no'] = test_spectrum['pi'] + test_spectrum['sigma'] - # add Sigma lines to output - intensity_s0 = 1 / (sigma1_to_sigma0 + 1) - intensity_s1 = 0.5 * sigma1_to_sigma0 * intensity_s0 - - erfs = erf((wavelengths - central_wavelength) * temp) - test_spectrum = 0.5 * intensity_sig * intensity_s0 * (erfs[1:] - erfs[:-1]) / delta - erfs = erf((wavelengths - central_wavelength - stark_split) * temp) - test_spectrum += 0.5 * intensity_sig * intensity_s1 * (erfs[1:] - erfs[:-1]) / delta - erfs = erf((wavelengths - central_wavelength + stark_split) * temp) - test_spectrum += 0.5 * intensity_sig * intensity_s1 * (erfs[1:] - erfs[:-1]) / delta - - # add Pi lines to output - intensity_pi3 = 1 / (1 + pi2_to_pi3 + pi4_to_pi3) - intensity_pi2 = pi2_to_pi3 * intensity_pi3 - intensity_pi4 = pi4_to_pi3 * intensity_pi3 - - erfs = erf((wavelengths - central_wavelength - 2 * stark_split) * temp) - test_spectrum += 0.5 * intensity_pi * intensity_pi2 * (erfs[1:] - erfs[:-1]) / delta - erfs = erf((wavelengths - central_wavelength + 2 * stark_split) * temp) - test_spectrum += 0.5 * intensity_pi * intensity_pi2 * (erfs[1:] - erfs[:-1]) / delta - erfs = erf((wavelengths - central_wavelength - 3 * stark_split) * temp) - test_spectrum += 0.5 * intensity_pi * intensity_pi3 * (erfs[1:] - erfs[:-1]) / delta - erfs = erf((wavelengths - central_wavelength + 3 * stark_split) * temp) - test_spectrum += 0.5 * intensity_pi * intensity_pi3 * (erfs[1:] - erfs[:-1]) / delta - erfs = erf((wavelengths - central_wavelength - 4 * stark_split) * temp) - test_spectrum += 0.5 * intensity_pi * intensity_pi4 * (erfs[1:] - erfs[:-1]) / delta - erfs = erf((wavelengths - central_wavelength + 4 * stark_split) * temp) - test_spectrum += 0.5 * intensity_pi * intensity_pi4 * (erfs[1:] - erfs[:-1]) / delta - - for i in range(bins): - self.assertAlmostEqual(test_spectrum[i], spectrum.samples[i], delta=1e-10, - msg='BeamEmissionMultiplet.add_line() method gives a wrong value at {} nm.'.format(wavelengths[i])) + for pol in ('no', 'pi', 'sigma'): + for i in range(bins): + self.assertAlmostEqual(test_spectrum[pol][i], spectrum[pol].samples[i], delta=1e-10, + msg='BeamEmissionMultiplet.add_line() method gives a wrong value at {} nm.'.format(wavelengths[i])) if __name__ == '__main__': diff --git a/demos/emission_models/beam_emission_spectrum.py b/demos/emission_models/beam_emission_spectrum.py index cbf5505b..98d99720 100644 --- a/demos/emission_models/beam_emission_spectrum.py +++ b/demos/emission_models/beam_emission_spectrum.py @@ -10,8 +10,6 @@ from cherab.core.atomic import hydrogen, deuterium, carbon, Line from cherab.core.model import SingleRayAttenuator, BeamEmissionLine, \ ExcitationLine, RecombinationLine -from cherab.core.model.beam.beam_emission import SIGMA_TO_PI, SIGMA1_TO_SIGMA0, \ - PI2_TO_PI3, PI4_TO_PI3 from cherab.tools.plasmas.slab import build_slab_plasma from cherab.openadas import OpenADAS @@ -73,9 +71,7 @@ beam_length = 3.0 beam_temperature = 1.0 -bes_full_model = BeamEmissionLine(Line(deuterium, 0, (3, 2)), - sigma_to_pi=SIGMA_TO_PI, sigma1_to_sigma0=SIGMA1_TO_SIGMA0, - pi2_to_pi3=PI2_TO_PI3, pi4_to_pi3=PI4_TO_PI3) +bes_full_model = BeamEmissionLine(Line(deuterium, 0, (3, 2))) beam_full = Beam(parent=world, transform=beam_transform) beam_full.plasma = plasma @@ -93,9 +89,7 @@ beam_full.integrator.step = integration_step beam_full.integrator.min_samples = 10 -bes_half_model = BeamEmissionLine(Line(deuterium, 0, (3, 2)), - sigma_to_pi=SIGMA_TO_PI, sigma1_to_sigma0=SIGMA1_TO_SIGMA0, - pi2_to_pi3=PI2_TO_PI3, pi4_to_pi3=PI4_TO_PI3) +bes_half_model = BeamEmissionLine(Line(deuterium, 0, (3, 2))) beam_half = Beam(parent=world, transform=beam_transform) beam_half.plasma = plasma @@ -113,9 +107,7 @@ beam_half.integrator.step = integration_step beam_half.integrator.min_samples = 10 -bes_third_model = BeamEmissionLine(Line(deuterium, 0, (3, 2)), - sigma_to_pi=SIGMA_TO_PI, sigma1_to_sigma0=SIGMA1_TO_SIGMA0, - pi2_to_pi3=PI2_TO_PI3, pi4_to_pi3=PI4_TO_PI3) +bes_third_model = BeamEmissionLine(Line(deuterium, 0, (3, 2))) beam_third = Beam(parent=world, transform=beam_transform) beam_third.plasma = plasma