Hi @kai2
At the moment, there isn't a super straightforward way of doing this. The way that I would do it via the python interface is to create a copy of the data of the channel you want to edit, and then adjust the data for the indices representing the selections in that group, and then set the channel data to the edited data. Something like this:
ts = data.timeSeries('Pb208')
sg = data.selectionGroup('G_NIST610')
d = ts.data()
for sel in sg.selections():
d_edit = ts.dataForSelection(sel)
d_edit *= 2 #Add your calculation here
d[ts.selectionIndices(sel)] = d_edit
data.emitDataChanged()
The line d[ts.selectionIndices(sel)] = d_edit
updates the data array of the channel that you extracted with d = ts.data()
but only between the start and end indices of the selection.
Please let me know if that doesn't do what you want it to 🙂
Kind regards,
Bence