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
1f416750
Commit
1f416750
authored
4 years ago
by
rfetick
Browse files
Options
Downloads
Patches
Plain Diff
Add phasemask shift
parent
b19f2653
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
maoppy/data/muse_nfm.yml
+3
-0
3 additions, 0 deletions
maoppy/data/muse_nfm.yml
maoppy/data/zimpol.yml
+3
-0
3 additions, 0 deletions
maoppy/data/zimpol.yml
maoppy/instrument.py
+7
-3
7 additions, 3 deletions
maoppy/instrument.py
with
13 additions
and
3 deletions
maoppy/data/muse_nfm.yml
+
3
−
0
View file @
1f416750
...
...
@@ -6,5 +6,8 @@ nact: 39
name
:
MUSE_NFM
occ
:
0.14
phasemask_path
:
null
phasemask_shift
:
!!python/tuple
-
0.0
-
0.0
res
:
1.1977272727272726e-07
ron
:
15.0
This diff is collapsed.
Click to expand it.
maoppy/data/zimpol.yml
+
3
−
0
View file @
1f416750
...
...
@@ -12,5 +12,8 @@ nact: 40
name
:
ZIMPOL
occ
:
0.14
phasemask_path
:
null
phasemask_shift
:
!!python/tuple
-
0.0
-
0.0
res
:
1.69683257918552e-08
ron
:
20.0
This diff is collapsed.
Click to expand it.
maoppy/instrument.py
+
7
−
3
View file @
1f416750
...
...
@@ -29,6 +29,7 @@ def load(name):
instru
.
fullname
=
d
[
'
fullname
'
]
instru
.
filters
=
d
[
'
filters
'
]
instru
.
phasemask_path
=
d
[
'
phasemask_path
'
]
instru
.
phasemask_shift
=
d
[
'
phasemask_shift
'
]
return
instru
#%% INSTRUMENT CLASS
...
...
@@ -75,9 +76,10 @@ class Instrument(object):
self
.
name
=
"
default
"
# unique identifier name
self
.
fullname
=
"
MAOPPY Instrument
"
# human readable name
# phasemask (not
us
ed yet)
# phasemask (not
test
ed yet)
self
.
phasemask_enable
=
False
self
.
phasemask_path
=
None
self
.
phasemask_shift
=
(
0.0
,
0.0
)
self
.
_phasemask
=
None
def
__repr__
(
self
):
...
...
@@ -117,8 +119,9 @@ class Instrument(object):
x
=
np
.
arange
(
p
.
shape
[
0
])
/
p
.
shape
[
0
]
y
=
np
.
arange
(
p
.
shape
[
1
])
/
p
.
shape
[
1
]
self
.
_phasemask
=
interp2d
(
x
,
y
,
p
)
x
=
np
.
arange
(
Npix
[
0
])
/
Npix
[
0
]
-
0.5
/
Npix
[
0
]
y
=
np
.
arange
(
Npix
[
1
])
/
Npix
[
1
]
-
0.5
/
Npix
[
1
]
cx
,
cy
=
self
.
phasemask_shift
x
=
np
.
arange
(
Npix
[
0
])
/
Npix
[
0
]
-
cx
/
Npix
[
0
]
y
=
np
.
arange
(
Npix
[
1
])
/
Npix
[
1
]
-
cy
/
Npix
[
1
]
wf
=
self
.
_phasemask
(
x
,
y
)
if
wvl
is
None
:
wvl
=
self
.
wvl
(
samp
)
# samp must be defined if wvl is None
wf
=
np
.
exp
(
2j
*
np
.
pi
/
wvl
*
wf
)
...
...
@@ -147,6 +150,7 @@ class Instrument(object):
data
[
'
nact
'
]
=
self
.
Nact
data
[
'
filters
'
]
=
self
.
filters
data
[
'
phasemask_path
'
]
=
self
.
phasemask_path
data
[
'
phasemask_shift
'
]
=
self
.
phasemask_shift
with
open
(
filename
,
'
w
'
)
as
f
:
yaml
.
dump
(
data
,
f
)
...
...
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