Skip to content

Event followup related updates

Alvin Li requested to merge event-followup-related-updates into master
  • In stream.py, added
if buf.n_memory() == 0:
    return

in line 369. Without this, gstlal_inspiral_calc_snr raises error

/usr/bin/gstlal_inspiral_calc_snr --mode 0 --reference-psd psd.xml.gz --track-psd  --gps-start-time 1381859994 --gps-end-time 1381860427 --start 1381860322 --end 1381860332 --psd-fft-length 32 --data-source frames --frame-cache frame.cache --coinc coinc.xml --outdir /home/alvin.li/Projects/gstlal_event_followup/testing/G447746 --svd-bank H1:/home/alvin.li/Projects/gstlal_event_followup/testing/G447746/H1-0917_GSTLAL_SVD_BANK-0-0.xml.gz,L1:/home/alvin.li/Projects/gstlal_event_followup/testing/G447746/L1-0917_GSTLAL_SVD_BANK-0-0.xml.gz --channel-name H1=GDS-CALIB_STRAIN_CLEAN --channel-name=L1=GDS-CALIB_STRAIN_CLEAN --verbose
reading '/home/alvin.li/Projects/gstlal_event_followup/testing/G447746/H1-0917_GSTLAL_SVD_BANK-0-0.xml.gz' ...                                              
writing '/tmp/tmpp18co4os.xml.gz' ...
writing '/tmp/tmplwdh8t19.xml.gz' ...
reading '/home/alvin.li/Projects/gstlal_event_followup/testing/G447746/L1-0917_GSTLAL_SVD_BANK-0-0.xml.gz' ...                                              
writing '/tmp/tmpdi7lckq0.xml.gz' ...
writing '/tmp/tmp95ybj558.xml.gz' ...
reading 'coinc.xml' ...
Building pipeline...
Calculating SNR...
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/gstlal/pipeparts/sink.py", line 424, in new_sample_handler                                                       
    return self.pull_buffers(elem)
  File "/usr/lib64/python3.6/site-packages/gstlal/pipeparts/sink.py", line 463, in pull_buffers                                                             
    self.appsink_new_buffer(elem_with_oldest)
  File "/usr/lib64/python3.6/site-packages/gstlal/stream.py", line 230, in sample_handler                                                                   
    buf = self._pull_buffer(elem, caps=caps)
  File "/usr/lib64/python3.6/site-packages/gstlal/stream.py", line 392, in _pull_buffer                                                                     
    data = pipeio.array_from_audio_sample(sample)
  File "/usr/lib64/python3.6/site-packages/gstlal/pipeio.py", line 176, in array_from_audio_sample                                                          
    a = numpy.frombuffer(mapinfo.data, dtype = numpy_dtype_from_caps(caps))
AttributeError: 'list' object has no attribute '__buffer__'
  • Updated gstlal_inspiral_plot_snr. In particular, added list(...) outside of all the zip function to make the zipped result into a list. This is updated for python3 compatibility (TypeError: object of type 'zip' has no len()).

Merge request reports