Repository navigation
ENH: Draw the synthetic baselines at random, following Ning et al. - #27
Merged
Merged
Conversation
The generator now draws the two baselines of Ning et al. (2014, §5.1): a polynomial plus a sinusoid, and low-pass filtered white noise. Both are defined over the whole record. Erb's parabola, exponential and step come with --legacy-baselines. Signals have a sample index and no units. Peaks: 1 to 30 per signal (0 to 30 with the plate model), kept where they are drawn or dropped, with a 20-sample margin at both ends, a resolution of at least 1 unless they may overlap (10%), and at most 33% of the record covered. Widths are drawn in samples, or follow the plate model with --plate-model, which brings the dead time and the injection artifact. Heights are log-uniform in a range set by the baseline. The noise is 30, 25 or 20 dB of baseline energy over noise energy. --length, --n-peaks, --overlap-prob, --plate-model and --legacy-baselines are new; --rate, --height-median and --height-log-sigma are gone, and so is the rounding to a detector step. Names are SYN__peaks__model__type__noise__length__replicate; synth_diag still reads the older ones. synth_figs labels its axes without units, and qo_all sorts by the error over the noise. Earlier sets can no longer be regenerated. See #25.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #25.
The baselines of the synthetic signals were three fixed curves, and the generator worked in minutes and mV. The baselines are now drawn at random, and the signals have a sample index and no units.
--legacy-baselines.--lengthand--n-peaksset these two.--plate-model, they follow the plate model, which also brings the dead time and the injection artifact.--overlap-prob).SYN__peaks__model__type__noise__length__replicate.synth_diag.pystill reads the earlier names.synth_figs.pylabels its axes without units, andqo_all.pysorts by the error over the noise.synthetic_data.mddescribes the new generator.--rate,--height-medianand--height-log-sigmaare gone, and so is the rounding to a detector step. The earlier datasets can no longer be regenerated.Peak detection in the package still uses widths in samples per minute and heights in mV (#23), so its result on these signals depends on the units they are read in.
References
Type of Pull Request
Pull Request Checklist
if applicable.
if applicable.
ruff check .passes, if applicable.