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
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Show more breadcrumbs
Gregory Ashton
PyFstat
Commits
8e68e4a6
Commit
8e68e4a6
authored
4 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Improve the documentation for get_optimal_setup_functions
Closes # 72
parent
d8571a7d
Branches
72-improve-docs-for_optimal_setup
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyfstat/optimal_setup_functions.py
+37
-4
37 additions, 4 deletions
pyfstat/optimal_setup_functions.py
with
37 additions
and
4 deletions
pyfstat/optimal_setup_functions.py
+
37
−
4
View file @
8e68e4a6
...
@@ -18,17 +18,28 @@ def get_optimal_setup(
...
@@ -18,17 +18,28 @@ def get_optimal_setup(
):
):
"""
Using an optimisation step, calculate the optimal setup ladder
"""
Using an optimisation step, calculate the optimal setup ladder
The details of the methods are described in Sec Va of arXiv:1802.05450.
Here we provide implementation details. All equation numbers refer to
arXiv:1802.05450.
Parameters
Parameters
----------
----------
NstarMax : float
NstarMax : float
The ratio of the size at the old coherence time to the new coherence
time for each step, see Eq. (31). Larger values allow a more rapid
"
zoom
"
of the search space at the cost of convergence. Smaller values
are more conservative at the cost of additional computing time. The
exact choice should be optimized for the problem in hand, but values
of 100-1000 are typically okay.
Nsegs0 : int
Nsegs0 : int
The number of segments for the initial step of the ladder
The number of segments for the initial step of the ladder
minStartTime, maxStartTime : int
tref,
minStartTime, maxStartTime : int
GPS times of the start and end time
of the search
GPS times of the
reference,
start
,
and end time
.
prior : dict
prior : dict
Prior dictionary, each item must either be a fixed scalar value, or
Prior dictionary, each item must either be a fixed scalar value, or
a uniform prior.
a uniform prior.
detector_names : list of str
detector_names : list or str
Names of the detectors to use
Returns
Returns
-------
-------
...
@@ -66,7 +77,29 @@ def get_optimal_setup(
...
@@ -66,7 +77,29 @@ def get_optimal_setup(
def
_get_nsegs_ip1
(
def
_get_nsegs_ip1
(
nsegs_i
,
NstarMax
,
tref
,
minStartTime
,
maxStartTime
,
prior
,
detector_names
nsegs_i
,
NstarMax
,
tref
,
minStartTime
,
maxStartTime
,
prior
,
detector_names
):
):
"""
Calculate Nsegs_{i+1} given Nsegs_{i}
"""
"""
Calculate Nsegs_{i+1} given Nsegs_{i}
Perform the optimization step to calculate nsegs and i+1 given the setup
and i. The
"
Powell
"
minimiization method from scipy is used. Below, we give
help for parameters unique to _get_nsegs_ip1, for help with other
parameters see get_optimal_setup
Parameters
----------
nsegs_i: int
The number of segments at step i
Returns
-------
nsegs_ip1: int
The number of segments at i + 1
Raises
------
ValueError: Optimisation unsuccesful
A value error is raised if the optimization step fails
"""
log10NstarMax
=
np
.
log10
(
NstarMax
)
log10NstarMax
=
np
.
log10
(
NstarMax
)
log10Nstari
=
np
.
log10
(
log10Nstari
=
np
.
log10
(
...
...
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