Best place to specify rbins in SurfaceMassDensity?
Currently the user specifies the radial bins when instantiating SurfaceMassDensity() (or else default rbins are set). These bins are then passed on to the methods that calculate the profiles. It might make more sense to specify the bins when calling either of sigma_nfw() and deltasigma_nfw() instead, for two reasons:
- If the user wanted to change the radial bins they were using, they would currently have to instantiate a new object, which has some overhead.
- Conceptually, it might be nice to separate the physical properties of the clusters, which are used to create a
SurfaceMassDensity()object, from the arbitrary choice of radial bins at which the profile will be calculated.
On the other hand, the sigma_nfw() and deltasigma_nfw() methods are interconnected, in that the latter actually relies on the former when it can (when sigma has already been calculated) in order to minimize the number of calculations it has to do. If the user wanted to calculate both of these profiles using different rbins for each, the code would need to have checks in place to ensure it uses sigma at the correct radius for calculating deltasigma.