asteca / ASteCA

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

RDP function stores incorrect radii values #378

Closed Gabriel-p closed 5 years ago

Gabriel-p commented 6 years ago

The radial_dens_prof() function stores as the raddi values the quantity

clp['bin_width'] / 2. + (clp['bin_width'] * i)

where i is the square ring being processed (see image below). This means that stars located in a corner of these square rings will be stored as having a distance :

d =  bw*i + bw/2

when in reality they are located at a radius of:

r = sqrt(d**2 + d**2) = sqrt(2) * d

This means that (for this extreme position) the distance currently used is only 70% (d=1/sqrt(2)*r) of the actual distance.

Gabriel-p commented 5 years ago

This is no longer the case thanks to the 'circular rings' method developed here https://github.com/asteca/ASteCA/commit/a80542602abc11f4e7a0d0774cf2f30630da7da7