Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plio
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Plio
Commits
3c276a43
Commit
3c276a43
authored
5 years ago
by
Lauren Adoram-Kershner
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #132 from jessemapel/unmangle
Added name un-mangling when writing ISIS controlentworks out
parents
85945b3c
bec15857
No related branches found
Branches containing commit
Tags
1.2.3
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plio/io/io_controlnetwork.py
+10
-8
10 additions, 8 deletions
plio/io/io_controlnetwork.py
with
10 additions
and
8 deletions
plio/io/io_controlnetwork.py
+
10
−
8
View file @
3c276a43
...
...
@@ -260,16 +260,18 @@ class IsisStore(object):
point_spec
.
id
=
_set_pid
(
i
)
point_spec
.
type
=
g
.
iloc
[
0
].
pointType
for
attr
,
attrtype
in
self
.
point_attrs
:
if
attr
in
g
.
columns
:
# Un-mangle common attribute names between points and measures
df_attr
=
self
.
point_field_map
.
get
(
attr
,
attr
)
if
df_attr
in
g
.
columns
:
# As per protobuf docs for assigning to a repeated field.
if
attr
==
'
aprioriCovar
'
or
attr
==
'
adjustedCovar
'
:
arr
=
g
.
iloc
[
0
][
attr
]
if
df_
attr
==
'
aprioriCovar
'
or
df_
attr
==
'
adjustedCovar
'
:
arr
=
g
.
iloc
[
0
][
df_
attr
]
if
isinstance
(
arr
,
np
.
ndarray
):
arr
=
arr
.
ravel
().
tolist
()
point_spec
.
aprioriCovar
.
extend
(
arr
)
else
:
setattr
(
point_spec
,
attr
,
attrtype
(
g
.
iloc
[
0
][
attr
]))
setattr
(
point_spec
,
attr
,
attrtype
(
g
.
iloc
[
0
][
df_
attr
]))
# The reference index should always be the image with the lowest index
point_spec
.
referenceIndex
=
0
...
...
@@ -279,13 +281,13 @@ class IsisStore(object):
measure_spec
=
point_spec
.
Measure
()
# For all of the attributes, set if they are an dict accessible attr of the obj.
for
attr
,
attrtype
in
self
.
measure_attrs
:
if
attr
in
g
.
columns
:
setattr
(
measure_spec
,
attr
,
attrtype
(
m
[
attr
]))
measure_spec
.
serialnumber
=
m
.
serialnumber
# Un-mangle common attribute names between points and measures
df_attr
=
self
.
measure_field_map
.
get
(
attr
,
attr
)
if
df_attr
in
g
.
columns
:
setattr
(
measure_spec
,
attr
,
attrtype
(
m
[
df_attr
]))
# ISIS pixels are centered on (0.5, 0.5). NDArrays are (0,0) based.
measure_spec
.
sample
=
m
[
'
sample
'
]
+
0.5
measure_spec
.
line
=
m
[
'
line
'
]
+
0.5
measure_spec
.
type
=
m
.
measureType
measure_iterable
.
append
(
measure_spec
)
self
.
nmeasures
+=
1
...
...
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