Alessandro Ridolfi's home page





ugmrt2fil on GitHub

Latest version: 1.0.2 (30Apr2019)

git clone https://github.com/alex88ridolfi/ugmrt2fil.git



ugmrt2fil




Requirements:
ugmrt2fil allows you to convert the native 16-bit uGMRT "raw" data format to the much more common SIGPROC's "filterbank" search-mode data format.


Being SIGPROC's "filterbank" format compatible with virtually all pulsar data analysis software currently available, you are then ready to process your data with your favorite tool.





DOCUMENTATION


1) Installation

No actual installation procedure is needed to use ugmrt2fil itself. However, since it calls some SIGPYPROC libraries, you first need to have SIGPYPROC installed.

Once SIGPYPROC is installed and correctly working, you can get started with ugmrt2fil:

  1. Download the code from GitHub using the "git clone" command above
    git clone https://github.com/alex88ridolfi/ugmrt2fil.git

  2. Move to the newly dowloaded directory
    cd ugmrt2fil

  3. Run the code with:
    ./ugmrt2fil

Obviously, to have ugmrt2fil at hand from any directory, you can add the folder where the code is located to your PATH environment variable.



2) Basic usage

To successfully use ugmrt2fil, you need:

  1. A uGMRT search-mode raw data file ("<observation.gmrt_dat>").
  2. A corresponding header file ("<observation.gmrt_hdr>") in the same folder as the data file.

Assuming to have a uGMRT observation file called "TEST_PULSAR_J0520-2553_29apr2017.gmrt_dat" (together with its corresponding header file "TEST_PULSAR_J0520-2553_29apr2017.gmrt_hdr"), we want to convert this observation to an 8-bit filterbank file, using a bitshift of 4. Also, we want increase the default number of processed spectra per block by a factor of 5, for a total of 500000, to speed things up.

All of this is done by typing:

ugmrt2fil -ugmrtfile TEST_PULSAR_J0520-2553_29apr2017.gmrt_dat -nbit 8 -bitshift 4 -N_spectra_per_block 500000



The code will output the resulting filterbank file named "TEST_PULSAR_J0520-2553_29apr2017_8bit_bs4.fil" in the same folder.



3) Command line options

You can use a number of options to adapt ugmrt2fil to specific applications and cases. Here follows a list of all the available options:

  • -ugmrtfile <observation.gmrt_dat>
    Specify which uGMRT raw data file to convert. Must have a corresponding <observation.gmrt_hdr> header file.

  • -nbit {8,16,32}
    Specify the number of bits per sample of the output filterbank file. If "8" is chosen, a bitshift value must also be provided.

  • [ -bitshift X ]
    The number of bits to shift when converting the 16-bit uGMRT raw data file to an 8-bit filterbank file. Sensible values will likely be in the range of 3 to 6.

  • [ -N_spectra_per_block N ]
    The number of spectra to be loaded into memory converted and written out to file at a time. N is an integer. Different values, depending on your machine's characteristics, may have a positive or negative impact on the code's performance.
    Default: N = 100000 spectra per block.

  • [ -flipband ]
    Reverse the order of channels when outputting the converted file. Usually necessary for Band-4 (550-750 MHz) uGMRT observations.
    Default: don't reverse.

  • [ -dontclipchan0 ]
    Don't clip the first channel (which normally retains the DC level) of each spectrum.
    Default: clip the first channel.

  • [ -o <outfilename> ]
    Specify the output file name.
    Default: "<basename>_Nbit[_bsX].fil".

  • [ -Q ]
    Quiet mode. Do not print anything onto the standard output. Useful when to call ugmrt2fil within scripts or pipelines.

  • [{ -v | -version | --version }]
    Show code version.

  • [{ -h | -help | --help }]
    Show a simple usage help and the list of options.



4) Acknowledgements

Big thanks to Ewan Barr, for great insights into data acquisition systems as well for helping with python coding. Great thanks to Tasha Gautam for using and testing the code, and to Avishek Basu, for providing suggestions and data to test the code with.