Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
bayeswave
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marcella Wijngaarden
bayeswave
Commits
208b8da3
Commit
208b8da3
authored
Mar 17, 2020
by
Tyson Littenberg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'MDC_timeslides' into 'master'
Mdc timeslides See merge request
lscsoft/bayeswave!157
parents
993a4236
044db518
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
src/BayesWave.h
src/BayesWave.h
+3
-1
src/BayesWaveIO.c
src/BayesWaveIO.c
+28
-1
No files found.
src/BayesWave.h
View file @
208b8da3
/*
* Copyright (C) 2018 Neil J. Cornish, Tyson B. Littenberg
* Copyright (C) 2018 Neil J. Cornish, Tyson B. Littenberg
, Margaret Millhouse
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -387,6 +387,8 @@ struct Data
char
**
ifos
;
char
**
PolArray
;
char
PolModes
[
10
];
double
mdc_shift
;
// time shift for MDCs
ProcessParamsTable
*
commandLine
;
LALDetector
**
detector
;
...
...
src/BayesWaveIO.c
View file @
208b8da3
...
...
@@ -134,6 +134,8 @@ void InjectFromMDC(ProcessParamsTable *commandLine, LALInferenceIFOData *IFOdata
REAL8
net_snr
=
0
.
0
;
while
(
data
)
{
nIFO
++
;
data
=
data
->
next
;}
UINT4
Nmdc
=
0
,
Nchannel
=
0
;
double
mdc_shift
=
0
.
0
;
ppt
=
LALInferenceGetProcParamVal
(
commandLine
,
"--MDC-cache"
);
if
(
!
ppt
){
...
...
@@ -188,6 +190,24 @@ void InjectFromMDC(ProcessParamsTable *commandLine, LALInferenceIFOData *IFOdata
}
}
// For shifting MDC time slides to a new time
ppt
=
LALInferenceGetProcParamVal
(
commandLine
,
"--MDC-timeslide"
);
if
(
ppt
)
{
mdc_shift
=
atof
(
ppt
->
value
);
}
else
{
mdc_shift
=
0
.
0
;
}
printf
(
"Shifting MDC by %f seconds.
\n
"
,
mdc_shift
);
// Read in trigtime for MDC shifting
ppt
=
LALInferenceGetProcParamVal
(
commandLine
,
"--trigtime"
);
double
mdc_trigtime
=
atof
(
ppt
->
value
);
mdc_trigtime
=
mdc_trigtime
+
mdc_shift
;
// actual time shift it
printf
(
"Reading in MDC from gps time %f
\n
"
,
mdc_trigtime
);
LIGOTimeGPS
epoch
=
IFOdata
->
timeData
->
epoch
;
REAL8
deltaT
=
IFOdata
->
timeData
->
deltaT
;
int
seglen
=
IFOdata
->
timeData
->
data
->
length
;
...
...
@@ -211,6 +231,11 @@ void InjectFromMDC(ProcessParamsTable *commandLine, LALInferenceIFOData *IFOdata
i
=
0
;
UINT4
lower
=
(
UINT4
)
ceil
(
data
->
fLow
/
injF
->
deltaF
);
UINT4
upper
=
(
UINT4
)
floor
(
data
->
fHigh
/
injF
->
deltaF
);
// MM: Update to handle MDC time sliding (i.e. use old MDCs in new noise)
LIGOTimeGPS
epoch_shift
;
XLALGPSSetREAL8
(
&
epoch_shift
,
mdc_trigtime
);
/* Inject into FD data stream and calculate optimal SNR */
while
(
data
){
...
...
@@ -226,7 +251,8 @@ void InjectFromMDC(ProcessParamsTable *commandLine, LALInferenceIFOData *IFOdata
tmp
=
0
.
0
;
/* Read MDC frame */
timeData
=
readTseries
(
mdc_caches
[
i
],
mdc_channels
[
i
],
epoch
,
SegmentLength
);
// timeData=readTseries(mdc_caches[i],mdc_channels[i],epoch,SegmentLength);
timeData
=
readTseries
(
mdc_caches
[
i
],
mdc_channels
[
i
],
epoch_shift
,
SegmentLength
);
// Hacked for MDC shift
/* downsample */
XLALResampleREAL8TimeSeries
(
timeData
,
1
.
0
/
SampleRate
);
/* window timeData and store it in windTimeData */
...
...
@@ -1337,6 +1363,7 @@ void parse_command_line(struct Data *data, struct Chain *chain, struct Prior *pr
//flag for force-feeding wavelet parameters to start
data
->
waveletStartFlag
=
0
;
ppt
=
LALInferenceGetProcParamVal
(
commandLine
,
"--srate"
);
if
(
ppt
)
data
->
srate
=
atoi
(
ppt
->
value
);
else
data
->
srate
=
512
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment