當前位置: 首頁>>代碼示例>>Python>>正文


Python OCO_Matrix.header['center_wavelengths']方法代碼示例

本文整理匯總了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)
開發者ID:E-LLP,項目名稱:RtRetrievalFramework,代碼行數:12,代碼來源:create_surface_apriori.py

示例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)
開發者ID:E-LLP,項目名稱:RtRetrievalFramework,代碼行數:26,代碼來源:extract_orbit_sim_data.py


注:本文中的OCO_Matrix.OCO_Matrix.header['center_wavelengths']方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。