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
4 changes: 2 additions & 2 deletions pv_configs/sample_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ CONSUMER_MODE = 'continuous' # options: continuous or vectorized, describes how
CACHING_MODE = 'alignment' # options: '', 'alignment', 'scan', or 'bin' describes whether the caching should be done the entire time, when a flag is seen, or if it should be put into bins based on number of frames

[CACHE_OPTIONS.ALIGNMENT]
MAX_CACHE_SIZE = 1000
MAX_CACHE_SIZE = 1

[CACHE_OPTIONS.SCAN]
# FLAG PV MUST BE IN METADATA SECTION
START_SCAN = true
STOP_SCAN = false
THRESHOLD = 0.05 # use if start and stop values are not binary/boolean
MAX_CACHE_SIZE = 1000
MAX_CACHE_SIZE = 1

[CACHE_OPTIONS.BIN]
COUNT = 10
Expand Down
6 changes: 4 additions & 2 deletions src/dashpva/scripts/seed_profile_defaults_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@
"CONSUMER_MODE": "continuous",
"CACHE_OPTIONS": {
"CACHING_MODE": "alignment",
"ALIGNMENT": {"MAX_CACHE_SIZE": 1000},
# Frames kept in viewer RAM for Save HDF5 / Post-scan. One large-detector
# frame with Q is ~0.4 GB, so raise this only where it is needed.
"ALIGNMENT": {"MAX_CACHE_SIZE": 1},
"SCAN": {
"START_SCAN": True,
"STOP_SCAN": False,
"THRESHOLD": 0.05,
"MAX_CACHE_SIZE": 1000,
"MAX_CACHE_SIZE": 1,
},
"BIN": {"COUNT": 10, "SIZE": 16},
},
Expand Down
4 changes: 2 additions & 2 deletions src/dashpva/utils/pva_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ def set_cache_options(self) -> None:
if self.CACHING_MODE:
self.caches_needed = True
if self.CACHING_MODE == 'alignment':
self.MAX_CACHE_SIZE = app_settings.ALIGNMENT_MAX_CACHE_SIZE or 100
self.MAX_CACHE_SIZE = app_settings.ALIGNMENT_MAX_CACHE_SIZE or 1
elif self.CACHING_MODE == 'scan':
self.FLAG_PV = app_settings.SCAN_FLAG_PV or ''
self.START_SCAN = app_settings.SCAN_START_SCAN if app_settings.SCAN_START_SCAN is not None else True
self.STOP_SCAN = app_settings.SCAN_STOP_SCAN if app_settings.SCAN_STOP_SCAN is not None else False
self.MAX_CACHE_SIZE = app_settings.SCAN_MAX_CACHE_SIZE or 100
self.MAX_CACHE_SIZE = app_settings.SCAN_MAX_CACHE_SIZE or 1
elif self.CACHING_MODE == 'bin':
self.BIN_COUNT = app_settings.BIN_COUNT or 10
self.BIN_SIZE = app_settings.BIN_SIZE or 16
Expand Down