Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies:
- pip:
- zeo
- zodb
- persistent<6.2
- mechanize
- browser-cookie3
- pyqtgraph
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies = [
"iminuit",
"matplotlib",
"pandas",
"persistent<6.2",
"scipy",
"zodb",
"zeo",
Expand Down
4 changes: 3 additions & 1 deletion src/nectarchain/dqm/bokeh_app/tests/test_app_hooks.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import numpy as np
from bokeh.io import output_file, save

# bokeh imports
from bokeh.io import output_file, save
from bokeh.layouts import layout
from bokeh.models import Select
from bokeh.plotting import curdoc

# ctapipe imports
from ctapipe.coordinates import EngineeringCameraFrame
from ctapipe.instrument import CameraGeometry
from ZODB import DB
Expand Down
48 changes: 23 additions & 25 deletions src/nectarchain/makers/component/pedestal_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,31 +496,6 @@ def finish(self, *args, **kwargs):
self._waveformsContainers = waveformsContainers.containers[
EventType.SKY_PEDESTAL
]
# log.info('JPL: waveformsContainers=',waveformsContainers.containers[
# EventType.SKY_PEDESTAL].nsamples)

# If we want to filter based on charges distribution
# make sure that the charge distribution container is filled
if (
self.filter_method == "ChargeDistributionFilter"
and self._chargesContainers is None
):
log.debug("Compute charges from waveforms")
chargesComponent_kwargs = {}
chargesComponent_configurable_traits = (
ComponentUtils.get_configurable_traits(ChargesComponent)
)
for key in kwargs.keys():
if key in chargesComponent_configurable_traits.keys():
chargesComponent_kwargs[key] = kwargs[key]
self._chargesContainers = ChargesComponent.create_from_waveforms(
waveformsContainer=self._waveformsContainers,
subarray=self.subarray,
config=self.config,
parent=self.parent,
*args,
**chargesComponent_kwargs,
)

# Check if waveforms container is empty
if self._waveformsContainers is None:
Expand All @@ -535,6 +510,29 @@ def finish(self, *args, **kwargs):
# container with no results
return None
else:
# If we want to filter based on charges distribution
# make sure that the charge distribution container is filled
if (
self.filter_method == "ChargeDistributionFilter"
and self._chargesContainers is None
):
log.debug("Compute charges from waveforms")
chargesComponent_kwargs = {}
chargesComponent_configurable_traits = (
ComponentUtils.get_configurable_traits(ChargesComponent)
)
for key in kwargs.keys():
if key in chargesComponent_configurable_traits.keys():
chargesComponent_kwargs[key] = kwargs[key]
self._chargesContainers = ChargesComponent.create_from_waveforms(
waveformsContainer=self._waveformsContainers,
subarray=self.subarray,
config=self.config,
parent=self.parent,
*args,
**chargesComponent_kwargs,
)

# Build mask to filter the waveforms
# Mask based on the high gain channel that is most sensitive to signals
# Initialize empty mask
Expand Down