concat_woden_uvfits.py

Helper script to concatenate a number of uvfits files by frequency into a single uvfits file. Essential to input WODEN simulations into hyperdrive.

Warning

This script is pretty dumb, so as long as the script can find the uvfits files, it will do the concatenation - it does NOT check if they have the same phase centre, frequencies, time stamps, etc. etc. so use at your own risk

Command line running options

Concatenate a number of uvfits files by frequency.

usage: concat_woden_uvfits.py [-h] [--num_bands NUM_BANDS]
                              [--uvfits_prepend UVFITS_PREPEND]
                              [--output_name OUTPUT_NAME] [--swap_pols]
                              [--half_power]

Named Arguments

--num_bands

How many files to concatenate

Default: 24

--uvfits_prepend

Prepend for the uvfits files e.g. ./data/uvdump_

Default: False

--output_name

Name for output concatenated uvfits file, default: concanenated.uvfits

Default: “concatenated.uvfits”

--swap_pols

Reverse the order of polarisations

Default: False

--half_power

Divide the visibilities by two; account for difference between FHD and hyperdrive conventions

Default: False

Function documentation

concat_woden_uvfits.check_uvfits_freq_order(uvfits_prepend, num_bands)[source]

By default, WODEN should output the band numbers in ascending frequency, so check that this is true otherwise things are probably going to go wrong

concat_woden_uvfits.concat_uvfits(uvfits_prepend, bands, output_name, reverse_pols=False, half_power=False)[source]

For band in band_nums, make a list of uvfits files with name {uvfits_prepend}_band{band}.uvfits. Then concanenate them by frequency, assuming that the set of uvfits are contiguous in frequency. Save output uvfits to output_name.

concat_woden_uvfits.get_parser()[source]

Runs the argument parser to get command line inputs - used by sphinx and argparse extension to unpack the help below into the online readthedocs documentation.

Returns:

parser – The populated argument parser used by concat_woden_uvfits.py

Return type:

argparse.ArgumentParser

concat_woden_uvfits.main()[source]

Runs all the things