-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding CI tests for all DQM modules - initial + cleaning code
- Loading branch information
Showing
17 changed files
with
256 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from ctapipe.io import EventSource | ||
from ctapipe_io_nectarcam.constants import HIGH_GAIN | ||
from traitlets.config import Config | ||
|
||
from nectarchain.dqm.camera_monitoring import CameraMonitoring | ||
|
||
|
||
class TestCameraMonitoring: | ||
run_number = 3798 | ||
max_events = 1 | ||
|
||
def test_camera_monitoring(self): | ||
path1 = "/Users/hashkar/Desktop/ashkar_nectar/" | ||
path2 = "data/runs/NectarCAM.Run3798.0000.fits.fz" | ||
path = path1 + path2 | ||
|
||
config = None | ||
|
||
config = Config( | ||
dict( | ||
NectarCAMEventSource=dict( | ||
NectarCAMR0Corrections=dict( | ||
calibration_path=None, | ||
apply_flatfield=False, | ||
select_gain=False, | ||
) | ||
) | ||
) | ||
) | ||
print(path) | ||
|
||
reader1 = EventSource(input_url=path, config=config, max_events=1) | ||
|
||
Pix, Samp = CameraMonitoring(HIGH_GAIN).DefineForRun(reader1) | ||
print(Pix, Samp) | ||
# self.assertEqual(Pix + Samp, 1915) | ||
assert Pix + Samp == 1915 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from ctapipe.io import EventSource | ||
from ctapipe_io_nectarcam.constants import HIGH_GAIN | ||
from traitlets.config import Config | ||
|
||
from nectarchain.dqm.charge_integration import ChargeIntegrationHighLowGain | ||
|
||
|
||
class TestChargeIntegrationHighLowGain: | ||
run_number = 3798 | ||
max_events = 1 | ||
|
||
def test_charge_integration(self): | ||
path1 = "/Users/hashkar/Desktop/ashkar_nectar/" | ||
path2 = "data/runs/NectarCAM.Run3798.0000.fits.fz" | ||
path = path1 + path2 | ||
|
||
config = None | ||
|
||
config = Config( | ||
dict( | ||
NectarCAMEventSource=dict( | ||
NectarCAMR0Corrections=dict( | ||
calibration_path=None, | ||
apply_flatfield=False, | ||
select_gain=False, | ||
) | ||
) | ||
) | ||
) | ||
print(path) | ||
|
||
reader1 = EventSource(input_url=path, config=config, max_events=1) | ||
|
||
Pix, Samp = ChargeIntegrationHighLowGain(HIGH_GAIN).DefineForRun(reader1) | ||
print(Pix, Samp) | ||
# self.assertEqual(Pix + Samp, 1915) | ||
assert Pix + Samp == 1915 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from ctapipe.io import EventSource | ||
from ctapipe_io_nectarcam.constants import HIGH_GAIN | ||
from traitlets.config import Config | ||
|
||
from nectarchain.dqm.mean_camera_display import MeanCameraDisplayHighLowGain | ||
|
||
|
||
class TestMeanCameraDisplayHighLowGain: | ||
run_number = 3798 | ||
max_events = 1 | ||
|
||
def test_mean_camera_display(self): | ||
path1 = "/Users/hashkar/Desktop/ashkar_nectar/" | ||
path2 = "data/runs/NectarCAM.Run3798.0000.fits.fz" | ||
path = path1 + path2 | ||
|
||
config = None | ||
|
||
config = Config( | ||
dict( | ||
NectarCAMEventSource=dict( | ||
NectarCAMR0Corrections=dict( | ||
calibration_path=None, | ||
apply_flatfield=False, | ||
select_gain=False, | ||
) | ||
) | ||
) | ||
) | ||
print(path) | ||
|
||
reader1 = EventSource(input_url=path, config=config, max_events=1) | ||
|
||
Pix, Samp = MeanCameraDisplayHighLowGain(HIGH_GAIN).DefineForRun(reader1) | ||
print(Pix, Samp) | ||
# self.assertEqual(Pix + Samp, 1915) | ||
assert Pix + Samp == 1915 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from ctapipe.io import EventSource | ||
from ctapipe_io_nectarcam.constants import HIGH_GAIN | ||
from traitlets.config import Config | ||
|
||
from nectarchain.dqm.mean_waveforms import MeanWaveFormsHighLowGain | ||
|
||
|
||
class TestMeanWaveForms: | ||
run_number = 3798 | ||
max_events = 1 | ||
|
||
def test_mean_waveforms(self): | ||
path1 = "/Users/hashkar/Desktop/ashkar_nectar/" | ||
path2 = "data/runs/NectarCAM.Run3798.0000.fits.fz" | ||
path = path1 + path2 | ||
|
||
config = None | ||
|
||
config = Config( | ||
dict( | ||
NectarCAMEventSource=dict( | ||
NectarCAMR0Corrections=dict( | ||
calibration_path=None, | ||
apply_flatfield=False, | ||
select_gain=False, | ||
) | ||
) | ||
) | ||
) | ||
print(path) | ||
|
||
reader1 = EventSource(input_url=path, config=config, max_events=1) | ||
|
||
Pix, Samp = MeanWaveFormsHighLowGain(HIGH_GAIN).DefineForRun(reader1) | ||
print(Pix, Samp) | ||
# self.assertEqual(Pix + Samp, 1915) | ||
assert Pix + Samp == 1915 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.