[Difx-users] Possible bug of m5subband.py

Lupin Lin lupin at asiaa.sinica.edu.tw
Sat Nov 5 09:51:11 EDT 2016


To whom will concern it,

I successfully installed the python-binding with the DiFX-trunk version.
For a successful example: 
lupin at GLTCU:/data2/lupin$ m5subband.py

m5subband.py ver. 1.2   Jan Wagner  20160228

Extracts a narrow subband via filtering raw VLBI data.
Reads formats supported by the mark5access library.

Usage : m5subband.py <infile> <dataformat> <outfile>
                     <if_nr> <quality factor>
                     <start_MHz> <stop_MHz> [<offset>]

  <dataformat> should be of the form: <FORMAT>-<Mbps>-<nchan>-<nbit>, e.g.:
    VLBA1_2-256-8-2
    MKIV1_4-128-2-1
    Mark5B-512-16-2
    VDIF_1000-64-1-2 (here 1000 is payload size in bytes)

  <outfile>   output file for 32-bit float subband data (VDIF format)
  <if_nr>     the baseband channel to select for filtering (1...<nchan>)
  <factor>    any quality factor >=1, with larger factors giving
              progressively steeper filter cutoffs i.e. less leakage
  <start_MHz> starting frequency of desired output band
  <stop_MHz>  stop frequency of desired output band

  <offset> is the optional byte offset into the file

—————————————————————————————————
However, when I tried to examine a real case, it shows a error message.

lupin at GLTCU:/data2/lupin$ time m5subband.py Cm.vdif VDIF_8192-8192-1-2 test2.vdif 1 1 1008 1040 0
(Cm.vdif is a vdif file with the bandwidth of 2048 MHz.
m5subband.py, which contributed by Jan Wanger is put under /difx/virtualtrunk/libraries/mark5access/python/examples)

Traceback (most recent call last):
  File "/usr/local/src/difx/virtualtrunk/libraries/mark5access/python/examples/m5subband.py", line 256, in <module>
    sys.exit(main())
  File "/usr/local/src/difx/virtualtrunk/libraries/mark5access/python/examples/m5subband.py", line 251, in main
    rc = m5subband(argv[1],argv[2],argv[3], if_nr, factor,start_MHz,stop_MHz, offset)
  File "/usr/local/src/difx/virtualtrunk/libraries/mark5access/python/examples/m5subband.py", line 75, in m5subband
    start_bin = int(Ldft_in*start_MHz/bw_in)
ZeroDivisionError: float division by zero

The problem might be due to that “bw_in” derived inside the code is 0.

Sincerely,
--
Lupin Chun-Che Lin
Supporting Scientist of GLT (GreenLand Telescope) project 
in Institute of Astronomy and Astrophysics, Academia Sinica,
14F of Astronomy-Mathematics Building (Rm: 1405), 
National Taiwan University. 
No.1, Sec. 4, Roosevelt Rd, Taipei 10617, Taiwan.
Tel: +886-2-2366-5464
Fax: +886-2-2367-7849



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/difx-users/attachments/20161105/064b8261/attachment.html>


More information about the Difx-users mailing list