UKZN-Astronomy / corrcal

Python/C code for calibration of quasi-redundant arrays. Different (fixed) algorithm from original corrcal
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Converting data files to numpy or csv format #15

Open piyanatk opened 5 years ago

piyanatk commented 5 years ago

The *.dat files for test examples in the /data directory seem to be in binary. Which of these are inputs or outputs of corrcal. Can we convert them to UTF-8 ASCII files or numpy array, so that they are easier to inspect for the time being? (Eventually, we will want to use UVData object to store this data)

ronniyjoseph commented 5 years ago

They are all inputs for the corrcal_example.py . I have thought exporting to something more human readable and yes that's possible.

The example code details how to read all files (except signal_sparse2_test.dat). After reading those in we can export them in arbitrary formats, ASCII would be nice indeed so anyone can look at them.

https://github.com/UKZN-Astronomy/corrcal/blob/340c2c04e65b822d4b54c9fd374c3c729f3d2a35/corrcal/corrcal.py#L611

Contains the info on how to extract data from signal_sparse2_test.dat file and export that into several files for the various things it contains.

piyanatk commented 5 years ago

As discussed, we will look into this again once we merge restructure to master and begin the code testing.