Fix C-MOD TCI-related methods#537
Conversation
|
|
||
| @staticmethod | ||
| @physics_method( | ||
| columns=["nl_ts1", "nl_ts2", "nl_tci1", "nl_tci2"], |
There was a problem hiding this comment.
@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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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: |
|
I ran the new disruption-errors script for C-MOD and got: I tried running for the |
|
I run this method with all shots in the disruption warning table (10435 shots). It looks like this diagnostic is only available in 15% of shots. Percentage of shots with all NaN values per column: When there is data, the integrated density line follows n_e reasonably. For example, here you have 10 shots. The error logs showed these potential edge cases. It could be that there is a problem with the method itself. I have these errors for example. All log messages here: I would not approve this PR for now. Is there a processing error or is data missing? In any case. I would keep this branch if somenone in the future is interested in using this diagnostic!!! |
|
thanks, @zapatace, but before you compute the "NaN bottom line" like that we really should wait for @ZanderKeith to fix all those IndexErrors and ValueErrors... it seems you did find another handful of errors, though. |
|
@ZanderKeith I took a look at the changes you made in the branch. Before we work on the implementation, can you give a high-level description of how the functions under The changes in |

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.