Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
geomultisens
pyrsr
Commits
2f83c993
Commit
2f83c993
authored
Aug 23, 2019
by
Daniel Scheffler
Browse files
Fixed missing LayerBandsAssignment and wrong bandnames.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
6899a35d
Pipeline
#4603
passed with stage
in 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pyrsr/rsr.py
View file @
2f83c993
...
...
@@ -62,12 +62,12 @@ def RSR_reader(satellite, sensor, subsystem='',
LBA
=
LayerBandsAssignment
or
get_LayerBandsAssignment
(
satellite
,
sensor
,
subsystem
,
no_thermal
=
no_thermal
,
no_pan
=
no_pan
,
sort_by_cwl
=
sort_by_cwl
,
after_ac
=
after_ac
)
bandnames
=
[
'band_%s'
%
b
for
b
in
LBA
]
for
bandname
in
bandnames
:
for
band
in
LBA
:
bandname
=
'band_%s'
%
band
RSR_path
=
os
.
path
.
join
(
RSR_dir
,
bandname
)
try
:
RSR_dict
[
band
name
]
=
np
.
loadtxt
(
RSR_path
,
skiprows
=
1
)
RSR_dict
[
band
]
=
np
.
loadtxt
(
RSR_path
,
skiprows
=
1
)
if
v
:
print
(
'Reading RSR for %s %s, %s...'
%
(
satellite
,
sensor
,
bandname
))
except
FileNotFoundError
:
...
...
@@ -147,6 +147,7 @@ class RelativeSpectralResponse(object):
for
band
in
rsr_dict
:
# = OrderedDict -> order follows LayerBandsAssignment
bandname
=
band
if
not
self
.
format_bandnames
else
(
'B%s'
%
band
if
len
(
band
)
==
2
else
'B0%s'
%
band
)
bandnames
.
append
(
bandname
)
self
.
LayerBandsAssignment
.
append
(
band
)
rsrs
=
rsr_dict
[
band
][:,
1
]
wvls
=
np
.
array
(
rsr_dict
[
band
][:,
0
]
*
scale_factor
)
...
...
pyrsr/version.py
View file @
2f83c993
...
...
@@ -22,5 +22,5 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
__version__
=
'0.2.
7
'
__versionalias__
=
'2019082
2
.0
9
'
__version__
=
'0.2.
8
'
__versionalias__
=
'2019082
3
.0
1
'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment