Skip to content

Commit e554500

Browse files
committed
Merge branch 'master' into jdev
2 parents c0d0081 + 9b1865d commit e554500

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+6099
-4254
lines changed

.travis.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
language: python
22

3-
sudo: required
4-
53
os:
64
- linux
75

6+
dist: xenial
7+
88
#python:
99
# - 2.7
1010
# - 3.6
@@ -15,13 +15,22 @@ matrix:
1515
python: 2.7
1616
- env: MPI_LIBRARY=openmpi MPI_LIBRARY_VERSION=2.0.0
1717
python: 3.6
18+
- stage: python linter
19+
env:
20+
install: pip install flake8
21+
script: python -m flake8 && echo "Finished linting Python files with flake8"
1822

1923
addons:
2024
apt:
2125
packages:
2226
- python-numpy
2327
- python-setuptools
2428

29+
env:
30+
- TEST_DIR=.; TEST_SCRIPT="python setup.py test"
31+
32+
# before_install:
33+
2534
install:
2635
- sh install-mpi.sh
2736
- export MPI_PREFIX="${HOME}/opt/${MPI_LIBRARY}-${MPI_LIBRARY_VERSION}"
@@ -30,7 +39,23 @@ install:
3039
- pip install --upgrade pip
3140
- pip install -r requirements-travis.txt
3241

33-
env:
34-
- TEST_DIR=.; TEST_SCRIPT="python setup.py test"
35-
36-
script: cd $TEST_DIR && $TEST_SCRIPT && cd ..
42+
# before_script:
43+
44+
script:
45+
- cd $TEST_DIR && $TEST_SCRIPT && cd ..
46+
47+
# Specify order of stages; build matrix of installation and regression tests
48+
# will only run if linter stage passes
49+
stages:
50+
- python linter
51+
- test
52+
53+
notifications:
54+
email:
55+
on_success: change
56+
on_failure: always
57+
slack:
58+
rooms:
59+
- secure: "NBjGYpIF2VO/GvhbC7XVPIfi0WLGFEuVhi51UbZjfHg4IOv1UuCF0fImi8GN2UZZBFRnZcbtPVffZnyMUyJI0Krw0M1ropkjA4YDaJx1JUGnYuQLxNmX+jbQmN61Usjg5MQOgcRnAn1bdMN1ttWInqkKejpV5buCjZbt8SZbDePfXz4U3No68P/pRsDTVXSy0xLTtRacuEITJjwxfjp6phbmR3qs127MZMRbVYDC2HA6KsoJW6YSKF1vFyHqnFMl7GSavxYw/XQpqFLJkGKXfnNgPZV6qAbVk5+bzyytAbbwLGvgbuFpnJsGPvAyebV8wVYaIPg7OeK+Sm1A3q0jt774NnqFp2AZ+pSKrxbxIkygDM0zoWLm4i3pt6ToJ6dKcqSbCKbELnSY5NphcyYuiJ8uhLVpAR0Y+vp+fOvhb8td/nH2AWkxFpp6xwOHPXvtodBsyPMkiaeKoVElYBfbfOhDSYH2KafADECTX75S63A9KleeNZh0DSImfFdQPaN3GFLEL8Z9UFABzTkM9eYKP9pyEP82Wh/JGDaqbARazEgNzy8rwghomsEguV247XHdOx32PSd0att541gsRFZ5uyMuVFKzI0jiLijekibY2I1c5b6dDeuK4O8uBiq4FTS+bM55Rj4Job01kdxSCKw3RwOh0amzITRTQvEWKpTAekg="
60+
on_success: always
61+
on_failure: always

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# FRNN [![Build Status](https://travis-ci.org/PPPLDeepLearning/plasma-python.svg?branch=master)](https://travis-ci.org/PPPLDeepLearning/plasma-python.svg?branch=master) [![Build Status](https://jenkins.princeton.edu/buildStatus/icon?job=FRNM/PPPL)](https://jenkins.princeton.edu/job/FRNM/job/PPPL/)
1+
# FRNN
2+
3+
[![Build Status](https://travis-ci.com/PPPLDeepLearning/plasma-python.svg?branch=master)](https://travis-ci.com/PPPLDeepLearning/plasma-python)
4+
[![Build Status](https://jenkins.princeton.edu/buildStatus/icon?job=FRNM/PPPL)](https://jenkins.princeton.edu/job/FRNM/job/PPPL/)
25

36
## Package description
47

@@ -12,7 +15,7 @@ It consists of 4 core modules:
1215

1316
- `primitives`: contains abstractions specific to the domain, implemented as Python classes. For instance: Shot - a measurement of plasma current as a function of time. The Shot object contains attributes corresponding to unique identifier of a shot, disruption time in milliseconds, time profile of the shot converted to time-to- disruption values, validity of a shot (whether plasma current reaches a certain value during the shot), etc. Other primitives include `Machines` and `Signals` which carry the relevant information necessary for incorporating physics data into the overall pipeline. Signals know the Machine they live on, their mds+ paths, code for being downloaded, preprocessing approaches, their dimensionality, etc. Machines know which Signals are defined on them, which mds+ server houses the data, etc.
1417

15-
- `utilities`: a set of auxiliary functions for preprocessing, performance evaluation and learning curves analysis.
18+
- `utilities`: a set of auxiliary functions for preprocessing, performance evaluation and learning curves analysis.
1619

1720
In addition to the `utilities` FRNN supports TensorBoard scaler variable summaries, histogramms of layers, activations and gradients and graph visualizations.
1821

@@ -47,5 +50,4 @@ The Sphinx pages for FRNN are building up here: http://tigress-web.princeton.edu
4750

4851
## Tutorials
4952

50-
For tutorial check:
51-
https://github.com/PPPLDeepLearning/plasma-python/blob/mpicc-travis/docs/PrincetonUTutorial.md
53+
For a tutorial, check out: [PrincetonUTutorial.md](docs/PrincetonUTutorial.md)

data/d3d_signals.py

Lines changed: 55 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
#JET signal hierarchy
2-
#------------------------------------------------------------------------#
3-
#User only needs to look at 1st and last sections
1+
# D3D signal hierarchy
2+
# ------------------------------------------------------------------------
3+
# User only needs to look at 1st and last sections
44
# - conf.py only needs to import signals_dirs and signals_masks
55
# - get_mdsplus_data.py only needs signals_dirs and download_masks
66
# - performance_analysis_utils.py needs :
77
# - signals_dirs, plot_masks, ppf_labels, jpf_labels
8-
#------------------------------------------------------------------------#
8+
# ------------------------------------------------------------------------
99
################
1010
# Signal names #
1111
################
12-
#This section contains all the exact JET signal strings and their
13-
#groupings by type and dimensionality.
14-
#User should not touch this. Use for reference
12+
# This section contains all the exact D3D signal strings and their
13+
# groupings by type and dimensionality.
14+
# User should not touch this. Use for reference
1515

1616

17-
### 0D signals ###
17+
# 0D signals #
1818
signal_paths = [
19-
'efsli', #Internal Inductance
20-
'ipsip', #Plasma Current
21-
'efsbetan', #Normalized Beta
22-
'efswmhd', #Stored Energy
23-
'nssampn1l', #Tearing Mode Amplitude (rotating 2/1)
24-
'nssfrqn1l', #Tearing Mode Frequency (rotating 2/1)
25-
'nssampn2l', #Tearing Mode Amplitude (rotating 3/2)
26-
'nssfrqn2l', #Tearing Mode Frequency (rotating 3/2)
27-
'dusbradial', #LM Amplitude
28-
'dssdenest', #Plasma Density
29-
r'\bol_l15_p', #Radiated Power core
30-
r'\bol_l03_p', #Radiated Power Edge
31-
'bmspinj', #Total Beam Power
32-
'bmstinj',] #Total Beam Torque
33-
#'pcechpwrf'] #Total ECH Power Not always on!
19+
'efsli', # Internal Inductance
20+
'ipsip', # Plasma Current
21+
'efsbetan', # Normalized Beta
22+
'efswmhd', # Stored Energy
23+
'nssampn1l', # Tearing Mode Amplitude (rotating 2/1)
24+
'nssfrqn1l', # Tearing Mode Frequency (rotating 2/1)
25+
'nssampn2l', # Tearing Mode Amplitude (rotating 3/2)
26+
'nssfrqn2l', # Tearing Mode Frequency (rotating 3/2)
27+
'dusbradial', # LM Amplitude
28+
'dssdenest', # Plasma Density
29+
r'\bol_l15_p', # Radiated Power core
30+
r'\bol_l03_p', # Radiated Power Edge
31+
'bmspinj', # Total Beam Power
32+
'bmstinj', ] # Total Beam Torque
33+
# 'pcechpwrf'] #Total ECH Power Not always on!
3434

3535
signal_paths = ['d3d/' + path for path in signal_paths]
3636

37-
### 0D EFIT signals ###
37+
# 0D EFIT signals
3838
signal_paths += ['EFIT01/RESULTS.AEQDSK.Q95']
39-
40-
### 1D EFIT signals ###
41-
#signal_paths += [
42-
#'AOT/EQU.t_e', #electron temperature profile vs rho (uniform mapping over time)
43-
#'AOT/EQU.dens_e'] #electron density profile vs rho (uniform mapping over time)
4439

45-
#these signals seem to give more reliable data
40+
# 1D EFIT signals
41+
# signal_paths += [
42+
# 'AOT/EQU.t_e', # electron temperature profile vs rho
43+
# 'AOT/EQU.dens_e'] # electron density profile vs rho
44+
45+
# these signals seem to give more reliable data
4646
signal_paths += [
47-
'ZIPFIT01/PROFILES.ETEMPFIT', #electron temperature profile vs rho (uniform mapping over time)
48-
'ZIPFIT01/PROFILES.EDENSFIT'] #electron density profile vs rho (uniform mapping over time)
47+
'ZIPFIT01/PROFILES.ETEMPFIT', # electron temperature profile vs rho
48+
'ZIPFIT01/PROFILES.EDENSFIT'] # electron density profile vs rho
4949

50-
#make into list of lists format to be consistent with jet_signals.py
50+
# make into list of lists format to be consistent with jet_signals.py
5151
signal_paths = [[path] for path in signal_paths]
5252

53-
#format : 'tree/signal_path' for each path
53+
# format : 'tree/signal_path' for each path
5454
signals_dirs = signal_paths
5555

56-
56+
5757
##################################################
5858
# USER SELECTIONS #
5959
##################################################
@@ -63,37 +63,39 @@
6363
# Select signals for downloading #
6464
##################################
6565

66-
#Default pass to get_mdsplus_data.py: download all above signals
66+
# Default pass to get_mdsplus_data.py: download all above signals
6767
download_masks = [[True]*len(sig_list) for sig_list in signals_dirs]
68-
# download_masks[-1] = [False] # enable/disable temperature profile
69-
# download_masks[-2] = [False] # enable/disable density profile
68+
# download_masks[-1] = [False] # enable/disable temperature profile
69+
# download_masks[-2] = [False] # enable/disable density profile
7070

7171
#######################################
7272
# Select signals for training/testing #
7373
#######################################
7474

75-
#Default pass to conf.py: train with all above signals
75+
# Default pass to conf.py: train with all above signals
7676
signals_masks = [[True]*len(sig_list) for sig_list in signals_dirs]
77-
signals_masks[-1] = [False] # enable/disable temperature profile
78-
signals_masks[-2] = [False] # enable/disable density profile
77+
signals_masks[-1] = [False] # enable/disable temperature profile
78+
signals_masks[-2] = [False] # enable/disable density profile
79+
80+
# num_signals = sum([group.count(True) for i, group in
81+
# enumerate(jet_signals.signals_masks)]
7982

80-
#num_signals = sum([group.count(True) for i,group in enumerate(jet_signals.signals_masks)]
8183
###########################################
8284
# Select signals for performance analysis #
8385
###########################################
8486

85-
#User selects these by signal name
87+
# User selects these by signal name
8688
plot_masks = [[True]*len(sig_list) for sig_list in signals_dirs]
8789

88-
#LaTeX strings for performance analysis, sorted in lists by signal_group
90+
# LaTeX strings for performance analysis, sorted in lists by signal_group
8991
group_labels = [[r' $I_{plasma}$ [A]'],
90-
[r' Mode L. A. [A]'],
91-
[r' $P_{radiated}$ [W]'], #0d radiation, db/
92-
[r' $P_{radiated}$ [W]'],#1d radiation, db/
93-
[r' $\rho_{plasma}$ [m^-2]'],
94-
[r' $L_{plasma,internal}$'],
95-
[r'$\frac{d}{dt} E_{D}$ [W]'],
96-
[r' $P_{input}$ [W]'],
97-
[r'$E_{D}$'],
98-
#ppf signal labels
92+
[r' Mode L. A. [A]'],
93+
[r' $P_{radiated}$ [W]'], # 0d radiation, db/
94+
[r' $P_{radiated}$ [W]'], # 1d radiation, db/
95+
[r' $\rho_{plasma}$ [m^-2]'],
96+
[r' $L_{plasma,internal}$'],
97+
[r'$\frac{d}{dt} E_{D}$ [W]'],
98+
[r' $P_{input}$ [W]'],
99+
[r'$E_{D}$'],
100+
# ppf signal labels
99101
[r'ECE unit?']]

0 commit comments

Comments
 (0)