Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Press-Schechter function in python

  1. Jun 27, 2014 #1
    I want to write program in python that gives "redshift", range of "M" and range of "dn/dM" as input and plots "Press-Schechter" function and delivers a graph as output. would you please give some hints? I'm beginner in programming and I don't know how to start.
     
  2. jcsd
  3. Jun 28, 2014 #2

    Chalnoth

    User Avatar
    Science Advisor

    A good place to start learning Python would probably be the tutorials over at python.org, for example:
    https://docs.python.org/3.4/tutorial/introduction.html

    The full tutorial can be found here:
    https://docs.python.org/3.4/tutorial/index.html

    If you can get some understanding of python, when it's time to do the calculation you'll probably need to make use of the Python math library:
    https://docs.python.org/3.4/library/math.html

    In particular you'll have to use math.exp(), math.pi, math.sqrt(), and math.pow().

    To display the graph, try making use of pyplot:
    http://matplotlib.org/api/pyplot_api.html
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Press-Schechter function in python
  1. Correlation functions (Replies: 3)

Loading...