Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
image-compression
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
image-compression
Commits
5d150231
Commit
5d150231
authored
Jul 18, 2022
by
Bryce Hepner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small testing changes
parent
b0b364b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
FPNprojstart.py
FPNprojstart.py
+4
-4
No files found.
FPNprojstart.py
View file @
5d150231
...
@@ -13,7 +13,7 @@ from sklearn.metrics import mean_squared_error
...
@@ -13,7 +13,7 @@ from sklearn.metrics import mean_squared_error
scenes
=
remote_file_extractor
(
"/media/elphel/NVME/lwir16-proc/te0607/scenes/"
)
scenes
=
remote_file_extractor
(
"/media/elphel/NVME/lwir16-proc/te0607/scenes/"
)
images
=
remote_image_extractor
(
scenes
)
images
=
remote_image_extractor
(
scenes
)
# images = find_only_in_channel(images, "11
")
images
=
find_only_in_channel
(
images
,
"5
"
)
sftp_client
=
setup_remote_sftpclient
()
sftp_client
=
setup_remote_sftpclient
()
image_array
=
np
.
array
(
Image
.
open
(
sftp_client
.
open
(
images
[
250
])))
image_array
=
np
.
array
(
Image
.
open
(
sftp_client
.
open
(
images
[
250
])))
# image_array = np.array(Image.open(images[250])).astype(np.uint16)
# image_array = np.array(Image.open(images[250])).astype(np.uint16)
...
@@ -56,14 +56,14 @@ information_array = np.zeros((len(images),3))
...
@@ -56,14 +56,14 @@ information_array = np.zeros((len(images),3))
def
celcius_to_kelvin
(
celcius
):
def
celcius_to_kelvin
(
celcius
):
return
celcius
+
273.15
return
celcius
+
273.15
for
i
in
range
(
len
(
images
)
):
for
i
in
range
(
1000
):
image_array
=
np
.
array
(
Image
.
open
(
sftp_client
.
open
(
images
[
i
])))
.
astype
(
np
.
uint16
)
image_array
=
np
.
array
(
Image
.
open
(
sftp_client
.
open
(
images
[
i
])))
.
astype
(
np
.
uint16
)
current_frame_count
=
intarray_to_uint32
(
repopulate_array_with_bitstring
(
uint16_array_to_bitstring
(
image_array
[
0
]))[
84
:
88
])
current_frame_count
=
intarray_to_uint32
(
repopulate_array_with_bitstring
(
uint16_array_to_bitstring
(
image_array
[
0
]))[
84
:
88
])
frame_count_at_FFC
=
intarray_to_uint32
(
repopulate_array_with_bitstring
(
uint16_array_to_bitstring
(
image_array
[
0
]))[
88
:
92
])
frame_count_at_FFC
=
intarray_to_uint32
(
repopulate_array_with_bitstring
(
uint16_array_to_bitstring
(
image_array
[
0
]))[
88
:
92
])
# signaltonoise.append(1/np.std(image_array[1:]))
# signaltonoise.append(1/np.std(image_array[1:]))
information_array
[
i
,
0
]
=
current_frame_count
-
frame_count_at_FFC
information_array
[
i
,
0
]
=
current_frame_count
-
frame_count_at_FFC
# information_array[i,-1] = 1/np.std(image_array[1:])
# information_array[i,-1] = 1/np.std(image_array[1:])
information_array
[
i
,
-
1
]
=
mean_squared_error
(
image_array
[
1
:],
gaussian_filter
(
image_array
[
1
:],
sigma
=
.3
)
)
information_array
[
i
,
-
1
]
=
mean_squared_error
(
gaussian_filter
(
image_array
[
1
:],
sigma
=
.2
),
image_array
[
1
:]
)
# print(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[76:77])
# print(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[76:77])
# print("start")
# print("start")
information_array
[
i
,
1
]
=
intarray_to_uint32
(
repopulate_array_with_bitstring
(
uint16_array_to_bitstring
(
image_array
[
0
]))[
94
:
96
])
-
\
information_array
[
i
,
1
]
=
intarray_to_uint32
(
repopulate_array_with_bitstring
(
uint16_array_to_bitstring
(
image_array
[
0
]))[
94
:
96
])
-
\
...
@@ -84,7 +84,7 @@ for i in range(len(images)):
...
@@ -84,7 +84,7 @@ for i in range(len(images)):
mask
=
information_array
[:,
0
]
>
0
mask
=
information_array
[:,
0
]
>
0
information_df
=
pd
.
DataFrame
(
information_array
[
mask
],
columns
=
[
"Frame_Spacing"
,
"Curr_Temp_Diff"
,
"Signal_to_Noise"
])
information_df
=
pd
.
DataFrame
(
information_array
[
mask
],
columns
=
[
"Frame_Spacing"
,
"Curr_Temp_Diff"
,
"Signal_to_Noise"
])
information_df
.
to_csv
(
"information_weird_array.csv"
)
information_df
.
to_csv
(
"information_weird_array.csv"
)
# information_df = pd.read_csv("information
_array.csv")
information_df
=
pd
.
read_csv
(
"information_weird
_array.csv"
)
information_array
=
information_df
.
values
information_array
=
information_df
.
values
plt
.
scatter
(
information_array
[:,
0
],
information_array
[:,
-
1
],
s
=
1
)
plt
.
scatter
(
information_array
[:,
0
],
information_array
[:,
-
1
],
s
=
1
)
plt
.
legend
()
plt
.
legend
()
...
...
Write
Preview
Markdown
is supported
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