-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hey @cwjames1983, as I've been digging around in the code for use in some lensing calculation I noticed a couple of errors (I think) in the documentation that I figured I should note down.
In parameters.py
class WidthParams(data_class.myDataClass):
Wlogmean: float = field(
default=1.70267,
metadata={
"help": "$\log_{10}$ mean of intrinsic width distribution in ms",
"unit": "ms",
"Notation": "\mu_{w}",
},
)
Wlogsigma: float = field(
default=0.899148,
metadata={
"help": "$\log_{10}$ sigma of intrinsic width distribution in ms",
"unit": "ms",
"Notation": "\sigma_{w}",
},
)
The help descriptor for both of these says they are log_10 of the respective parameters, but they are actually used as if they are the natural log, i.e. in the geometric_lognormals function in survey.py
#draw from both distributions
np.random.seed(1234)
x1s=np.random.normal(lmu1,ls1,Nrand)
x2s=np.random.normal(lmu2,ls2,Nrand)
ys=(np.exp(x1s*2)+np.exp(x2s*2))**0.5 #here you can see they are being used as e^x not 10^x
The other one I noticed was in the survey_data.py class
NBINS: int = field(
default=0,
metadata={'help': "Number of bins for width analysis",
'unit': '',
'Notation': '',
})
The help here says the NBINS parameter is for the width distribution, but this parameter is actually for the number of beam graduations used in the analysis. The number of bins for the width distribution is set in parameters.py along with the other parameters I mentioned initially. Chances are these don't impact much but in case they do now we know.