Open bvnayak opened 8 years ago
a = PDS3Image.open('EDR.IMG')
b = PDS3Image.open('Float_RAD.IMG')
Now, if we print a.dtype
and a.data.dtype
we get uint8
(>i2). Similarly b.dtype
and b.data.dtype
is float32
(>f4).
Now, we modify a
.
a.data = b.data
Now, if we print a.dtype
it is uint8
(>i2) and a.data.dtype
we get float32
(>f4). This suggests us that we need to save our image with a.data.dtype
instead of a.dtype
.
While calibrating the image, we decompand it first. During this operation, input data is of 8 bits which is then changed to 12 bits. So, our storage
dtype
changes touint16
fromuint8
.Now, Line 139 saves data with the
dtype
of the input data, there we need to checkdtype
for the data which is to be written.