Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
maoppy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LAM-GRD-public
maoppy
Commits
ff711dac
Commit
ff711dac
authored
4 years ago
by
rfetick
Browse files
Options
Downloads
Patches
Plain Diff
update setup
parent
837288ad
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
maoppy/instrument.py
+16
-16
16 additions, 16 deletions
maoppy/instrument.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
17 additions
and
17 deletions
maoppy/instrument.py
+
16
−
16
View file @
ff711dac
...
...
@@ -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
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
ff711dac
...
...
@@ -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
'
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment