gafusion / omas

Ordered Multidimensional Array Structure
http://gafusion.github.io/omas
MIT License
30 stars 14 forks source link

Loading pressure from Thompson scattering and CHERS on NSTX #208

Closed odstrcilt closed 1 year ago

odstrcilt commented 1 year ago

Is it possible to load pressure from TS and CHERS on NSTX? I have check the file /omas/machine_mappings/nstxu.py and it is all about magnetics

smithsp commented 1 year ago

No Thomson or CHERS seen in https://github.com/gafusion/omas/blob/master/omas/machine_mappings/nstxu.py .

smithsp commented 1 year ago

Fetching scripts for Thomson already exist in EFITtime and OMFITprofiles in OMFIT. @odstrcilt and @avdeevag to post links to them here. @jmcclena to try to port.

odstrcilt commented 1 year ago

@jmcclena here is what needs to be loaded for Te and ne from MDS+ on NSTX


        TS_MDS = '\\ACTIVESPEC::TOP.MPTS.OUTPUT_DATA.BEST.'
        ne = OMFITmdsValue(server='NSTX', treename='ACTIVESPEC', shot=shot, TDI=TS_MDS + 'FIT_NE').data()
        ne_err = OMFITmdsValue(server='NSTX', treename='ACTIVESPEC', shot=shot, TDI=TS_MDS + 'FIT_NE_ERR').data()
        te = OMFITmdsValue(server='NSTX', treename='ACTIVESPEC', shot=shot, TDI=TS_MDS + 'FIT_TE').data() * 1e3  # eV
        te_err = OMFITmdsValue(server='NSTX', treename='ACTIVESPEC', shot=shot, TDI=TS_MDS + 'FIT_TE_ERR').data() * 1e3  # eV
        R = OMFITmdsValue(server='NSTX', treename='ACTIVESPEC', shot=shot, TDI=TS_MDS + 'FIT_RADII').data() * 1e-2  # m
        time = OMFITmdsValue(server='NSTX', treename='ACTIVESPEC', shot=shot, TDI=TS_MDS + 'TS_TIMES').data() * 1e3  # ms

or the pressure can be loaded directly as

        pe = OMFITmdsValue(server='NSTX', treename='ACTIVESPEC', shot=shot, TDI=TS_MDS + 'FIT_PE').data()
        pe_err = OMFITmdsValue(server='NSTX', treename='ACTIVESPEC', shot=shot, TDI=TS_MDS + 'FIT_PE_ERR').data()
smithsp commented 1 year ago

There was some confusion about the use of FIT_, but it seems that these are the raw data points that we have been fetching in OMFITprofiles since fetching of TS was implemented 7 years ago by @orso82 https://github.com/gafusion/OMFIT-source/blame/622173f49daef1353328bc9718ba94d769be864b/modules/OMFITprofiles/SCRIPTS/NSTX/FETCH/raw_TS.py

avdeevag commented 1 year ago

Apparently spline fitting in NSTX MDS+ tree has a SPLINE in nodename

Screen Shot 2022-09-06 at 3 00 53 PM
smithsp commented 1 year ago

Thanks for finding that @avdeevag .

github-actions[bot] commented 1 year ago

Stale issue message