Skip to content

Commit

Permalink
signal model loaded log (#244)
Browse files Browse the repository at this point in the history
better signal model logging
  • Loading branch information
tab-cmd authored Sep 6, 2022
1 parent 24f6033 commit d584202
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions bcipy/helpers/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ def load_signal_model(model_class: SignalModel,
signal_model = model_class(**model_kwargs)
signal_model.load(filename)

log.info(f'Loaded signal model from {filename}')

return signal_model, filename


Expand Down
14 changes: 8 additions & 6 deletions bcipy/signal/model/offline_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ def offline_analysis(
buffer = int(parameters.get("task_buffer_length") / 2)
raw_data_file = f"{RAW_DATA_FILENAME}.csv"

log.info(f"Poststimulus: {poststim_length}s, Prestimulus: {prestim_length}s, Buffer: {buffer}s")

# get signal filtering information
downsample_rate = parameters.get("down_sampling_rate")
notch_filter = parameters.get("notch_filter_frequency")
Expand All @@ -103,6 +101,14 @@ def offline_analysis(
filter_order = parameters.get("filter_order")
static_offset = parameters.get("static_trigger_offset")

log.info(
f"\nData processing settings: \n"
f"Filter: [{filter_low}-{filter_high}], Order: {filter_order},"
f" Notch: {notch_filter}, Downsample: {downsample_rate} \n"
f"Poststimulus: {poststim_length}s, Prestimulus: {prestim_length}s, Buffer: {buffer}s \n"
f"Static offset: {static_offset}"
)

# Load raw data
raw_data = load_raw_data(Path(data_folder, raw_data_file))
channels = raw_data.channels
Expand All @@ -121,10 +127,6 @@ def offline_analysis(

log.info(f"Channels read from csv: {channels}")
log.info(f"Device type: {type_amp}, fs={sample_rate}")
log.info(
f"Data processing settings: Filter=[{filter_low}-{filter_high}], order=[{filter_order}], "
f"Notch=[{notch_filter}], Downsample=[{downsample_rate}]"
)

k_folds = parameters.get("k_folds")
model = PcaRdaKdeModel(k_folds=k_folds)
Expand Down

0 comments on commit d584202

Please sign in to comment.