ledatelescope / bifrost

A stream processing framework for high-throughput applications.
BSD 3-Clause "New" or "Revised" License
66 stars 29 forks source link

FDMT output question #81

Closed telegraphic closed 7 years ago

telegraphic commented 7 years ago

Hey Ben

I've been testing the FDMT pipeline, and am running into an unexpected output shape.

I updated the fdmt pipeline example here (on my branch): https://github.com/telegraphic/bifrost/blob/master/testbench/test_fdmt.py

To use the new tensor labels (pol, dispersion etc). The output after the FDMT block is:

-----
blc13_guppi_57880_37488_DIAG_PSR_B2021+51_0024.gpuspec.0001.fil
{'_tensor': {'dtype': 'f32',
             'labels': ['pol', 'dispersion', 'time'],
             'scales': [None,
                        [0.0, 141.26],
                        [1494152688.0, 0.0006990506666666666]],
             'shape': [1, 2, -1],
             'units': [None, 'pc cm^-3', 's']},
 ...}
-----

For an input with:

-----
blc13_guppi_57880_37488_DIAG_PSR_B2021+51_0024.gpuspec.0001.fil
{'_tensor': {'dtype': 'u32',
             'labels': ['pol', 'freq', 'time'],
             'scales': [None,
                        [7438.78173828125, -0.3662109375],
                        [1494152688.0, 0.0006990506666666666]],
             'shape': [1, 512, -1],
             'units': [None, 'MHz', 's']},
...}

Shouldn't the output shape be [1, 512]? Am I misuing the block?

benbarsdell commented 7 years ago

The number of output delays (the size of that dimension) is determined by the delay across the band at the max DM. For your observing parameters and a DM of 282.52, this is only ~2 samples, so it only produces 2 delays.

telegraphic commented 7 years ago

Ah ok, thanks! Closing as it's user error :/

benbarsdell commented 7 years ago

The problem is really my gross failure to document it properly (or at all). I'll try to fix that soon.

telegraphic commented 7 years ago

speaking of documentation, I was playing around with getting github to render a page straight from /docs. It's working on my branch https://telegraphic.github.io/bifrost/ https://github.com/telegraphic/bifrost/tree/master/docs

but I needed to modify the generate_python_reference.sh to move the files out to /docs, which is kind of annoying.

Miles mentioned some auto-building options, so they may end up being better.

MilesCranmer commented 7 years ago

Hey Danny,

This might work, but I am concerned about having the full html docs in the master branch because that means with every commit, a new commit may be auto-generated over top of it to update the docs. Whereas if we only keep the non-generated source files in master, the commit history is clean and only shows manual adjustments to the documentation tutorials/examples and organization. Then we can have an auto-build feature update the docs in gh-pages with every commit. Thoughts?

Cheers, Miles

telegraphic commented 7 years ago

Auto-generate is way cooler.

MilesCranmer commented 7 years ago

BTW, ledatelescope.github.io/bifrost has just been updated with the latest tutorials + documentation.

There is also now a Dockerfile in the /docs directory which builds the docs automatically based on the ledatelescope/bifrost container.

I am looking into https://gist.github.com/domenic/ec8b0fc8ab45f39403dd to have travis build and push the docs with each passing test. I am curious if the GPU+CPU and CPU-only container-built docs are equivalent. I would assume so if all the blocks are still accessible, if not executable, from within the CPU-only one.