Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gregory Ashton
PyFstat
Commits
c5b0828d
Commit
c5b0828d
authored
Oct 20, 2017
by
Gregory Ashton
Browse files
Update FM artifact writer
parent
7c09ea13
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyfstat/make_sfts.py
View file @
c5b0828d
...
@@ -332,13 +332,14 @@ class FrequencyModulatedArtifactWriter(Writer):
...
@@ -332,13 +332,14 @@ class FrequencyModulatedArtifactWriter(Writer):
@
helper_functions
.
initializer
@
helper_functions
.
initializer
def
__init__
(
self
,
label
,
outdir
=
"."
,
tstart
=
700000000
,
def
__init__
(
self
,
label
,
outdir
=
"."
,
tstart
=
700000000
,
data_
duration
=
86400
,
F0
=
30
,
F1
=
0
,
tref
=
None
,
h0
=
10
,
Tsft
=
1800
,
duration
=
86400
,
F0
=
30
,
F1
=
0
,
tref
=
None
,
h0
=
10
,
Tsft
=
1800
,
sqrtSX
=
1
,
Band
=
4
,
Pmod
=
lal
.
DAYSID_SI
,
Pmod_phi
=
0
,
Pmod_amp
=
1
,
sqrtSX
=
1
,
Band
=
4
,
Pmod
=
lal
.
DAYSID_SI
,
Pmod_phi
=
0
,
Pmod_amp
=
1
,
Alpha
=
None
,
Delta
=
None
,
IFO
=
'H1'
):
Alpha
=
None
,
Delta
=
None
,
IFO
=
'H1'
,
minStartTime
=
None
,
maxStartTime
=
None
,
detectors
=
'H1'
):
"""
"""
Parameters
Parameters
----------
----------
tstart,
data_
duration : int
tstart, duration : int
start and duration times (in gps seconds) of the total observation
start and duration times (in gps seconds) of the total observation
Pmod, F0, F1 h0: float
Pmod, F0, F1 h0: float
Modulation period, freq, freq-drift, and h0 of the artifact
Modulation period, freq, freq-drift, and h0 of the artifact
...
@@ -352,18 +353,21 @@ class FrequencyModulatedArtifactWriter(Writer):
...
@@ -352,18 +353,21 @@ class FrequencyModulatedArtifactWriter(Writer):
see `lalapps_Makefakedata_v4 --help` for help with the other paramaters
see `lalapps_Makefakedata_v4 --help` for help with the other paramaters
"""
"""
self
.
phi
=
0
self
.
F2
=
0
self
.
basic_setup
()
self
.
set_ephemeris_files
()
self
.
set_ephemeris_files
()
self
.
tstart
=
int
(
tstart
)
self
.
tstart
=
int
(
tstart
)
self
.
data_
duration
=
int
(
data_
duration
)
self
.
duration
=
int
(
duration
)
if
os
.
path
.
isdir
(
self
.
outdir
)
is
False
:
if
os
.
path
.
isdir
(
self
.
outdir
)
is
False
:
os
.
makedirs
(
self
.
outdir
)
os
.
makedirs
(
self
.
outdir
)
if
tref
is
None
:
if
tref
is
None
:
raise
ValueError
(
'Input `tref` not specified'
)
raise
ValueError
(
'Input `tref` not specified'
)
self
.
nsfts
=
int
(
np
.
ceil
(
self
.
data_
duration
/
self
.
Tsft
))
self
.
nsfts
=
int
(
np
.
ceil
(
self
.
duration
/
self
.
Tsft
))
self
.
data_
duration
_days
=
self
.
data_
duration
/
86400.
self
.
duration
=
self
.
duration
/
86400.
self
.
calculate_fmin_Band
()
self
.
calculate_fmin_Band
()
self
.
cosi
=
0
self
.
cosi
=
0
...
@@ -412,7 +416,7 @@ class FrequencyModulatedArtifactWriter(Writer):
...
@@ -412,7 +416,7 @@ class FrequencyModulatedArtifactWriter(Writer):
def
concatenate_sft_files
(
self
):
def
concatenate_sft_files
(
self
):
SFTFilename
=
lalpulsar
.
OfficialSFTFilename
(
SFTFilename
=
lalpulsar
.
OfficialSFTFilename
(
self
.
IFO
[
0
],
self
.
IFO
[
1
],
self
.
nsfts
,
self
.
Tsft
,
int
(
self
.
tstart
),
self
.
IFO
[
0
],
self
.
IFO
[
1
],
self
.
nsfts
,
self
.
Tsft
,
int
(
self
.
tstart
),
int
(
self
.
data_
duration
),
self
.
label
)
int
(
self
.
duration
),
self
.
label
)
# If the file already exists, simply remove it for now (no caching
# If the file already exists, simply remove it for now (no caching
# implemented)
# implemented)
...
...
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