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

Pull Request #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

MishaSavchenko
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@elliesch elliesch left a 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
Copy link
Collaborator

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",
Copy link
Collaborator

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",
Copy link
Collaborator

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.)

b = (h*c)/k

def my_own_Planck(x,T):
#x is the wavelength
Copy link
Collaborator

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]
Copy link
Collaborator

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

@elliesch
Copy link
Collaborator

elliesch commented May 15, 2017

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.

'''This is docstring format.'''
#This is comment format.

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

Successfully merging this pull request may close these issues.

3 participants