本文整理汇总了Python中OCO_Matrix.OCO_Matrix.header['center_wavelengths']方法的典型用法代码示例。如果您正苦于以下问题:Python OCO_Matrix.header['center_wavelengths']方法的具体用法?Python OCO_Matrix.header['center_wavelengths']怎么用?Python OCO_Matrix.header['center_wavelengths']使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OCO_Matrix.OCO_Matrix
的用法示例。
在下文中一共展示了OCO_Matrix.header['center_wavelengths']方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: write_albedo_file
# 需要导入模块: from OCO_Matrix import OCO_Matrix [as 别名]
# 或者: from OCO_Matrix.OCO_Matrix import header['center_wavelengths'] [as 别名]
def write_albedo_file(output_file, albedo_data, header_values=None):
albedo_obj = OCO_Matrix()
if header_values != None:
albedo_obj.header.update(header_values)
albedo_obj.header['center_wavelengths'] = ' '.join([str(wl) for wl in ALBEDO_CENTER_WAVELENGTHS])
albedo_obj.labels = [ ALBEDO_COL_TMPL % (idx+1) for idx in range(albedo_data.shape[1]) ]
albedo_obj.data = albedo_data
albedo_obj.file_id = 'Surface albedo data'
albedo_obj.write(output_file)
示例2: write_albedo_file
# 需要导入模块: from OCO_Matrix import OCO_Matrix [as 别名]
# 或者: from OCO_Matrix.OCO_Matrix import header['center_wavelengths'] [as 别名]
def write_albedo_file(log_sounding_dict, out_filename):
out_albedo_data = numpy.zeros((2, len(BAND_NAMES)), dtype=float)
for band_idx in range(len(BAND_NAMES)):
albedo_os_a = log_sounding_dict['EffAlbedo_%dA' % (band_idx+1)]
albedo_os_b = log_sounding_dict['EffAlbedo_%dB' % (band_idx+1)]
conv_f = ALBEDO_CONVERSION[BAND_NAMES[band_idx]][0]
conv_g = ALBEDO_CONVERSION[BAND_NAMES[band_idx]][1]
albedo_l2 = albedo_os_a * (1-conv_f) + albedo_os_b * conv_f
slope = (albedo_os_b - albedo_os_a) * conv_g
out_albedo_data[0, band_idx] = albedo_l2
out_albedo_data[1, band_idx] = slope
out_mat_obj = OCO_Matrix()
out_mat_obj.header['center_wavelengths'] = ' '.join([str(wl) for wl in ALBEDO_CENTER_WAVELENGTHS])
out_mat_obj.file_id = 'True albedo from orbit simulator'
out_mat_obj.data = out_albedo_data
out_mat_obj.labels = ['ALBEDO_%d' % (bidx+1) for bidx in range(out_albedo_data.shape[1])]
out_mat_obj.write(out_filename)