Skip to content
Snippets Groups Projects
Commit a1907719 authored by Dongwei Fu's avatar Dongwei Fu Committed by Greg Quinn
Browse files

modifications for `Crisify` SIPS processing

parent 0e921805
No related branches found
No related tags found
1 merge request!2modifications for `Crisify` SIPS processing
......@@ -4,7 +4,14 @@ import numpy as np
def low_res_wavenumbers():
return np.concatenate([wn_low_res[b] for b in ['lw', 'mw', 'sw']])
def full_res_wavenumbers():
return np.concatenate([wn_full_res[b] for b in ['lw', 'mw', 'sw']])
wn_low_res = {'lw': np.linspace(648.75, 1096.25, 717),
'mw': np.linspace(1207.5, 1752.5, 437),
'sw': np.linspace(2150, 2555, 163)}
wn_full_res = {'lw': np.linspace(648.75, 1096.25, 717),
'mw': np.linspace(1207.5, 1752.5, 869),
'sw': np.linspace(2150, 2555, 637)}
......@@ -61,12 +61,12 @@ def read_airs_chan_data(filename):
class Cris2Modis(object):
def __init__(self, srf_path):
self.srf_catalog = ModisSrfCatalog(srf_path)
def __init__(self, srf_path, shift_id=0, fsr=False):
self.srf_catalog = ModisSrfCatalog(srf_path, shift_id=shift_id)
self.fsr = fsr
def __call__(self, band, rad_lw, rad_mw, rad_sw):
nu = self.cris_wavenumber_domain()
rad_nu = np.concatenate([rad_lw, rad_mw, rad_sw], axis=-1)
......@@ -81,7 +81,13 @@ class Cris2Modis(object):
def cris_wavenumber_domain(self):
return np.concatenate([np.linspace(648.75, 1096.25, 717),
if self.fsr:
return np.concatenate([np.linspace(648.75, 1096.25, 717),
np.linspace(1207.5, 1752.5, 869),
np.linspace(2150, 2555, 637)],
axis=-1)
else:
return np.concatenate([np.linspace(648.75, 1096.25, 717),
np.linspace(1207.5, 1752.5, 437),
np.linspace(2150, 2555, 163)],
axis=-1)
......
......@@ -4,11 +4,19 @@ from pyhdf import SD
from intercal.srf import WavelengthSrf
from intercal.util import wn2wl
# Spectral shifts from Eva Borbas 2017/06/15
# Spectral shifts from Eva Borbas 2017/06/15 & 2023/02/15
"""
shift_id:
0: no shifts
1: Aqua C5/6
2: Terra C5/6
3: Aqua C6.1
4: Terra C6.1
"""
shifts = [
{},
{
# Just for Aqua
# Just for Aqua C5/6
27: 5.0,
28: 2.0,
30: 0.0,
......@@ -17,13 +25,32 @@ shifts = [
36: 1.0
},
{
# Just for Terra
# Just for Terra C5/6
27: 4.0,
28: 2.0,
30: 1.0,
34: 0.8,
35: 0.8,
36: 1.0
},
{
# Just for Aqua C6.1
27: 3.0,
28: 1.0,
30: -1.0,
34: 0.8,
35: 0.8,
36: 1.0
},
{
# Just for Terra C6.1
25: 2.0,
27: 0.0,
28: 2.0,
30: 1.0,
34: 0.8,
35: 0.8,
36: 1.0
}
]
......
......@@ -2,7 +2,7 @@
from setuptools import setup, find_packages
setup(name='intercal',
version='0.1.6',
version='0.1.7',
packages=find_packages(),
package_data={'intercal': ['*.nc']},
install_requires=['numpy', 'netcdf4', 'python-hdf4', 'h5py'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment