Skip to content

Create a 2-bit to 8-bit utility per @telegraphic #55

@shamichatterjee

Description

@shamichatterjee

f = Waterfall('ParkesHTRU.fil', t_start=7800000, t_stop=7850000)
f.info() -> Returns expected values from the header.
f.plot_waterfall() -> May or may not be doing the right thing, but at leas the axis labels look right.
But
f.plot_spectrum()
/opt/anaconda/lib/python3.6/site-packages/blimpy/filterbank.py in plot_spectrum(self, t, f_start, f_stop, logged, if_id, c, **kwargs)
546 plot_data = plot_data.mean()
547 else:
--> 548 raise RuntimeError("Unknown integration %s" % t)
549
550 # Rebin to max number of points
RuntimeError: Unknown integration all

I wonder if this is actually an error in unpacking the 2-bit data? If I try to read the data values I see values like
-4.6255555765569165e+303
6.807427090242793e+301
-1.570574712372553e+108
but plot_waterfall() seems to be working around it. Or is it? Is there a way to get access to the data array and directly imshow it, for example? When I do
d = f.data[:,0,:].transpose()
then d.shape is (1024, 50000), as expected (1024 channels, 50,000 time samples) but I get garbage when trying to imshow(d) because it looks like the 2-bit values aren't unpacked correctly.

Please let me know how to better document this error so that you can see the issue! Thanks.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions