msimet / Stile

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

#68 BinnedScatterPlotSysTest #73

Open msimet opened 9 years ago

msimet commented 9 years ago

Hi folks,

Here's a PR for branch #68, creating a new class of systematics test, the BinnedScatterPlotSysTest. The class takes an array and produces a scatter plot whose y-values are some function of the data; builtin options are mean, median, rms and count (just the number of objects in each bin). It can also take a callable function to perform on the data. I had to make some choices on defaults and parameter names but they're mostly described in the docstring for the BinnedScatterPlotSysTest--please feel free to suggest any alterations.

The BinnedScatterPlotSysTest is actually a child class of ScatterPlotSysTest, and calls the main method of that object to generate the scatter plot once we've done the appropriate calculation.

I also made some default choices for which of these we'd like in the HSC module and made adapters for those tests. (Eventually we should have a more flexible method of doing this, which will be part of branch #34.) Of particular note is the CountPerMagnitude adapter. Number density is hard because we'd have to know the area of each data set, but just counting objects is okay...do we think this is useful?

rmandelb commented 9 years ago

Of particular note is the CountPerMagnitude adapter. Number density is hard because we'd have to know the area of each data set, but just counting objects is okay...do we think this is useful?

It is useful, but I wonder if you could put a keyword for an optional area that the user could provide to make a number density? For example, if the dataset corresponds to a single focal plane and we think the area lost due to bright stars is negligible, or that the mask plane could be used to properly calculate an area, then it might be useful to be able to pass that information in to the routine.