Creating an environment
module load miniconda || module load anaconda27 # SSEC-specific
conda create -n himawari python=2.7 netcdf4 cffi anaconda # only need to do this once
source activate himawari # switch to himawari environment
export PYTHONPATH=/path/to/himawari/py
ipython --pylab
Attach a scene and load raw counts, radiances, brightness temps
import HimawariScene as hsd
b07 = hsd.HimawariScene('input/HS_H08_20161010_1900_B07_FLDK')
b07raw = b07.counts()
b07rad = b07.radiances()
b07bt = b07.brightnessTemps()
slice a section out and look at data marked missing, or having BT<100K
q=b07bt[2000:2400,2000:2400]
c=b07cnt[2000:2400,2000:2400]
r=b07rad[2000:2400,2000:2400]
sum(q.ravel().mask), sum(q.ravel() < 100.0)
examine radiance slope/intercept constants and their relation to counts/radiance
cal = b07.calibration
cal.rad_m
cal.rad_b
cal.rad_m * 16350 + cal.rad_b
cal.rad_m * 16349 + cal.rad_b
cal.rad_m * 16351 + cal.rad_b
find coordinates of masked data, and make a list of radiances at those coordinates
dex = np.argwhere(q.mask)
rmasked = [r[a[0],a[1]] for a in dex]
rmasked
likewise with low radiances
dex = np.argwhere(q<100)
rlow = [r[a[0],a[1]] for a in dex]
rlow