icksa/opacplot2 — pull request #1 by rth (2012-06-28 12:40:52+00:00)
Title: added a couple of fuctions to opacplot2

Hello Milad,

I just added a couple of functions try to automate generation of IONMIX tables from sesame.

Basically I added the opp.adapt.EosMergeGrids to merge electron and ion grids when they are almost the same except for a few points (as it is often the case in Sesame):
```python
>> eos_sesame = opp.adapt.OpgSesame("../sesame/xsesame_ascii", opp.OpgSesame.SINGLE,verbose=False)
>> eos_data = eos_sesame.data[3720] # Al
>> eos_data_filtered = opp.adapt.EosMergeGrids(eos_data,
intersect=['ele', 'ion', 'ioncc'], # merge ele, ion and ioncc grids
filter_temps=lamda x: x>1.) # remove temperatures below 1eV
```
Now ```eos_data_filtered``` would have exactly the same structure as ```eos_data``` except that it would only contain grid points that are present for both the 'ele', 'ion' and 'ioncc'.

Then the points we want to filter out can then be written down in ```opp.presets.eos_seame.py```.
This would allow to call simply
```bash
opacplot2 -d /home/user/sesame_dir -n 3720
```
to produce this EoS table. It's not working for the zbar yet, though.

There shouldn't be any issues with backward compatibility, except that I removed
```ndens, ntemps``` from ```writeIonmixFile```'s arguments as they can be computed from ```dens, temps```

There are also some scripts to visualize the eos and the partial derivatives in /visualization.

I'll send you a mail, to speak more about this,

Roman