Skip to content

Commit

Permalink
Merge branch 'v0.5-release' into 'master'
Browse files Browse the repository at this point in the history
Create asimov 0.5.7

See merge request asimov/asimov!135
  • Loading branch information
transientlunatic committed Jul 8, 2024
2 parents 62fc8e5 + 5eb39da commit 6e74300
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
docs/* @daniel-williams

[Reviewers]
asimov/* @patricia-schmidt @marialuisa.chiofalo @kent-blackburn
asimov/* @patricia-schmidt @marialuisa.chiofalo @kent-blackburn @michael.williams

asimov/pipelines/rift.py @rhiannon.udall
16 changes: 9 additions & 7 deletions asimov/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,15 @@ def make_config(self, filename, template_directory=None):
template = f"{self.pipeline}.ini"

pipeline = known_pipelines[self.pipeline]
if hasattr(pipeline, "config_template"):
template_file = pipeline.config_template
else:
try:
template_directory = config.get("templating", "directory")
template_file = os.path.join(f"{template_directory}", template)
except configparser.NoOptionError:

try:
template_directory = config.get("templating", "directory")
template_file = os.path.join(f"{template_directory}", template)

except (configparser.NoOptionError, configparser.NoSectionError):
if hasattr(pipeline, "config_template"):
template_file = pipeline.config_template
else:
from pkg_resources import resource_filename

template_file = resource_filename("asimov", f"configs/{template}")
Expand Down
2 changes: 1 addition & 1 deletion asimov/configs/bayeswave.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ window={{ likelihood['window length'] }}
flow={{ quality['lowest minimum frequency'] }}
srate={{ likelihood['sample rate'] }}
PSDlength={{ likelihood['psd length'] }}
padding=0.0
rolloff={{ likelihood['roll off time'] | default: 0.4 }}
ifo-list={{ ifos }}
segment-start={{ likelihood['segment start'] }}

Expand Down
2 changes: 1 addition & 1 deletion asimov/configs/bilby.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ psd-start-time=None
minimum-frequency={ {% for ifo in ifos %}{{ifo}}:{{quality['minimum frequency'][ifo]}},{% endfor %}{% if likelihood contains 'start frequency'%} waveform: {{ likelihood['start frequency'] }} {% endif %} }
maximum-frequency={ {% for ifo in ifos %}{{ifo}}:{{quality['maximum frequency'][ifo]}},{% endfor %} }
zero-noise=False
tukey-roll-off=0.4
tukey-roll-off={{ likelihood['roll off time'] | default: 0.4 }}
resampling-method=lal

################################################################################
Expand Down
11 changes: 10 additions & 1 deletion asimov/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,11 +662,20 @@ def __init__(self, event, name, status, pipeline, comment=None, **kwargs):
self.meta["quality"]["maximum frequency"] = {}
# Account for the PSD roll-off with the 0.875 factor
for ifo in self.meta["interferometers"]:
psd_rolloff = self.meta.get("likelihood", {}).get(
"roll off factor", 0.875
)
if ifo not in self.meta["quality"]["maximum frequency"]:
self.meta["quality"]["maximum frequency"][ifo] = int(
0.875 * self.meta["likelihood"]["sample rate"] / 2
psd_rolloff * self.meta["likelihood"]["sample rate"] / 2
)

# Add a warning about roll-offs
if not ("roll off time" in self.meta["likelihood"]):
self.logger.warning(
"Using the default roll off settings (0.4-seconds); note that these may result in spectral leakage."
)

# Get the data quality recommendations
if "quality" in self.event.meta:
self.quality = self.event.meta["quality"]
Expand Down

0 comments on commit 6e74300

Please sign in to comment.