Commit ff711dac authored by rfetick's avatar rfetick
Browse files

update setup

parent 837288ad
......@@ -157,20 +157,20 @@ class Instrument(object):
with open(filename,'w') as f: _yaml.dump(data,f)
#%% LOAD INSTRUMENT INSTANCES (make them attributes of this module)
_this_module = _sys.modules[__name__]
_d = _get_data_folder()
_l = [_f for _f in _os.listdir(_d) if _f.endswith('.yml')]
for _f in _l:
with open(_d+_f,'r') as _fi:
_i = _yaml.full_load(_fi)
_instru = Instrument(D=_i['d'],occ=_i['occ'],res=_i['res'],gain=_i['gain'],ron=_i['ron'],Nact=_i['nact'])
_instru.name = _i['name']
_instru.fullname = _i['fullname']
_instru.filters = _i['filters']
_instru.phasemask_path = _i['phasemask_path']
_instru.phasemask_shift = _i['phasemask_shift']
_n = _i['name'].lower().replace(" ","_") # format name
setattr(_this_module,_n,_instru)
del _this_module, _d, _l, _f, _instru, _fi, _i, _n
#_this_module = _sys.modules[__name__]
#_d = _get_data_folder()
#_l = [_f for _f in _os.listdir(_d) if _f.endswith('.yml')]
#for _f in _l:
# with open(_d+_f,'r') as _fi:
# _i = _yaml.full_load(_fi)
# _instru = Instrument(D=_i['d'],occ=_i['occ'],res=_i['res'],gain=_i['gain'],ron=_i['ron'],Nact=_i['nact'])
# _instru.name = _i['name']
# _instru.fullname = _i['fullname']
# _instru.filters = _i['filters']
# _instru.phasemask_path = _i['phasemask_path']
# _instru.phasemask_shift = _i['phasemask_shift']
# _n = _i['name'].lower().replace(" ","_") # format name
# setattr(_this_module,_n,_instru)
#
#del _this_module, _d, _l, _f, _instru, _fi, _i, _n
......@@ -15,7 +15,7 @@ setup(name='MAOPPY',
author='Romain JL Fetick (LAM, Marseille, France)',
author_email='romain.fetick@lam.fr',
description='Modelization of the Adaptive Optics Psf in PYthon (MAOPPY)',
package_data={'maoppy': ['./maoppy/data/*.yml']},
package_data={'maoppy': ['data/*.yml']},
include_package_data=True,
packages=find_packages(exclude=['example','test']),
requires=['numpy','scipy','astropy'],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment