Closed micamu closed 9 years ago
Thank you for the report, and the test case. This appears to be a duplicate of #206, and so we are aware of the problem and will work on a fix. Expect it in a few days unless someone else has time to write a patch.
In case you are interested the issue has to do with the fact that output PSDs are stored exactly as we use them and use zeros for values below the lower frequency cutoff. When reading in from a file, we use log interpolation which expects for these values to be valid (non-zero).
Miriam,
Please take a look at #225 and let me know if this fixes your problem.
Hi Alex,
indeed that fixes the problem, the triggers in the second run seem to agree with the triggers obtained on the first run. Thank you very much!
Cheers, Miriam
From: Alex Nitz notifications@github.com To: ligo-cbc/pycbc pycbc@noreply.github.com Cc: micamu miriam.cabero@aei.mpg.de Date: 27/08/2015 04:41 Subject: Re: [pycbc] pycbc_inspiral does not work with --psd-file option (#212)
Miriam, Please take a look at #225 and let me know if this fixes your problem. ? Reply to this email directly or view it on GitHub.
By the way, I noticed that when running pycbc_inspiral the following warning appears:
/home/miriam.cabero/pycbc-dev/local/lib/python2.7/site-packages/PyCBC-519076-py2.7.egg/pycbc/types/array.py:358: RuntimeWarning: divide by zero encountered in divide self._data /= other /home/miriam.cabero/pycbc-dev/local/lib/python2.7/site-packages/PyCBC-519076-py2.7.egg/pycbc/types/array.py:358: RuntimeWarning: invalid value encountered in divide self._data /= other
This appeared before together with a similar warning for read.py and interpolate.py,
/home/miriam.cabero/pycbc-dev/local/lib/python2.7/site-packages/PyCBC-519076-py2.7.egg/pycbc/psd/read.py:78: RuntimeWarning: divide by zero encountered in log slog = numpy.log(noise_data) /home/miriam.cabero/pycbc-dev/local/lib/python2.7/site-packages/scipy-0.16.0-py2.7-linux-x86_64.egg/scipy/interpolate/interpolate.py:468: RuntimeWarning: invalid value encountered in add y_new = slope*(x_new - x_lo)[:, None] + y_lo
but after changing read.py as you suggested, only the warning for array.py keeps appearing.
That makes me wonder if there might be also a problem with array.py, that might be also affecting the pycbc_inspiral results... Maybe something that would explain why am I having strange results with gatings (not necessarily, I haven't identified yet if that is due to the code or to the data)?
Cheers, Miriam
From: Alex Nitz notifications@github.com To: ligo-cbc/pycbc pycbc@noreply.github.com Cc: micamu miriam.cabero@aei.mpg.de Date: 27/08/2015 04:41 Subject: Re: [pycbc] pycbc_inspiral does not work with --psd-file option (#212)
Miriam, Please take a look at #225 and let me know if this fixes your problem. ? Reply to this email directly or view it on GitHub.
Hi Miriam,
The error in array.py is occurring because the inverse PSD is calculated at all frequencies, not just the ones where it is used (so 1/0. gives NANs in the inverse PSD at frequencies < f_low). However these values are not used in the matched-filter integral and do not affect results (you would get NANs in the output if that happened).
I'll let others argue whether this is the correct behaviour, I think it has advantages and disadvantages (foremost being the scary looking warning!)
Cheers Ian
Closing as I believe #225 supersedes this issue.
Hi Ian,
good to know, thanks for the explanation!
Cheers, Miriam
From: spxiwh notifications@github.com To: ligo-cbc/pycbc pycbc@noreply.github.com Cc: micamu miriam.cabero@aei.mpg.de Date: 27/08/2015 15:53 Subject: Re: [pycbc] pycbc_inspiral does not work with --psd-file option (#212)
Hi Miriam, The error in array.py is occurring because the inverse PSD is calculated at all frequencies, not just the ones where it is used (so 1/0. gives NANs in the inverse PSD at frequencies < f_low). However these values are not used in the matched-filter integral and do not affect results (you would get NANs in the output if that happened). I'll let others argue whether this is the correct behaviour, I think it has advantages and disadvantages (foremost being the scary looking warning!) Cheers Ian ? Reply to this email directly or view it on GitHub.
First run: pycbc_inspiral with --psd-estimation option, and output the psd. Second run: use the generated psd in the previous run to refilter the data with the --psd-file option.
We expect the results from both runs to be very similar to each other. However, in the second case no triggers are produced.
The necessary tar ball (containing the test data set and the template bank, both pycbc_inspiral scripts with the command line options used, the output psd and the output triggers in both cases) can be found in atlas miram.cabero/PyCBC/SNRLoss/test/temp/testpsd.tar.gz