1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Physics Why wouldn't astronomers use Mathematica?

  1. Jul 12, 2016 #1
    Mathematica is fully functional for daily astronomy data analyzing works, and it is much more convenient than python, so why can't them use Mathematica instead of python? It's like when you have warp drive you still travel through space using chemically powered traditional rockets, which is totally unnecessary.
     
  2. jcsd
  3. Jul 12, 2016 #2

    e.bar.goum

    User Avatar
    Science Advisor
    Education Advisor

    There's a few reasons why that I can think of (not an astronomer, but a physicist - the arguments in physics are the same). But the biggest reason for me is that Mathematica costs money for a yearly licence. You cannot guarantee that you'll be able to run the code in 5 years time. You can in python. I do use Mathematica, but not for essential tasks. Also, the syntax of python vs Mathematica makes python more appealing for those who know other languages. It's also more naturally used in a batch/large scale mode. Also, python has absolutely brilliant astronomy libraries - when Astronomy moved away from Fortran, Python would have been the most obvious choice.
     
  4. Jul 12, 2016 #3

    radium

    User Avatar
    Science Advisor
    Education Advisor

    Mathematica is best for symbolic manipulations. There are better programs for data analysis and numerics.
     
  5. Jul 12, 2016 #4

    MarneMath

    User Avatar
    Education Advisor

    I can't speak for why astronomers prefer one versus the other; however, I can speak to as why a person would generally prefer to use anything else besides Mathematica. Mathematica is wildly inefficient at actually handling data. The memory overhead and the insane amount of variables that the kernel creates in loops is simply asinine. Also when one tries to use Mathematica's internal parallel computing features, it isn't exactly uncommon for a parallel job to actually run slower than the original non-parallel job. Why does this happen? Poorly coded system of communication that literally spends more time talking to each other than actually doing the computing.
     
  6. Jul 12, 2016 #5

    e.bar.goum

    User Avatar
    Science Advisor
    Education Advisor

    Right. If I want to calculate an integral, I'll open Mathematica. If I want to process a 20GB data file, I'll use something else.
     
  7. Jul 13, 2016 #6

    analogdesign

    User Avatar
    Science Advisor

    I think a lot of e.bar.goum's arguments also apply for MATLAB. It's good for high-level modeling but is inefficient and outrageously expensive. More and more of my analysis and hardware test software is moving to Python. I haven't opened MATLAB in months.
     
  8. Jul 13, 2016 #7
    Agreed, include the yearly license for MATLAB being an order of magnitude higher than MATHEMATICA one can see why python is the obvious choice.
     
  9. Jul 13, 2016 #8

    phyzguy

    User Avatar
    Science Advisor

    There is another reason not to use proprietary codes like MatLab or Mathematica in addition to the cost. That is that the codes are proprietary, so you can't know for certain what they are doing. How do you know that the person who designed the Mathematica subroutine didn't make a mistake which caused you to publish erroneous data? With an open source code like Python, you can see exactly what the code is doing.
     
  10. Jul 14, 2016 #9
    Well you guys have made perfect sense, so perhaps I have to get use to python...
     
  11. Jul 14, 2016 #10

    boneh3ad

    User Avatar
    Science Advisor
    Gold Member

    I do like Python, but it is no faster than Matlab these days, actually, at least for the benchmarks I've seen. That, of course, does not account for bad code.
     
  12. Jul 14, 2016 #11

    ZapperZ

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    There is something truly odd here, not just with the original question, but with the responses that I have read in this thread.

    First of all, no one seems to question the validity of the premise, which is, to paraphrase, "Astronomers won't use Mathematica". You guys seem to just accept that, and try to justify why that is so. I never realized that this is an accepted FACT already. I must have missed the memo.

    So yes, I do question the validity of the starting premise. The OP never bothered to produce any argument or evidence to support the validity of that claim. In fact, I can show a counter example. In the book "The Paraboloidal Reflector Antenna in Radio Astronomy and Communication..." by Jacob Baars, he clearly stated this:

    So who said that astronomers don't use Mathematica, or wouldn't use Mathematica? You guys are trying to explain away what could possibly be a non-valid idea. That's like trying to come up with a reason why there are no pink unicorns.

    Zz.
     
  13. Jul 14, 2016 #12

    MarneMath

    User Avatar
    Education Advisor

    I think it has to do with the explicit question versus the implicit question. Surely Astronomers use mathematica and surely mathematica is valuable tool for some of them. That's the simple answer to the explicit question: Yes people use mathematica in the field of Astronomy and can do so over python if they choose. However, the implicit question seems to be that this individual appears to question why anyone would prefer python over mathematica. Thus the answers.
     
  14. Jul 14, 2016 #13

    ZapperZ

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Then you and I must read and infer things differently. I see no such inferences on a specific case or person based on (i) the topic and (ii) the very first post of this thread, which I quoted.

    Zz.
     
  15. Jul 14, 2016 #14

    MarneMath

    User Avatar
    Education Advisor

    That's fair enough. We are different people bound to see different things occasionally.
     
  16. Jul 23, 2016 #15
    This may be of some interest:

    Here is a page that describes a number of alternatives to Mathematica with varying strengths and functionalities, as well as a whole range of user licenses (some free, some paid). Good descriptions of what each software does and does not do, likely users, cost, etc.

    Check it out.

    http://alternativeto.net/software/mathematica/

    diogenesNY
     
  17. Jul 24, 2016 #16
    I prefer Scientific Workplace and Maple for symbolic computing. For data analysis, I think Python is the most compatible with OS's and other languages (and I love Spyder!). Mathematica is good for making pretty plots and animations.
     
  18. Jul 26, 2016 #17
    It varies but a personal anecdote: I was running a PDE solver (finite difference scheme, uniform grid) on Matlab and it would take 15 minutes on my laptop. I am more familiar with Python and wanted to make some changes to the existing code, so I tediously converted the original code to Python (the syntax is fairly similar). When I ran it on Python, I got the exact same output and it took 20 seconds.
     
  19. Jul 27, 2016 #18
    Could it have been because you were using row-major-order or column-major-order (or vice versa) in one but not the other?
     
  20. Jul 27, 2016 #19
    Numpy uses row-order and Matlab column-order, but in my case I was considering a 2D domain with an equal number of grid points on each axis. So I doubt this was the main cause.
     
  21. Jul 27, 2016 #20

    DrClaude

    User Avatar

    Staff: Mentor

    Considering the huge difference in execution time, I suspect that the Matlab code was not written properly. Matlab has a few idiosyncrasies and many people who are used to languages like C often produce code that runs extremely slowly (for instance, by using loops instead of vector operations).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Why wouldn't astronomers use Mathematica?
  1. Astronomer and Inventor. (Replies: 15)

Loading...