Conversation
gtrevisan
reviewed
Mar 31, 2025
| # phase = np.arctan2(np.imag(rmp_fft_output), np.real(rmp_fft_output)) | ||
| rmp_fft_output = scipy.fft.fft(rmp_pickup, axis=1) | ||
| amplitude = abs(rmp_fft_output) / len(rmp_fft_output[0]) | ||
| amplitude[:, 1:] *= 2 # TODO: Why? |
Member
There was a problem hiding this comment.
cruft? or is this still mysterious?
gtrevisan
reviewed
Mar 31, 2025
gtrevisan
reviewed
Apr 1, 2025
…ting (signals not in table/all nulls, match MATLAB)
…d plower_gap to public method outputs
gtrevisan
reviewed
Apr 8, 2025
gtrevisan
approved these changes
May 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improved physics methods:
Newly added physics methods:
Remaining XFAILs:
beta_n, beta_p, kappa, li, q0, qstar, q95, wmhd: Fresh EFIT signals don't match the stored SQL data for some disruptive shots on EAST #380greenwald_fraction,p_oh,kappa_area: computations are dependent on EFIT signals.rad_input_frac,rad_loss_frac,p_input: computations are dependent onp_ohwhich uses EFIT signals.beta_p_rt,li_rt,wmhd_rt: fresh data are all NaN, but there are cached data in thedisruption_warningtable. I don't know where those data were obtained from.Notes on improved/added methods
1. get_mirnov_std
test_against_cache. For this reason, I kept bothmirnov_stdandmirnov_std_normalizedin theexpected_failure_columns.Note that neither disruption-py, matlab, nor the sql table match another column completely. Technically I can change the time window to a fixed index-based window but the difference would be too minuscule to matter.
2. get_radiated_power (translated from
prad_bulk_xuv2014_2016.m)Both this method and
get_prad_peakinguse data from the AXUV array. However the ways these two methods deal with what's noted as "bad" channels (ch 12 and 16) are different.get_radiated_power, the orders are:ch12 = (ch11 + ch13)/2,ch36 = (ch35 + ch36)/2-- WHY?get_prad_peaking, the orders are:ch12 = (ch11+ch13)/2; correction for ch36 was commented out.The ways these two methods define the
non-divertorchannels are also different.get_radiated_power, these channels are: 8-15, 21-32, 33-48, 54-59 (the MATLAB script had a line comment "subtract divertor measuring and overlap measuring")get_prad_peaking, the core channels are 30-35, and the non-divertor channels are 9-56.For now I implemented these two methods to match exactly with their original MATLAB method, but in the future we need to sort out these discrepancies.
3. get_prad_peaking
In addition to the points in
get_radiated_power, the original MATLAB script usedDel_r(ichan)in calibrating the xuv channels, which was almost certainly a typo. I corrected it in the python translation and movedprad_peakingto XFAIL.disruption-py/EAST/get_prad_peaking.m
Lines 65 to 66 in 5d1a80d
disruption-py/EAST/get_prad_peaking.m
Lines 76 to 78 in 5d1a80d
4. get_n1rms_n2rms
mirnov_stdandmirnov_std_normalizeddata in the columns ofn1rms,n2rms& the_normalizedsignals computed by this method. I removed these four signals from thetest_columns.disruption-py/EAST/disruption_warning_database.m
Lines 602 to 616 in 5d1a80d
5. get_efit_gaps
efit_easttree (upper_gapandlower_gap) and the P-EFIT tree (pupper_gapandplower_gap).pupper_gapandplower_gapdo exist in thedisruption_warningtable, but all of the stored values are NULL. Therefore I removed these two signals from thetest_columns