PyFits issue

29 views
Skip to first unread message

Jiahui Huang

unread,
Apr 22, 2025, 2:26:49 AMApr 22
to py...@googlegroups.com
Hi PyNeb developers,

I’m currently trying to use PyNeb to calculate H-alpha emissivity. But I got the following error:

pyneb.utils.logging.PyNebError: 'No TEMP field in h_i_rec_SH95.hdf5’

I don’t know whether it is related to pyfits, but it seems pyfits cannot be installed with Python 3.13.

Here’s the result I printed with print(pyneb.config.INSTALLED):

{'plt': True, 'scipy': True, 'mp': True, 'Chianti': False, 'Stout': False, 'pyfits from astropy': False, 'pyfits': False, 'h5py': True, 'astropy Table': False, 'cvxopt': False, 'ai4neb': False}

It seems pyneb cannot use pyfits from astropy even if I have astropy installed.

Do you have any ideas about how to solve this problem without downgrading python3?

Best,
Jiahui

Christophe Morisset

unread,
Apr 22, 2025, 7:11:29 PMApr 22
to PyNeb
Hi Jiahui,
Could you try to run

import astropy
import astropy.io.fits as pyfits
from astropy.table import Table

from the same place you are trying to run pyneb?
Ch.

黄佳辉

unread,
Apr 22, 2025, 9:21:47 PMApr 22
to PyNeb
Hi Christophe,

It looks like I'm lacking a package named bz2 so I cannot import astropy.io.fits. I'm trying to solve this. I will ask if I have further questions. Thank you!.

Jiahui

黄佳辉

unread,
Apr 24, 2025, 3:39:18 AMApr 24
to PyNeb
Hi Chirstophe,

I'm trying to calculate the Halpha emission in high temperature cases (like >10^4 K). But I found that Halpha emissivity data is not available at this high temperature range in PyNeb. Is it possible to use PyNeb to calculate recombination lines in this temperature range?

Jorge García Rojas

unread,
Apr 24, 2025, 4:10:18 AMApr 24
to 黄佳辉, PyNeb
Dear Jiahui,

in PyNeb, Halpha emissivities can be recovered until Te=30000 K interpolating from Storey & Hummer (1995) tables so, in principle, there should not be a problem to recover any value between 10^4 and 3x10^4 K.

cheers,

Jorge
> --
> You received this message because you are subscribed to the Google Groups "PyNeb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pyneb+un...@googlegroups.com.
> To view this discussion, visit https://groups.google.com/d/msgid/pyneb/f2a86d88-70e0-4a77-920a-d358ea1720d4n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages