Closed TAlonglong closed 5 years ago
Oh maybe @pnuu needs to see this?
Confirmed. The indexing seems to change when the SZA correction is applied, and the indexes are propagated to the nans
variable in function that masks then NaN
s out before merging the two composites:
Without SZA correction:
(Pdb) data1.attrs['name']
'night_fog'
(Pdb) data2.attrs['name']
'overview_sun'
(Pdb) data1.indexes
bands: Index(['R', 'G', 'B'], dtype='object', name='bands')
(Pdb) data2.indexes
bands: Index(['R', 'G', 'B'], dtype='object', name='bands')
(Pdb) nans.indexes
bands: Index(['R', 'G', 'B'], dtype='object', name='bands')
With SZA correction:
(Pdb) data1.indexes
bands: Index(['R', 'G', 'B'], dtype='object', name='bands')
(Pdb) data2.indexes
bands: Index(['R', 'G', 'B'], dtype='object', name='bands')
y: RangeIndex(start=0, stop=5173, step=1, name='y')
x: RangeIndex(start=0, stop=2048, step=1, name='x')
(Pdb) nans.indexes
bands: Index(['R', 'G', 'B'], dtype='object', name='bands')
y: RangeIndex(start=0, stop=5173, step=1, name='y')
x: RangeIndex(start=0, stop=2048, step=1, name='x')
In both cases the shapes are equal.
I define a composite like this as a DayNight composite
This does not work and gives:
If I use
overview
instead ofoverview_sun
it workspython3 satpy 0.11.1 with pip on ubuntu xenial