-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to the Radial Range that Subhalo Density Profiles are Tabulated when Fitting TNFW Profile #483
Improvements to the Radial Range that Subhalo Density Profiles are Tabulated when Fitting TNFW Profile #483
Conversation
Also fix some minor formatting and spelling issues.
if (radiusOuter > radiusVirial) then | ||
radiusMaximumCountRadii=int(log10(radiusMaximumScaleVirialMaximum)*dble(radiusMaximumCountRadiiPerDecade)+1.0d0) | ||
factorStepRadius = log10(radiusMaximumScaleVirialMaximum)/dble(radiusMaximumCountRadii ) | ||
do i=1,radiusMaximumCountRadii |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was previously:
do n=1,radiusMaxiumCountRadii
radiusMaximum =10**(log10(radiusVirial)+step*dble(i))
So the loop variable was n
but on the following line it used i
to increment radiusMaximum
. Most likely i=0
initially, so this would not have actually increased radiusMaximum
, leaving it always equal to radiusVirial
. I've corrected this (just using i
as the loop variable), but it would be good if you can check if this still gives good results for the fits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recompiled and re-ran the parameter with the bug fixed. The fits look good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good - I saw one issue with a difference between the name of a loop variable and the variable actually used in the loop (see other comment). I've fixed this, but let's check if the results still look good after this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests have already passed, and since the fits still look good with the previous fix, this is ready to merge.
Changed the range of radii at which the density profile is tabulated at when fitting TNFW profiles. Before the density was tabulated to the outer radius (where the radius encloses the bound mass or the total mass (of the subhalo), whichever is smaller). This definition led to the maximum radius taking on very large values in some cases. To fix this, the following changes have been implemented: