Skip to content

Fix C-MOD TCI-related methods#537

Open
ZanderKeith wants to merge 12 commits intodevfrom
zk/tci
Open

Fix C-MOD TCI-related methods#537
ZanderKeith wants to merge 12 commits intodevfrom
zk/tci

Conversation

@ZanderKeith
Copy link
Copy Markdown
Contributor

Two-Color Interferometry can be used to calibrate measurements from Thomson scattering. For a while it has been hardcoded to not do this, and as such the TCI-related methods have gone untested and are broken. This PR fixes some obvious errors so the methods can run to completion, but I'm not sure about functional correctness. The results are similar enough to other density measurements, but these methods should be vetted more thoroughly at some point.

@ZanderKeith ZanderKeith changed the title Zk/tci TCI-related method fixes Mar 31, 2026
@gtrevisan gtrevisan added the machine: C-MOD Related to the Alcator C-MOD tokamak label Mar 31, 2026
@gtrevisan gtrevisan changed the title TCI-related method fixes Fix C-MOD TCI-related methods Mar 31, 2026
Base automatically changed from glt/numpy2 to dev March 31, 2026 20:09
@ZanderKeith ZanderKeith marked this pull request as ready for review April 2, 2026 14:32
@gtrevisan gtrevisan requested review from yumouwei and zapatace April 2, 2026 14:35
Copy link
Copy Markdown
Member

@gtrevisan gtrevisan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for contributing!

I'm hoping:

  • @yumouwei will help out with the more functional approach, including wrt to other C-MOD methods or other machines,
  • @zapatace will be able to focus on the nitty gritty implementation and run some cases himself.


@staticmethod
@physics_method(
columns=["nl_ts1", "nl_ts2", "nl_tci1", "nl_tci2"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yumouwei is this the best we can do in terms of naming these new features?

nl_tci1, nl_tci2 : TCI line-integrated density at YAG 1 and 2 timestamps [m^-2]
"""
nl_ts1, nl_ts2, nl_tci1, nl_tci2, time1, time2 = (
CmodThomsonDensityMeasure.compare_ts_tci(params)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not clear to me -- what's the relationship between this new physics method and the pre-existing get_peaking_factors for C-MOD with a use_ts_tci_calibration = True?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This physics method actually returns the measured densities from the TCI, whereas the get_peaking_factors method would use them to adjust the TS measurements before discarding them.

indices2 = indices1 + 1
else:
indices1 = 2 * np.arange(nyag1) + (nyag1 > nyag2)
elif nyag1 < nyag2:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once @yumouwei and maybe @zapatace will have taken a look, I'll try and unleash Copilot, too, in case we missed something. okay?

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

Successfully merging this pull request may close these issues.

2 participants