#18 Scatter plots

This pull request is for adding a feature to generate scatter plots. It includes the following things.

1) A `ScatterPlotSysTest` class in `sys_tests.py`, which is a base class inherited by specific scatter plot classes for three quantitates for test (g1, g2, or sigma) times two quantities for y-axis (a star quantity or a residual quantity), in total 6 classes whose names are `ScatterPlot[Star, Residual]VsPSF[G1, G2, Sigma]SysTest`.

2) An interface to the HSC pipeline is added in `hsc/sys_test_adapters.py`. Each test can be run by adding `ScatterPlotStarVsPSFG1`, `ScatterPlotStarVsPSFG2`, `ScatterPlotStarVsPSFSigma`, `ScatterPlotResidualVsPSFG1`, `ScatterPlotResidualVsPSFG2`, or `ScatterPlotResidualVsPSFSigma` to `sys_test` in the config. Examples of a command line are as follows
- single CCD
```
StileCCD.py $SUPRIME_DATA_DIR --id visit=1228 ccd=49 --rerun [rerun_name]:[stile_rerun_name] --clobber-config -c "sys_tests.names=['ScatterPlotStarVsPSFG1', 'ScatterPlotResidualVsPSFG1']"
```
- multiple CCDs
```
StileVisit.py $SUPRIME_DATA_DIR --id visit=1228 ccd=49^50 --rerun [rerun_name]:[stile_rerun_name] --clobber-config -c "sys_tests.names=['ScatterPlotStarVsPSFG1', 'ScatterPlotResidualVsPSFG1']"
```
.  For multiple CCDs, mean and std is calculated for each CCD, and linear regression is performed on these quantities. One can disable this feature by adding an option `scatterplot_per_ccd=False`. I found that sometimes linear regression on the mean and std for each CCD and that on all stars (without using the mean and std) is significantly different. Which should we believe? I guess the latter, but I would like to hear what you think.
Yes, sorry, that's fine.  I just pushed an update to do sky- and chip-level
`sigma` etc; can you handle the determinant radius calculation?

On Tue, Sep 16, 2014 at 9:37 PM, Hironao Miyatake <notifications@github.com>
wrote:

> In stile/hsc/base_tasks.py:
>
> > @@ -149,11 +151,14 @@ def run(self, dataRef):
> >              shape_masks = []
> >              for cols_list in sys_test_data.cols_list:
> >                  if any([key in cols_list for key in
> > -                                ['g1', 'g1_err', 'g2', 'g2_err', 'sigma', 'sigma_err']]):
> > +                                ['g1_sky', 'g1_err_sky', 'g2_sky', 'g2_err_sky',
> > +                                 'sigma_sky', 'sigma_err_sky',
> > +                                 'g1_chip', 'g1_err_chip', 'g2_chip', 'g2_err_chip',
> > +                                 'sigma_chip', 'sigma_err_chip']]):
>
> Yes, the transform corrects for distortion. I looked into det(A), where A
> is a transformation matrix, and this value changes at ~1% level across the
> chip.
>
> So I guess what we want to do is get sigma_sky and sigma_chip back and
> calculate determinant radius for each case. Does this sound reasonable?
> Melanie, sorry for additional work...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/msimet/Stile/pull/29/files#r17641607>.
>