Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quantum Support Vector Regression
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sdlrs
Quantum Support Vector Regression
Commits
7a22b71d
Commit
7a22b71d
authored
Jul 8, 2022
by
Edoardo Pasetto
Browse files
Options
Downloads
Patches
Plain Diff
Delete library.py
parent
28ac52a9
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
GRSL/MERIS_dataset_generation/library.py
+0
-102
0 additions, 102 deletions
GRSL/MERIS_dataset_generation/library.py
with
0 additions
and
102 deletions
GRSL/MERIS_dataset_generation/library.py
deleted
100644 → 0
+
0
−
102
View file @
28ac52a9
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 23 11:01:39 2022
@author: Utente
"""
import
numpy
as
np
import
sympy
as
sp
import
utility
wl_array
=
[
412.5
,
442.5
,
490
,
510
,
560
,
620
,
665
,
681.25
]
bw_500
=
0.00288
b1_bw
=
0.5
b1_bph
=
0.002
b1_bsed
=
0.02
ased_440
=
0.042
sx
=
0.011
sy
=
0.014
aw_table
=
{}
aw_table
[
wl_array
[
0
]]
=
0.00452
aw_table
[
wl_array
[
1
]]
=
0.00696
aw_table
[
wl_array
[
2
]]
=
0.0150
aw_table
[
wl_array
[
3
]]
=
0.0325
aw_table
[
wl_array
[
4
]]
=
0.0619
aw_table
[
wl_array
[
5
]]
=
0.2755
aw_table
[
wl_array
[
6
]]
=
0.429
aw_table
[
wl_array
[
7
]]
=
0.00696
aw_table
[
wl_array
[
1
]]
=
0.4715
AB_table
=
{}
AB_table
[
wl_array
[
0
]]
=
(
0.0323
,
0.286
)
AB_table
[
wl_array
[
1
]]
=
(
0.0398
,
0.339
)
AB_table
[
wl_array
[
2
]]
=
(
0.0274
,
0.361
)
AB_table
[
wl_array
[
3
]]
=
(
0.0180
,
0.260
)
AB_table
[
wl_array
[
4
]]
=
(
0.0062
,
0.016
)
AB_table
[
wl_array
[
5
]]
=
(
0.0065
,
0.064
)
AB_table
[
wl_array
[
6
]]
=
(
0.0144
,
0.131
)
AB_table
[
wl_array
[
7
]]
=
(
0.0166
,
0.148
)
def
get_absorbtion
(
C
,
X
,
Y
,
wl
):
aw
=
aw_table
[
wl
]
A
=
AB_table
[
wl
][
0
]
B
=
AB_table
[
wl
][
1
]
aphy
=
utility
.
get_aphy
(
A
,
B
,
C
)
ased
=
utility
.
get_ased
(
X
,
wl
)
ayel
=
utility
.
get_ayel
(
Y
,
wl
)
return
aw
,
aphy
,
ased
,
ayel
def
get_backscattering
(
C
,
X
,
Y
,
wl
):
bbw
=
utility
.
get_bbw
(
wl
)
bbph
=
utility
.
get_bbph
(
C
,
wl
)
bbsed
=
utility
.
get_bbsed
(
X
,
wl
)
return
bbw
,
bbph
,
bbsed
def
get_reflectance_wl
(
aw
,
aphy
,
ased
,
ayel
,
bbw
,
bbph
,
bbsed
):
a
=
aw
+
aphy
+
ased
+
ayel
b
=
bbw
+
bbph
+
bbsed
par
=
b
/
(
a
+
b
)
reflectance
=
par
*
0.33
return
reflectance
def
get_reflectance_vector
(
wl_array
,
C
,
X
,
Y
):
R_vector
=
np
.
zeros
((
len
(
wl_array
),))
for
i
,
wl
in
enumerate
(
wl_array
):
aw
,
aphy
,
ased
,
ayel
=
get_absorbtion
(
C
,
X
,
Y
,
wl
)
bbw
,
bbph
,
bbsed
=
get_backscattering
(
C
,
X
,
Y
,
wl
)
ref
=
get_reflectance_wl
(
aw
,
aphy
,
ased
,
ayel
,
bbw
,
bbph
,
bbsed
)
R_vector
[
i
]
=
ref
#print('value of index: {}'.format(i))
return
R_vector
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