Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prad_peaking returns NaNs prior to shot termination #206

Closed
yumouwei opened this issue Jul 8, 2024 · 1 comment
Closed

prad_peaking returns NaNs prior to shot termination #206

yumouwei opened this issue Jul 8, 2024 · 1 comment
Assignees
Labels
machine: C-MOD Related to the Alcator C-MOD tokamak

Comments

@yumouwei
Copy link
Collaborator

yumouwei commented Jul 8, 2024

Problem

The prad_peaking parameter method currently implemented in disruption-py returns NaNs prior to the termination of a shot. This issue occurs in both disruptive and non-disruptive shots, although it's more pronounced in disruptive ones.

image
1150805012: flat-top disruption

image
1150805013: non-disruptive shot

Analysis of the problem

  1. The prad_peaking method first fetches signals from all available chords in the AXA and AXJ bolometers. At each time point, the function calculate the "distance of the chord" (assuming it's the chord's sight line) with respect to the plasma's magnetic axis. If the chord's is within 20% of the plasma's minor radius then the chord's signal is considered as part of the core radiation. The peaking factor is then calculated using mean(core radiation)/mean(all radiation)

for i in range(len(params.shot_props.times)):
core_radiation = np.array([])
all_radiation = np.array([])
if got_axa:
axa_dist = np.sqrt((r_axa - r0[i]) ** 2 + (z0[i] - z_axa) ** 2)
axa_core_index = axa_dist < 0.2 * a_minor[i]
core_radiation = np.append(
core_radiation, axa_interp[axa_core_index, i]
)
all_radiation = np.append(all_radiation, axa_interp[:, i])
if got_axj:
axj_dist = np.sqrt((r_axj - r0[i]) ** 2 + (z0[i] - z_axj) ** 2)
axj_core_index = axj_dist < 0.2 * a_minor[i]
core_radiation = np.append(
core_radiation, axj_interp[axj_core_index, i]
)
all_radiation = np.append(all_radiation, axj_interp[:, i])
try:
prad_peaking[i] = np.nanmean(core_radiation) / np.nanmean(all_radiation)
except:
prad_peaking[i] = np.nan

  1. In those NaN time slices, the core radiation array does not contain any value. This indicates the method could not find any chord that satisfies the above criteria. This could potentially be caused by the plasma's motion and shrinkage prior to a disruption.

Potential solutions

  1. Determine if this issue is worth investigating -- if data at these time slices are going to be useful for disruption studies.
  2. Understand the geometry of the bolometer diagnostic(s)
  3. Understand the design choices in the method:
    • Why chose 20% of a_minor as the cutoff?
    • Could we possibly fit the bolometer profile into a smooth function (e.g. a gaussian) and then determine the peaking factor?
    • We should also check the bolometer's radiation profile and compare it with the plasma's magnetic axis & minor radius

Related issues & PRs

@hwietfeldt
Copy link
Contributor

hwietfeldt commented Jul 9, 2024

Closing this issue after the July 9th meeting. Eventually, we'll need to consider whether the NaNs in prad_peaking representing when the plasma core is out of view of any chords should instead be output as 0s. We should also fill in Alessandro Pau on how Prad Peaking is calculated on C-Mod.

Details of the AXUV arrays (including geometry in Fig. 1 shown below) can be found in Matt Reinke's 2008 paper in Nuclear Fusion: https://iopscience.iop.org/article/10.1088/0029-5515/48/12/125004

Screenshot 2024-07-09 at 12 57 51 PM

Here are notes from the meeting:

  • C-Mod peaking factors are different to other machines due to different diagnostics. For example, DIII-D has vertical fans.
  • AXUV arrays are photodiode arrays. The UV and visible radiated power might not be peaked in the center and is not Gaussian, so profile fitting doesn't make sense
  • To get absolute values we would really need to perform an Abel transform but we're just interested in differences in Prad Peaking
  • If we're interested in edge radiation, perhaps we could calculate a mean(edge)/mean(all) statistic
  • We could consider making the "core radius" factor (currently 0.2) as a parameter w/ 0.2 as the default value.
  • Note this is a bug in the Matlab scripts, which open the analysis tree instead of the efit18 tree.

@gtrevisan gtrevisan added the machine: C-MOD Related to the Alcator C-MOD tokamak label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
machine: C-MOD Related to the Alcator C-MOD tokamak
Projects
None yet
Development

No branches or pull requests

3 participants