Skip to content

Commit

Permalink
[DOC] Minor README.md update
Browse files Browse the repository at this point in the history
  • Loading branch information
dutta-alankar committed Dec 11, 2023
1 parent eb65c17 commit efa478b
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ fOVI = pow(10, fOVI)
print(f"f_OVI = {fOVI:.3e}")
```

f_OVI = 9.463e-02


**Note**:
- Ionization fraction returned by `AstroPlasma` is in **log10** scale.
- As of now, we **do not** support vectorization of these functions and indivdual values must be passed and **not** arrays. This can lead to errors or un-defined behavior.
Expand Down Expand Up @@ -192,9 +189,6 @@ ne = num_dens(nH = nH,
print(f"Free electron density = {ne:.3e} cm^-3")
```

Free electron density = 1.410e-04 cm^-3


In order to get
- **total particle number density**, use `part_type = "all"`
- **total ion number density**, use `part_type = "ion"`
Expand Down Expand Up @@ -241,11 +235,6 @@ print(f"Total neutral particle density = {nn:.3e} cm^-3")
print(f"Total HI particle density = {nHI:.3e} cm^-3")
```

Total particle density = 2.714e-04 cm^-3
Total ion density = 1.308e-04 cm^-3
Total neutral particle density = 1.113e-10 cm^-3
Total HI particle density = 1.099e-10 cm^-3

Although it is straightforward to obtain mean particle mass, we provide functions to so for the convenience of the user. We use the following relation for calculating these quantities.

$$\rho = n \mu m_p = n_e \mu_e m_p = n_i \mu_i m_p = n_H m_H X^{-1}$$
Expand Down Expand Up @@ -280,11 +269,6 @@ print(f"Mean free electron mass = {mu_e:.2f} mp")
print(f"Mean ion mass = {mu_i:.2f} mp")
```

Mean particle mass = 0.62 mp
Mean free electron mass = 1.19 mp
Mean ion mass = 1.28 mp


### Emission spectrum

`AstroPlasma` can be used in determing the emission spectrum emitted from a *one-zone* plasma. Here's the code that does that. This can be used as a starting point for modeling plasma emission from astrophysical objects like the *circumgalactic medium* or *galaxy clusters* by stacking emission from multiple such one-zones.
Expand Down Expand Up @@ -390,7 +374,7 @@ All the codes required to generate the `Cloudy` database is in `cloudy-codes` di
- export `AstroPlasma/cloudy-codes/ionFrac/src` to `LD_LIBRARY_PATH`
- Inside the `AstroPlasma/cloudy-codes/ionFrac/generateIonFraction-parallel.py` script, change the parameters (`total_size`, `batch_dim`, `nH`, `temperature`, `metallicity`, `redshift`) to desired resolution and range.
- Now one can run this script in parallel using `mpiexec -n <nproc> python generateIonFraction-parallel.py`. I have tested this using `Python 3.11.6` with `mpi4py`, `numpy`, `h5py` and `colorama` packages installed.
**Note for cluster usres**: A sample slurm command that can be copied and executed from the terminal of a cluster is also provided in `slurm-python-job`. However, this neededs tweaking according the specifics of the cluster. Since, this job runs interactively, it is advisable to use something like gnu `screen` ot `tmux` to run this in a detached terminal as using these tools, interruptions in the connection to the cluster won't the kill the job. Also, the user need to make sure that the binaries compiled should be compiled for the compute nodes and not the login nodes if they are of different configuration.
**Note for cluster usres**: A sample slurm command that can be copied and executed from the terminal of a cluster is also provided in `slurm-python-job`. However, this neededs tweaking according the specifics of the cluster. Since, this job runs interactively, it is advisable to use something like gnu `screen` ot `tmux` to run this in a detached terminal as using these tools, interruptions in the connection to the cluster won't the kill the job. Also, the user need to make sure that the binaries compiled should be compiled for the compute nodes and not the login nodes if they are of different configuration. One can see the progress of the run in the log files generated by slurm. For example, `tail -F ~/AstroPlasma/cloudy-codes/ionFrac/IonCloudy-2325.log` enables you see the status of the running job with jobID `2325` in this example.
- Upon successful run, several ascii files with `ionization` in their name will get generated in a directory called `auto` that is created in `AstroPlasma/cloudy-codes/ionFrac/src`. The final `hdf5` files for the database is created in the `data` directory in`AstroPlasma/cloudy-codes/ionFrac/src`. This directory should be copied to `AstroPlasma/astro_plasma/data/` and renamed as `ionization`.
- Generating *emission* data
- The steps are similar as above. But in this case both `libcloudy.so` and `cloudy.exe` files need to be copied to `AstroPlasma/cloudy-codes/emmSpec/` from `source/sys_gcc_shared` directory of `Cloudy`.
Expand Down

0 comments on commit efa478b

Please sign in to comment.