Commit 342a2dfe authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Fix a bug in gwpy read

If the requested data bridges a gap in the globbed data, gwpy chokes.
This instead reads in all the data and then cuts to the relevant part.
parent e7881141
hist
livetime
\ No newline at end of file
livetime
......@@ -12,4 +12,4 @@ MANIFEST
*.dat
*.version
*.ipynb_checkpoints
outdir/*
\ No newline at end of file
outdir/*
......@@ -15,13 +15,12 @@ repos:
- id: codespell # Spellchecker
args: [-L, nd, --skip, "*.html", --ignore-words=.dictionary.txt]
- repo: https://github.com/asottile/seed-isort-config
rev: v1.3.0
rev: v2.1.1
hooks:
- id: seed-isort-config
args: [--application-directories, 'bilby_pipe, tests']
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
repo: https://github.com/timothycrosley/isort
rev: 4.3.21-2
hooks:
- id: isort # sort imports alphabetically and separates import into sections
args: [-w=88, -m=3, -tc, -sp=setup.cfg ]
......@@ -5,4 +5,4 @@ Standard prior file
A figure of the component mass ranges spanned by the priors.
![](../../docs/mass_ranges_for_priors.png)
\ No newline at end of file
![](../../docs/mass_ranges_for_priors.png)
......@@ -916,12 +916,7 @@ class DataGenerationInput(Input):
if "gwf" in format_ext:
kwargs = dict(
source=source,
channel=channel,
start=start_time,
end=end_time,
dtype=dtype,
format="gwf.lalframe",
source=source, channel=channel, dtype=dtype, format="gwf.lalframe",
)
elif "hdf5" in format_ext:
kwargs = dict(source=source, start=start_time, end=end_time, format="hdf5")
......@@ -947,6 +942,8 @@ class DataGenerationInput(Input):
)
data = gwpy.timeseries.TimeSeries.read(**kwargs)
data = data.crop(start=start_time, end=end_time)
if data.duration.value < end_time - start_time:
logger.warning(
"Unable to read in requested {}s duration of data from {}"
......
......@@ -1031,8 +1031,9 @@ def write_complete_config_file(parser, args, inputs):
"unknown_args",
"_ini",
"_webdir",
"_log_directory",
"_prior_dict",
"timeslides",
"_log_directory",
]
differences = []
for key, val in inputs.__dict__.items():
......@@ -1050,6 +1051,7 @@ def write_complete_config_file(parser, args, inputs):
continue
if val == complete_inputs.__dict__[key]:
continue
differences.append(key)
if len(differences) > 0:
......
......@@ -117,4 +117,3 @@ for (i = 0; i < acc.length; i++) {
</body>
</html>
......@@ -101,4 +101,3 @@ for (i = 0; i < acc.length; i++) {
</body>
</html>
......@@ -29,4 +29,4 @@ pip install urllib3
pip install gwpy
pip install bilby==0.3.3
pip install bilby_pipe==0.0.1
ln -s /usr/bin/python3 /usr/bin/python
\ No newline at end of file
ln -s /usr/bin/python3 /usr/bin/python
......@@ -17,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
......@@ -11,6 +11,3 @@ Command line interface for creating an injection set
:module: bilby_pipe.create_injections
:func: create_parser
:prog: fancytool
......@@ -192,6 +192,3 @@ can be installed with conda using the commands
$ conda install -c conda-forge python-ldas-tools-framecpp
$ conda install -c conda-forge python-nds2-client
......@@ -171,4 +171,4 @@
"offline": false,
"likelihood": 30.8655826263015,
"far_is_upper_limit": false
}
\ No newline at end of file
}
......@@ -10,4 +10,4 @@ ra = Uniform(name='ra', minimum=0, maximum=2 * np.pi)
iota = Sine(name='iota', latex_label='$\\iota$')
psi = Uniform(name='psi', minimum=0, maximum=np.pi, latex_label='$\\psi$')
phase = Uniform(name='phase', minimum=0, maximum=2 * np.pi)
geocent_time = Uniform(1180002600.9, 1180002601.1, name='geocent_time', unit='s', latex_label='$t_{geo}$')
\ No newline at end of file
geocent_time = Uniform(1180002600.9, 1180002601.1, name='geocent_time', unit='s', latex_label='$t_{geo}$')
......@@ -10,4 +10,4 @@ ra = Uniform(name='ra', minimum=0, maximum=2 * np.pi)
iota = Sine(name='iota')
psi = Uniform(name='psi', minimum=0, maximum=np.pi)
phase = Uniform(name='phase', minimum=0, maximum=2 * np.pi)
geocent_time = 0
\ No newline at end of file
geocent_time = 0
......@@ -13,4 +13,4 @@ waveform-approximant = IMRPhenomD_NRTidal
frequency-domain-source-model = lal_binary_neutron_star
injection = True
n-injection = 3
accounting = ligo.dev.o3.cbc.pe.lalinference
\ No newline at end of file
accounting = ligo.dev.o3.cbc.pe.lalinference
......@@ -19,4 +19,4 @@ minimum-frequency = 10
maximum-frequency = 128
accounting = ligo.dev.o3.cbc.pe.lalinference
default-prior = PriorDict
frequency-domain-source-model = lal_eccentric_binary_black_hole_no_spins
\ No newline at end of file
frequency-domain-source-model = lal_eccentric_binary_black_hole_no_spins
......@@ -22,5 +22,3 @@ The following table summarises three jobs using timeshifts and the various log B
From the table, we can see that
- The results for (1) (2) match up and positively detect the signal
- For (3) there is a signal in H1 (high lnBF at H) and just noise in L1 (low lnBF at L), so the BCR is low.
......@@ -42,4 +42,4 @@ waveform-approximant=IMRPhenomPv2
sampler = dynesty
sampler-kwargs = {nlive: 512, walks: 100}
prior_file = GW150914.prior
\ No newline at end of file
prior_file = GW150914.prior
0 0
1000 1000
-500 500
\ No newline at end of file
-500 500
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment