Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • SCS/ToolBox
  • kluyvert/ToolBox
2 results
Show changes
...@@ -10,6 +10,10 @@ import logging ...@@ -10,6 +10,10 @@ import logging
from .constants import mnemonics as _mnemonics from .constants import mnemonics as _mnemonics
__all__ = [
'mnemonics_for_run'
]
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -83,7 +87,7 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None): ...@@ -83,7 +87,7 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None):
merge_with: xarray Dataset merge_with: xarray Dataset
Dataset that may contain non-processed arrays Dataset that may contain non-processed arrays
detector: str detector: str
One in {'ADQ412', 'FastADC', 'XGM', 'BAM'} One in {'ADQ412', 'FastADC', 'XGM', 'BAM', 'PES'}
func: function func: function
function that takes one argument, an unprocessed mnemonic string, function that takes one argument, an unprocessed mnemonic string,
and converts it into a processed one, i.e. from 'MCP2apd' to and converts it into a processed one, i.e. from 'MCP2apd' to
...@@ -110,7 +114,8 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None): ...@@ -110,7 +114,8 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None):
default_mnemo = 'SCS_SA3' default_mnemo = 'SCS_SA3'
default_processed = 'SCS_SA3' default_processed = 'SCS_SA3'
if detector == 'ADQ412': if detector == 'ADQ412':
det_mnemos = [m for m in _mnemonics if 'MCP' in m] det_mnemos = [m for m in _mnemonics if 'MCP' in m and
'XTD10_' not in m]
default_mnemo = 'MCP2apd' default_mnemo = 'MCP2apd'
default_processed = 'MCP2peaks' default_processed = 'MCP2peaks'
if detector == 'FastADC': if detector == 'FastADC':
......
...@@ -14,6 +14,11 @@ import matplotlib.gridspec as gridspec ...@@ -14,6 +14,11 @@ import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import re import re
__all__ = [
'xas',
'xasxmcd',
]
def absorption(T, Io, fluorescence=False): def absorption(T, Io, fluorescence=False):
""" Compute the absorption A = -ln(T/Io) (or A = T/Io """ Compute the absorption A = -ln(T/Io) (or A = T/Io
......
from .XAS import ( from .XAS import *
xas, xasxmcd)
from .knife_edge import knife_edge # Module name is the same as a child function, we use alias to avoid conflict
import toolbox_scs.routines.knife_edge as knife_edge_module
from .knife_edge import *
__all__ = ( __all__ = (
# Functions knife_edge_module.__all__
"xas", + XAS.__all__
"xasxmcd",
"knife_edge"
) )
# -----------------------------------------------------------------------------
# Clean namespace
# -> certain filenames we dont need in the namespace. Especially not those
# that are marked as private by using an underscore (_<filename>.py).
# -----------------------------------------------------------------------------
clean_ns = [
# filenames
'XAS',
]
for name in dir():
if name in clean_ns:
del globals()[name]
del globals()['clean_ns']
del globals()['name']
...@@ -11,6 +11,10 @@ from scipy.special import erfc ...@@ -11,6 +11,10 @@ from scipy.special import erfc
from scipy.optimize import curve_fit from scipy.optimize import curve_fit
import bisect import bisect
__all__ = [
'knife_edge'
]
def knife_edge(ds, axisKey='scannerX', def knife_edge(ds, axisKey='scannerX',
signalKey='FastADC4peaks', signalKey='FastADC4peaks',
......