wtbarnes / fiasco

Python interface to the CHIANTI atomic database
http://fiasco.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
20 stars 15 forks source link

`IonCollection.radiative_loss` should respect density-temperature coupling #231

Open wtbarnes opened 1 year ago

wtbarnes commented 1 year ago

219 added the ability to couple the temperature and density axes when computing the level populations. This should also be an option when computing the radiative loss. While the keyword will propagate appropriately, the shape of the total radiative loss will be wrong because it does not account for temperature and density being potentially dependent axes:

https://github.com/wtbarnes/fiasco/blob/bb4670e2df538c674149285235d9555f736d0960/fiasco/collections.py#L272

There should be an additional if block that makes the density dimension length 1 if the couple_density_temperature kwarg is set.