asteca / ASteCA

Code for the ASteCA package.
http://asteca.github.io/
MIT License
18 stars 6 forks source link

Remove KDE p-test and replace with a Hess diagram #356

Closed Gabriel-p closed 5 years ago

Gabriel-p commented 6 years ago

The KDE p-test that compares field regions with the cluster region serves little purpose. Replace it with a Hess diagram (see #255) and see if it can be used instead in the best fit process (see #188)

Also add a new "contamination index" that takes into account not the density difference between cluster and the field region, but how "similar" the CMD's of cluster vs field regions are (this is close to a likelihood comparision). Steps:

  1. Generate the cluster region (center + radius) with N stars
  2. Generate its KDE and a grid (using some method)
  3. Evaluate the cluster's KDE in the grid
  4. Repeat M times
    1. Define a random field region selecting N random stars from outside the cluster region
    2. Generate its KDE
    3. Evaluate the random field's KDE in the grid
    4. Compare this evaluated grid with the cluster's values using a chi-square
    5. Store the chi-square
  5. Average all chi-squares <-- This is the new CI

Here's a method to select a KDE's bandwidth: In-Depth: Kernel Density Estimation

Gabriel-p commented 5 years ago

I replaced the KDE test with an Anderson-Darling test.

I also added a KDE cluster-field CMD, instead of a Hess diagram.

Comparing two 2D KDEs is not trivial, so this new CI will have to wait. In any case, the A-D test is more or less that: a comparision of the cluster region with the field regions.

Closing after this commit: https://github.com/asteca/ASteCA/commit/3f2fe001a08e15a51c88b08540ee69da0c058d14