renamed: --skip_frames_rate -> --skip_frames, etc.
This commit is contained in:
@@ -44,7 +44,7 @@ python dap/worker.py --help
|
|||||||
usage: worker.py [-h] --backend_host BACKEND_HOST --backend_port BACKEND_PORT
|
usage: worker.py [-h] --backend_host BACKEND_HOST --backend_port BACKEND_PORT
|
||||||
[--accumulator_host ACCUMULATOR_HOST] [--accumulator_port ACCUMULATOR_PORT]
|
[--accumulator_host ACCUMULATOR_HOST] [--accumulator_port ACCUMULATOR_PORT]
|
||||||
[--visualisation_host VISUALISATION_HOST] [--visualisation_port VISUALISATION_PORT]
|
[--visualisation_host VISUALISATION_HOST] [--visualisation_port VISUALISATION_PORT]
|
||||||
[--config_file CONFIG_FILE] [--skip_frames_rate SKIP_FRAMES_RATE]
|
[--config_file CONFIG_FILE] [--skip_frames SKIP_FRAMES]
|
||||||
|
|
||||||
options:
|
options:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
@@ -56,8 +56,8 @@ options:
|
|||||||
--visualisation_port VISUALISATION_PORT
|
--visualisation_port VISUALISATION_PORT
|
||||||
--config_file CONFIG_FILE
|
--config_file CONFIG_FILE
|
||||||
json file with configuration parameters
|
json file with configuration parameters
|
||||||
--skip_frames_rate SKIP_FRAMES_RATE
|
--skip_frames SKIP_FRAMES
|
||||||
skip (approximately) skip_frames_rate % of pulses
|
skip (approximately) skip_frames % of pulses
|
||||||
```
|
```
|
||||||
|
|
||||||
The number of required workers varies based on detector size and algorithm complexity.
|
The number of required workers varies based on detector size and algorithm complexity.
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ def main():
|
|||||||
parser.add_argument("--visualisation_host", default="localhost")
|
parser.add_argument("--visualisation_host", default="localhost")
|
||||||
parser.add_argument("--visualisation_port", type=int, default=12000)
|
parser.add_argument("--visualisation_port", type=int, default=12000)
|
||||||
parser.add_argument("--config_file", default=None, help="json file with configuration parameters")
|
parser.add_argument("--config_file", default=None, help="json file with configuration parameters")
|
||||||
parser.add_argument("--skip_frames_rate", type=int, default=1, help="skip (approximately) skip_frames_rate %% of pulses")
|
parser.add_argument("--skip_frames", type=int, default=1, help="skip (approximately) skip_frames %% of pulses")
|
||||||
|
|
||||||
clargs = parser.parse_args()
|
clargs = parser.parse_args()
|
||||||
|
|
||||||
@@ -34,12 +34,12 @@ def main():
|
|||||||
accumulator_addr,
|
accumulator_addr,
|
||||||
visualisation_addr,
|
visualisation_addr,
|
||||||
clargs.config_file,
|
clargs.config_file,
|
||||||
clargs.skip_frames_rate
|
clargs.skip_frames
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def work(backend_addr, accumulator_addr, visualisation_addr, fn_config, skip_frames_rate):
|
def work(backend_addr, accumulator_addr, visualisation_addr, fn_config, skip_frames):
|
||||||
config_file = BufferedJSON(fn_config)
|
config_file = BufferedJSON(fn_config)
|
||||||
|
|
||||||
jfdata = JFData()
|
jfdata = JFData()
|
||||||
@@ -146,7 +146,7 @@ def work(backend_addr, accumulator_addr, visualisation_addr, fn_config, skip_fra
|
|||||||
|
|
||||||
# hits are sent at full rate, but no-hits are sent at reduced frequency
|
# hits are sent at full rate, but no-hits are sent at reduced frequency
|
||||||
is_no_hit_frame = (not results["is_hit_frame"])
|
is_no_hit_frame = (not results["is_hit_frame"])
|
||||||
random_skip = randskip(skip_frames_rate)
|
random_skip = randskip(skip_frames)
|
||||||
is_no_hit_frame_and_skipped = (is_no_hit_frame and random_skip)
|
is_no_hit_frame_and_skipped = (is_no_hit_frame and random_skip)
|
||||||
|
|
||||||
if aggregation_is_enabled_but_not_ready or is_bad_frame or is_no_hit_frame_and_skipped:
|
if aggregation_is_enabled_but_not_ready or is_bad_frame or is_no_hit_frame_and_skipped:
|
||||||
|
|||||||
Reference in New Issue
Block a user