-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pull Request #3
base: master
Are you sure you want to change the base?
Pull Request #3
Conversation
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.
Very cool code!
In general, the logfac variable should be clarified throughout, and I've added some specific comments throughout the code.
A few of the plots are missing axis labels, and the log10(factor) label should be clarified (if it's flux or something else?).
For the plots that have the divergent color map, is the color indicating something? (I.e. red-young, blue-old etc.) If so, maybe add a legend or annotation to the plot indicating the reason.
line.py
Outdated
|
||
# Define the probability function as likelihood * prior. | ||
def lnprior(theta): | ||
m, b, lnf = theta |
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.
Add a docstring at the beginning of each definition explaining its functionality
"import scipy.constants as con\n", | ||
"\n", | ||
"# Get the data using the astropy ascii\n", | ||
"data = ascii.read(\"SED.dat\",data_start=4)\n", |
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.
Maybe comment where you are sourcing the data from?
" logpriors[0] = -1.0e99 # -infinity\n", | ||
" \n", | ||
" # Prior for theta[1]: logfac~U[logfacmin,logfacmax]\n", | ||
" logfac = theta[1]\n", |
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.
For logfac, try to give a clearer variable name. If it's a log factor of flux, you can label logfac_flux. (In Sublime you can replace every instance of a variable name at once by ctrl+command+G once the cursor is in an instance.)
mcmc_test/Log_of_planck_function.py
Outdated
b = (h*c)/k | ||
|
||
def my_own_Planck(x,T): | ||
#x is the wavelength |
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.
These comments can be written as docstrings in this manner
''' Docstring goes here.'''
@@ -0,0 +1,11 @@ | |||
Column #1 = Wavelength [microns] |
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.
Indicate where the data source is , in comments or a docstring
Looks great! The only two comments that I have are to change initial comments in functions to docstring format and to change the orientation of the colorbar title to the same orientation as the y-axis title.
|
No description provided.