aasensio / hazel2

Hazel v2.0: synthesis and inversion of Stokes profiles caused by the joint action of atomic level polarization and the Hanle and Zeeman effects

Home Page:https://aasensio.github.io/hazel2/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working generator 'hsra'

Hypnus1803 opened this issue · comments

I am trying to use the automatic generator as it is suggested in the documentation but I am getting an error.

import hazel
tmp = hazel.tools.File_photosphere(mode='single')
tmp.set_default(n_pixel=1, default='hsra')

Setting photosphere to model hsra
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-15-9ba840c2d3ab> in <module>()
----> 1 tmp.set_default(n_pixel=1, default='hsra')

~/anaconda3/lib/python3.6/site-packages/hazel-2018.9.22-py3.6-macosx-10.9-x86_64.egg/hazel/tools.py in set_default(self, n_pixel, default)
    171         path = str(__file__).split('/')
    172         filename = '/'.join(path[0:-1])+'/data/{0}.1d'.format(default)
--> 173         f = open(filename, 'r')
    174         f.readline()
    175         ff = float(f.readline())

FileNotFoundError: [Errno 2] No such file or directory: '/Users/joseivan/anaconda3/lib/python3.6/site-packages/hazel-2018.9.22-py3.6-macosx-10.9-x86_64.egg/hazel/data/hsra.1d'

The only one file that exists inside of data folder is LINEAS*. Thanks in advance.

You are right. I've updated the MANIFEST.in file to copy these files to the appropriate place during installation. Can you check that it works now?