Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyFstat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Pep Covas Vidal
PyFstat
Commits
42d9d8c3
Commit
42d9d8c3
authored
5 years ago
by
Pep Covas Vidal
Browse files
Options
Downloads
Patches
Plain Diff
Update make_sfts.py
parent
bdb897f1
No related branches found
No related tags found
No related merge requests found
Pipeline
#9848
canceled
5 years ago
Stage: Test
Stage: Static Analysis
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyfstat/make_sfts.py
+94
-8
94 additions, 8 deletions
pyfstat/make_sfts.py
with
94 additions
and
8 deletions
pyfstat/make_sfts.py
+
94
−
8
View file @
42d9d8c3
...
...
@@ -46,6 +46,16 @@ class Writer(BaseSearchClass):
maxStartTime
=
None
,
add_noise
=
True
,
transientWindowType
=
"
none
"
,
asini
=
0
,
period
=
0
,
tp
=
0
,
ecc
=
0
,
argp
=
0
,
noiseSFTs
=
'
none
'
,
windowSFTsType
=
'
tukey
'
,
windowSFTsBeta
=
0.001
,
ephemEarth
=
'
none
'
,
ephemSun
=
'
none
'
):
"""
Parameters
...
...
@@ -186,6 +196,56 @@ transientTau = {:10.0f}\n"""
duration_days
*
86400
,
)
def
get_single_config_line_binarycw
(
self
,
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
,
asini
,
period
,
tp
,
ecc
,
argp
):
template
=
(
self
.
get_base_template
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
)
+
"""
orbitasini = {:2.5f}
orbitPeriod = {:5.5f}
orbitTp = {:10.5f}
orbitEcc = {:1.5f}
orbitArgp = {:2.5f}
\n
"""
)
return
template
.
format
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
,
asini
,
period
,
tp
,
ecc
,
argp
)
def
get_single_config_line
(
self
,
i
,
...
...
@@ -202,6 +262,11 @@ transientTau = {:10.0f}\n"""
window
,
tstart
,
duration_days
,
asini
,
period
,
tp
,
ecc
,
argp
):
if
window
==
"
none
"
:
return
self
.
get_single_config_line_cw
(
...
...
@@ -225,6 +290,20 @@ transientTau = {:10.0f}\n"""
duration_days
,
)
if
window
==
'
none
'
:
if
asini
==
0
:
return
self
.
get_single_config_line_cw
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
)
else
:
return
self
.
get_single_config_line_binarycw
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
,
asini
,
period
,
tp
,
ecc
,
argp
)
else
:
return
self
.
get_single_config_line_tcw
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
,
window
,
tstart
,
duration_days
)
def
make_cff
(
self
):
"""
Generates a .cff file
...
...
@@ -246,6 +325,11 @@ transientTau = {:10.0f}\n"""
self
.
transientWindowType
,
self
.
tstart
,
self
.
duration_days
,
self
.
asini
,
self
.
period
,
self
.
tp
,
self
.
ecc
,
self
.
argp
,
)
if
self
.
check_if_cff_file_needs_rewritting
(
content
):
...
...
@@ -360,12 +444,20 @@ transientTau = {:10.0f}\n"""
cl_mfd
=
[]
cl_mfd
.
append
(
"
lalapps_Makefakedata_v5
"
)
cl_mfd
.
append
(
'
--ephemEarth=
"
{}
"'
.
format
(
self
.
ephemEarth
))
cl_mfd
.
append
(
'
--ephemSun=
"
{}
"'
.
format
(
self
.
ephemSun
))
cl_mfd
.
append
(
"
--outSingleSFT=TRUE
"
)
cl_mfd
.
append
(
'
--outSFTdir=
"
{}
"'
.
format
(
self
.
outdir
))
cl_mfd
.
append
(
'
--outLabel=
"
{}
"'
.
format
(
self
.
label
))
cl_mfd
.
append
(
"
--IFOs={}
"
.
format
(
self
.
IFOs
))
if
self
.
noiseSFTs
==
'
none
'
:
cl_mfd
.
append
(
'
--IFOs={}
'
.
format
(
self
.
IFOs
))
if
self
.
add_noise
:
cl_mfd
.
append
(
'
--sqrtSX=
"
{}
"'
.
format
(
self
.
sqrtSX
))
else
:
cl_mfd
.
append
(
'
--noiseSFTs=
"
{}
"'
.
format
(
self
.
noiseSFTs
))
cl_mfd
.
append
(
'
--SFTWindowType=
"
{}
"'
.
format
(
self
.
windowSFTsType
))
cl_mfd
.
append
(
'
--SFTWindowBeta={}
'
.
format
(
self
.
windowSFTsBeta
))
if
self
.
minStartTime
is
None
:
cl_mfd
.
append
(
"
--startTime={:0.0f}
"
.
format
(
float
(
self
.
tstart
)))
else
:
...
...
@@ -380,12 +472,6 @@ transientTau = {:10.0f}\n"""
cl_mfd
.
append
(
"
--Tsft={}
"
.
format
(
self
.
Tsft
))
if
self
.
h0
!=
0
:
cl_mfd
.
append
(
'
--injectionSources=
"
{}
"'
.
format
(
self
.
config_file_name
))
earth_ephem
=
getattr
(
self
,
"
earth_ephem
"
,
None
)
sun_ephem
=
getattr
(
self
,
"
sun_ephem
"
,
None
)
if
earth_ephem
is
not
None
:
cl_mfd
.
append
(
'
--ephemEarth=
"
{}
"'
.
format
(
earth_ephem
))
if
sun_ephem
is
not
None
:
cl_mfd
.
append
(
'
--ephemSun=
"
{}
"'
.
format
(
sun_ephem
))
cl_mfd
=
"
"
.
join
(
cl_mfd
)
check_ok
=
self
.
check_cached_data_okay_to_use
(
cl_mfd
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment