Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
intercal
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Fazlul Shahriar
intercal
Commits
949f1800
Commit
949f1800
authored
13 years ago
by
Greg Quinn
Browse files
Options
Downloads
Patches
Plain Diff
Don't use INVALID flag for bowtie-deleted pixels
parent
b74d7ce4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
viirs2cris_single.py
+9
-2
9 additions, 2 deletions
viirs2cris_single.py
with
9 additions
and
2 deletions
viirs2cris_single.py
+
9
−
2
View file @
949f1800
...
...
@@ -24,14 +24,17 @@ def read_viirs_radiances(sdr_filenames):
rad_tmp
=
g
[
'
Radiance
'
][:]
if
'
RadianceFactors
'
in
g
:
mask
=
rad_tmp
>
65000
rad_tmp
=
np
.
ma
.
array
(
rad_tmp
,
mask
=
(
rad_tmp
>
65000
))
bowtie_mask
=
(
rad_tmp
==
65533
)
mask
=
(
rad_tmp
>
65000
)
rad_tmp
=
np
.
ma
.
array
(
rad_tmp
,
mask
=
mask
)
sf_a
,
sf_b
=
g
[
'
RadianceFactors
'
][:]
rad_tmp
=
sf_a
*
rad_tmp
+
sf_b
else
:
bowtie_mask
=
(
rad_tmp
==
-
999.7
)
mask
=
(
rad_tmp
<=
-
999.0
)
rad
[
i
]
=
rad_tmp
rad
[
i
][
mask
]
=
-
9999.0
rad
[
i
][
bowtie_mask
]
=
-
9997.0
return
rad
...
...
@@ -86,6 +89,10 @@ for cris_row in range(num_cris_scans):
bad_idxs
=
(
rads
==
-
9999.0
)
flags
[
bad_idxs
.
any
(
axis
=
1
)]
|=
INVALID
# we also need to trim out bowtie-deleted pixels, though
# they should not result in setting the INVALID flag
bad_idxs
=
np
.
logical_or
(
bad_idxs
,
rads
==
-
9997.0
)
# determine how many pixels are being used per band
n
[:]
=
num
-
bad_idxs
.
sum
(
axis
=
1
)
...
...
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