msimet/Stile — pull request #29 by HironaoMiyatake (2014-08-18 20:36:25+00:00)
Title: #18

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.