|
| 1 | +#= ================== =# |
| 2 | +# ActorInterferometer # |
| 3 | +#= ================== =# |
| 4 | + |
| 5 | +@actor_parameters_struct ActorInterferometer{T} begin |
| 6 | + #== actor parameters ==# |
| 7 | + n_points::Entry{Int} = Entry{Int}("-", "Number of integration points along line of sight"; default=100) |
| 8 | + #== display and debugging parameters ==# |
| 9 | +end |
| 10 | + |
| 11 | +mutable struct ActorInterferometer{D,P} <: SingleAbstractActor{D,P} |
| 12 | + dd::IMAS.dd{D} |
| 13 | + par::OverrideParameters{P,FUSEparameters__ActorInterferometer{P}} |
| 14 | +end |
| 15 | + |
| 16 | +""" |
| 17 | + ActorInterferometer(dd::IMAS.dd, act::ParametersAllActors; kw...) |
| 18 | +
|
| 19 | +Calculates synthetic interferometer measurements from equilibrium and core profiles. |
| 20 | +
|
| 21 | +This actor computes line-averaged electron density measurements that would be observed by |
| 22 | +interferometer diagnostics based on the plasma equilibrium and core profiles. It populates |
| 23 | +the `dd.interferometer` IDS with synthetic diagnostic signals. |
| 24 | +
|
| 25 | +The actor calls `IMAS.interferometer!` to: |
| 26 | +- Calculate line-integrated electron density along each interferometer line of sight |
| 27 | +- Compute line-averaged density for each channel |
| 28 | +- Generate time-dependent synthetic signals consistent with the equilibrium and profile evolution |
| 29 | +
|
| 30 | +Key physics: |
| 31 | +- Integration of electron density along interferometer chords |
| 32 | +- Proper handling of line-of-sight geometry (including multi-segment paths) |
| 33 | +- Time-dependent measurements across all equilibrium time slices |
| 34 | +
|
| 35 | +Key outputs: |
| 36 | +- Line-averaged electron density in `dd.interferometer.channel[:].n_e_line_average` |
| 37 | +- Time-dependent diagnostic data for validation and comparison with experimental data |
| 38 | +
|
| 39 | +Parameters: |
| 40 | +- `n_points`: Number of integration points along each line of sight (default: 100) |
| 41 | +
|
| 42 | +!!! note |
| 43 | +
|
| 44 | + Requires `dd.equilibrium` and `dd.core_profiles` to be populated. |
| 45 | + The `dd.interferometer` must have channels defined with `line_of_sight` geometry. |
| 46 | + Results are stored in `dd.interferometer.channel[:].n_e_line_average`. |
| 47 | +""" |
| 48 | +function ActorInterferometer(dd::IMAS.dd, act::ParametersAllActors; kw...) |
| 49 | + actor = ActorInterferometer(dd, act.ActorInterferometer; kw...) |
| 50 | + step(actor) |
| 51 | + finalize(actor) |
| 52 | + return actor |
| 53 | +end |
| 54 | + |
| 55 | +function ActorInterferometer(dd::IMAS.dd, par::FUSEparameters__ActorInterferometer; kw...) |
| 56 | + logging_actor_init(ActorInterferometer) |
| 57 | + par = OverrideParameters(par; kw...) |
| 58 | + return ActorInterferometer(dd, par) |
| 59 | +end |
| 60 | + |
| 61 | +function _step(actor::ActorInterferometer) |
| 62 | + dd = actor.dd |
| 63 | + par = actor.par |
| 64 | + |
| 65 | + # Calculate interferometer diagnostics from equilibrium and core profiles |
| 66 | + IMAS.interferometer!(dd.interferometer, dd.equilibrium, dd.core_profiles; n_points=par.n_points) |
| 67 | + |
| 68 | + return actor |
| 69 | +end |
0 commit comments