menggu-astro / alfpy

alf in python
MIT License
0 stars 1 forks source link

allindices_py.dat issue #2

Open vvaleolivares opened 1 year ago

vvaleolivares commented 1 year ago

Dear @menggu-astro,

I have been trying to run your code, and I had the following error (see below). I was wondering if you share the allindices_py.dat file.

Thank you, Valeria

begin: smooth the models to the input instrumental resolution begin:read in index definitions ValueError: could not convert string to float: 'HdeltaF'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/volivares/Desktop/Scripts/alfpy/scripts/alf_build_model.py", line 312, in build_alf_model(filename, tag, pool_type = pool_type) File "/Users/volivares/Desktop/Scripts/alfpy/scripts/alf_build_model.py", line 204, in build_alf_model alfvar = setup(alfvar, onlybasic = True, pool = pool) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/volivares/Desktop/Scripts/alfpy/scripts/setup.py", line 488, in setup f99 = np.loadtxt("{0}infiles/allindices_py.dat".format(ALF_HOME)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/volivares/opt/miniconda3/envs/astropy/lib/python3.11/site-packages/numpy/lib/npyio.py", line 1356, in loadtxt arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/volivares/opt/miniconda3/envs/astropy/lib/python3.11/site-packages/numpy/lib/npyio.py", line 999, in _read arr = _load_from_filelike( ^^^^^^^^^^^^^^^^^^^^

menggu-astro commented 4 days ago

Sorry this is incredibly late and probably not useful anymore, but I made an update in setup.py so it can properly read the allindices.dat from original alf and we do not need the _py file anymore