Skip to content
Snippets Groups Projects
Commit ff711dac authored by rfetick's avatar rfetick
Browse files

update setup

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