PPPLDeepLearning / plasma-python

PPPL deep learning disruption prediction package
http://tigress-web.princeton.edu/~alexeys/docs-web/html/
79 stars 43 forks source link

clean_shot_list #2

Closed ASvyatkovskiy closed 7 years ago

ASvyatkovskiy commented 7 years ago

In plasma.preprocessor.clean_shot_list: https://github.com/PPPLDeepLearning/plasma-python/blob/master/plasma/preprocessor/preprocess.py#L40

is this statement used to determine whether a shot is disruptive? Or this condition would be met for a subset of non-disruptive shots ?

My understanding, both types of shots would be 2D arrays, therefore this if statement will always return False.

Should it say something like this:

if np.any(data[:,1] == -1):

or even:

if data[0,1] == -1
jnkh commented 7 years ago

The raw files from JET have only one column (shot number) for nondisruptive shots and two columns (shot number and disruption time) for disruptive shots. Within a file either all columns are D or ND, no mixture. I wanted to put all in the same format so that all have two columns and decided to put a sentinel (-1) in the second column of ND shots. This statement is part of the cleaning procedure for converting raw JET files to the format I just described. You've probably never seen it in action because it only gets run once whenever a new shot list is added to the directory.