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
9f9806e2
Commit
9f9806e2
authored
6 years ago
by
acpaquette
Committed by
jlaura
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Updated m3 with derived products from pysat (#66)
parent
e7263e77
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
plio/io/io_moon_minerology_mapper.py
+27
-0
27 additions, 0 deletions
plio/io/io_moon_minerology_mapper.py
with
27 additions
and
0 deletions
plio/io/io_moon_minerology_mapper.py
+
27
−
0
View file @
9f9806e2
...
@@ -2,6 +2,15 @@ import os
...
@@ -2,6 +2,15 @@ import os
import
numpy
as
np
import
numpy
as
np
from
.io_gdal
import
GeoDataset
from
.io_gdal
import
GeoDataset
from
.hcube
import
HCube
from
.hcube
import
HCube
try
:
from
libpysat.derived
import
m3
,
crism
from
libpysat.derived.utils
import
add_derived_funcs
libpysat_enabled
=
True
except
:
print
(
'
No libpysat module. Unable to attached derived product functions
'
)
libpysat_enabled
=
False
import
gdal
import
gdal
...
@@ -9,6 +18,24 @@ class M3(GeoDataset, HCube):
...
@@ -9,6 +18,24 @@ class M3(GeoDataset, HCube):
"""
"""
An M3 specific reader with the spectral mixin.
An M3 specific reader with the spectral mixin.
"""
"""
def
__init__
(
self
,
file_name
):
GeoDataset
.
__init__
(
self
,
file_name
)
HCube
.
__init__
(
self
)
if
libpysat_enabled
:
self
.
derived_funcs
=
add_derived_funcs
(
m3
)
def
__getattr__
(
self
,
name
):
try
:
func
=
self
.
derived_funcs
[
name
]
setattr
(
self
,
name
,
func
.
__get__
(
self
))
return
getattr
(
self
,
name
)
except
:
raise
AttributeError
()
@property
@property
def
wavelengths
(
self
):
def
wavelengths
(
self
):
if
not
hasattr
(
self
,
'
_wavelengths
'
):
if
not
hasattr
(
self
,
'
_wavelengths
'
):
...
...
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