Posts

Mayavi and Spyder

 Mayavi and Spyder don't seem to get along. I am doing some mlab.points3D plotting. The Mayavi Scene keeps hanging. It works sometimes, but doesn't most of the time. But, if I run the same script from IDLE, it works fine. I'm yet to figure out what's going on.

Resolving FORTRAN 77 Errors

Cannot assign to a named constant at (1) Probably trying to assign something to an array, e.g. MYARR(I)=5.E0. The array was not declared in the DIMENSION or COMMON blocks. Just add MYARR (100) or whatever size to one of the above. The function result on the lhs of the assignment at (1) must have the pointer attribute. Seems to be the same as above, maybe for 2D arrays(?) Type mismatch in argument 'xx' at (1); passed INTEGER(4) to REAL(8) The variable, XX is an argument in some function. When you are calling the function, you are passing some variable, named say NDIME. If there's this line in your code:  IMPLICIT REAL*8(A-H,O-Z), it means all variables whose names start with letter between H and O (not included) are integers. So, either: Check whether that's the correct variable you want to pass If so, give a different name, starting with letters A-H, O-Z More actual than formal arguments in procedure call at (1) You're function has 2 arguments, but you're c...

Using plain Spyder

 I used to work with the default Python IDLE for short scripts. When I needed to manage a larger project, I installed Spyder. But, simply downloading Spyder from the website and installing has it's own difficulties. It comes with it's own Python interpreter, making installation of modules complicated. For using plain Spyder with Anaconda or anything, here is what worked for me: Install Python interpreter From cmd, do 'pip install sypder' To run spyder, just type 'spyder' That's it! Now you have Spyder without any external interpreter. All modules can be installed normally with pip install and accessed from Spyder. (this was successfully tested on Windows 10 with Python 3.9) Edit: Issues on Python 3.10: "cannot import name 'MutableMapping' from 'collections'"

Wired article on the benefits of 'active rest'

https://www.wired.com/story/why-you-should-slack-off-to-get-some-work-done/?utm_brand=wired&utm_social-type=owned&mbid=social_facebook&utm_source=facebook&utm_medium=social&fbclid=IwAR08YoHEzI9PMQH-mUWOse4Fq_mPChQS9HgrKtA9X2lLg4FwLMNLzFF2bYA   They write, " Their leisure was regenerative because it was woven of intentional activity, stimulating the mind and the spirit , " speaking of the likes of Darwin, who they say effectively worked only 4 hours a day.

Reexamining constant acceleration motion in high school physics

Consider the problem of motion in a straight line with constant acceleration. A complete description of the motion involves 5 quantities: the initial velocity ($u$), the time elapsed ($t$), the displacement ($s$), the final velocity ($v$), and the acceleration ($a$). These quantities are, of course, not independent of one another - they are related via physical equations and knowing some can let us know others. So, an important question is: how many of these quantities do we need to know in order to know everything about the motion? It turns out, we need to know 3 of the 5 quantities. For instance, if we know the initial velocity, the acceleration, and the time elapsed, then we can find the both the final velocity and the displacement. We do so by using the following two equations of motion: (i)      $v-u=at$ (ii)      $s=ut+{1/2}at^2$ Both the above equations arise from how we define acceleration and velocity. Acceleration, being the rate of change of...