W7X Package¶
W7X
Package¶
W7-X acquisition module
acq
Module¶
W7-X acquisition module.
-
class
pyfusion.acquisition.W7X.acq.
W7XAcquisition
(*args, **kwargs)[source]¶ Bases:
pyfusion.acquisition.base.BaseAcquisition
Acquisition class for W7X data system.
fetch
Module¶
W7-X data fetchers.
Since December 8th 2016, cached npz files include the raw utcs (differenced) at very little additional cost in space. - see examples/read_W7X_json.py
Example of data reaching over a break in time run pyfusion/examples/plot_signals.py dev_name=’W7X’ diag_name=W7X_L53_LP1 shot_number=[1457015819400000000,1457015821000000000] hold=1 sharey=2 best to limit nSamples to ~ 10k - see pyfusion.cfg
Test method: Clumsy uncomment file:// in pyfusion.cfg from pyfusion.acquisition.W7X import fetch ff=fetch.W7XDataFetcher(“W7X_L53_LP7_I”,[20160302,26]) ff.fmt=’file:///data/databases/W7X/cache/archive-webapi.ipp-hgw.mpg.de/ArchiveDB/codac/W7X/CoDaStationDesc.{CDS}/DataModuleDesc.{DMD}_DATASTREAM/{ch}/Channel_{ch}/scaled/_signal.json?from={shot_f}&upto={shot_t}’ ff.params=’CDS=82,DMD=190,ch=2’ ff.do_fetch() ff.repair=1 # or 0,2
Would be better to have an example with non-trivial units
-
class
pyfusion.acquisition.W7X.fetch.
W7XDataFetcher
(acq, shot, config_name=None, **kwargs)[source]¶ Bases:
pyfusion.acquisition.base.BaseDataFetcher
Fetch the W7X data using urls
-
setup
()[source]¶ record some details of the forthcoming fetch so that the calling routine in base can give useful error messages The is info may not be available in full if the fetch fails. This was not the original purpose of setup, it was more general than this. (as part of a 3 step process: setup, do_fetch, pulldown
-
get_shot_info
Module¶
get_shot_list
Module¶
By extracting all progId, comments and dates, in ProjectDesc, create a table to connect shots, dates and times.
Would be nice to have scenId and segId, but the relationship is not 1:1 To find segment 1 in scenario 2, shot xx need to find the utc range of shot xx, find the scenarios in that utc, select 2, then find the segments within the UTC range of the scenario, and identify segId 1. Tricky.
This version reads both pickles and json versions of shotDA. Will probably make the transition to json only in the next version.
‘rb’ in load and dump works for both py2 and 3, but the files written by either can’t be read by the other. versions created in August are >1M due to the comments? # ‘rb’ causes a problem with winpy - maybe using protocol 2 will fix? # wrong ?? -> under proto 2, need ,encoding=’ascii’ in python3 if file written by python2 # See test code at end
-
pyfusion.acquisition.W7X.get_shot_list.
get_shotDA
(fname='/home/bdb112/pyfusion/working/pyfusion/pyfusion/acquisition/W7X/shotDA')[source]¶
mag_config
Module¶
Return configuration information as ratios or currents
puff_db
Module¶
a crude ‘database’ of off-the-books puffing - i.e. not in the data system