msimet / Stile

Stile: the Systematics Tests In Lensing pipeline
BSD 3-Clause "New" or "Revised" License
9 stars 6 forks source link

#49 ability to plot requirements curves #112

Open msimet opened 6 years ago

msimet commented 6 years ago

This PR adds the functionality of plotting requirements curves in calls to the plot() method of the CorrelationFunctionSysTests and the ScatterPlotSysTests, with some control of how those new curves look, and adds unit tests for this functionality. I made some interface choices here that could use a second pair of eyes: for example, you can plot requirement curves for b-mode and e-modes in the CorrFuncSysTests, but not the imaginary parts of any correlation function that has them; also that this is not included in the legend (which would be difficult for the scatter plots, but easy for the correlation function plots).

Additionally, this PR fixes a bug relating to how versions of matplotlib report colors.

The unit tests more or less only tell you if the code runs, but if you want to see the plots, you can add .savefig() commands in those unit tests to examine what they look like.

Finally, I'll note that this PR should be merged (and possibly reviewed) after branch #98, since I needed to merge that functionality in here to get the unit tests to run at all!