UCBerkeleySETI / blimpy

Breakthrough Listen I/O Methods for Python
https://blimpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
46 stars 40 forks source link

Enhancement: Make waterfall plots of huge Filterbank/HDF5 files #221

Closed texadactyl closed 3 years ago

texadactyl commented 3 years ago

LOFAR folks have some really huge Filterbank files E.g. 140 GB. Today's blimpy cannot plot them because it tries to get the whole data matrix into memory first.

New approach: Slice them into manageable sized sticks by fine-channel frequency subrange and plot each one separately. Optionally, concatenate all of the generated PNG files horizontally or vertically into one PNG.

New utility function: stix

stix -h
usage: stix [-h] [--plot_dir PLOT_DIR] [--source_name SOURCE_NAME] [--stitch {n,v,h}] [--dpi DPI] [--width WIDTH] [--height HEIGHT] input_file chunk_count

Make waterfall plots from a single huge file, viewed from top to bottom.

positional arguments:
  input_file            List of files to plot
  chunk_count           Count of same-sized frequency chunks

optional arguments:
  -h, --help            show this help message and exit
  --plot_dir PLOT_DIR, -p PLOT_DIR
                        Directory to receive the plot (.png). Default: current directory.
  --source_name SOURCE_NAME, -n SOURCE_NAME
                        Source name to override the header field. Default: None.
  --stitch {n,v,h}, -s {n,v,h}
                        Stitch files: n(no stitching), v(vertical), or h(horizontal). Default: n.
  --dpi DPI, -d DPI     Single image file dots per inch. Default: 200.
  --width WIDTH, -w WIDTH
                        Single image file image width in inches. Default: 10.
  --height HEIGHT, -t HEIGHT
                        Single image file image height in inches. Default: 8.