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

Switch to CFFI #18

Closed piyanatk closed 4 years ago

piyanatk commented 5 years ago

Following up from the discussion in #8 and what we learned from #10, it seems that switching from ctypes to cffi will improve the wrapper interface and streamline the code compilation.

All C libraries loading and wrapping codes that are currently declared as global variables in corrcal.py can be placed in abuild_cffi.py script in the root directory of the repository. Then, we can use the cffi_modules option with setuptools in setup.py to streamline the compiling and wrapping of the C cod. This seems to be what is being done in the 21cmFAST repository, I think.

I will fork from the restructure branch to investigate this.

piyanatk commented 4 years ago

Since the ctypes implementation is working, @steven-murray suggested that we drop or postpone this issue and and instead focus on testing corrcal functions and developing Python branch. Agree, @ronniyjoseph ?

ronniyjoseph commented 4 years ago

For my personal benefit I agree, i.e. understanding the behaviour of corrcal. A pythonic version of corrcal is most likely the easiest way to get a feel for how corrcal works.

piyanatk commented 4 years ago

Dropping this issue with PR https://github.com/UKZN-Astronomy/corrcal/pull/21 merged to master.