amor-eos 3.3.0__tar.gz → 3.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {amor_eos-3.3.0 → amor_eos-3.3.1}/PKG-INFO +1 -1
- {amor_eos-3.3.0 → amor_eos-3.3.1}/amor_eos.egg-info/PKG-INFO +1 -1
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/__init__.py +1 -1
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/event_handling.py +16 -15
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/file_reader.py +1 -1
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/options.py +2 -2
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/reduction_e2h.py +1 -8
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/reduction_reflectivity.py +6 -6
- {amor_eos-3.3.0 → amor_eos-3.3.1}/LICENSE +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/README.rst +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/amor_eos.egg-info/SOURCES.txt +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/amor_eos.egg-info/dependency_links.txt +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/amor_eos.egg-info/entry_points.txt +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/amor_eos.egg-info/requires.txt +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/amor_eos.egg-info/top_level.txt +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/__main__.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/command_line.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/compat.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/const.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/e2h.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/event_analysis.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/event_data_types.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/header.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/helpers.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/helpers_fallback.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/helpers_numba.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/instrument.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/kafka_events.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/kafka_serializer.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/logconfig.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/ls.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/nicos.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/nicos_interface.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/normalization.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/path_handling.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/projection.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/eos/reduction_kafka.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/pyproject.toml +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/setup.cfg +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/tests/test_event_handling.py +0 -0
- {amor_eos-3.3.0 → amor_eos-3.3.1}/tests/test_full_analysis.py +0 -0
|
@@ -197,18 +197,19 @@ class ApplyMask(EventDataAction):
|
|
|
197
197
|
logging.info(f' number of events: total = {pre_filter:7d}, after filtering = {post_filter:7d}')
|
|
198
198
|
if d.device_logs == {} or not hasattr(dataset, 'update_info_from_logs'):
|
|
199
199
|
return
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
200
|
+
if 'wallTime' in d.events.dtype.names:
|
|
201
|
+
# filter pulses and logs to allow update of header information
|
|
202
|
+
from .helpers import add_log_to_pulses
|
|
203
|
+
times = np.unique(d.events.wallTime)
|
|
204
|
+
# make sure all log variables are associated with pulses
|
|
205
|
+
for key, log in d.device_logs.items():
|
|
206
|
+
if not key in d.pulses.dtype.names:
|
|
207
|
+
# interpolate the parameter values for all existing pulses
|
|
208
|
+
add_log_to_pulses(key, dataset)
|
|
209
|
+
# remove all pulses that have no more events
|
|
210
|
+
d.pulses = d.pulses[np.isin(d.pulses.time, times)]
|
|
211
|
+
for key, log in d.device_logs.items():
|
|
212
|
+
d.device_logs[key] = np.recarray(d.pulses.shape, dtype = log.dtype)
|
|
213
|
+
d.device_logs[key].time = d.pulses.time
|
|
214
|
+
d.device_logs[key].value = d.pulses[key]
|
|
215
|
+
dataset.update_info_from_logs()
|
|
@@ -63,7 +63,7 @@ class AmorHeader:
|
|
|
63
63
|
nu=('entry1/measurement_configuration/nu', float, 'nu'),
|
|
64
64
|
kap=('entry1/measurement_configuration/kappa', float, 'kappa'),
|
|
65
65
|
kad=('entry1/measurement_configuration/kappa_offset', float, 'kappa_offset'),
|
|
66
|
-
div=('entry1/measurement_configuration/
|
|
66
|
+
div=('entry1/measurement_configuration/divergence', float, 'div'),
|
|
67
67
|
virtual_source_horizontal=('entry1/Amor/virtual_source/horizontal', float),
|
|
68
68
|
virtual_source_vertical=('entry1/Amor/virtual_source/vertical', float),
|
|
69
69
|
ch1_trigger_phase=('entry1/Amor/chopper/ch1_trigger_phase', float, 'ch1_trigger_phase'),
|
|
@@ -433,8 +433,8 @@ class ReflectivityReductionConfig(ArgParsable):
|
|
|
433
433
|
metadata={
|
|
434
434
|
'group': 'input data',
|
|
435
435
|
'help': 'apply convolution on lambda axes to smooth the normalization data, useful for low statistics'})
|
|
436
|
-
scale: List[float] = field(
|
|
437
|
-
|
|
436
|
+
scale: Optional[List[float]] = field(
|
|
437
|
+
default=None,
|
|
438
438
|
metadata={
|
|
439
439
|
'short': 's',
|
|
440
440
|
'group': 'data manicure',
|
|
@@ -131,11 +131,7 @@ class E2HReduction:
|
|
|
131
131
|
# safe to image file if not auto-updating graph
|
|
132
132
|
plt.savefig(f'e2h_{self.config.reduction.plot}.png', dpi=300)
|
|
133
133
|
if self.config.reduction.kafka:
|
|
134
|
-
|
|
135
|
-
self.serializer = ESSSerializer()
|
|
136
|
-
self.fig.canvas.mpl_connect('close_event', self.serializer.end_command_thread)
|
|
137
|
-
self.serializer.start_command_thread()
|
|
138
|
-
self.serializer.send(self.projection)
|
|
134
|
+
raise RuntimeError("--kafka not implemented for events2histogram, use eos nicos script")
|
|
139
135
|
if self.config.reduction.update:
|
|
140
136
|
self.timer = self.fig.canvas.new_timer(1000)
|
|
141
137
|
self.timer.add_callback(self.update)
|
|
@@ -313,6 +309,3 @@ class E2HReduction:
|
|
|
313
309
|
self.projection.update_plot()
|
|
314
310
|
plt.suptitle(self.create_title())
|
|
315
311
|
plt.draw()
|
|
316
|
-
|
|
317
|
-
if self.config.reduction.kafka:
|
|
318
|
-
self.serializer.send(self.projection)
|
|
@@ -310,12 +310,12 @@ class ReflectivityReduction:
|
|
|
310
310
|
logging.info(f' {ti:<4d} {time:6.0f} {self.monitor:7.2f} {MONITOR_UNITS[self.config.experiment.monitorType]}')
|
|
311
311
|
|
|
312
312
|
proj: LZProjection = self.project_on_lz(slice)
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
313
|
+
if not self.config.reduction.is_default('scale'):
|
|
314
|
+
try:
|
|
315
|
+
scale = self.config.reduction.scale[i]
|
|
316
|
+
except IndexError:
|
|
317
|
+
scale = self.config.reduction.scale[-1]
|
|
318
|
+
proj.scale(scale)
|
|
319
319
|
|
|
320
320
|
# projection on qz-grid
|
|
321
321
|
result = proj.project_on_qz()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|