Skip to content

atomic

Profiles functions for PROCESS summary plots.

plot_larmor_radius_profile(axis, mfile_data, scan)

Plot the Larmor radius profile on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
def plot_larmor_radius_profile(axis: plt.Axes, mfile_data: MFile, scan: int):
    """Plot the Larmor radius profile on the given axis."""
    radius_plasma_deuteron_larmor_profile = [
        mfile_data.data[
            f"radius_plasma_deuteron_toroidal_larmor_isotropic_profile{i}"
        ].get_scan(scan)
        for i in range(
            2 * int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan))
        )
    ]

    radius_plasma_triton_larmor_profile = [
        mfile_data.data[
            f"radius_plasma_triton_toroidal_larmor_isotropic_profile{i}"
        ].get_scan(scan)
        for i in range(
            2 * int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan))
        )
    ]

    radius_plasma_deuteron_larmor_profile_mm = [
        radius * 1e3 for radius in radius_plasma_deuteron_larmor_profile
    ]

    radius_plasma_triton_larmor_profile_mm = [
        radius * 1e3 for radius in radius_plasma_triton_larmor_profile
    ]

    axis.plot(
        np.linspace(-1, 1, len(radius_plasma_deuteron_larmor_profile_mm)),
        radius_plasma_deuteron_larmor_profile_mm,
        color="red",
        linestyle="-",
        label=r"$\rho_{Larmor,toroidal,D}$",
    )

    axis.plot(
        np.linspace(-1, 1, len(radius_plasma_triton_larmor_profile_mm)),
        radius_plasma_triton_larmor_profile_mm,
        color="green",
        linestyle="-",
        label=r"$\rho_{Larmor,toroidal,T}$",
    )

    axis.set_ylabel(r"Larmor Radii [mm]")
    axis.set_title(r" Toroidal Larmor Radii ($v_{\perp}^2 = 2v_{th}^2$)")
    axis.set_xlabel("$\\rho \\ [r/a]$")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)
    axis.minorticks_on()
    axis.legend()

plot_ion_charge_profile(axis, mfile, scan)

Plot ion charge profile

Source code in process/core/io/plot/summary/profiles/atomic.py
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
def plot_ion_charge_profile(axis: plt.Axes, mfile: MFile, scan: int):
    """Plot ion charge profile"""
    n_plasma_profile_elements = int(mfile.get("n_plasma_profile_elements", scan=scan))

    # find impurity densities
    imp_frac = np.array([
        mfile.get("f_nd_impurity_electrons(01)", scan=scan),
        mfile.get("f_nd_impurity_electrons(02)", scan=scan),
        mfile.get("f_nd_impurity_electrons(03)", scan=scan),
        mfile.get("f_nd_impurity_electrons(04)", scan=scan),
        mfile.get("f_nd_impurity_electrons(05)", scan=scan),
        mfile.get("f_nd_impurity_electrons(06)", scan=scan),
        mfile.get("f_nd_impurity_electrons(07)", scan=scan),
        mfile.get("f_nd_impurity_electrons(08)", scan=scan),
        mfile.get("f_nd_impurity_electrons(09)", scan=scan),
        mfile.get("f_nd_impurity_electrons(10)", scan=scan),
        mfile.get("f_nd_impurity_electrons(11)", scan=scan),
        mfile.get("f_nd_impurity_electrons(12)", scan=scan),
        mfile.get("f_nd_impurity_electrons(13)", scan=scan),
        mfile.get("f_nd_impurity_electrons(14)", scan=scan),
    ])

    n_charge_plasma_profile = []
    impurity_data = ImpurityRadiationData()
    for imp in range(N_IMPURITIES):
        if imp_frac[imp] > 1.0e-30:
            profile = [
                mfile.get(f"n_charge_plasma_profile{imp}_{i}", scan=scan)
                for i in range(n_plasma_profile_elements)
            ]
            n_charge_plasma_profile.append(profile)
            z_max = impurity_data.imp_full_ion_charge[imp]
            # Calculate relative ionisation state as percent of full ionisation
            rel_ion_state = [
                100.0 * (val / z_max if z_max > 0 else 0) for val in profile
            ]
            avg_ionisation = np.mean(rel_ion_state)
            axis.plot(
                np.linspace(0, 1, n_plasma_profile_elements),
                rel_ion_state,
                label=f"{impurity_data.imp_label[imp].replace('_', '')} (Z={z_max}): "
                f"avg {avg_ionisation:.1f}%",
            )
    axis.set_ylabel("Relative Ionisation State [% of $Z$]")
    axis.legend()
    axis.set_xlim(0, 1.025)
    axis.set_xlabel(r"$\rho \quad [r/a]$")
    axis.set_title("Impurity Ion Charge State Profiles")
    axis.minorticks_on()
    axis.grid(which="both", linestyle="--", alpha=0.5)

plot_debye_length_profile(axis, mfile_data, scan)

Plot the Debye length profile on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
def plot_debye_length_profile(axis: plt.Axes, mfile_data: MFile, scan: int):
    """Plot the Debye length profile on the given axis."""
    len_plasma_debye_electron_profile = [
        mfile_data.data[f"len_plasma_debye_electron_profile{i}"].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    # Convert to micrometres (1e-6 m)
    len_plasma_debye_electron_profile_um = [
        length * 1e6 for length in len_plasma_debye_electron_profile
    ]

    axis.plot(
        np.linspace(0, 1, len(len_plasma_debye_electron_profile_um)),
        len_plasma_debye_electron_profile_um,
        color="blue",
        linestyle="-",
        label=r"$\lambda_{Debye,e}$",
    )

    axis.set_ylabel(r"Debye Length [$\mu$m]")

    axis.set_xlabel("$\\rho \\ [r/a]$")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)
    axis.set_xlim(0, 1.025)
    axis.minorticks_on()
    axis.legend()

plot_velocity_profile(axis, mfile_data, scan)

Plot the electron thermal velocity profile on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
def plot_velocity_profile(axis: plt.Axes, mfile_data: MFile, scan: int) -> None:
    """Plot the electron thermal velocity profile on the given axis."""
    vel_plasma_electron_profile = [
        mfile_data.data[f"vel_plasma_electron_profile{i}"].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]
    vel_plasma_deuteron_profile = [
        mfile_data.data[f"vel_plasma_deuteron_profile{i}"].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]
    vel_plasma_triton_profile = [
        mfile_data.data[f"vel_plasma_triton_profile{i}"].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]
    vel_plasma_alpha_thermal_profile = [
        mfile_data.data[f"vel_plasma_alpha_thermal_profile{i}"].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    vel_plasma_alpha_birth = mfile_data.data["vel_plasma_alpha_birth"].get_scan(scan)

    axis.plot(
        np.linspace(0, 1, len(vel_plasma_electron_profile)),
        vel_plasma_electron_profile,
        color="blue",
        linestyle="-",
        label=r"$v_{e}$",
    )
    axis.plot(
        np.linspace(0, 1, len(vel_plasma_deuteron_profile)),
        vel_plasma_deuteron_profile,
        color="pink",
        linestyle="-",
        label=r"$v_{D}$",
    )
    axis.plot(
        np.linspace(0, 1, len(vel_plasma_triton_profile)),
        vel_plasma_triton_profile,
        color="green",
        linestyle="-",
        label=r"$v_{T}$",
    )
    axis.plot(
        np.linspace(0, 1, len(vel_plasma_alpha_thermal_profile)),
        vel_plasma_alpha_thermal_profile,
        color="red",
        linestyle="-",
        label=r"$v_{\alpha,thermal}$",
    )
    axis.axhline(
        vel_plasma_alpha_birth,
        color="red",
        linestyle="--",
        linewidth=1.5,
        label=r"$v_{\alpha,birth}$",
    )

    axis.set_yscale("log")
    axis.set_ylabel("Velocity [m/s]")
    axis.set_xlabel("$\\rho \\ [r/a]$")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)
    axis.set_xlim(0, 1.025)
    axis.minorticks_on()
    axis.legend()

plot_electron_frequency_profile(axis, mfile_data, scan)

Plot the electron thermal frequency profile on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
def plot_electron_frequency_profile(
    axis: plt.Axes, mfile_data: MFile, scan: int
) -> None:
    """Plot the electron thermal frequency profile on the given axis."""
    freq_plasma_electron_profile = [
        mfile_data.data[f"freq_plasma_electron_profile{i}"].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]
    freq_plasma_larmor_toroidal_electron_profile = [
        mfile_data.data[f"freq_plasma_larmor_toroidal_electron_profile{i}"].get_scan(
            scan
        )
        for i in range(
            2 * int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan))
        )
    ]

    freq_plasma_upper_hybrid_electron_profile = [
        mfile_data.data[f"freq_plasma_upper_hybrid_profile{i}"].get_scan(scan)
        for i in range(
            2 * int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan))
        )
    ]

    axis.plot(
        np.linspace(-1, 1, len(freq_plasma_larmor_toroidal_electron_profile)),
        np.array(freq_plasma_larmor_toroidal_electron_profile) / 1e9,
        color="red",
        linestyle="-",
        label=r"$f_{Larmor,toroidal,e}$ | Fundamental",
    )

    axis.plot(
        np.linspace(-1, 1, len(freq_plasma_larmor_toroidal_electron_profile)),
        2 * np.array(freq_plasma_larmor_toroidal_electron_profile) / 1e9,
        color="red",
        linestyle="--",
        label=r"$f_{Larmor,toroidal,e}$ | 2nd harmonic",
    )

    axis.plot(
        np.linspace(-1, 1, len(freq_plasma_larmor_toroidal_electron_profile)),
        3 * np.array(freq_plasma_larmor_toroidal_electron_profile) / 1e9,
        color="red",
        linestyle=":",
        label=r"$f_{Larmor,toroidal,e}$ | 3rd harmonic",
    )

    x = np.linspace(0, 1, len(freq_plasma_electron_profile))
    y = np.array(freq_plasma_electron_profile) / 1e9
    # original curve
    axis.plot(
        x,
        y,
        color="blue",
        linestyle="-",
        label=r"$\omega_{p,e}$ | Plasma Frequency",
    )
    # mirrored across the y-axis (drawn at negative rho)
    axis.plot(-x, y, color="blue", linestyle="-", label="_nolegend_")

    axis.plot(
        np.linspace(-1, 1, len(freq_plasma_upper_hybrid_electron_profile)),
        np.array(freq_plasma_upper_hybrid_electron_profile) / 1e9,
        color="purple",
        linestyle="-",
        label=r"$\omega_{UH,e}$ | Upper Hybrid",
    )

    axis.set_xlim(-1.025, 1.025)
    axis.set_ylim(None, max(freq_plasma_larmor_toroidal_electron_profile) / 1e9 * 1.6)

    axis.set_xlabel("$\\rho$ [r/a]")
    axis.set_ylabel("Frequency [GHz]")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)

    # Add secondary x-axis showing radius in metres below the primary axis
    ax2 = axis.twiny()
    rmajor = mfile_data.get("rmajor", scan=scan)
    rminor = mfile_data.get("rminor", scan=scan)

    # Convert normalized radius to actual radius
    # rho ranges from -1 to 1, which corresponds to r = rmajor - rminor to rmajor +
    # rminor
    rho_ticks = np.array([-1, -0.75, -0.5, -0.25, 0, 0.25, 0.5, 0.75, 1])
    r_ticks = rmajor + rho_ticks * rminor

    ax2.set_xticks(rho_ticks)
    ax2.set_xticklabels([f"{r:.2f}" for r in r_ticks])
    ax2.set_xlabel("Radius [m]")
    ax2.minorticks_on()
    ax2.set_xlim(axis.get_xlim())

    # Move secondary axis to the bottom
    ax2.xaxis.set_ticks_position("bottom")
    ax2.xaxis.set_label_position("bottom")
    ax2.spines["bottom"].set_position(("outward", 30))

    axis.legend()

plot_ion_frequency_profile(axis, mfile_data, scan)

Plot the ion thermal frequency profile on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
def plot_ion_frequency_profile(axis: plt.Axes, mfile_data: MFile, scan: int) -> None:
    """Plot the ion thermal frequency profile on the given axis."""
    freq_plasma_larmor_toroidal_deuteron_profile = [
        mfile_data.data[f"freq_plasma_larmor_toroidal_deuteron_profile{i}"].get_scan(
            scan
        )
        for i in range(
            2 * int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan))
        )
    ]

    freq_plasma_larmor_toroidal_triton_profile = [
        mfile_data.data[f"freq_plasma_larmor_toroidal_triton_profile{i}"].get_scan(scan)
        for i in range(
            2 * int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan))
        )
    ]

    axis.plot(
        np.linspace(-1, 1, len(freq_plasma_larmor_toroidal_deuteron_profile)),
        np.array(freq_plasma_larmor_toroidal_deuteron_profile) / 1e6,
        color="red",
        linestyle="-",
        label=r"$f_{Larmor,toroidal,D}$",
    )
    axis.plot(
        np.linspace(-1, 1, len(freq_plasma_larmor_toroidal_triton_profile)),
        np.array(freq_plasma_larmor_toroidal_triton_profile) / 1e6,
        color="green",
        linestyle="-",
        label=r"$f_{Larmor,toroidal,T}$",
    )

    axis.set_ylabel("Frequency [MHz]")
    axis.set_xlabel("$\\rho \\ [r/a]$")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)
    axis.minorticks_on()
    axis.legend()

plot_collision_time_profile(axis, mfile_data, scan)

Plot the plasma collision times on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
def plot_collision_time_profile(axis: plt.Axes, mfile_data: MFile, scan: int) -> None:
    """Plot the plasma collision times on the given axis."""
    t_plasma_electron_electron_collision_profile = [
        mfile_data.data[f"t_plasma_electron_electron_collision_profile{i}"].get_scan(
            scan
        )
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    t_plasma_electron_deuteron_collision_profile = [
        mfile_data.data[f"t_plasma_electron_deuteron_collision_profile{i}"].get_scan(
            scan
        )
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    t_plasma_electron_triton_collision_profile = [
        mfile_data.data[f"t_plasma_electron_triton_collision_profile{i}"].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    t_plasma_electron_alpha_thermal_collision_profile = [
        mfile_data.data[
            f"t_plasma_electron_alpha_thermal_collision_profile{i}"
        ].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    axis.plot(
        np.linspace(0, 1, len(t_plasma_electron_electron_collision_profile)),
        t_plasma_electron_electron_collision_profile,
        color="blue",
        linestyle="-",
        label=r"$\tau_{e-e}$",
    )

    axis.plot(
        np.linspace(0, 1, len(t_plasma_electron_deuteron_collision_profile)),
        t_plasma_electron_deuteron_collision_profile,
        color="pink",
        linestyle="-",
        label=r"$\tau_{e-D}$",
    )

    axis.plot(
        np.linspace(0, 1, len(t_plasma_electron_triton_collision_profile)),
        t_plasma_electron_triton_collision_profile,
        color="green",
        linestyle="-",
        label=r"$\tau_{e-T}$",
    )

    axis.plot(
        np.linspace(0, 1, len(t_plasma_electron_alpha_thermal_collision_profile)),
        t_plasma_electron_alpha_thermal_collision_profile,
        color="red",
        linestyle="-",
        label=r"$\tau_{e-\alpha,thermal}$",
    )

    axis.set_yscale("log")
    axis.set_ylabel("Collision Time [s]")
    axis.set_xlabel("$\\rho \\ [r/a]$")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)
    axis.minorticks_on()
    axis.legend()

plot_collision_frequency_profile(axis, mfile_data, scan)

Plot the plasma collision frequencies on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
def plot_collision_frequency_profile(
    axis: plt.Axes, mfile_data: MFile, scan: int
) -> None:
    """Plot the plasma collision frequencies on the given axis."""
    freq_plasma_electron_electron_collision_profile = [
        mfile_data.data[f"freq_plasma_electron_electron_collision_profile{i}"].get_scan(
            scan
        )
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    freq_plasma_electron_deuteron_collision_profile = [
        mfile_data.data[f"freq_plasma_electron_deuteron_collision_profile{i}"].get_scan(
            scan
        )
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    freq_plasma_electron_triton_collision_profile = [
        mfile_data.data[f"freq_plasma_electron_triton_collision_profile{i}"].get_scan(
            scan
        )
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    freq_plasma_electron_alpha_thermal_collision_profile = [
        mfile_data.data[
            f"freq_plasma_electron_alpha_thermal_collision_profile{i}"
        ].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    axis.plot(
        np.linspace(0, 1, len(freq_plasma_electron_electron_collision_profile)),
        freq_plasma_electron_electron_collision_profile,
        color="blue",
        linestyle="-",
        label=r"$\nu_{e-e}$",
    )

    axis.plot(
        np.linspace(0, 1, len(freq_plasma_electron_deuteron_collision_profile)),
        freq_plasma_electron_deuteron_collision_profile,
        color="pink",
        linestyle="-",
        label=r"$\nu_{e-D}$",
    )

    axis.plot(
        np.linspace(0, 1, len(freq_plasma_electron_triton_collision_profile)),
        freq_plasma_electron_triton_collision_profile,
        color="green",
        linestyle="-",
        label=r"$\nu_{e-T}$",
    )

    axis.plot(
        np.linspace(0, 1, len(freq_plasma_electron_alpha_thermal_collision_profile)),
        freq_plasma_electron_alpha_thermal_collision_profile,
        color="red",
        linestyle="-",
        label=r"$\nu_{e-\alpha,thermal}$",
    )
    axis.set_yscale("log")
    axis.set_ylabel("Collision Frequency [Hz]")
    axis.set_xlabel("$\\rho \\ [r/a]$")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)
    axis.minorticks_on()
    axis.legend()

plot_mean_free_path_profile(axis, mfile_data, scan)

Plot the plasma mean free path on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
def plot_mean_free_path_profile(axis: plt.Axes, mfile_data: MFile, scan: int) -> None:
    """Plot the plasma mean free path on the given axis."""
    len_plasma_electron_electron_mean_free_path_profile = [
        mfile_data.data[
            f"len_plasma_electron_electron_mean_free_path_profile{i}"
        ].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    len_plasma_electron_deuteron_mean_free_path_profile = [
        mfile_data.data[
            f"len_plasma_electron_deuteron_mean_free_path_profile{i}"
        ].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    len_plasma_electron_triton_mean_free_path_profile = [
        mfile_data.data[
            f"len_plasma_electron_triton_mean_free_path_profile{i}"
        ].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    len_plasma_electron_alpha_thermal_mean_free_path_profile = [
        mfile_data.data[
            f"len_plasma_electron_alpha_thermal_mean_free_path_profile{i}"
        ].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    axis.plot(
        np.linspace(0, 1, len(len_plasma_electron_electron_mean_free_path_profile)),
        len_plasma_electron_electron_mean_free_path_profile,
        color="blue",
        linestyle="-",
        label=r"$\lambda_{mfp,e-e}$",
    )

    axis.plot(
        np.linspace(0, 1, len(len_plasma_electron_deuteron_mean_free_path_profile)),
        len_plasma_electron_deuteron_mean_free_path_profile,
        color="pink",
        linestyle="-",
        label=r"$\lambda_{mfp,e-D}$",
    )

    axis.plot(
        np.linspace(0, 1, len(len_plasma_electron_triton_mean_free_path_profile)),
        len_plasma_electron_triton_mean_free_path_profile,
        color="green",
        linestyle="-",
        label=r"$\lambda_{mfp,e-T}$",
    )
    axis.plot(
        np.linspace(0, 1, len(len_plasma_electron_alpha_thermal_mean_free_path_profile)),
        len_plasma_electron_alpha_thermal_mean_free_path_profile,
        color="red",
        linestyle="-",
        label=r"$\lambda_{mfp,e-\alpha,thermal}$",
    )
    axis.set_yscale("log")
    axis.set_ylabel("Mean Free Path [m]")
    axis.set_xlabel("$\\rho \\ [r/a]$")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)
    axis.minorticks_on()
    axis.legend()

plot_ion_slowing_down_time_profile(axis, mfile_data, scan)

Plot the plasma Spitzer slowing down time on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
def plot_ion_slowing_down_time_profile(
    axis: plt.Axes, mfile_data: MFile, scan: int
) -> None:
    """Plot the plasma Spitzer slowing down time on the given axis."""
    t_plasma_electron_alpha_spitzer_slow_profile = [
        mfile_data.data[f"t_plasma_electron_alpha_spitzer_slow_profile{i}"].get_scan(
            scan
        )
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    axis.plot(
        np.linspace(0, 1, len(t_plasma_electron_alpha_spitzer_slow_profile)),
        t_plasma_electron_alpha_spitzer_slow_profile,
        color="red",
        linestyle="-",
        label=r"$\tau_{e-\alpha,Spitzer}$",
    )

    axis.set_yscale("log")
    axis.set_ylabel("Spitzer Slowing Down Time [s]")
    axis.set_xlabel("$\\rho \\ [r/a]$")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)
    axis.minorticks_on()
    axis.legend()

plot_resistivity_profile(axis, mfile_data, scan)

Plot the plasma resistivity on the given axis.

Source code in process/core/io/plot/summary/profiles/atomic.py
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
def plot_resistivity_profile(axis: plt.Axes, mfile_data: MFile, scan: int) -> None:
    """Plot the plasma resistivity on the given axis."""
    res_plasma_fuel_spitzer_profile = [
        mfile_data.data[f"res_plasma_fuel_spitzer_profile{i}"].get_scan(scan)
        for i in range(int(mfile_data.data["n_plasma_profile_elements"].get_scan(scan)))
    ]

    axis.plot(
        np.linspace(0, 1, len(res_plasma_fuel_spitzer_profile)),
        res_plasma_fuel_spitzer_profile,
        color="red",
        linestyle="-",
        label=r"$\eta_{Spitzer-fuel}$",
    )

    axis.set_yscale("log")
    axis.set_ylabel("Resistivity [Ohm m]")
    axis.set_xlabel("$\\rho \\ [r/a]$")
    axis.grid(True, which="both", linestyle="--", alpha=0.5)
    axis.minorticks_on()
    axis.legend()