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
bf8dcf92
Commit
bf8dcf92
authored
7 years ago
by
Tyler Thatcher
Browse files
Options
Downloads
Patches
Plain Diff
Modified io_controlnetwork to account for covariance matrix
parent
3477f2b2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
plio/io/io_controlnetwork.py
+9
-9
9 additions, 9 deletions
plio/io/io_controlnetwork.py
with
9 additions
and
9 deletions
plio/io/io_controlnetwork.py
+
9
−
9
View file @
bf8dcf92
from
time
import
gmtime
,
strftime
import
pandas
as
pd
import
numpy
as
np
import
pvl
from
plio.io
import
ControlNetFileV0002_pb2
as
cnf
...
...
@@ -267,24 +268,24 @@ class IsisStore(object):
# As per protobuf docs for assigning to a repeated field.
if
attr
==
'
aprioriCovar
'
:
arr
=
g
.
iloc
[
0
][
'
aprioriCovar
'
]
point_spec
.
aprioriCovar
.
extend
(
arr
.
ravel
().
tolist
())
if
isinstance
(
arr
,
np
.
ndarray
):
arr
=
arr
.
ravel
().
tolist
()
point_spec
.
aprioriCovar
.
extend
(
arr
)
else
:
setattr
(
point_spec
,
attr
,
attrtype
(
g
.
iloc
[
0
][
attr
]))
point_spec
.
type
=
2
# Hardcoded to free
point_spec
.
type
=
2
# Hardcoded to free
this is bad
# The reference index should always be the image with the lowest index
point_spec
.
referenceIndex
=
0
# A single extend call is cheaper than many add calls to pack points
measure_iterable
=
[]
for
node_id
,
m
in
g
.
iterrows
():
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
=
serials
[
m
.
image_index
]
measure_spec
.
sample
=
m
.
x
measure_spec
.
line
=
m
.
y
...
...
@@ -298,7 +299,6 @@ class IsisStore(object):
point_message
=
point_spec
.
SerializeToString
()
point_sizes
.
append
(
point_spec
.
ByteSize
())
point_messages
.
append
(
point_message
)
return
point_messages
,
point_sizes
def
create_buffer_header
(
self
,
networkid
,
targetname
,
...
...
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