Labels

Friday, October 14, 2022

using matplotlib in C++

g++  -I/usr/include/python3.5/  -I/home/user/.local/lib/python3.5
/site-packages/numpy/core/include /usr/lib/x86_64-linux-gnu/libpython3.5m.so 
test.cc
// complie in a chromebook linux

#include "matplotlibcpp.h"
#include <vector>

namespace plt = matplotlibcpp;

int main() {
  std::vector<double> y = {1, 3, 2, 4};
  plt::plot(y);
  plt::savefig("minimal.pdf");
  plt::show();
}

Reference: 
https://matplotlib-cpp.readthedocs.io/en/latest/examples.html 
http://hilite.me/

Tuesday, September 6, 2022

Pick-up ions

Interstellar gas that approaches the Sun is ionized and accelerated by the convective electric field to solar wind speed, yielding interstellar pickup ions. These ions move with the solar wind bulk speed when averaged over a gyro orbit in the solar wind frame. Their instantaneous speed as they gyrate varies from zero to two times the solar wind speed, which is why their distribution function shows a cutoff at twice the bulk speed in the inertial frame.

The charge-exchange and photoionization process can ionize the interstellar neutral atoms in the inner heliosphere and form the pick-up ions.

\[  p^+(\mathbf v_{sw})  +H( \mathbf v_{ISM} \to H( \mathbf v_{sw}) + p^+(\mathbf v_{ISM}) \]

$\mathbf v_{ISM}$ has a magnitude of only 25 km/s. In the solar wind frame, a proton near zero velocity is suddenly replaced by a proton (from ionization) which is born with an initial velocity approximately equal to $-\mathbf v_{sw}$.

The new born proton gyrates around the magnetic field. In the case of solar wind flow perpendicular to $\mathbf B_{sw}$, the initial gyrospeed is $v_{sw}$ and so the picked-up proton moves on a circle. In the Sun's frame, the energy of the pick-up ion varies between zero and 4 times the solar wind proton energy. The extra energy comes from the convection electric field when it accelerates the pickup ion into its gyromotion. The consequence is that the solar wind flow must slow down to accommodate this energy flow into pickup ions.


Reference:

supra-thermal ions in the outer heliosphere

http://www.physics.usyd.edu.au/~cairns/teaching/lecture12/node6.html


 

Wednesday, August 31, 2022

academic resources


https://www.nhfp-equity.org/resources-for-applicants

providing application resources that are accessible to early career astronomers around the world

cs-sop.org

a platform with statements of purpose generously shared by previous applicants to CS PhD programs

proposal 

https://static1.squarespace.com/static/6021c6e44248e2593056aa87/t/630f9b11b79af6224c4fe064/1661967123414/Griffith_NSF_Proposal.pdf


https://serinachang5.github.io/assets/files/research-statement.pdf


https://www.broekgaarden.nl/floor/wordpress/eca-resources-applying-for-phd-postdoc-faculty-and-more/

https://anjalief.github.io/statements.html

https://sylviaherbert.com/

Monday, August 29, 2022

How to be a good reviewer for scientific journal

 Ask the following questions:

a) Do the abstract and introduction clearly identify the need for this research, and its relevance?

b) Are the results presented clearly and logically, and are results justified by the data by the data provided? Are the figures clear and fully described?

c) Does the conclusions justifiably respond to the main questions posed by the authors in the introductions?

Full peer-review document includes:

a) Introduction: Mirror the article, state your expertise and whether the paper is publishable or weather there are fatal flaws;

b) Major flaws;

c) Minor flaws;

d) suggestions and final comments.


Reference:

How to write a thorough peer review

Sunday, May 30, 2021

SSH free password login

step1 :  Create public and private keys using ssh-key-gen on local-host

$ssh-keygen

step 2: Copy the public key to remote-host using ssh-copy-id

$ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host

step 3: login remote host and change file permission

Change the permissions of .ssh to 700

$chmod 700 .ssh

Change the permissions of .ssh/authorized_keys to 640

$chmod 640 .ssh/authorized_keys

step 4: login from local host
ssh remote-host

(Optional) Alias for remote-host name
In local host
$vi .ssh/config
and add following lines
    Host short-name
    Hostname remote-host-name
    User your_user_name
    Port your_remote_host _port