mweastwood/CasaCore.jl — pull request #17 by mweastwood (2014-12-29 22:52:36+00:00)
Title: Interface Changes

This work is mostly based on [feedback](https://groups.google.com/forum/#!topic/julia-astro/nIBofo6DuTE) from @kbarbary

The main concerns are:
* Too many names are exported
* It would be nicer to use `getindex` and `setindex!` in place of all the `get...` and `put...!` methods
* Try not to use camel-case in exported names
* Make it easier to use `getColumn` in a type-stable way

The solutions I've implemented are:
* Use sub-modules so that users can choose which parts they want to use
* Add a `Column` and `Keyword` type. Then make, for example, `getindex(::Table,::Column)` do the right thing. The `Column` and `Keyword` types have type parameters that tell the compiler what to expect the return type of `getindex` should be. To make these types easier to use, I've defined the `@column` and `@keyword` macros. Eg. `table[@column "ANTENNA1" Int32]`
* The Measurement Set interface no longer defines a slew of `get...` and `put...!` methods. Instead it defines a bunch of `Column`s and `Keyword`s you'd expect to find in a Measurement Set. Eg. `ANTENNA1 = @column "ANTENNA1" Int32`. All of these new names are in all-caps (as is convention for CasaCore), so even though `using CasaCore.MeasurementSets` will add a bunch of names to the namespace, conflicts are unlikely.
* I've also re-ordered the arguments to `measure` on a whim.

I still need to update the README, but an example will look like
```julia
using CasaCore.Tables
using CasaCore.MeasurementSets
ms = Table("/path/to/measurementset.ms")
data = table[DATA]
model = function_to_gen_model_visibilities()
data[MODEL] = model
```