Skip to content
Snippets Groups Projects

Dssc1module

Merged Loïc Le Guyader requested to merge DSSC1module into master
1 file
+ 13
1
Compare changes
  • Side-by-side
  • Inline
+ 13
1
@@ -135,10 +135,22 @@ def xas(nrun, bins=None, Iokey='SCS_SA3', Itkey='MCP3apd', nrjkey='nrj', Iooffse
def whichIo(data):
""" Select which fields to use as I0 and which to use as I1
"""
if 'mcp' in Iokey.lower():
Io_sign = -1
else:
Io_sign = 1
if 'mcp' in Itkey.lower():
It_sign = -1
else:
It_sign = 1
if len(data) == 0:
return absorption([], [])
else:
return absorption(-data['It'], data['Io'])
return absorption(It_sign*data['It'], Io_sign*data['Io'])
if bins is None:
num_bins = 80
Loading