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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pycbc live] Allowing the use of psd variation in the ranking statistic for pycbc live #4533
[pycbc live] Allowing the use of psd variation in the ranking statistic for pycbc live #4533
Changes from 10 commits
1ab6879
5bec56e
7e696c6
de73440
3a2ffe0
cceb6e6
ceaa0d0
6be1307
1e370c9
5764623
37781d9
d1d7877
0e6473a
a8900e8
8ba940b
ed2dec9
ac432db
0c45583
49213b4
d729357
571c0f6
880f091
e48b611
8329ac7
14cb7d6
29a866e
073e639
b1a2948
68d9d0f
2a89928
7ed15a2
97c8a3f
9fd1218
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, I am not sure why the 'epoch' given here is correct. Why does this look significantly different from the offline code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From looking at the offline code, it is generating PSD var values for the whole 512 seconds of data and so it is logical to start from strain.start_time when defining the new timeseries.
In the live code we only want to find PSD var values for the newest increment of strain data so taking the end time of the data and subtracting the increment and the extra data from trimming is how I found the epoch of the psd var timeseries.
Example:
start_time = 0
end_time = 512
increment = 8
data_trim = 2
We take the latest data from 504 - 512, pad the start by 6 seconds and trim 2s from both sides. We calculate the mean square and average each second so we have 10 data points to put into our timeseries and we need to line the epoch up which is: end_time - increment - 2*data_trim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so the calculation is done starting with data from 498 through 512, 2s are lost for filter artefacts giving 500 through 510, then the epoch is 1 'trim segment' later than the start of the original data, i.e. 2 rather than 3 'trims' plus the analysis stride ('increment').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The epoch is 1 trim segment later than the start of the slice of the data we are using to calculate PSD variation, not the start of the original data because that varies depending on how much data PyCBC Live has in the buffer right now.
I could change the epoch to be
epoch=astrain.start_time + data_trim
if you would prefer? The change mainly being from strain -> astrain where astrain is the sliced strain data.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I resolved the conversation as I didn't think there was a problem in the end. But maybe it would be good to add a short comment to explain the time accounting, eg
The original data segment started at the strain end time - 'increment' - 3 * 'data_trim', the variation time series starts 1 * data_trim later