Skip to content
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

Some documentation errors I noticed #52

Open
MWSammons opened this issue Jun 20, 2024 · 0 comments
Open

Some documentation errors I noticed #52

MWSammons opened this issue Jun 20, 2024 · 0 comments

Comments

@MWSammons
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant