Skip to content

Commit

Permalink
now using the latest wisdom from Adam with SLICE method and also corr…
Browse files Browse the repository at this point in the history
…ected the EXPR instructions. Now it comes cleaner AND i also included the error bars on NE and TE
  • Loading branch information
rui-coelho committed Oct 18, 2024
1 parent 8173334 commit 8e7104d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 124 deletions.
81 changes: 1 addition & 80 deletions mappings/thomson_scattering/globals.json
Original file line number Diff line number Diff line change
@@ -1,84 +1,5 @@
{
"Comment": "Add any variables in here that are needed by your mappings",
"Templating": "These can be used for substitution in the signal names",
"Hello": "World",
ACHTUNG: Strictly speaking we MUST NOT hardcode the number of channels since it varied throughout JET history !!! But there is no PPF signal to store the channel number !!!
"CH_NAMES": [
"CH1",
"CH2",
"CH3",
"CH4",
"CH5",
"CH6",
"CH7",
"CH8",
"CH9",
"CH10",
"CH11",
"CH12",
"CH13",
"CH14",
"CH15",
"CH16",
"CH17",
"CH18",
"CH19",
"CH20",
"CH21",
"CH22",
"CH23",
"CH24",
"CH25",
"CH26",
"CH27",
"CH28",
"CH29",
"CH30",
"CH31",
"CH32",
"CH33",
"CH34",
"CH35",
"CH36",
"CH37",
"CH38",
"CH39",
"CH40",
"CH41",
"CH42",
"CH43",
"CH44",
"CH45",
"CH46",
"CH47",
"CH48",
"CH49",
"CH50",
"CH51",
"CH52",
"CH53",
"CH54",
"CH55",
"CH56",
"CH57",
"CH58",
"CH59",
"CH60",
"CH61",
"CH62",
"CH63",
"CH64",
"CH65",
"CH66",
"CH67",
"CH68",
"CH69",
"CH70",
"CH71",
"CH72",
"CH73",
"CH74",
"CH75",
"CH76"
]
"Hello": "World"
}
97 changes: 53 additions & 44 deletions mappings/thomson_scattering/mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,94 +26,103 @@
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/TE\",{{ SHOT }}); _sig = dim_of(_aux,0)"
"signal": "%TDI%_aux=jet(\"PPF/HRTS/NE\",{{ SHOT }}); _sig = dim_of(_aux,0)"
},
"COMMENT": "The final syntax of this string may change"
},
"_z": {
"_time": {
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/Z\",{{ SHOT }}); _sig = value_of(_aux)"
},
"COMMENT": "The final syntax of this string may change"
},
"_t_e": {
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/TE\",{{ SHOT }}); _sig = value_of(_aux)"
},
"COMMENT": "The final syntax of this string may change"
},
"_n_e": {
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/NE\",{{ SHOT }}); _sig = value_of(_aux)"
"signal": "%TDI%_aux=jet(\"PPF/HRTS/NE\",{{ SHOT }}); _sig = dim_of(_aux,1)"
},
"COMMENT": "The final syntax of this string may change"
},
"time": {
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/NE\",{{ SHOT }}); _sig = dim_of(_aux,1)"
"MAP_TYPE": "EXPR",
"PARAMETERS": {
"X": "_time"
},
"COMMENT": "The final syntax of this string may change"
"EXPR":"X",
"COMMENT": "get the signal from the already downloaded _time"
},
"channel": {
"MAP_TYPE": "DIMENSION",
"DIM_PROBE": "_r"
},
"channel[#]/name": {
"MAP_TYPE": "VALUE",
"VALUE": "{{ at(CH_NAMES, indices.0) }}",
"COMMENT": "The array defined in globals is oversized since i have no clue what is the total number of channels for each shot before reading the PPF. If only i had a dynamical string array generator..."
"VALUE": "CH{{ indices.0 +1 }}",
"COMMENT": "Just name the channels CH1,2,3...on the fly"
},
"channel[#]/position/r": {
"MAP_TYPE": "EXPR",
"PARAMETERS": {
"X": "_r[#]"
"X": "_r"
},
"EXPR":"X"
"EXPR":"X[{{ indices.0 }}]",
"COMMENT": "get the signal from the already downloaded _r"
},
"channel[#]/position/z": {
"MAP_TYPE": "EXPR",
"PARAMETERS": {
"X": "_z[#]"
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/Z\",{{ SHOT }}); _sig = value_of(_aux)"
},
"EXPR":"X"
"SLICE": [{{ indices.0 }}],
"COMMENT": "The final syntax of this string may change"
},
"channel[#]/position/phi": {
"MAP_TYPE": "VALUE",
"VALUE": 0
},
"channel[#]/t_e/data": {
"MAP_TYPE": "EXPR",
"PARAMETERS": {
"X": "_t_e[#]"
"channel[#]/t_e/data": {
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/TE\",{{ SHOT }}); _sig = value_of(_aux)"
},
"EXPR":"X"
"SLICE": [{{ indices.0 }},:],
"COMMENT": "The final syntax of this string may change"
},
"channel[#]/t_e/data_error_upper": {
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/DTE\",{{ SHOT }}); _sig = value_of(_aux)"
},
"SLICE": [{{ indices.0 }},:],
"COMMENT": "The final syntax of this string may change"
},
"channel[#]/t_e/time": {
"MAP_TYPE": "EXPR",
"PARAMETERS": {
"X": "time"
"X": "_time"
},
"EXPR":"X"
},
"channel[#]/n_e/data": {
"MAP_TYPE": "EXPR",
"PARAMETERS": {
"X": "_n_e[#]"
"channel[#]/n_e/data": {
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/NE\",{{ SHOT }}); _sig = value_of(_aux)"
},
"EXPR":"X"
"SLICE": [{{ indices.0 }},:],
"COMMENT": "The final syntax of this string may change"
},
"channel[#]/n_e/data_error_upper": {
"MAP_TYPE": "PLUGIN",
"PLUGIN": "MDSPLUS",
"ARGS": {
"signal": "%TDI%_aux=jet(\"PPF/HRTS/DNE\",{{ SHOT }}); _sig = value_of(_aux)"
},
"SLICE": [{{ indices.0 }},:],
"COMMENT": "The final syntax of this string may change"
},
"channel[#]/n_e/time": {
"MAP_TYPE": "EXPR",
"PARAMETERS": {
"X": "time"
"X": "_time"
},
"EXPR":"X"
}
Expand Down

0 comments on commit 8e7104d

Please sign in to comment.