Skip to content

Commit e6523ea

Browse files
author
testbeam_rack
committed
BUG: fixed small bugs + added trigger number metric
1 parent 654db32 commit e6523ea

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

.eggs/README.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.
2+
3+
This directory caches those eggs to prevent repeated downloads.
4+
5+
However, it is safe to delete this directory.
6+

pymosa/constellation_pymosa/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
def main(args=None):
66
parser = SatelliteArgumentParser()
77
args = vars(parser.parse_args(args))
8-
setup_cli_logging(args.pop("log_level"))
8+
setup_cli_logging(args.pop("level"))
99
s = Pymosa(**args)
1010
s.run_satellite()
1111

pymosa/constellation_pymosa/pymosa_satellite.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from constellation.core.configuration import Configuration
22
from constellation.core.satellite import Satellite
33
import time
4-
from constellation.core.commandmanager import cscp_requestable
5-
from constellation.core.cscp import CSCPMessage
64
from constellation.core.cmdp import MetricsType
5+
from constellation.core.fsm import SatelliteState
6+
from constellation.core.monitoring import schedule_metric
77
import os
88
import yaml
99
import pymosa
@@ -12,7 +12,7 @@
1212
from pymosa.m26_raw_data import save_configuration_dict
1313
from time import sleep, strftime, time
1414
from tqdm import tqdm
15-
15+
from typing import Any
1616

1717
class Pymosa(Satellite):
1818
def __init__(self, *args, **kwargs):
@@ -117,5 +117,11 @@ def _pre_run(self):
117117
self.fh.setFormatter(logging.Formatter(FORMAT))
118118
self.logger = logging.getLogger()
119119
self.logger.addHandler(self.fh)
120+
self.telescope.dut['TLU']['TRIGGER_COUNTER'] = 0
120121

121-
122+
@schedule_metric("", MetricsType.LAST_VALUE, 1)
123+
def trigger_number(self) -> Any:
124+
if self.fsm.current_state_value == SatelliteState.RUN:
125+
return self.telescope.dut['TLU']['TRIGGER_COUNTER']
126+
else:
127+
return None

pymosa/m26.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ transfer_layer:
1212
- name : ETH
1313
type : SiTcp
1414
init:
15-
ip : "192.168.10.10"
15+
ip : "192.168.11.10"
1616
udp_port : 4660
1717
tcp_port : 24
1818
tcp_connection : True

pymosa/m26_configuration.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# *** hardware setup/configuration ***
22
run_number : # Base run number, will be automatically increased; if none is given, generate filename
3-
output_folder : # Output folder for the telescope data; if none is given, the current working directory is used
3+
output_folder: '/mnt/data/testbeam/2025-06_DESY/constellation/anemone' # Name of the subfolder which will be created in order to store the telescope data
44
m26_configuration_file : # Configuration file for Mimosa26 sensors, default: 'm26_config/m26_threshold_8.yaml'
55
m26_jtag_configuration : True # Send Mimosa26 configuration via JTAG, default: True
66
no_data_timeout : 30 # No data timeout after which the scan will be aborted, in seconds; if 0, the timeout is disabled
77
scan_timeout : 0 # Timeout after which the scan will be stopped, in seconds; if 0, the timeout is disabled; use Ctrl-C to stop run
8-
max_triggers : 0 # Maximum number of triggers; if 0, there is no limit on the number of triggers; use Ctrl-C to stop run
9-
send_data : 'tcp://127.0.0.1:8500' # TCP address to which the telescope data is send; to allow incoming connections on all interfaces use 0.0.0.0
10-
enabled_m26_channels : # Enabled RX channels, eg. ["M26_RX1", "M26_RX2", "M26_RX6"]; default None (=all planes)
11-
#output_folder: telescope_data # Name of the subfolder which will be created in order to store the telescope data
12-
#filename: run_1 # Filename of the telescope data file
8+
max_triggers : 10000000 # Maximum number of triggers; if 0, there is no limit on the number of triggers; use Ctrl-C to stop run
9+
send_data : 'tcp://127.0.0.1:9500' # TCP address to which the telescope data is send; to allow incoming connections on all interfaces use 0.0.0.0
10+
enabled_m26_channels : ["M26_RX1", "M26_RX2", "M26_RX3", "M26_RX4", "M26_RX6"] # Enabled RX channels, eg. ["M26_RX1", "M26_RX2", "M26_RX6"]; default None (=all planes)
11+
# filename: m26 # Filename of the telescope data file
1312

1413
# *** trigger configuration ***
1514
TLU :

0 commit comments

Comments
 (0)