Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the size of analysed data segments. #47

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions heron/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def heron_inference(settings):

if "data files" in settings.get("data", {}):
# Load frame files from disk

start = settings['event time'] - settings['segment length'] + settings['after merger']
end = settings['event time'] + settings['after merger']

for ifo in settings["interferometers"]:
print(f"Loading {ifo} data")
logger.info(
Expand All @@ -93,7 +97,12 @@ def heron_inference(settings):
source=settings["data"]["data files"][ifo],
channel=settings["data"]["channels"][ifo],
format="gwf",
start=start,
end=end,
)
if data[ifo].sample_rate != settings['likelihood']['sampling rate']:
logger.info("Resampling the data to the likelihood sampling rate")
data[ifo] = data[ifo].resample(settings['likelihood']['sampling rate'])
#elif "injection" in other_settings:
# pass

Expand Down
Loading