diff --git a/Ortho/.gitignore b/Ortho/.gitignore new file mode 100644 index 0000000..a6d09ea --- /dev/null +++ b/Ortho/.gitignore @@ -0,0 +1,17 @@ +# 输入文件 +Input/ +Input2/ +Input3/ +Input4/ +Input5/ +# 输出文件 +Temporary/ +# 忽略工具文件 +__pycache__/ +dist/ +build/ +Ortho/ +run_log/ +*.tiff +*.tif +*.log \ No newline at end of file diff --git a/Ortho/OrthOne.spec b/Ortho/OrthOne.spec new file mode 100644 index 0000000..925f5ec --- /dev/null +++ b/Ortho/OrthOne.spec @@ -0,0 +1,49 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis( + ['OrthoMain.py'], + pathex=['.'], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, +) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='OrthOne', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) +coll = COLLECT( + exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='OrthOne', +) diff --git a/Ortho/Ortho-S-SAR.xml b/Ortho/Ortho-S-SAR.xml new file mode 100644 index 0000000..2674e1d --- /dev/null +++ b/Ortho/Ortho-S-SAR.xml @@ -0,0 +1,103 @@ + + + CSAR_202107275419_0001-0 + F:\MicroWorkspace\S_SAR\yuan\HJ2E_ORTH_Test\ + + File + ElementAlg + Ortho_S_SAR_V2.2 + Ortho_S_SAR_V2.2.exe + 正射校正 + 微波卫星3-5级产品生产模型 + Ortho-S-SAR-V2.2-1 + 1.0 + 辐射类产品_正射校正 + 4 + Ortho_中科卫星应用德清研究院_2.2 + 中科卫星应用德清研究院 + 景-算法 + Ortho\\Input6 + + 2599253_San_Francisco + + Ortho\\Output + + + 1.8 + python + + 0 + 0 + Windows10 + 4核 + 8GB + 25GB + 无需求 + 无需求 + 无需求 + + + + + SLC + SLC元文件 + 原始SLC各相关文件和参数 + File + tar.gz + Cal + F:\MicroWorkspace\S_SAR\yuan\HJ2E_KSC_STRIP_006199_E85.8_N44.2_20231124_SLC_HHHV_L10000135594.tar.gz + True + False + File + Satellite + 1 + GF3A + + + DEM + DEM数字高程影像 + 30m分辨率DEM数字高程影像tif + File + tif + Cal + F:\MicroWorkspace\S_SAR\yuan\dem\dem.tif + True + True + File + DEM + 0 + DEM + + + CorrectMethod + 选择校正方法 + 1.RPC;2.RD + int + int + Cal + 2 + True + True + UploadInput + Aux + 0 + Aux + + + + + OrthoProduct + 产品结果文件 + 产品结果文件 + File + tar.gz + Cal + F:\MicroWorkspace\S_SAR\yuan\HJ2E_ORTH_Test\Ortho\Output\HJ2E_KSC_STRIP_006199_E85.8_N44.2_20231124_SLC_HHHV_L10000135594-Ortho.tar.gz + DEFAULT + DEFAULT + DEFAULT + DEFAULT + + + + \ No newline at end of file diff --git a/Ortho/Ortho-S-SAR.xml.bak b/Ortho/Ortho-S-SAR.xml.bak new file mode 100644 index 0000000..ab233ed --- /dev/null +++ b/Ortho/Ortho-S-SAR.xml.bak @@ -0,0 +1,103 @@ + + + CSAR_202107275419_0001-0 + D:\micro\SWork\ + + File + ElementAlg + Ortho_S_SAR_V2.2 + Ortho_S_SAR_V2.2.exe + 正射校正 + 微波卫星3-5级产品生产模型 + Ortho-S-SAR-V2.2-1 + 1.0 + 辐射类产品_正射校正 + 4 + Ortho_中科卫星应用德清研究院_2.2 + 中科卫星应用德清研究院 + 景-算法 + Ortho\\Input6 + + 2599253_San_Francisco + + Ortho\\Output + + + 1.8 + python + + 0 + 0 + Windows10 + 4核 + 8GB + 25GB + 无需求 + 无需求 + 无需求 + + + + + SLC + SLC元文件 + 原始SLC各相关文件和参数 + File + tar.gz + Cal + F:\MicroWorkspace\S_SAR\AHV\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458.tar.gz + True + False + File + Satellite + 1 + GF3A + + + DEM + DEM数字高程影像 + 30m分辨率DEM数字高程影像tif + File + zip + Cal + F:\al_zhongji\S-SAR-data\backScattering\DEM\115E33N_COP30.zip + True + True + File + DEM + 0 + DEM + + + CorrectMethod + 选择校正方法 + 1.RPC;2.RD + int + int + Cal + 2 + True + True + UploadInput + Aux + 0 + Aux + + + + + OrthoProduct + 产品结果文件 + 产品结果文件 + File + tar.gz + Cal + D:\micro\SWork\Ortho\Output\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-Ortho.tar.gz + DEFAULT + DEFAULT + DEFAULT + DEFAULT + + + + \ No newline at end of file diff --git a/Ortho/OrthoAlg.py b/Ortho/OrthoAlg.py new file mode 100644 index 0000000..d365695 --- /dev/null +++ b/Ortho/OrthoAlg.py @@ -0,0 +1,2961 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :OneOrthoAlg.py +@Function :正射校正算法 +@Author :KHZ +@Contact: +@Date :2021/8/14 +@Version :1.0.0 +""" +# from re import I, T, X, match +# from types import DynamicClassAttribute +# from numpy.core.einsumfunc import _parse_possible_contraction +# from numpy.core.fromnumeric import shape +# from numpy.core.shape_base import block +# from numpy.lib import row_stack +# from numpy.lib.function_base import delete +import psutil +import os +import gc +# import sys +# import scipy +# from scipy.sparse import data +# from scipy.sparse.construct import random +import xmltodict +import numpy as np +import json +import datetime, time +import yaml +import math +import time +#import cv2 +#import cv2 as cv +from osgeo import gdal, gdalconst +# from yaml.events import AliasEvent, NodeEvent +from OrthoAuxData import OrthoAuxData +# from OrthoImage import ImageHandler +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.MetaDataHandler import MetaDataHandler +# from logHandler import LogHandler +from osgeo import osr +from scipy import interpolate +import scipy.io as scipyio +import copy +import scipy.sparse as ss +import shutil +import pandas +import uuid +from concurrent.futures._base import as_completed, wait +from concurrent.futures.thread import ThreadPoolExecutor +from multiprocessing import Pool + +class ScatteringAlg: + def __init__(self): + pass + + @staticmethod + def sar_backscattering_coef(in_sar_tif, meta_file_path, out_sar_tif, replece_VV = False, is_DB = True): + + # 读取原始SAR影像 + proj, geotrans, in_data = ImageHandler.read_img(in_sar_tif) + + # 计算强度信息 + I = np.array(in_data[0], dtype="float32") + Q = np.array(in_data[1], dtype="float32") + + where_9999_0 = np.where(I == -9999) + where_9999_1 = np.where(Q == -9999) + I[where_9999_0] = 1.0 + Q[where_9999_1] = 1.0 + + I2 = np.square(I) + Q2 = np.square(Q) + intensity_arr = I2 + Q2 + + # 获取极化类型 + if 'HH' in os.path.basename(in_sar_tif): + polarization = 'HH' + elif 'HV' in os.path.basename(in_sar_tif): + polarization = 'HV' + elif 'VH' in os.path.basename(in_sar_tif): + polarization = 'VH' + elif 'VV' in os.path.basename(in_sar_tif): + polarization = 'VV' + if replece_VV: + polarization = 'HV' #土壤水分算法中可能会用HV替换VV + elif 'DH' in os.path.basename(in_sar_tif): + polarization = 'HH' + else: + raise Exception ('there are not HH、HV、VH、VV in path:',in_sar_tif) + + # 获取参数 + QualifyValue = MetaDataHandler.get_QualifyValue(meta_file_path, polarization) + Kdb = MetaDataHandler.get_Kdb(meta_file_path, polarization) + + # 计算后向散射系数 + #对数形式 + coef_arr = 10 * (np.log10(intensity_arr * ((QualifyValue/32767)**2))) - Kdb + coef_arr[np.isnan(coef_arr)] = -9999 + coef_arr[np.isinf(coef_arr)] = -9999 + coef_arr[where_9999_0] = -9999 + coef_arr[where_9999_1] = -9999 + ## 输出的SAR后向散射系数产品 + # ImageHandler.write_img(out_sar_tif, proj, geotrans, coef_arr, 0) + + tif_array = np.power(10.0, coef_arr / 10.0) # dB --> 线性值 后向散射系数 + + tif_array[np.isnan(tif_array)] = 0 + tif_array[np.isinf(tif_array)] = 0 + tif_array[where_9999_0] = 0 + tif_array[where_9999_1] = 0 + + ImageHandler.write_img(out_sar_tif, proj, geotrans, tif_array, 0) + return True + + @staticmethod + def lin_to_db(lin_path, db_path): + proj, geotrans, in_data = ImageHandler.read_img(lin_path) + db_arr = 10 * np.log10(in_data) + # db_arr[np.isnan(db_arr)] = -9999 + # db_arr[np.isinf(db_arr)] = -9999 + ImageHandler.write_img(db_path, proj, geotrans, db_arr, -9999) + + + + + +def FindInfomationFromJson(HeaderFile_dom_json, node_path_list): + """ + 在Json文件中,按照指定路径解析出制定节点 + """ + result_node = HeaderFile_dom_json + for nodename in node_path_list: + result_node = result_node[nodename] + return result_node + + +def GetVectorNorm(Vecter): + """ + 得到向量的模 + """ + Vecter = Vecter.reshape(-1,1) + Vecter_Norm_pow = np.matmul(Vecter.T,Vecter) + return np.sqrt(Vecter_Norm_pow) + + +def XYZOuterM2(A, B): + """ + 外积(叉乘),日后版本换成可以任意维度的外积运算方程 + args: + A:nx3 + B:nx3 + """ + cnt = A.shape[0] + C = np.zeros((cnt, 3)) + C[:, 0] = A[:, 1] * B[:, 2] - A[:, 2] * B[:, 1] + C[:, 1] = A[:, 2] * B[:, 0] - A[:, 0] * B[:, 2] + C[:, 2] = A[:, 0] * B[:, 1] - A[:, 1] * B[:, 0] + return C + +def LinearSampling_raster(source_raster,tar_raster,source_start_row,source_start_col,tar_start_row,tar_start_col): + ''' 双线性重采样 + agrs: + source_raster:原影像 + tar_raster:目标影像 + source_start_row:原影像的起始行号 + source_start_col:原影像的起始列号 + tar_start_row:目标影像的起始行号 + tar_start_col:目标影像的起始列号 + return: + tar_raster:目标影像 + ''' + # 根据原影像的起始行列号与目标影像行列号,计算目标影像行列号的校正值 + d_row=tar_start_row-source_start_row # + d_col=tar_start_col-source_start_col # + + + source_height=source_raster.shape[0] + source_width=source_raster.shape[1] + tar_height=tar_raster.shape[0] + tar_width=tar_raster.shape[1] + + source_row=(np.ones((source_width,source_height))*range(source_height)).transpose(1,0) + source_col=np.ones((source_height,source_width))*range(source_width) + + tar_row=(np.ones((tar_width,tar_height))*range(tar_height)).transpose(1,0) + tar_col=np.ones((tar_height,tar_width))*range(tar_width) + + tar_row=tar_row+d_row # 坐标系变换 + tar_col=tar_col+d_col # 坐标系变换 + # 确定行列号 + last_source_row=np.floor(tar_row) + last_source_col=np.floor(tar_col) + next_source_row=np.ceil(tar_row) + next_source_col=np.ceil(tar_col) + + # 双线性重采样模型示意图, + # y1 r1 y2 + # + # r + # + # y3 r2 y4 + # 计算重采样 + r1=source_raster[last_source_row,last_source_col]*(tar_col-last_source_col)+source_raster[last_source_row,next_source_col]*(next_source_col-tar_col) + r2=source_raster[next_source_row,last_source_col]*(tar_col-last_source_col)+source_raster[next_source_row,next_source_col]*(next_source_col-tar_col) + tar_raster=r1*(tar_row-last_source_row)+r2*(next_source_row-tar_row) + tar_raster=tar_raster.reshape(tar_height,tar_width) # 目标影像 + return tar_raster.copy() + +'''-----双线性重采样-----''' + + +""" RPC 校正部分 """ + +def parse_rpc_file(rpc_file): + # rpc_file:.rpc文件的绝对路径 + # rpc_dict:符号RPC域下的16个关键字的字典 + # 参考网址:http://geotiff.maptools.org/rpc_prop.html; + # https://www.osgeo.cn/gdal/development/rfc/rfc22_rpc.html + + rpc_dict = {} + with open(rpc_file) as f: + text = f.read() + + # .rpc文件中的RPC关键词 + words = ['errBias', 'errRand', 'lineOffset', 'sampOffset', 'latOffset', + 'longOffset', 'heightOffset', 'lineScale', 'sampScale', 'latScale', + 'longScale', 'heightScale', 'lineNumCoef', 'lineDenCoef','sampNumCoef', 'sampDenCoef',] + + # GDAL库对应的RPC关键词 + keys = ['ERR_BIAS', 'ERR_RAND', 'LINE_OFF', 'SAMP_OFF', 'LAT_OFF', 'LONG_OFF', + 'HEIGHT_OFF', 'LINE_SCALE', 'SAMP_SCALE', 'LAT_SCALE', + 'LONG_SCALE', 'HEIGHT_SCALE', 'LINE_NUM_COEFF', 'LINE_DEN_COEFF', + 'SAMP_NUM_COEFF', 'SAMP_DEN_COEFF'] + + for old, new in zip(words, keys): + text = text.replace(old, new) + # 以‘;\n’作为分隔符 + text_list = text.split(';\n') + # 删掉无用的行 + text_list = text_list[3:-2] + # + text_list[0] = text_list[0].split('\n')[1] + # 去掉制表符、换行符、空格 + text_list = [item.strip('\t').replace('\n', '').replace(' ', '') for item in text_list] + + for item in text_list: + # 去掉‘=’ + key, value = item.split('=') + # 去掉多余的括号‘(’,‘)’ + if '(' in value: + value = value.replace('(', '').replace(')', '') + rpc_dict[key] = value + + for key in keys[:12]: + # 为正数添加符号‘+’ + if not rpc_dict[key].startswith('-'): + rpc_dict[key] = '+' + rpc_dict[key] + # 为归一化项和误差标志添加单位 + if key in ['LAT_OFF', 'LONG_OFF', 'LAT_SCALE', 'LONG_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' degrees' + if key in ['LINE_OFF', 'SAMP_OFF', 'LINE_SCALE', 'SAMP_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' pixels' + if key in ['ERR_BIAS', 'ERR_RAND', 'HEIGHT_OFF', 'HEIGHT_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' meters' + + # 处理有理函数项 + for key in keys[-4:]: + values = [] + for item in rpc_dict[key].split(','): + #print(item) + if not item.startswith('-'): + values.append('+'+item) + else: + values.append(item) + rpc_dict[key] = ' '.join(values) + return rpc_dict + + +def write_rpc_to_tiff(inputpath,rpc_file,ap = True,outpath = None): + rpc_dict = parse_rpc_file(rpc_file) + if ap: + # 可修改读取 + dataset = gdal.Open(inputpath,gdal.GA_Update) + # 向tif影像写入rpc域信息 + # 注意,这里虽然写入了RPC域信息,但实际影像还没有进行实际的RPC校正 + # 尽管有些RS/GIS能加载RPC域信息,并进行动态校正 + for k in rpc_dict.keys(): + dataset.SetMetadataItem(k, rpc_dict[k], 'RPC') + dataset.FlushCache() + del dataset + else: + dataset = gdal.Open(inputpath,gdal.GA_Update) + tiff_driver= gdal.GetDriverByName('Gtiff') + out_ds = tiff_driver.CreateCopy(outpath, dataset, 1) + for k in rpc_dict.keys(): + out_ds.SetMetadataItem(k, rpc_dict[k], 'RPC') + out_ds.FlushCache() + + +def rpc_correction(inputpath,rpc_file,corrtiff,dem_tif_file = None): + ## 设置rpc校正的参数 + # 原图像和输出影像缺失值设置为0,输出影像坐标系为WGS84(EPSG:4326), 重采样方法为双线性插值(bilinear,还有最邻近‘near’、三次卷积‘cubic’等可选) + # 注意DEM的覆盖范围要比原影像的范围大,此外,DEM不能有缺失值,有缺失值会报错 + # 通常DEM在水域是没有值的(即缺失值的情况),因此需要将其填充设置为0,否则在RPC校正时会报错 + # 这里使用的DEM是填充0值后的SRTM V4.1 3秒弧度的DEM(分辨率为90m) + # RPC_DEMINTERPOLATION=bilinear 表示对DEM重采样使用双线性插值算法 + # 如果要修改输出的坐标系,则要修改dstSRS参数值,使用该坐标系统的EPSG代码 + # 可以在网址https://spatialreference.org/ref/epsg/32650/ 查询得到EPSG代码 + + write_rpc_to_tiff(inputpath,rpc_file,ap = True,outpath = None) + + if dem_tif_file is None: + wo = gdal.WarpOptions(srcNodata=0, dstNodata=0, dstSRS='EPSG:4326', resampleAlg='bilinear', + format='Gtiff',rpc=True, warpOptions=["INIT_DEST=NO_DATA"]) + + wr = gdal.Warp(corrtiff, inputpath, options=wo) + print("RPC_GEOcorr>>>") + else: + wo = gdal.WarpOptions(srcNodata=0, dstNodata=0, dstSRS='EPSG:4326', resampleAlg='bilinear', format='Gtiff',rpc=True, warpOptions=["INIT_DEST=NO_DATA"], + transformerOptions=["RPC_DEM=%s"%(dem_tif_file), "RPC_DEMINTERPOLATION=bilinear"]) + wr = gdal.Warp(corrtiff, inputpath, options=wo) + print("RPC_GEOcorr>>>") + ## 对于全海域的影像或者不使用DEM校正的话,可以将transformerOptions有关的RPC DEM关键字删掉 + ## 即将上面gdal.WarpOptions注释掉,将下面的语句取消注释,无DEM时,影像范围的高程默认全为0 + del wr + + +########################## +# 输出RPC 行列号到 经纬度的变换 +########################## + #最大迭代次数超过则报错 +class MaxLocalizationIterationsError(Exception): + """ + Custom rpcm Exception. + """ + pass + +def apply_poly(poly, x, y, z): + """ + Evaluates a 3-variables polynom of degree 3 on a triplet of numbers. + 将三次多项式的统一模式构建为一个单独的函数 + Args: + poly: list of the 20 coefficients of the 3-variate degree 3 polynom, + ordered following the RPC convention. + x, y, z: triplet of floats. They may be numpy arrays of same length. + Returns: + the value(s) of the polynom on the input point(s). + """ + out = 0 + out += poly[0] + out += poly[1]*y + poly[2]*x + poly[3]*z + out += poly[4]*y*x + poly[5]*y*z +poly[6]*x*z + out += poly[7]*y*y + poly[8]*x*x + poly[9]*z*z + out += poly[10]*x*y*z + out += poly[11]*y*y*y + out += poly[12]*y*x*x + poly[13]*y*z*z + poly[14]*y*y*x + out += poly[15]*x*x*x + out += poly[16]*x*z*z + poly[17]*y*y*z + poly[18]*x*x*z + out += poly[19]*z*z*z + return out + +def apply_rfm(num, den, x, y, z): + """ + Evaluates a Rational Function Model (rfm), on a triplet of numbers. + 执行20个参数的分子和20个参数的除法 + Args: + num: list of the 20 coefficients of the numerator + den: list of the 20 coefficients of the denominator + All these coefficients are ordered following the RPC convention. + x, y, z: triplet of floats. They may be numpy arrays of same length. + + Returns: + the value(s) of the rfm on the input point(s). + """ + return apply_poly(num, x, y, z) / apply_poly(den, x, y, z) + +def rpc_from_geotiff(geotiff_path): + """ + Read the RPC coefficients from a GeoTIFF file and return an RPCModel object. + 该函数返回影像的Gdal格式的影像和RPCmodel + Args: + geotiff_path (str): path or url to a GeoTIFF file + + Returns: + instance of the rpc_model.RPCModel class + """ + # with rasterio.open(geotiff_path, 'r') as src: + # + dataset = gdal.Open(geotiff_path, gdal.GA_ReadOnly) + rpc_dict = dataset.GetMetadata("RPC") + # 同时返回影像与rpc + return dataset, RPCModel(rpc_dict,'geotiff') + + +def read_rpc_file(rpc_file): + """ + Read RPC from a RPC_txt file and return a RPCmodel + 从TXT中直接单独读取RPC模型 + Args: + rpc_file: RPC sidecar file path + + Returns: + dictionary read from the RPC file, or an empty dict if fail + + """ + rpc = parse_rpc_file(rpc_file) + return RPCModel(rpc) + +class RPCModel: + def __init__(self, d, dict_format="geotiff"): + """ + Args: + d (dict): dictionary read from a geotiff file with + rasterio.open('/path/to/file.tiff', 'r').tags(ns='RPC'), + or from the .__dict__ of an RPCModel object. + dict_format (str): format of the dictionary passed in `d`. + Either "geotiff" if read from the tags of a geotiff file, + or "rpcm" if read from the .__dict__ of an RPCModel object. + """ + if dict_format == "geotiff": + self.row_offset = float(d['LINE_OFF'][0:d['LINE_OFF'].rfind(' ')]) + self.col_offset = float(d['SAMP_OFF'][0:d['SAMP_OFF'].rfind(' ')]) + self.lat_offset = float(d['LAT_OFF'][0:d['LAT_OFF'].rfind(' ')]) + self.lon_offset = float(d['LONG_OFF'][0:d['LONG_OFF'].rfind(' ')]) + self.alt_offset = float(d['HEIGHT_OFF'][0:d['HEIGHT_OFF'].rfind(' ')]) + + self.row_scale = float(d['LINE_SCALE'][0:d['LINE_SCALE'].rfind(' ')]) + self.col_scale = float(d['SAMP_SCALE'][0:d['SAMP_SCALE'].rfind(' ')]) + self.lat_scale = float(d['LAT_SCALE'][0:d['LAT_SCALE'].rfind(' ')]) + self.lon_scale = float(d['LONG_SCALE'][0:d['LONG_SCALE'].rfind(' ')]) + self.alt_scale = float(d['HEIGHT_SCALE'][0:d['HEIGHT_SCALE'].rfind(' ')]) + + self.row_num = list(map(float, d['LINE_NUM_COEFF'].split())) + self.row_den = list(map(float, d['LINE_DEN_COEFF'].split())) + self.col_num = list(map(float, d['SAMP_NUM_COEFF'].split())) + self.col_den = list(map(float, d['SAMP_DEN_COEFF'].split())) + + if 'LON_NUM_COEFF' in d: + self.lon_num = list(map(float, d['LON_NUM_COEFF'].split())) + self.lon_den = list(map(float, d['LON_DEN_COEFF'].split())) + self.lat_num = list(map(float, d['LAT_NUM_COEFF'].split())) + self.lat_den = list(map(float, d['LAT_DEN_COEFF'].split())) + + elif dict_format == "rpcm": + self.__dict__ = d + + else: + raise ValueError( + "dict_format '{}' not supported. " + "Should be {{'geotiff','rpcm'}}".format(dict_format) + ) + + + def projection(self, lon, lat, alt): + """ + Convert geographic coordinates of 3D points into image coordinates. + 正投影:从地理坐标到图像坐标 + Args: + lon (float or list): longitude(s) of the input 3D point(s) + lat (float or list): latitude(s) of the input 3D point(s) + alt (float or list): altitude(s) of the input 3D point(s) + + Returns: + float or list: horizontal image coordinate(s) (column index, ie x) + float or list: vertical image coordinate(s) (row index, ie y) + """ + nlon = (np.asarray(lon) - self.lon_offset) / self.lon_scale + nlat = (np.asarray(lat) - self.lat_offset) / self.lat_scale + nalt = (np.asarray(alt) - self.alt_offset) / self.alt_scale + + col = apply_rfm(self.col_num, self.col_den, nlat, nlon, nalt) + row = apply_rfm(self.row_num, self.row_den, nlat, nlon, nalt) + + col = col * self.col_scale + self.col_offset + row = row * self.row_scale + self.row_offset + + return col, row + + + def localization(self, col, row, alt, return_normalized=False): + """ + Convert image coordinates plus altitude into geographic coordinates. + 反投影:从图像坐标到地理坐标 + Args: + col (float or list): x image coordinate(s) of the input point(s) + row (float or list): y image coordinate(s) of the input point(s) + alt (float or list): altitude(s) of the input point(s) + + Returns: + float or list: longitude(s) + float or list: latitude(s) + """ + ncol = (np.asarray(col) - self.col_offset) / self.col_scale + nrow = (np.asarray(row) - self.row_offset) / self.row_scale + nalt = (np.asarray(alt) - self.alt_offset) / self.alt_scale + + if not hasattr(self, 'lat_num'): + lon, lat = self.localization_iterative(ncol, nrow, nalt) + else: + lon = apply_rfm(self.lon_num, self.lon_den, nrow, ncol, nalt) + lat = apply_rfm(self.lat_num, self.lat_den, nrow, ncol, nalt) + + if not return_normalized: + lon = lon * self.lon_scale + self.lon_offset + lat = lat * self.lat_scale + self.lat_offset + + return lon, lat + + + def localization_iterative(self, col, row, alt): + """ + Iterative estimation of the localization function (image to ground), + for a list of image points expressed in image coordinates. + 逆投影时的迭代函数 + Args: + col, row: normalized image coordinates (between -1 and 1) + alt: normalized altitude (between -1 and 1) of the corresponding 3D + point + + Returns: + lon, lat: normalized longitude and latitude + + Raises: + MaxLocalizationIterationsError: if the while loop exceeds the max + number of iterations, which is set to 100. + """ + # target point: Xf (f for final) + Xf = np.vstack([col, row]).T + + # use 3 corners of the lon, lat domain and project them into the image + # to get the first estimation of (lon, lat) + # EPS is 2 for the first iteration, then 0.1. + lon = -col ** 0 # vector of ones + lat = -col ** 0 + EPS = 2 + x0 = apply_rfm(self.col_num, self.col_den, lat, lon, alt) + y0 = apply_rfm(self.row_num, self.row_den, lat, lon, alt) + x1 = apply_rfm(self.col_num, self.col_den, lat, lon + EPS, alt) + y1 = apply_rfm(self.row_num, self.row_den, lat, lon + EPS, alt) + x2 = apply_rfm(self.col_num, self.col_den, lat + EPS, lon, alt) + y2 = apply_rfm(self.row_num, self.row_den, lat + EPS, lon, alt) + + + + n = 0 + while not np.all((x0 - col) ** 2 + (y0 - row) ** 2 < 1e-18): + + if n > 100: + raise MaxLocalizationIterationsError("Max localization iterations (100) exceeded") + + X0 = np.vstack([x0, y0]).T + X1 = np.vstack([x1, y1]).T + X2 = np.vstack([x2, y2]).T + e1 = X1 - X0 + e2 = X2 - X0 + u = Xf - X0 + + # project u on the base (e1, e2): u = a1*e1 + a2*e2 + # the exact computation is given by: + # M = np.vstack((e1, e2)).T + # a = np.dot(np.linalg.inv(M), u) + # but I don't know how to vectorize this. + # Assuming that e1 and e2 are orthogonal, a1 is given by + # / + num = np.sum(np.multiply(u, e1), axis=1) + den = np.sum(np.multiply(e1, e1), axis=1) + a1 = np.divide(num, den).squeeze() + + num = np.sum(np.multiply(u, e2), axis=1) + den = np.sum(np.multiply(e2, e2), axis=1) + a2 = np.divide(num, den).squeeze() + + # use the coefficients a1, a2 to compute an approximation of the + # point on the gound which in turn will give us the new X0 + lon += a1 * EPS + lat += a2 * EPS + + # update X0, X1 and X2 + EPS = .1 + x0 = apply_rfm(self.col_num, self.col_den, lat, lon, alt) + y0 = apply_rfm(self.row_num, self.row_den, lat, lon, alt) + x1 = apply_rfm(self.col_num, self.col_den, lat, lon + EPS, alt) + y1 = apply_rfm(self.row_num, self.row_den, lat, lon + EPS, alt) + x2 = apply_rfm(self.col_num, self.col_den, lat + EPS, lon, alt) + y2 = apply_rfm(self.row_num, self.row_den, lat + EPS, lon, alt) + n += 1 + + return lon, lat +############################################# +# 校正影像 输出影像转换表 +############################################# + +""" +[pool.putRequest(req) for req in requests]等同于 +  for req in requests: +     pool.putRequest(req) +""" + +def rpc_row_col(params): + rpc_mdl,r_block,c_block,ati_block,i,block_shape=params + r_block ,c_block = rpc_mdl.localization(r_block,c_block,0) + print("\t{}\t".format(i)) + return [i,r_block ,c_block,block_shape] + + +def get_RPC_lon_lat(in_rpc_tiff,out_rpc_rc_path): + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} ".format(exe_path,8,in_rpc_tiff,out_rpc_rc_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") +def getRCImageRC2(inputPath,out_rpc_rc_path): + #shutil.copy2(inputPath, out_rpc_rc_path) + # 创建重采样输出文件(设置投影及六参数) + input_rpc_sar=gdal.Open(inputPath) + + driver = gdal.GetDriverByName('GTiff') + output = driver.Create(out_rpc_rc_path, input_rpc_sar.RasterXSize,input_rpc_sar.RasterYSize, 2,gdal.GDT_Float32) + output.SetGeoTransform(list(input_rpc_sar.GetGeoTransform())) + output.SetProjection(input_rpc_sar.GetProjection()) + # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + + rpc_rc_img=output + # 计算行列号 + rc_height=rpc_rc_img.RasterYSize + rc_width=rpc_rc_img.RasterXSize + + + for i in range(0,rc_height,100): + c_block=np.ones((100,rc_width)).astype(np.float32)*(np.array(list(range(rc_width))).reshape(1,rc_width)) + r_block=np.ones((100,rc_width)).astype(np.float32)*(np.array(list(range(100))).reshape(100,1)) + r_block=r_block+i + if rc_height-i>100: + rpc_rc_img.GetRasterBand(1).WriteArray(r_block.astype(np.float32),0,i) + rpc_rc_img.GetRasterBand(2).WriteArray(c_block.astype(np.float32),0,i) + else: + num=rc_height-i + rpc_rc_img.GetRasterBand(1).WriteArray(r_block[:num,:].astype(np.float32),0,i) + rpc_rc_img.GetRasterBand(2).WriteArray(c_block[:num,:].astype(np.float32),0,i) + + del rpc_rc_img,output,input_rpc_sar + +def getRCImageRC(inputPath,out_rpc_rc_path,rpc_file_path): + rpc_tool = read_rpc_file(rpc_file_path) + #shutil.copy2(inputPath, out_rpc_rc_path) + # 创建重采样输出文件(设置投影及六参数) + input_rpc_sar=gdal.Open(inputPath) + + driver = gdal.GetDriverByName('GTiff') + output = driver.Create(out_rpc_rc_path, input_rpc_sar.RasterXSize,input_rpc_sar.RasterYSize, 2,gdal.GDT_Float32) + output.SetGeoTransform(list(input_rpc_sar.GetGeoTransform())) + output.SetProjection(input_rpc_sar.GetProjection()) + # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + + rpc_rc_img=output + # 计算行列号 + rc_height=rpc_rc_img.RasterYSize + rc_width=rpc_rc_img.RasterXSize + + + with Pool(8) as t: + plist=[] + for i in range(0,rc_height,1000): + c_block=np.ones((1000,rc_width)).astype(np.float32)*(np.array(list(range(rc_width))).reshape(1,rc_width)) + r_block=np.ones((1000,rc_width)).astype(np.float32)*(np.array(list(range(1000))).reshape(1000,1)) + r_block=r_block+i + if not rc_height-i>1000: + num=rc_height-i + r_block=r_block[:num,:].astype(np.float32) + c_block=c_block[:num,:].astype(np.float32) + block_shape=r_block.shape + + plist.append(t.apply_async(rpc_row_col,args=([rpc_tool,r_block.reshape(-1).astype(np.int32),c_block.reshape(-1).astype(np.int32) ,c_block.reshape(-1)*0+0,i,block_shape],))) + t.close() + t.join() + for future in plist: + data = future.get() + i,r_block ,c_block,block_shape=data + rpc_rc_img.GetRasterBand(1).WriteArray(r_block.reshape(block_shape).astype(np.float32),0,i) + rpc_rc_img.GetRasterBand(2).WriteArray(c_block.reshape(block_shape).astype(np.float32),0,i) + del rpc_rc_img,output,input_rpc_sar +""" RPC 结束 """ + + +class SatelliteOrbit(object): + def __init__(self) -> None: + super().__init__() + self.starttime = 1262275200.0 + self.modelName="" + + def get_starttime(self): + ''' + 返回卫星轨道时间起算点 + ''' + return self.starttime + + def ReconstructionSatelliteOrbit(self, GPSPoints_list): + ''' + 重建卫星轨道,使用多项式拟合法 + args: + GPSPoints_list:GPS 卫星轨道点 + return: + SatelliteOrbitModel 卫星轨道模型 + ''' + self.SatelliteOrbitModel = None + + def SatelliteSpaceState(self, time_float): + ''' + 根据时间戳,返回对应时间的卫星的轨迹状态 + args: + time_float:时间戳 + return: + State_list:[time,Xp,Yp,Zp,Vx,Vy,Vz] + ''' + return None + + +class SatelliteOrbitFitPoly(SatelliteOrbit): + ''' + 继承于SatelliteOribit类,为拟合多项式实现方法 + ''' + + def __init__(self) -> None: + super().__init__() + self.modelName="多项式" + self.polynum=4 + + def ReconstructionSatelliteOrbit(self, GPSPoints_list, starttime): + if len(GPSPoints_list)==2: + self.polynum=1 + self.starttime = starttime + + record_count = len(GPSPoints_list) + time_arr = np.zeros((record_count, 1), dtype=np.float64) # 使用np.float64只是为了精度高些;如果32位也能满足需求,请用32位 + state_arr = np.zeros((record_count, 6), dtype=np.float64) + A_arr = np.zeros((self.polynum+1, 6), dtype=np.float64) # 四次项 + X=np.ones((record_count,self.polynum+1),dtype=np.float64) # 记录时间坐标 + # 将点记录转换为自变量矩阵、因变量矩阵 + + for i in range(record_count): + GPSPoint = GPSPoints_list[i] + time_ = GPSPoint[0] - self.starttime # 为了保证精度,对时间进行缩放 + X[i,:]=np.array([1,time_]) + state_arr[i, :] = np.array(GPSPoint[1:],dtype=np.float64).reshape(1,6) # 空间坐标 + self.model_f=[] + for i in range(6): + Y = state_arr[:, i].reshape(-1,1) + A_arr[:,i]=np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T,X)),X.T),Y)[:,0] + + self.A_arr=copy.deepcopy(A_arr.copy()) + return self.A_arr + elif len(GPSPoints_list) > 6: + self.polynum=4 + # 多项式的节点数,理论上是超过5个可以起算,这里为了精度选择10个点起算。 + # 多项式 XA=Y ==> A=(X'X)^X'Y,其中 A 为待求系数,X为变量,Y为因变量 + # 这里使用三次项多项式,共有6组参数。 + # 声明自变量,因变量,系数矩阵 + self.starttime = starttime + + record_count = len(GPSPoints_list) + time_arr = np.zeros((record_count, 1), dtype=np.float64) # 使用np.float64只是为了精度高些;如果32位也能满足需求,请用32位 + state_arr = np.zeros((record_count, 6), dtype=np.float64) + A_arr = np.zeros((self.polynum+1, 6), dtype=np.float64) # 四次项 + X=np.ones((record_count,self.polynum+1),dtype=np.float64) # 记录时间坐标 + # 将点记录转换为自变量矩阵、因变量矩阵 + + for i in range(record_count): + GPSPoint = GPSPoints_list[i] + time_ = GPSPoint[0] - self.starttime # 为了保证精度,对时间进行缩放 + X[i,:]=np.array([1,time_,time_**2,time_**3,time_**4]) + state_arr[i, :] = np.array(GPSPoint[1:],dtype=np.float64).reshape(1,6) # 空间坐标 + self.model_f=[] + for i in range(6): + Y = state_arr[:, i].reshape(-1,1) + A_arr[:,i]=np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T,X)),X.T),Y)[:,0] + + self.A_arr=copy.deepcopy(A_arr.copy()) + ''' 测试误差 + from matplotlib import pyplot + label_list=['x','y','z','vx','vy','vz'] + color_list=['r','g','b','gold','gray','pink'] + pyplot.figure() + for i in range(6): + Y = state_arr[:, i] + Y_predict=self.model_f[i](X) + pyplot.subplot(int("23{}".format(i+1))) + d=Y-Y_predict + pyplot.plot(X,d,label=label_list[i],color=color_list[i]) + pyplot.title("max:{}".format(np.max(d))) + #self.model_f.append(interpolate.interp1d(X,Y,kind='cubic',fill_value='extrapolate')) + pyplot.legend() + pyplot.show() + ''' + return self.A_arr + else: + self.A_arr = None + return None + + def SatelliteSpaceState(self, time_float): + ''' + 逐像素求解 + 根据时间戳,返回对应时间的卫星的轨迹状态,会自动计算与起算时间之差 + args: + time_float:时间戳 + return: + State_list:[time,Xp,Yp,Zp,Vx,Vy,Vz] + ''' + if self.model_f is None: + return None + + result_arr=np.zeros((1,7)) + + time_float = time_float - self.starttime + result_arr[0,0]=time_float + #time_arr[0, 4] = time_arr[0, 3] * time_float ** 4 + time_float=np.array([1,time_float,time_float**2,time_float**3,time_float**4]).reshape(1,5) + result_arr=np.matmul(time_float,self.A_arr) + return [time_float,result_arr] + + def getSatelliteSpaceState(self, time_array): + ''' + 矩阵求解 + 根据时间戳矩阵,返回对应时刻的卫星空间状态(位置,速度),且会自动计算与起算时间之差 + args: + time_array:nparray nx1 时间戳 + return: + SatellitSpaceStateArray:nparray nx6 状态信息 + ''' + if self.model_f is None: + return None # 返回None,表示没有结果 + if self.polynum==4: + n=time_array.shape[0] + result_arr_=np.zeros((n,6),dtype=np.float64) + time_float = time_array - self.starttime + time_float=time_float.reshape(-1) # nx1 + time_arr=np.ones((time_float.shape[0],5)) # nx5 + time_arr[:,1]=time_float + time_arr[:,2]=time_float**2 + time_arr[:,3]=time_float**3 + time_arr[:,4]=time_float**4 + result_arr_=np.matmul(time_arr,self.A_arr) # nx5 5x6 + #time_arr[0, 4] = time_arr[0, 3] * time_float ** 4 + #result_arr=result_arr_ + return result_arr_ # 位置矩阵 + else: + n=time_array.shape[0] + result_arr_=np.zeros((n,6),dtype=np.float64) + time_float = time_array - self.starttime + time_float=time_float.reshape(-1) # nx1 + time_arr=np.ones((time_float.shape[0],self.polynum+1)) # nx5 + time_arr[:,1]=time_float + result_arr_=np.matmul(time_arr,self.A_arr) # nx5 5x6 + #time_arr[0, 4] = time_arr[0, 3] * time_float ** 4 + #result_arr=result_arr_ + return result_arr_ # 位置矩阵 + + +def ReconstructionSatelliteOrbit(GPSPoints_list, starttime): + ''' + 构建卫星轨道 + args: + GPSPoints_list:卫星轨道点 + starttime:起算时间 + ''' + if len(GPSPoints_list) > 10: + SatelliteOrbitModel = SatelliteOrbitFitPoly() + if SatelliteOrbitModel.ReconstructionSatelliteOrbit(GPSPoints_list, starttime=starttime) is None: + return None + return SatelliteOrbitModel + elif len(GPSPoints_list)==2: + SatelliteOrbitModel = SatelliteOrbitFitPoly() + if SatelliteOrbitModel.ReconstructionSatelliteOrbit(GPSPoints_list, starttime=starttime) is None: + return None + return SatelliteOrbitModel + + + +class DEMProcess(object): + def __init__(self): + pass + + @staticmethod + def get_extent(fn): + ''' + 原文链接:https://blog.csdn.net/XBR_2014/article/details/85255412 + ''' + ds = gdal.Open(fn) + rows = ds.RasterYSize + cols = ds.RasterXSize + # 获取图像角点坐标 + gt = ds.GetGeoTransform() + minx = gt[0] + maxy = gt[3] + maxx = gt[0] + gt[1] * rows + miny = gt[3] + gt[5] * cols + return (minx, maxy, maxx, miny) + + @staticmethod + def img_mosaic(in_files, out_dem_path): + # 通过两两比较大小,将最终符合条件的四个角点坐标保存 + # 即为拼接图像的四个角点坐标 + minX, maxY, maxX, minY = DEMProcess.get_extent(in_files[0]) + for fn in in_files[1:]: + minx, maxy, maxx, miny = DEMProcess.get_extent(fn) + minX = min(minX, minx) + maxY = max(maxY, maxy) + maxX = max(maxX, maxx) + minY = min(minY, miny) + + # 获取输出图像的行列数 + in_ds = gdal.Open(in_files[0]) + bands_num = in_ds.RasterCount + gt = in_ds.GetGeoTransform() + rows = int((maxX - minX) / abs(gt[5])) + cols = int((maxY - minY) / gt[1]) + + # 判断栅格数据的数据类型 + datatype = gdal.GDT_UInt16 + + # 创建输出图像 + driver = gdal.GetDriverByName('GTiff') + out_dem = os.path.join(out_dem_path, 'mosaic0.tif') + out_ds = driver.Create(out_dem, cols, rows, bands_num, datatype) + out_ds.SetProjection(in_ds.GetProjection()) + + gt = list(in_ds.GetGeoTransform()) + gt[0], gt[3] = minX, maxY + out_ds.SetGeoTransform(gt) + + for fn in in_files: + in_ds = gdal.Open(fn) + x_size = in_ds.RasterXSize + y_size = in_ds.RasterYSize + trans = gdal.Transformer(in_ds, out_ds, []) + success, xyz = trans.TransformPoint(False, 0, 0) + x, y, z = map(int, xyz) + for i in range(1, bands_num + 1): + data = in_ds.GetRasterBand(i).ReadAsArray() + out_band = out_ds.GetRasterBand(i) + out_data = out_band.ReadAsArray(x, y, x_size, y_size) + data = np.maximum(data, out_data) + out_band.WriteArray(data, x, y) + + del in_ds, out_band, out_ds + + @staticmethod + def dem_clip(OutFilePath, DEMFilePath, SelectArea): + ''' + 根据选择范围裁剪DEM,并输出 + agrs: + outFilePath:裁剪DEM输出地址 + DEMFilePath:被裁减DEM地址 + SelectArea:list [(xmin,ymax),(xmax,ymin)] 框选范围 左上角,右下角 + ''' + DEM_ptr = gdal.Open(DEMFilePath) + DEM_GeoTransform = DEM_ptr.GetGeoTransform() # 读取影像的投影变换 + DEM_InvGeoTransform = gdal.InvGeoTransform(DEM_GeoTransform) + SelectAreaArrayPoints = [gdal.ApplyGeoTransform(DEM_InvGeoTransform, p[0], p[1]) for p in SelectArea] + SelectAreaArrayPoints = list(map(lambda p: (int(p[0]), int(p[1])), SelectAreaArrayPoints)) # 确定坐标 + + [(ulx, uly), (brx, bry)] = SelectAreaArrayPoints + rowCount, colCount = bry - uly, brx - ulx + + # 输出DEM的桌面坐标转换 + Out_Transfrom = list(DEM_GeoTransform) + Out_Transfrom[0] = SelectArea[0][0] + Out_Transfrom[3] = SelectArea[0][1] + + # 构建输出DEM + Bands_num = DEM_ptr.RasterCount + gtiff_driver = gdal.GetDriverByName('GTiff') + datatype = gdal.GDT_UInt16 + out_dem = gtiff_driver.Create(OutFilePath, colCount, rowCount, Bands_num, datatype) + out_dem.SetProjection(DEM_ptr.GetProjection()) + out_dem.SetGeoTransform(Out_Transfrom) + + for i in range(1, Bands_num + 1): + data_band = DEM_ptr.GetRasterBand(i) + out_band = out_dem.GetRasterBand(i) + data = data_band.ReadAsArray(ulx, uly, colCount, rowCount) + out_band.WriteArray(data) + del out_dem + + @staticmethod + def dem_merged(in_dem_path, meta_file_path, out_dem_path): + ''' + DEM重采样函数,默认坐标系为WGS84 + agrs: + in_dem_path: 输入的DEM文件夹路径 + meta_file_path: 输入的xml元文件路径 + out_dem_path: 输出的DEM文件夹路径 + ''' + # 读取文件夹中所有的DEM + dem_file_paths=[os.path.join(in_dem_path,dem_name) for dem_name in os.listdir(in_dem_path) if dem_name.find(".tif")>=0 and dem_name.find(".tif.")==-1] + spatialreference=osr.SpatialReference() + spatialreference.SetWellKnownGeogCS("WGS84") # 设置地理坐标,单位为度 degree # 设置投影坐标,单位为度 degree + spatialproj=spatialreference.ExportToWkt() # 导出投影结果 + # 将DEM拼接成一张大图 + mergeFile =gdal.BuildVRT(os.path.join(out_dem_path,"mergedDEM_VRT.tif"),dem_file_paths) + out_DEM=os.path.join(out_dem_path,"mergedDEM.tif") + gdal.Warp(out_DEM, + mergeFile, + format="GTiff", + dstSRS=spatialproj, + dstNodata=-9999, + outputType=gdal.GDT_Float32) + time.sleep(3) + #gdal.CloseDir(out_DEM) + return out_DEM + @staticmethod + def dem_resampled(in_dem_path,out_dem_path,samling_f): + in_dem=gdal.Open(in_dem_path,gdalconst.GA_ReadOnly) + width=in_dem.RasterXSize + height=in_dem.RasterYSize + gt=list(in_dem.GetGeoTransform()) + width=width*samling_f + height=height*samling_f + gt=[gt[0],gt[1]/samling_f,gt[2]/samling_f,gt[3],gt[4]/samling_f,gt[5]/samling_f] + driver = gdal.GetDriverByName('GTiff') + output = driver.Create(out_dem_path, width,height, 1,in_dem.GetRasterBand(1).DataType) + output.SetGeoTransform(gt) + output.SetProjection(in_dem.GetProjection()) + # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + gdal.ReprojectImage(in_dem, output, in_dem.GetProjection(), output.GetProjection(), gdalconst.GRA_CubicSpline,0.0,0.0,) + return out_dem_path + @staticmethod + def dem_resampled_RPC(in_dem_path,refrence_img_path,out_dem_path): + in_dem=gdal.Open(in_dem_path,gdalconst.GA_ReadOnly) + refrence_img=gdal.Open(refrence_img_path,gdalconst.GA_ReadOnly) + width=refrence_img.RasterXSize + height=refrence_img.RasterYSize + gt=list(refrence_img.GetGeoTransform()) + driver = gdal.GetDriverByName('GTiff') + output = driver.Create(out_dem_path, width,height, 1,in_dem.GetRasterBand(1).DataType) + output.SetGeoTransform(gt) + output.SetProjection(refrence_img.GetProjection()) + # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + gdal.ReprojectImage(in_dem, output, in_dem.GetProjection(), output.GetProjection(), gdalconst.GRA_CubicSpline,0.0,0.0,) + return out_dem_path + # referencefile = gdal.Open(referencefilefilePath, gdal.GA_ReadOnly) + # referencefileProj = referencefile.GetProjection() + # referencefileTrans = referencefile.GetGeoTransform() + # bandreferencefile = referencefile.GetRasterBand(1) + # Width= referencefile.RasterXSize + # Height = referencefile.RasterYSize + # nbands = referencefile.RasterCount + # # 创建重采样输出文件(设置投影及六参数) + # driver = gdal.GetDriverByName('GTiff') + # output = driver.Create(outputfilePath, Width,Height, nbands, bandreferencefile.DataType) + # output.SetGeoTransform(referencefileTrans) + # output.SetProjection(referencefileProj) + # # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + # gdal.ReprojectImage(inputrasfile, output, inputProj, referencefileProj, gdalconst.GRA_Bilinear,0.0,0.0,) + + +class Orthorectification(object): + """ + 正射校正模块类 + """ + def __init__(self, configPath="./config.ymal") -> None: + super().__init__() + # 常量声明 + # 加载配置文件 + d=os.listdir(".") + with open(configPath, 'r', encoding='utf-8') as f: + const = f.read() + self.config = yaml.load(const, Loader=yaml.FullLoader) + self.config['SatelliteOribit']['StartTime'] = datetime.datetime.strptime( + self.config['SatelliteOribit']['StartTime']['Value'], + self.config['SatelliteOribit']['StartTime']['format']).timestamp() # 转化成UTC时间格式 + self.R_e = self.config['SatelliteOribit']['ReferenceSpheroid']['Re'] # m + self.R_p = self.config['SatelliteOribit']['ReferenceSpheroid']['Rp'] # m + self.w_e = self.config['SatelliteOribit']['ReferenceSpheroid']['we'] # rad/s + + def ParseHearderFile(self, HeaderFilePath_str): + """ + 解析头文件,返回计算所需要的必要信息。 + args: + HeaderFilePath_str: 头文件地址 + return: + HeaderFileInfomation_json: 头文件信息包 + """ + + with open(HeaderFilePath_str, 'r', encoding='utf-8') as fp: + HeaderFile_dom_str = fp.read() + HeaderFile_dom = xmltodict.parse(HeaderFile_dom_str) # 将XML转成json文本 + HeaderFile_dom_json = json.loads(json.dumps(HeaderFile_dom)) # 将json字符串,转成json对象(对应于python中的dict) + # 获取头文件 + HeaderInformation_json = {} + # 解析轨道节点,假定是GPS节点 + HeaderInformation_json['GPS'] = [] + # GPS 解析信息 + GPSNode_Path = self.config['GPS']['GPSNode_Path'] + GPSNodeNames_list = self.config['GPS']['NodeInfomation_Name'] + GPSTime_Format = self.config['GPS']['Time_format'] + GPSPoints = FindInfomationFromJson(HeaderFile_dom_json, GPSNode_Path) + + for GPSPoint in GPSPoints: + GPSPoint = [ + datetime.datetime.strptime(GPSPoint[GPSNodeNames_list[0]], GPSTime_Format).timestamp(), # TimeStamp + float(GPSPoint[GPSNodeNames_list[1]]), # Xp + float(GPSPoint[GPSNodeNames_list[2]]), # Yp + float(GPSPoint[GPSNodeNames_list[3]]), # Zp + float(GPSPoint[GPSNodeNames_list[4]]), # Vx + float(GPSPoint[GPSNodeNames_list[5]]), # Vy + float(GPSPoint[GPSNodeNames_list[6]])] # VZ + HeaderInformation_json['GPS'].append(GPSPoint) + + # 提取成像相关信息 + HeaderInformation_json['ImageInformation'] = {} + # 1、开始成像时间 + HeaderInformation_json['ImageInformation']['StartTime'] = datetime.datetime.strptime( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['StartImageTime']['NodePath']), + self.config['imageinfo']['StartImageTime']['Format'] + ).timestamp() + # 2、结束成像时间 + HeaderInformation_json['ImageInformation']['EndTime'] = datetime.datetime.strptime( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['EndImageTime']['NodePath']), + self.config['imageinfo']['StartImageTime']['Format'] + ).timestamp() + # 3、影像的宽高 + HeaderInformation_json['ImageInformation']['height'] = int( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ImageHeight']['NodePath'])) + HeaderInformation_json['ImageInformation']['width'] = int( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ImageWidth']['NodePath'])) + # 4、影像的近斜距 + HeaderInformation_json['ImageInformation']['NearRange'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['NearRange']['NodePath'])) + # 5、入射角 + HeaderInformation_json['ImageInformation']['incidenceAngle'] = { + 'NearRange': float(FindInfomationFromJson(HeaderFile_dom_json, + self.config['imageinfo']['incidenceAngle']['NearRange'][ + 'NodePath'])), + 'FarRange': float(FindInfomationFromJson(HeaderFile_dom_json, + self.config['imageinfo']['incidenceAngle']['FarRange'][ + 'NodePath'])) + } + # 6、成像时刻影像带宽 + HeaderInformation_json['ImageInformation']['bandWidth'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['bandWidth']['NodePath'])) + # 7、多普勒质心常数 + DopplerCentroidCoefficients_list = FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo'][ + 'DopplerCentroidCoefficients']['NodePath']) + HeaderInformation_json['ImageInformation']['DopplerCentroidCoefficients'] = [ + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][0]]), + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][1]]), + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][2]]), + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][3]]), + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][4]]), + ] + # 8、波长 + HeaderInformation_json['ImageInformation']['lambda'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['lambda']['NodePath'])) + # 9、中心像元对应的中心经纬度 + CenterPoint = FindInfomationFromJson(HeaderFile_dom_json, + self.config['imageinfo']['CenterImagePositon']['NodePath']) + HeaderInformation_json['ImageInformation']['centerPosition'] = [ + float(CenterPoint[self.config['imageinfo']['CenterImagePositon']['Value'][0]]), # 纬度 + float(CenterPoint[self.config['imageinfo']['CenterImagePositon']['Value'][1]]), # 经度 + ] + # 10、多普勒参数参考时间 + HeaderInformation_json['ImageInformation']['DopplerParametersReferenceTime'] = float( + FindInfomationFromJson(HeaderFile_dom_json, + self.config['imageinfo']['DopplerParametersReferenceTime']['NodePath'])) + # 11、参考斜距 + HeaderInformation_json['ImageInformation']['refRange'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ReferenceRange']['NodePath'])) + # 12、PRF + HeaderInformation_json['PRF'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['PRF']['NodePath'])) + HeaderInformation_json['Fs'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['Fs']['NodePath'])) + # 13、中心时间 + HeaderInformation_json['ImageInformation']['CenterTime'] = datetime.datetime.strptime( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['CenterImageTime']['NodePath']), + self.config['imageinfo']['CenterImageTime']['Format'] + ).timestamp() + # 13.1 中心坐标 + # HeaderInformation_json['ImageInformation']['CenterPosition']=[ + # float(FindInfomationFromJson(HeaderFile_dom_json, ['product', 'platform', 'Xs'])), + # float(FindInfomationFromJson(HeaderFile_dom_json, ['product', 'platform', 'Ys'])), + # float(FindInfomationFromJson(HeaderFile_dom_json, ['product', 'platform', 'Zs'])), + # float(FindInfomationFromJson(HeaderFile_dom_json, ['product', 'platform', 'Vxs'])), + # float(FindInfomationFromJson(HeaderFile_dom_json, ['product', 'platform', 'Vys'])), + # float(FindInfomationFromJson(HeaderFile_dom_json, ['product', 'platform', 'Vzs'])) + # + # ] + + + + #14. 影像的空间间隔分辨率 + HeaderInformation_json['ImageInformation']['ImageWidthSpace']=float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ImageWidthSpace']['NodePath'])) + + HeaderInformation_json['ImageInformation']['ImageHeightSpace']=float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ImageHeightSpace']['NodePath'])) + + # 部分需要解析 + self.lamda=HeaderInformation_json['ImageInformation']['lambda'] + self.PRF=HeaderInformation_json['PRF'] + self.imgwidth=HeaderInformation_json['ImageInformation']['width'] + self.imgheight=HeaderInformation_json['ImageInformation']['height'] + self.imgstarttime=HeaderInformation_json['ImageInformation']['StartTime'] + self.widthspace=HeaderInformation_json['ImageInformation']['ImageWidthSpace'] + self.heightspace=HeaderInformation_json['ImageInformation']['ImageHeightSpace'] + self.refrange=HeaderInformation_json['ImageInformation']['refRange'] + self.nearrange=HeaderInformation_json['ImageInformation']['NearRange'] + self.Fs = HeaderInformation_json['Fs'] # Mhz todo + return HeaderInformation_json + pass + + def LLA_to_XYZ(self, latitude, longitude, altitude): + """ + 经纬度转大地坐标系 + args: + latitude:纬度 + longitude:经纬 + altitude:海拔高程 + refrence: https://blog.csdn.net/dulingwen/article/details/96868530 + """ + # 经纬度的余弦值 + cosLat = math.cos(latitude * math.pi / 180) + sinLat = math.sin(latitude * math.pi / 180) + cosLon = math.cos(longitude * math.pi / 180) + sinLon = math.sin(longitude * math.pi / 180) + + # WGS84坐标系的参数 + rad = 6378137.0 # 地球赤道平均半径(椭球长半轴:a) + f = 1.0 / 298.257224 # WGS84椭球扁率 :f = (a-b)/a + C = 1.0 / math.sqrt(cosLat * cosLat + (1 - f) * (1 - f) * sinLat * sinLat) + S = (1 - f) * (1 - f) * C + h = altitude + + # 计算XYZ坐标 + X = (rad * C + h) * cosLat * cosLon + Y = (rad * C + h) * cosLat * sinLon + Z = (rad * S + h) * sinLat + + return np.array([X, Y, Z]).reshape(1, 3) + + def XYZ_to_LLA(self, X, Y, Z): + """ + 大地坐标系转经纬度 + 适用于WGS84坐标系 + args: + x,y,z + return: + lat,lon,altitude + """ + # WGS84坐标系的参数 + a = 6378137.0 # 椭球长半轴 + b = 6356752.314245 # 椭球短半轴 + ea = np.sqrt((a ** 2 - b ** 2) / a ** 2) + eb = np.sqrt((a ** 2 - b ** 2) / b ** 2) + p = np.sqrt(X ** 2 + Y ** 2) + theta = np.arctan2(Z * a, p * b) + + # 计算经纬度及海拔 + longitude = np.arctan2(Y, X) + latitude = np.arctan2(Z + eb ** 2 * b * np.sin(theta) ** 3, p - ea ** 2 * a * np.cos(theta) ** 3) + N = a / np.sqrt(1 - ea ** 2 * np.sin(latitude) ** 2) + altitude = p / np.cos(latitude) - N + + return np.array([np.degrees(latitude), np.degrees(longitude), altitude]) + + def getRByColumnCode(self, c): + """ + 根据列号计算斜距 + args: + c: 列号 + """ + return self.R0 + c * self.delta_R + pass + + def getTimeByLineCode(self, r): + """ + 根据行号计算成像时间 + args: + r: 行号 + """ + return np.matmul( + np.concatenate([np.array([r ** i]).reshape(1, 1) for i in range(self.r2t_A_arr.shape[0])], axis=1), + self.r2t_A_arr) + + def ReconstuctionTimesOflyDirectionPositionModel(self, timePoints_list): + """ + 构建飞行向坐标与时间的转换模型,注意这里没有调整时间的起算点。 + args: + timePoints_list:时间点坐标 [r,t] + """ + # 根据点数确定模型,最高为3次项模型 + Y = np.zeros((len(timePoints_list), 1)) + X = np.zeros((len(timePoints_list), 1)) + + for i in range(len(timePoints_list)): + Y[i, 0] = timePoints_list[i][1] + X[i, 0] = timePoints_list[i][0] + + if len(timePoints_list) == 2: # 一次项 + X = np.concatenate([np.ones((len(timePoints_list), 1)), X], axis=1) + A = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), Y) + + elif len(timePoints_list) >= 3: # 二次项 + X = np.concatenate([np.ones(len(timePoints_list), 1), X, np.power(X, 2)], axis=1) + A = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), Y) + + elif len(timePoints_list) >= 8: # 三次项 + X = np.concatenate([np.ones(len(timePoints_list), 1), X, np.power(X, 2), np.power(X, 3)], axis=1) + A = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), Y) + + self.r2t_A_arr = A + + def PrepareConvertSystem(self): + """ + 计算常量 + 在数据计算之前,提前处理部分常量信息 + 构建r,c到坐标斜距的计算公式 + """ + self.R0 = self.header_info['ImageInformation']['NearRange'] # 起始斜距/近斜距 + self.ReconstuctionTimesOflyDirectionPositionModel([ + [0, self.header_info['ImageInformation']['StartTime']], + [self.header_info['ImageInformation']['height'] - 1, self.header_info['ImageInformation']['EndTime']] + ]) # 构建坐标到时间的变换,这里仅用两个数据点构建 + self.delta_R = self.widthspace + + + + + def ConvertCoordinary(self): + """ + 批量求解点坐标 + """ + pass + + def Orthorectification(self, FilePath_str): + """ + 正射校正组件 + 正射校正整体可以分为两个步骤: + Step 1:计算出栅格坐标对应的真实的大地坐标系坐标 + Step 2:根据大地坐标系将影像重采样到大地坐标系空间中 + args: + FilePath_str:影像所在文件夹 + """ + # 分离需要校正对象 + file_name_list = os.listdir(FilePath_str) + header_name = [file_name for file_name in file_name_list if + file_name.rfind(".meta.xml") == len(file_name) - len('.meta.xml')][0] # xml头文件,存储在list中 + tiff_name = [file_name for file_name in file_name_list if + file_name.rfind(".tiff") == len(file_name) - len('.tiff')] # tif影像文件,存储在list中 + # 解析头文件 + self.header_info = self.ParseHearderFile(os.path.join(FilePath_str, header_name)) + # 构建轨道模型 + self.SatelliteOrbitModel = ReconstructionSatelliteOrbit(self.header_info['GPS'], + starttime=self.config['SatelliteOribit']['StartTime']) + # 求解模型前计算常数变换模型 + self.PrepareConvertSystem() + # 批量计算空间坐标 + self.ConvertCoordinary() + +''' +卫星轨道定位法,修改为静态类 +间接定法法,模拟SAR方法的静态方法,与类独立,方便使用多进程 +''' +def getSatelliteSpaceState(time_array,SatelliteOrbitModelstarttime,SatelliteOrbitModelParameters=None,SatelliteOrbitModelName="多项式"): + if SatelliteOrbitModelName=="多项式": + if SatelliteOrbitModelParameters is None: + return None # 返回None,表示没有结果 + n=time_array.shape[0] + result_arr_=np.zeros((n,6),dtype=np.float64) + time_float = time_array - SatelliteOrbitModelstarttime + time_float=time_float.reshape(-1) # nx1 + time_arr=np.ones((time_float.shape[0],5)) # nx5 + time_arr[:,1]=time_float + time_arr[:,2]=time_float**2 + time_arr[:,3]=time_float**3 + time_arr[:,4]=time_float**4 + result_arr_=np.matmul(time_arr,SatelliteOrbitModelParameters) # nx5 5x6 + #time_arr[0, 4] = time_arr[0, 3] * time_float ** 4 + #result_arr=result_arr_ + return result_arr_ # 位置矩阵 + +''' +双线性重采样 +''' +def LinearSampling(ori_dem,sampling_f,offset_row=1,offset_col=1): + ''' + 简化双线性重采样模型 + 根据重采样率对原始对象进行重采样。 + 双线性重采样,这里去栅格所涉及的四个角点作为起算点。 + 模型示意图: + + y1 r1 y2 + + r + + y3 r2 y4 + args: + ori_dem:原始DEM + sampling_f:采样率 int + return: + new_dem:采样结果 + ''' + # 原始dem的行列号 + ori_height=ori_dem.shape[0]-offset_row + ori_width=ori_dem.shape[1]-offset_col + + # 采样之后的影像的范围大小 + new_height=int(ori_height*sampling_f) + new_width=int(ori_width*sampling_f) + # 获取采样之后的栅格单元对应的原DEM的行列号 + row_index_list=list(range(new_height)) + col_index_list=list(range(new_width)) + + new_dem=np.ones((new_height,new_width)) + row_index_arr=(new_dem.transpose(1,0)*row_index_list).transpose(1,0) + col_index_arr=new_dem*col_index_list + row_index_arr=row_index_arr*1.0/sampling_f + col_index_arr=col_index_arr*1.0/sampling_f + # 初始化 + new_dem=0 + # 计算权重 + row_index_arr=row_index_arr.reshape(-1) + col_index_arr=col_index_arr.reshape(-1) + last_row_index_arr=np.floor(row_index_arr).astype(np.int32) + next_row_index_arr=np.ceil(row_index_arr).astype(np.int32) + last_col_index_arr=np.floor(col_index_arr).astype(np.int32) + next_col_index_arr=np.ceil(col_index_arr).astype(np.int32) + # 双线性重采样模型示意图, + # y1 r1 y2 + # + # r + # + # y3 r2 y4 + # 计算重采样 + + R1=ori_dem[last_row_index_arr,last_col_index_arr]*(col_index_arr-last_col_index_arr)+ori_dem[last_row_index_arr,next_col_index_arr]*(next_col_index_arr-col_index_arr) + R2=ori_dem[next_row_index_arr,last_col_index_arr]*(col_index_arr-last_col_index_arr)+ori_dem[next_row_index_arr,next_col_index_arr]*(next_col_index_arr-col_index_arr) + new_dem=R1*(row_index_arr-last_row_index_arr)+R2*(next_row_index_arr-row_index_arr) # 双线性重采样 + new_dem=new_dem.reshape(new_height,new_width) + del R1,R2,next_row_index_arr,next_col_index_arr,last_row_index_arr,last_col_index_arr,row_index_arr,col_index_arr + result_dem=np.ones((new_height,new_width,3)) + result_dem[:,:,2]=new_dem + result_dem[:,:,0]=(np.ones((new_height,new_width)).transpose(1,0)*list(range(new_height))).transpose(1,0) + result_dem[:,:,1]=np.ones((new_height,new_width))*col_index_list + + return result_dem + + pass + + +class IndirectOrthorectification(Orthorectification): + """ + 间接定位法 + """ + def outParameterText(self,outparameter_path): + ''' + 生成配置文件 + ''' + with open(outparameter_path,"w",encoding='utf-8') as fp: + # 输出文件 + fp.write("{}\n".format(self.header_info['ImageInformation']['height'])) + fp.write("{}\n".format(self.header_info['ImageInformation']['width'])) + fp.write("{}\n".format(self.header_info['ImageInformation']['NearRange'])) # 近斜距 + fp.write("{}\n".format(self.header_info['ImageInformation']['incidenceAngle']['NearRange'])) # 近斜距入射角 + fp.write("{}\n".format(self.header_info['ImageInformation']['incidenceAngle']['FarRange'])) # 远距入射角 + fp.write("{}\n".format(self.config['LightSpeed'])) # 光速 + fp.write("{}\n".format(self.header_info['ImageInformation']['lambda'])) + fp.write("{}\n".format(self.header_info['ImageInformation']['StartTime'])) + fp.write("{}\n".format(self.header_info['PRF'])) + fp.write("{}\n".format(self.refrange)) + fp.write("{}\n".format(self.Fs)) + fp.write("{}\n".format(self.header_info['ImageInformation']['DopplerParametersReferenceTime'])) + #fp.write("{}\n".format(self.widthspace)) + + # 多普勒系数 + fp.write("{}\n".format(len(self.header_info['ImageInformation']['DopplerCentroidCoefficients']))) + for i in range(len(self.header_info['ImageInformation']['DopplerCentroidCoefficients'])): + fp.write("{}\n".format(self.header_info['ImageInformation']['DopplerCentroidCoefficients'][i])) + fp.write("{}\n".format(1)) + fp.write("{}\n".format(self.SatelliteOrbitModel.polynum)) + fp.write("{}\n".format(self.SatelliteOrbitModel.get_starttime())) + # X + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,0])) + # Y + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,1])) + # Z + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,2])) + # Vx + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,3])) + # Vy + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,4])) + # vz + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,5])) + # UTC参数 + startTime=time.localtime(self.header_info['ImageInformation']["StartTime"]) + fp.write("{}\n".format(startTime.tm_year)) + fp.write("{}\n".format(startTime.tm_mon)) + fp.write("{}".format(startTime.tm_mday)) + + self.paramterFile_path=outparameter_path + + + + def IndirectOrthorectification(self, FilePath_str,workspace_dir): + """ + 正射校正组件 + 正射校正整体可以分为两个步骤: + Step 1:计算出栅格坐标对应的真实的大地坐标系坐标 + Step 2:根据大地坐标系将影像重采样到大地坐标系空间中 + args: + FilePath_str:影像所在文件夹 + dem_resampled_path:重采样后的DEM路径 + lut_tif_path:输出的r,c,ti数据影像 + work_temp_path: 输出的临时文件地址路径,方便存放计算临时文件 + """ + # 分离需要校正对象 + file_name_list = os.listdir(FilePath_str) + # header_name = [file_name for file_name in file_name_list if + # file_name.rfind(".meta.xml") == len(file_name) - len('.meta.xml')][0] # 头文件 + header_name = [file_name for file_name in file_name_list if + file_name.rfind(".xml") == len(file_name) - len('.xml')][0] # 头文件 + tiff_name = [file_name for file_name in file_name_list if + file_name.rfind(".tiff") == len(file_name) - len('.tiff')] # 影像文件 + # 解析头文件 + self.header_info = self.ParseHearderFile(os.path.join(FilePath_str, header_name)) + # 构建轨道模型 + self.SatelliteOrbitModel = ReconstructionSatelliteOrbit(self.header_info['GPS'], + starttime=self.header_info['ImageInformation']['CenterTime']) # 构建卫星轨道模型,取第0个节点的时间 + # 获取所有轨道节点时间 + gpslist=np.array(self.header_info['GPS']).reshape(-1,7) + # 验证轨道模型 + statepoints=self.SatelliteOrbitModel.getSatelliteSpaceState(gpslist[:,0].reshape(-1)) + # 计算轨道差距 + statepoints_dist=statepoints-gpslist[:,1:] + statepoints_dist_line=statepoints_dist[:,:3] + statepoints_dist_line=np.sum(statepoints_dist_line**2,axis=1)**0.5 + + statepoints_dist_ver=np.sum(statepoints_dist[:,3:]**2,axis=1)**0.5 + # print(statepoints_dist_ver.tolist()) + print("sata Point distance:\t{}\t -\t{}\t ".format(np.min(statepoints_dist_line),np.max(statepoints_dist_line))) + # statepoints_center = self.SatelliteOrbitModel.getSatelliteSpaceState(np.array([self.header_info['ImageInformation']['CenterTime']])) + # center_dist=statepoints_center-np.array(self.header_info['ImageInformation']['CenterPosition']) + # + # print("{}\n{}\ndistance center:{}\n".format(statepoints_center.tolist(),self.header_info['ImageInformation']['CenterPosition'],np.sqrt(np.sum(center_dist**2)))) + # 求解模型前计算常数变换模型 + self.PrepareConvertSystem() + self.outParameterText(os.path.join(workspace_dir,"orth_para.txt")) + + def preCaldem_sar_rc(self,dem_path,ori_sar_path,work_path,taget_path): + #.\SIMOrthoProgram-S-SAR\x64\Release\SIMOrthoProgram-S-SAR.exe 1 parameter_path dem_path ori_sar_path work_path taget_path + # SIMOrthoProgram-S-SAR.exe 1 in_parameter_path in_dem_path in_ori_sar_path in_work_path in_taget_path + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6} {7}".format(exe_path,1,self.paramterFile_path,dem_path,ori_sar_path,work_path ,taget_path,"\\") + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def getRPC_incidenceAngle(self,in_dem_path,in_rpc_rc_path,out_rpc_dem_path,out_incident_angle_path,out_local_incident_angle_path): + ''' + std::cout << "mode 4: get RPC incident and local incident angle sar model:"; + std::cout << "SIMOrthoProgram-S-SAR.exe 4 in_parameter_path in_dem_path in_rpc_rc_path out_rpc_dem_path out_incident_angle_path out_local_incident_angle_path"; + + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6} {7}".format(exe_path,4,self.paramterFile_path,in_dem_path,in_rpc_rc_path,out_rpc_dem_path,out_incident_angle_path,out_local_incident_angle_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def getRPC_incidenceAngle_lon_lat(self,in_dem_path,in_gec_lon_lat_path,work_path,taget_path,out_incident_angle_path,out_local_incident_angle_path,out_incangle_geo_path,out_localincangle_geo_path): + ''' + std::cout << "mode 7: get RPC incident and local incident angle sar model:"; + std::cout << "SIMOrthoProgram-S-SAR.exe 7 in_parameter_path in_dem_path in_gec_lon_lat_path work_path taget_path out_incident_angle_path out_local_incident_angle_path"; + + ''' + cwd_path = os.getcwd() + print("cwd_path:" + cwd_path) + exe_path=r"{}\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe".format(cwd_path) + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10}".format(exe_path,7,self.paramterFile_path,in_dem_path,in_gec_lon_lat_path,work_path,taget_path,out_incident_angle_path,out_local_incident_angle_path,out_incangle_geo_path,out_localincangle_geo_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def get_incidenceAngle(self,in_dem_path,in_rc_wgs84_path,out_incident_angle_path,out_local_incident_angle_path): + ''' + std::cout << "mode 2: get incident angle and local incident angle by rc_wgs84 and dem and statellite model:\n"; + std::cout << "SIMOrthoProgram-S-SAR.exe 2 in_parameter_path in_dem_path in_rc_wgs84_path out_incident_angle_path out_local_incident_angle_path"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6}".format(exe_path,2,self.paramterFile_path,in_dem_path,in_rc_wgs84_path,out_incident_angle_path,out_local_incident_angle_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + def get_GEC_incidenceAngle(self,in_dem_path,in_gec_lon_lat_path,out_incident_angle_path,out_local_incident_angle_path): + ''' + std::cout << "mode 6: get gec incident and local incident angle sar model:"; + std::cout << "SIMOrthoProgram-S-SAR.exe 6 in_parameter_path in_dem_path in_gec_lon_lat_path out_incident_angle_path out_local_incident_angle_path"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6}".format(exe_path,6,self.paramterFile_path,in_dem_path,in_gec_lon_lat_path,out_incident_angle_path,out_local_incident_angle_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + def get_GTC_SAR(self,in_rc_wgs84_path,in_ori_sar_path,out_orth_sar_path,modecode=3): + ''' + std::cout << "mode 3: interpolation(cubic convolution) orth sar value by rc_wgs84 and ori_sar image and model:\n "; + std::cout << "SIMOrthoProgram-S-SAR.exe 3 in_parameter_path in_rc_wgs84_path in_ori_sar_path out_orth_sar_path"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path,modecode,self.paramterFile_path,in_rc_wgs84_path,in_ori_sar_path,out_orth_sar_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def inter_Range2Geo(self,lon_lat_path , data_tiff , grid_path , space): + ''' + # std::cout << "mode 10"; + # std::cout << "SIMOrthoProgram-S-SAR.exe 10 lon_lat_path data_tiff grid_path space"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path,10,lon_lat_path , data_tiff , grid_path , space) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def calInterpolation_cubic_Wgs84_rc_sar_sigma(self, parameter_path, dem_rc, in_sar, out_sar): + ''' + # std::cout << "mode 10"; + # std::cout << "SIMOrthoProgram-S-SAR.exe 9 in_parameter_path in_rc_wgs84_path in_ori_sar_path out_orth_sar_path"; + ''' + exe_path = r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd = r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path, 9, parameter_path, + dem_rc, in_sar, out_sar) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def calInterpolation_bil_Wgs84_rc_sar_sigma(self, parameter_path, dem_rc, in_sar, out_sar): + ''' + # std::cout << "mode 11"; + # std::cout << "SIMOrthoProgram-S-SAR.exe 11 in_parameter_path in_rc_wgs84_path in_ori_sar_path out_orth_sar_path"; + ''' + exe_path = r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd = r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path, 11, parameter_path, + dem_rc, in_sar, out_sar) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + + def lee_process_sar(self,in_sar, out_sar, win_size, noise_var): + ''' + # std::cout << "mode 12" + # std::cout << "SIMOrthoProgram-S-SAR.exe 12 in_sar_path out_sar_path win_size noise_var" + ''' + exe_path = r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd = r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path, 12, in_sar, + out_sar, win_size, noise_var) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + + def getPowerTif(self,in_ori_path,out_power_path): + ''' + std::cout << "mode 5: convert ori tiff to power tiff:"; + std::cout << "SIMOrthoProgram-S-SAR.exe 5 in_ori_path out_power_path"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} ".format(exe_path,5,in_ori_path,out_power_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def test_PSTN(self): + landpoint=np.array([-1945072.5,5344083.0,2878316.0]).reshape(1,3) + # 间接定位法所需的参数 + Doppler_d = np.array(self.header_info['ImageInformation']['DopplerCentroidCoefficients']).reshape(-1, 1) + LightSpeed = self.config['LightSpeed'] + T0 = self.header_info['ImageInformation']['refRange'] * 2 / LightSpeed + lamda = self.header_info['ImageInformation']['lambda'] + StartTime = self.header_info['ImageInformation']['StartTime'] + PRF = self.header_info['PRF'] + R0 = self.header_info['ImageInformation']['NearRange'] + r,c,ti=self.PSTN_block(landpoint, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0) + + pass + def findInitPoint(self,sim_mask,dem_gt,sim_r_tif,sim_c_tif,sampling_f): + + # 根据采样点,大致计算出影像的仿射矩阵,并以此进行外扩 + sampling_f=sampling_f//10 + [r_ids,c_ids]=np.where(sim_mask==1) + sim_r_ids=sim_r_tif[r_ids,c_ids] + sim_c_ids=sim_c_tif[r_ids,c_ids] + X=dem_gt[0]+dem_gt[1]*c_ids+dem_gt[2]*r_ids + Y=dem_gt[3]+dem_gt[4]*c_ids+dem_gt[5]*r_ids + # 首先计算X 变换式 + sim_r_ids=sim_r_ids.reshape(-1,1) + sim_c_ids=sim_c_ids.reshape(-1,1) + X=X.reshape(-1,1) + Y=Y.reshape(-1,1) + point_count=sim_c_ids.shape[0] + X_input=np.ones((point_count,3)) + X_input[:,1]=sim_c_ids[:,0] + X_input[:,2]=sim_r_ids[:,0] + A_X=np.matmul(np.matmul(np.linalg.inv(np.matmul(X_input.T,X_input)), X_input.T), X).reshape(-1,1) + A_Y=np.matmul(np.matmul(np.linalg.inv(np.matmul(X_input.T,X_input)), X_input.T), Y).reshape(-1,1) + + sar_gt=[A_X[0,0],A_X[1,0],A_X[2,0],A_Y[0,0],A_Y[1,0],A_Y[2,0]] + width=self.header_info['ImageInformation']['width'] + height=self.header_info['ImageInformation']['height'] + width_f=self.header_info['ImageInformation']['width']/width + height_f=self.header_info['ImageInformation']['height']/height + sar_gt[1]=sar_gt[1]*width_f + sar_gt[2]=sar_gt[2]*height_f + sar_gt[4]=sar_gt[4]*width_f + sar_gt[5]=sar_gt[5]*height_f + # 外扩 + sar_gt[0]=sar_gt[0]+sar_gt[1]*-60+sar_gt[2]*-60 + sar_gt[3]=sar_gt[3]+sar_gt[4]*-60+sar_gt[5]*-60 + + inv_sar_gt=gdal.InvGeoTransform(sar_gt) + for dem_height in [0,sim_mask.shape[0]-1]: + for dem_width in [0,sim_mask.shape[1]-1]: + dem_edge_x=dem_gt[0]+dem_gt[1]*dem_width+dem_gt[2]*dem_height + dem_edge_y=dem_gt[3]+dem_gt[4]*dem_width+dem_gt[5]*dem_height + c_width=inv_sar_gt[0]+inv_sar_gt[1]*dem_edge_x+inv_sar_gt[2]*dem_edge_y + r_height=inv_sar_gt[3]+inv_sar_gt[4]*dem_edge_x+inv_sar_gt[5]*dem_edge_y + if c_width<=0 or r_height<=0: + continue + width=width+120 if width+120=-3000)&(sim_r_tif=0)&(sim_c_tif=0 else 0 + c_min=c_min-len_col if c_min-len_col>=0 else 0 + r_max=r_max+len_row if r_max+len_row=0)&(r_int=0)&(c_int0: # 可以进行行前推 + start_row=1 # 因为外推了一行 + else: # 不可以进行行前推 + start_row=0 # 此时没有外推一行 + if i+block_height_width>=row_count: # 不存在行后推 + if i>0: # 存在行前推, + end_row=start_row+block_row_count-1 + else: # 不存在行前推 + end_row=start_row+block_row_count + else: # 存在行后推 + if i>0: # 存在行前推 + end_row=start_row+block_row_count-2 + else: # 不存在行前推 + end_row=start_row+block_row_count-1 + pass + # 确定列的范围 + if j>0: # 存在列前推 + start_col=1 + else: # 不存在列前推 + start_col=0 + if j+block_height_width>=col_count: # 不存在列后推 + if j>0: # 存在列前推 + end_col=start_col+block_col_count-1 + else: # 不存在列前推 + end_col=start_col+block_col_count + else: # 存在列后推 + if j>0: # 存在列前推 + end_col=start_col+block_col_count-2 + else: # 不存在列前推 + end_col=start_col+block_col_count-1 + pass + return [start_row,start_col,end_row,end_col] + + def CalIntensityResampled(self,TargetPosition,ti,min_theta=0,max_theta=1): + '''计算入射角 + agrs: + TargetPosition: 地面坐标 nxmx3 + ti:对应的卫星空间位置 nxm + return: + Intensity:入射角阵,-9999 不参与运算 + ''' + # 1 + # 2 0 4 + # 3 + # n=(n12+n23+n34+n41)/4 + # n=(n24xn31)/4 + # 计算 n24=n4-n2 + n24=TargetPosition[:,2:,:]-TargetPosition[:,:-2,:] # 4-2 2: 5070x5068 + n24=n24[1:-1,:,:] + # 计算 n31=n1-n3 + n31=TargetPosition[:-2,:,:]-TargetPosition[2:,:,:] # 1-3 5068x5070 + n31=n31[:,1:-1,:] + # 计算坡度平面向量 + N=np.zeros((n31.shape[0],n31.shape[1],n31.shape[2])) + # n24=[a,b,c] + # n31=[d,f,g] + N[:,:,0]=n24[:,:,1]*n31[:,:,2]-n24[:,:,2]*n31[:,:,1] # bg-cf + N[:,:,1]=n24[:,:,2]*n31[:,:,0]-n24[:,:,0]*n31[:,:,2] # cd-ag + N[:,:,2]=n24[:,:,0]*n31[:,:,1]-n24[:,:,1]*n31[:,:,0] # af-bd + N=N*0.25 # 平面坡度向量 + N=N.reshape(-1,3) + del n24,n31 + n=ti.shape[0] + m=ti.shape[1] + # 分块计算 + theta=np.ones((n-2,m-2)).astype(bool) + ti=ti[1:-1,1:-1] + TargetPosition=TargetPosition[1:-1,1:-1] + TargetPosition=TargetPosition.reshape(-1,3) + ti=ti.reshape(-1) + theta=theta.reshape(-1) + # 分块计算 + le_iter=4000 + for i in range(0,theta.shape[0],le_iter): + len_ti=le_iter + if len_ti+i>theta.shape[0]: + len_ti=theta.shape[0]-i + end_i=i+len_ti + # 计算卫星空间坐标 + R_sp = self.SatelliteOrbitModel.getSatelliteSpaceState(ti[i:end_i])[:, :3]-TargetPosition[i:end_i] + # 夹角=arccos((R_sp*N)/(|R_sp|*|N|)) + theta_=np.sum(R_sp*N[i:end_i],axis=1)/(np.sum(R_sp**2,axis=1)*np.sum(N[i:end_i],axis=1)) + theta[i:end_i]=(theta_>min_theta)&(theta_ self.header_info['ImageInformation']['height']+sampling_f*2: + return False,ti[-1,0] + if np.max(c)<-1*sampling_f*2 or np.min(c) > self.header_info['ImageInformation']['width']+sampling_f*2: + return False,ti[-1,0] + return True + + def ConvertCoordinary_test(self, dem_merged_path, sim_out_path,work_temp_path, flag=1): + + print("当前python程序,内存占用 {}G".format(psutil.Process(os.getpid()).memory_info().rss / 1024 / 1024 / 1024)) + """ + 批量求解点坐标的性能改进: + 主要针对数据频繁开关文件读写 + flag:是否想要经纬度转大地坐标系 + """ + start = time.time() + # 间接定位法所需的参数 + Doppler_d = np.array(self.header_info['ImageInformation']['DopplerCentroidCoefficients']).reshape(-1, 1) + LightSpeed = self.config['LightSpeed'] + T0 = self.header_info['ImageInformation']['refRange'] * 2 / LightSpeed + lamda = self.header_info['ImageInformation']['lambda'] + StartTime = self.header_info['ImageInformation']['StartTime'] + PRF = self.header_info['PRF'] + R0 = self.header_info['ImageInformation']['NearRange'] + # 计算采样率 + + # 读取影像 + dem_resampled_tiff = gdal.Open(dem_merged_path) + row_count = dem_resampled_tiff.RasterYSize # 读取图像的行数 + col_count = dem_resampled_tiff.RasterXSize # 读取图像的列数 + im_proj = dem_resampled_tiff.GetProjection() + im_geotrans = list(dem_resampled_tiff.GetGeoTransform()) + gt = im_geotrans # 坐标变换参数 + # 计算采样率 + sampling_f=self.CalSamplingRateOfDEM(dem_resampled_tiff) + + # 创建目标虚拟影像 + SAR_width=self.header_info['ImageInformation']['width'] + SAR_height=self.header_info['ImageInformation']['height'] + + SAR_row_col_array=np.zeros((row_count,col_count,2),np.float32) + + for ii in range(0,row_count,3000): + if ii==row_count: + continue + altii=dem_resampled_tiff.GetRasterBand(1).ReadAsArray(0, ii, col_count, 3000) + if altii is None: + # 长度过长,设置行数 + altii=dem_resampled_tiff.GetRasterBand(1).ReadAsArray(0, ii, col_count, int(row_count-ii)) + pass + h=int(altii.shape[0]) + w=int(altii.shape[1]) + y_pixel=(np.ones((w,h))*range(h)+ii).transpose(1,0) + x_pixel=np.ones((h,w))*range(w) + lat=gt[0]+gt[1]*x_pixel+gt[2]*y_pixel # 经度 + lon=gt[3]+gt[4]*x_pixel+gt[5]*y_pixel # 纬度 + #del x_pixel,y_pixel + #gc.collect() + [X, Y, Z] = OrthoAuxData.LLA2XYZM(lat.reshape(-1,1), lon.reshape(-1,1), altii.reshape(-1,1)) # 计算错误 + TargetPosition = np.ones((int(h*w), 3), dtype=np.float32) + TargetPosition[:, 0] = X.reshape(-1) + TargetPosition[:, 1] = Y.reshape(-1) + TargetPosition[:, 2] = Z.reshape(-1) + r, c, ti = self.PSTN_M(TargetPosition, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0) # 间接定位法,核心求解代码 + + SAR_row_col_array[ii:ii+h,:,0]=r.reshape(-1,col_count) + SAR_row_col_array[ii:ii+h,:,1]=c.reshape(-1,col_count) + gtiff_driver = gdal.GetDriverByName('GTiff') + SAR_row_col=gtiff_driver.Create(sim_out_path.replace(".tif","rc.tif"),col_count,row_count,2,gdal.GDT_Float32) + SAR_row_col.SetGeoTransform(im_geotrans) # 写入仿射变换参数 + SAR_row_col.SetProjection(im_proj) # 写入投影 + # 写入tiff + SAR_row_col.GetRasterBand(1).WriteArray(SAR_row_col_array[:,:,0]) + SAR_row_col.GetRasterBand(2).WriteArray(SAR_row_col_array[:,:,1]) + print(sim_out_path.replace(".tif","rc.tif")) + return sim_out_path.replace(".tif","rc.tif") + pass + + def CalSamplingRateOfDEM(self,DEM_tiff): + '''计算DEM的重采样率f,必须在解析头文件之后,参考陈尔学 博士学位论文 《 星载合成孔径雷达影像正射校正方法研究 》 + args: + DEM_tiff:tif DEM的影像 + return: + f:采样率,向上取整 + ''' + # 获取DEM_tiff的高宽、投影、仿射矩阵 + Trans_array=list(DEM_tiff.GetGeoTransform()) # 仿射变换矩阵 + width=DEM_tiff.RasterXSize + height=DEM_tiff.RasterYSize + # x=trans[0]+trans[1]*c+trans[2]*r + # y=trans[3]+trans[4]*c+trans[5]*r + # 获得其高宽分辨率 + delta_x=Trans_array[1]+Trans_array[2] # x轴上的分辨率 经度 + delta_y=Trans_array[4]+Trans_array[5] # y轴上的分辨率 纬度 + # 因为单位为度,所以需要转换为 米 + y_resultion=abs(111194.926644558737*delta_y) + x_resultion=abs(111194.926644*math.cos(Trans_array[3])*delta_x) + resultion=x_resultion if x_resultion>y_resultion else y_resultion + delta_R=self.delta_R # 斜距分辨率 + incidenceAngle=self.header_info['ImageInformation']['incidenceAngle']["NearRange"] # 入射角 + f=math.sin(incidenceAngle*math.pi/180)*1.4142135623730951*resultion/delta_R + f=math.ceil(f) + return f + + def PSTN_M2(self, TargetPostion, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0): + """ + 间接求解方法,使用矩阵方法,分段计算,方便加速 + args: + TargetPosition:nparray,nx3 地面坐标 + Doppler_d:多普勒系数 -1,1 + lamda:波长 + T0:多普勒参考时间 + LightSpeed:光速 + return: + rc:nparray shape nx2 行列号 + """ + # + + n = int(TargetPostion.shape[0]) # 坐标点数据 nx3 + r=np.zeros((n,1)) + c=np.zeros((n,1)) + ti=np.zeros((n,1),dtype=np.float64) + len_iter=2000 + pool= ThreadPoolExecutor() + pool_ls=[] + SatelliteOrbitModelstarttime=self.SatelliteOrbitModel.get_starttime() + SatelliteOrbitModelParameters=self.SatelliteOrbitModel.A_arr + SatelliteOrbitModelName=self.SatelliteOrbitModel.modelName + delta_R=self.delta_R + for i in range(0, n, len_iter): + start_i=i + len_block=len_iter + if start_i+len_block>n: + len_block=n-start_i + end_i=start_i+len_block + temp_TargetPosition=TargetPostion[start_i:end_i,:] + pool_ls.append( pool.submit(PSTN_block_MuilThread,copy.deepcopy(start_i),copy.deepcopy(end_i), + temp_TargetPosition.copy(), + copy.deepcopy(Doppler_d), + copy.deepcopy(StartTime), + copy.deepcopy(lamda), + copy.deepcopy(T0), copy.deepcopy(LightSpeed), + copy.deepcopy(PRF),copy.deepcopy(R0), + copy.deepcopy(delta_R), + copy.deepcopy(SatelliteOrbitModelstarttime), + SatelliteOrbitModelParameters.copy(), + copy.deepcopy(SatelliteOrbitModelName),)) + pool.close() + pool.join() + for p in pool_ls: + r_temp, c_temp, ti_temp,start_i,end_i=p.get() + r[start_i:end_i,:]=r_temp + c[start_i:end_i,:]=c_temp + ti[start_i:end_i,:]=ti_temp + + return r,c,ti + + def PSTN_M(self, TargetPostion, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0): + """ + 间接求解方法,使用矩阵方法,分段计算,方便加速 + args: + TargetPosition:nparray,nx3 地面坐标 + Doppler_d:多普勒系数 -1,1 + lamda:波长 + T0:多普勒参考时间 + LightSpeed:光速 + return: + rc:nparray shape nx2 行列号 + """ + # + n = int(TargetPostion.shape[0]) # 坐标点数据 nx3 + r=np.zeros((n,1)) + c=np.zeros((n,1)) + ti=np.zeros((n,1),dtype=np.float64) + init_size=3000 + for i in range(0,n,init_size): + start_i=i + len_block=init_size + if start_i+len_block>n: + len_block=n-start_i + end_i=start_i+len_block + temp_TargetPosition=TargetPostion[start_i:end_i,:] + r_temp, c_temp, ti_temp=self.PSTN_block(temp_TargetPosition, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0) + + r[start_i:end_i,:]=r_temp.copy() + c[start_i:end_i,:]=c_temp.copy() + ti[start_i:end_i,:]=ti_temp.copy() + return r,c,ti + + def PSTN_block(self, TargetPostion, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0): + ''' + 间接求解方法,使用矩阵方法 + args: + TargetPosition:nparray,nx3 地面坐标 + Doppler_d:多普勒系数 -1,1 + lamda:波长 + T0:多普勒参考时间 + LightSpeed:光速 + return: + rc:nparray shape nx2 行列号 + ''' + n = TargetPostion.shape[0] # 坐标点数据 nx3 + ti = np.ones((n, 1),dtype=np.float64) * StartTime # 初始值 + delta_R = self.delta_R + delta_t = 1 / PRF + R=np.zeros((n,1)) + Rs = np.zeros((n, 3)) + R_sc = np.zeros((n, 3)) # 地面-卫星空间位置矢量 + V_sc = np.zeros((n, 3)) # 地面-卫星空间速率矢量 + FdNumerical = np.ones((n, 1)) # 多普勒公式的数值解法 + FdTheory = np.ones((n, 1)) # 多普勒公式的理论解法 + FdTheory_grad = np.ones((n, 1)) # 多普勒公式的导数 + # 多普勒参数系数 + Doppler_d = Doppler_d.reshape(-1, 1) # 5x1 + TSR=np.ones((n, 1)) # nx1 + TSRx = np.ones((n, Doppler_d.shape[0])) # nx5 + inc_t = np.ones((n, 1)) # 计算增加的导数 + dt = 0.0001 # 数值法求解多普勒距离公式的导数 + dt_rec=1/dt + # 默认最高迭代100次,如果还未求解出结果,就将所有的未收敛的时间值记录为0 ,注意时间不能为0 + for i in range(100): + tempT = ti + dt # 计算增加时间 + # ------- 求解导数 ---------------- + #del Rs,R_sc,V_sc,TSR,TSRx,satelliteSpaceState,R + satelliteSpaceState = self.SatelliteOrbitModel.getSatelliteSpaceState(tempT) # 卫星坐标与速度 nx6 + Rs = satelliteSpaceState[:, :3] + R_sc = satelliteSpaceState[:, :3] - TargetPostion # 地面-卫星空间位置矢量 + V_sc = satelliteSpaceState[:, 3:] # 地面-卫星空间位置矢量 + R =np.sqrt(np.sum(R_sc ** 2, axis=1)).reshape(-1, 1) # nx1 + #FdTheory_grad = (-2 / lamda) * (1 / R) * np.sum(R_sc * V_sc, axis=1).reshape(-1, 1) # nx1 + FdTheory_grad = -2*np.reciprocal(R*lamda) * np.sum(R_sc * V_sc, axis=1).reshape(-1, 1) # nx1 + + # 获取卫星轨道状态信息 + satelliteSpaceState = self.SatelliteOrbitModel.getSatelliteSpaceState(ti) # 卫星坐标与速度 nx6 + # 卫星轨道坐标 + Rs =satelliteSpaceState[:, :3] + # 卫星相对地面的位置向量、卫星速度向量 + R_sc=Rs - TargetPostion # 地面-卫星空间位置矢量 + V_sc =satelliteSpaceState[:, 3:] # 地面-卫星空间位置矢量 + # 斜距 + R = np.sqrt(np.sum(R_sc ** 2, axis=1)).reshape(-1, 1) # nx1 + # 根据多普勒数值求解公式求解多普勒频移值 + TSR= R * (2 / LightSpeed) - T0 # nx1 + TSRx[:,0]=TSR[:,0]**0 # nx5 + TSRx[:,1]=TSR[:,0]**1 + TSRx[:,2]=TSR[:,0]**2 + TSRx[:,3]=TSR[:,0]**3 + TSRx[:,4]=TSR[:,0]**4 + # 根据多普勒物理公式求解求解多普勒频移值 + FdTheory=-2*np.reciprocal(lamda*R)*np.sum(R_sc * V_sc, axis=1).reshape(-1, 1) # nx1 + FdNumerical= np.matmul(TSRx, Doppler_d) # nx1 + + FdTheory_grad = np.reciprocal((FdTheory_grad - FdTheory) * dt_rec) # nx1 + inc_t = (FdTheory - FdNumerical) * FdTheory_grad #(FdTheory - FdNumerical) * (1 / FdTheory_grad) # nx1 + # inc_t = inc_t - inc_t * ti_mask # 允许继续迭代 nx1 + if np.max(np.abs(inc_t)) < delta_t * 0.001: + break + ti = ti - inc_t # 更新坐标 + #del Rs,R_sc,V_sc,R,satelliteSpaceState,FdTheory_grad,FdNumerical,inc_t + #print("当前python程序,{} step, inc_t {} 求解内存占用 {}G".format(i,np.max(inc_t),psutil.Process(os.getpid()).memory_info().rss / 1024 / 1024 / 1024)) + # 计算行号 + ti_=copy.deepcopy(ti.copy()) + r_ = (ti_ - StartTime)*PRF + delta_t_light=delta_t*LightSpeed + r=copy.deepcopy(r_.copy()) + del r_ + c_ = (R - R0) * (1 / delta_R) + c=copy.deepcopy(c_.copy()) + del c_ + ti = copy.deepcopy(ti_.copy()) + del ti_ + return r, c, ti + pass + + def sim_intensity(self, in_tif_path, dem_resampled_path, lut_tif_path, incidence_tif_path, sim_out_path): + """ + 局部入射角计算 + 原方法存在的问题:多次文件读写 + """ + dem_resampled_tiff = gdal.Open(dem_resampled_path) # 获取重采样的DEM 数据,为了减少文件读写操作,这里做了持久化 + im_proj = dem_resampled_tiff.GetProjection() # 构建投影 + im_geotrans = list(dem_resampled_tiff.GetGeoTransform()) # 构建投影变换对象 + [a1, b1, c1, a2, b2, c2] = im_geotrans # 坐标变换参数:c1=0,b2=0 + start = time.time() # 度量算法 + dem_resampled = dem_resampled_tiff.GetRasterBand(1).ReadAsArray(0, 0, dem_resampled_tiff.RasterXSize, + dem_resampled_tiff.RasterYSize) + del dem_resampled_tiff # 释放内存 + incidence = dem_resampled * 0.0 + 1.8 + # 读取时间 + in_ds = gdal.Open(lut_tif_path) # 读取间接法 + row_cnt = in_ds.RasterYSize + col_cnt = in_ds.RasterXSize + t_arr = in_ds.GetRasterBand(3).ReadAsArray(0, 0, col_cnt, row_cnt).astype(np.float64) # 获取时间阵列 + t_arr = t_arr[1:-1, 1:-1] + self.header_info['ImageInformation']['StartTime'] # 去除最外围一圈时间数据 + row_data = in_ds.GetRasterBand(1).ReadAsArray(0, 0, col_cnt, row_cnt) # 读取行号 + col_data = in_ds.GetRasterBand(2).ReadAsArray(0, 0, col_cnt, row_cnt) # 读取列号 + row_data = np.round(row_data) + col_data = np.round(col_data) + row_data = row_data.astype(np.int16) + col_data = col_data.astype(np.int16) + del in_ds # 释放内存 + c = range(0, col_cnt) + c = np.array(c).reshape(-1, 1) + + for r0 in range(1, row_cnt - 1): + T0 = np.zeros((col_cnt, 3)) # colcount-2 ,3 + T0[:, 0] = a1 + b1 * c[:, 0] + c1 * r0 + T0[:, 1] = a2 + b2 * c[:, 0] + c2 * r0 + T0[:, 2] = dem_resampled[r0, :] + + T0 = np.concatenate(OrthoAuxData.LLA2XYZM(T0[:, 0].reshape(-1, 1), T0[:, 1].reshape(-1, 1), T0[:, 2].reshape(-1, 1)), axis=1) + n1 = np.concatenate(OrthoAuxData.LLA2XYZM(a1 + b1 * c + c1 * (r0 - 1), a2 + b2 * c + c2 * (r0 - 1), + dem_resampled[r0 - 1, :]), axis=1)[1:-1, :] - T0[1:-1, :] # colcount-2 ,3 + n3 = np.concatenate(OrthoAuxData.LLA2XYZM(a1 + b1 * c + c1 * (r0 + 1), a2 + b2 * c + c2 * (r0 + 1), + dem_resampled[r0 + 1, :]), axis=1)[1:-1, :] - T0[1:-1, :] # colcount-2 ,3 + n2 = T0[:-2, :] - T0[1:-1, :] + n4 = T0[2:, :] - T0[1:-1, :] + T0 = T0[1:-1, :] + n31 = n1 - n3 + n42 = n2 - n4 + + N = XYZOuterM2(n31, n42) / 4 + ti = t_arr[r0 - 1, :].reshape(-1, 1) # rowcount-2,colcount-2 + satelliteSpaceState = self.SatelliteOrbitModel.getSatelliteSpaceState(ti) + Rps = satelliteSpaceState[:, :3] - T0 # nx3 + # 计算向量模之积 + N_Norm = np.sqrt(np.sum(N * N, axis=1)).reshape(-1, 1) + Rps_Norm = np.sqrt(np.sum(Rps * Rps, axis=1)).reshape(-1, 1) + N_Norm = np.concatenate((N_Norm, N_Norm, N_Norm), axis=1) + Rps_Norm = np.concatenate((Rps_Norm, Rps_Norm, Rps_Norm), axis=1) + N = N / N_Norm + Rps = Rps / Rps_Norm + # 计算向量相乘 + N_Rps = np.sum(N * Rps, axis=1) # col_count-2 + theta = np.arccos(N_Rps) # 入射角 + incidence[r0, 1:-1] = theta + + incidence = np.degrees(incidence) + print('整张图入射角计算完成,耗时{}秒'.format(time.time() - start)) + ImageHandler.write_img(incidence_tif_path, im_proj, im_geotrans, incidence) + + # 读取原始影像相关信息 + in_tif = gdal.Open(in_tif_path) + col_num = in_tif.RasterXSize + row_num = in_tif.RasterYSize + im_proj1 = in_tif.GetProjection() # 构建投影 + im_geotrans1 = in_tif.GetGeoTransform() + out_arr = np.zeros((row_num, col_num), dtype=np.float32) + for h in range(row_cnt): + r_min = min(row_data[h]) + r_max = max(row_data[h]) + c_min = min(col_data[h]) + c_max = max(col_data[h]) + if 0 <= r_min < row_num or 0 <= r_max < row_num or (r_min < 0 and r_max >= row_num): + if 0 <= c_min < col_num or 0 <= c_max < col_num or (c_min < 0 and c_max >= col_num): + for w in range(col_cnt): + r = row_data[h, w] + c = col_data[h, w] + if 0 <= r < row_num and 0 <= c < col_num: + if 0 <= incidence[h, w] < 90: + out_arr[r, c] += 1 + K = 10 + out_arr = K * out_arr + max_delta = np.max(out_arr) + min_delta = np.min(out_arr) + out_arr = (out_arr - min_delta) / (max_delta - min_delta) + ImageHandler.write_img(sim_out_path, im_proj1, im_geotrans1, out_arr) + + @staticmethod + def sar_intensity_synthesis(sar_in_tif, sar_out_tif): + # 获取SLC格式SAR影像的相关信息 + in_ds = gdal.Open(sar_in_tif) + bands_num = in_ds.RasterCount + rows = in_ds.RasterYSize + columns = in_ds.RasterXSize + proj = in_ds.GetProjection() + geotrans = in_ds.GetGeoTransform() + + datatype = gdal.GDT_Float32 + + # 创建输出的SAR强度图 + gtiff_driver = gdal.GetDriverByName('GTiff') + out_ds = gtiff_driver.Create(sar_out_tif, columns, rows, 1, datatype) + + # 输出SAR强度图 + out_data=np.zeros((rows,columns)) + for i in range(0,rows,10000): + for j in range(0,columns,10000): + len_row=10000 + len_col=10000 + if i+len_row>rows: + len_row=rows-i + if j+len_col>columns: + len_col=columns-j + end_i=i+len_row + end_j=j+len_col + in_data1 = in_ds.GetRasterBand(1).ReadAsArray(j, i, len_col, len_row).astype(np.float32) + in_data2 = in_ds.GetRasterBand(2).ReadAsArray(j, i, len_col, len_row).astype(np.float32) + out_data[i:end_i,j:end_j] = np.log10((in_data1**2 + in_data2**2)+1)*10 + out_ds.GetRasterBand(1).WriteArray(out_data) + del in_ds, out_ds + + @staticmethod + def img_match(sim_sar_path, ori_sar_path,work_sapce_path): + ''' 影像匹配并根据配准点 + args: + sim_sar_path:模拟SAR强度图 + orig_sar_path: 原始SAR强度图 + out_path:配准结果输出点 + work_space_path: 工作目录 + return: + point_correct: 点集映射结果 + raise: + None: 出现错误 + ''' + match_points_path=ImageMatchClass.ImageMatch(ori_sar_path,sim_sar_path,work_sapce_path) + match_points_path=os.path.join(work_sapce_path,"GridMatch.npy") + match_result_path=os.path.join(work_sapce_path,"match_result.npy") + match_result_image_path=os.path.join(work_sapce_path,"match_result_show.tif") + ImageMatchClass.DeNoiseMatch(match_points_path,match_result_path) + ImageMatchClass.DrawMatchResult(ori_sar_path,sim_sar_path,match_result_path,match_result_image_path) + return match_result_path + + def IndireOrtho_smi(self,sim_SAR_rc_path,ori_SAR_path,tar_sar_path): + ''' + 测试间接定位法计算的影像坐标是否有问题。 + 方法核心,插值出间接定位法坐标处的 实部和虚部,不考虑其他区域 + 使用插值方法:等权反距离权重法 + 考虑实际的数据量较大,为节省内存,使用分块处理方法。 + 块大小为1000。 + ''' + sim_rc_tif=gdal.Open(sim_SAR_rc_path) + sim_width=sim_rc_tif.RasterXSize + sim_height=sim_rc_tif.RasterYSize + sim_r_tif=sim_rc_tif.GetRasterBand(1).ReadAsArray(0,0,sim_width,sim_height) + sim_c_tif=sim_rc_tif.GetRasterBand(2).ReadAsArray(0,0,sim_width,sim_height) + # 构建掩膜 + sim_mask=(sim_r_tif>0)&(sim_r_tif0)&(sim_c_tif模拟 + args: + point_arr:[模拟row,模拟col,原始row,原始col] + ''' + # 由模拟->原始 + point_cnt = point_arr.shape[0] # + rs_arr = point_arr[:,2].reshape(point_cnt, 1) # 原始 行 + cs_arr = point_arr[:,3].reshape(point_cnt, 1) + + rm_arr = point_arr[:,0].reshape(point_cnt, 1)-3000 # 模拟 行 还原偏移 + cm_arr = point_arr[:,1].reshape(point_cnt, 1) + X = np.concatenate( + [np.ones((point_cnt, 1), dtype=np.float64), rm_arr, cm_arr, rm_arr ** 2, cm_arr ** 2, rm_arr * cm_arr], + axis=1) + sim2orirc_arr=np.ones((2,6)) + sim2orirc_arr[0,:] = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), rs_arr).reshape(1, 6) + sim2orirc_arr[1,:] = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), cs_arr).reshape(1, 6) + + # 翻转 sim->ori + X = np.concatenate( + [np.ones((point_cnt, 1), dtype=np.float64), rs_arr, cs_arr, rs_arr ** 2, cs_arr ** 2, rs_arr * cs_arr], + axis=1) + ori2simrc_arr=np.ones((2,6)) + ori2simrc_arr[0,:] = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), rm_arr).reshape(1, 6) + ori2simrc_arr[1,:] = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), cm_arr).reshape(1, 6) + return ori2simrc_arr.copy(),sim2orirc_arr.copy() + + @staticmethod + def ReSamplingSAR(ori_sar_path,out_sar_path,lon_lat_point_match_path,gt): + ''' 根据影像点匹配点,插值得到正射图像 + args: + ori_sar_path: 输入sar地址 + out_sar_path: 正射结果地址 + lon_lat_point_match_path: CoordinateCorrection计算结果的路径 + gt: 仿射矩阵 + return: + out_sar_path + ''' + + ori_sar=gdal.Open(ori_sar_path) + ori_height=ori_sar.RasterYSize # 获得高度 + ori_width=ori_sar.RasterXSize # 获得宽度 + # 开始插值 + spatialreference=osr.SpatialReference() + spatialreference.SetWellKnownGeogCS("WGS84") # 设置地理坐标,单位为度 degree # 设置投影坐标,单位为度 degree + spatialproj=spatialreference.ExportToWkt() # 导出投影结果 + gtiff_driver = gdal.GetDriverByName('GTiff') + out_sar=gtiff_driver.Create(out_sar_path, ori_width, ori_height, 2, gdal.GDT_Float32) + out_sar.SetGeoTransform(gt) # 写入仿射变换参数 + out_sar.SetProjection(spatialproj) # 写入投影 + + ab=np.array([gt[1],gt[2],gt[4],gt[5]]).reshape(2,2) + ab=np.np.matmul(np.linalg.inv(np.np.matmul(ab.T,ab)),ab.T) + # 解算仿射矩阵,为后面的插值做准备 + lon_lat_file_list=os.listdir(lon_lat_point_match_path) + block_info_json=[] + for lon_lat_file_name in lon_lat_file_list: + lon_lat=np.load(os.path.join(lon_lat_point_match_path,lon_lat_file_name)) + ori_r=lon_lat[:,0] # 原始影像的行坐标 + ori_c=lon_lat[:,1] # 原始影像的列坐标 + lon=lon_lat[:,2].copy() + lat=lon_lat[:,3].copy() + # 根据仿射矩阵阶段投影变换结果 + lon=lon-gt[0] + lat=lat-gt[3] + lon_lat[:,2]=ab[0,0]*lon+ab[0,1]*lat # 行 + lon_lat[:,3]=ab[1,0]*lon+ab[1,1]*lat # 列 + block_info_json.append({ + 'ori':[np.min(lon_lat[:,0]),np.max(lon_lat[:,0]),np.min(lon_lat[:,1]),np.max(lon_lat[:,1])],# r0 r1 c0 c1 + 'ortho':[np.min(lon_lat[:,2]),np.max(lon_lat[:,2]),np.min(lon_lat[:,3]),np.max(lon_lat[:,3])], + 'path':os.path.join(lon_lat_point_match_path,lon_lat_file_name) + }) + + for i in range(0,ori_height,6000): + for j in range(0,ori_width,6000): + # 判断需要检索的行列 + len_row=6000 + len_col=6000 + if i+len_row>ori_height: + len_row=ori_height-i + if j+len_col>ori_width: + len_col=ori_width-j + end_i=i+len_row + end_j=j+len_col + select_region=[i-1000,end_i+1000,j-1000,end_i+1000] + # 根据求交原则,解出需要可以参与插值计算的 方块 + inter_block=[] + for block in block_info_json: + block_ortho =block['ortho'] + if block_ortho[0]>select_region[0] and block_ortho[1]select_region[2] and block_ortho[3]模拟SAR + # X=a0+a1*r+a2*c+a5*r*c+a3*r^2+a4*c^2 + # Y=b0+b1*r+b2*c+b5*r*c+b3*r^2+b4*r^2 + point_arr=np.load(point_match_path) + rcori2simrc_arr,sim2orirc_arr=IndirectOrthorectification.CoordinateTransformation(point_arr) + # 根据行列号裁剪DEM + sim_rc_tif=gdal.Open(sim_out_path) + sim_width=sim_rc_tif.RasterXSize + sim_height=sim_rc_tif.RasterYSize + sim_r_tif=sim_rc_tif.GetRasterBand(1).ReadAsArray(0,0,sim_width,sim_height) + sim_c_tif=sim_rc_tif.GetRasterBand(2).ReadAsArray(0,0,sim_width,sim_height) + + # 计算实际行列号 + r=sim2orirc_arr[0,0]+sim2orirc_arr[0,1]*sim_r_tif+sim2orirc_arr[0,2]*sim_c_tif+sim2orirc_arr[0,3]*sim_r_tif*sim_r_tif+sim2orirc_arr[0,4]*sim_c_tif*sim_c_tif+sim2orirc_arr[0,5]*sim_r_tif*sim_c_tif + c=sim2orirc_arr[1,0]+sim2orirc_arr[1,1]*sim_r_tif+sim2orirc_arr[1,2]*sim_c_tif+sim2orirc_arr[1,3]*sim_r_tif*sim_r_tif+sim2orirc_arr[1,4]*sim_c_tif*sim_c_tif+sim2orirc_arr[1,5]*sim_r_tif*sim_c_tif + sim_r_tif=r + sim_c_tif=c + del r,c + + # + sim_mask=(sim_r_tif>=-1)&(sim_r_tif=-1)&(sim_c_tif原始 + ori_rc=np.ones((r_ids.size,2)) + ori_rc[:,0]=r_arr_trans[0,0]+r_ids*r_arr_trans[0,1]+c_ids*r_arr_trans[0,2]+r_arr_trans[0,3]*r_ids ** 2+r_arr_trans[0,4]*c_ids ** 2+r_arr_trans[0,5]*r_ids * c_ids + ori_rc[:,1]=c_arr_trans[0,0]+r_ids*c_arr_trans[0,1]+c_ids*c_arr_trans[0,2]+c_arr_trans[0,3]*r_ids ** 2+c_arr_trans[0,4]*c_ids ** 2+c_arr_trans[0,5]*r_ids * c_ids + # 插值x坐标 + sim_x_data=gdal.Open(sim_sar_x_path) + sim_x_arr=sim_x_data.GetRasterBand(1).ReadAsArray(0,0 , sim_x_data.RasterXSize, sim_x_data.RasterYSize) # 块 高程文件 + sim_x=sim_x_arr[r_ids,c_ids] + del sim_x_arr,sim_x_data + tree=KDTree(ori_rc) # 原始sar点对应的坐标 + + gtiff_driver = gdal.GetDriverByName('GTiff') + SAR_row_col=gtiff_driver.Create(ori_xyz_path,width,height,3,gdal.GDT_Float32) + # 准备插值--分块插值 + blocksize=5000 + SAR_ori=np.zeros((height,width)) + for i in range(0,height,blocksize): + for j in range(0,width,blocksize): + start_row=i + start_col=j + len_row=blocksize + len_col=blocksize + if(start_row+len_row>height): + len_row=height-start_row + if(start_col+len_col>width): + len_col=width-start_col + end_row=start_row+len_row + end_col=start_col+len_col + grid_xy= np.mgrid[start_row:end_row:1, start_col:end_col:1] + grid_xy=grid_xy.reshape(2,-1).transpose(1,0) + distance_weight,ori_select=tree.query(grid_xy,k=10) + distance_weight=np.reciprocal(distance_weight) + distance_weight=np.multiply(distance_weight.transpose(1,0),np.reciprocal(np.sum(distance_weight,axis=1))) + distance_weight=distance_weight.transpose(1,0) + SAR_ori[start_row:end_row,start_col:end_col]=np.sum( np.multiply(distance_weight,sim_x[ori_select]),axis=1).reshape(len_row,len_col) + + SAR_row_col.GetRasterBand(1).WriteArray(SAR_ori) + + # 插值y坐标 + sim_y_data=gdal.Open(sim_sar_y_path) + sim_y_arr=sim_y_data.GetRasterBand(1).ReadAsArray(0,0 , sim_y_data.RasterXSize, sim_y_data.RasterYSize) # 块 高程文件 + sim_y=sim_y_arr[r_ids,c_ids] + del sim_y_arr,sim_y_data,sim_x + # 准备插值--分块插值 + blocksize=5000 + SAR_ori=np.zeros((height,width)) + for i in range(0,height,blocksize): + for j in range(0,width,blocksize): + start_row=i + start_col=j + len_row=blocksize + len_col=blocksize + if(start_row+len_row>height): + len_row=height-start_row + if(start_col+len_col>width): + len_col=width-start_col + end_row=start_row+len_row + end_col=start_col+len_col + grid_xy= np.mgrid[start_row:end_row:1, start_col:end_col:1] + grid_xy=grid_xy.reshape(2,-1).transpose(1,0) + distance_weight,ori_select=tree.query(grid_xy,k=10) + distance_weight=np.reciprocal(distance_weight) + distance_weight=np.multiply(distance_weight.transpose(1,0),np.reciprocal(np.sum(distance_weight,axis=1))) + distance_weight=distance_weight.transpose(1,0) + SAR_ori[start_row:end_row,start_col:end_col]=np.sum(np.multiply(distance_weight,sim_y[ori_select]),axis=1).reshape(len_row,len_col) + + SAR_row_col.GetRasterBand(2).WriteArray(SAR_ori) + # 插值z坐标 + sim_z_data=gdal.Open(sim_sar_z_path) + sim_z_arr=sim_z_data.GetRasterBand(1).ReadAsArray(0,0 , sim_z_data.RasterXSize, sim_z_data.RasterYSize) # 块 高程文件 + sim_z=sim_z_arr[r_ids,c_ids] + del sim_z_arr,sim_z_data,sim_y + # 准备插值--分块插值 + blocksize=5000 + SAR_ori=np.zeros((height,width)) + for i in range(0,height,blocksize): + for j in range(0,width,blocksize): + start_row=i + start_col=j + len_row=blocksize + len_col=blocksize + if(start_row+len_row>height): + len_row=height-start_row + if(start_col+len_col>width): + len_col=width-start_col + end_row=start_row+len_row + end_col=start_col+len_col + grid_xy= np.mgrid[start_row:end_row:1, start_col:end_col:1] + grid_xy=grid_xy.reshape(2,-1).transpose(1,0) + distance_weight,ori_select=tree.query(grid_xy,k=10) + distance_weight=np.reciprocal(distance_weight) + distance_weight=np.multiply(distance_weight.transpose(1,0),np.reciprocal(np.sum(distance_weight,axis=1))) + distance_weight=distance_weight.transpose(1,0) + SAR_ori[start_row:end_row,start_col:end_col]=np.sum(np.multiply(distance_weight,sim_z[ori_select]),axis=1).reshape(len_row,len_col) + SAR_row_col.GetRasterBand(3).WriteArray(SAR_ori) + return ori_xyz_path + + def outResamplingParas(self,work_space_file,ortho_sar_xyz_pow_path,sar_xyz_path,sar_incidence_path,ortho_sar_xyz_path,ortho_sar_incidence_path,out_sar_file_list,dem_clip_path,ori2sim,sim2ori): + ''' + sar_xyz_path:xyz插值结果 + sar_incidence_path: 入射角 + ortho_sar_xyz_path: 重采样结果文件夹 + out_sar_file_list:需要重采样的文件 + rc_trans_arr:变换结果 + + ''' + with open(os.path.join(work_space_file,"resample_para.txt"),'w',encoding='utf-8') as fp: + fp.write("{}\n".format(dem_clip_path)) + fp.write("{}\n".format(os.path.join(work_space_file,"ori_sim.tif"))) + fp.write("{}\n".format(sar_xyz_path)) + fp.write("{}\n".format(sar_incidence_path)) + fp.write("{}\n".format(ortho_sar_incidence_path)) + fp.write("{}\n".format(ortho_sar_incidence_path.replace("orth_sar_incidence.tif","orth_sar_local_incidence.tif"))) + fp.write("{}\n".format(ortho_sar_xyz_path)) + fp.write("{}\n".format(len(out_sar_file_list))) + for i in range(len(out_sar_file_list)): + file_name=os.path.split(out_sar_file_list[i])[1] + fp.write("{}\n".format(out_sar_file_list[i])) + fp.write("{}\n".format(os.path.join(ortho_sar_xyz_path,file_name))) + fp.write("{}\n".format(os.path.join(ortho_sar_xyz_pow_path,file_name))) + #os.path.split(in_tif_path)[1] + + fp.write("{}\n".format(12)) + for i in range(6): + fp.write("{}\n".format(ori2sim[0,i])) + for i in range(6): + fp.write("{}\n".format(ori2sim[1,i])) + fp.write("{}\n".format(12)) + for i in range(6): + fp.write("{}\n".format(sim2ori[0,i])) + for i in range(6): + fp.write("{}\n".format(sim2ori[1,i])) + return os.path.join(work_space_file,"resample_para.txt") + + def Resampling(self,out_sar_xyz_path,inv_gt,gt,ori_resampling_file_path): + out_xyz=gdal.Open(out_sar_xyz_path) + ori_height=out_xyz.RasterYSize # 获得高度 + ori_width=out_xyz.RasterXSize # 获得宽度 + out_xyz_x=out_xyz.GetRasterBand(1).ReadAsArray(0,0 , ori_width, ori_height) + out_xyz_y=out_xyz.GetRasterBand(2).ReadAsArray(0,0 , ori_width, ori_height) + + # 计算对应的行列号 + out_xyz_rc=np.ones((ori_height,ori_width,2)) + out_xyz_rc[:,:,1]=inv_gt[0]+inv_gt[1]*out_xyz_x+inv_gt[2]*out_xyz_y + out_xyz_rc[:,:,0]=inv_gt[3]+inv_gt[4]*out_xyz_x+inv_gt[5]*out_xyz_y + del out_xyz_x,out_xyz_y,out_xyz + out_xyz_rc=out_xyz_rc.reshape(-1,2) + + blocksize=2000 + ori_data=gdal.Open(ori_resampling_file_path[0][0][0]) + width=ori_data.RasterXSize + height=ori_data.RasterYSize + SAR_ori=np.ones((width,height)) + sim_x=ori_data.GetRasterBand(1).ReadAsArray(0,0 , width, height).reshape(-1) + tree=KDTree(out_xyz_rc) + for i in range(0,height,blocksize): + for j in range(0,width,blocksize): + start_row=i + start_col=j + len_row=blocksize + len_col=blocksize + if(start_row+len_row>height): + len_row=height-start_row + if(start_col+len_col>width): + len_col=width-start_col + end_row=start_row+len_row + end_col=start_col+len_col + grid_xy= np.mgrid[start_row:end_row:1, start_col:end_col:1] + grid_xy=grid_xy.reshape(2,-1).transpose(1,0) + distance_weight,ori_select=tree.query(grid_xy,k=4) + distance_weight=np.reciprocal(distance_weight) + distance_weight=np.multiply(distance_weight.transpose(1,0),np.reciprocal(np.sum(distance_weight,axis=1))) + distance_weight=distance_weight.transpose(1,0) + SAR_ori[start_row:end_row,start_col:end_col]=np.sum( np.multiply(distance_weight,sim_x[ori_select]),axis=1).reshape(len_row,len_col) + pass + ''' + # 获得所有点集 + del point_arr + # 构建查询表 + ori_sar=gdal.Open(ori_sar_path) + ori_height=ori_sar.RasterYSize # 获得高度 + ori_width=ori_sar.RasterXSize # 获得宽度 + point_arr_path=[os.path.join(work_space_file,"point_refrence.npy")] + for point_match_arr_filename in os.listdir(os.path.join(work_space_file,'temp_point_refrence')): + point_arr_path.append(os.path.join(work_space_file,'temp_point_refrence',point_match_arr_filename)) + point_arr=np.ones((1,5)) + for point_path in point_arr_path: + point_temp_arr=np.load(point_path) + point_arr=np.row_stack((point_arr,point_temp_arr)) + point_arr=point_arr[1:,:] + ori_points=np.zeros((point_arr.shape[0],2)) + # 求解对应的行列号 + for i in range(r_arr_trans.shape[1]): + ori_points[:,0]=ori_points[:,0]+r_arr_trans[0,i]*point_arr[:,1]**i + ori_points[:,1]=ori_points[:,1]+c_arr_trans[0,i]*point_arr[:,1]**i + point_arr[:,0]=ori_points[:,0].copy() + point_arr[:,1]=ori_points[:,1].copy() + del ori_points + gc.collect() + # 根据此进行散点插值,确定 + lon_lat_point_match_path=os.path.join(work_space_file,"lon_lat_point_match") + if os.path.exists(lon_lat_point_match_path): + shutil.rmtree(lon_lat_point_match_path) + os.makedirs(lon_lat_point_match_path) + lon_lat=np.zeros((4,2)) + block_info_json={"ori_rc":[]} + # + block_size=5000 + for i in range(0,ori_height,block_size): + for j in range(0,ori_width,block_size): + len_row=block_size + len_col=block_size + if i+len_row>ori_height: + len_row=ori_height-i + if j+len_col>ori_width: + len_col=ori_width-j + end_i=i+len_row + end_j=j+len_col + + r=(np.ones((len_col,len_row))*range(len_row)).transpose(1,0)+i + c=np.ones((len_row,len_col))*range(len_col)+j + # 格网插值 + # scipy 规则格网插值 + lon_lat_r_c=np.ones((len_col*len_row,5)) + lon_lat_r_c[:,0]=r.reshape(-1) + lon_lat_r_c[:,1]=c.reshape(-1) + + SAR_ori_X=interpolate.griddata(point_arr[:,:2], point_arr[:,2], (lon_lat_r_c[:,0], lon_lat_r_c[:,1]), method='linear').reshape(-1) + SAR_ori_Y=interpolate.griddata(point_arr[:,:2], point_arr[:,3], (lon_lat_r_c[:,0], lon_lat_r_c[:,1]), method='linear').reshape(-1) + SAR_ori_Z=interpolate.griddata(point_arr[:,:2], point_arr[:,4], (lon_lat_r_c[:,0], lon_lat_r_c[:,1]), method='linear').reshape(-1) + [lon_lat_r_c[:,2],lon_lat_r_c[:,3],lon_lat_r_c[:,4]]=OrthoAuxData.XYZ2LLAM(SAR_ori_X,SAR_ori_Y,SAR_ori_Z) + temp_path=os.path.join(lon_lat_point_match_path,"r_c_{}_{}.npy".format(i,j)) + np.save(temp_path,lon_lat_r_c) + block_info_json['ori_rc'].append({'ori':[i,j,end_i,end_j],"path":temp_path}) + if i==0 and j==0: + lon_lat[0,0]=lon_lat_r_c[:,2].reshape(len_row,len_col)[0,0] # 经度 + lon_lat[0,1]=lon_lat_r_c[:,3].reshape(len_row,len_col)[0,0] # 纬度 + + if i+len_row==ori_height and j==0: + lon_lat[1,0]=lon_lat_r_c[:,2].reshape(len_row,len_col)[-1,0] + lon_lat[1,1]=lon_lat_r_c[:,3].reshape(len_row,len_col)[-1,0] + + if j+len_col==ori_width and i==0: + lon_lat[2,0]=lon_lat_r_c[:,2].reshape(len_row,len_col)[0,-1] + lon_lat[2,1]=lon_lat_r_c[:,3].reshape(len_row,len_col)[0,-1] + if j+len_col==ori_width and i+len_row==ori_height: + lon_lat[3,0]=lon_lat_r_c[:,2].reshape(len_row,len_col)[-1,-1] + lon_lat[3,1]=lon_lat_r_c[:,3].reshape(len_row,len_col)[-1,-1] + # 1 3 + # 2 4 + gt=[0,1,2,3,4,5] + # 计算 经度 + gt[0]= lon_lat[0,0] + gt[1]=(lon_lat[2,0]-gt[0])/(ori_width-1) + gt[2]=(lon_lat[3,0]-gt[0]-gt[1]*(ori_width-1))/(ori_height-1) + # 计算 纬度 + gt[3]= lon_lat[0,1] + gt[5]=(lon_lat[1,1]-gt[3])/(ori_height-1) + gt[4]=(lon_lat[3,1]-gt[3]-gt[5]*(ori_height-1))/(ori_width-1) + + + return lon_lat_point_match_path,gt + #return lon_lat_point_match_path + + return None + pass + ''' diff --git a/Ortho/OrthoAuxData.py b/Ortho/OrthoAuxData.py new file mode 100644 index 0000000..8f443cc --- /dev/null +++ b/Ortho/OrthoAuxData.py @@ -0,0 +1,415 @@ +# 一米正射辅助数据处理类 +import time +import math +import numpy as np +from osgeo import gdal +from xml.etree.ElementTree import ElementTree +from scipy.optimize import leastsq + + +class OrthoAuxData: + def __init__(self): + pass + + @staticmethod + def time_stamp(tm): + list = tm.split(':') + sec = math.ceil(float(list[2])) + tm1 = list[0] + ':' + list[1] + ':' + str(sec) + tmArr = time.strptime(tm1, "%Y-%m-%d %H:%M:%S") + # tmArr = time.strptime(tm1, "%Y-%m-%d %H:%M:%S.%f") + ts = float(time.mktime(tmArr)) # 转换为时间戳 + return ts + + @staticmethod + def read_meta(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + T = [] + Xs = [] + Ys = [] + Zs = [] + Vsx = [] + Vsy = [] + Vsz = [] + GPS_data = root.find('GPS') + for child in GPS_data: + Xs.append(float(child.find('xPosition').text)) + Ys.append(float(child.find('yPosition').text)) + Zs.append(float(child.find('zPosition').text)) + Vsx.append(float(child.find('xVelocity').text)) + Vsy.append(float(child.find('yVelocity').text)) + Vsz.append(float(child.find('zVelocity').text)) + tm = child.find('TimeStamp').text + ts = OrthoAuxData.time_stamp(tm) + T.append(ts) + meta_data = [Xs, Ys, Zs, Vsx, Vsy, Vsz] + return T, meta_data + + @staticmethod + def read_control_points(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + center = imageinfo.find('center') + corner = imageinfo.find('corner') + ctrl_pts = [[] for i in range(2)] + ctrl_pts[0].append(float(center.find('longitude').text)) + ctrl_pts[1].append(float(center.find('latitude').text)) + + for child in corner: + ctrl_pts[0].append(float(child.find('longitude').text)) + ctrl_pts[1].append(float(child.find('latitude').text)) + return ctrl_pts + + @staticmethod + def read_dem(dem_resampled_path, flag=1): + in_ds = gdal.Open(dem_resampled_path) + gt = list(in_ds.GetGeoTransform()) + bands_num = in_ds.RasterCount + x_size = in_ds.RasterXSize + y_size = in_ds.RasterYSize + pstn_arr = np.zeros([y_size, x_size, 3], dtype=np.float) + for i in range(1, bands_num + 1): + data = in_ds.GetRasterBand(i).ReadAsArray(0, 0, x_size, y_size) + for y in range(y_size): + for x in range(x_size): + longitude = gt[0] + x * gt[1] + latitude = gt[3] + y * gt[5] + altitude = data[y, x] + if flag == 1: + pstn = OrthoAuxData.LLA2XYZ(longitude, latitude, altitude) + else: + pstn = [longitude, latitude, altitude] + pstn_arr[y, x, 0] = pstn[0] + pstn_arr[y, x, 1] = pstn[1] + pstn_arr[y, x, 2] = pstn[2] + + del in_ds, data + return pstn_arr + + @staticmethod + def read_demM(dem_resampled_path, part_cnt, r_cnt, c_cnt, flag=1): + in_ds = gdal.Open(dem_resampled_path) + gt = list(in_ds.GetGeoTransform()) + bands_num = in_ds.RasterCount + x_size = in_ds.RasterXSize // part_cnt + y_size = in_ds.RasterYSize // part_cnt + x = [[i] * y_size for i in range(x_size)] + y = [[i] * x_size for i in range(y_size)] + x = np.array(x) + x = x.T + y = np.array(y) + x_off = c_cnt * x_size + y_off = r_cnt * y_size + gt[0] = gt[0] + c_cnt * x_size * gt[1] + gt[3] = gt[3] + r_cnt * y_size * gt[5] + for i in range(1, bands_num + 1): + data = in_ds.GetRasterBand(i).ReadAsArray(x_off, y_off, x_size, y_size) + altitude = data / 255 * 1024 + longitude = gt[0] + x * gt[1] + latitude = gt[3] + y * gt[5] + if flag == 1: + pstn = OrthoAuxData.LLA2XYZM(longitude, latitude, altitude) + else: + pstn = [longitude, latitude, altitude] + + del in_ds, data + return pstn + + @staticmethod + def read_dem_row(dem_resampled_path, p, flag=1): + in_ds = gdal.Open(dem_resampled_path) + gt = list(in_ds.GetGeoTransform()) + bands_num = in_ds.RasterCount + x_size = in_ds.RasterXSize + y_size = in_ds.RasterYSize + + x = [[i] for i in range(x_size)] + x = np.array(x) + x = x.T + y = np.ones((1, x_size)) * p + x_off = 0 + y_off = p + for i in range(1, bands_num + 1): + data = in_ds.GetRasterBand(i).ReadAsArray(x_off, y_off, x_size, 1) + altitude = data + longitude = gt[0] + x * gt[1] + latitude = gt[3] + y * gt[5] + if flag == 1: + pstn = OrthoAuxData.LLA2XYZM(longitude, latitude, altitude) + else: + pstn = [longitude, latitude, altitude] + + del in_ds, data + return pstn + + @staticmethod + def orbit_fitting(time_array, meta_data): + # 最小二乘法求解轨道参数 + T0 = (time_array[0] + time_array[len(time_array)-1]) / 2 + t = [] + for i in range(len(time_array)): + t.append(time_array[i]-T0) + + def func(p, x): + w3, w2, w1, w0 = p + return w3*x**3 + w2*x**2 + w1*x + w0 + + def error(p, x, y): + return func(p, x) - y + + orbital_paras = [] + for j in range(len(meta_data)): + p0 = [1, 2, 3, 4] + x = np.array(t) + y = np.array(meta_data[j]) + Para = leastsq(error, p0, args=(x, y)) + orbital_paras.append(Para[0]) + print(Para[0], Para[1]) + + return orbital_paras, T0 + + @staticmethod + def get_PRF(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + sensor = root.find('sensor') + waveParams = sensor.find('waveParams') + PRF = float(waveParams.find('wave').find('prf').text) + return PRF + + @staticmethod + def get_delta_R(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + sensor = root.find('sensor') + pulseWidth = float(sensor.find('waveParams').find('wave').find('pulseWidth').text) + bandWidth = float(sensor.find('waveParams').find('wave').find('bandWidth').text) + c = 299792458 + delta_R = c / (1000000 * 2 * bandWidth) + return delta_R + + @staticmethod + def get_doppler_rate_coef(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + processinfo = root.find('processinfo') + doppler = processinfo.find('DopplerRateValuesCoefficients') + t0 = float(processinfo.find('DopplerParametersReferenceTime').text) + r0 = float(doppler.find('r0').text) + r1 = float(doppler.find('r1').text) + r2 = float(doppler.find('r2').text) + r3 = float(doppler.find('r3').text) + r4 = float(doppler.find('r4').text) + + return t0, np.array([r0, r1, r2, r3, r4]).reshape(5, 1) + + @staticmethod + def get_doppler_center_coef(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + processinfo = root.find('processinfo') + doppler = processinfo.find('DopplerCentroidCoefficients') + b0 = float(doppler.find('d0').text) + b1 = float(doppler.find('d1').text) + b2 = float(doppler.find('d2').text) + return b0, b1, b2 + + @staticmethod + def get_lamda(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + sensor = root.find('sensor') + λ = float(sensor.find('lamda').text) + return λ + + @staticmethod + def get_t0(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + tm = imageinfo.find('imagingTime').find('start').text + t0 = OrthoAuxData.time_stamp(tm) + return t0 + + @staticmethod + def get_start_and_end_time(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + tm0 = imageinfo.find('imagingTime').find('start').text + tm1 = imageinfo.find('imagingTime').find('end').text + starttime = OrthoAuxData.time_stamp(tm0) + endtime = OrthoAuxData.time_stamp(tm1) + return starttime, endtime + + @staticmethod + def get_width_and_height(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + width = int(imageinfo.find('width').text) + height = int(imageinfo.find('height').text) + return width, height + + @staticmethod + def get_R0(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + R0 = float(imageinfo.find('nearRange').text) + return R0 + + @staticmethod + def get_h(): + h = 6.6 + return h + + @staticmethod + def LLA2XYZ(longitude, latitude, altitude): + ''' + WGS-84坐标系下:经纬度坐标转空间直角坐标 + ''' + # 经纬度余弦值 + cosLat = math.cos(latitude * math.pi / 180) + sinLat = math.sin(latitude * math.pi / 180) + cosLon = math.cos(longitude * math.pi / 180) + sinLon = math.sin(longitude * math.pi / 180) + # WGS84坐标系参数 + rad = 6378137.0 #地球赤道平均半径 + f = 1.0/298.257224 #WGS84椭球扁率 + C = 1.0/math.sqrt(cosLat*cosLat + (1-f)*(1-f)*sinLat*sinLat) + S = (1-f)*(1-f)*C + h = altitude + # 计算XYZ坐标 + X = (rad * C + h) * cosLat * cosLon + Y = (rad * C + h) * cosLat * sinLon + Z = (rad * S + h) * sinLat + # return np.array([X, Y, Z]).reshape(1,3) + return [X, Y, Z] + + @staticmethod + def LLA2XYZM(longitude, latitude, altitude): + # 经纬度余弦值 + cosLat = np.cos(latitude * math.pi / 180).reshape(-1,1) + sinLat = np.sin(latitude * math.pi / 180).reshape(-1,1) + cosLon = np.cos(longitude * math.pi / 180).reshape(-1,1) + sinLon = np.sin(longitude * math.pi / 180).reshape(-1,1) + # WGS84坐标系参数 + rad = 6378137.0 #地球赤道平均半径 + f = 1.0/298.257224 #WGS84椭球扁率 + C = 1.0/(np.sqrt(cosLat*cosLat + (1-f)*(1-f)*sinLat*sinLat)).reshape(-1,1) + S = (1-f)*(1-f)*C + h = altitude.reshape(-1,1) + # 计算XYZ坐标 + X = (rad * C + h) * cosLat * cosLon + Y = (rad * C + h) * cosLat * sinLon + Z = (rad * S + h) * sinLat + return [X, Y, Z] + + @staticmethod + def XYZ2LLA(X, Y, Z): + ''' 大地坐标系转经纬度 + 适用于WGS84坐标系 + args: + x,y,z + return: + lat,long,altitude + ''' + # WGS84坐标系的参数 + a = 6378137.0 # 椭球长半轴 + b = 6356752.314245 # 椭球短半轴 + ea = np.sqrt((a ** 2 - b ** 2) / a ** 2) + eb = np.sqrt((a ** 2 - b ** 2) / b ** 2) + p = np.sqrt(X ** 2 + Y ** 2) + theta = np.arctan2(Z * a, p * b) + + # 计算经纬度及海拔 + longitude = np.arctan2(Y, X) + latitude = np.arctan2(Z + eb ** 2 * b * np.sin(theta) ** 3, p - ea ** 2 * a * np.cos(theta) ** 3) + N = a / np.sqrt(1 - ea ** 2 * np.sin(latitude) ** 2) + altitude = p / np.cos(latitude) - N + + # return np.array([np.degrees(latitude), np.degrees(longitude), altitude]) + return [np.degrees(longitude), np.degrees(latitude), altitude] + + @staticmethod + def XYZ2LLAM(X, Y, Z): + ''' 大地坐标系转经纬度 + 适用于WGS84坐标系 + args: + x,y,z + return: + lat,long,altitude + ''' + # WGS84坐标系的参数 + a = 6378137.0 # 椭球长半轴 + b = 6356752.314245 # 椭球短半轴 + ea = np.sqrt((a ** 2 - b ** 2) / a ** 2) + eb = np.sqrt((a ** 2 - b ** 2) / b ** 2) + p = np.sqrt(X ** 2 + Y ** 2) + theta = np.arctan2(Z * a, p * b) + + # 计算经纬度及海拔 + longitude = np.arctan2(Y, X) + latitude = np.arctan2(Z + eb ** 2 * b * np.sin(theta) ** 3, p - ea ** 2 * a * np.cos(theta) ** 3) + N = a / np.sqrt(1 - ea ** 2 * np.sin(latitude) ** 2) + altitude = p / np.cos(latitude) - N + + # return np.array([np.degrees(latitude), np.degrees(longitude), altitude]) + return [np.degrees(longitude), np.degrees(latitude), altitude] + + @staticmethod + def world2Pixel(geoMatrix, x, y): + """ + 使用GDAL库的geomatrix对象((gdal.GetGeoTransform()))计算地理坐标的像素位置 + """ + ulx = geoMatrix[0] + uly = geoMatrix[3] + xDist = geoMatrix[1] + yDist = geoMatrix[5] + rtnX = geoMatrix[2] + rtnY = geoMatrix[4] + pixel = int((x - ulx) / xDist) + line = int((uly - y) / abs(yDist)) + return pixel, line + + @staticmethod + def sar_intensity_synthesis(in_sar_tif, out_sar_tif): + # 获取SLC格式SAR影像的相关信息 + in_ds = gdal.Open(in_sar_tif) + bands_num = in_ds.RasterCount + rows = in_ds.RasterYSize + columns = in_ds.RasterXSize + proj = in_ds.GetProjection() + geotrans = in_ds.GetGeoTransform() + + # 创建输出的SAR强度图 + gtiff_driver = gdal.GetDriverByName('GTiff') + out_ds = gtiff_driver.Create(out_sar_tif, columns, rows, 1) + out_ds.SetProjection(proj) + out_ds.SetGeoTransform(geotrans) + + # 输出SAR强度图 + in_data1 = in_ds.GetRasterBand(1).ReadAsArray(0, 0, columns, rows) + in_data1 = in_data1/10 + in_data1 = np.power(10, in_data1) + in_data2 = in_ds.GetRasterBand(2).ReadAsArray(0, 0, columns, rows) + in_data2 = in_data2 / 10 + in_data2 = np.power(10, in_data2) + out_data = np.sqrt(in_data1**2 + in_data2**2) + out_ds.GetRasterBand(1).WriteArray(out_data) + + del in_ds, out_ds diff --git a/Ortho/OrthoMain.py b/Ortho/OrthoMain.py new file mode 100644 index 0000000..1f8e312 --- /dev/null +++ b/Ortho/OrthoMain.py @@ -0,0 +1,767 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :OneOrthoMain.py +@Function :正射校正 +@Author :KHZ +@Contact: +@Date :2021/8/14 +@Version :1.0.0 +""" +import logging + +from tool.algorithm.block.blockprocess import BlockProcess +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.xml.AnalysisXml import xml_extend, DictXml +from tool.algorithm.xml.CreateMetaDict import CreateMetaDict, CreateProductXml +from tool.algorithm.algtools.PreProcess import PreProcess as pp +import tarfile +from tool.algorithm.xml.AlgXmlHandle import ManageAlgXML, CheckSource # 导入xml文件读取与检查文件 +from tool.config.ConfigeHandle import Config as cf +from OrthoAlg import IndirectOrthorectification, DEMProcess,rpc_correction,getRCImageRC,get_RPC_lon_lat,getRCImageRC2 +from OrthoAlg import ScatteringAlg as alg +from tool.algorithm.algtools.logHandler import LogHandler +from tool.algorithm.xml.CreatMetafile import CreateMetafile +from OrthoXmlInfo import CreateDict, CreateStadardXmlFile +from osgeo import gdal, osr +import os +import glob +# import gc +import datetime +import shutil +import sys +import scipy #解决打包错误 +import scipy.spatial.transform # 用于解决打包错误 +import scipy.spatial.transform.rotation +import scipy.spatial.transform._rotation_groups # 用于解决打包错误 +import configparser +config = configparser.ConfigParser() +config.read('config.ini', encoding='utf-8') + +DEBUG = config['config']['debug']# True +EXE_NAME = cf.get('exe_name') +productLevel = cf.get('productLevel') +tar = cf.get('target') +#env_str = os.getcwd() +env_str =os.path.dirname(os.path.abspath(sys.argv[0])) #os.path.split(os.path.realpath(__file__))[0] +os.environ['PROJ_LIB'] = env_str +LogHandler.init_log_handler(os.path.join("run_log", EXE_NAME)) # r"run_log\Ortho" +logger = logging.getLogger("mylog") +logger.info(env_str) + + +class LogHandler2: + """日志记录工具,用于输出程序运行状况。 + 这里因为是单程序执行,没有必要调用logging 类。 + 具体日志策略: + 1. 最外层使用try,catch 捕捉异常 + 2. 最后程序执行终止判断。 + 日志记录格式: + 第一行: + TaskID,时间,输入参数文件地址。 + 中间: + 时间,状态,执行步骤,消息 + + 最后一行: + finished 表示程序执行完成 + failed 程序执行出现错误 + + """ + def __init__(self, sLogPath) -> None: + ''' + 初始化日志文件 + args: + sLogPath:str 日志文件的路径 + raise: + IOError:Exception 错误 + ''' + self.__sLogPath = sLogPath + + def loggingStart(self,sTaskID,sParamPath): + '''输出日志开头 + TaskID,时间,输入参数文件地址。 + args: + sTaskID:str 任务ID + sParamPath:str 任务参数文件地址 + return: + None + ''' + sDateTime=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f") # 执行时间 + sOutput="[{}],[{}],[{}]".format(sTaskID, sDateTime, sParamPath) + self.__outputText(sOutput) + pass + + + def logging(self,sStates,sExecuteStep,sException): + """输出中间计算信息""" + sDateTime=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f") # 执行时间 + sOutput="[{}],[{}],[{}],[{}]".format(sDateTime,sStates,sExecuteStep,sExecuteStep) + self.__outputText(sOutput) + pass + + def __outputText(self,sMessage): + '''将消息输出到最终的日志文件中 + ''' + with open(self.__sLogPath, 'a', encoding='utf-8') as fp: + fp.write("{}".format(sMessage)) + + def logggingEnd(self, bSuccessful): + ''' + 最后一行输出,判断输出的结果是否是正确的 + ''' + if bSuccessful: + sEndText="\n{}\nfinished".format(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")) + else: + sEndText="\n{}\nError".format(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")) + self.__outputText(sEndText) + + +class OrthoMain: + """ + 间接定位法正射校正 主函数 + """ + def __init__(self, alg_xml_path): + self.alg_xml_path = alg_xml_path + self.imageHandler = ImageHandler() + self.__alg_xml_handler = ManageAlgXML(alg_xml_path) + self.__check_handler = CheckSource(self.__alg_xml_handler) + self.__workspace_path = None + self.__task_id = None + self.__input_paras = {} + # self.__output_paras = {} + self.__in_processing_paras = {} + # self.__out_processing_paras = {} + self.__preprocessed_paras = {} + self.__out_para = None + + def check_source(self): + """ + 检查算法相关的配置文件,图 + 像,辅助文件是否齐全 + """ + if self.__check_handler.check_alg_xml() is False: + return False + + if self.__check_handler.check_run_env() is False: + return False + + input_para_names = ["SLC", "DEM", "CorrectMethod"] # //todo 增加检查校正方法 + if self.__check_handler.check_input_paras(input_para_names) is False: + return False + + self.__workspace_path = self.__alg_xml_handler.get_workspace_path() + self.__task_id = self.__alg_xml_handler.get_task_id() + self.__input_paras = self.__alg_xml_handler.get_input_paras() + # self.__output_paras = self.__alg_xml_handler.get_output_paras() + self.__create_work_space() + self.__in_processing_paras = self.__init_processing_paras(self.__input_paras) # 输入{paraname:paravalue} + # self.__out_processing_paras = self.__init_processing_paras(self.__output_paras) # 输入{paraname:paravalue} + + self.__out_name = os.path.splitext(os.path.splitext(os.path.basename(self.__input_paras['SLC']['ParaValue']))[0])[0] + # AlgorithmName = self.__alg_xml_handler.get_algorithm_name() + # TaskId = self.__alg_xml_handler.get_task_id() + result_name = self.__out_name + ".tar.gz" + self.__out_para = os.path.join(self.__workspace_path, EXE_NAME, 'Output', result_name) + + isError, CorrectMethod = self.__check_handler.check_input_paras(['CorrectMethod']) # //todo 获取xml中校正方法 根据不同方法进行结果处理 + + if CorrectMethod.get('CorrectMethod') == '1' or CorrectMethod.get('CorrectMethod') == 1: + logger.info("CorrectMethod is RPC!") + # self.__out_para=self.__out_para.replace(".tar.gz","_RPC.tar.gz") + self.__out_para=self.__out_para.replace(".tar.gz","-" + tar + ".tar.gz") + + elif CorrectMethod.get('CorrectMethod') == '2' or CorrectMethod.get('CorrectMethod') == 2: + logger.info("CorrectMethod is RD!") + # self.__out_para=self.__out_para.replace(".tar.gz","_RD.tar.gz") + self.__out_para=self.__out_para.replace(".tar.gz","-" + tar + ".tar.gz") + else: + raise Exception('No CorrectMethod') + + self.__alg_xml_handler.write_out_para("OrthoProduct", self.__out_para) #写入输出参数 + + logger.info('check_source finished!') + logger.info('progress bar :5%') + return True + + def __create_work_space(self): + """ + 删除原有工作区文件夹,创建新工作区文件夹 + """ + self.__workspace_Output_path = os.path.join(self.__workspace_path, EXE_NAME, "Output") + self.__workspace_Temporary_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary") + self.__workspace_unpack_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "unpack") + self.__workspace_ResampledDEM_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", 'TestDEM') + self.__workspace_LutImg_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", 'TestLut') + self.__workspace_IncidenceImg_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", 'TestInc') + self.__workspace_SimImg_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", 'TestSim') + self.__workspace_SARIntensity_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", 'TestSAR') + self.__workspace_package_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", 'package') + self.__workspace_origin_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "origin") + + path_list = [self.__workspace_Output_path, self.__workspace_Temporary_path, + self.__workspace_unpack_path, self.__workspace_ResampledDEM_path, + self.__workspace_LutImg_path, self.__workspace_IncidenceImg_path, + self.__workspace_SimImg_path, self.__workspace_SARIntensity_path, + self.__workspace_package_path, self.__workspace_origin_path] + + for path in path_list: + if os.path.exists(path): + if DEBUG is True: + continue + self.del_floder(path) + os.makedirs(path) + else: + os.makedirs(path) + logger.info('create new workspace success!') + + @staticmethod + def force_del_file(file_path): + """ + 强制删除文件 + """ + if os.path.isdir(file_path): + for main_dir, subdir, file_name_list in os.walk(file_path): + for filename in file_name_list: + apath = main_dir + filename + # noinspection PyBroadException + try: + os.remove(apath) + except Exception as error: # 使用windows命令行强制删除 + os.system("del /f /q %s" % apath) + elif os.path.isfile(file_path) is True: + # noinspection PyBroadException + try: + os.remove(file_path) + except Exception as error: # 使用windows命令行强制删除 + os.system("del /f /q %s" % file_path) + + + @staticmethod + def make_targz(output_filename, source_dir): + """ + 一次性打包整个根目录。空子目录会被打包。 + 如果只打包不压缩,将"w:gz"参数改为"w:"或"w"即可。 + :param output_filename:输出压缩包的完整路径,eg:'E:\test.tar.gz' + :param source_dir:需要打包的跟目录,eg: 'E:\testFfile\'打包文件夹里面的所有文件,'E:\testFfile'打包文件夹 + """ + dir = os.path.split(output_filename)[0] + if os.path.exists(dir) is False: + os.makedirs(dir) + with tarfile.open(output_filename, "w:gz") as tar: + tar.add(source_dir, arcname=os.path.basename(source_dir)) + + @staticmethod + def del_floder(path_data): + """ + 删除整个文件夹 + """ + if os.path.isdir(path_data): + shutil.rmtree(path_data) + + def del_temp_workspace(self): + """ + 临时工作区 + """ + if DEBUG is True: + return + path = self.__workspace_path + EXE_NAME + r'\Temporary' + if os.path.exists(path): + self.del_floder(path) + + def __init_processing_paras(self, names): + """ + :param names:字典列表,每个字典为一个输入产品的配置信息 + """ + processing_paras = {} + for name in names: + para = names[name] + if para is None: + logger.error(name + "is None!") + return False + + if para['ParaType'] == 'File': + if para['DataType'] == 'File': + para_path = os.path.join(self.__workspace_path, para['ParaValue']) + processing_paras.update({name: para_path}) + if para['DataType'] == 'xml': + para_path = os.path.join(self.__workspace_path, para['ParaValue']) + processing_paras.update({name: para_path}) + if para['DataType']=="ymal": + para_path = os.path.join(self.__workspace_path, para['ParaValue']) + processing_paras.update({name: para_path}) + if para['DataType'] == 'tar.gz': + para_path = os.path.join(self.__workspace_path, para['ParaValue']) + tar_gz_dic = self.__dec_tar_gz(name, para_path, self.__workspace_unpack_path) + processing_paras.update(tar_gz_dic) + if para['DataType'] == 'tif' or para['DataType'] == 'tiff': # 新增修改dem数据为文件绝对路径 + if para['ParaValue'] != 'empty' and para['ParaValue'] != 'Empty' and para['ParaValue'] != '': + para_path_list = para['ParaValue'].split(";") + if len(para_path_list) != 0: + dem_path = os.path.join(self.__workspace_origin_path, para['ParaName']) + if os.path.exists(dem_path) is False: + os.mkdir(dem_path) + for file_path in para_path_list: + tif_name = os.path.basename(file_path) + shutil.copy(file_path, os.path.join(dem_path, tif_name)) + para_path = os.path.join(self.__workspace_origin_path,para['ParaName']) + processing_paras.update({name: para_path}) + if para['DataType'] == 'zip': # 新增修改dem数据为文件绝对路径 + if para['ParaValue'] != 'empty' and para['ParaValue'] != 'Empty' and para['ParaValue'] != '': + para_path_list = para['ParaValue'].split(";") + if len(para_path_list) != 0: + dem_path = os.path.join(self.__workspace_origin_path, para['ParaName']) + if os.path.exists(dem_path) is False: + os.mkdir(dem_path) + for file_path in para_path_list: + BlockProcess.unzip_dem(file_path, dem_path) + processing_paras.update({name: dem_path}) + elif para['ParaType'] == 'Value': + if para['DataType'] == 'float': + value = float(para['ParaValue']) + processing_paras.update({name: value}) + return processing_paras + + def __dec_tar_gz(self, name1, tar_gz_path, out_dir): + """ + 解压.tar_gz格式景影像文件 + :param tar_gz_path:.tar_gz文件路径 + :param out_dir:输出文件夹 + :return para_dic:全极化影像路径 + """ + # 创建文件夹 + name = os.path.split(tar_gz_path)[1].rstrip('.tar.gz') + file_dir = os.path.join(out_dir, name + '\\') + if os.path.exists(file_dir) is False: + os.makedirs(file_dir) + # 解压 + t = tarfile.open(tar_gz_path) + t.extractall(path=file_dir) + + # 获取文件夹内的文件 + para_dic = {} + # if os.path.exists(file_dir + name + '\\'): + # meta_xml_paths = list(glob.glob(os.path.join(file_dir + name, '*.meta.xml'))) + # para_dic.update({'SLC': file_dir + name}) + # else: + # meta_xml_paths = list(glob.glob(os.path.join(file_dir, '*.meta.xml'))) + # para_dic.update({'SLC': file_dir}) + if os.path.exists(file_dir + name + '\\'): + meta_xml_paths = list(glob.glob(os.path.join(file_dir + name, '*.xml'))) + para_dic.update({'SLC': file_dir + name}) + else: + meta_xml_paths = list(glob.glob(os.path.join(file_dir, '*.xml'))) + para_dic.update({'SLC': file_dir}) + + if meta_xml_paths == []: + raise Exception('there is not .meta.xml in path: ', file_dir + '\\') + para_dic.update({'META': meta_xml_paths[0]}) + self.image_meta_xml = meta_xml_paths + # para_dic.update({name1: file_dir}) # {SLC: file_path} + + # 获取文件夹内的文件 + hh_flag, hv_flag, vh_flag, vv_flag, dh_flag = 0, 0, 0, 0, 0 # + if os.path.exists(file_dir + name + '\\'): + in_tif_paths = list(glob.glob(os.path.join(file_dir + name + '\\', '*.tif'))) + if in_tif_paths == []: + in_tif_paths = list(glob.glob(os.path.join(file_dir + name + '\\', '*.tiff'))) + else: + in_tif_paths = list(glob.glob(os.path.join(file_dir, '*.tif'))) + if in_tif_paths == []: + in_tif_paths = list(glob.glob(os.path.join(file_dir, '*.tiff'))) + for in_tif_path in in_tif_paths: + # 获取极化类型 + if 'hh' in os.path.basename(in_tif_path) or 'HH' in os.path.basename(in_tif_path): + hh_flag = 1 + elif 'hv' in os.path.basename(in_tif_path) or 'HV' in os.path.basename(in_tif_path): + hv_flag = 1 + elif 'vh' in os.path.basename(in_tif_path) or 'VH' in os.path.basename(in_tif_path): + vh_flag = 1 + elif 'vv' in os.path.basename(in_tif_path) or 'VV' in os.path.basename(in_tif_path): + vv_flag = 1 + elif "DH" in os.path.basename(in_tif_path): + dh_flag = 1 + if hh_flag == 0 and hv_flag == 0 and vh_flag == 0 and vv_flag == 0 and dh_flag == 0: + raise Exception('can not found files: HH、HV、VH、VV、DH in path:', tar_gz_path) + self.processinfo = [hh_flag, hv_flag, vh_flag, vv_flag,dh_flag] + return para_dic + + def process_handle(self): + isError, CorrectMethod = self.__check_handler.check_input_paras(['CorrectMethod']) # //todo 获取xml中校正方法 根据不同方法进行结果处理 + + if CorrectMethod.get('CorrectMethod') == '1' or CorrectMethod.get('CorrectMethod') == 1: + logger.info("CorrectMethod is RPC!") + return self.RPC_process_handle() + + elif CorrectMethod.get('CorrectMethod') == '2' or CorrectMethod.get('CorrectMethod') == 2: + logger.info("CorrectMethod is RD!") + + return self.RD_process_handle() + else: + raise Exception('No CorrectMethod') + + + + + def RPC_process_handle(self): + logger.info(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')) + # print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')) + # 1、DEM拼接、裁剪、重采样 + Orth_Slc=[] + in_dem_path = self.__in_processing_paras['DEM'] + meta_file_path = self.__in_processing_paras['META'] # .meta文件路径 + out_dem_path = self.__workspace_ResampledDEM_path + dem_merged_path=DEMProcess.dem_merged(in_dem_path, meta_file_path, out_dem_path) # 生成TestDEM\mergedDEM_VRT.tif + + # 2、间接定位法求解行列坐标 + slc_paths = self.__in_processing_paras["SLC"] + rpc_slc_path=None + for slc_path in os.listdir(slc_paths): + if slc_path.find(".tiff")>0: + slc_path_temp=os.path.join(slc_paths,slc_path) + # out_power_path=os.path.join(self.__workspace_Temporary_path,slc_path.replace(".tiff","_db.tif").replace("L1A","L1B")) + out_power_path=os.path.join(self.__workspace_Temporary_path,slc_path.replace(".tiff","_db.tif").replace("L1A","L1B").replace("HH","h_h").replace("HV","h_v").replace("VH","v_h").replace("VV","v_v")) + alg.sar_backscattering_coef(slc_path_temp,self.__in_processing_paras['META'],out_power_path) + rpc_slc_path=slc_path_temp.replace(".tiff",".rpc") + if not os.path.exists(rpc_slc_path): + rpc_slc_path=slc_path_temp.replace(".tiff",".rpb") + if not os.path.exists(rpc_slc_path): + logger.error("rpc file Not Found!") + # out_slc_power_path=os.path.join(self.__workspace_package_path,os.path.basename(out_power_path.replace("_db.tif",".tif").replace("L1B","L4"))) + out_slc_power_path=os.path.join(self.__workspace_package_path,os.path.basename(out_power_path.replace("_db.tif","-ortho.tif"))) + rpc_correction(out_power_path,rpc_slc_path,out_slc_power_path) + logger.info('progress bar: 30%') + # 2.1 生成映射表 + slc_path=os.path.join(slc_paths,os.listdir(slc_paths)[0]) + out_rpc_rc_path = os.path.join(self.__workspace_package_path,"ori_sim-ortho.tif") + get_RPC_lon_lat(out_power_path,out_rpc_rc_path) + #getRCImageRC(slc_path_temp,out_rpc_rc_path,rpc_slc_path) + logger.info('progress bar: 70%') + # 2.2 生成局地入射角 + Orthorectification = IndirectOrthorectification(os.path.join(os.path.dirname(__file__),"config.yaml")) + Orthorectification.IndirectOrthorectification(self.__in_processing_paras["SLC"],self.__workspace_package_path) # 改动1 + out_incangle_path=os.path.join(self.__workspace_package_path,"inci_Angle-ortho.tif") + out_localincangle_path=os.path.join(self.__workspace_package_path,"LocalincidentAngle-ortho.tif") + out_incangle_geo_path=os.path.join(self.__workspace_package_path,"inc_angle.tif") + out_localincangle_geo_path=os.path.join(self.__workspace_package_path,"LocalincidenceAngle.tif") # 决定入射角名字 + Orthorectification.getRPC_incidenceAngle_lon_lat(dem_merged_path,out_rpc_rc_path,self.__workspace_Temporary_path,self.__workspace_package_path,out_incangle_path,out_localincangle_path,out_incangle_geo_path,out_localincangle_geo_path) + # 2.3 输出结果 + + # self.del_floder(self.__workspace_processing_path) + logger.info('process_handle finished!') + logger.info('progress bar :90%') + # 7、打包生成快视图 + for tiff_name in os.listdir(self.__workspace_package_path): + if tiff_name.find(".tiff")>0 or tiff_name.find(".tif")>0: + self.imageHandler.write_quick_view(os.path.join(self.__workspace_package_path,tiff_name)) + + # 1/5、移动原始数据 ------------------------- 这里限制 原始数据是否进入 最终产品列表中 + for maindir, subdir, file_name_list in os.walk(slc_paths): + for filename in file_name_list: + apath = os.path.join(maindir, filename) + file_type = apath.split('.')[-1] + if file_type in ["xml"]: + output = os.path.join(self.__workspace_package_path, filename) + shutil.copy(apath, output) + else: + output=os.path.join(self.__workspace_package_path, filename) + shutil.copy(apath, output) + + # 生成元文件案例 + # xml_path = "./model_meta.xml" + tem_folder=self.__workspace_path + EXE_NAME + r"\Temporary""\\" + image_path=out_slc_power_path# os.path.join(self.__workspace_package_path, "OrthoMapTable.tif") + out_path1 = os.path.join(tem_folder, "trans_geo_projcs.tif") + out_path2 = os.path.join(tem_folder, "trans_projcs_geo.tif") + # par_dict = CreateDict().calu_nature(image_path, self.processinfo, out_path1, out_path2) + # + # dem_path=os.path.join(self.__workspace_ResampledDEM_path, 'mergedDEM.tif') + # out_dem_path1 = os.path.join(tem_folder, "trans_dem_geo_projcs.tif") + # out_dem_path2 = os.path.join(tem_folder, "trans_dem_projcs_geo.tif") + # # par_dict2 = CreateDict().calu_dem_nature(dem_path, dem_meta, out_dem_path1, out_dem_path2, sampling_f, para_A_arr) + # # par_dict2 = CreateDict().calu_dem_nature(dem_path, dem_meta, out_dem_path1, out_dem_path2, sampling_f, para_A_arr) + # par_dict2 = CreateDict().calu_dem_nature(dem_path, out_dem_path1, out_dem_path2, None,Orthorectification.SatelliteOrbitModel.A_arr) + # model_xml_path = os.path.join(self.__workspace_Temporary_path, "creat_standard.meta.xml") # 输出xml路径 + # CreateStadardXmlFile(xml_path, self.alg_xml_path, par_dict, par_dict2, model_xml_path).create_standard_xml() + # + # sar_image_meta_xml = list(glob.glob(os.path.join(self.__workspace_package_path, '*.meta.xml'))) + # meta_xml_path = os.path.join(self.__workspace_package_path, os.path.basename(self.__out_para).replace(".tar.gz",".meta.xml")) + # CreateMetafile(sar_image_meta_xml[0], self.alg_xml_path, model_xml_path, meta_xml_path).process(os.path.basename(self.__in_processing_paras["SLC"])) + + model_path = "./product.xml" + meta_xml_path = os.path.join(self.__workspace_package_path, + os.path.basename(self.__out_para).replace(".tar.gz", ".meta.xml")) + + para_dict = CreateMetaDict(image_path, self.__in_processing_paras['META'], self.__workspace_package_path, + out_path1, out_path2).calu_nature() + para_dict.update({"ProductProductionInfo_BandSelection": "1,2"}) + para_dict.update({"ProductProductionInfo_AuxiliaryDataDescription": "DEM"}) + CreateProductXml(para_dict, model_path, meta_xml_path).create_standard_xml() + # 生成压缩包 + logger.info('progress bar :94%') + logger.info('start make targz..') + self.del_floder(self.__workspace_unpack_path) + self.del_floder(self.__workspace_ResampledDEM_path) + self.del_floder(self.__workspace_LutImg_path) + self.del_floder(self.__workspace_IncidenceImg_path) + self.del_floder(self.__workspace_SimImg_path) + self.del_floder(self.__workspace_SARIntensity_path) + self.make_targz(self.__out_para, self.__workspace_package_path+"\\") + logger.info('make targz finish') + logger.info('progress bar :100%') + return True + + + pass + + + def cut_dem(self, dem_merged_path, meta_file_path): + left_up_lon = 0 + left_up_lat = 0 + + + def process_sim_ori(self, sim_ori): + + scopes = () + scopes += (DictXml(self.__in_processing_paras['META']).get_extend(),) + intersect_polygon = pp().intersect_polygon(scopes) + if intersect_polygon is None: + raise Exception('create intersect shp fail!') + shp_path = os.path.join(self.__workspace_Temporary_path, 'IntersectPolygon.shp') + if pp().write_polygon_shp(shp_path, intersect_polygon, 4326) is False: + raise Exception('create intersect shp fail!') + sim_ori_process = os.path.join(self.__workspace_Temporary_path, 'sim_ori_process.tif') + pp().cut_img(sim_ori_process, sim_ori, shp_path) + return sim_ori_process + + + def RD_process_handle(self): + # RPC + logger.info(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')) + # print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')) + # 1、DEM拼接、裁剪、重采样 + Orth_Slc=[] + in_dem_path = self.__in_processing_paras['DEM'] + meta_file_path = self.__in_processing_paras['META'] # .meta文件路径 + out_dem_path = self.__workspace_ResampledDEM_path + dem_merged_path=DEMProcess.dem_merged(in_dem_path, meta_file_path, out_dem_path) # 生成TestDEM\mergedDEM_VRT.tif + + # self.cut_dem(dem_merged_path, meta_file_path) + # 2、间接定位法求解行列坐标 + slc_paths = self.__in_processing_paras["SLC"] + # 2.1 生成映射表 + slc_path=os.path.join(slc_paths,os.listdir(slc_paths)[0]) + + # 2.2 生成局地入射角 + path2 = env_str + Orthorectification = IndirectOrthorectification(os.path.join(path2,"config.yaml")) + Orthorectification.IndirectOrthorectification(self.__in_processing_paras["SLC"], self.__workspace_package_path) # 改动1 + # 2.3 输出结果 + + # 3 处理RD + in_slc_path=None + for slc_path in os.listdir(slc_paths): + if slc_path.find(".tiff")>0 and (slc_path.find("_HH_")>0 or slc_path.find("_VV_")>0 or slc_path.find("_DH_")>0): + in_slc_path=os.path.join(slc_paths,slc_path) + break + # 获取校正模型后 + Orthorectification.preCaldem_sar_rc(dem_merged_path,in_slc_path,self.__workspace_Temporary_path,self.__workspace_package_path.replace("\\","\\\\")) # 初步筛选坐标范围 + + logger.info('progress bar: 40%') + # clip_dem_reample_path=os.path.join(self.__workspace_Temporary_path, "SAR_dem.tiff") + # infooption=gdal.InfoOptions("-json") + # clip_dem_tif_info=gdal.Info(clip_dem_reample_path,options=infooption) + # dem_merged_info=gdal.Info(dem_merged_path,options=infooption) + # sampling_f=clip_dem_tif_info['size'][0]/dem_merged_info['size'][0] + + out_dir_path=self.__workspace_package_path.replace("\\","\\\\") + this_outSpace_path = out_dir_path + this_out_dem_slantRange_path = out_dir_path + "\\" + "dem_slantRange.tiff"#// 地形斜距 + this_out_plant_slantRange_path = out_dir_path + "\\" + "flat_slantRange.tiff"#// 平地斜距 + # 保留结果 + if(os.path.exists(this_out_dem_slantRange_path)): + os.remove(this_out_dem_slantRange_path) + + if(os.path.exists(this_out_plant_slantRange_path)): + os.remove(this_out_plant_slantRange_path) + + + this_out_dem_rc_path = out_dir_path + "\\" + "WGS_SAR_map.tiff"#// 经纬度与行列号映射 + if(os.path.exists(this_out_dem_rc_path)): + os.remove(this_out_dem_rc_path) + + this_out_sar_sim_path = out_dir_path + "\\" + "sar_sim.tiff" + if (os.path.exists(this_out_sar_sim_path)): + os.remove(this_out_sar_sim_path) + + this_out_sar_sim_wgs_path = out_dir_path + "\\" + "sar_sim_wgs.tiff" # // 经纬度与行列号映射 + if (os.path.exists(this_out_sar_sim_wgs_path)): + os.remove(this_out_sar_sim_wgs_path) + + + this_out_incidence_path = out_dir_path + "\\" + "incidentAngle.tiff"#// 入射角 + this_out_localIncidenct_path = out_dir_path + "\\" + "localincidentAngle.tiff"#// 局地入射角 + this_out_inc_angle_rpc_path = out_dir_path + "\\" + "RD_incidentAngle.tiff"#// 局地入射角 + this_out_local_inc_angle_rpc_path = out_dir_path + "\\" + "RD_localincidentAngle.tiff"#// 局地入射角 + + if (os.path.exists(this_out_inc_angle_rpc_path)): + shutil.move(this_out_inc_angle_rpc_path, out_dir_path + "\\" + "inci_Angle-ortho.tif") + + if (os.path.exists(this_out_local_inc_angle_rpc_path)): + shutil.move(this_out_local_inc_angle_rpc_path, out_dir_path + "\\" + "LocalIncidentAngle-ortho.tif") + + if(os.path.exists(this_out_incidence_path)): + shutil.move(this_out_incidence_path,out_dir_path + "\\" + "inc_angle.tif") + + if(os.path.exists(this_out_localIncidenct_path)): + shutil.move(this_out_localIncidenct_path,out_dir_path + "\\" + "LocalIncidenceAngle.tif") + + this_out_ori_sim_tiff = out_dir_path + "\\" + "RD_ori_sim.tif"#// 局地入射角 + if (os.path.exists(this_out_ori_sim_tiff)): + shutil.move(this_out_ori_sim_tiff, out_dir_path + "\\" + "ori_sim-ortho.tif") + + this_out_sim_ori_tiff = out_dir_path + "\\" + "RD_sim_ori.tif" # // 局地入射角 + if (os.path.exists(this_out_sim_ori_tiff)): + shutil.move(this_out_sim_ori_tiff, out_dir_path + "\\" + "sim_ori-ortho.tif") + + # GTC 入射角 + GTC_rc_path=os.path.join(self.__workspace_package_path,"ori_sim-ortho.tif") + GTC_out_path=self.__workspace_package_path + + parameter_path = os.path.join(self.__workspace_package_path, "orth_para.txt") + + + dem_rc = os.path.join(self.__workspace_package_path, "sim_ori-ortho.tif") + # dem_rc_pro = self.process_sim_ori(dem_rc) + # shutil.move(dem_rc_pro, dem_rc) + in_tif_paths = list(glob.glob(os.path.join(slc_paths, '*.tiff'))) + for in_tif_path in in_tif_paths: + out_sar_path = os.path.join(GTC_out_path, os.path.split(in_tif_path)[1]) + slc_path_temp=os.path.join(slc_paths,in_tif_path) + out_power_path = os.path.join(self.__workspace_Temporary_path, + slc_path_temp.replace(".tiff", "-lin.tif").replace("L1A", "L1B")).replace( + "HH", "h_h").replace("HV", "h_v").replace("VH", "v_h").replace("VV", "v_v").replace("DH", "d_h") + # out_power_path=os.path.join(self.__workspace_Temporary_path,slc_path_temp.replace(".tiff","_db.tif")) + alg.sar_backscattering_coef(slc_path_temp, self.__in_processing_paras['META'], out_power_path) + + lin_tif_path = os.path.join(self.__workspace_Temporary_path, + os.path.basename(out_power_path).split('-')[0] + "-lin_geo.tif") + # Orthorectification.calInterpolation_cubic_Wgs84_rc_sar_sigma(parameter_path, dem_rc, + # out_power_path, + # lin_tif_path) + + Orthorectification.calInterpolation_bil_Wgs84_rc_sar_sigma(parameter_path, dem_rc, + out_power_path, + lin_tif_path) + tempout_tif_path = os.path.join(self.__workspace_package_path, + os.path.basename(lin_tif_path).split('-')[0] + "-" + tar + ".tif") + alg.lin_to_db(lin_tif_path, tempout_tif_path) # 线性值转回DB值 + + # temp_slc_path=os.path.join(self.__workspace_package_path, os.path.basename(out_power_path)) + # temp_slc_path=temp_slc_path.replace("_db.tif","-ortho.tif") + #inter_Range2Geo(self,lon_lat_path , data_tiff , grid_path , space) + + # Orthorectification.inter_Range2Geo(GTC_rc_path,out_power_path,temp_slc_path,Orthorectification.heightspace) + # Orthorectification.calInterpolation_cubic_Wgs84_rc_sar_sigma(parameter_path, dem_rc, out_power_path, temp_slc_path) # + #Orth_Slc.append(temp_slc_path) + # power_list.append(out_power_path) + + for tiff_name in os.listdir(self.__workspace_package_path): + if tiff_name.find(".tiff")>0 or tiff_name.find(".tif")>0: + self.imageHandler.write_quick_view(os.path.join(self.__workspace_package_path,tiff_name)) + + # 1/5、原始数据中的.incidence.xml、.meta.xml输出,影像不输出 + for maindir, subdir, file_name_list in os.walk(slc_paths): + for filename in file_name_list: + apath = os.path.join(maindir, filename) + file_type = apath.split('.')[-1] + if file_type in ["xml"]: + output = os.path.join(self.__workspace_package_path, filename) + shutil.copy(apath, output) + else: + output=os.path.join(self.__workspace_package_path, filename) + shutil.copy(apath, output) + + # 2/5、正射的成果图 + # for maindir, subdir, file_name_list in os.walk(self.__workspace_package_path): + # for filename in file_name_list: + # apath = os.path.join(maindir, filename) + # file_type = filename.split('.')[-1] + # image_name = os.path.splitext(filename)[0] + #self.imageHandler.write_quick_view(output_OrthoResult) # 快视图 + # 生成元文件案例 + # xml_path = "./model_meta.xml" + tem_folder=self.__workspace_path + EXE_NAME + r"\Temporary""\\" + image_path=tempout_tif_path# os.path.join(self.__workspace_package_path, "OrthoMapTable.tif") + out_path1 = os.path.join(tem_folder, "trans_geo_projcs.tif") + out_path2 = os.path.join(tem_folder, "trans_projcs_geo.tif") + # par_dict = CreateDict().calu_nature(image_path, self.processinfo, out_path1, out_path2) + # + # dem_path=os.path.join(self.__workspace_ResampledDEM_path, 'mergedDEM.tif') + # out_dem_path1 = os.path.join(tem_folder, "trans_dem_geo_projcs.tif") + # out_dem_path2 = os.path.join(tem_folder, "trans_dem_projcs_geo.tif") + # # par_dict2 = CreateDict().calu_dem_nature(dem_path, dem_meta, out_dem_path1, out_dem_path2, sampling_f, para_A_arr) + # par_dict2 = CreateDict().calu_dem_nature(dem_path, out_dem_path1, out_dem_path2, sampling_f,Orthorectification.SatelliteOrbitModel.A_arr) + # model_xml_path = os.path.join(self.__workspace_Temporary_path, "creat_standard.meta.xml") # 输出xml路径 + # CreateStadardXmlFile(xml_path, self.alg_xml_path, par_dict, par_dict2, model_xml_path).create_standard_xml() + # + # sar_image_meta_xml = list(glob.glob(os.path.join(self.__workspace_package_path, '*.meta.xml'))) + # meta_xml_path = os.path.join(self.__workspace_package_path, os.path.basename(self.__out_para).replace(".tar.gz",".meta.xml")) + # CreateMetafile(sar_image_meta_xml[0], self.alg_xml_path, model_xml_path, meta_xml_path).process(os.path.basename(self.__in_processing_paras["SLC"])) + model_path = "./product.xml" + meta_xml_path = os.path.join(self.__workspace_package_path, os.path.basename(self.__out_para).replace(".tar.gz",".meta.xml")) + + para_dict = CreateMetaDict(image_path, self.__in_processing_paras['META'], self.__workspace_package_path, out_path1, out_path2).calu_nature() + para_dict.update({"imageinfo_ProductName": '正射校正'}) + para_dict.update({"imageinfo_ProductIdentifier": 'Ortho'}) + para_dict.update({"imageinfo_ProductLevel": productLevel}) + para_dict.update({"ProductProductionInfo_BandSelection": "1,2"}) + para_dict.update({"ProductProductionInfo_AuxiliaryDataDescription": "DEM"}) + CreateProductXml(para_dict, model_path, meta_xml_path).create_standard_xml() + + temp_folder = os.path.join(self.__workspace_path, EXE_NAME, 'Output') + out_xml = os.path.join(temp_folder, os.path.basename(meta_xml_path)) + if os.path.exists(temp_folder) is False: + os.mkdir(temp_folder) + # CreateProductXml(para_dict, model_path, out_xml).create_standard_xml() + shutil.copy(meta_xml_path, out_xml) + + # 生成压缩包 + logger.info('progress bar :94%') + logger.info('start make targz..') + self.del_floder(self.__workspace_unpack_path) + self.del_floder(self.__workspace_ResampledDEM_path) + self.del_floder(self.__workspace_LutImg_path) + self.del_floder(self.__workspace_IncidenceImg_path) + self.del_floder(self.__workspace_SimImg_path) + self.del_floder(self.__workspace_SARIntensity_path) + self.make_targz(self.__out_para, self.__workspace_package_path+"\\") + logger.info('make targz finish') + logger.info('progress bar :100%') + return True + pass + + +if __name__ == '__main__': + DEBUG = config['config']['debug']# True + if '-DEBUG' in sys.argv: + DEBUG=True + start = datetime.datetime.now() + try: + if len(sys.argv) < 2: + xml_path = 'Ortho-S-SAR.xml' + else: + xml_path = sys.argv[1] + OrthoMain = OrthoMain(xml_path) + if OrthoMain.check_source() is False: + raise Exception('check_source() failed!') + if OrthoMain.process_handle() is False: + raise Exception('check_source() failed!') + logger.info('successful production of ortho products!') + except Exception: + logger.exception("run-time error!") + finally: + OrthoMain.del_temp_workspace() + pass + end = datetime.datetime.now() + logger.info('running use time: %s ' % (end - start)) + diff --git a/Ortho/OrthoMain.spec b/Ortho/OrthoMain.spec new file mode 100644 index 0000000..9aab8aa --- /dev/null +++ b/Ortho/OrthoMain.spec @@ -0,0 +1,40 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['OrthoMain.py'], + pathex=[], + binaries=[], + datas=[('D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')], + hiddenimports=['pyproj._compat'], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='OrthoMain', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None ) diff --git a/Ortho/OrthoXmlInfo.py b/Ortho/OrthoXmlInfo.py new file mode 100644 index 0000000..b689502 --- /dev/null +++ b/Ortho/OrthoXmlInfo.py @@ -0,0 +1,310 @@ +""" +@Project :microproduct +@File :BackScatteringXmlInfo.PY +@Function :主函数 +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" +import os +from xml.etree.ElementTree import ElementTree, Element +import xml.dom.minidom +from lxml import etree +import shutil +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.PreProcess import PreProcess as pp +from osgeo import gdal +import numpy as np +import datetime +from PIL import Image + + +class CreateDict: + """根据影像/DEM的属性信息添加到字典中""" + def __init__(self): + self.ImageHandler = ImageHandler() + pass + + def calu_nature(self, image_path, image_pair, out_path1, out_path2): + """ + 将productinfo节点需要填写的信息存入字典中 + image_path:影像路径 + image_pair:输入的压缩包中的极化对 例:hh,hv,vh,vv=【1,1,1,1】 + out_path1:地理转平面的输出路径 + out_path2:平面转地理的输出路径 + """ + + para_dict = {} + imageinfo_width = self.ImageHandler.get_img_width(image_path) + para_dict.update({"imageinfo_width":imageinfo_width}) + imageinfo_height = self.ImageHandler.get_img_height(image_path) + para_dict.update({"imageinfo_height":imageinfo_height}) + para_dict.update({"imageinfo_EarthModel": "WGS84"}) + para_dict.update({"imageinfo_ProjectModel": "UTM"}) + proj = self.ImageHandler.get_projection(image_path) # 输出的影像若是投影坐标系则先转成地理坐标系 + keyword = proj.split("[", 2)[0] # 若是地理坐标系则pass + if keyword == "GEOGCS": + pass + elif keyword == "PROJCS": + pp.trans_projcs2geogcs(out_path2, image_path) + image_path = out_path2 + elif len(keyword) == 0 or keyword.strip() == "" or keyword.isspace() is True: + raise Exception('image projection is missing!') + + pp.trans_geogcs2projcs(out_path1, image_path) # 坐标投影, 地理转平面投影坐标 + imageinfo_widthspace = self.ImageHandler.get_geotransform(out_path1)[1] # 投影后的分辨率 + imageinfo_heightspace = -self.ImageHandler.get_geotransform(out_path1)[5] # 投影后的分辨率 + para_dict.update({"imageinfo_widthspace":imageinfo_widthspace}) + para_dict.update({"imageinfo_heightspace":imageinfo_heightspace}) + para_dict.update({"NominalResolution":imageinfo_widthspace}) + + WidthInMeters = imageinfo_width*imageinfo_widthspace # 投影后的分辨率×宽度 + para_dict.update({"WidthInMeters":WidthInMeters}) + + image_array = self.ImageHandler.get_band_array(image_path) + a2 = np.where(np.isnan(image_array), 999999, image_array) + MinValue = np.min(a2) + a3 = np.where(np.isnan(image_array), -999999, image_array) + MaxValue = np.max(a3) + + para_dict.update({"MaxValue":MaxValue}) + para_dict.update({"MinValue":MinValue}) + + get_scope = self.ImageHandler.get_scope(image_path) + point_upleft, point_upright, point_downleft, point_downright=get_scope[0], get_scope[1], get_scope[2], get_scope[3] + para_dict.update({"imageinfo_corner_topLeft_latitude": point_upleft[1]}) + para_dict.update({"imageinfo_corner_topLeft_longitude": point_upleft[0]}) + para_dict.update({"imageinfo_corner_topRight_latitude": point_upright[1]}) + para_dict.update({"imageinfo_corner_topRight_longitude": point_upright[0]}) + para_dict.update({"imageinfo_corner_bottomLeft_latitude": point_downleft[1]}) + para_dict.update({"imageinfo_corner_bottomLeft_longitude": point_downleft[0]}) + para_dict.update({"imageinfo_corner_bottomRight_latitude": point_downright[1]}) + para_dict.update({"imageinfo_corner_bottomRight_longitude": point_downright[0]}) + + longitude_max=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).max() + longitude_min=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).min() + latitude_max=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).max() + latitude_min=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).min() + imageinfo_center_latitude=(latitude_max+latitude_min)/2 + imageinfo_center_longitude=(longitude_max+longitude_min)/2 + para_dict.update({"imageinfo_center_latitude": imageinfo_center_latitude}) + para_dict.update({"imageinfo_center_longitude": imageinfo_center_longitude}) + + # self.para_dict.update({"productType": "GTC"}) # 设置产品类型 + para_dict.update({"productFormat": "TIF"}) + productGentime = datetime.datetime.now() + para_dict.update({"productGentime": productGentime}) + para_dict.update({"unit": "none"}) # 设置单位 + para_dict.update({"NoDataValue": "nan"}) + para_dict.update({"productLevel": "4"}) # 设置图像位深度 + + image_array = self.ImageHandler.get_band_array(image_path) + try: # 设置图像位深度 + gdal_dtypes = { + 'int8': gdal.GDT_Byte, + 'unit16': gdal.GDT_UInt16, + 'int16': gdal.GDT_Int16, + 'unit32': gdal.GDT_UInt32, + 'int32': gdal.GDT_Int32, + 'float32': gdal.GDT_Float32, + 'float64': gdal.GDT_Float64, + } + bit_dtypes = { + 'int8': 8, + 'unit16': 16, + 'int16': 16, + 'unit32': 32, + 'int32': 32, + 'float32': 32, + 'float64': 64, + } + if not gdal_dtypes.get(image_array.dtype.name, None) is None: + bit_num = str(bit_dtypes[image_array.dtype.name]) + datatype=bit_num+"bit" + else: + datatype = str(32) + "bit" + # datatype = str(gdal.GDT_Float32)+"bit" + para_dict.update({"imagebit": datatype}) + except Exception: + para_dict.update({"imagebit": "None"}) + + HH, HV, VH ,VV= image_pair[0], image_pair[1], image_pair[2], image_pair[3] + if HH == 0: + HH = "delete" + else: + HH = "NULL" + para_dict.update({"imageinfo_QualifyValue_HH": HH}) + if HV==0: + HV = "delete" + else: + HV = "NULL" + para_dict.update({"imageinfo_QualifyValue_HV": HV}) + if VH==0: + VH = "delete" + else: + VH = "NULL" + para_dict.update({"imageinfo_QualifyValue_VH": VH}) + if VV==0: + VV = "delete" + else: + VV = "NULL" + para_dict.update({"imageinfo_QualifyValue_VV": VV}) + + return para_dict + + def calu_dem_nature(self, dem_path, out_dem_path1, out_dem_path2, sampling_f, para_A_arr): + """ + 正射需要单独加上dem影像的信息 + dem_path:mergedDEM.tif路径 + out_dem_path1:将mergedDEM.tif由地理坐标转化为平面坐标的保存路径 + out_dem_path2:将mergedDEM.tif由平面坐标转化为地理坐标的保存路径 + sampling_f: 采样率 + para_A_arr:四次多项式模型的参数数组 + """ + para_dict2 = {} + proj = self.ImageHandler.get_projection(dem_path) # 输出的影像若是投影坐标系则先转成地理坐标系 + keyword = proj.split("[", 2)[0] # 若是地理坐标系则pass + if keyword == "GEOGCS": + pass + elif keyword == "PROJCS": + pp.trans_projcs2geogcs(out_dem_path2, dem_path) + dem_path = out_dem_path2 + elif len(keyword) == 0 or keyword.strip() == "" or keyword.isspace() is True: + raise Exception('image projection is missing!') + pp.trans_geogcs2projcs(out_dem_path1, dem_path) # 坐标投影, 地理转平面投影坐标 + DEM_widthspace = self.ImageHandler.get_geotransform(out_dem_path1)[1] # 投影后的分辨率 + DEM_heightspace = -self.ImageHandler.get_geotransform(out_dem_path1)[5] # 投影后的分辨率 + para_dict2.update({"DEM_widthspace":DEM_widthspace}) + para_dict2.update({"DEM_heightspace":DEM_heightspace}) + # tree = ElementTree() # 获取DEMProduct:dem产品来源、DEMDate:dem对应的日期 + # tree.parse(dem_meta) # 影像头文件 + # root = tree.getroot() + # productinfo = root.find("metadata") + # DEMProduct = list(productinfo)[0].tag + # para_dict2.update({"DEM_DEMProduct":DEMProduct}) + # + # DEMDate = root.find("metadata").find(DEMProduct).text + # para_dict2.update({"DEM_DEMDate": DEMDate}) + get_scope = self.ImageHandler.get_scope(dem_path) # 获取mergedDEM.tif数据的四个角的经纬度信息 + point_upleft, point_upright, point_downleft, point_downright=get_scope[0], get_scope[1], get_scope[2], get_scope[3] + para_dict2.update({"DEM_corner_topLeft_latitude": point_upleft[1]}) + para_dict2.update({"DEM_corner_topLeft_longitude": point_upleft[0]}) + para_dict2.update({"DEM_corner_topRight_latitude": point_upright[1]}) + para_dict2.update({"DEM_corner_topRight_longitude": point_upright[0]}) + para_dict2.update({"DEM_corner_bottomLeft_latitude": point_downleft[1]}) + para_dict2.update({"DEM_corner_bottomLeft_longitude": point_downleft[0]}) + para_dict2.update({"DEM_corner_bottomRight_latitude": point_downright[1]}) + para_dict2.update({"DEM_corner_bottomRight_longitude": point_downright[0]}) + #para_dict2.update({"orthoModel_samplingrate": sampling_f}) + + para_dict2.update({"satalliteOrbitModel_parameter_X_a0": para_A_arr[0, 0]}) # 获取四次多项式模型6个参数的数值 + para_dict2.update({"satalliteOrbitModel_parameter_X_a1": para_A_arr[1, 0]}) + para_dict2.update({"satalliteOrbitModel_parameter_X_a2": para_A_arr[2, 0]}) + para_dict2.update({"satalliteOrbitModel_parameter_X_a3": para_A_arr[3, 0]}) + para_dict2.update({"satalliteOrbitModel_parameter_X_a4": para_A_arr[4, 0]}) + + para_dict2.update({"satalliteOrbitModel_parameter_Y_b0": para_A_arr[0, 1]}) + para_dict2.update({"satalliteOrbitModel_parameter_Y_b1": para_A_arr[1, 1]}) + para_dict2.update({"satalliteOrbitModel_parameter_Y_b2": para_A_arr[2, 1]}) + para_dict2.update({"satalliteOrbitModel_parameter_Y_b3": para_A_arr[3, 1]}) + para_dict2.update({"satalliteOrbitModel_parameter_Y_b4": para_A_arr[4, 1]}) + + para_dict2.update({"satalliteOrbitModel_parameter_Z_c0": para_A_arr[0, 2]}) + para_dict2.update({"satalliteOrbitModel_parameter_Z_c1": para_A_arr[1, 2]}) + para_dict2.update({"satalliteOrbitModel_parameter_Z_c2": para_A_arr[2, 2]}) + para_dict2.update({"satalliteOrbitModel_parameter_Z_c3": para_A_arr[3, 2]}) + para_dict2.update({"satalliteOrbitModel_parameter_Z_c4": para_A_arr[4, 2]}) + + para_dict2.update({"satalliteOrbitModel_parameter_Vx_d0": para_A_arr[0, 3]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vx_d1": para_A_arr[1, 3]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vx_d2": para_A_arr[2, 3]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vx_d3": para_A_arr[3, 3]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vx_d4": para_A_arr[4, 3]}) + + para_dict2.update({"satalliteOrbitModel_parameter_Vy_e0": para_A_arr[0, 4]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vy_e1": para_A_arr[1, 4]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vy_e2": para_A_arr[2, 4]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vy_e3": para_A_arr[3, 4]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vy_e4": para_A_arr[4, 4]}) + + para_dict2.update({"satalliteOrbitModel_parameter_Vz_f0": para_A_arr[0, 5]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vz_f1": para_A_arr[1, 5]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vz_f2": para_A_arr[2, 5]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vz_f3": para_A_arr[3, 5]}) + para_dict2.update({"satalliteOrbitModel_parameter_Vz_f4": para_A_arr[4, 5]}) + return para_dict2 + + +class CreateStadardXmlFile: + """读取字典中的属性值,生成一个标准的xml文件""" + def __init__(self, xml_path, para_xml_path, par_dict, par_dict2, path): + """ + xml_path:模板路径 + para_xml_path:算法配置文件的路径 + par_dict:字典 + path:xml模板输出路径 + """ + self.par_dict = par_dict + self.par_dict2 = par_dict2 + self.path = path + shutil.copy(xml_path, path) + pass + + def create_standard_xml(self): + """将字典中的信息写入到copy的xml文件中""" + tree = ElementTree() + tree.parse(self.path) # 影像头文件 + root = tree.getroot() + + productinfo = root.find("productinfo") + for key, value in self.par_dict.items(): + if key.split("_")[0] != "imageinfo": + productinfo.find(key).text = str(value) + elif key.split("_")[0] == "imageinfo": + imageinfo = productinfo.find("imageinfo") + if key.split("_")[1] in ["EarthModel", "ProjectModel", "width", "height", "widthspace", "heightspace"]: + imageinfo.find(key.split("_")[1]).text = str(value) + elif key.split("_")[1] == "center": + center = imageinfo.find("center") + center.find(key.split("_")[2]).text = str(value) + elif key.split("_")[1] == "corner": + corner = imageinfo.find("corner") + corner.find(key.split("_")[2]).find(key.split("_")[3]).text = str(value) + elif key.split("_")[1] == "QualifyValue": + QualifyValue = imageinfo.find("QualifyValue") + if value =="delete": + element_QualifyValue = list(QualifyValue) + for i in element_QualifyValue: + if i.tag == key.split("_")[2]: + QualifyValue.remove(i) + else: + QualifyValue.find(key.split("_")[2]).text = str(value) + pass + orthoModel = root.find("processinfo").find("orthoModel") # 写入四次多项式模型 + for key, value in self.par_dict2.items(): + if key.split("_")[0] == "satalliteOrbitModel": + satalliteOrbitModel = orthoModel.find("satalliteOrbitModel") + satalliteOrbitModel.find(key.split("_")[1]).find(key.split("_")[2]).find(key.split("_")[3]).text = str(value) + elif key.split("_")[0] == "DEM": # 写入dem四个角坐标 + DEM= orthoModel.find("DEM") + if key.split("_")[1] == "corner": + corner = DEM.find("corner") + corner.find(key.split("_")[2]).find(key.split("_")[3]).text = str(value) + elif key.split("_")[1] == "widthspace" or key.split("_")[1] == "heightspace": + DEM.find(key.split("_")[1]).text = str(value) + elif key.split("_")[1] == "samplingrate": + orthoModel.find(key.split("_")[1]).text = str(value) + tree.write(self.path, encoding="utf-8", xml_declaration=True) + +# +# if __name__ == '__main__': +# +# xml_path = "./model_meta.xml" +# tem_folder= r"E:\microproduct\测试" +# image_path = r"E:\microproduct\测试\GF3_MYN_QPSI_011437_E98_HH_AtmosphericDelay.tif" # 输入影像 +# out_path = os.path.join(tem_folder, "trans_geo_projcs.tif") +# image_pair=[1, 1, 1, 0] +# par_dict = CreateDict(image_path, image_pair, out_path).calu_nature() # 计算属性字典 +# +# out_xml_path = os.path.join(tem_folder, "creat_standard.meta.xml") # 输出xml路径 +# CreateStadardXmlFile(xml_path, par_dict, out_xml_path).create_standard_xml() diff --git a/Ortho/baseTool/x64/Release/ImageMatch.obj b/Ortho/baseTool/x64/Release/ImageMatch.obj new file mode 100644 index 0000000..2dffc26 Binary files /dev/null and b/Ortho/baseTool/x64/Release/ImageMatch.obj differ diff --git a/Ortho/baseTool/x64/Release/LIBPQ.dll b/Ortho/baseTool/x64/Release/LIBPQ.dll new file mode 100644 index 0000000..21f1003 Binary files /dev/null and b/Ortho/baseTool/x64/Release/LIBPQ.dll differ diff --git a/Ortho/baseTool/x64/Release/Lerc.dll b/Ortho/baseTool/x64/Release/Lerc.dll new file mode 100644 index 0000000..29513ed Binary files /dev/null and b/Ortho/baseTool/x64/Release/Lerc.dll differ diff --git a/Ortho/baseTool/x64/Release/OctreeNode.obj b/Ortho/baseTool/x64/Release/OctreeNode.obj new file mode 100644 index 0000000..3d22e50 Binary files /dev/null and b/Ortho/baseTool/x64/Release/OctreeNode.obj differ diff --git a/Ortho/baseTool/x64/Release/RPC_Correct.obj b/Ortho/baseTool/x64/Release/RPC_Correct.obj new file mode 100644 index 0000000..4b6479f Binary files /dev/null and b/Ortho/baseTool/x64/Release/RPC_Correct.obj differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog new file mode 100644 index 0000000..fec0179 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog new file mode 100644 index 0000000..79c356d Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog new file mode 100644 index 0000000..4727173 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog new file mode 100644 index 0000000..c45d321 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog new file mode 100644 index 0000000..b56a673 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog new file mode 100644 index 0000000..605eacb Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate new file mode 100644 index 0000000..a4d4182 --- /dev/null +++ b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:VcpkgTriplet=x64-windows: +Release|x64|D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\| diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog new file mode 100644 index 0000000..024973f Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog new file mode 100644 index 0000000..71d26aa Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog new file mode 100644 index 0000000..6b36871 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog new file mode 100644 index 0000000..e69aabe Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog new file mode 100644 index 0000000..4d44e42 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog new file mode 100644 index 0000000..7404a57 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog new file mode 100644 index 0000000..af942f2 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog differ diff --git a/Ortho/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe b/Ortho/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe new file mode 100644 index 0000000..7045b35 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe differ diff --git a/Ortho/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe b/Ortho/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe new file mode 100644 index 0000000..80ff377 --- /dev/null +++ b/Ortho/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe @@ -0,0 +1,11 @@ + + + + + D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe + + + + + + \ No newline at end of file diff --git a/Ortho/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb b/Ortho/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb new file mode 100644 index 0000000..934bf10 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb differ diff --git a/Ortho/baseTool/x64/Release/SIMOrthoProgram.obj b/Ortho/baseTool/x64/Release/SIMOrthoProgram.obj new file mode 100644 index 0000000..17450ec Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrthoProgram.obj differ diff --git a/Ortho/baseTool/x64/Release/SIMOrthoProgram.res b/Ortho/baseTool/x64/Release/SIMOrthoProgram.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/Ortho/baseTool/x64/Release/SIMOrthoProgram.res differ diff --git a/Ortho/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete b/Ortho/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Ortho/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt b/Ortho/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..a08de7c --- /dev/null +++ b/Ortho/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt @@ -0,0 +1,47 @@ +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram.vcxproj.CopyComplete +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\concrt140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_atomic_wait.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_codecvt_ids.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vccorlib140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcruntime140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcruntime140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcamp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcomp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\boost_filesystem-vc142-mt-x64-1_82.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gdal.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zlib1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcrypto-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libssl-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\liblzma.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\qhull_r.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\jpeg62.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\tiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geotiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\proj.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\sqlite3.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcurl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libpng16.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\Lerc.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zstd.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gif.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\netcdf.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5_hl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libwebp.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libsharpyuv.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\LIBPQ.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\pcre2-8.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libexpat.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libxml2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\iconv-2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos_c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\json-c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\openjp2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\spatialite.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\freexl-1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\minizip.dll diff --git a/Ortho/baseTool/x64/Release/SateOrbit.obj b/Ortho/baseTool/x64/Release/SateOrbit.obj new file mode 100644 index 0000000..b70006e Binary files /dev/null and b/Ortho/baseTool/x64/Release/SateOrbit.obj differ diff --git a/Ortho/baseTool/x64/Release/baseTool.obj b/Ortho/baseTool/x64/Release/baseTool.obj new file mode 100644 index 0000000..c3806e0 Binary files /dev/null and b/Ortho/baseTool/x64/Release/baseTool.obj differ diff --git a/Ortho/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll b/Ortho/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll new file mode 100644 index 0000000..f5c136f Binary files /dev/null and b/Ortho/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll differ diff --git a/Ortho/baseTool/x64/Release/concrt140.dll b/Ortho/baseTool/x64/Release/concrt140.dll new file mode 100644 index 0000000..9752449 Binary files /dev/null and b/Ortho/baseTool/x64/Release/concrt140.dll differ diff --git a/Ortho/baseTool/x64/Release/freexl-1.dll b/Ortho/baseTool/x64/Release/freexl-1.dll new file mode 100644 index 0000000..9145a7d Binary files /dev/null and b/Ortho/baseTool/x64/Release/freexl-1.dll differ diff --git a/Ortho/baseTool/x64/Release/gdal.dll b/Ortho/baseTool/x64/Release/gdal.dll new file mode 100644 index 0000000..bda7c20 Binary files /dev/null and b/Ortho/baseTool/x64/Release/gdal.dll differ diff --git a/Ortho/baseTool/x64/Release/geos.dll b/Ortho/baseTool/x64/Release/geos.dll new file mode 100644 index 0000000..2edcb83 Binary files /dev/null and b/Ortho/baseTool/x64/Release/geos.dll differ diff --git a/Ortho/baseTool/x64/Release/geos_c.dll b/Ortho/baseTool/x64/Release/geos_c.dll new file mode 100644 index 0000000..d358b2a Binary files /dev/null and b/Ortho/baseTool/x64/Release/geos_c.dll differ diff --git a/Ortho/baseTool/x64/Release/geotiff.dll b/Ortho/baseTool/x64/Release/geotiff.dll new file mode 100644 index 0000000..f513a51 Binary files /dev/null and b/Ortho/baseTool/x64/Release/geotiff.dll differ diff --git a/Ortho/baseTool/x64/Release/gif.dll b/Ortho/baseTool/x64/Release/gif.dll new file mode 100644 index 0000000..27fdc78 Binary files /dev/null and b/Ortho/baseTool/x64/Release/gif.dll differ diff --git a/Ortho/baseTool/x64/Release/hdf5.dll b/Ortho/baseTool/x64/Release/hdf5.dll new file mode 100644 index 0000000..97fd469 Binary files /dev/null and b/Ortho/baseTool/x64/Release/hdf5.dll differ diff --git a/Ortho/baseTool/x64/Release/hdf5_hl.dll b/Ortho/baseTool/x64/Release/hdf5_hl.dll new file mode 100644 index 0000000..7da3e86 Binary files /dev/null and b/Ortho/baseTool/x64/Release/hdf5_hl.dll differ diff --git a/Ortho/baseTool/x64/Release/iconv-2.dll b/Ortho/baseTool/x64/Release/iconv-2.dll new file mode 100644 index 0000000..29c175c Binary files /dev/null and b/Ortho/baseTool/x64/Release/iconv-2.dll differ diff --git a/Ortho/baseTool/x64/Release/interpolation.obj b/Ortho/baseTool/x64/Release/interpolation.obj new file mode 100644 index 0000000..29cb9cc Binary files /dev/null and b/Ortho/baseTool/x64/Release/interpolation.obj differ diff --git a/Ortho/baseTool/x64/Release/jpeg62.dll b/Ortho/baseTool/x64/Release/jpeg62.dll new file mode 100644 index 0000000..9c1a2c0 Binary files /dev/null and b/Ortho/baseTool/x64/Release/jpeg62.dll differ diff --git a/Ortho/baseTool/x64/Release/json-c.dll b/Ortho/baseTool/x64/Release/json-c.dll new file mode 100644 index 0000000..abbb168 Binary files /dev/null and b/Ortho/baseTool/x64/Release/json-c.dll differ diff --git a/Ortho/baseTool/x64/Release/libcrypto-3-x64.dll b/Ortho/baseTool/x64/Release/libcrypto-3-x64.dll new file mode 100644 index 0000000..a0ee3e3 Binary files /dev/null and b/Ortho/baseTool/x64/Release/libcrypto-3-x64.dll differ diff --git a/Ortho/baseTool/x64/Release/libcurl.dll b/Ortho/baseTool/x64/Release/libcurl.dll new file mode 100644 index 0000000..647bdc6 Binary files /dev/null and b/Ortho/baseTool/x64/Release/libcurl.dll differ diff --git a/Ortho/baseTool/x64/Release/libexpat.dll b/Ortho/baseTool/x64/Release/libexpat.dll new file mode 100644 index 0000000..6cea742 Binary files /dev/null and b/Ortho/baseTool/x64/Release/libexpat.dll differ diff --git a/Ortho/baseTool/x64/Release/liblzma.dll b/Ortho/baseTool/x64/Release/liblzma.dll new file mode 100644 index 0000000..44372c5 Binary files /dev/null and b/Ortho/baseTool/x64/Release/liblzma.dll differ diff --git a/Ortho/baseTool/x64/Release/libpng16.dll b/Ortho/baseTool/x64/Release/libpng16.dll new file mode 100644 index 0000000..c06222a Binary files /dev/null and b/Ortho/baseTool/x64/Release/libpng16.dll differ diff --git a/Ortho/baseTool/x64/Release/libsharpyuv.dll b/Ortho/baseTool/x64/Release/libsharpyuv.dll new file mode 100644 index 0000000..e6c1b52 Binary files /dev/null and b/Ortho/baseTool/x64/Release/libsharpyuv.dll differ diff --git a/Ortho/baseTool/x64/Release/libssl-3-x64.dll b/Ortho/baseTool/x64/Release/libssl-3-x64.dll new file mode 100644 index 0000000..4856e67 Binary files /dev/null and b/Ortho/baseTool/x64/Release/libssl-3-x64.dll differ diff --git a/Ortho/baseTool/x64/Release/libwebp.dll b/Ortho/baseTool/x64/Release/libwebp.dll new file mode 100644 index 0000000..e758fc8 Binary files /dev/null and b/Ortho/baseTool/x64/Release/libwebp.dll differ diff --git a/Ortho/baseTool/x64/Release/libxml2.dll b/Ortho/baseTool/x64/Release/libxml2.dll new file mode 100644 index 0000000..1e2599f Binary files /dev/null and b/Ortho/baseTool/x64/Release/libxml2.dll differ diff --git a/Ortho/baseTool/x64/Release/minizip.dll b/Ortho/baseTool/x64/Release/minizip.dll new file mode 100644 index 0000000..44f5e99 Binary files /dev/null and b/Ortho/baseTool/x64/Release/minizip.dll differ diff --git a/Ortho/baseTool/x64/Release/msvcp140.dll b/Ortho/baseTool/x64/Release/msvcp140.dll new file mode 100644 index 0000000..130f84a Binary files /dev/null and b/Ortho/baseTool/x64/Release/msvcp140.dll differ diff --git a/Ortho/baseTool/x64/Release/msvcp140_1.dll b/Ortho/baseTool/x64/Release/msvcp140_1.dll new file mode 100644 index 0000000..5c2f46d Binary files /dev/null and b/Ortho/baseTool/x64/Release/msvcp140_1.dll differ diff --git a/Ortho/baseTool/x64/Release/msvcp140_2.dll b/Ortho/baseTool/x64/Release/msvcp140_2.dll new file mode 100644 index 0000000..737b70a Binary files /dev/null and b/Ortho/baseTool/x64/Release/msvcp140_2.dll differ diff --git a/Ortho/baseTool/x64/Release/msvcp140_atomic_wait.dll b/Ortho/baseTool/x64/Release/msvcp140_atomic_wait.dll new file mode 100644 index 0000000..c92fcc3 Binary files /dev/null and b/Ortho/baseTool/x64/Release/msvcp140_atomic_wait.dll differ diff --git a/Ortho/baseTool/x64/Release/msvcp140_codecvt_ids.dll b/Ortho/baseTool/x64/Release/msvcp140_codecvt_ids.dll new file mode 100644 index 0000000..9879454 Binary files /dev/null and b/Ortho/baseTool/x64/Release/msvcp140_codecvt_ids.dll differ diff --git a/Ortho/baseTool/x64/Release/netcdf.dll b/Ortho/baseTool/x64/Release/netcdf.dll new file mode 100644 index 0000000..e1cbbf1 Binary files /dev/null and b/Ortho/baseTool/x64/Release/netcdf.dll differ diff --git a/Ortho/baseTool/x64/Release/openjp2.dll b/Ortho/baseTool/x64/Release/openjp2.dll new file mode 100644 index 0000000..d6c8011 Binary files /dev/null and b/Ortho/baseTool/x64/Release/openjp2.dll differ diff --git a/Ortho/baseTool/x64/Release/pcre2-8.dll b/Ortho/baseTool/x64/Release/pcre2-8.dll new file mode 100644 index 0000000..d047b3c Binary files /dev/null and b/Ortho/baseTool/x64/Release/pcre2-8.dll differ diff --git a/Ortho/baseTool/x64/Release/proj.db b/Ortho/baseTool/x64/Release/proj.db new file mode 100644 index 0000000..7780dbe Binary files /dev/null and b/Ortho/baseTool/x64/Release/proj.db differ diff --git a/Ortho/baseTool/x64/Release/proj.dll b/Ortho/baseTool/x64/Release/proj.dll new file mode 100644 index 0000000..f4f6147 Binary files /dev/null and b/Ortho/baseTool/x64/Release/proj.dll differ diff --git a/Ortho/baseTool/x64/Release/qhull_r.dll b/Ortho/baseTool/x64/Release/qhull_r.dll new file mode 100644 index 0000000..0267c70 Binary files /dev/null and b/Ortho/baseTool/x64/Release/qhull_r.dll differ diff --git a/Ortho/baseTool/x64/Release/simptsn.obj b/Ortho/baseTool/x64/Release/simptsn.obj new file mode 100644 index 0000000..7795393 Binary files /dev/null and b/Ortho/baseTool/x64/Release/simptsn.obj differ diff --git a/Ortho/baseTool/x64/Release/spatialite.dll b/Ortho/baseTool/x64/Release/spatialite.dll new file mode 100644 index 0000000..165b6e1 Binary files /dev/null and b/Ortho/baseTool/x64/Release/spatialite.dll differ diff --git a/Ortho/baseTool/x64/Release/sqlite3.dll b/Ortho/baseTool/x64/Release/sqlite3.dll new file mode 100644 index 0000000..65359e2 Binary files /dev/null and b/Ortho/baseTool/x64/Release/sqlite3.dll differ diff --git a/Ortho/baseTool/x64/Release/test_moudel.obj b/Ortho/baseTool/x64/Release/test_moudel.obj new file mode 100644 index 0000000..d254e06 Binary files /dev/null and b/Ortho/baseTool/x64/Release/test_moudel.obj differ diff --git a/Ortho/baseTool/x64/Release/tiff.dll b/Ortho/baseTool/x64/Release/tiff.dll new file mode 100644 index 0000000..125e94b Binary files /dev/null and b/Ortho/baseTool/x64/Release/tiff.dll differ diff --git a/Ortho/baseTool/x64/Release/vc142.pdb b/Ortho/baseTool/x64/Release/vc142.pdb new file mode 100644 index 0000000..6868526 Binary files /dev/null and b/Ortho/baseTool/x64/Release/vc142.pdb differ diff --git a/Ortho/baseTool/x64/Release/vcamp140.dll b/Ortho/baseTool/x64/Release/vcamp140.dll new file mode 100644 index 0000000..9fd7179 Binary files /dev/null and b/Ortho/baseTool/x64/Release/vcamp140.dll differ diff --git a/Ortho/baseTool/x64/Release/vccorlib140.dll b/Ortho/baseTool/x64/Release/vccorlib140.dll new file mode 100644 index 0000000..7194329 Binary files /dev/null and b/Ortho/baseTool/x64/Release/vccorlib140.dll differ diff --git a/Ortho/baseTool/x64/Release/vcomp140.dll b/Ortho/baseTool/x64/Release/vcomp140.dll new file mode 100644 index 0000000..dbad71a Binary files /dev/null and b/Ortho/baseTool/x64/Release/vcomp140.dll differ diff --git a/Ortho/baseTool/x64/Release/vcruntime140.dll b/Ortho/baseTool/x64/Release/vcruntime140.dll new file mode 100644 index 0000000..1d6afaa Binary files /dev/null and b/Ortho/baseTool/x64/Release/vcruntime140.dll differ diff --git a/Ortho/baseTool/x64/Release/vcruntime140_1.dll b/Ortho/baseTool/x64/Release/vcruntime140_1.dll new file mode 100644 index 0000000..7bf05d3 Binary files /dev/null and b/Ortho/baseTool/x64/Release/vcruntime140_1.dll differ diff --git a/Ortho/baseTool/x64/Release/zlib1.dll b/Ortho/baseTool/x64/Release/zlib1.dll new file mode 100644 index 0000000..e9300f6 Binary files /dev/null and b/Ortho/baseTool/x64/Release/zlib1.dll differ diff --git a/Ortho/baseTool/x64/Release/zstd.dll b/Ortho/baseTool/x64/Release/zstd.dll new file mode 100644 index 0000000..09c9050 Binary files /dev/null and b/Ortho/baseTool/x64/Release/zstd.dll differ diff --git a/Ortho/config.ini b/Ortho/config.ini new file mode 100644 index 0000000..b5c0e47 --- /dev/null +++ b/Ortho/config.ini @@ -0,0 +1,11 @@ +# -*- coding: UTF-8 -*- +# 定义config分组 +[config] +######1-算法基本参数###### +productLevel = 3 +target = Ortho +# 算法名称。修改临时工作区生成临时文件的名称,日志名称; +exe_name = Ortho +# 开启调试模式则不删除临时工作区,True:开启调试,False:不开启调试 +debug = True + diff --git a/Ortho/config.yaml b/Ortho/config.yaml new file mode 100644 index 0000000..e191756 --- /dev/null +++ b/Ortho/config.yaml @@ -0,0 +1,98 @@ +SatelliteOribit: # 轨道起算时间 + StartTime: + Value: + '2017-09-15 01:55:21.0000' + format: # 时间格式 + "%Y-%m-%d %H:%M:%S.%f" + ReferenceSpheroid: + Re: # 长半轴 + 6378137 + Rp: # 短半轴 + 6356752.3142451795 + we: + 0.000072292115 +GPS: # GPS 轨道节点 + GPSNode_Path: + ['product','GPS','GPSParam'] + NodeInfomation_Name: # [时间,x坐标,y坐标,z坐标,x速度,y速度,z速度] + ['TimeStamp', 'xPosition', 'yPosition', 'zPosition', 'xVelocity', 'yVelocity', 'zVelocity'] + Time_format: + "%Y-%m-%d %H:%M:%S" + +imageinfo: # 影像信息 + ImageBox: + NodePath: + ['product','imageinfo','corner'] + NodeName: + ['topLeft','topRight','bottomLeft','bottomRight'] + latLon: + ["latitude","longitude"] + ImageWidthSpace: + NodePath: + ['product','imageinfo','widthspace'] + ImageHeightSpace: + NodePath: + ['product','imageinfo','heightspace'] + ImageWidth: # 影像宽 + NodePath: + ['product','imageinfo','width'] + ImageHeight: # 影像高 + NodePath: + ['product','imageinfo','height'] + StartImageTime: # 影像开始时间 + NodePath: + ['product','imageinfo','imagingTime',start] + Format: + "%Y-%m-%d %H:%M:%S.%f" + EndImageTime: # 影像中止时间 + NodePath: + ['product','imageinfo','imagingTime',end] + Format: + "%Y-%m-%d %H:%M:%S.%f" + CenterImageTime: # 中心像元时间 + NodePath: + ['product','platform','CenterTime'] + Format: + "%Y-%m-%d %H:%M:%S" + CenterImagePositon: # 中心像元,可以作为迭代起算点 + NodePath: + ['product','imageinfo','center'] + Value: + ['latitude','longitude'] + NearRange: # 近斜距 + NodePath: + ['product','imageinfo','nearRange'] + DopplerCentroidCoefficients: # 多普勒质心常数 + NodePath: + ['product','processinfo','DopplerCentroidCoefficients'] + DopplerCentroidCoefficients_Name: + ['d0','d1','d2','d3','d4'] + DopplerParametersReferenceTime: + NodePath: + ['product','processinfo',"DopplerParametersReferenceTime"] + ReferenceRange: + NodePath: + ['product','imageinfo','refRange'] + incidenceAngle: # 入射角 + NearRange: # 近入射角 + NodePath: + ['product','processinfo','incidenceAngleNearRange'] + FarRange: # 远入射角 + NodePath: + ['product','processinfo','incidenceAngleFarRange'] + +sensor: + PRF: # 脉冲重复频率 + NodePath: + ['product','imageinfo','eqvPRF'] + bandWidth: # 信号带宽,计算距离向分辨率 用于距离向分辨率 + NodePath: + ['product','sensor','waveParams','wave','bandWidth'] + lambda: # 波长 + NodePath: + ['product','sensor','lamda'] + Fs: # 等效采样频率 eqvFs + NodePath: + ['product','imageinfo','eqvFs'] +LightSpeed: + 299792458 diff --git a/Ortho/geo_rpc.py b/Ortho/geo_rpc.py new file mode 100644 index 0000000..58a5802 --- /dev/null +++ b/Ortho/geo_rpc.py @@ -0,0 +1,330 @@ +#命名为:geo_rpc.py +""" +RPC model parsers, localization, and projection +""" +import numpy as np +from osgeo import gdal + + #最大迭代次数超过则报错 +class MaxLocalizationIterationsError(Exception): + """ + Custom rpcm Exception. + """ + pass + +def apply_poly(poly, x, y, z): + """ + Evaluates a 3-variables polynom of degree 3 on a triplet of numbers. + 将三次多项式的统一模式构建为一个单独的函数 + Args: + poly: list of the 20 coefficients of the 3-variate degree 3 polynom, + ordered following the RPC convention. + x, y, z: triplet of floats. They may be numpy arrays of same length. + Returns: + the value(s) of the polynom on the input point(s). + """ + out = 0 + out += poly[0] + out += poly[1]*y + poly[2]*x + poly[3]*z + out += poly[4]*y*x + poly[5]*y*z +poly[6]*x*z + out += poly[7]*y*y + poly[8]*x*x + poly[9]*z*z + out += poly[10]*x*y*z + out += poly[11]*y*y*y + out += poly[12]*y*x*x + poly[13]*y*z*z + poly[14]*y*y*x + out += poly[15]*x*x*x + out += poly[16]*x*z*z + poly[17]*y*y*z + poly[18]*x*x*z + out += poly[19]*z*z*z + return out + +def apply_rfm(num, den, x, y, z): + """ + Evaluates a Rational Function Model (rfm), on a triplet of numbers. + 执行20个参数的分子和20个参数的除法 + Args: + num: list of the 20 coefficients of the numerator + den: list of the 20 coefficients of the denominator + All these coefficients are ordered following the RPC convention. + x, y, z: triplet of floats. They may be numpy arrays of same length. + + Returns: + the value(s) of the rfm on the input point(s). + """ + return apply_poly(num, x, y, z) / apply_poly(den, x, y, z) + +def rpc_from_geotiff(geotiff_path): + """ + Read the RPC coefficients from a GeoTIFF file and return an RPCModel object. + 该函数返回影像的Gdal格式的影像和RPCmodel + Args: + geotiff_path (str): path or url to a GeoTIFF file + + Returns: + instance of the rpc_model.RPCModel class + """ + # with rasterio.open(geotiff_path, 'r') as src: + # + dataset = gdal.Open(geotiff_path, gdal.GA_ReadOnly) + rpc_dict = dataset.GetMetadata("RPC") + # 同时返回影像与rpc + return dataset, RPCModel(rpc_dict,'geotiff') + + +def parse_rpc_file(rpc_file): + # rpc_file:.rpc文件的绝对路径 + # rpc_dict:符号RPC域下的16个关键字的字典 + # 参考网址:http://geotiff.maptools.org/rpc_prop.html; + # https://www.osgeo.cn/gdal/development/rfc/rfc22_rpc.html + + rpc_dict = {} + with open(rpc_file) as f: + text = f.read() + + # .rpc文件中的RPC关键词 + words = ['errBias', 'errRand', 'lineOffset', 'sampOffset', 'latOffset', + 'longOffset', 'heightOffset', 'lineScale', 'sampScale', 'latScale', + 'longScale', 'heightScale', 'lineNumCoef', 'lineDenCoef','sampNumCoef', 'sampDenCoef',] + + # GDAL库对应的RPC关键词 + keys = ['ERR_BIAS', 'ERR_RAND', 'LINE_OFF', 'SAMP_OFF', 'LAT_OFF', 'LONG_OFF', + 'HEIGHT_OFF', 'LINE_SCALE', 'SAMP_SCALE', 'LAT_SCALE', + 'LONG_SCALE', 'HEIGHT_SCALE', 'LINE_NUM_COEFF', 'LINE_DEN_COEFF', + 'SAMP_NUM_COEFF', 'SAMP_DEN_COEFF'] + + for old, new in zip(words, keys): + text = text.replace(old, new) + # 以‘;\n’作为分隔符 + text_list = text.split(';\n') + # 删掉无用的行 + text_list = text_list[3:-2] + # + text_list[0] = text_list[0].split('\n')[1] + # 去掉制表符、换行符、空格 + text_list = [item.strip('\t').replace('\n', '').replace(' ', '') for item in text_list] + + for item in text_list: + # 去掉‘=’ + key, value = item.split('=') + # 去掉多余的括号‘(’,‘)’ + if '(' in value: + value = value.replace('(', '').replace(')', '') + rpc_dict[key] = value + + for key in keys[:12]: + # 为正数添加符号‘+’ + if not rpc_dict[key].startswith('-'): + rpc_dict[key] = '+' + rpc_dict[key] + # 为归一化项和误差标志添加单位 + if key in ['LAT_OFF', 'LONG_OFF', 'LAT_SCALE', 'LONG_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' degrees' + if key in ['LINE_OFF', 'SAMP_OFF', 'LINE_SCALE', 'SAMP_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' pixels' + if key in ['ERR_BIAS', 'ERR_RAND', 'HEIGHT_OFF', 'HEIGHT_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' meters' + + # 处理有理函数项 + for key in keys[-4:]: + values = [] + for item in rpc_dict[key].split(','): + #print(item) + if not item.startswith('-'): + values.append('+'+item) + else: + values.append(item) + rpc_dict[key] = ' '.join(values) + return rpc_dict + + +def read_rpc_file(rpc_file): + """ + Read RPC from a RPC_txt file and return a RPCmodel + 从TXT中直接单独读取RPC模型 + Args: + rpc_file: RPC sidecar file path + + Returns: + dictionary read from the RPC file, or an empty dict if fail + + """ + rpc = parse_rpc_file(rpc_file) + return RPCModel(rpc) + +class RPCModel: + def __init__(self, d, dict_format="geotiff"): + """ + Args: + d (dict): dictionary read from a geotiff file with + rasterio.open('/path/to/file.tiff', 'r').tags(ns='RPC'), + or from the .__dict__ of an RPCModel object. + dict_format (str): format of the dictionary passed in `d`. + Either "geotiff" if read from the tags of a geotiff file, + or "rpcm" if read from the .__dict__ of an RPCModel object. + """ + if dict_format == "geotiff": + self.row_offset = float(d['LINE_OFF'][0:d['LINE_OFF'].rfind(' ')]) + self.col_offset = float(d['SAMP_OFF'][0:d['SAMP_OFF'].rfind(' ')]) + self.lat_offset = float(d['LAT_OFF'][0:d['LAT_OFF'].rfind(' ')]) + self.lon_offset = float(d['LONG_OFF'][0:d['LONG_OFF'].rfind(' ')]) + self.alt_offset = float(d['HEIGHT_OFF'][0:d['HEIGHT_OFF'].rfind(' ')]) + + self.row_scale = float(d['LINE_SCALE'][0:d['LINE_SCALE'].rfind(' ')]) + self.col_scale = float(d['SAMP_SCALE'][0:d['SAMP_SCALE'].rfind(' ')]) + self.lat_scale = float(d['LAT_SCALE'][0:d['LAT_SCALE'].rfind(' ')]) + self.lon_scale = float(d['LONG_SCALE'][0:d['LONG_SCALE'].rfind(' ')]) + self.alt_scale = float(d['HEIGHT_SCALE'][0:d['HEIGHT_SCALE'].rfind(' ')]) + + self.row_num = list(map(float, d['LINE_NUM_COEFF'].split())) + self.row_den = list(map(float, d['LINE_DEN_COEFF'].split())) + self.col_num = list(map(float, d['SAMP_NUM_COEFF'].split())) + self.col_den = list(map(float, d['SAMP_DEN_COEFF'].split())) + + if 'LON_NUM_COEFF' in d: + self.lon_num = list(map(float, d['LON_NUM_COEFF'].split())) + self.lon_den = list(map(float, d['LON_DEN_COEFF'].split())) + self.lat_num = list(map(float, d['LAT_NUM_COEFF'].split())) + self.lat_den = list(map(float, d['LAT_DEN_COEFF'].split())) + + elif dict_format == "rpcm": + self.__dict__ = d + + else: + raise ValueError( + "dict_format '{}' not supported. " + "Should be {{'geotiff','rpcm'}}".format(dict_format) + ) + + + def projection(self, lon, lat, alt): + """ + Convert geographic coordinates of 3D points into image coordinates. + 正投影:从地理坐标到图像坐标 + Args: + lon (float or list): longitude(s) of the input 3D point(s) + lat (float or list): latitude(s) of the input 3D point(s) + alt (float or list): altitude(s) of the input 3D point(s) + + Returns: + float or list: horizontal image coordinate(s) (column index, ie x) + float or list: vertical image coordinate(s) (row index, ie y) + """ + nlon = (np.asarray(lon) - self.lon_offset) / self.lon_scale + nlat = (np.asarray(lat) - self.lat_offset) / self.lat_scale + nalt = (np.asarray(alt) - self.alt_offset) / self.alt_scale + + col = apply_rfm(self.col_num, self.col_den, nlat, nlon, nalt) + row = apply_rfm(self.row_num, self.row_den, nlat, nlon, nalt) + + col = col * self.col_scale + self.col_offset + row = row * self.row_scale + self.row_offset + + return col, row + + + def localization(self, col, row, alt, return_normalized=False): + """ + Convert image coordinates plus altitude into geographic coordinates. + 反投影:从图像坐标到地理坐标 + Args: + col (float or list): x image coordinate(s) of the input point(s) + row (float or list): y image coordinate(s) of the input point(s) + alt (float or list): altitude(s) of the input point(s) + + Returns: + float or list: longitude(s) + float or list: latitude(s) + """ + ncol = (np.asarray(col) - self.col_offset) / self.col_scale + nrow = (np.asarray(row) - self.row_offset) / self.row_scale + nalt = (np.asarray(alt) - self.alt_offset) / self.alt_scale + + if not hasattr(self, 'lat_num'): + lon, lat = self.localization_iterative(ncol, nrow, nalt) + else: + lon = apply_rfm(self.lon_num, self.lon_den, nrow, ncol, nalt) + lat = apply_rfm(self.lat_num, self.lat_den, nrow, ncol, nalt) + + if not return_normalized: + lon = lon * self.lon_scale + self.lon_offset + lat = lat * self.lat_scale + self.lat_offset + + return lon, lat + + + def localization_iterative(self, col, row, alt): + """ + Iterative estimation of the localization function (image to ground), + for a list of image points expressed in image coordinates. + 逆投影时的迭代函数 + Args: + col, row: normalized image coordinates (between -1 and 1) + alt: normalized altitude (between -1 and 1) of the corresponding 3D + point + + Returns: + lon, lat: normalized longitude and latitude + + Raises: + MaxLocalizationIterationsError: if the while loop exceeds the max + number of iterations, which is set to 100. + """ + # target point: Xf (f for final) + Xf = np.vstack([col, row]).T + + # use 3 corners of the lon, lat domain and project them into the image + # to get the first estimation of (lon, lat) + # EPS is 2 for the first iteration, then 0.1. + lon = -col ** 0 # vector of ones + lat = -col ** 0 + EPS = 2 + x0 = apply_rfm(self.col_num, self.col_den, lat, lon, alt) + y0 = apply_rfm(self.row_num, self.row_den, lat, lon, alt) + x1 = apply_rfm(self.col_num, self.col_den, lat, lon + EPS, alt) + y1 = apply_rfm(self.row_num, self.row_den, lat, lon + EPS, alt) + x2 = apply_rfm(self.col_num, self.col_den, lat + EPS, lon, alt) + y2 = apply_rfm(self.row_num, self.row_den, lat + EPS, lon, alt) + + n = 0 + while not np.all((x0 - col) ** 2 + (y0 - row) ** 2 < 1e-18): + + if n > 100: + raise MaxLocalizationIterationsError("Max localization iterations (100) exceeded") + + X0 = np.vstack([x0, y0]).T + X1 = np.vstack([x1, y1]).T + X2 = np.vstack([x2, y2]).T + e1 = X1 - X0 + e2 = X2 - X0 + u = Xf - X0 + + # project u on the base (e1, e2): u = a1*e1 + a2*e2 + # the exact computation is given by: + # M = np.vstack((e1, e2)).T + # a = np.dot(np.linalg.inv(M), u) + # but I don't know how to vectorize this. + # Assuming that e1 and e2 are orthogonal, a1 is given by + # / + num = np.sum(np.multiply(u, e1), axis=1) + den = np.sum(np.multiply(e1, e1), axis=1) + a1 = np.divide(num, den).squeeze() + + num = np.sum(np.multiply(u, e2), axis=1) + den = np.sum(np.multiply(e2, e2), axis=1) + a2 = np.divide(num, den).squeeze() + + # use the coefficients a1, a2 to compute an approximation of the + # point on the gound which in turn will give us the new X0 + lon += a1 * EPS + lat += a2 * EPS + + # update X0, X1 and X2 + EPS = .1 + x0 = apply_rfm(self.col_num, self.col_den, lat, lon, alt) + y0 = apply_rfm(self.row_num, self.row_den, lat, lon, alt) + x1 = apply_rfm(self.col_num, self.col_den, lat, lon + EPS, alt) + y1 = apply_rfm(self.row_num, self.row_den, lat, lon + EPS, alt) + x2 = apply_rfm(self.col_num, self.col_den, lat + EPS, lon, alt) + y2 = apply_rfm(self.row_num, self.row_den, lat + EPS, lon, alt) + + n += 1 + + return lon, lat + \ No newline at end of file diff --git a/Ortho/model_meta.xml b/Ortho/model_meta.xml new file mode 100644 index 0000000..afa1137 --- /dev/null +++ b/Ortho/model_meta.xml @@ -0,0 +1,133 @@ + + + + + + + GEC + TIF + + + + + nan + BSQ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + 模拟影像法 + 常数累加法 + + 四次多项式模型 + WGS84 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NULL + NULL + + + + + + + + + + + + + + + + + + + + + + + 标准相关匹配 + + +
diff --git a/Ortho/orthProcess.ipynb b/Ortho/orthProcess.ipynb new file mode 100644 index 0000000..b81ef25 --- /dev/null +++ b/Ortho/orthProcess.ipynb @@ -0,0 +1,267 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 32, + "id": "ce677517-20b0-4c35-ac26-4dc53273c790", + "metadata": {}, + "outputs": [], + "source": [ + "import cv2\n", + "import os\n", + "import numpy as np\n", + "from matplotlib import pyplot as plt\n", + "plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签\n", + "plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "92c174ba-9c1d-4297-ac62-1f39cf1b92da", + "metadata": {}, + "outputs": [], + "source": [ + "sim_path =r\"D:\\MicroSAR\\C-SAR\\Ortho\\Ortho\\Temporary\\dem_rcs.jpg\"\n", + "sim2_path =r\"D:\\MicroSAR\\Temporary\\dem_rcs.jpg\"\n", + "ori_path=r\"D:\\MicroSAR\\C-SAR\\Ortho\\Ortho\\Temporary\\sar_rcs.jpg\"" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "b84a1ad4-e56b-45cd-9ac6-ddc26ce8eaad", + "metadata": {}, + "outputs": [], + "source": [ + "ori_img = cv2.imread(ori_path)[:,:,0]\n", + "sim_img = cv2.imread(sim_path)[:,:,0]\n", + "sim2_img = cv2.imread(sim2_path)[:,:,0]" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "809a17e7-196b-44aa-9022-c62f0ff93b36", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(19821, 14285)" + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sim2_img.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "5a23f79b-4472-4362-9dcd-224f07fb2432", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAhwAAAGRCAYAAAAuOGrnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOy9fXxU1bX//z46o8SSgFEJvUEJNvQSRbT4AC1YuS16oQVFoUorveItWLCKFm2ZXuiv9HvRDl6lSL2Fim1jixYo+NwLFbThK3wLFikgJbSkGitpCUKEhBowqef3x9ore8/OmckEUAx3Pq/XvGbmPOyns/faa33W2vsEYRiG5JBDDjnkkEMOObyPOOl4FyCHHHLIIYcccjjxkVM4csghhxxyyCGH9x05hSOHHHLIIYcccnjfkVM4csghhxxyyCGH9x05hSOHHHLIIYcccnjfkVM4csghhxxyyCGH9x05hSOHHHLIIYcccnjfkVM4csghhxxyyCGH9x05hSOHHHLIIYcccnjfkVM4csghhxxyyCGH9x05hSOHHHLIIYccjhMOHTpEfX39UX8OHTqUdZ5PP/005557LrFYjAEDBlBZWQnA7bffThAELZ/S0tKWe7Zt28all17K6aefzje+8Q2O5K0oOYUjhxxyyCGHHI4DDh06xFl5eXTp0uWoP7169cpK6fjzn//MzTffTDKZpKamhp49ezJhwgQAXnnlFX71q1/x9ttv8/bbb/P73/8egMOHDzNy5EguvvhiNm7cyPbt2ykvL293fYPcy9tyyCGHHHLI4YNHfX09Xbp04RvAqUeRzmHgv4ADBw5QUFCQ8drnnnuOXbt2MWnSJAB+85vfMGzYMP7+979TWFjIX//6Vzp37pxyz1NPPcW///u/s2vXLk477TS2bNnC1772NdauXduucsbadXUOOeSQQw455HBMcSrQ6RikU19fn5ruqady6qmpqsyIESNS/v/xj3+ktLSUrVu3EoYhF110ETU1NVxxxRU8/PDDnHPOOWzZsoWBAwdy2mmnAdCvXz+2b9/e7vLlXCo55JBDDjnkcBwRPwYfgLPPPjvFzfK9730vY77vvvsu999/P7feeiuVlZWcf/75/OIXv2D79u3E43G++tWvAqLI9OrVq+W+IAg4+eSTefvtt9tVzxzDkUMOOeSQQw7HETGObjLWe998880Ul4rPbviYMWMGnTt35pZbbiEej3PjjTe2nHvooYc499xzqa+vJxaLtUqrU6dOvPPOO5x++untLmcOOeSQQw455NCBUVBQ0GYMh2LVqlUsWLCA9evXE4/HW53v2rUr7733Hn/7298oLCxk27ZtKecbGho45ZRT2lW+nEslhxxyyCGHHI4jYhydO6W9zMFrr73GjTfeyPz58znvvPMAmDp1KkuXLm255ne/+x0nnXQSZ599Npdeeinr169vOVddXc3hw4cpLCxsdz1zyCGHHHLIIYfjhGPlUskGjY2NjBgxglGjRnHNNddw8OBBAC688EKmT59O9+7daW5u5vbbb2f8+PGcdtppfPrTn+bAgQP87Gc/49/+7d9IJpMMHTqUk08++X0rZw455JBDDjnk0IHx61//msrKSiorK1m4cGHL8ddff50dO3ZwzTXXkJ+fz7XXXsu9994LQCwW4+GHH+ZLX/oS3/jGN/jHP/7BmjVr2p13bh+OHHLIIYcccjgO0H045gF5R5FOIzCF7PbhOBrU1NSwceNGPvWpT3HWWWe1+/4cw5FDDjnkkEMOxxEfpEvlaFBcXExxcfER358LGs0hhxxyyCGHHN535BiOHHLIIYcccjiO0FUqR4qmY1WQ9xk5hSOHHHLIIYccjiM6ikvlaJFzqeSQQw455JBDDu87OopilEMOxwT79u3jj3/8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zDMI4p7w2Bw3w4DMMwDMMYdEzDYRiGYRjHFPPhMAzDMAxj0LFlsYZhGIZhGEcF03AYhmEYxjHFTCqGYRiGYQw6XRzZcGyrVAzDMAzDMADTcBiGYRjGMcZMKoZhGIZhDDq2SsUwDMMwDOOoYAKHYRiGYRxTuo/CZ2Bs27aNCy+8kNNOO42vf/3rpGl6FPLRNyZwGIZhGMYxpesofIrnrbfeYu7cuUydOpVNmzbx0ksvsWbNmqOTlT4wgcMwDMMw3kOsX7+e9vZ2VqxYwbnnnst3vvMdfvjDHw56vOY0ahiGYRjHlL9wZI6fbwHQ0dGRd3TYsGEMGzas19V/+MMfuPjii3nf+94HwKRJk3jppZeOIP7iMIHDMAzDMI4Bp5xyCqNHj2bPnjuPOKzhw4dz1lln5R277bbbaGho6HVtR0cHZ599ds//JEk4+eSTef311znttNOOOC2FMIHDMAzDMI4BZWVl7Nq1i7/+9a9HHFaapiRJkncsS7sBUFJS0utcWVkZb7zxhgkchmEYhjEUKSsro6ys7F2NM5fLsW3btrxjBw8e5JRTThnUeM1p1DAMwzDeQ1x44YU899xzPf+bm5t56623yOVygxqvCRyGYRiG8R7i4x//OO3t7fzoRz8CoLGxkdraWk4++eRBjTdJ343dPgzDMAzDOG549NFHue6666ioqODtt9/mmWee4fzzzx/UOE3gMAzDMIz3IC0tLWzatImPfvSjnH766YMenwkchmEYhmEMOubDYRiGYRjGoGMCh2EYhmEYg44JHIZhGIZhDDomcBiGYRiGMeiYwGEYhmEYxqBjAodhGIZhGIOOCRyGYRiGYQw6JnAYhmEYhjHomMBhGIZhGMag8/8BtYU4CmLa41wAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "plt.matshow(sim_img,cmap=\"jet\")\n", + "plt.colorbar()\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "a4025626-1e91-4576-b707-9eb21c10825d", + "metadata": {}, + "outputs": [], + "source": [ + "img1=sim_img*1.0" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "65a1f3da-5ae3-48d7-afa4-8fc9882a4909", + "metadata": {}, + "outputs": [], + "source": [ + "for i in range(0,5887,300):\n", + " if i+2*300>5887:\n", + " continue\n", + " for j in range(0,8062,300):\n", + " if j+2*300>8062:\n", + " continue \n", + " temp=img1[i:i+600,j:j+600]\n", + " img1[i:i+600,j:j+600]=np.std(temp)/(np.nanmax(temp)-np.nanmin(temp))" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "0639d283-7491-472f-80d5-85d5e8de301d", + "metadata": {}, + "outputs": [], + "source": [ + "img2=sim2_img*1.0\n", + "for i in range(0,19821,300):\n", + " if i+2*300>19821:\n", + " continue\n", + " for j in range(0,14285,300):\n", + " if j+2*300>14285:\n", + " continue \n", + " temp=img2[i:i+600,j:j+600]\n", + " img2[i:i+600,j:j+600]=np.std(temp)/(np.nanmax(temp)-np.nanmin(temp))" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "11be6d02-863c-4c5c-b23b-d72d04ef88be", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAa4AAAGICAYAAAAZAASxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA2CklEQVR4nO3df1xc1Z038M8wA0NQfmpKIk4SCNZoFKN0TIpPcbuySZ4FDKbqxrAvN2yyRnGpNA1NeElq1S6wNuVB627MKClJtpKmtn2ymicaNygx21IzaUI6O0hJBME0mgQnMyBhgOE+fxDGDMwM8+NehpP5vF+v8+pr7pn7vV9ukW/OmTPnqiRJkkBERCSIiFAnQERE5A8WLiIiEgoLFxERCYWFi4iIhMLCRUREQmHhIiIiobBwERGRUFi4iIhIKJpQJ0BERL4ZGBjA4OCgLLGioqIQHR0tS6ypxsJFRC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YuIiIhDK13+Mak5KSgpSUlCCvKw+hC5dWq8UzzzzjdiVMqDAn30zHnIDpmRdz8s10zEkZU/sZ13SkkvyZWCQiopCw2WyXPy/7I4LfnboPwF2wWq3T6vNAX/ELyEREJBShpwqJiMIPpwpZuIiIhBKaxRnTCacKiYhIKBxxEREJhVOFLFxEREKZ2p0zpiNOFRIRkVA44iIiEgqnClm4iIiEwlWFnCokIiKhcMRFRCQUThWycBERCYWrCjlVSEREQuGIi4hIKJwqZOEiIhIKVxWycBERCYWFi59xERGRUDjiIiISCj/jYuEiIhIKl8NzqpCIiITCERcRkVA4VcjCRUQklCEE/6ebqwqJiIimDEdcRERC4VQhCxcRkVC4qpBThUREJBSOuIiIhMKpQhYuIiKhDAFQyxBDXJwqJCIioXDERUQklC8R/FSfXY5EQoaFi4hIAFFRUZg1axY+++z/yBJv1qxZiIqKkiXWVFNJkiSFOgkiIprcwMAABgcHZYkVFRWF6OhoWWJNNRYuIiISChdnEBGRUFi4iIhIKCxcREQkFBYuIiISCgsXEREJhYWLiIiEwsJFRERC+f+Ud8RlOLN4ggAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "plt.matshow(img2[15000:19000,:4000],cmap=\"jet\")\n", + "plt.colorbar()\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "2df5bd3e-2777-43fc-a00c-1cb343f04f5a", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAHMCAYAAADWLRO/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA060lEQVR4nO3df3xU9Z3v8dcwkx/EJJNEU1lD0ITYqmiMxSkxq1G7aUvbsMCjtkVoKfayUt1ydenmXr3Q2/SuN2S7L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tIREXEJjfBFxKXcN6WjEb6ISBqEQiECgQDFxcU0NTVhWVbKz6mCLyIu9W4K2tjEYjHmzZvH7NmzCQaDhMNh2tvbnfmxRqGCLyIuFU9BG5tt27YRiURYt24dM2fOpKWlhY0bNzr0c52b5vBFxKViKYkXjUZHHM3JySEnJ2fEsa6uLmpra8nLywOgurqacDjscD5nUsEXEVfJzs5m2rRpHD78D47Hzs/Pp7y8fMSxr33tazQ3N484Fo1GqaioSL72eDx4vV76+vooLi52PK9hKvgi4iq5ubns37+fU6dOOR7bsiw8Hs+IY+8d3QP4fL4zjufm5nLixAkVfBERJ+Xm5pKbm5u285eUlBAKhUYc6+/vJzs7O6Xn1UVbEZELLBAI0NnZmXzd09NDLBajpKQkpedVwRcRucDq6+uJRCJs2rQJgNbWVhoaGvB6vSk9r8e6EKv9RURkhC1btrB48WIKCgoYGBigo6ODWbNmpfScKvgiImly6NAhgsEgdXV1lJaWpvx8KvgiIi6hOXwREZdQwRcRcQkVfBERl1DBFxFxCRV8ERGXUMEXEXEJFXwREZdQwRcRcQkVfBERl/j/j9OWPb1IJFIAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "plt.matshow(img2,cmap=\"jet\")\n", + "plt.colorbar()\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "afe62adb-2875-40e5-9f67-89b5221126b6", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAhUAAAGPCAYAAADr8SLGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA190lEQVR4nO3df3xU1Z3/8fcwk0zA/CApFNYQIAF/gaYqjaT0W1rbtLIl1NBaS6Hbgl9Wql1/VMwqKz6kapPYUoq7KhiljVjR2lZl1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AABwRVJPfwAAkPxSZ/qDogIAAE+lzomaTH8AAABXMFIBAICnmP4AAACu4I6aAAAAMRipAADAU0x/AAAAV3D1BwAAQAxGKgAA8BTTHwAAwBVc/QEAABCDkQoAADzF9AcAAHBF6lz9QVEBAICnUqeo4JwKAADgCkYqAADwFOdUAAAAV3BJKQAAQAxGKgAA8BTTHwAAwBVHZfd1zNUfAAAgxTBSAQCAp5j+AAAAruDqDwAAgBgUFQAAeKrLhS0+TU1NKikpUW5uriorK+U4jgv9oKgAAMBjR13Y+i8SiWjGjBmaNGmSGhoa1NzcrLq6Old6QlEBAMAAsm7dOoVCIS1btkzjxo1TVVWVVq1a5cp7c6ImAACeOii7ky0jkqRwOBzzbDAYVDAYPO7VjY2NKi0t1ZAhQyRJxcXFam5utjj++ygqAADwQHp6ukaOHKm//OWn1u+VmZmpgoKCmOfuuOMOLVmy5LjXhsNhFRYWRh/7fD75/X61t7crNzfXqh0UFQAAeCAjI0O7du3SkSNHrN/LcRz5fL6Y5040SiFJgUDguH0ZGRnq7OykqAAAIFllZGQoIyPjtB4zLy9PTU1NMc91dHQoPT3d+r05URMAgAGkpKRE9fX10cetra2KRCLKy8uzfm+KCgAABpCpU6cqFApp9erVkqSamhqVlZXJ7/dbv7fPceuOFwAAICk888wzmj17trKystTd3a1NmzZp4sSJ1u9LUQEAwAC0Z88eNTQ0aMqUKRo+fLgr70lRAQAAXME5FQAAwBUUFQAAwBUUFQAAwBUUFQAAwBUUFQAAwBUUFQAAwBUUFQAAwBUUFQAAwBUUFQAAwBX/HwCDIOI2QHZ+AAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "plt.matshow(img1,cmap=\"jet\")\n", + "plt.colorbar()\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "8d694781-d527-4c1d-a811-de2df88f11bc", + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "angle_arr=np.zeros((900,2))\n", + "for i in range(900):\n", + " angle=i*(math.pi/2)/900.0\n", + " angle_arr[i,0]=angle*180/math.pi\n", + " angle_arr[i,1]=(0.0133 * math.cos(angle)) / ((math.sin(angle) + 0.1 * math.cos(angle))**3)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "edcc3785-f880-4ef6-bea3-ce735f4591d2", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAhsAAAGbCAYAAABtf1L4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8o6BhiAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAlbElEQVR4nO3df3RU5b3v8c/MBBIwZCCIIUoIE1DPiRzaQgkRKl2nhV6uJIq31uKPtmI5WOxp6611XbnCpVSXoIuqy3s1XNDKAqVq1+VH8VjQIxxFK3BTCOfmJIcqJJwAQZEfMwlJJpDs+0fMSCCTzGT2nj3Z+/1aa/6YnSd7nuVDzCfPfp7v4zEMwxAAAIBFvHZ3AAAAOBthAwAAWIqwAQAALEXYAAAAliJsAAAASxE2AACApQgbAADAUoQNAABgqTS7OyBJ7e3tOn78uIYMGSKPx2N3dwAAQAwMw1BDQ4Ouvvpqeb3R5y9SImwcP35ceXl5dncDAAD0QV1dnUaNGhX16ykRNoYMGSKpo7NZWVk29wYAAMQiFAopLy8v8ns8mpQIG52PTrKysggbAAD0M70tgWCBKAAAsBRhAwAAWIqwAQAALEXYAAAAliJsAAAASxE2AACApQgbAADAUoQNAABgqZQo6mWFtnZDe2tO67OGFl01JENFgWz5vJy7AgBAsjkybGyrrNeyrVWqD7ZEruX6M7S0tFCzxufa2DMAANzHcY9RtlXWa+Er+7oEDUk6EWzRwlf2aVtlvU09AwDAnRwVNtraDS3bWiWjm691Xlu2tUpt7d21AAAAVnBU2Nhbc/qyGY2LGZLqgy3aW3M6eZ0CAMDlHBU2PmuIHjT60g4AAC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sYjMY4OGwAAwH6OXLMBAABSB2EDAABYirABAAAsRdgAAACWImwAAABLETYAAIClCBsAAMBShA0AAGApwgYAALDU/wdkZHSaOmahywAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "plt.scatter(angle_arr[:,0],angle_arr[:,1])\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "616b92c4-7d19-462f-8ce6-b671e0a94037", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Ortho/packing.spec b/Ortho/packing.spec new file mode 100644 index 0000000..a6fed4d --- /dev/null +++ b/Ortho/packing.spec @@ -0,0 +1,89 @@ +# -*- mode: python ; coding: utf-8 -*- +import sys +import shutil +import os +import tarfile + +#ļб +sys.setrecursionlimit(5000) +block_cipher = None + +#######begin-ǰ############## +#һtoolļ滻ǰ·µtool +# Դ +cwdpath = os.getcwd() +tool_path = '' +src = '../tool' +des = os.path.join(cwdpath, "tool") +targz_path = os.path.join(cwdpath, "tool.tar.gz") +#ļ +if os.path.exists(des): + if os.path.isdir(des): + shutil.rmtree(des) + os.makedirs(des) +#ѹ +dir = os.path.split(targz_path )[0] +if os.path.exists(dir) is False: + os.makedirs(dir) +with tarfile.open(targz_path, "w:gz") as tar: + tar.add(src, arcname=os.path.basename(src)) +#ѹ +t = tarfile.open(targz_path) +t.extractall(path=cwdpath) +#ɾʱѹ +#os.remove(targz_path) + +# +main_name = '' +for name in os.listdir(cwdpath): + if 'Main.py' in name: + main_name = name +exe_name = exe_name = main_name .split('.')[0][:-4] + '-C-SAR-V2.0' +#######end-ǰ############## + + + +#######beging-pyinstaller############## + +a = Analysis(['OrthoMain.py', +'./tool/algorithm/algtools/ScatteringAuxData.py', +'./tool/algorithm/algtools/CoordinateTransformation.py', +'./tool/algorithm/algtools/DEMJoint.py', +'./tool/algorithm/algtools/logHandler.py', +'./tool/algorithm/algtools/PreProcess.py', +'./tool/algorithm/algtools/RieveFilter.py', +'./tool/algorithm/algtools/ROIAlg.py', +'./tool/algorithm/block/blockprocess.py', +'./tool/algorithm/image/ImageHandle.py', +'./tool/algorithm/xml/AlgXmlHandle.py', +'./tool/algorithm/xml/CreatMetafile.py', +'./tool/config/ConfigeHandle.py', +'./tool/logs/logHandler.py',], + pathex=[cwdpath], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name= 'Ortho-C-SAR-V2.0', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True ) +######beging-pyinstaller################# \ No newline at end of file diff --git a/Ortho/product.xml b/Ortho/product.xml new file mode 100644 index 0000000..1d8c5f1 --- /dev/null +++ b/Ortho/product.xml @@ -0,0 +1,60 @@ + + + 正射校正 + Ortho + LEVEL3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + None + 参考产品介绍PDF + + + + + 德清 + + + + \ No newline at end of file diff --git a/Ortho/proj.db b/Ortho/proj.db new file mode 100644 index 0000000..020f3a7 Binary files /dev/null and b/Ortho/proj.db differ diff --git a/Ortho/test/DeLevelingEffect.py b/Ortho/test/DeLevelingEffect.py new file mode 100644 index 0000000..f28c0e6 --- /dev/null +++ b/Ortho/test/DeLevelingEffect.py @@ -0,0 +1,47 @@ +''' 去地平效应功能代码 +因为去地平效应是需要像元的成像时间作为的输入参数量,因此需要原始影像的SLC作为输出项,或者原始的SLC中,保留了影像的成像时刻。 +作为模型约定: +1.模型的输入需要已经经过了正射校正,否则没有办法与已有的DEM进行匹配。 +2.开发示例使用的高分三号,注意高分三号的正射模型为rpc,因此需要需要计算的对应的时间。 +''' +import os +import numpy as np +# import gdal +import math + +class DeLevelingEffect: + ''' 去地平效应 + 计算公式: + Phi=(4*pi/lambda_)*(r1-r2) + lambda_ 波长 + pi=3.14159265358979323846264338327950288 + r1:主 + r2:辅 + ''' + def LevelingEffect(lamda_,r1,r2,pi=3.14159265358979323846264338327950288): + '''计算地平效应的相位 + agrs: + lamda_: double, 波长 + r1:shape nx1 ,主影像的斜距 + r2:shape nx1 ,辅影像的斜距 + pi:double,圆周率 + return: + Phi:shape nx1 + ''' + Phi=(4*pi/lamda_)*(r1-r2) + return Phi + + def CalSlantDistance(Rs_Salatellite,Rs_SeaLevel): + '''计算斜率 + agrs: + Rs_Salatellite:nx3 x,y,z 地面对应时刻的 卫星位置和速度 + Rs_SeaLevel:nx3 x,y,z 地面的坐标 + return: + SlantDistance:nx1 斜距 + ''' + SlantDistance=np.sqrt(np.sum((Rs_Salatellite-Rs_SeaLevel)**2,axis=1)).reshape(-1,1) + return SlantDistance + + # 根据根据卫星轨道数据,构建合适的影像信息 + + pass \ No newline at end of file diff --git a/Ortho/test/EOP-Last5Years.csv b/Ortho/test/EOP-Last5Years.csv new file mode 100644 index 0000000..5f75161 --- /dev/null +++ b/Ortho/test/EOP-Last5Years.csv @@ -0,0 +1,2338 @@ +DATE,MJD,X,Y,UT1-UTC,LOD,DPSI,DEPS,DX,DY,DAT,DATA_TYPE +2017-01-01,57754,0.080406,0.263110,0.5912977,0.0010160,-0.099181,-0.009295,-0.000041,-0.000127,37,O +2017-01-02,57755,0.080234,0.263612,0.5901980,0.0011845,-0.099234,-0.009257,-0.000051,-0.000127,37,O +2017-01-03,57756,0.080325,0.264049,0.5889489,0.0013554,-0.099359,-0.009165,-0.000060,-0.000127,37,O +2017-01-04,57757,0.080085,0.264248,0.5875560,0.0014755,-0.099409,-0.009048,-0.000069,-0.000128,37,O +2017-01-05,57758,0.078979,0.264771,0.5860113,0.0015833,-0.099345,-0.008947,-0.000071,-0.000156,37,O +2017-01-06,57759,0.076659,0.265079,0.5844176,0.0015733,-0.099286,-0.008804,-0.000065,-0.000153,37,O +2017-01-07,57760,0.074997,0.264999,0.5828289,0.0015881,-0.099388,-0.008680,-0.000056,-0.000138,37,O +2017-01-08,57761,0.073590,0.265346,0.5812971,0.0015171,-0.099719,-0.008689,-0.000048,-0.000122,37,O +2017-01-09,57762,0.072292,0.265405,0.5798632,0.0013991,-0.100203,-0.008887,-0.000041,-0.000104,37,O +2017-01-10,57763,0.070974,0.265630,0.5785447,0.0012681,-0.100710,-0.009151,-0.000058,-0.000086,37,O +2017-01-11,57764,0.069188,0.266009,0.5773226,0.0011980,-0.100952,-0.009243,-0.000056,-0.000068,37,O +2017-01-12,57765,0.067206,0.266760,0.5761501,0.0011623,-0.100925,-0.009050,-0.000068,-0.000029,37,O +2017-01-13,57766,0.065434,0.267601,0.5749710,0.0011970,-0.100619,-0.008774,-0.000083,0.000015,37,O +2017-01-14,57767,0.064123,0.268514,0.5737486,0.0012671,-0.100052,-0.008721,-0.000062,0.000014,37,O +2017-01-15,57768,0.062094,0.269403,0.5724482,0.0013292,-0.099488,-0.008909,-0.000026,-0.000003,37,O +2017-01-16,57769,0.059790,0.270125,0.5710855,0.0013475,-0.099159,-0.009130,0.000010,-0.000023,37,O +2017-01-17,57770,0.056596,0.270860,0.5697355,0.0012962,-0.099101,-0.009194,0.000045,-0.000043,37,O +2017-01-18,57771,0.053236,0.271069,0.5684687,0.0012312,-0.099189,-0.009105,0.000081,-0.000062,37,O +2017-01-19,57772,0.049831,0.271594,0.5672621,0.0011544,-0.099616,-0.008995,0.000003,-0.000066,37,O +2017-01-20,57773,0.046722,0.272046,0.5661354,0.0010835,-0.100149,-0.008988,-0.000100,-0.000078,37,O +2017-01-21,57774,0.044253,0.272777,0.5650772,0.0010396,-0.100415,-0.009045,-0.000095,-0.000089,37,O +2017-01-22,57775,0.042223,0.273622,0.5640539,0.0009761,-0.100422,-0.009111,-0.000037,-0.000136,37,O +2017-01-23,57776,0.040821,0.274538,0.5631156,0.0009027,-0.100355,-0.009082,-0.000035,-0.000148,37,O +2017-01-24,57777,0.039583,0.275760,0.5622595,0.0008250,-0.100150,-0.009055,-0.000032,-0.000159,37,O +2017-01-25,57778,0.038517,0.276614,0.5614608,0.0007689,-0.099987,-0.009107,-0.000038,-0.000159,37,O +2017-01-26,57779,0.037014,0.277717,0.5606755,0.0007617,-0.099880,-0.009265,-0.000045,-0.000156,37,O +2017-01-27,57780,0.035647,0.278508,0.5598651,0.0008294,-0.099724,-0.009456,-0.000052,-0.000153,37,O +2017-01-28,57781,0.034439,0.279471,0.5589886,0.0009339,-0.099419,-0.009577,-0.000037,-0.000165,37,O +2017-01-29,57782,0.033163,0.280636,0.5579999,0.0010635,-0.099116,-0.009561,-0.000014,-0.000180,37,O +2017-01-30,57783,0.032188,0.281673,0.5568596,0.0012118,-0.098981,-0.009461,0.000009,-0.000196,37,O +2017-01-31,57784,0.031679,0.282720,0.5555742,0.0013455,-0.099004,-0.009383,0.000032,-0.000212,37,O +2017-02-01,57785,0.031191,0.283698,0.5541788,0.0014251,-0.099361,-0.009224,-0.000072,-0.000062,37,O +2017-02-02,57786,0.030748,0.284679,0.5527206,0.0014521,-0.099511,-0.009295,-0.000124,-0.000093,37,O +2017-02-03,57787,0.030524,0.285671,0.5512606,0.0014618,-0.099600,-0.009414,-0.000151,-0.000192,37,O +2017-02-04,57788,0.030066,0.286876,0.5498336,0.0014133,-0.099760,-0.009435,-0.000148,-0.000214,37,O +2017-02-05,57789,0.029276,0.288333,0.5484764,0.0013301,-0.100073,-0.009491,-0.000132,-0.000208,37,O +2017-02-06,57790,0.027940,0.289708,0.5471907,0.0012443,-0.100449,-0.009669,-0.000117,-0.000202,37,O +2017-02-07,57791,0.025783,0.290937,0.5459617,0.0011784,-0.100691,-0.009899,-0.000101,-0.000195,37,O +2017-02-08,57792,0.023504,0.291995,0.5447813,0.0011966,-0.100801,-0.009956,-0.000132,-0.000121,37,O +2017-02-09,57793,0.021386,0.293084,0.5435687,0.0012574,-0.100711,-0.009811,-0.000174,-0.000029,37,O +2017-02-10,57794,0.019705,0.294105,0.5422705,0.0013534,-0.100390,-0.009806,-0.000171,-0.000154,37,O +2017-02-11,57795,0.018117,0.295030,0.5408616,0.0014923,-0.100029,-0.009851,-0.000154,-0.000207,37,O +2017-02-12,57796,0.016533,0.296190,0.5393236,0.0015821,-0.099727,-0.010046,-0.000138,-0.000207,37,O +2017-02-13,57797,0.014945,0.297050,0.5376803,0.0016412,-0.099517,-0.010329,-0.000122,-0.000208,37,O +2017-02-14,57798,0.013603,0.298053,0.5360022,0.0016773,-0.099450,-0.010508,-0.000106,-0.000208,37,O +2017-02-15,57799,0.012199,0.298908,0.5343223,0.0016530,-0.099635,-0.010485,-0.000112,-0.000184,37,O +2017-02-16,57800,0.010653,0.299914,0.5327041,0.0015749,-0.100019,-0.010368,-0.000123,-0.000155,37,O +2017-02-17,57801,0.009096,0.300662,0.5311837,0.0014455,-0.100478,-0.010292,-0.000135,-0.000126,37,O +2017-02-18,57802,0.008066,0.301408,0.5298432,0.0012789,-0.100791,-0.010341,-0.000132,-0.000141,37,O +2017-02-19,57803,0.007626,0.302891,0.5286507,0.0011131,-0.100835,-0.010419,-0.000123,-0.000171,37,O +2017-02-20,57804,0.007330,0.304749,0.5275398,0.0009881,-0.100612,-0.010443,-0.000115,-0.000202,37,O +2017-02-21,57805,0.006830,0.306848,0.5265701,0.0009153,-0.100241,-0.010425,-0.000106,-0.000232,37,O +2017-02-22,57806,0.006292,0.308971,0.5256816,0.0009103,-0.099918,-0.010361,-0.000106,-0.000159,37,O +2017-02-23,57807,0.006313,0.310992,0.5247251,0.0009917,-0.099650,-0.010473,-0.000079,-0.000133,37,O +2017-02-24,57808,0.006506,0.313447,0.5237032,0.0010771,-0.099461,-0.010691,-0.000044,-0.000127,37,O +2017-02-25,57809,0.006351,0.315906,0.5226220,0.0011600,-0.099394,-0.010870,-0.000056,-0.000143,37,O +2017-02-26,57810,0.005864,0.317660,0.5214174,0.0012737,-0.099305,-0.010873,-0.000087,-0.000167,37,O +2017-02-27,57811,0.004992,0.319182,0.5200555,0.0014175,-0.099166,-0.010720,-0.000117,-0.000191,37,O +2017-02-28,57812,0.004458,0.320769,0.5185559,0.0015372,-0.099077,-0.010578,-0.000147,-0.000214,37,O +2017-03-01,57813,0.004201,0.322772,0.5169206,0.0016149,-0.099015,-0.010594,-0.000133,-0.000225,37,O +2017-03-02,57814,0.004435,0.324530,0.5152707,0.0016207,-0.099067,-0.010779,-0.000107,-0.000231,37,O +2017-03-03,57815,0.004753,0.326399,0.5137386,0.0015313,-0.099206,-0.011005,-0.000081,-0.000238,37,O +2017-03-04,57816,0.004922,0.328387,0.5122784,0.0014347,-0.099490,-0.011101,-0.000098,-0.000197,37,O +2017-03-05,57817,0.005038,0.330067,0.5108909,0.0013442,-0.099813,-0.011106,-0.000130,-0.000138,37,O +2017-03-06,57818,0.004656,0.331886,0.5095838,0.0012611,-0.100065,-0.011117,-0.000163,-0.000079,37,O +2017-03-07,57819,0.003842,0.333541,0.5083262,0.0012567,-0.100133,-0.011166,-0.000196,-0.000020,37,O +2017-03-08,57820,0.003361,0.335017,0.5070546,0.0013135,-0.099928,-0.011235,-0.000219,0.000002,37,O +2017-03-09,57821,0.003516,0.336230,0.5057278,0.0013630,-0.099550,-0.011250,-0.000239,0.000014,37,O +2017-03-10,57822,0.004054,0.337739,0.5043303,0.0014235,-0.099283,-0.011310,-0.000288,-0.000048,37,O +2017-03-11,57823,0.004522,0.339497,0.5028649,0.0015119,-0.099092,-0.011399,-0.000290,-0.000082,37,O +2017-03-12,57824,0.004623,0.341460,0.5012981,0.0016026,-0.099017,-0.011565,-0.000271,-0.000095,37,O +2017-03-13,57825,0.004329,0.343151,0.4996338,0.0016806,-0.098981,-0.011767,-0.000253,-0.000108,37,O +2017-03-14,57826,0.004108,0.344483,0.4979534,0.0016946,-0.098937,-0.011903,-0.000235,-0.000122,37,O +2017-03-15,57827,0.003946,0.345936,0.4963503,0.0015974,-0.099079,-0.011873,-0.000252,-0.000086,37,O +2017-03-16,57828,0.003934,0.347162,0.4948329,0.0014473,-0.099427,-0.011763,-0.000279,-0.000037,37,O +2017-03-17,57829,0.004042,0.348900,0.4934113,0.0013260,-0.099406,-0.011838,-0.000126,-0.000152,37,O +2017-03-18,57830,0.004447,0.350950,0.4921127,0.0012046,-0.099511,-0.011846,-0.000070,-0.000130,37,O +2017-03-19,57831,0.004857,0.353166,0.4909106,0.0011585,-0.099531,-0.011831,-0.000072,-0.000037,37,O +2017-03-20,57832,0.005254,0.355662,0.4897700,0.0011271,-0.099353,-0.011802,-0.000075,0.000055,37,O +2017-03-21,57833,0.005426,0.358050,0.4886539,0.0011271,-0.099040,-0.011713,-0.000077,0.000148,37,O +2017-03-22,57834,0.005638,0.360271,0.4875037,0.0012074,-0.098972,-0.011706,-0.000207,0.000131,37,O +2017-03-23,57835,0.005959,0.362598,0.4862691,0.0013346,-0.098582,-0.011834,-0.000193,0.000029,37,O +2017-03-24,57836,0.005500,0.364846,0.4848670,0.0014359,-0.098268,-0.012079,-0.000128,-0.000089,37,O +2017-03-25,57837,0.005014,0.366667,0.4833895,0.0015687,-0.098337,-0.012257,-0.000127,-0.000097,37,O +2017-03-26,57838,0.004885,0.368375,0.4817351,0.0017442,-0.098460,-0.012286,-0.000150,-0.000063,37,O +2017-03-27,57839,0.004890,0.370263,0.4799358,0.0018584,-0.098349,-0.012121,-0.000173,-0.000030,37,O +2017-03-28,57840,0.004992,0.372010,0.4780207,0.0019526,-0.098093,-0.011871,-0.000196,0.000003,37,O +2017-03-29,57841,0.005269,0.373530,0.4760266,0.0020072,-0.098666,-0.011748,-0.000475,0.000063,37,O +2017-03-30,57842,0.005359,0.375029,0.4740320,0.0019058,-0.098812,-0.012021,-0.000437,-0.000007,37,O +2017-03-31,57843,0.004895,0.376308,0.4721706,0.0017391,-0.098525,-0.012437,-0.000142,-0.000086,37,O +2017-04-01,57844,0.005294,0.377543,0.4704666,0.0016269,-0.098677,-0.012679,-0.000054,-0.000086,37,O +2017-04-02,57845,0.005726,0.379066,0.4689063,0.0014914,-0.098833,-0.012710,-0.000060,-0.000063,37,O +2017-04-03,57846,0.006227,0.379825,0.4674913,0.0013746,-0.098799,-0.012636,-0.000065,-0.000039,37,O +2017-04-04,57847,0.007153,0.380838,0.4661507,0.0013230,-0.098661,-0.012569,-0.000070,-0.000016,37,O +2017-04-05,57848,0.008418,0.382508,0.4648247,0.0013373,-0.098374,-0.012356,-0.000051,0.000194,37,O +2017-04-06,57849,0.009587,0.384603,0.4634343,0.0014635,-0.098066,-0.012276,-0.000063,0.000300,37,O +2017-04-07,57850,0.010455,0.386575,0.4619097,0.0015867,-0.097894,-0.012578,-0.000137,0.000050,37,O +2017-04-08,57851,0.010555,0.388428,0.4603054,0.0016542,-0.097662,-0.012733,-0.000132,-0.000039,37,O +2017-04-09,57852,0.010582,0.390108,0.4586447,0.0016711,-0.097549,-0.012765,-0.000093,-0.000030,37,O +2017-04-10,57853,0.010954,0.391815,0.4570130,0.0016200,-0.097552,-0.012729,-0.000054,-0.000022,37,O +2017-04-11,57854,0.011615,0.393605,0.4554115,0.0015628,-0.097560,-0.012633,-0.000014,-0.000014,37,O +2017-04-12,57855,0.012353,0.395189,0.4538072,0.0015655,-0.097725,-0.012545,-0.000032,-0.000011,37,O +2017-04-13,57856,0.014173,0.396821,0.4522472,0.0015977,-0.097995,-0.012520,-0.000065,-0.000009,37,O +2017-04-14,57857,0.016279,0.398825,0.4507197,0.0015318,-0.098248,-0.012554,-0.000080,0.000004,37,O +2017-04-15,57858,0.018224,0.401065,0.4492444,0.0014306,-0.098413,-0.012630,-0.000088,0.000023,37,O +2017-04-16,57859,0.019709,0.403514,0.4478193,0.0014057,-0.098482,-0.012743,-0.000096,0.000041,37,O +2017-04-17,57860,0.021176,0.405745,0.4463842,0.0014669,-0.098502,-0.012872,-0.000103,0.000060,37,O +2017-04-18,57861,0.022689,0.407739,0.4449259,0.0014977,-0.098435,-0.012963,-0.000111,0.000078,37,O +2017-04-19,57862,0.023887,0.409771,0.4434259,0.0015095,-0.098146,-0.012949,-0.000119,0.000096,37,O +2017-04-20,57863,0.024672,0.411357,0.4419414,0.0015148,-0.097661,-0.012898,-0.000124,0.000057,37,O +2017-04-21,57864,0.026074,0.412745,0.4403657,0.0016288,-0.097354,-0.012866,-0.000142,0.000018,37,O +2017-04-22,57865,0.027893,0.414973,0.4386298,0.0018037,-0.097418,-0.012919,-0.000141,0.000008,37,O +2017-04-23,57866,0.029188,0.417538,0.4367309,0.0020108,-0.097701,-0.013009,-0.000132,0.000007,37,O +2017-04-24,57867,0.029775,0.419822,0.4346461,0.0021600,-0.097798,-0.012973,-0.000123,0.000006,37,O +2017-04-25,57868,0.030533,0.421627,0.4324562,0.0022208,-0.097632,-0.012784,-0.000114,0.000005,37,O +2017-04-26,57869,0.031503,0.423256,0.4302575,0.0021462,-0.097855,-0.012573,-0.000215,0.000086,37,O +2017-04-27,57870,0.032210,0.424548,0.4281606,0.0020042,-0.098176,-0.012672,-0.000195,0.000128,37,O +2017-04-28,57871,0.033208,0.425930,0.4262633,0.0017946,-0.098723,-0.013040,-0.000178,0.000093,37,O +2017-04-29,57872,0.034628,0.427532,0.4246052,0.0015522,-0.099092,-0.013308,-0.000168,0.000079,37,O +2017-04-30,57873,0.036275,0.429467,0.4231249,0.0014037,-0.099050,-0.013340,-0.000153,0.000080,37,O +2017-05-01,57874,0.037902,0.431334,0.4217257,0.0013892,-0.098757,-0.013239,-0.000139,0.000081,37,O +2017-05-02,57875,0.039389,0.432900,0.4203557,0.0013941,-0.098500,-0.013142,-0.000125,0.000082,37,O +2017-05-03,57876,0.040572,0.434223,0.4189708,0.0013856,-0.098682,-0.013020,-0.000210,0.000149,37,O +2017-05-04,57877,0.041577,0.435189,0.4175587,0.0014286,-0.098763,-0.012939,-0.000219,0.000209,37,O +2017-05-05,57878,0.043196,0.436527,0.4160970,0.0015356,-0.098454,-0.013051,-0.000119,0.000119,37,O +2017-05-06,57879,0.045141,0.437894,0.4145443,0.0016338,-0.098158,-0.013124,-0.000083,0.000097,37,O +2017-05-07,57880,0.047704,0.438989,0.4129179,0.0016287,-0.097972,-0.013099,-0.000080,0.000115,37,O +2017-05-08,57881,0.050056,0.440496,0.4113774,0.0015006,-0.097980,-0.012944,-0.000077,0.000133,37,O +2017-05-09,57882,0.051965,0.441775,0.4099350,0.0013823,-0.098174,-0.012704,-0.000074,0.000152,37,O +2017-05-10,57883,0.053989,0.443124,0.4085580,0.0013309,-0.098170,-0.012485,0.000032,0.000215,37,O +2017-05-11,57884,0.056190,0.444377,0.4072740,0.0012501,-0.098388,-0.012466,0.000030,0.000246,37,O +2017-05-12,57885,0.058581,0.445931,0.4060909,0.0011401,-0.098606,-0.012585,-0.000011,0.000263,37,O +2017-05-13,57886,0.060692,0.447295,0.4049824,0.0010663,-0.098751,-0.012722,-0.000053,0.000278,37,O +2017-05-14,57887,0.062928,0.448435,0.4039607,0.0010183,-0.098909,-0.012839,-0.000094,0.000292,37,O +2017-05-15,57888,0.064749,0.449370,0.4029798,0.0009724,-0.099160,-0.012974,-0.000136,0.000306,37,O +2017-05-16,57889,0.066769,0.449808,0.4019951,0.0010301,-0.099407,-0.013117,-0.000177,0.000320,37,O +2017-05-17,57890,0.068683,0.450261,0.4009243,0.0011089,-0.099015,-0.013204,-0.000062,0.000292,37,O +2017-05-18,57891,0.070545,0.450676,0.3997859,0.0011737,-0.098612,-0.013115,-0.000078,0.000258,37,O +2017-05-19,57892,0.072542,0.451760,0.3985764,0.0012451,-0.098339,-0.012928,-0.000157,0.000211,37,O +2017-05-20,57893,0.074412,0.452910,0.3972817,0.0013513,-0.098317,-0.012793,-0.000169,0.000180,37,O +2017-05-21,57894,0.076326,0.453653,0.3958681,0.0014966,-0.098676,-0.012792,-0.000153,0.000156,37,O +2017-05-22,57895,0.078346,0.454504,0.3942892,0.0016203,-0.099080,-0.012806,-0.000137,0.000131,37,O +2017-05-23,57896,0.079818,0.455090,0.3926231,0.0016921,-0.099274,-0.012717,-0.000121,0.000107,37,O +2017-05-24,57897,0.081147,0.455475,0.3909289,0.0016664,-0.099630,-0.012531,-0.000175,0.000186,37,O +2017-05-25,57898,0.082343,0.455649,0.3893134,0.0015630,-0.100072,-0.012615,-0.000170,0.000195,37,O +2017-05-26,57899,0.083957,0.455917,0.3878318,0.0013526,-0.100551,-0.012889,-0.000141,0.000175,37,O +2017-05-27,57900,0.085484,0.456291,0.3865631,0.0011527,-0.100791,-0.013081,-0.000124,0.000153,37,O +2017-05-28,57901,0.087442,0.456398,0.3854661,0.0010372,-0.100599,-0.013070,-0.000111,0.000130,37,O +2017-05-29,57902,0.089864,0.456519,0.3844115,0.0010581,-0.100141,-0.012983,-0.000098,0.000107,37,O +2017-05-30,57903,0.092119,0.457095,0.3832675,0.0011626,-0.099794,-0.012964,-0.000086,0.000084,37,O +2017-05-31,57904,0.094026,0.457366,0.3820383,0.0012646,-0.099845,-0.012988,-0.000073,0.000061,37,O +2017-06-01,57905,0.095973,0.457506,0.3807131,0.0013420,-0.100275,-0.012927,-0.000077,0.000087,37,O +2017-06-02,57906,0.097757,0.457787,0.3793404,0.0013639,-0.100654,-0.012844,-0.000086,0.000126,37,O +2017-06-03,57907,0.099567,0.458215,0.3779862,0.0013285,-0.100601,-0.012846,-0.000071,0.000133,37,O +2017-06-04,57908,0.101117,0.458581,0.3766834,0.0012553,-0.100285,-0.012875,-0.000047,0.000128,37,O +2017-06-05,57909,0.102695,0.458523,0.3754598,0.0011671,-0.100120,-0.012814,-0.000023,0.000124,37,O +2017-06-06,57910,0.103952,0.458428,0.3743504,0.0010432,-0.100298,-0.012649,0.000001,0.000119,37,O +2017-06-07,57911,0.105355,0.458308,0.3733798,0.0009034,-0.100662,-0.012506,0.000024,0.000114,37,O +2017-06-08,57912,0.106868,0.458048,0.3725887,0.0007231,-0.100749,-0.012450,0.000122,0.000166,37,O +2017-06-09,57913,0.108532,0.457811,0.3719481,0.0005379,-0.101163,-0.012560,0.000006,0.000178,37,O +2017-06-10,57914,0.109980,0.457484,0.3714596,0.0004535,-0.101252,-0.012669,-0.000034,0.000187,37,O +2017-06-11,57915,0.111451,0.457234,0.3710437,0.0004149,-0.101220,-0.012706,-0.000018,0.000201,37,O +2017-06-12,57916,0.112994,0.456975,0.3706514,0.0003977,-0.101320,-0.012736,-0.000003,0.000216,37,O +2017-06-13,57917,0.114578,0.457220,0.3702609,0.0003921,-0.101506,-0.012816,0.000013,0.000230,37,O +2017-06-14,57918,0.116272,0.457399,0.3698380,0.0004550,-0.101660,-0.012925,0.000003,0.000200,37,O +2017-06-15,57919,0.118300,0.457308,0.3693452,0.0005437,-0.101573,-0.012906,-0.000013,0.000158,37,O +2017-06-16,57920,0.120585,0.457118,0.3687665,0.0006577,-0.101300,-0.012694,-0.000014,0.000148,37,O +2017-06-17,57921,0.122593,0.456680,0.3680847,0.0007541,-0.101206,-0.012436,-0.000010,0.000149,37,O +2017-06-18,57922,0.124179,0.456211,0.3672999,0.0007959,-0.101507,-0.012276,-0.000005,0.000151,37,O +2017-06-19,57923,0.125730,0.455709,0.3664782,0.0008290,-0.102049,-0.012214,0.000000,0.000152,37,O +2017-06-20,57924,0.127862,0.455315,0.3656602,0.0008472,-0.102577,-0.012180,0.000004,0.000154,37,O +2017-06-21,57925,0.130457,0.454990,0.3648458,0.0008045,-0.103083,-0.012212,-0.000007,0.000149,37,O +2017-06-22,57926,0.133152,0.454762,0.3641273,0.0006638,-0.103618,-0.012383,-0.000023,0.000143,37,O +2017-06-23,57927,0.136000,0.454478,0.3635410,0.0004858,-0.104093,-0.012616,-0.000039,0.000138,37,O +2017-06-24,57928,0.138788,0.454113,0.3631326,0.0003972,-0.104262,-0.012698,-0.000038,0.000138,37,O +2017-06-25,57929,0.141007,0.454000,0.3627390,0.0003835,-0.104048,-0.012572,-0.000029,0.000141,37,O +2017-06-26,57930,0.143021,0.453452,0.3623006,0.0004419,-0.103592,-0.012432,-0.000021,0.000144,37,O +2017-06-27,57931,0.145147,0.452649,0.3618042,0.0005187,-0.103203,-0.012452,-0.000013,0.000147,37,O +2017-06-28,57932,0.147212,0.451658,0.3612434,0.0005636,-0.103314,-0.012506,-0.000041,0.000205,37,O +2017-06-29,57933,0.149572,0.450811,0.3606418,0.0005790,-0.103922,-0.012459,-0.000077,0.000278,37,O +2017-06-30,57934,0.152473,0.449903,0.3600727,0.0005539,-0.104371,-0.012396,-0.000003,0.000261,37,O +2017-07-01,57935,0.155696,0.449250,0.3595126,0.0005590,-0.104597,-0.012386,0.000023,0.000214,37,O +2017-07-02,57936,0.159025,0.448761,0.3589361,0.0005418,-0.104512,-0.012471,0.000017,0.000166,37,O +2017-07-03,57937,0.162254,0.448332,0.3584609,0.0004434,-0.104416,-0.012571,0.000011,0.000119,37,O +2017-07-04,57938,0.165708,0.447674,0.3581064,0.0003019,-0.104620,-0.012592,0.000006,0.000071,37,O +2017-07-05,57939,0.168962,0.447193,0.3578547,0.0002085,-0.105007,-0.012497,0.000018,0.000073,37,O +2017-07-06,57940,0.171987,0.446681,0.3576899,0.0001454,-0.105326,-0.012423,0.000036,0.000088,37,O +2017-07-07,57941,0.174976,0.445962,0.3575860,0.0000802,-0.105446,-0.012431,0.000053,0.000103,37,O +2017-07-08,57942,0.177786,0.445212,0.3575080,0.0000763,-0.105446,-0.012464,0.000062,0.000121,37,O +2017-07-09,57943,0.180221,0.444721,0.3574431,0.0000742,-0.105432,-0.012454,0.000067,0.000140,37,O +2017-07-10,57944,0.182001,0.443926,0.3573311,0.0001460,-0.105466,-0.012414,0.000072,0.000160,37,O +2017-07-11,57945,0.183758,0.442796,0.3571391,0.0002704,-0.105579,-0.012399,0.000078,0.000179,37,O +2017-07-12,57946,0.185216,0.441706,0.3568049,0.0004019,-0.105790,-0.012460,0.000071,0.000153,37,O +2017-07-13,57947,0.187119,0.440577,0.3563455,0.0005121,-0.105978,-0.012503,0.000062,0.000114,37,O +2017-07-14,57948,0.189361,0.439329,0.3557732,0.0005981,-0.106044,-0.012461,0.000053,0.000076,37,O +2017-07-15,57949,0.191161,0.438169,0.3551376,0.0006275,-0.105977,-0.012301,0.000069,0.000087,37,O +2017-07-16,57950,0.192339,0.436690,0.3545254,0.0005909,-0.106002,-0.012118,0.000095,0.000115,37,O +2017-07-17,57951,0.193490,0.435030,0.3539270,0.0005814,-0.106271,-0.011990,0.000121,0.000144,37,O +2017-07-18,57952,0.194733,0.433766,0.3533529,0.0005388,-0.106733,-0.011963,0.000147,0.000172,37,O +2017-07-19,57953,0.195900,0.432299,0.3528581,0.0004642,-0.107238,-0.012080,0.000173,0.000201,37,O +2017-07-20,57954,0.197066,0.430717,0.3524275,0.0003825,-0.107793,-0.012360,0.000140,0.000202,37,O +2017-07-21,57955,0.197923,0.428948,0.3520860,0.0003165,-0.108191,-0.012633,0.000091,0.000195,37,O +2017-07-22,57956,0.198629,0.426561,0.3518093,0.0002704,-0.108258,-0.012710,0.000078,0.000169,37,O +2017-07-23,57957,0.199930,0.424439,0.3515352,0.0002800,-0.108061,-0.012555,0.000078,0.000136,37,O +2017-07-24,57958,0.201761,0.422658,0.3512073,0.0003484,-0.107700,-0.012380,0.000078,0.000103,37,O +2017-07-25,57959,0.203423,0.421227,0.3507753,0.0004816,-0.107346,-0.012401,0.000078,0.000070,37,O +2017-07-26,57960,0.204802,0.419916,0.3501881,0.0005927,-0.107193,-0.012401,0.000107,0.000213,37,O +2017-07-27,57961,0.206134,0.418494,0.3495150,0.0006871,-0.107457,-0.012299,0.000144,0.000403,37,O +2017-07-28,57962,0.207107,0.416880,0.3488203,0.0006952,-0.108015,-0.012262,0.000167,0.000374,37,O +2017-07-29,57963,0.207742,0.415305,0.3481523,0.0006325,-0.108517,-0.012214,0.000159,0.000310,37,O +2017-07-30,57964,0.208296,0.413679,0.3475431,0.0005502,-0.108700,-0.012252,0.000142,0.000260,37,O +2017-07-31,57965,0.208825,0.411811,0.3470427,0.0004607,-0.108700,-0.012390,0.000125,0.000210,37,O +2017-08-01,57966,0.209835,0.409886,0.3466598,0.0003137,-0.108778,-0.012510,0.000108,0.000160,37,O +2017-08-02,57967,0.211398,0.408248,0.3464200,0.0001727,-0.108968,-0.012472,0.000100,0.000163,37,O +2017-08-03,57968,0.213291,0.406601,0.3462795,0.0000993,-0.109173,-0.012355,0.000095,0.000181,37,O +2017-08-04,57969,0.214709,0.405433,0.3462009,0.0000931,-0.109331,-0.012280,0.000090,0.000198,37,O +2017-08-05,57970,0.215447,0.404172,0.3461365,0.0001136,-0.109468,-0.012322,0.000083,0.000187,37,O +2017-08-06,57971,0.216162,0.402972,0.3459953,0.0001351,-0.109578,-0.012420,0.000075,0.000165,37,O +2017-08-07,57972,0.217134,0.401528,0.3458381,0.0001868,-0.109621,-0.012481,0.000066,0.000143,37,O +2017-08-08,57973,0.218544,0.399806,0.3456227,0.0002779,-0.109619,-0.012465,0.000058,0.000121,37,O +2017-08-09,57974,0.220136,0.398184,0.3452912,0.0004027,-0.109583,-0.012372,0.000094,0.000126,37,O +2017-08-10,57975,0.221888,0.396576,0.3448193,0.0005551,-0.109641,-0.012284,0.000142,0.000138,37,O +2017-08-11,57976,0.223520,0.394783,0.3441755,0.0006498,-0.109709,-0.012243,0.000189,0.000149,37,O +2017-08-12,57977,0.224272,0.393044,0.3435062,0.0006914,-0.109761,-0.012230,0.000187,0.000159,37,O +2017-08-13,57978,0.224896,0.391349,0.3428387,0.0006686,-0.109760,-0.012196,0.000166,0.000168,37,O +2017-08-14,57979,0.225434,0.389550,0.3422042,0.0005853,-0.109859,-0.012133,0.000146,0.000177,37,O +2017-08-15,57980,0.225504,0.387912,0.3416548,0.0004652,-0.110205,-0.012107,0.000125,0.000185,37,O +2017-08-16,57981,0.225102,0.385969,0.3412337,0.0003525,-0.110709,-0.012228,0.000105,0.000174,37,O +2017-08-17,57982,0.225340,0.383821,0.3409345,0.0002400,-0.111139,-0.012489,0.000085,0.000158,37,O +2017-08-18,57983,0.226326,0.381367,0.3407294,0.0002003,-0.111247,-0.012725,0.000091,0.000158,37,O +2017-08-19,57984,0.227537,0.379678,0.3405044,0.0002042,-0.111037,-0.012749,0.000119,0.000173,37,O +2017-08-20,57985,0.228598,0.378522,0.3403106,0.0002715,-0.110669,-0.012534,0.000150,0.000190,37,O +2017-08-21,57986,0.229558,0.377439,0.3399784,0.0004262,-0.110260,-0.012254,0.000181,0.000208,37,O +2017-08-22,57987,0.230232,0.375700,0.3394944,0.0005179,-0.109898,-0.012117,0.000212,0.000225,37,O +2017-08-23,57988,0.230696,0.373866,0.3390036,0.0005317,-0.109851,-0.012186,0.000182,0.000208,37,O +2017-08-24,57989,0.231049,0.371805,0.3384781,0.0005067,-0.110115,-0.012287,0.000135,0.000181,37,O +2017-08-25,57990,0.231829,0.369601,0.3379075,0.0004783,-0.110614,-0.012283,0.000088,0.000153,37,O +2017-08-26,57991,0.232957,0.367826,0.3374465,0.0004120,-0.111071,-0.012181,0.000072,0.000154,37,O +2017-08-27,57992,0.233753,0.366209,0.3370878,0.0003330,-0.111317,-0.012132,0.000066,0.000165,37,O +2017-08-28,57993,0.234245,0.364398,0.3367924,0.0002433,-0.111309,-0.012198,0.000060,0.000177,37,O +2017-08-29,57994,0.234844,0.362943,0.3365842,0.0001331,-0.111143,-0.012296,0.000055,0.000188,37,O +2017-08-30,57995,0.235156,0.361481,0.3364611,0.0000932,-0.110913,-0.012302,0.000074,0.000203,37,O +2017-08-31,57996,0.235394,0.359463,0.3363733,0.0001055,-0.110781,-0.012207,0.000099,0.000219,37,O +2017-09-01,57997,0.235563,0.357060,0.3362970,0.0001351,-0.110810,-0.012118,0.000123,0.000238,37,O +2017-09-02,57998,0.236028,0.355000,0.3361941,0.0001463,-0.110974,-0.012176,0.000139,0.000228,37,O +2017-09-03,57999,0.236808,0.353230,0.3360359,0.0002014,-0.111138,-0.012353,0.000152,0.000208,37,O +2017-09-04,58000,0.237536,0.351605,0.3357933,0.0003011,-0.111166,-0.012502,0.000165,0.000188,37,O +2017-09-05,58001,0.237920,0.350129,0.3353965,0.0004775,-0.111055,-0.012478,0.000177,0.000168,37,O +2017-09-06,58002,0.238534,0.348089,0.3348249,0.0006648,-0.110928,-0.012265,0.000190,0.000149,37,O +2017-09-07,58003,0.239949,0.346217,0.3340654,0.0008328,-0.111002,-0.011981,0.000166,0.000156,37,O +2017-09-08,58004,0.241033,0.344387,0.3331719,0.0009041,-0.111199,-0.011820,0.000131,0.000170,37,O +2017-09-09,58005,0.241460,0.342815,0.3322438,0.0009404,-0.111301,-0.011889,0.000128,0.000143,37,O +2017-09-10,58006,0.241406,0.341734,0.3312789,0.0009249,-0.111304,-0.012065,0.000137,0.000101,37,O +2017-09-11,58007,0.241149,0.340693,0.3303711,0.0008592,-0.111308,-0.012193,0.000145,0.000059,37,O +2017-09-12,58008,0.240712,0.339184,0.3295699,0.0007488,-0.111412,-0.012229,0.000154,0.000017,37,O +2017-09-13,58009,0.239490,0.337433,0.3289039,0.0006369,-0.111625,-0.012177,0.000161,0.000050,37,O +2017-09-14,58010,0.237894,0.335801,0.3283142,0.0005645,-0.111775,-0.012170,0.000180,0.000106,37,O +2017-09-15,58011,0.236997,0.334277,0.3277308,0.0005783,-0.111734,-0.012205,0.000194,0.000161,37,O +2017-09-16,58012,0.236151,0.333110,0.3271296,0.0006602,-0.111452,-0.012204,0.000201,0.000178,37,O +2017-09-17,58013,0.235437,0.331475,0.3263790,0.0008362,-0.111028,-0.012076,0.000206,0.000181,37,O +2017-09-18,58014,0.234932,0.329981,0.3254469,0.0010116,-0.110641,-0.011871,0.000210,0.000184,37,O +2017-09-19,58015,0.234376,0.328251,0.3243832,0.0010991,-0.110403,-0.011712,0.000215,0.000187,37,O +2017-09-20,58016,0.233504,0.326435,0.3232856,0.0011158,-0.110345,-0.011669,0.000210,0.000174,37,O +2017-09-21,58017,0.232368,0.324511,0.3221774,0.0010613,-0.110402,-0.011680,0.000202,0.000156,37,O +2017-09-22,58018,0.231480,0.322598,0.3211052,0.0009977,-0.110531,-0.011667,0.000193,0.000139,37,O +2017-09-23,58019,0.230275,0.320849,0.3201659,0.0009103,-0.110645,-0.011605,0.000203,0.000156,37,O +2017-09-24,58020,0.229146,0.318541,0.3193171,0.0008010,-0.110721,-0.011569,0.000200,0.000203,37,O +2017-09-25,58021,0.228437,0.316331,0.3186011,0.0006364,-0.110584,-0.011619,0.000198,0.000251,37,O +2017-09-26,58022,0.227384,0.314024,0.3180127,0.0005399,-0.110208,-0.011696,0.000196,0.000298,37,O +2017-09-27,58023,0.226738,0.311756,0.3174763,0.0005185,-0.109740,-0.011786,0.000205,0.000263,37,O +2017-09-28,58024,0.226108,0.309713,0.3169636,0.0005437,-0.109456,-0.011803,0.000217,0.000206,37,O +2017-09-29,58025,0.225592,0.307796,0.3163823,0.0006093,-0.109459,-0.011798,0.000229,0.000149,37,O +2017-09-30,58026,0.224857,0.305629,0.3157773,0.0006513,-0.109606,-0.011833,0.000245,0.000127,37,O +2017-10-01,58027,0.224071,0.303037,0.3151520,0.0006489,-0.109694,-0.011949,0.000262,0.000118,37,O +2017-10-02,58028,0.222819,0.300646,0.3145029,0.0006786,-0.109641,-0.012054,0.000279,0.000109,37,O +2017-10-03,58029,0.222129,0.298414,0.3137523,0.0008123,-0.109497,-0.011994,0.000296,0.000100,37,O +2017-10-04,58030,0.221797,0.296685,0.3128743,0.0009580,-0.109380,-0.011702,0.000296,0.000093,37,O +2017-10-05,58031,0.221944,0.294777,0.3118597,0.0010656,-0.109286,-0.011301,0.000292,0.000087,37,O +2017-10-06,58032,0.221694,0.293830,0.3107083,0.0011534,-0.109232,-0.011030,0.000288,0.000080,37,O +2017-10-07,58033,0.220172,0.293025,0.3095429,0.0011747,-0.109284,-0.011048,0.000273,0.000076,37,O +2017-10-08,58034,0.218361,0.292105,0.3084078,0.0011144,-0.109435,-0.011289,0.000254,0.000074,37,O +2017-10-09,58035,0.216190,0.290860,0.3073780,0.0009523,-0.109627,-0.011518,0.000235,0.000072,37,O +2017-10-10,58036,0.214075,0.289134,0.3064886,0.0008137,-0.109804,-0.011554,0.000216,0.000070,37,O +2017-10-11,58037,0.212230,0.287377,0.3057000,0.0007520,-0.109936,-0.011426,0.000197,0.000067,37,O +2017-10-12,58038,0.210250,0.285371,0.3049588,0.0007432,-0.109951,-0.011273,0.000199,0.000078,37,O +2017-10-13,58039,0.208688,0.283429,0.3041878,0.0008181,-0.109838,-0.011200,0.000207,0.000092,37,O +2017-10-14,58040,0.207152,0.281526,0.3033061,0.0009286,-0.109586,-0.011195,0.000206,0.000095,37,O +2017-10-15,58041,0.205699,0.279734,0.3023366,0.0010431,-0.109222,-0.011181,0.000198,0.000094,37,O +2017-10-16,58042,0.204789,0.278139,0.3012098,0.0012003,-0.108866,-0.011129,0.000192,0.000093,37,O +2017-10-17,58043,0.203852,0.276870,0.2999400,0.0013201,-0.108676,-0.011055,0.000186,0.000093,37,O +2017-10-18,58044,0.202570,0.275423,0.2985802,0.0013856,-0.108627,-0.010958,0.000195,0.000105,37,O +2017-10-19,58045,0.201228,0.273719,0.2971914,0.0013915,-0.108620,-0.010839,0.000209,0.000122,37,O +2017-10-20,58046,0.199944,0.272093,0.2958171,0.0013185,-0.108560,-0.010722,0.000222,0.000138,37,O +2017-10-21,58047,0.198720,0.270643,0.2945597,0.0011990,-0.108436,-0.010697,0.000236,0.000118,37,O +2017-10-22,58048,0.197301,0.269564,0.2933902,0.0011196,-0.108256,-0.010781,0.000250,0.000085,37,O +2017-10-23,58049,0.196020,0.268412,0.2923027,0.0010418,-0.107946,-0.010932,0.000264,0.000052,37,O +2017-10-24,58050,0.194584,0.266918,0.2913105,0.0009175,-0.107458,-0.011069,0.000278,0.000019,37,O +2017-10-25,58051,0.192750,0.265653,0.2904360,0.0008474,-0.106940,-0.011068,0.000294,0.000049,37,O +2017-10-26,58052,0.190522,0.264053,0.2896147,0.0008123,-0.106651,-0.010978,0.000311,0.000095,37,O +2017-10-27,58053,0.188640,0.262493,0.2887939,0.0008334,-0.106665,-0.010857,0.000327,0.000141,37,O +2017-10-28,58054,0.186601,0.261204,0.2879459,0.0008936,-0.106791,-0.010783,0.000328,0.000145,37,O +2017-10-29,58055,0.184638,0.259903,0.2869850,0.0010265,-0.106765,-0.010742,0.000324,0.000134,37,O +2017-10-30,58056,0.183111,0.258826,0.2859308,0.0011120,-0.106605,-0.010698,0.000319,0.000122,37,O +2017-10-31,58057,0.181829,0.257809,0.2847593,0.0012724,-0.106504,-0.010595,0.000314,0.000111,37,O +2017-11-01,58058,0.180296,0.256856,0.2834260,0.0013777,-0.106511,-0.010381,0.000305,0.000085,37,O +2017-11-02,58059,0.179139,0.255937,0.2819666,0.0014899,-0.106480,-0.010059,0.000295,0.000055,37,O +2017-11-03,58060,0.178168,0.255529,0.2804309,0.0015674,-0.106352,-0.009789,0.000285,0.000025,37,O +2017-11-04,58061,0.176819,0.255000,0.2788424,0.0015059,-0.106193,-0.009737,0.000300,0.000038,37,O +2017-11-05,58062,0.175227,0.254016,0.2773391,0.0014047,-0.106151,-0.009947,0.000325,0.000066,37,O +2017-11-06,58063,0.173465,0.252887,0.2760567,0.0012567,-0.106207,-0.010183,0.000349,0.000094,37,O +2017-11-07,58064,0.171798,0.251605,0.2749413,0.0010899,-0.106245,-0.010180,0.000373,0.000122,37,O +2017-11-08,58065,0.170596,0.250256,0.2738988,0.0010311,-0.106304,-0.009967,0.000359,0.000124,37,O +2017-11-09,58066,0.169120,0.249358,0.2728644,0.0010728,-0.106318,-0.009745,0.000335,0.000118,37,O +2017-11-10,58067,0.167646,0.247946,0.2717606,0.0011765,-0.106284,-0.009663,0.000311,0.000112,37,O +2017-11-11,58068,0.166396,0.246848,0.2705042,0.0013010,-0.106208,-0.009703,0.000289,0.000098,37,O +2017-11-12,58069,0.164923,0.246174,0.2691669,0.0013675,-0.106087,-0.009771,0.000268,0.000080,37,O +2017-11-13,58070,0.163368,0.245937,0.2677576,0.0014516,-0.105934,-0.009828,0.000248,0.000062,37,O +2017-11-14,58071,0.161570,0.245403,0.2663008,0.0015009,-0.105831,-0.009872,0.000227,0.000044,37,O +2017-11-15,58072,0.160062,0.244625,0.2648310,0.0014389,-0.105745,-0.009873,0.000248,0.000016,37,O +2017-11-16,58073,0.158441,0.244147,0.2634238,0.0013377,-0.105720,-0.009790,0.000281,-0.000015,37,O +2017-11-17,58074,0.156031,0.243545,0.2621434,0.0012121,-0.105676,-0.009662,0.000313,-0.000047,37,O +2017-11-18,58075,0.153245,0.242360,0.2610143,0.0010708,-0.105640,-0.009564,0.000304,-0.000041,37,O +2017-11-19,58076,0.150733,0.241508,0.2599935,0.0009289,-0.105541,-0.009588,0.000280,-0.000022,37,O +2017-11-20,58077,0.148216,0.240689,0.2591342,0.0007991,-0.105337,-0.009688,0.000256,-0.000004,37,O +2017-11-21,58078,0.145643,0.239916,0.2584099,0.0006741,-0.105037,-0.009744,0.000232,0.000015,37,O +2017-11-22,58079,0.143796,0.239140,0.2577664,0.0005958,-0.104627,-0.009741,0.000261,0.000004,37,O +2017-11-23,58080,0.141993,0.238659,0.2571255,0.0006479,-0.104462,-0.009692,0.000276,-0.000006,37,O +2017-11-24,58081,0.139593,0.238267,0.2564500,0.0007206,-0.104560,-0.009642,0.000280,-0.000013,37,O +2017-11-25,58082,0.136821,0.237907,0.2557083,0.0008135,-0.104678,-0.009569,0.000280,-0.000019,37,O +2017-11-26,58083,0.135302,0.237390,0.2548803,0.0008983,-0.104574,-0.009444,0.000284,-0.000026,37,O +2017-11-27,58084,0.133543,0.237050,0.2539082,0.0010037,-0.104348,-0.009298,0.000287,-0.000032,37,O +2017-11-28,58085,0.131125,0.236745,0.2527766,0.0011990,-0.104274,-0.009217,0.000286,-0.000061,37,O +2017-11-29,58086,0.128797,0.236939,0.2514787,0.0013712,-0.104158,-0.009158,0.000374,-0.000093,37,O +2017-11-30,58087,0.126354,0.237180,0.2500223,0.0014800,-0.104223,-0.008989,0.000372,-0.000094,37,O +2017-12-01,58088,0.124093,0.236688,0.2485146,0.0015526,-0.104224,-0.008714,0.000337,-0.000066,37,O +2017-12-02,58089,0.121669,0.236396,0.2469845,0.0014888,-0.104242,-0.008589,0.000307,-0.000074,37,O +2017-12-03,58090,0.119232,0.235541,0.2455790,0.0013598,-0.104436,-0.008739,0.000271,-0.000103,37,O +2017-12-04,58091,0.116892,0.234876,0.2442675,0.0012433,-0.104661,-0.008966,0.000233,-0.000115,37,O +2017-12-05,58092,0.114703,0.233893,0.2430519,0.0011899,-0.104582,-0.008969,0.000254,-0.000106,37,O +2017-12-06,58093,0.112573,0.233274,0.2418883,0.0012004,-0.104340,-0.008726,0.000274,-0.000097,37,O +2017-12-07,58094,0.109471,0.233507,0.2406610,0.0012285,-0.104033,-0.008487,0.000295,-0.000088,37,O +2017-12-08,58095,0.106820,0.233390,0.2393921,0.0013084,-0.103786,-0.008449,0.000304,-0.000089,37,O +2017-12-09,58096,0.104779,0.233975,0.2380590,0.0014075,-0.103678,-0.008532,0.000302,-0.000101,37,O +2017-12-10,58097,0.102552,0.234646,0.2366194,0.0014623,-0.103667,-0.008557,0.000313,-0.000101,37,O +2017-12-11,58098,0.100164,0.235436,0.2351531,0.0014388,-0.103650,-0.008519,0.000335,-0.000089,37,O +2017-12-12,58099,0.097687,0.236146,0.2337292,0.0013979,-0.103587,-0.008521,0.000346,-0.000078,37,O +2017-12-13,58100,0.095346,0.236563,0.2323789,0.0012996,-0.103545,-0.008559,0.000346,-0.000066,37,O +2017-12-14,58101,0.092869,0.237048,0.2311805,0.0011260,-0.103622,-0.008547,0.000346,-0.000055,37,O +2017-12-15,58102,0.090256,0.237578,0.2301449,0.0009664,-0.104133,-0.008469,0.000212,-0.000057,37,O +2017-12-16,58103,0.087663,0.238079,0.2292828,0.0008096,-0.104257,-0.008405,0.000210,-0.000061,37,O +2017-12-17,58104,0.084775,0.238599,0.2285224,0.0006581,-0.104213,-0.008449,0.000208,-0.000064,37,O +2017-12-18,58105,0.081905,0.239044,0.2279421,0.0005536,-0.103920,-0.008560,0.000243,-0.000055,37,O +2017-12-19,58106,0.078820,0.239525,0.2274388,0.0005109,-0.103727,-0.008650,0.000210,-0.000069,37,O +2017-12-20,58107,0.075952,0.239470,0.2269498,0.0005232,-0.103530,-0.008628,0.000194,-0.000068,37,O +2017-12-21,58108,0.073645,0.238795,0.2263773,0.0005487,-0.103465,-0.008572,0.000182,-0.000062,37,O +2017-12-22,58109,0.071910,0.238294,0.2258219,0.0005620,-0.103561,-0.008558,0.000170,-0.000057,37,O +2017-12-23,58110,0.070537,0.238466,0.2252380,0.0006447,-0.103698,-0.008551,0.000158,-0.000051,37,O +2017-12-24,58111,0.069324,0.239063,0.2245258,0.0007923,-0.103729,-0.008483,0.000146,-0.000046,37,O +2017-12-25,58112,0.068299,0.239814,0.2236718,0.0009227,-0.103681,-0.008368,0.000134,-0.000040,37,O +2017-12-26,58113,0.067657,0.240686,0.2226951,0.0010303,-0.103721,-0.008311,0.000123,-0.000035,37,O +2017-12-27,58114,0.067318,0.241626,0.2216122,0.0011376,-0.103879,-0.008338,0.000111,-0.000029,37,O +2017-12-28,58115,0.066650,0.243120,0.2204482,0.0011573,-0.103936,-0.008136,0.000120,0.000161,37,O +2017-12-29,58116,0.064878,0.244392,0.2192942,0.0011094,-0.104003,-0.008100,0.000092,0.000031,37,O +2017-12-30,58117,0.063071,0.245448,0.2182464,0.0010466,-0.104182,-0.007948,0.000086,-0.000018,37,O +2017-12-31,58118,0.061214,0.246580,0.2172353,0.0009457,-0.104640,-0.007939,0.000090,-0.000022,37,O +2018-01-01,58119,0.059224,0.247646,0.2163654,0.0008241,-0.104830,-0.008240,0.000207,-0.000160,37,O +2018-01-02,58120,0.057406,0.248566,0.2156078,0.0007355,-0.104920,-0.008348,0.000208,-0.000188,37,O +2018-01-03,58121,0.055667,0.249547,0.2148691,0.0007464,-0.104527,-0.008241,0.000209,-0.000215,37,O +2018-01-04,58122,0.054388,0.250409,0.2140616,0.0008484,-0.103785,-0.008056,0.000249,-0.000192,37,O +2018-01-05,58123,0.053497,0.251568,0.2131861,0.0008848,-0.103061,-0.008026,0.000300,-0.000157,37,O +2018-01-06,58124,0.052593,0.252938,0.2122905,0.0008868,-0.102711,-0.008109,0.000312,-0.000156,37,O +2018-01-07,58125,0.050970,0.254226,0.2114201,0.0008519,-0.102756,-0.008078,0.000309,-0.000167,37,O +2018-01-08,58126,0.049223,0.255002,0.2106218,0.0007565,-0.102991,-0.007917,0.000307,-0.000179,37,O +2018-01-09,58127,0.047987,0.255808,0.2099302,0.0006126,-0.103161,-0.007814,0.000304,-0.000191,37,O +2018-01-10,58128,0.046686,0.257130,0.2093475,0.0005072,-0.103295,-0.007867,0.000274,-0.000188,37,O +2018-01-11,58129,0.045008,0.258580,0.2088731,0.0004246,-0.103520,-0.008005,0.000236,-0.000181,37,O +2018-01-12,58130,0.043355,0.259855,0.2085075,0.0003018,-0.103884,-0.008103,0.000198,-0.000174,37,O +2018-01-13,58131,0.041402,0.260606,0.2082775,0.0001676,-0.104168,-0.008165,0.000174,-0.000184,37,O +2018-01-14,58132,0.039860,0.260774,0.2081607,0.0000794,-0.104193,-0.008253,0.000155,-0.000199,37,O +2018-01-15,58133,0.038639,0.261182,0.2081094,0.0000335,-0.103991,-0.008384,0.000136,-0.000215,37,O +2018-01-16,58134,0.037810,0.261913,0.2080798,0.0000282,-0.103728,-0.008484,0.000117,-0.000230,37,O +2018-01-17,58135,0.037169,0.263221,0.2080186,0.0000780,-0.103399,-0.008477,0.000150,-0.000225,37,O +2018-01-18,58136,0.036146,0.264989,0.2078912,0.0001477,-0.103126,-0.008418,0.000197,-0.000214,37,O +2018-01-19,58137,0.034752,0.266831,0.2076636,0.0002862,-0.102951,-0.008394,0.000245,-0.000203,37,O +2018-01-20,58138,0.032747,0.268633,0.2073080,0.0004294,-0.102985,-0.008422,0.000252,-0.000199,37,O +2018-01-21,58139,0.030561,0.270346,0.2067994,0.0005816,-0.103123,-0.008449,0.000245,-0.000198,37,O +2018-01-22,58140,0.028676,0.272068,0.2061278,0.0007363,-0.103265,-0.008452,0.000238,-0.000196,37,O +2018-01-23,58141,0.027384,0.273712,0.2053153,0.0008662,-0.103382,-0.008479,0.000231,-0.000195,37,O +2018-01-24,58142,0.026021,0.275528,0.2044009,0.0009243,-0.103507,-0.008570,0.000209,-0.000212,37,O +2018-01-25,58143,0.024129,0.277399,0.2034218,0.0009929,-0.103584,-0.008638,0.000184,-0.000233,37,O +2018-01-26,58144,0.022368,0.279079,0.2024259,0.0010030,-0.103671,-0.008590,0.000158,-0.000254,37,O +2018-01-27,58145,0.020849,0.280621,0.2014710,0.0009578,-0.103904,-0.008471,0.000161,-0.000255,37,O +2018-01-28,58146,0.019338,0.281805,0.2005689,0.0008831,-0.104442,-0.008465,0.000175,-0.000247,37,O +2018-01-29,58147,0.018277,0.282895,0.1996857,0.0008961,-0.105068,-0.008630,0.000188,-0.000239,37,O +2018-01-30,58148,0.017699,0.284465,0.1987616,0.0009826,-0.105329,-0.008791,0.000201,-0.000232,37,O +2018-01-31,58149,0.016664,0.286211,0.1977227,0.0011157,-0.105103,-0.008826,0.000173,-0.000248,37,O +2018-02-01,58150,0.015367,0.288248,0.1965069,0.0012990,-0.104483,-0.008809,0.000134,-0.000270,37,O +2018-02-02,58151,0.014067,0.290203,0.1950929,0.0015264,-0.103812,-0.008900,0.000094,-0.000292,37,O +2018-02-03,58152,0.012458,0.291691,0.1935028,0.0016713,-0.103351,-0.009034,0.000085,-0.000296,37,O +2018-02-04,58153,0.010601,0.293313,0.1918164,0.0016883,-0.103308,-0.009019,0.000087,-0.000294,37,O +2018-02-05,58154,0.008260,0.295375,0.1901389,0.0016217,-0.103585,-0.008806,0.000089,-0.000291,37,O +2018-02-06,58155,0.006624,0.296675,0.1885561,0.0014783,-0.103904,-0.008589,0.000091,-0.000289,37,O +2018-02-07,58156,0.006188,0.297813,0.1871202,0.0013497,-0.104131,-0.008559,0.000093,-0.000272,37,O +2018-02-08,58157,0.005592,0.299623,0.1858660,0.0011840,-0.104357,-0.008730,0.000095,-0.000252,37,O +2018-02-09,58158,0.004664,0.301372,0.1847954,0.0009818,-0.104632,-0.008951,0.000097,-0.000231,37,O +2018-02-10,58159,0.004091,0.303167,0.1839041,0.0008318,-0.104757,-0.009131,0.000109,-0.000242,37,O +2018-02-11,58160,0.003494,0.305155,0.1831267,0.0007473,-0.104559,-0.009253,0.000124,-0.000265,37,O +2018-02-12,58161,0.003276,0.307207,0.1823799,0.0007322,-0.104107,-0.009357,0.000138,-0.000288,37,O +2018-02-13,58162,0.002984,0.309331,0.1816279,0.0007615,-0.103642,-0.009446,0.000153,-0.000311,37,O +2018-02-14,58163,0.002565,0.311263,0.1808512,0.0007852,-0.103368,-0.009454,0.000149,-0.000308,37,O +2018-02-15,58164,0.001884,0.313278,0.1800285,0.0008537,-0.103219,-0.009383,0.000140,-0.000297,37,O +2018-02-16,58165,0.001348,0.315040,0.1791409,0.0009340,-0.103126,-0.009287,0.000130,-0.000287,37,O +2018-02-17,58166,0.001023,0.316434,0.1781745,0.0010498,-0.103112,-0.009237,0.000127,-0.000285,37,O +2018-02-18,58167,0.000643,0.317986,0.1771163,0.0011086,-0.103236,-0.009264,0.000125,-0.000286,37,O +2018-02-19,58168,0.000907,0.319569,0.1759756,0.0011378,-0.103422,-0.009362,0.000124,-0.000287,37,O +2018-02-20,58169,0.001162,0.321719,0.1747959,0.0011246,-0.103544,-0.009499,0.000122,-0.000288,37,O +2018-02-21,58170,0.002029,0.324307,0.1736372,0.0011258,-0.103588,-0.009618,0.000113,-0.000286,37,O +2018-02-22,58171,0.002404,0.327028,0.1725392,0.0010527,-0.103624,-0.009676,0.000102,-0.000283,37,O +2018-02-23,58172,0.002546,0.329196,0.1715292,0.0009602,-0.103731,-0.009674,0.000091,-0.000280,37,O +2018-02-24,58173,0.002346,0.331737,0.1706169,0.0008620,-0.103928,-0.009675,0.000084,-0.000267,37,O +2018-02-25,58174,0.001950,0.333862,0.1697908,0.0007958,-0.104175,-0.009768,0.000080,-0.000251,37,O +2018-02-26,58175,0.001248,0.336065,0.1690150,0.0007669,-0.104370,-0.009944,0.000075,-0.000234,37,O +2018-02-27,58176,0.000269,0.337967,0.1682352,0.0008250,-0.104374,-0.010082,0.000071,-0.000217,37,O +2018-02-28,58177,-0.000516,0.339621,0.1673848,0.0009292,-0.104135,-0.010152,0.000065,-0.000248,37,O +2018-03-01,58178,-0.000331,0.341456,0.1664040,0.0010315,-0.103717,-0.010206,0.000060,-0.000292,37,O +2018-03-02,58179,0.001126,0.343708,0.1652728,0.0011896,-0.103285,-0.010366,0.000054,-0.000336,37,O +2018-03-03,58180,0.002712,0.346327,0.1640424,0.0012725,-0.102932,-0.010534,0.000077,-0.000301,37,O +2018-03-04,58181,0.003975,0.349010,0.1627918,0.0012376,-0.102798,-0.010579,0.000112,-0.000236,37,O +2018-03-05,58182,0.005332,0.351687,0.1615893,0.0011401,-0.102888,-0.010416,0.000147,-0.000172,37,O +2018-03-06,58183,0.006531,0.354263,0.1604864,0.0009967,-0.103085,-0.010146,0.000182,-0.000107,37,O +2018-03-07,58184,0.007274,0.356696,0.1594963,0.0009130,-0.103472,-0.010060,0.000149,-0.000118,37,O +2018-03-08,58185,0.007637,0.358777,0.1586161,0.0008357,-0.103902,-0.010203,0.000098,-0.000150,37,O +2018-03-09,58186,0.007944,0.360408,0.1578248,0.0007524,-0.104271,-0.010463,0.000047,-0.000181,37,O +2018-03-10,58187,0.008378,0.361611,0.1570935,0.0006874,-0.104345,-0.010670,0.000025,-0.000192,37,O +2018-03-11,58188,0.009615,0.362571,0.1563865,0.0006912,-0.104047,-0.010771,0.000014,-0.000197,37,O +2018-03-12,58189,0.011419,0.363948,0.1556864,0.0007115,-0.103516,-0.010809,0.000003,-0.000201,37,O +2018-03-13,58190,0.012950,0.365561,0.1549527,0.0007747,-0.103023,-0.010837,-0.000007,-0.000205,37,O +2018-03-14,58191,0.013959,0.367340,0.1541281,0.0008772,-0.102770,-0.010882,-0.000023,-0.000243,37,O +2018-03-15,58192,0.014539,0.369281,0.1532194,0.0009668,-0.102711,-0.010869,-0.000040,-0.000291,37,O +2018-03-16,58193,0.014779,0.371257,0.1522313,0.0010444,-0.102716,-0.010771,-0.000056,-0.000339,37,O +2018-03-17,58194,0.014886,0.373052,0.1511761,0.0011224,-0.102691,-0.010595,-0.000050,-0.000324,37,O +2018-03-18,58195,0.015019,0.374488,0.1500468,0.0011740,-0.102694,-0.010497,-0.000034,-0.000284,37,O +2018-03-19,58196,0.015609,0.375890,0.1488428,0.0012189,-0.102742,-0.010574,-0.000018,-0.000245,37,O +2018-03-20,58197,0.016813,0.377449,0.1475917,0.0012435,-0.102786,-0.010776,-0.000002,-0.000205,37,O +2018-03-21,58198,0.017650,0.378784,0.1463366,0.0012241,-0.102871,-0.011001,-0.000004,-0.000191,37,O +2018-03-22,58199,0.019086,0.379665,0.1451449,0.0011419,-0.103031,-0.011120,-0.000011,-0.000184,37,O +2018-03-23,58200,0.020817,0.381008,0.1440622,0.0010292,-0.103270,-0.011130,-0.000018,-0.000177,37,O +2018-03-24,58201,0.022159,0.382614,0.1430972,0.0009171,-0.103469,-0.011135,-0.000024,-0.000175,37,O +2018-03-25,58202,0.023438,0.384261,0.1422092,0.0008399,-0.103448,-0.011210,-0.000029,-0.000176,37,O +2018-03-26,58203,0.024380,0.385508,0.1413379,0.0008807,-0.103137,-0.011325,-0.000034,-0.000176,37,O +2018-03-27,58204,0.025665,0.386420,0.1404065,0.0010139,-0.102654,-0.011387,-0.000039,-0.000176,37,O +2018-03-28,58205,0.026966,0.387391,0.1393347,0.0011568,-0.102119,-0.011348,-0.000002,-0.000167,37,O +2018-03-29,58206,0.028097,0.388998,0.1381541,0.0012561,-0.101870,-0.011300,0.000010,-0.000156,37,O +2018-03-30,58207,0.029413,0.390776,0.1368509,0.0013371,-0.101883,-0.011355,0.000009,-0.000145,37,O +2018-03-31,58208,0.031024,0.392661,0.1354288,0.0013923,-0.102007,-0.011517,0.000008,-0.000135,37,O +2018-04-01,58209,0.032262,0.394493,0.1340372,0.0013722,-0.102118,-0.011650,0.000007,-0.000124,37,O +2018-04-02,58210,0.033078,0.396270,0.1327228,0.0012839,-0.102198,-0.011633,0.000006,-0.000114,37,O +2018-04-03,58211,0.033726,0.398187,0.1315290,0.0011210,-0.102323,-0.011487,0.000005,-0.000103,37,O +2018-04-04,58212,0.034053,0.400233,0.1304899,0.0009570,-0.102561,-0.011362,0.000004,-0.000093,37,O +2018-04-05,58213,0.034315,0.402096,0.1296118,0.0007920,-0.102921,-0.011404,-0.000018,-0.000109,37,O +2018-04-06,58214,0.034383,0.403888,0.1288635,0.0006835,-0.103213,-0.011580,-0.000045,-0.000132,37,O +2018-04-07,58215,0.034304,0.405470,0.1281968,0.0006690,-0.103185,-0.011760,-0.000039,-0.000140,37,O +2018-04-08,58216,0.034814,0.407120,0.1275568,0.0006626,-0.102837,-0.011866,-0.000021,-0.000142,37,O +2018-04-09,58217,0.035585,0.408611,0.1268920,0.0006681,-0.102293,-0.011899,-0.000003,-0.000143,37,O +2018-04-10,58218,0.036758,0.410135,0.1261868,0.0006805,-0.101753,-0.011908,0.000015,-0.000145,37,O +2018-04-11,58219,0.037937,0.411910,0.1254467,0.0007539,-0.101474,-0.011894,0.000006,-0.000131,37,O +2018-04-12,58220,0.038729,0.413822,0.1246552,0.0008512,-0.101479,-0.011833,-0.000010,-0.000114,37,O +2018-04-13,58221,0.038891,0.415750,0.1237615,0.0009701,-0.101673,-0.011688,-0.000026,-0.000096,37,O +2018-04-14,58222,0.039901,0.417161,0.1227404,0.0011177,-0.101835,-0.011482,-0.000020,-0.000076,37,O +2018-04-15,58223,0.041810,0.418839,0.1215701,0.0012640,-0.101878,-0.011328,-0.000005,-0.000054,37,O +2018-04-16,58224,0.044022,0.420295,0.1202380,0.0013772,-0.101848,-0.011352,0.000009,-0.000032,37,O +2018-04-17,58225,0.045901,0.421593,0.1188655,0.0013269,-0.101868,-0.011583,0.000024,-0.000011,37,O +2018-04-18,58226,0.047414,0.422322,0.1176157,0.0011790,-0.102167,-0.011913,-0.000014,-0.000003,37,O +2018-04-19,58227,0.049409,0.423167,0.1164865,0.0010522,-0.102611,-0.012144,-0.000065,0.000001,37,O +2018-04-20,58228,0.051700,0.424507,0.1154525,0.0009750,-0.103044,-0.012168,-0.000117,0.000005,37,O +2018-04-21,58229,0.053949,0.426011,0.1144821,0.0009481,-0.103168,-0.012076,-0.000104,-0.000020,37,O +2018-04-22,58230,0.056126,0.427544,0.1135260,0.0009773,-0.102994,-0.011994,-0.000067,-0.000056,37,O +2018-04-23,58231,0.057956,0.429171,0.1125234,0.0010753,-0.102557,-0.011988,-0.000030,-0.000091,37,O +2018-04-24,58232,0.059869,0.430738,0.1113951,0.0012418,-0.101945,-0.012029,0.000006,-0.000127,37,O +2018-04-25,58233,0.061417,0.432190,0.1100992,0.0013921,-0.101570,-0.011985,-0.000039,-0.000087,37,O +2018-04-26,58234,0.062620,0.433033,0.1086636,0.0014991,-0.101517,-0.011913,-0.000106,-0.000028,37,O +2018-04-27,58235,0.063635,0.433952,0.1071450,0.0015208,-0.101825,-0.011863,-0.000174,0.000032,37,O +2018-04-28,58236,0.064945,0.434755,0.1055951,0.0015117,-0.102197,-0.011971,-0.000182,-0.000043,37,O +2018-04-29,58237,0.066326,0.435745,0.1041191,0.0014257,-0.102473,-0.012106,-0.000168,-0.000169,37,O +2018-04-30,58238,0.067601,0.436689,0.1028034,0.0012537,-0.102574,-0.012184,-0.000155,-0.000296,37,O +2018-05-01,58239,0.068765,0.437662,0.1016513,0.0010894,-0.102627,-0.012075,-0.000158,-0.000265,37,O +2018-05-02,58240,0.069520,0.438837,0.1006354,0.0009498,-0.102758,-0.011969,-0.000165,-0.000193,37,O +2018-05-03,58241,0.070349,0.439382,0.0997424,0.0008206,-0.102980,-0.011953,-0.000173,-0.000121,37,O +2018-05-04,58242,0.071442,0.439846,0.0989734,0.0007079,-0.103050,-0.012052,-0.000134,-0.000093,37,O +2018-05-05,58243,0.072190,0.440340,0.0982642,0.0006546,-0.102994,-0.012202,-0.000099,-0.000101,37,O +2018-05-06,58244,0.073183,0.441116,0.0976011,0.0006706,-0.102802,-0.012330,-0.000070,-0.000117,37,O +2018-05-07,58245,0.074056,0.441974,0.0969513,0.0006702,-0.102481,-0.012408,-0.000042,-0.000133,37,O +2018-05-08,58246,0.075289,0.442794,0.0962777,0.0007266,-0.102055,-0.012434,-0.000014,-0.000149,37,O +2018-05-09,58247,0.076503,0.443814,0.0955178,0.0008166,-0.101656,-0.012417,0.000014,-0.000165,37,O +2018-05-10,58248,0.077859,0.444662,0.0946444,0.0009443,-0.101637,-0.012350,-0.000004,-0.000159,37,O +2018-05-11,58249,0.078921,0.445387,0.0936809,0.0009918,-0.102025,-0.012253,-0.000035,-0.000148,37,O +2018-05-12,58250,0.080633,0.445320,0.0926207,0.0010798,-0.102555,-0.012112,-0.000055,-0.000128,37,O +2018-05-13,58251,0.083066,0.445202,0.0915097,0.0011393,-0.102904,-0.011947,-0.000071,-0.000106,37,O +2018-05-14,58252,0.085130,0.445100,0.0904261,0.0010683,-0.103004,-0.011846,-0.000087,-0.000083,37,O +2018-05-15,58253,0.087493,0.445214,0.0894081,0.0009538,-0.103096,-0.011926,-0.000102,-0.000060,37,O +2018-05-16,58254,0.089595,0.445498,0.0885287,0.0007773,-0.103402,-0.012225,-0.000121,-0.000076,37,O +2018-05-17,58255,0.091800,0.445717,0.0877927,0.0006490,-0.103808,-0.012527,-0.000141,-0.000101,37,O +2018-05-18,58256,0.093988,0.446225,0.0871846,0.0005571,-0.104055,-0.012609,-0.000160,-0.000127,37,O +2018-05-19,58257,0.095672,0.446942,0.0866198,0.0005359,-0.103931,-0.012424,-0.000128,-0.000133,37,O +2018-05-20,58258,0.096977,0.447467,0.0860403,0.0006025,-0.103642,-0.012164,-0.000076,-0.000132,37,O +2018-05-21,58259,0.098121,0.447749,0.0854020,0.0007001,-0.103568,-0.011997,-0.000106,-0.000108,37,O +2018-05-22,58260,0.099178,0.447686,0.0846313,0.0008201,-0.103532,-0.011976,-0.000149,-0.000081,37,O +2018-05-23,58261,0.100747,0.447750,0.0837199,0.0009697,-0.103451,-0.012031,-0.000193,-0.000054,37,O +2018-05-24,58262,0.102548,0.447827,0.0826952,0.0010442,-0.103268,-0.012137,-0.000192,-0.000078,37,O +2018-05-25,58263,0.104514,0.447972,0.0816500,0.0010393,-0.103224,-0.012209,-0.000179,-0.000116,37,O +2018-05-26,58264,0.105963,0.447994,0.0806253,0.0009715,-0.103472,-0.012171,-0.000179,-0.000127,37,O +2018-05-27,58265,0.107448,0.447738,0.0796856,0.0008876,-0.103875,-0.012042,-0.000183,-0.000128,37,O +2018-05-28,58266,0.109050,0.447462,0.0788342,0.0007686,-0.104225,-0.011898,-0.000188,-0.000129,37,O +2018-05-29,58267,0.110654,0.447233,0.0781916,0.0005957,-0.104422,-0.011841,-0.000192,-0.000130,37,O +2018-05-30,58268,0.112145,0.447210,0.0777028,0.0004489,-0.104521,-0.011917,-0.000196,-0.000132,37,O +2018-05-31,58269,0.113238,0.447171,0.0773029,0.0003526,-0.104555,-0.012030,-0.000187,-0.000098,37,O +2018-06-01,58270,0.114210,0.446949,0.0769859,0.0003037,-0.104565,-0.012109,-0.000175,-0.000054,37,O +2018-06-02,58271,0.116000,0.446795,0.0766843,0.0003065,-0.104624,-0.012171,-0.000180,-0.000052,37,O +2018-06-03,58272,0.117672,0.446819,0.0763717,0.0003404,-0.104741,-0.012227,-0.000192,-0.000065,37,O +2018-06-04,58273,0.118894,0.446915,0.0760220,0.0003991,-0.104834,-0.012281,-0.000203,-0.000078,37,O +2018-06-05,58274,0.120342,0.446952,0.0756060,0.0004776,-0.104764,-0.012294,-0.000214,-0.000092,37,O +2018-06-06,58275,0.121747,0.447225,0.0751102,0.0005681,-0.104487,-0.012208,-0.000201,-0.000090,37,O +2018-06-07,58276,0.122644,0.447324,0.0744992,0.0006524,-0.104361,-0.012076,-0.000182,-0.000084,37,O +2018-06-08,58277,0.123501,0.447248,0.0737808,0.0007832,-0.104716,-0.011986,-0.000163,-0.000078,37,O +2018-06-09,58278,0.124610,0.446848,0.0729647,0.0008502,-0.105321,-0.011984,-0.000104,-0.000107,37,O +2018-06-10,58279,0.125717,0.446336,0.0720932,0.0008620,-0.105755,-0.011961,-0.000030,-0.000149,37,O +2018-06-11,58280,0.127341,0.445679,0.0712602,0.0007992,-0.106089,-0.011786,-0.000071,-0.000106,37,O +2018-06-12,58281,0.128905,0.445424,0.0705446,0.0006350,-0.106407,-0.011630,-0.000164,-0.000025,37,O +2018-06-13,58282,0.130659,0.445312,0.0699876,0.0004698,-0.106732,-0.011785,-0.000200,-0.000058,37,O +2018-06-14,58283,0.132046,0.445215,0.0695863,0.0003253,-0.107077,-0.012079,-0.000222,-0.000120,37,O +2018-06-15,58284,0.133109,0.444532,0.0693087,0.0002358,-0.107177,-0.012237,-0.000244,-0.000182,37,O +2018-06-16,58285,0.134123,0.443412,0.0690922,0.0002020,-0.106886,-0.012073,-0.000228,-0.000159,37,O +2018-06-17,58286,0.135386,0.442035,0.0688800,0.0002342,-0.106531,-0.011799,-0.000198,-0.000104,37,O +2018-06-18,58287,0.136764,0.440775,0.0685978,0.0003425,-0.106417,-0.011640,-0.000168,-0.000048,37,O +2018-06-19,58288,0.138420,0.439691,0.0682100,0.0004256,-0.106565,-0.011614,-0.000138,0.000007,37,O +2018-06-20,58289,0.140390,0.438615,0.0677780,0.0004504,-0.106840,-0.011704,-0.000141,-0.000009,37,O +2018-06-21,58290,0.142450,0.438071,0.0673423,0.0003833,-0.106954,-0.011816,-0.000152,-0.000044,37,O +2018-06-22,58291,0.144511,0.437432,0.0669892,0.0002672,-0.106900,-0.011923,-0.000164,-0.000078,37,O +2018-06-23,58292,0.146600,0.436646,0.0668460,0.0000814,-0.106923,-0.011945,-0.000177,-0.000076,37,O +2018-06-24,58293,0.148455,0.435852,0.0669409,-0.0001473,-0.107224,-0.011855,-0.000192,-0.000059,37,O +2018-06-25,58294,0.150195,0.435051,0.0671880,-0.0003268,-0.107726,-0.011717,-0.000207,-0.000042,37,O +2018-06-26,58295,0.152116,0.433889,0.0675349,-0.0004823,-0.108181,-0.011662,-0.000221,-0.000025,37,O +2018-06-27,58296,0.153952,0.432657,0.0680172,-0.0005866,-0.108321,-0.011756,-0.000197,-0.000005,37,O +2018-06-28,58297,0.156053,0.431580,0.0686157,-0.0006457,-0.108224,-0.011909,-0.000162,0.000017,37,O +2018-06-29,58298,0.158519,0.430881,0.0692978,-0.0006204,-0.108055,-0.011966,-0.000128,0.000038,37,O +2018-06-30,58299,0.160961,0.430375,0.0699969,-0.0006147,-0.108038,-0.011907,-0.000119,0.000036,37,O +2018-07-01,58300,0.162871,0.429780,0.0706673,-0.0005928,-0.108216,-0.011825,-0.000119,0.000026,37,O +2018-07-02,58301,0.164852,0.428652,0.0712428,-0.0005769,-0.108490,-0.011807,-0.000120,0.000016,37,O +2018-07-03,58302,0.166885,0.427192,0.0716877,-0.0004792,-0.108644,-0.011817,-0.000120,0.000006,37,O +2018-07-04,58303,0.169493,0.425894,0.0720020,-0.0003125,-0.108565,-0.011763,-0.000109,-0.000011,37,O +2018-07-05,58304,0.172372,0.425368,0.0722155,-0.0001618,-0.108504,-0.011644,-0.000094,-0.000030,37,O +2018-07-06,58305,0.174544,0.425409,0.0723399,-0.0000079,-0.108835,-0.011577,-0.000079,-0.000050,37,O +2018-07-07,58306,0.176281,0.425151,0.0723312,0.0000967,-0.109655,-0.011616,-0.000099,-0.000053,37,O +2018-07-08,58307,0.177822,0.425068,0.0722035,0.0001420,-0.110479,-0.011678,-0.000133,-0.000050,37,O +2018-07-09,58308,0.178757,0.424807,0.0720414,0.0001328,-0.110916,-0.011640,-0.000167,-0.000048,37,O +2018-07-10,58309,0.179172,0.423852,0.0718882,0.0001034,-0.111095,-0.011552,-0.000201,-0.000046,37,O +2018-07-11,58310,0.180186,0.422669,0.0717859,0.0000650,-0.111169,-0.011551,-0.000175,-0.000011,37,O +2018-07-12,58311,0.181301,0.421677,0.0717594,-0.0000210,-0.111232,-0.011673,-0.000131,0.000031,37,O +2018-07-13,58312,0.182418,0.420426,0.0717762,-0.0000531,-0.111089,-0.011729,-0.000088,0.000074,37,O +2018-07-14,58313,0.184079,0.419376,0.0717853,0.0000123,-0.110824,-0.011636,-0.000100,0.000092,37,O +2018-07-15,58314,0.185564,0.418707,0.0716902,0.0001510,-0.110592,-0.011514,-0.000133,0.000100,37,O +2018-07-16,58315,0.186391,0.418469,0.0714208,0.0003376,-0.110625,-0.011504,-0.000166,0.000109,37,O +2018-07-17,58316,0.187240,0.418109,0.0709820,0.0004982,-0.111029,-0.011546,-0.000199,0.000117,37,O +2018-07-18,58317,0.188227,0.417540,0.0704302,0.0005515,-0.111574,-0.011522,-0.000202,0.000108,37,O +2018-07-19,58318,0.189238,0.416763,0.0698823,0.0005042,-0.111963,-0.011456,-0.000197,0.000095,37,O +2018-07-20,58319,0.190448,0.415788,0.0694402,0.0003588,-0.111977,-0.011489,-0.000193,0.000081,37,O +2018-07-21,58320,0.191637,0.414675,0.0691558,0.0001953,-0.111740,-0.011633,-0.000179,0.000083,37,O +2018-07-22,58321,0.192614,0.413612,0.0690418,0.0000312,-0.111664,-0.011771,-0.000161,0.000092,37,O +2018-07-23,58322,0.193731,0.412738,0.0690641,-0.0000813,-0.111937,-0.011814,-0.000144,0.000100,37,O +2018-07-24,58323,0.194740,0.412257,0.0691774,-0.0001218,-0.112339,-0.011812,-0.000126,0.000109,37,O +2018-07-25,58324,0.195441,0.411953,0.0693378,-0.0001512,-0.112609,-0.011885,-0.000129,0.000096,37,O +2018-07-26,58325,0.195783,0.411402,0.0695047,-0.0001754,-0.112615,-0.011996,-0.000136,0.000077,37,O +2018-07-27,58326,0.196299,0.410511,0.0696524,-0.0001537,-0.112497,-0.012012,-0.000144,0.000059,37,O +2018-07-28,58327,0.196883,0.409820,0.0698066,-0.0001301,-0.112396,-0.011850,-0.000130,0.000069,37,O +2018-07-29,58328,0.197516,0.408770,0.0699385,-0.0000860,-0.112434,-0.011631,-0.000107,0.000090,37,O +2018-07-30,58329,0.198295,0.407726,0.0699910,-0.0000152,-0.112591,-0.011506,-0.000085,0.000111,37,O +2018-07-31,58330,0.198408,0.406559,0.0699410,0.0000754,-0.112726,-0.011486,-0.000062,0.000132,37,O +2018-08-01,58331,0.198567,0.405230,0.0697827,0.0001948,-0.112807,-0.011528,-0.000067,0.000088,37,O +2018-08-02,58332,0.198928,0.404282,0.0695405,0.0002858,-0.112854,-0.011525,-0.000079,0.000027,37,O +2018-08-03,58333,0.199383,0.403118,0.0692490,0.0003289,-0.113074,-0.011526,-0.000092,-0.000035,37,O +2018-08-04,58334,0.199965,0.402113,0.0689270,0.0003065,-0.113664,-0.011573,-0.000140,-0.000048,37,O +2018-08-05,58335,0.200232,0.401033,0.0686353,0.0002713,-0.114375,-0.011676,-0.000202,-0.000043,37,O +2018-08-06,58336,0.200431,0.399820,0.0684321,0.0001688,-0.114886,-0.011752,-0.000264,-0.000038,37,O +2018-08-07,58337,0.200636,0.398585,0.0683256,0.0000637,-0.115151,-0.011782,-0.000326,-0.000033,37,O +2018-08-08,58338,0.200792,0.397380,0.0683069,-0.0000044,-0.115063,-0.011817,-0.000282,-0.000002,37,O +2018-08-09,58339,0.200735,0.396172,0.0682933,0.0000438,-0.114887,-0.011877,-0.000212,0.000035,37,O +2018-08-10,58340,0.201186,0.394671,0.0682018,0.0001696,-0.114610,-0.011835,-0.000141,0.000073,37,O +2018-08-11,58341,0.202013,0.393049,0.0679453,0.0003397,-0.114410,-0.011678,-0.000147,0.000079,37,O +2018-08-12,58342,0.203168,0.391474,0.0675175,0.0005155,-0.114284,-0.011549,-0.000183,0.000072,37,O +2018-08-13,58343,0.203873,0.390131,0.0669514,0.0005994,-0.114302,-0.011578,-0.000218,0.000066,37,O +2018-08-14,58344,0.204204,0.388855,0.0663162,0.0006048,-0.114586,-0.011655,-0.000253,0.000060,37,O +2018-08-15,58345,0.204222,0.387607,0.0657262,0.0005749,-0.114956,-0.011521,-0.000215,0.000109,37,O +2018-08-16,58346,0.204491,0.386161,0.0651953,0.0004866,-0.115309,-0.011245,-0.000159,0.000172,37,O +2018-08-17,58347,0.204697,0.384858,0.0647660,0.0003637,-0.115342,-0.011091,-0.000102,0.000235,37,O +2018-08-18,58348,0.205208,0.383290,0.0644980,0.0001888,-0.115051,-0.011246,-0.000066,0.000260,37,O +2018-08-19,58349,0.205710,0.381891,0.0644053,0.0000218,-0.114731,-0.011556,-0.000038,0.000271,37,O +2018-08-20,58350,0.206205,0.380975,0.0644261,-0.0000671,-0.114753,-0.011851,-0.000041,0.000210,37,O +2018-08-21,58351,0.207158,0.380236,0.0645243,-0.0001217,-0.115001,-0.011988,-0.000050,0.000134,37,O +2018-08-22,58352,0.207972,0.379551,0.0646862,-0.0001424,-0.115119,-0.011941,-0.000031,0.000151,37,O +2018-08-23,58353,0.208582,0.378510,0.0648586,-0.0001537,-0.115036,-0.011869,-0.000005,0.000192,37,O +2018-08-24,58354,0.209114,0.377213,0.0650048,-0.0001779,-0.114862,-0.011775,0.000021,0.000233,37,O +2018-08-25,58355,0.209678,0.376017,0.0651013,-0.0001032,-0.114840,-0.011624,-0.000004,0.000245,37,O +2018-08-26,58356,0.210426,0.375049,0.0651186,0.0000334,-0.114911,-0.011417,-0.000048,0.000246,37,O +2018-08-27,58357,0.210969,0.373850,0.0650147,0.0001808,-0.115013,-0.011241,-0.000092,0.000247,37,O +2018-08-28,58358,0.211157,0.372845,0.0647918,0.0003014,-0.115154,-0.011165,-0.000136,0.000248,37,O +2018-08-29,58359,0.211142,0.371729,0.0644813,0.0003395,-0.115158,-0.011192,-0.000113,0.000225,37,O +2018-08-30,58360,0.211548,0.370511,0.0641044,0.0003904,-0.115104,-0.011237,-0.000072,0.000197,37,O +2018-08-31,58361,0.211819,0.369442,0.0636996,0.0004154,-0.115048,-0.011271,-0.000031,0.000168,37,O +2018-09-01,58362,0.211659,0.367906,0.0633163,0.0003848,-0.115212,-0.011252,-0.000041,0.000201,37,O +2018-09-02,58363,0.211577,0.366188,0.0629941,0.0002587,-0.115558,-0.011242,-0.000070,0.000258,37,O +2018-09-03,58364,0.211673,0.364479,0.0627594,0.0001541,-0.115889,-0.011298,-0.000081,0.000279,37,O +2018-09-04,58365,0.211634,0.363167,0.0626152,0.0001077,-0.115981,-0.011460,-0.000051,0.000218,37,O +2018-09-05,58366,0.211640,0.361805,0.0625141,0.0001020,-0.115903,-0.011572,-0.000039,0.000212,37,O +2018-09-06,58367,0.212048,0.360904,0.0623951,0.0001653,-0.115668,-0.011593,-0.000031,0.000219,37,O +2018-09-07,58368,0.212541,0.360446,0.0621697,0.0002882,-0.115388,-0.011427,-0.000024,0.000226,37,O +2018-09-08,58369,0.212705,0.359876,0.0617750,0.0004833,-0.115259,-0.011075,-0.000048,0.000261,37,O +2018-09-09,58370,0.212593,0.359172,0.0611591,0.0007147,-0.115270,-0.010769,-0.000084,0.000304,37,O +2018-09-10,58371,0.212953,0.358347,0.0603230,0.0009400,-0.115353,-0.010695,-0.000121,0.000348,37,O +2018-09-11,58372,0.213677,0.357568,0.0593573,0.0009847,-0.115504,-0.010766,-0.000157,0.000392,37,O +2018-09-12,58373,0.214091,0.356765,0.0583947,0.0009403,-0.115659,-0.010841,-0.000142,0.000337,37,O +2018-09-13,58374,0.213972,0.355925,0.0575376,0.0007586,-0.115871,-0.010778,-0.000113,0.000256,37,O +2018-09-14,58375,0.213400,0.355115,0.0568606,0.0005625,-0.115963,-0.010750,-0.000085,0.000175,37,O +2018-09-15,58376,0.212829,0.354057,0.0563961,0.0003670,-0.115819,-0.010862,-0.000074,0.000192,37,O +2018-09-16,58377,0.212199,0.352900,0.0561269,0.0002203,-0.115521,-0.011132,-0.000070,0.000246,37,O +2018-09-17,58378,0.211977,0.351630,0.0559831,0.0001201,-0.115281,-0.011362,-0.000066,0.000299,37,O +2018-09-18,58379,0.212054,0.350327,0.0559101,0.0000571,-0.115173,-0.011383,-0.000062,0.000353,37,O +2018-09-19,58380,0.212096,0.348780,0.0558825,0.0000390,-0.115026,-0.011305,-0.000028,0.000336,37,O +2018-09-20,58381,0.211925,0.347173,0.0558190,0.0000949,-0.114832,-0.011227,0.000014,0.000301,37,O +2018-09-21,58382,0.211828,0.345665,0.0556640,0.0002158,-0.114642,-0.011206,0.000056,0.000266,37,O +2018-09-22,58383,0.211821,0.344294,0.0553655,0.0003614,-0.114528,-0.011157,0.000075,0.000258,37,O +2018-09-23,58384,0.211590,0.342637,0.0549109,0.0005122,-0.114398,-0.011009,0.000084,0.000259,37,O +2018-09-24,58385,0.211872,0.340887,0.0543066,0.0006748,-0.114212,-0.010770,0.000094,0.000260,37,O +2018-09-25,58386,0.211960,0.339315,0.0535719,0.0008149,-0.114070,-0.010538,0.000104,0.000262,37,O +2018-09-26,58387,0.211289,0.337662,0.0527362,0.0008751,-0.114061,-0.010426,0.000113,0.000263,37,O +2018-09-27,58388,0.210522,0.336045,0.0518376,0.0009016,-0.114124,-0.010456,0.000122,0.000269,37,O +2018-09-28,58389,0.210397,0.334750,0.0509139,0.0009203,-0.114142,-0.010561,0.000130,0.000277,37,O +2018-09-29,58390,0.210482,0.333693,0.0500141,0.0008681,-0.114131,-0.010642,0.000130,0.000283,37,O +2018-09-30,58391,0.210513,0.332262,0.0491808,0.0007725,-0.114200,-0.010654,0.000126,0.000288,37,O +2018-10-01,58392,0.210528,0.330843,0.0484320,0.0006964,-0.114384,-0.010632,0.000122,0.000293,37,O +2018-10-02,58393,0.210618,0.329823,0.0477521,0.0006496,-0.114535,-0.010640,0.000118,0.000298,37,O +2018-10-03,58394,0.210355,0.328630,0.0470980,0.0006627,-0.114384,-0.010670,0.000140,0.000306,37,O +2018-10-04,58395,0.209699,0.327678,0.0463869,0.0007689,-0.113941,-0.010622,0.000169,0.000315,37,O +2018-10-05,58396,0.208569,0.326669,0.0455337,0.0009519,-0.113415,-0.010396,0.000199,0.000324,37,O +2018-10-06,58397,0.207798,0.325015,0.0444666,0.0011845,-0.113146,-0.010033,0.000196,0.000328,37,O +2018-10-07,58398,0.207422,0.323667,0.0431936,0.0013610,-0.113165,-0.009728,0.000181,0.000331,37,O +2018-10-08,58399,0.207032,0.322683,0.0417907,0.0014287,-0.113316,-0.009660,0.000166,0.000334,37,O +2018-10-09,58400,0.206379,0.321901,0.0403497,0.0013973,-0.113435,-0.009800,0.000151,0.000337,37,O +2018-10-10,58401,0.205780,0.321116,0.0389687,0.0012980,-0.113342,-0.009956,0.000190,0.000331,37,O +2018-10-11,58402,0.204962,0.320079,0.0377295,0.0011636,-0.113190,-0.009988,0.000243,0.000322,37,O +2018-10-12,58403,0.204071,0.318663,0.0366742,0.0009740,-0.113013,-0.009959,0.000297,0.000314,37,O +2018-10-13,58404,0.203072,0.316938,0.0357993,0.0007920,-0.112928,-0.010013,0.000280,0.000317,37,O +2018-10-14,58405,0.202237,0.315398,0.0350913,0.0006451,-0.112779,-0.010185,0.000236,0.000325,37,O +2018-10-15,58406,0.201709,0.314253,0.0345237,0.0005261,-0.112544,-0.010341,0.000193,0.000333,37,O +2018-10-16,58407,0.201587,0.313377,0.0340535,0.0004738,-0.112317,-0.010337,0.000149,0.000341,37,O +2018-10-17,58408,0.201061,0.312464,0.0336228,0.0004420,-0.112039,-0.010202,0.000155,0.000331,37,O +2018-10-18,58409,0.200195,0.311053,0.0331706,0.0004956,-0.111833,-0.010062,0.000173,0.000316,37,O +2018-10-19,58410,0.199086,0.309868,0.0326354,0.0005882,-0.111706,-0.010019,0.000192,0.000301,37,O +2018-10-20,58411,0.197901,0.308640,0.0319874,0.0007321,-0.111575,-0.010024,0.000222,0.000291,37,O +2018-10-21,58412,0.196795,0.307520,0.0311912,0.0008843,-0.111395,-0.009938,0.000258,0.000283,37,O +2018-10-22,58413,0.195484,0.306314,0.0302229,0.0010232,-0.111185,-0.009679,0.000294,0.000275,37,O +2018-10-23,58414,0.194680,0.304994,0.0290990,0.0011954,-0.111023,-0.009326,0.000329,0.000266,37,O +2018-10-24,58415,0.193785,0.304246,0.0278631,0.0012869,-0.111120,-0.009062,0.000300,0.000269,37,O +2018-10-25,58416,0.193195,0.303702,0.0265748,0.0012844,-0.111310,-0.009042,0.000254,0.000274,37,O +2018-10-26,58417,0.192548,0.303242,0.0253051,0.0011730,-0.111452,-0.009233,0.000207,0.000280,37,O +2018-10-27,58418,0.192071,0.302535,0.0241148,0.0011236,-0.111404,-0.009467,0.000203,0.000271,37,O +2018-10-28,58419,0.191657,0.302139,0.0230447,0.0010507,-0.111307,-0.009558,0.000215,0.000257,37,O +2018-10-29,58420,0.190191,0.301362,0.0220904,0.0009204,-0.111267,-0.009473,0.000227,0.000243,37,O +2018-10-30,58421,0.188153,0.300142,0.0212105,0.0008419,-0.111241,-0.009323,0.000239,0.000229,37,O +2018-10-31,58422,0.186298,0.298764,0.0203477,0.0008863,-0.111079,-0.009184,0.000258,0.000247,37,O +2018-11-01,58423,0.184510,0.297031,0.0194049,0.0010019,-0.110693,-0.009112,0.000290,0.000242,37,O +2018-11-02,58424,0.183144,0.295254,0.0183388,0.0011360,-0.110199,-0.009018,0.000327,0.000224,37,O +2018-11-03,58425,0.182231,0.293548,0.0171490,0.0012288,-0.109827,-0.008864,0.000364,0.000207,37,O +2018-11-04,58426,0.181200,0.292497,0.0159215,0.0012681,-0.109772,-0.008734,0.000385,0.000187,37,O +2018-11-05,58427,0.180114,0.291721,0.0146529,0.0012425,-0.110054,-0.008737,0.000363,0.000160,37,O +2018-11-06,58428,0.179336,0.291078,0.0134069,0.0012003,-0.110353,-0.008870,0.000341,0.000134,37,O +2018-11-07,58429,0.178247,0.290503,0.0122412,0.0011079,-0.110181,-0.008972,0.000436,0.000167,37,O +2018-11-08,58430,0.177661,0.289421,0.0111876,0.0009951,-0.109729,-0.008991,0.000563,0.000216,37,O +2018-11-09,58431,0.177501,0.288243,0.0102529,0.0008568,-0.109862,-0.008964,0.000426,0.000249,37,O +2018-11-10,58432,0.176916,0.286977,0.0094525,0.0007531,-0.109852,-0.008970,0.000350,0.000252,37,O +2018-11-11,58433,0.175896,0.285895,0.0087502,0.0006728,-0.109685,-0.009013,0.000328,0.000246,37,O +2018-11-12,58434,0.174771,0.284813,0.0080933,0.0006445,-0.109428,-0.009025,0.000307,0.000240,37,O +2018-11-13,58435,0.173670,0.283804,0.0074412,0.0006762,-0.109130,-0.008942,0.000285,0.000233,37,O +2018-11-14,58436,0.172446,0.282819,0.0067457,0.0007411,-0.108889,-0.008790,0.000277,0.000222,37,O +2018-11-15,58437,0.171170,0.281693,0.0059726,0.0008234,-0.108796,-0.008661,0.000273,0.000210,37,O +2018-11-16,58438,0.169491,0.280662,0.0050997,0.0008890,-0.108783,-0.008628,0.000269,0.000198,37,O +2018-11-17,58439,0.168053,0.279704,0.0041430,0.0010038,-0.108707,-0.008667,0.000282,0.000172,37,O +2018-11-18,58440,0.167032,0.279192,0.0030788,0.0011294,-0.108606,-0.008650,0.000301,0.000141,37,O +2018-11-19,58441,0.166027,0.278644,0.0018622,0.0012732,-0.108575,-0.008472,0.000321,0.000110,37,O +2018-11-20,58442,0.164954,0.278351,0.0005233,0.0013792,-0.108627,-0.008155,0.000341,0.000079,37,O +2018-11-21,58443,0.163866,0.278087,-0.0008724,0.0014208,-0.108896,-0.007790,0.000273,0.000112,37,O +2018-11-22,58444,0.162902,0.277650,-0.0022440,0.0013873,-0.108645,-0.007534,0.000380,0.000242,37,O +2018-11-23,58445,0.161893,0.277324,-0.0035499,0.0012594,-0.108127,-0.007523,0.000565,0.000403,37,O +2018-11-24,58446,0.160485,0.277286,-0.0047834,0.0011370,-0.108139,-0.007835,0.000521,0.000378,37,O +2018-11-25,58447,0.159235,0.277088,-0.0058934,0.0010245,-0.108218,-0.008066,0.000432,0.000316,37,O +2018-11-26,58448,0.158313,0.276843,-0.0068777,0.0009646,-0.108254,-0.008030,0.000342,0.000253,37,O +2018-11-27,58449,0.156839,0.276929,-0.0078373,0.0009866,-0.108287,-0.007813,0.000252,0.000190,37,O +2018-11-28,58450,0.154662,0.276653,-0.0088268,0.0010576,-0.108102,-0.007613,0.000263,0.000148,37,O +2018-11-29,58451,0.152413,0.276054,-0.0099233,0.0011645,-0.107874,-0.007574,0.000300,0.000111,37,O +2018-11-30,58452,0.150563,0.275167,-0.0111364,0.0012871,-0.107639,-0.007659,0.000337,0.000074,37,O +2018-12-01,58453,0.148511,0.274295,-0.0124404,0.0013301,-0.107499,-0.007704,0.000348,0.000100,37,O +2018-12-02,58454,0.146188,0.273492,-0.0137573,0.0012950,-0.107519,-0.007714,0.000349,0.000148,37,O +2018-12-03,58455,0.143733,0.272864,-0.0150086,0.0012135,-0.107735,-0.007723,0.000350,0.000197,37,O +2018-12-04,58456,0.141902,0.272288,-0.0161171,0.0010113,-0.108055,-0.007732,0.000351,0.000246,37,O +2018-12-05,58457,0.139736,0.272071,-0.0170051,0.0007823,-0.108315,-0.007786,0.000330,0.000223,37,O +2018-12-06,58458,0.137181,0.271827,-0.0176993,0.0006074,-0.108339,-0.007827,0.000303,0.000182,37,O +2018-12-07,58459,0.134745,0.271478,-0.0182430,0.0005137,-0.108180,-0.007871,0.000276,0.000140,37,O +2018-12-08,58460,0.132922,0.271000,-0.0187018,0.0004389,-0.107895,-0.007915,0.000290,0.000125,37,O +2018-12-09,58461,0.131771,0.270813,-0.0191110,0.0003767,-0.107611,-0.007946,0.000318,0.000120,37,O +2018-12-10,58462,0.130336,0.271024,-0.0194946,0.0003776,-0.107316,-0.007910,0.000346,0.000116,37,O +2018-12-11,58463,0.128667,0.271114,-0.0198879,0.0004417,-0.107023,-0.007800,0.000375,0.000111,37,O +2018-12-12,58464,0.126861,0.271006,-0.0203412,0.0004915,-0.106924,-0.007688,0.000372,0.000100,37,O +2018-12-13,58465,0.124815,0.270460,-0.0208707,0.0005611,-0.106989,-0.007642,0.000363,0.000088,37,O +2018-12-14,58466,0.123182,0.270033,-0.0214888,0.0006532,-0.107077,-0.007675,0.000353,0.000076,37,O +2018-12-15,58467,0.121105,0.269581,-0.0221963,0.0007461,-0.107038,-0.007730,0.000350,0.000071,37,O +2018-12-16,58468,0.119215,0.268992,-0.0230150,0.0008557,-0.106962,-0.007747,0.000349,0.000068,37,O +2018-12-17,58469,0.117513,0.268466,-0.0239543,0.0009899,-0.107029,-0.007681,0.000348,0.000065,37,O +2018-12-18,58470,0.115378,0.268031,-0.0249722,0.0010471,-0.107229,-0.007498,0.000347,0.000063,37,O +2018-12-19,58471,0.113310,0.267412,-0.0259807,0.0009827,-0.107331,-0.007241,0.000361,0.000033,37,O +2018-12-20,58472,0.111645,0.267029,-0.0268884,0.0008161,-0.107290,-0.007010,0.000380,-0.000003,37,O +2018-12-21,58473,0.109928,0.266784,-0.0276359,0.0006370,-0.107265,-0.006989,0.000398,-0.000040,37,O +2018-12-22,58474,0.107844,0.266547,-0.0282166,0.0005040,-0.107383,-0.007193,0.000389,-0.000035,37,O +2018-12-23,58475,0.105771,0.266523,-0.0286836,0.0004507,-0.107406,-0.007440,0.000371,-0.000015,37,O +2018-12-24,58476,0.103568,0.266619,-0.0291417,0.0004771,-0.107129,-0.007457,0.000352,0.000006,37,O +2018-12-25,58477,0.101399,0.266731,-0.0296751,0.0005616,-0.106658,-0.007202,0.000333,0.000026,37,O +2018-12-26,58478,0.099191,0.267291,-0.0302990,0.0007122,-0.106280,-0.006907,0.000314,0.000047,37,O +2018-12-27,58479,0.097243,0.268068,-0.0310764,0.0008673,-0.106154,-0.006789,0.000295,0.000067,37,O +2018-12-28,58480,0.095386,0.268935,-0.0320059,0.0010205,-0.106161,-0.006924,0.000303,-0.000007,37,O +2018-12-29,58481,0.093289,0.269801,-0.0330198,0.0011069,-0.106156,-0.007114,0.000345,-0.000102,37,O +2018-12-30,58482,0.090829,0.270475,-0.0340678,0.0010617,-0.106159,-0.007262,0.000388,-0.000173,37,O +2018-12-31,58483,0.088414,0.270763,-0.0351611,0.0009706,-0.106322,-0.007311,0.000383,-0.000138,37,O +2019-01-01,58484,0.086360,0.271107,-0.0361345,0.0009196,-0.106561,-0.007355,0.000379,-0.000102,37,O +2019-01-02,58485,0.084450,0.272019,-0.0370076,0.0008103,-0.106814,-0.007352,0.000374,-0.000066,37,O +2019-01-03,58486,0.081750,0.272569,-0.0377478,0.0006117,-0.106924,-0.007309,0.000370,-0.000030,37,O +2019-01-04,58487,0.079016,0.272577,-0.0382792,0.0004701,-0.106742,-0.007378,0.000395,-0.000077,37,O +2019-01-05,58488,0.076411,0.272536,-0.0387496,0.0004125,-0.106503,-0.007496,0.000387,-0.000101,37,O +2019-01-06,58489,0.074159,0.272895,-0.0391547,0.0003598,-0.106286,-0.007600,0.000366,-0.000108,37,O +2019-01-07,58490,0.072162,0.273364,-0.0394760,0.0003132,-0.106129,-0.007608,0.000344,-0.000116,37,O +2019-01-08,58491,0.071062,0.273800,-0.0397729,0.0003272,-0.106065,-0.007513,0.000323,-0.000124,37,O +2019-01-09,58492,0.070637,0.274756,-0.0401419,0.0004111,-0.106021,-0.007429,0.000351,-0.000133,37,O +2019-01-10,58493,0.069750,0.275757,-0.0405867,0.0004624,-0.106065,-0.007451,0.000393,-0.000143,37,O +2019-01-11,58494,0.068810,0.276031,-0.0410933,0.0005626,-0.106089,-0.007555,0.000434,-0.000152,37,O +2019-01-12,58495,0.068327,0.276958,-0.0417183,0.0006858,-0.106072,-0.007644,0.000431,-0.000146,37,O +2019-01-13,58496,0.067619,0.278392,-0.0424490,0.0007617,-0.106040,-0.007694,0.000405,-0.000131,37,O +2019-01-14,58497,0.067041,0.280037,-0.0432643,0.0008473,-0.106126,-0.007738,0.000380,-0.000117,37,O +2019-01-15,58498,0.066278,0.281989,-0.0441419,0.0008947,-0.106336,-0.007740,0.000354,-0.000102,37,O +2019-01-16,58499,0.065560,0.283745,-0.0450371,0.0008947,-0.106506,-0.007597,0.000317,-0.000097,37,O +2019-01-17,58500,0.064413,0.285541,-0.0459084,0.0008434,-0.106619,-0.007284,0.000277,-0.000094,37,O +2019-01-18,58501,0.063021,0.286806,-0.0467215,0.0007935,-0.106964,-0.007028,0.000237,-0.000091,37,O +2019-01-19,58502,0.061886,0.287736,-0.0474810,0.0007474,-0.107547,-0.007123,0.000231,-0.000104,37,O +2019-01-20,58503,0.060924,0.288663,-0.0482192,0.0007625,-0.107969,-0.007519,0.000237,-0.000122,37,O +2019-01-21,58504,0.059951,0.289646,-0.0490001,0.0008539,-0.107732,-0.007846,0.000244,-0.000141,37,O +2019-01-22,58505,0.059500,0.290588,-0.0499002,0.0009738,-0.106895,-0.007846,0.000250,-0.000160,37,O +2019-01-23,58506,0.059020,0.291974,-0.0509753,0.0011441,-0.106010,-0.007644,0.000257,-0.000178,37,O +2019-01-24,58507,0.058404,0.293938,-0.0522360,0.0013438,-0.105628,-0.007477,0.000228,-0.000173,37,O +2019-01-25,58508,0.057037,0.295895,-0.0536317,0.0014479,-0.105742,-0.007399,0.000189,-0.000160,37,O +2019-01-26,58509,0.055392,0.297230,-0.0550842,0.0014242,-0.105974,-0.007320,0.000207,-0.000156,37,O +2019-01-27,58510,0.054208,0.298636,-0.0565001,0.0013738,-0.106164,-0.007238,0.000246,-0.000154,37,O +2019-01-28,58511,0.053443,0.300145,-0.0577925,0.0012435,-0.106239,-0.007275,0.000284,-0.000153,37,O +2019-01-29,58512,0.052614,0.301578,-0.0589106,0.0010153,-0.106259,-0.007456,0.000323,-0.000151,37,O +2019-01-30,58513,0.051577,0.302934,-0.0598406,0.0008170,-0.106486,-0.007654,0.000306,-0.000143,37,O +2019-01-31,58514,0.050593,0.304306,-0.0605800,0.0006817,-0.106774,-0.007773,0.000273,-0.000132,37,O +2019-02-01,58515,0.049834,0.306171,-0.0611621,0.0005584,-0.106884,-0.007845,0.000241,-0.000122,37,O +2019-02-02,58516,0.049056,0.308504,-0.0616373,0.0004658,-0.106616,-0.007971,0.000251,-0.000143,37,O +2019-02-03,58517,0.047559,0.310550,-0.0620986,0.0005001,-0.106158,-0.008105,0.000278,-0.000177,37,O +2019-02-04,58518,0.045944,0.311689,-0.0626460,0.0005894,-0.105763,-0.008131,0.000305,-0.000211,37,O +2019-02-05,58519,0.044745,0.312776,-0.0633149,0.0007100,-0.105553,-0.008029,0.000332,-0.000244,37,O +2019-02-06,58520,0.043838,0.313876,-0.0640945,0.0008363,-0.105635,-0.007889,0.000317,-0.000240,37,O +2019-02-07,58521,0.043000,0.314914,-0.0649870,0.0009471,-0.105853,-0.007869,0.000291,-0.000225,37,O +2019-02-08,58522,0.042225,0.316266,-0.0659817,0.0010463,-0.106061,-0.007974,0.000265,-0.000210,37,O +2019-02-09,58523,0.041812,0.318184,-0.0670693,0.0011151,-0.106088,-0.008089,0.000270,-0.000186,37,O +2019-02-10,58524,0.041158,0.320405,-0.0682263,0.0011816,-0.106008,-0.008171,0.000287,-0.000159,37,O +2019-02-11,58525,0.040091,0.322109,-0.0694157,0.0011896,-0.105961,-0.008266,0.000305,-0.000132,37,O +2019-02-12,58526,0.038728,0.323345,-0.0706131,0.0011548,-0.105965,-0.008382,0.000322,-0.000106,37,O +2019-02-13,58527,0.037643,0.323847,-0.0717962,0.0011475,-0.105944,-0.008457,0.000319,-0.000138,37,O +2019-02-14,58528,0.036400,0.324163,-0.0729229,0.0010705,-0.105889,-0.008343,0.000312,-0.000186,37,O +2019-02-15,58529,0.035202,0.324437,-0.0739690,0.0010196,-0.106118,-0.008168,0.000304,-0.000234,37,O +2019-02-16,58530,0.034898,0.325551,-0.0749476,0.0009527,-0.106932,-0.008213,0.000243,-0.000240,37,O +2019-02-17,58531,0.035382,0.326979,-0.0759113,0.0009808,-0.107770,-0.008611,0.000178,-0.000234,37,O +2019-02-18,58532,0.036402,0.328814,-0.0769283,0.0010855,-0.107720,-0.009090,0.000203,-0.000244,37,O +2019-02-19,58533,0.037158,0.330699,-0.0781012,0.0012574,-0.106883,-0.009282,0.000228,-0.000254,37,O +2019-02-20,58534,0.037516,0.332551,-0.0794595,0.0014033,-0.105824,-0.009182,0.000252,-0.000264,37,O +2019-02-21,58535,0.037409,0.334157,-0.0809464,0.0015192,-0.105225,-0.008980,0.000250,-0.000223,37,O +2019-02-22,58536,0.036823,0.335959,-0.0824905,0.0015702,-0.105220,-0.008808,0.000240,-0.000168,37,O +2019-02-23,58537,0.035746,0.337468,-0.0840100,0.0014712,-0.105540,-0.008638,0.000248,-0.000155,37,O +2019-02-24,58538,0.035260,0.338447,-0.0853945,0.0012778,-0.105880,-0.008464,0.000263,-0.000159,37,O +2019-02-25,58539,0.035478,0.339220,-0.0865600,0.0010413,-0.106026,-0.008457,0.000278,-0.000164,37,O +2019-02-26,58540,0.035848,0.340191,-0.0874895,0.0008125,-0.106016,-0.008713,0.000293,-0.000168,37,O +2019-02-27,58541,0.036335,0.341340,-0.0882138,0.0006230,-0.106093,-0.009088,0.000297,-0.000171,37,O +2019-02-28,58542,0.037308,0.342419,-0.0887866,0.0005456,-0.106299,-0.009364,0.000299,-0.000174,37,O +2019-03-01,58543,0.038585,0.344058,-0.0892695,0.0004493,-0.106391,-0.009471,0.000301,-0.000177,37,O +2019-03-02,58544,0.040115,0.345746,-0.0897285,0.0004525,-0.106128,-0.009492,0.000303,-0.000185,37,O +2019-03-03,58545,0.041705,0.347321,-0.0902115,0.0005032,-0.105583,-0.009477,0.000306,-0.000194,37,O +2019-03-04,58546,0.043027,0.348978,-0.0907359,0.0005849,-0.105071,-0.009389,0.000309,-0.000204,37,O +2019-03-05,58547,0.043941,0.350881,-0.0913366,0.0006457,-0.104818,-0.009201,0.000312,-0.000214,37,O +2019-03-06,58548,0.044629,0.352612,-0.0920497,0.0007774,-0.104870,-0.008995,0.000290,-0.000221,37,O +2019-03-07,58549,0.045490,0.354228,-0.0928815,0.0009090,-0.105051,-0.008917,0.000261,-0.000228,37,O +2019-03-08,58550,0.045755,0.355899,-0.0938209,0.0009788,-0.105246,-0.009012,0.000232,-0.000236,37,O +2019-03-09,58551,0.045492,0.356807,-0.0948250,0.0010281,-0.105343,-0.009197,0.000229,-0.000240,37,O +2019-03-10,58552,0.045250,0.357817,-0.0958689,0.0010329,-0.105364,-0.009385,0.000235,-0.000244,37,O +2019-03-11,58553,0.045393,0.359065,-0.0969307,0.0010556,-0.105349,-0.009556,0.000241,-0.000248,37,O +2019-03-12,58554,0.045392,0.360610,-0.0979533,0.0009685,-0.105325,-0.009723,0.000248,-0.000252,37,O +2019-03-13,58555,0.044941,0.361834,-0.0988761,0.0008698,-0.105290,-0.009830,0.000251,-0.000239,37,O +2019-03-14,58556,0.044600,0.363157,-0.0997021,0.0007680,-0.105217,-0.009832,0.000254,-0.000222,37,O +2019-03-15,58557,0.044689,0.364244,-0.1004688,0.0007574,-0.105205,-0.009780,0.000257,-0.000204,37,O +2019-03-16,58558,0.044882,0.365639,-0.1012581,0.0008150,-0.105404,-0.009859,0.000243,-0.000205,37,O +2019-03-17,58559,0.045118,0.366716,-0.1021314,0.0009185,-0.105652,-0.010133,0.000223,-0.000214,37,O +2019-03-18,58560,0.045569,0.367665,-0.1031393,0.0011095,-0.105622,-0.010438,0.000203,-0.000223,37,O +2019-03-19,58561,0.045849,0.368711,-0.1043490,0.0013120,-0.105212,-0.010557,0.000184,-0.000232,37,O +2019-03-20,58562,0.045602,0.369656,-0.1057537,0.0015004,-0.104517,-0.010457,0.000243,-0.000206,37,O +2019-03-21,58563,0.045363,0.370584,-0.1073331,0.0016399,-0.104038,-0.010349,0.000324,-0.000171,37,O +2019-03-22,58564,0.045163,0.371781,-0.1090042,0.0016718,-0.104348,-0.010440,0.000239,-0.000265,37,O +2019-03-23,58565,0.045059,0.373068,-0.1106258,0.0015653,-0.104760,-0.010388,0.000200,-0.000254,37,O +2019-03-24,58566,0.045366,0.374421,-0.1121099,0.0013668,-0.105049,-0.010200,0.000199,-0.000189,37,O +2019-03-25,58567,0.045815,0.375834,-0.1133803,0.0011510,-0.105152,-0.010085,0.000197,-0.000124,37,O +2019-03-26,58568,0.045966,0.377276,-0.1144432,0.0009612,-0.105112,-0.010200,0.000196,-0.000059,37,O +2019-03-27,58569,0.045903,0.378402,-0.1153100,0.0008170,-0.105153,-0.010559,0.000188,-0.000077,37,O +2019-03-28,58570,0.046141,0.379230,-0.1160950,0.0007469,-0.105345,-0.010875,0.000177,-0.000116,37,O +2019-03-29,58571,0.046500,0.380235,-0.1168183,0.0006843,-0.105462,-0.010986,0.000166,-0.000155,37,O +2019-03-30,58572,0.047100,0.381203,-0.1175404,0.0007409,-0.105210,-0.010921,0.000160,-0.000179,37,O +2019-03-31,58573,0.047984,0.382645,-0.1183133,0.0008329,-0.104636,-0.010800,0.000155,-0.000197,37,O +2019-04-01,58574,0.048795,0.384044,-0.1191791,0.0009226,-0.104085,-0.010668,0.000149,-0.000216,37,O +2019-04-02,58575,0.049786,0.385278,-0.1201631,0.0010292,-0.103838,-0.010494,0.000144,-0.000234,37,O +2019-04-03,58576,0.050547,0.386499,-0.1212445,0.0011882,-0.103870,-0.010265,0.000148,-0.000224,37,O +2019-04-04,58577,0.051078,0.387917,-0.1224765,0.0012751,-0.104020,-0.010099,0.000154,-0.000207,37,O +2019-04-05,58578,0.051313,0.389067,-0.1237650,0.0012629,-0.104171,-0.010098,0.000159,-0.000190,37,O +2019-04-06,58579,0.051595,0.390130,-0.1250294,0.0012887,-0.104305,-0.010279,0.000156,-0.000186,37,O +2019-04-07,58580,0.051785,0.391337,-0.1263223,0.0012566,-0.104387,-0.010543,0.000149,-0.000186,37,O +2019-04-08,58581,0.051821,0.392345,-0.1275976,0.0012183,-0.104400,-0.010783,0.000142,-0.000186,37,O +2019-04-09,58582,0.052091,0.393318,-0.1287589,0.0011124,-0.104412,-0.010941,0.000135,-0.000187,37,O +2019-04-10,58583,0.052480,0.394328,-0.1297840,0.0009744,-0.104459,-0.010999,0.000149,-0.000165,37,O +2019-04-11,58584,0.053117,0.395119,-0.1307304,0.0008031,-0.104546,-0.011020,0.000167,-0.000138,37,O +2019-04-12,58585,0.053769,0.396173,-0.1314543,0.0007505,-0.104511,-0.011059,0.000186,-0.000111,37,O +2019-04-13,58586,0.054679,0.397319,-0.1322260,0.0008202,-0.104283,-0.011176,0.000184,-0.000124,37,O +2019-04-14,58587,0.055085,0.398276,-0.1330707,0.0009118,-0.103874,-0.011299,0.000174,-0.000153,37,O +2019-04-15,58588,0.055163,0.399057,-0.1340708,0.0010927,-0.103443,-0.011323,0.000165,-0.000182,37,O +2019-04-16,58589,0.055809,0.399974,-0.1352472,0.0012953,-0.103206,-0.011221,0.000155,-0.000211,37,O +2019-04-17,58590,0.056668,0.400687,-0.1365967,0.0014476,-0.103385,-0.011075,0.000103,-0.000210,37,O +2019-04-18,58591,0.057766,0.401049,-0.1380786,0.0014767,-0.103855,-0.011057,0.000039,-0.000202,37,O +2019-04-19,58592,0.058599,0.401935,-0.1394963,0.0013893,-0.104449,-0.011222,-0.000041,-0.000235,37,O +2019-04-20,58593,0.059160,0.402829,-0.1408141,0.0012170,-0.104959,-0.011386,-0.000126,-0.000284,37,O +2019-04-21,58594,0.060249,0.403665,-0.1419326,0.0010019,-0.105044,-0.011352,-0.000114,-0.000268,37,O +2019-04-22,58595,0.061350,0.404826,-0.1427672,0.0007530,-0.104854,-0.011231,-0.000053,-0.000221,37,O +2019-04-23,58596,0.062199,0.406269,-0.1433845,0.0005894,-0.104625,-0.011216,0.000009,-0.000173,37,O +2019-04-24,58597,0.062809,0.407465,-0.1440057,0.0005152,-0.104494,-0.011345,0.000070,-0.000125,37,O +2019-04-25,58598,0.063457,0.408277,-0.1444919,0.0004827,-0.104633,-0.011529,0.000067,-0.000122,37,O +2019-04-26,58599,0.064471,0.408795,-0.1449987,0.0005138,-0.104749,-0.011597,0.000047,-0.000130,37,O +2019-04-27,58600,0.065708,0.409250,-0.1455687,0.0005617,-0.104588,-0.011603,0.000030,-0.000204,37,O +2019-04-28,58601,0.067070,0.409477,-0.1461789,0.0006526,-0.104171,-0.011600,0.000014,-0.000304,37,O +2019-04-29,58602,0.068612,0.409997,-0.1468502,0.0007258,-0.103481,-0.011464,0.000113,-0.000247,37,O +2019-04-30,58603,0.070177,0.410662,-0.1476395,0.0008642,-0.103053,-0.011305,0.000221,-0.000176,37,O +2019-05-01,58604,0.072222,0.411351,-0.1485556,0.0010083,-0.103267,-0.011155,0.000203,-0.000173,37,O +2019-05-02,58605,0.074216,0.412141,-0.1496023,0.0010507,-0.103724,-0.010994,0.000152,-0.000188,37,O +2019-05-03,58606,0.075847,0.412864,-0.1506622,0.0010023,-0.104158,-0.010912,0.000100,-0.000202,37,O +2019-05-04,58607,0.076746,0.413367,-0.1516396,0.0009372,-0.104387,-0.010994,0.000080,-0.000205,37,O +2019-05-05,58608,0.077564,0.413858,-0.1525399,0.0008497,-0.104447,-0.011231,0.000071,-0.000202,37,O +2019-05-06,58609,0.078131,0.414792,-0.1533570,0.0007607,-0.104416,-0.011506,0.000063,-0.000199,37,O +2019-05-07,58610,0.078967,0.415625,-0.1540793,0.0006757,-0.104425,-0.011684,0.000054,-0.000197,37,O +2019-05-08,58611,0.080111,0.416276,-0.1547104,0.0005839,-0.104580,-0.011720,0.000046,-0.000194,37,O +2019-05-09,58612,0.081678,0.416736,-0.1552848,0.0005478,-0.104804,-0.011662,0.000054,-0.000173,37,O +2019-05-10,58613,0.083198,0.417395,-0.1558351,0.0005435,-0.104898,-0.011624,0.000067,-0.000148,37,O +2019-05-11,58614,0.084358,0.418035,-0.1564141,0.0006254,-0.104663,-0.011655,0.000073,-0.000143,37,O +2019-05-12,58615,0.085071,0.418630,-0.1571147,0.0007676,-0.104099,-0.011669,0.000075,-0.000145,37,O +2019-05-13,58616,0.085813,0.418754,-0.1579536,0.0009279,-0.103497,-0.011568,0.000078,-0.000148,37,O +2019-05-14,58617,0.086600,0.419108,-0.1589774,0.0011158,-0.103238,-0.011364,0.000081,-0.000151,37,O +2019-05-15,58618,0.087514,0.419659,-0.1601841,0.0012695,-0.103538,-0.011173,0.000067,-0.000145,37,O +2019-05-16,58619,0.088999,0.420446,-0.1614640,0.0012897,-0.104212,-0.011128,0.000048,-0.000136,37,O +2019-05-17,58620,0.090613,0.421097,-0.1627193,0.0012090,-0.104900,-0.011227,0.000029,-0.000128,37,O +2019-05-18,58621,0.092152,0.421974,-0.1637982,0.0009581,-0.105215,-0.011462,0.000049,-0.000242,37,O +2019-05-19,58622,0.093282,0.422813,-0.1646108,0.0006955,-0.105164,-0.011648,0.000083,-0.000404,37,O +2019-05-20,58623,0.094326,0.423729,-0.1652087,0.0004967,-0.105089,-0.011504,0.000058,-0.000314,37,O +2019-05-21,58624,0.095131,0.424424,-0.1656005,0.0003204,-0.105045,-0.011387,0.000033,-0.000223,37,O +2019-05-22,58625,0.096224,0.424661,-0.1658605,0.0002467,-0.105075,-0.011410,0.000031,-0.000186,37,O +2019-05-23,58626,0.097554,0.425052,-0.1660855,0.0002189,-0.105179,-0.011489,0.000036,-0.000164,37,O +2019-05-24,58627,0.099078,0.425636,-0.1663191,0.0002588,-0.105259,-0.011527,0.000041,-0.000141,37,O +2019-05-25,58628,0.100677,0.426354,-0.1665911,0.0002955,-0.105209,-0.011544,0.000050,-0.000147,37,O +2019-05-26,58629,0.101998,0.427131,-0.1669195,0.0003554,-0.105032,-0.011567,0.000059,-0.000163,37,O +2019-05-27,58630,0.102789,0.428011,-0.1673156,0.0004345,-0.104834,-0.011609,0.000068,-0.000179,37,O +2019-05-28,58631,0.103380,0.428645,-0.1677794,0.0005092,-0.104791,-0.011621,0.000077,-0.000195,37,O +2019-05-29,58632,0.104189,0.429128,-0.1683015,0.0005697,-0.105028,-0.011535,0.000087,-0.000211,37,O +2019-05-30,58633,0.105214,0.429435,-0.1688666,0.0006065,-0.105585,-0.011324,0.000066,-0.000203,37,O +2019-05-31,58634,0.106824,0.429366,-0.1694735,0.0006029,-0.106194,-0.011093,0.000037,-0.000187,37,O +2019-06-01,58635,0.109192,0.429288,-0.1700445,0.0005755,-0.106503,-0.010983,0.000047,-0.000178,37,O +2019-06-02,58636,0.111767,0.429661,-0.1705907,0.0004583,-0.106507,-0.011056,0.000072,-0.000171,37,O +2019-06-03,58637,0.114354,0.430266,-0.1709787,0.0003102,-0.106379,-0.011266,0.000097,-0.000165,37,O +2019-06-04,58638,0.117030,0.430851,-0.1712318,0.0002154,-0.106310,-0.011479,0.000121,-0.000158,37,O +2019-06-05,58639,0.119239,0.431321,-0.1714035,0.0001493,-0.106502,-0.011554,0.000089,-0.000139,37,O +2019-06-06,58640,0.121052,0.431429,-0.1715420,0.0001022,-0.106769,-0.011472,0.000041,-0.000116,37,O +2019-06-07,58641,0.122690,0.430872,-0.1716602,0.0001382,-0.106950,-0.011322,-0.000007,-0.000093,37,O +2019-06-08,58642,0.124490,0.430649,-0.1718378,0.0002370,-0.106893,-0.011241,-0.000022,-0.000097,37,O +2019-06-09,58643,0.126185,0.430126,-0.1721356,0.0003910,-0.106666,-0.011240,-0.000025,-0.000111,37,O +2019-06-10,58644,0.128346,0.429871,-0.1725999,0.0005326,-0.106402,-0.011245,-0.000029,-0.000125,37,O +2019-06-11,58645,0.130420,0.429746,-0.1732075,0.0006185,-0.106276,-0.011200,-0.000032,-0.000139,37,O +2019-06-12,58646,0.132347,0.429558,-0.1738778,0.0006416,-0.106466,-0.011124,-0.000035,-0.000153,37,O +2019-06-13,58647,0.134380,0.429399,-0.1744966,0.0005803,-0.106937,-0.011074,-0.000015,-0.000167,37,O +2019-06-14,58648,0.136665,0.429210,-0.1750200,0.0004295,-0.107533,-0.011074,0.000011,-0.000182,37,O +2019-06-15,58649,0.138696,0.429013,-0.1753572,0.0002232,-0.108004,-0.011052,0.000023,-0.000153,37,O +2019-06-16,58650,0.140244,0.428691,-0.1754768,0.0000056,-0.108150,-0.011015,0.000030,-0.000107,37,O +2019-06-17,58651,0.141742,0.428108,-0.1753998,-0.0001226,-0.108037,-0.010995,0.000037,-0.000062,37,O +2019-06-18,58652,0.143306,0.427548,-0.1752467,-0.0001850,-0.107884,-0.011007,0.000044,-0.000016,37,O +2019-06-19,58653,0.144520,0.426783,-0.1750128,-0.0002563,-0.107882,-0.011148,0.000034,-0.000085,37,O +2019-06-20,58654,0.145785,0.426239,-0.1747707,-0.0002204,-0.108008,-0.011288,0.000020,-0.000184,37,O +2019-06-21,58655,0.147173,0.426049,-0.1745848,-0.0001854,-0.108113,-0.011328,0.000045,-0.000225,37,O +2019-06-22,58656,0.148438,0.425869,-0.1744462,-0.0001293,-0.108294,-0.011325,0.000058,-0.000222,37,O +2019-06-23,58657,0.149329,0.425822,-0.1743743,-0.0000398,-0.108487,-0.011356,0.000060,-0.000210,37,O +2019-06-24,58658,0.149642,0.425359,-0.1743632,0.0000263,-0.108584,-0.011405,0.000063,-0.000199,37,O +2019-06-25,58659,0.150443,0.424519,-0.1744216,0.0000533,-0.108638,-0.011396,0.000065,-0.000187,37,O +2019-06-26,58660,0.151503,0.423564,-0.1744781,0.0000439,-0.108850,-0.011281,0.000074,-0.000172,37,O +2019-06-27,58661,0.153050,0.422505,-0.1745257,0.0000453,-0.109396,-0.011082,0.000085,-0.000155,37,O +2019-06-28,58662,0.154952,0.422105,-0.1745566,0.0000056,-0.110270,-0.010897,0.000038,-0.000172,37,O +2019-06-29,58663,0.156506,0.421788,-0.1745339,-0.0000611,-0.110904,-0.010776,0.000009,-0.000206,37,O +2019-06-30,58664,0.157773,0.421437,-0.1744325,-0.0001824,-0.111115,-0.010766,-0.000007,-0.000241,37,O +2019-07-01,58665,0.158510,0.420694,-0.1741775,-0.0003108,-0.111109,-0.010917,-0.000023,-0.000277,37,O +2019-07-02,58666,0.158923,0.419603,-0.1738182,-0.0004383,-0.111144,-0.011198,-0.000039,-0.000313,37,O +2019-07-03,58667,0.159301,0.418248,-0.1733282,-0.0005289,-0.111185,-0.011393,-0.000035,-0.000285,37,O +2019-07-04,58668,0.159771,0.417182,-0.1727712,-0.0005358,-0.111123,-0.011389,-0.000027,-0.000239,37,O +2019-07-05,58669,0.160760,0.416147,-0.1722981,-0.0004260,-0.110956,-0.011199,-0.000018,-0.000193,37,O +2019-07-06,58670,0.162741,0.415345,-0.1719953,-0.0002040,-0.110865,-0.011009,-0.000013,-0.000167,37,O +2019-07-07,58671,0.165082,0.415030,-0.1719175,-0.0000221,-0.110958,-0.010950,-0.000008,-0.000149,37,O +2019-07-08,58672,0.167058,0.414824,-0.1719241,0.0000585,-0.111157,-0.011001,-0.000004,-0.000131,37,O +2019-07-09,58673,0.168829,0.414243,-0.1720129,0.0000734,-0.111316,-0.011058,0.000000,-0.000113,37,O +2019-07-10,58674,0.170656,0.413399,-0.1720373,0.0000259,-0.111499,-0.011080,-0.000029,-0.000104,37,O +2019-07-11,58675,0.172168,0.412428,-0.1720134,-0.0001153,-0.111779,-0.011068,-0.000067,-0.000097,37,O +2019-07-12,58676,0.173303,0.411231,-0.1717954,-0.0003342,-0.112239,-0.011038,-0.000106,-0.000091,37,O +2019-07-13,58677,0.174483,0.409932,-0.1713282,-0.0005760,-0.112705,-0.011012,-0.000114,-0.000096,37,O +2019-07-14,58678,0.176050,0.408613,-0.1706787,-0.0007695,-0.113005,-0.011022,-0.000110,-0.000105,37,O +2019-07-15,58679,0.177687,0.407424,-0.1698085,-0.0009133,-0.113051,-0.011115,-0.000107,-0.000114,37,O +2019-07-16,58680,0.179332,0.406414,-0.1688618,-0.0009571,-0.112919,-0.011274,-0.000103,-0.000123,37,O +2019-07-17,58681,0.180565,0.406010,-0.1679382,-0.0009163,-0.112696,-0.011371,-0.000066,-0.000108,37,O +2019-07-18,58682,0.181617,0.405295,-0.1670432,-0.0008163,-0.112563,-0.011323,-0.000020,-0.000087,37,O +2019-07-19,58683,0.182544,0.404573,-0.1662851,-0.0006897,-0.112591,-0.011157,0.000027,-0.000066,37,O +2019-07-20,58684,0.183047,0.403589,-0.1656322,-0.0005755,-0.112918,-0.011058,0.000016,-0.000096,37,O +2019-07-21,58685,0.183724,0.402446,-0.1651379,-0.0004998,-0.113327,-0.011085,-0.000014,-0.000144,37,O +2019-07-22,58686,0.184514,0.401331,-0.1646548,-0.0004473,-0.113583,-0.011177,-0.000045,-0.000193,37,O +2019-07-23,58687,0.185834,0.400342,-0.1642195,-0.0003851,-0.113640,-0.011221,-0.000075,-0.000241,37,O +2019-07-24,58688,0.187682,0.399458,-0.1638659,-0.0003124,-0.113699,-0.011118,-0.000079,-0.000221,37,O +2019-07-25,58689,0.189630,0.398277,-0.1635104,-0.0003293,-0.114129,-0.010988,-0.000075,-0.000182,37,O +2019-07-26,58690,0.191786,0.396756,-0.1631804,-0.0003897,-0.114903,-0.010914,-0.000071,-0.000144,37,O +2019-07-27,58691,0.194250,0.395533,-0.1627645,-0.0004129,-0.115571,-0.010888,-0.000067,-0.000125,37,O +2019-07-28,58692,0.196630,0.394957,-0.1623692,-0.0004457,-0.115787,-0.010859,-0.000063,-0.000113,37,O +2019-07-29,58693,0.198637,0.394721,-0.1618353,-0.0005432,-0.115685,-0.010884,-0.000059,-0.000101,37,O +2019-07-30,58694,0.200514,0.394157,-0.1612463,-0.0006170,-0.115580,-0.011050,-0.000054,-0.000089,37,O +2019-07-31,58695,0.202626,0.393370,-0.1606707,-0.0005429,-0.115528,-0.011286,-0.000056,-0.000081,37,O +2019-08-01,58696,0.204690,0.392301,-0.1602267,-0.0004012,-0.115349,-0.011371,-0.000059,-0.000074,37,O +2019-08-02,58697,0.206262,0.391220,-0.1598692,-0.0002143,-0.115077,-0.011222,-0.000062,-0.000067,37,O +2019-08-03,58698,0.207816,0.390218,-0.1597619,0.0000136,-0.115004,-0.011008,-0.000073,-0.000056,37,O +2019-08-04,58699,0.209328,0.389372,-0.1598705,0.0002047,-0.115286,-0.010928,-0.000088,-0.000044,37,O +2019-08-05,58700,0.210566,0.388756,-0.1601388,0.0002868,-0.115791,-0.010971,-0.000102,-0.000033,37,O +2019-08-06,58701,0.211602,0.388370,-0.1604604,0.0002509,-0.116247,-0.011005,-0.000117,-0.000021,37,O +2019-08-07,58702,0.212386,0.388019,-0.1606720,0.0001189,-0.116361,-0.011020,-0.000095,-0.000017,37,O +2019-08-08,58703,0.212729,0.387457,-0.1606950,-0.0000725,-0.116228,-0.011085,-0.000064,-0.000015,37,O +2019-08-09,58704,0.213213,0.386456,-0.1605177,-0.0002884,-0.116092,-0.011205,-0.000032,-0.000013,37,O +2019-08-10,58705,0.213618,0.385343,-0.1600900,-0.0005104,-0.116211,-0.011294,-0.000025,-0.000003,37,O +2019-08-11,58706,0.213982,0.383799,-0.1595070,-0.0006517,-0.116484,-0.011321,-0.000027,0.000011,37,O +2019-08-12,58707,0.214516,0.382169,-0.1588184,-0.0007450,-0.116658,-0.011349,-0.000029,0.000025,37,O +2019-08-13,58708,0.214944,0.380545,-0.1580556,-0.0007526,-0.116598,-0.011422,-0.000031,0.000039,37,O +2019-08-14,58709,0.215570,0.378976,-0.1573339,-0.0006479,-0.116386,-0.011487,-0.000031,0.000025,37,O +2019-08-15,58710,0.216255,0.377777,-0.1567325,-0.0005263,-0.116211,-0.011396,-0.000031,0.000003,37,O +2019-08-16,58711,0.216650,0.376719,-0.1562758,-0.0004420,-0.116199,-0.011146,-0.000031,-0.000019,37,O +2019-08-17,58712,0.216754,0.375676,-0.1558223,-0.0003914,-0.116312,-0.010903,-0.000016,-0.000041,37,O +2019-08-18,58713,0.216967,0.374479,-0.1555081,-0.0003343,-0.116444,-0.010820,0.000005,-0.000065,37,O +2019-08-19,58714,0.216955,0.373221,-0.1552168,-0.0002577,-0.116428,-0.010870,0.000027,-0.000088,37,O +2019-08-20,58715,0.217091,0.371942,-0.1549961,-0.0001989,-0.116217,-0.010917,0.000048,-0.000111,37,O +2019-08-21,58716,0.217230,0.370375,-0.1548084,-0.0001647,-0.116189,-0.010821,0.000005,-0.000050,37,O +2019-08-22,58717,0.217272,0.368758,-0.1546673,-0.0001669,-0.116555,-0.010733,-0.000055,0.000032,37,O +2019-08-23,58718,0.217196,0.367299,-0.1545252,-0.0001604,-0.117316,-0.010760,-0.000114,0.000115,37,O +2019-08-24,58719,0.216899,0.365602,-0.1543575,-0.0002102,-0.117963,-0.010926,-0.000123,0.000111,37,O +2019-08-25,58720,0.216628,0.363656,-0.1540886,-0.0003062,-0.118165,-0.011042,-0.000114,0.000075,37,O +2019-08-26,58721,0.216427,0.361682,-0.1537159,-0.0004026,-0.117983,-0.011065,-0.000104,0.000039,37,O +2019-08-27,58722,0.216384,0.359848,-0.1533169,-0.0004038,-0.117718,-0.011113,-0.000094,0.000003,37,O +2019-08-28,58723,0.216234,0.357990,-0.1529938,-0.0002607,-0.117507,-0.011174,-0.000089,-0.000001,37,O +2019-08-29,58724,0.215974,0.356213,-0.1528093,-0.0000692,-0.117261,-0.011118,-0.000086,0.000003,37,O +2019-08-30,58725,0.215295,0.354392,-0.1528582,0.0001634,-0.117017,-0.010878,-0.000083,0.000007,37,O +2019-08-31,58726,0.214589,0.352607,-0.1531164,0.0003889,-0.117000,-0.010630,-0.000090,0.000020,37,O +2019-09-01,58727,0.214251,0.351024,-0.1536230,0.0005509,-0.117270,-0.010580,-0.000102,0.000037,37,O +2019-09-02,58728,0.214229,0.349770,-0.1542362,0.0006158,-0.117690,-0.010657,-0.000114,0.000054,37,O +2019-09-03,58729,0.213821,0.348481,-0.1548126,0.0005143,-0.118091,-0.010651,-0.000126,0.000071,37,O +2019-09-04,58730,0.213451,0.346759,-0.1552653,0.0003387,-0.118299,-0.010579,-0.000129,0.000075,37,O +2019-09-05,58731,0.213287,0.345150,-0.1555174,0.0001664,-0.118238,-0.010634,-0.000131,0.000077,37,O +2019-09-06,58732,0.213284,0.343292,-0.1555427,-0.0000562,-0.117998,-0.010893,-0.000132,0.000078,37,O +2019-09-07,58733,0.213605,0.341584,-0.1553511,-0.0002258,-0.117758,-0.011185,-0.000095,0.000075,37,O +2019-09-08,58734,0.213748,0.340214,-0.1551104,-0.0003264,-0.117724,-0.011307,-0.000044,0.000071,37,O +2019-09-09,58735,0.213582,0.338873,-0.1547174,-0.0003835,-0.117754,-0.011258,0.000008,0.000066,37,O +2019-09-10,58736,0.212916,0.337633,-0.1543020,-0.0003792,-0.117596,-0.011165,0.000059,0.000062,37,O +2019-09-11,58737,0.211643,0.336271,-0.1539400,-0.0003457,-0.117407,-0.011071,0.000034,0.000068,37,O +2019-09-12,58738,0.210279,0.334464,-0.1535993,-0.0003023,-0.117223,-0.010907,-0.000010,0.000078,37,O +2019-09-13,58739,0.209357,0.332511,-0.1533809,-0.0001592,-0.117151,-0.010629,-0.000054,0.000087,37,O +2019-09-14,58740,0.208780,0.330745,-0.1532910,-0.0000117,-0.117083,-0.010329,-0.000056,0.000098,37,O +2019-09-15,58741,0.208414,0.329530,-0.1533171,0.0000314,-0.116993,-0.010161,-0.000042,0.000109,37,O +2019-09-16,58742,0.207861,0.328404,-0.1533320,-0.0000025,-0.116843,-0.010154,-0.000029,0.000120,37,O +2019-09-17,58743,0.207375,0.326891,-0.1533303,-0.0000354,-0.116621,-0.010198,-0.000015,0.000132,37,O +2019-09-18,58744,0.206919,0.325493,-0.1532853,-0.0000746,-0.116461,-0.010216,-0.000012,0.000135,37,O +2019-09-19,58745,0.206058,0.324124,-0.1531654,-0.0001887,-0.116519,-0.010242,-0.000012,0.000136,37,O +2019-09-20,58746,0.204867,0.323038,-0.1529207,-0.0003054,-0.116856,-0.010355,-0.000012,0.000138,37,O +2019-09-21,58747,0.203740,0.321672,-0.1525495,-0.0004187,-0.117239,-0.010517,0.000004,0.000154,37,O +2019-09-22,58748,0.202952,0.320373,-0.1521046,-0.0004659,-0.117374,-0.010607,0.000026,0.000175,37,O +2019-09-23,58749,0.202247,0.319367,-0.1516530,-0.0004642,-0.117154,-0.010553,0.000049,0.000197,37,O +2019-09-24,58750,0.201645,0.318571,-0.1512166,-0.0003760,-0.116741,-0.010403,0.000071,0.000219,37,O +2019-09-25,58751,0.201081,0.317719,-0.1508992,-0.0001448,-0.116340,-0.010248,0.000085,0.000191,37,O +2019-09-26,58752,0.200126,0.317163,-0.1508833,0.0001271,-0.116027,-0.010002,0.000096,0.000150,37,O +2019-09-27,58753,0.199436,0.316266,-0.1512096,0.0004451,-0.115877,-0.009666,0.000107,0.000110,37,O +2019-09-28,58754,0.199110,0.315576,-0.1518123,0.0006726,-0.116053,-0.009432,0.000076,0.000093,37,O +2019-09-29,58755,0.198862,0.314678,-0.1525147,0.0007271,-0.116385,-0.009501,0.000030,0.000086,37,O +2019-09-30,58756,0.198848,0.313423,-0.1532049,0.0006476,-0.116658,-0.009755,-0.000016,0.000079,37,O +2019-10-01,58757,0.198410,0.312207,-0.1537485,0.0003901,-0.116838,-0.009882,-0.000063,0.000072,37,O +2019-10-02,58758,0.197567,0.311034,-0.1539883,0.0000893,-0.116830,-0.009751,-0.000052,0.000123,37,O +2019-10-03,58759,0.196521,0.310013,-0.1539122,-0.0001661,-0.116702,-0.009698,-0.000029,0.000146,37,O +2019-10-04,58760,0.195512,0.308733,-0.1536855,-0.0003216,-0.116430,-0.009908,-0.000007,0.000153,37,O +2019-10-05,58761,0.194646,0.307613,-0.1532978,-0.0004249,-0.116142,-0.010226,0.000015,0.000160,37,O +2019-10-06,58762,0.193612,0.306147,-0.1528333,-0.0004566,-0.116021,-0.010363,0.000037,0.000167,37,O +2019-10-07,58763,0.192696,0.304968,-0.1523685,-0.0004190,-0.116014,-0.010226,0.000059,0.000174,37,O +2019-10-08,58764,0.191558,0.303570,-0.1519645,-0.0003952,-0.115900,-0.009968,0.000081,0.000181,37,O +2019-10-09,58765,0.190547,0.301914,-0.1516533,-0.0002629,-0.115598,-0.009766,0.000103,0.000188,37,O +2019-10-10,58766,0.189439,0.300716,-0.1514464,-0.0001207,-0.115448,-0.009637,0.000044,0.000190,37,O +2019-10-11,58767,0.188637,0.299690,-0.1513803,0.0000031,-0.115427,-0.009477,-0.000035,0.000191,37,O +2019-10-12,58768,0.187871,0.299356,-0.1514616,0.0001639,-0.115239,-0.009268,-0.000022,0.000178,37,O +2019-10-13,58769,0.186230,0.299271,-0.1516517,0.0002330,-0.114968,-0.009087,0.000025,0.000159,37,O +2019-10-14,58770,0.184374,0.298532,-0.1519120,0.0002854,-0.114713,-0.009018,0.000072,0.000141,37,O +2019-10-15,58771,0.182663,0.297785,-0.1522347,0.0003192,-0.114516,-0.009061,0.000119,0.000122,37,O +2019-10-16,58772,0.181451,0.297182,-0.1525644,0.0003320,-0.114510,-0.009117,0.000110,0.000133,37,O +2019-10-17,58773,0.179963,0.296654,-0.1528796,0.0002835,-0.114561,-0.009165,0.000087,0.000151,37,O +2019-10-18,58774,0.178272,0.295649,-0.1531347,0.0002222,-0.114664,-0.009217,0.000063,0.000169,37,O +2019-10-19,58775,0.176769,0.294516,-0.1533264,0.0001545,-0.114780,-0.009291,0.000060,0.000171,37,O +2019-10-20,58776,0.175243,0.293466,-0.1534304,0.0000914,-0.114845,-0.009340,0.000064,0.000167,37,O +2019-10-21,58777,0.173642,0.292375,-0.1535058,0.0000687,-0.114712,-0.009312,0.000069,0.000162,37,O +2019-10-22,58778,0.172439,0.291301,-0.1536109,0.0001472,-0.114334,-0.009178,0.000074,0.000158,37,O +2019-10-23,58779,0.171356,0.290381,-0.1538184,0.0003219,-0.113832,-0.008904,0.000086,0.000173,37,O +2019-10-24,58780,0.170144,0.289971,-0.1542370,0.0005318,-0.113452,-0.008499,0.000101,0.000194,37,O +2019-10-25,58781,0.168762,0.289141,-0.1549127,0.0007802,-0.113389,-0.008063,0.000115,0.000214,37,O +2019-10-26,58782,0.167818,0.287812,-0.1558032,0.0009548,-0.113673,-0.007843,0.000109,0.000208,37,O +2019-10-27,58783,0.167273,0.286523,-0.1568092,0.0009718,-0.114031,-0.007985,0.000095,0.000193,37,O +2019-10-28,58784,0.167133,0.285481,-0.1577255,0.0008493,-0.114178,-0.008351,0.000081,0.000178,37,O +2019-10-29,58785,0.166908,0.284350,-0.1584554,0.0006110,-0.114086,-0.008614,0.000067,0.000162,37,O +2019-10-30,58786,0.167018,0.283062,-0.1589241,0.0003454,-0.113914,-0.008570,0.000055,0.000185,37,O +2019-10-31,58787,0.166656,0.282117,-0.1591501,0.0001216,-0.113761,-0.008419,0.000043,0.000217,37,O +2019-11-01,58788,0.166024,0.281083,-0.1592044,0.0000290,-0.113520,-0.008438,0.000058,0.000223,37,O +2019-11-02,58789,0.165338,0.280270,-0.1591866,-0.0000229,-0.113233,-0.008601,0.000082,0.000220,37,O +2019-11-03,58790,0.164712,0.279387,-0.1591777,0.0000031,-0.113011,-0.008677,0.000106,0.000217,37,O +2019-11-04,58791,0.163921,0.278764,-0.1591947,0.0000618,-0.112875,-0.008530,0.000130,0.000213,37,O +2019-11-05,58792,0.163092,0.278229,-0.1592855,0.0001031,-0.112734,-0.008263,0.000154,0.000210,37,O +2019-11-06,58793,0.162362,0.277999,-0.1594469,0.0002318,-0.112588,-0.008098,0.000155,0.000182,37,O +2019-11-07,58794,0.161420,0.277887,-0.1597681,0.0003988,-0.112461,-0.008077,0.000148,0.000148,37,O +2019-11-08,58795,0.160475,0.277218,-0.1602407,0.0005640,-0.112391,-0.008075,0.000142,0.000113,37,O +2019-11-09,58796,0.159241,0.276588,-0.1608634,0.0006676,-0.112381,-0.007923,0.000123,0.000111,37,O +2019-11-10,58797,0.157895,0.275927,-0.1615582,0.0007108,-0.112372,-0.007651,0.000099,0.000120,37,O +2019-11-11,58798,0.156727,0.275260,-0.1622553,0.0006808,-0.112392,-0.007409,0.000076,0.000129,37,O +2019-11-12,58799,0.155603,0.274984,-0.1629060,0.0006010,-0.112500,-0.007328,0.000052,0.000138,37,O +2019-11-13,58800,0.154311,0.275077,-0.1634446,0.0004930,-0.112607,-0.007392,0.000037,0.000174,37,O +2019-11-14,58801,0.153268,0.274960,-0.1639043,0.0003652,-0.112590,-0.007518,0.000026,0.000216,37,O +2019-11-15,58802,0.152222,0.274968,-0.1641959,0.0002686,-0.112434,-0.007593,0.000014,0.000258,37,O +2019-11-16,58803,0.150295,0.275080,-0.1643655,0.0001742,-0.112208,-0.007621,0.000022,0.000250,37,O +2019-11-17,58804,0.147587,0.274490,-0.1644541,0.0000196,-0.112034,-0.007606,0.000039,0.000222,37,O +2019-11-18,58805,0.145289,0.273683,-0.1645155,0.0000739,-0.111862,-0.007577,0.000055,0.000194,37,O +2019-11-19,58806,0.143281,0.273081,-0.1646594,0.0002184,-0.111548,-0.007535,0.000071,0.000166,37,O +2019-11-20,58807,0.141572,0.272389,-0.1650117,0.0004566,-0.111071,-0.007394,0.000102,0.000167,37,O +2019-11-21,58808,0.139739,0.271754,-0.1655856,0.0006891,-0.110682,-0.007141,0.000137,0.000174,37,O +2019-11-22,58809,0.137935,0.270986,-0.1663474,0.0008501,-0.110631,-0.006855,0.000172,0.000182,37,O +2019-11-23,58810,0.135854,0.270490,-0.1672098,0.0008984,-0.111089,-0.006702,0.000145,0.000194,37,O +2019-11-24,58811,0.133695,0.270065,-0.1680987,0.0008706,-0.111706,-0.006804,0.000095,0.000208,37,O +2019-11-25,58812,0.131862,0.269518,-0.1688806,0.0007028,-0.112110,-0.007079,0.000045,0.000222,37,O +2019-11-26,58813,0.130125,0.269096,-0.1694679,0.0004439,-0.112184,-0.007294,-0.000005,0.000236,37,O +2019-11-27,58814,0.128691,0.269088,-0.1698161,0.0002162,-0.111964,-0.007333,-0.000021,0.000212,37,O +2019-11-28,58815,0.127259,0.269277,-0.1699512,0.0001048,-0.111589,-0.007240,0.000013,0.000173,37,O +2019-11-29,58816,0.126025,0.269630,-0.1700093,0.0000503,-0.111219,-0.007182,0.000062,0.000133,37,O +2019-11-30,58817,0.124622,0.269887,-0.1700295,0.0000065,-0.110916,-0.007195,0.000095,0.000121,37,O +2019-12-01,58818,0.122977,0.270474,-0.1700083,0.0000115,-0.110641,-0.007209,0.000126,0.000111,37,O +2019-12-02,58819,0.121295,0.270919,-0.1700652,0.0001125,-0.110426,-0.007124,0.000156,0.000102,37,O +2019-12-03,58820,0.119056,0.271391,-0.1702069,0.0002032,-0.110287,-0.006980,0.000187,0.000093,37,O +2019-12-04,58821,0.116202,0.271402,-0.1704075,0.0002412,-0.109773,-0.006858,0.000394,0.000129,37,O +2019-12-05,58822,0.113387,0.271331,-0.1706831,0.0002888,-0.109907,-0.006923,0.000357,0.000094,37,O +2019-12-06,58823,0.111157,0.271130,-0.1710324,0.0003641,-0.110252,-0.007017,0.000235,0.000034,37,O +2019-12-07,58824,0.109446,0.271083,-0.1714476,0.0004120,-0.110410,-0.006891,0.000179,0.000043,37,O +2019-12-08,58825,0.107845,0.270977,-0.1718773,0.0004384,-0.110499,-0.006557,0.000148,0.000076,37,O +2019-12-09,58826,0.106731,0.270915,-0.1722563,0.0003279,-0.110625,-0.006179,0.000118,0.000110,37,O +2019-12-10,58827,0.105853,0.271007,-0.1725299,0.0001560,-0.110807,-0.005966,0.000087,0.000144,37,O +2019-12-11,58828,0.105246,0.271040,-0.1726501,0.0000269,-0.110865,-0.006060,0.000098,0.000136,37,O +2019-12-12,58829,0.104919,0.271256,-0.1726192,-0.0001170,-0.110755,-0.006347,0.000121,0.000117,37,O +2019-12-13,58830,0.104891,0.271967,-0.1724695,-0.0001672,-0.110456,-0.006619,0.000143,0.000097,37,O +2019-12-14,58831,0.104387,0.273241,-0.1722776,-0.0001813,-0.110018,-0.006695,0.000172,0.000104,37,O +2019-12-15,58832,0.103420,0.274169,-0.1721003,-0.0001567,-0.109579,-0.006594,0.000202,0.000119,37,O +2019-12-16,58833,0.101523,0.274834,-0.1719915,-0.0000768,-0.109207,-0.006442,0.000233,0.000135,37,O +2019-12-17,58834,0.099491,0.275064,-0.1720193,0.0001269,-0.108887,-0.006347,0.000264,0.000150,37,O +2019-12-18,58835,0.097486,0.275323,-0.1722457,0.0003512,-0.108602,-0.006311,0.000295,0.000166,37,O +2019-12-19,58836,0.095902,0.275669,-0.1727030,0.0005690,-0.108659,-0.006343,0.000230,0.000107,37,O +2019-12-20,58837,0.095103,0.276115,-0.1733419,0.0006708,-0.108997,-0.006361,0.000140,0.000029,37,O +2019-12-21,58838,0.094742,0.276421,-0.1740825,0.0006995,-0.109367,-0.006353,0.000139,0.000001,37,O +2019-12-22,58839,0.094482,0.277227,-0.1748044,0.0006483,-0.109770,-0.006414,0.000173,-0.000008,37,O +2019-12-23,58840,0.093397,0.278386,-0.1753803,0.0005092,-0.110048,-0.006544,0.000206,-0.000017,37,O +2019-12-24,58841,0.091836,0.279097,-0.1757728,0.0003494,-0.110009,-0.006649,0.000239,-0.000026,37,O +2019-12-25,58842,0.090305,0.279607,-0.1760220,0.0001839,-0.109785,-0.006611,0.000227,0.000020,37,O +2019-12-26,58843,0.088530,0.280066,-0.1761523,0.0000805,-0.109486,-0.006498,0.000203,0.000080,37,O +2019-12-27,58844,0.086894,0.280745,-0.1762143,0.0000471,-0.109262,-0.006403,0.000180,0.000140,37,O +2019-12-28,58845,0.085073,0.281330,-0.1762581,0.0000518,-0.109039,-0.006433,0.000201,0.000123,37,O +2019-12-29,58846,0.082939,0.281710,-0.1763377,0.0001236,-0.108827,-0.006497,0.000239,0.000079,37,O +2019-12-30,58847,0.080306,0.281800,-0.1764974,0.0002229,-0.108655,-0.006532,0.000276,0.000034,37,O +2019-12-31,58848,0.078246,0.281929,-0.1767593,0.0003452,-0.108568,-0.006562,0.000314,-0.000011,37,O +2020-01-01,58849,0.076609,0.282358,-0.1771222,0.0004455,-0.108588,-0.006586,0.000348,0.000003,37,O +2020-01-02,58850,0.074635,0.282666,-0.1775806,0.0004667,-0.108606,-0.006644,0.000382,0.000033,37,O +2020-01-03,58851,0.072663,0.283156,-0.1781029,0.0004803,-0.108526,-0.006664,0.000416,0.000062,37,O +2020-01-04,58852,0.071338,0.284013,-0.1786507,0.0004801,-0.108550,-0.006567,0.000382,0.000067,37,O +2020-01-05,58853,0.070121,0.284887,-0.1791377,0.0004064,-0.108694,-0.006317,0.000322,0.000064,37,O +2020-01-06,58854,0.068393,0.285277,-0.1794674,0.0002265,-0.108947,-0.006003,0.000263,0.000060,37,O +2020-01-07,58855,0.066587,0.285482,-0.1796058,0.0000717,-0.109259,-0.005786,0.000203,0.000056,37,O +2020-01-08,58856,0.064905,0.285932,-0.1795597,-0.0000717,-0.109555,-0.005800,0.000144,0.000053,37,O +2020-01-09,58857,0.063591,0.286537,-0.1793746,-0.0002132,-0.109698,-0.006077,0.000127,0.000036,37,O +2020-01-10,58858,0.062631,0.287462,-0.1791201,-0.0002979,-0.109691,-0.006467,0.000121,0.000017,37,O +2020-01-11,58859,0.061854,0.288667,-0.1788961,-0.0002007,-0.109426,-0.006715,0.000119,0.000019,37,O +2020-01-12,58860,0.061134,0.289907,-0.1788057,-0.0000038,-0.108895,-0.006685,0.000117,0.000029,37,O +2020-01-13,58861,0.060864,0.291018,-0.1789353,0.0002968,-0.108296,-0.006450,0.000116,0.000039,37,O +2020-01-14,58862,0.060557,0.292386,-0.1793255,0.0005750,-0.107913,-0.006224,0.000115,0.000049,37,O +2020-01-15,58863,0.059588,0.293794,-0.1799543,0.0007465,-0.107769,-0.006196,0.000150,0.000019,37,O +2020-01-16,58864,0.058520,0.295343,-0.1807846,0.0008774,-0.107837,-0.006302,0.000195,-0.000020,37,O +2020-01-17,58865,0.057430,0.296819,-0.1817437,0.0010052,-0.108001,-0.006417,0.000239,-0.000059,37,O +2020-01-18,58866,0.056515,0.297636,-0.1827608,0.0010297,-0.108336,-0.006441,0.000228,-0.000048,37,O +2020-01-19,58867,0.055634,0.298582,-0.1837339,0.0009318,-0.108744,-0.006424,0.000195,-0.000018,37,O +2020-01-20,58868,0.054617,0.299454,-0.1845425,0.0007783,-0.109091,-0.006405,0.000163,0.000012,37,O +2020-01-21,58869,0.053801,0.300237,-0.1852307,0.0005888,-0.109236,-0.006378,0.000130,0.000042,37,O +2020-01-22,58870,0.053304,0.301090,-0.1857979,0.0004516,-0.109097,-0.006357,0.000098,0.000072,37,O +2020-01-23,58871,0.052618,0.302469,-0.1861858,0.0003157,-0.108638,-0.006398,0.000129,0.000084,37,O +2020-01-24,58872,0.051965,0.303572,-0.1864849,0.0002606,-0.108196,-0.006499,0.000178,0.000092,37,O +2020-01-25,58873,0.051957,0.304776,-0.1867979,0.0003582,-0.107967,-0.006615,0.000217,0.000090,37,O +2020-01-26,58874,0.051500,0.306324,-0.1871882,0.0004438,-0.107884,-0.006673,0.000254,0.000085,37,O +2020-01-27,58875,0.050488,0.307421,-0.1876943,0.0005593,-0.107859,-0.006674,0.000291,0.000079,37,O +2020-01-28,58876,0.049407,0.308653,-0.1883290,0.0006623,-0.107879,-0.006689,0.000327,0.000074,37,O +2020-01-29,58877,0.048378,0.310139,-0.1890559,0.0007174,-0.108081,-0.006785,0.000299,0.000059,37,O +2020-01-30,58878,0.047078,0.311687,-0.1898028,0.0007392,-0.108239,-0.006916,0.000255,0.000042,37,O +2020-01-31,58879,0.045724,0.312939,-0.1905245,0.0006980,-0.108232,-0.006994,0.000210,0.000025,37,O +2020-02-01,58880,0.044494,0.314392,-0.1911699,0.0005988,-0.108012,-0.006963,0.000223,0.000025,37,O +2020-02-02,58881,0.043505,0.316036,-0.1917194,0.0004836,-0.107876,-0.006862,0.000257,0.000031,37,O +2020-02-03,58882,0.042727,0.317663,-0.1921721,0.0003794,-0.107929,-0.006737,0.000291,0.000038,37,O +2020-02-04,58883,0.042236,0.319419,-0.1925141,0.0002354,-0.108039,-0.006617,0.000324,0.000044,37,O +2020-02-05,58884,0.042192,0.321224,-0.1927412,0.0001382,-0.108221,-0.006572,0.000323,0.000039,37,O +2020-02-06,58885,0.041387,0.322939,-0.1928644,0.0000870,-0.108517,-0.006722,0.000311,0.000031,37,O +2020-02-07,58886,0.040107,0.323988,-0.1929351,0.0000853,-0.108855,-0.007119,0.000300,0.000023,37,O +2020-02-08,58887,0.038702,0.324883,-0.1930242,0.0001418,-0.108909,-0.007587,0.000279,0.000004,37,O +2020-02-09,58888,0.037913,0.325300,-0.1932662,0.0003533,-0.108384,-0.007796,0.000253,-0.000020,37,O +2020-02-10,58889,0.037635,0.326014,-0.1937899,0.0006718,-0.107527,-0.007618,0.000228,-0.000043,37,O +2020-02-11,58890,0.037317,0.327316,-0.1945859,0.0008996,-0.106951,-0.007292,0.000203,-0.000067,37,O +2020-02-12,58891,0.037414,0.328670,-0.1955386,0.0009962,-0.106914,-0.007081,0.000209,-0.000043,37,O +2020-02-13,58892,0.037440,0.330236,-0.1965300,0.0009626,-0.107285,-0.007084,0.000223,-0.000008,37,O +2020-02-14,58893,0.036532,0.331984,-0.1974312,0.0007962,-0.107697,-0.007156,0.000236,0.000028,37,O +2020-02-15,58894,0.034910,0.333280,-0.1981377,0.0005980,-0.107921,-0.007234,0.000254,0.000020,37,O +2020-02-16,58895,0.033056,0.334012,-0.1986185,0.0004101,-0.107997,-0.007308,0.000274,-0.000005,37,O +2020-02-17,58896,0.031510,0.334883,-0.1989191,0.0002210,-0.108036,-0.007389,0.000294,-0.000030,37,O +2020-02-18,58897,0.030655,0.336009,-0.1990725,0.0000639,-0.108041,-0.007459,0.000315,-0.000055,37,O +2020-02-19,58898,0.030313,0.337617,-0.1991016,0.0000235,-0.107939,-0.007476,0.000324,-0.000036,37,O +2020-02-20,58899,0.029598,0.339041,-0.1991206,0.0000386,-0.107646,-0.007524,0.000331,-0.000006,37,O +2020-02-21,58900,0.028482,0.340031,-0.1992279,0.0001792,-0.107273,-0.007634,0.000338,0.000024,37,O +2020-02-22,58901,0.027450,0.340780,-0.1995108,0.0004273,-0.107060,-0.007747,0.000326,0.000031,37,O +2020-02-23,58902,0.026983,0.341571,-0.1999703,0.0005556,-0.107064,-0.007746,0.000306,0.000028,37,O +2020-02-24,58903,0.027040,0.342668,-0.2005609,0.0006445,-0.107212,-0.007629,0.000286,0.000026,37,O +2020-02-25,58904,0.027405,0.344602,-0.2012484,0.0006880,-0.107404,-0.007533,0.000267,0.000024,37,O +2020-02-26,58905,0.027969,0.346651,-0.2019948,0.0007245,-0.107505,-0.007570,0.000266,0.000022,37,O +2020-02-27,58906,0.028570,0.348892,-0.2027642,0.0007973,-0.107457,-0.007703,0.000270,0.000020,37,O +2020-02-28,58907,0.028790,0.351114,-0.2035270,0.0008132,-0.107243,-0.007821,0.000274,0.000019,37,O +2020-02-29,58908,0.028282,0.353263,-0.2042647,0.0007321,-0.106979,-0.007895,0.000285,0.000016,37,O +2020-03-01,58909,0.027663,0.355257,-0.2049580,0.0006589,-0.106884,-0.007984,0.000299,0.000013,37,O +2020-03-02,58910,0.027052,0.357171,-0.2055930,0.0005935,-0.106987,-0.008114,0.000312,0.000011,37,O +2020-03-03,58911,0.026374,0.359002,-0.2061635,0.0005165,-0.107074,-0.008201,0.000326,0.000008,37,O +2020-03-04,58912,0.026040,0.360668,-0.2066763,0.0004635,-0.107072,-0.008177,0.000330,0.000007,37,O +2020-03-05,58913,0.026271,0.362020,-0.2071658,0.0005028,-0.107168,-0.008176,0.000331,0.000006,37,O +2020-03-06,58914,0.026971,0.363910,-0.2076964,0.0006226,-0.107478,-0.008427,0.000332,0.000006,37,O +2020-03-07,58915,0.027743,0.365695,-0.2083559,0.0008000,-0.107690,-0.008948,0.000311,-0.000028,37,O +2020-03-08,58916,0.028156,0.367442,-0.2092279,0.0009841,-0.107295,-0.009352,0.000282,-0.000074,37,O +2020-03-09,58917,0.028068,0.369116,-0.2103544,0.0012166,-0.106424,-0.009324,0.000254,-0.000121,37,O +2020-03-10,58918,0.028186,0.370679,-0.2117167,0.0014868,-0.105806,-0.009002,0.000225,-0.000167,37,O +2020-03-11,58919,0.028655,0.372325,-0.2132290,0.0015777,-0.105808,-0.008698,0.000236,-0.000130,37,O +2020-03-12,58920,0.029168,0.373782,-0.2147503,0.0014394,-0.106277,-0.008634,0.000258,-0.000071,37,O +2020-03-13,58921,0.030390,0.375474,-0.2161386,0.0012287,-0.106712,-0.008675,0.000280,-0.000012,37,O +2020-03-14,58922,0.031837,0.377519,-0.2172921,0.0009841,-0.106856,-0.008710,0.000289,0.000024,37,O +2020-03-15,58923,0.033166,0.379483,-0.2181787,0.0007350,-0.106750,-0.008775,0.000293,0.000051,37,O +2020-03-16,58924,0.034196,0.380925,-0.2188244,0.0005614,-0.106616,-0.008915,0.000297,0.000078,37,O +2020-03-17,58925,0.034810,0.382174,-0.2192893,0.0004298,-0.106627,-0.009047,0.000301,0.000105,37,O +2020-03-18,58926,0.035518,0.383028,-0.2196482,0.0003245,-0.106777,-0.009158,0.000282,0.000050,37,O +2020-03-19,58927,0.036746,0.383993,-0.2199551,0.0002934,-0.106794,-0.009218,0.000256,-0.000027,37,O +2020-03-20,58928,0.038706,0.385063,-0.2202542,0.0003209,-0.106546,-0.009288,0.000230,-0.000104,37,O +2020-03-21,58929,0.040911,0.386045,-0.2205675,0.0003708,-0.106103,-0.009294,0.000243,-0.000126,37,O +2020-03-22,58930,0.042767,0.387279,-0.2209353,0.0004059,-0.105789,-0.009173,0.000270,-0.000127,37,O +2020-03-23,58931,0.043796,0.388552,-0.2213969,0.0004873,-0.105734,-0.008934,0.000298,-0.000129,37,O +2020-03-24,58932,0.044596,0.389940,-0.2219350,0.0005568,-0.105821,-0.008722,0.000325,-0.000131,37,O +2020-03-25,58933,0.044822,0.391441,-0.2224998,0.0005687,-0.106014,-0.008653,0.000293,-0.000088,37,O +2020-03-26,58934,0.044435,0.393108,-0.2230571,0.0005525,-0.106097,-0.008758,0.000246,-0.000032,37,O +2020-03-27,58935,0.043828,0.394126,-0.2235761,0.0004775,-0.106048,-0.008916,0.000199,0.000023,37,O +2020-03-28,58936,0.044672,0.395067,-0.2240329,0.0004229,-0.105838,-0.009089,0.000213,0.000025,37,O +2020-03-29,58937,0.045829,0.396454,-0.2244108,0.0003321,-0.105715,-0.009286,0.000251,0.000006,37,O +2020-03-30,58938,0.047045,0.398009,-0.2247096,0.0002516,-0.105752,-0.009531,0.000289,-0.000013,37,O +2020-03-31,58939,0.048812,0.399638,-0.2249477,0.0002144,-0.105749,-0.009749,0.000327,-0.000032,37,O +2020-04-01,58940,0.050857,0.401270,-0.2251625,0.0002453,-0.105703,-0.009836,0.000299,-0.000071,37,O +2020-04-02,58941,0.052653,0.403240,-0.2254211,0.0003060,-0.105614,-0.009820,0.000254,-0.000114,37,O +2020-04-03,58942,0.054027,0.405231,-0.2258088,0.0004711,-0.105674,-0.009919,0.000209,-0.000158,37,O +2020-04-04,58943,0.054964,0.406848,-0.2264201,0.0007577,-0.105687,-0.010198,0.000205,-0.000159,37,O +2020-04-05,58944,0.055428,0.407980,-0.2273265,0.0010730,-0.105396,-0.010461,0.000215,-0.000146,37,O +2020-04-06,58945,0.055966,0.408880,-0.2285432,0.0013584,-0.104852,-0.010423,0.000226,-0.000132,37,O +2020-04-07,58946,0.056183,0.409449,-0.2300159,0.0015401,-0.104541,-0.010126,0.000236,-0.000119,37,O +2020-04-08,58947,0.056906,0.409913,-0.2316246,0.0016364,-0.104960,-0.009890,0.000183,-0.000104,37,O +2020-04-09,58948,0.057714,0.411016,-0.2332083,0.0015201,-0.105749,-0.009882,0.000114,-0.000088,37,O +2020-04-10,58949,0.058140,0.412006,-0.2346158,0.0012941,-0.106222,-0.009957,0.000102,-0.000073,37,O +2020-04-11,58950,0.058541,0.412979,-0.2357568,0.0009873,-0.106219,-0.009975,0.000110,-0.000058,37,O +2020-04-12,58951,0.059089,0.413985,-0.2366150,0.0007077,-0.105893,-0.010021,0.000119,-0.000043,37,O +2020-04-13,58952,0.059763,0.415408,-0.2372105,0.0004790,-0.105542,-0.010205,0.000127,-0.000028,37,O +2020-04-14,58953,0.060958,0.416729,-0.2375994,0.0003122,-0.105435,-0.010428,0.000136,-0.000013,37,O +2020-04-15,58954,0.062096,0.418082,-0.2378589,0.0001702,-0.105601,-0.010498,0.000144,0.000002,37,O +2020-04-16,58955,0.062913,0.419660,-0.2380460,0.0001722,-0.105676,-0.010416,0.000181,-0.000021,37,O +2020-04-17,58956,0.063849,0.421394,-0.2382560,0.0002674,-0.105412,-0.010280,0.000226,-0.000055,37,O +2020-04-18,58957,0.064558,0.422987,-0.2385852,0.0004043,-0.104993,-0.010115,0.000228,-0.000034,37,O +2020-04-19,58958,0.064398,0.424255,-0.2390202,0.0004905,-0.104699,-0.009913,0.000214,0.000005,37,O +2020-04-20,58959,0.063813,0.425119,-0.2395002,0.0004897,-0.104731,-0.009640,0.000200,0.000045,37,O +2020-04-21,58960,0.063199,0.425896,-0.2399975,0.0004841,-0.105006,-0.009376,0.000186,0.000085,37,O +2020-04-22,58961,0.063315,0.426486,-0.2405026,0.0004852,-0.105195,-0.009378,0.000203,0.000029,37,O +2020-04-23,58962,0.064241,0.427347,-0.2409715,0.0004599,-0.105205,-0.009629,0.000228,-0.000053,37,O +2020-04-24,58963,0.065516,0.428239,-0.2413900,0.0003616,-0.105147,-0.009935,0.000224,-0.000076,37,O +2020-04-25,58964,0.067108,0.429319,-0.2416852,0.0002295,-0.105079,-0.010187,0.000209,-0.000078,37,O +2020-04-26,58965,0.068444,0.430783,-0.2418475,0.0001213,-0.105079,-0.010365,0.000194,-0.000079,37,O +2020-04-27,58966,0.069374,0.431979,-0.2419828,0.0000962,-0.105206,-0.010515,0.000179,-0.000080,37,O +2020-04-28,58967,0.070651,0.432914,-0.2420713,0.0000758,-0.105389,-0.010653,0.000164,-0.000081,37,O +2020-04-29,58968,0.072257,0.433716,-0.2421323,0.0000576,-0.105433,-0.010721,0.000156,-0.000073,37,O +2020-04-30,58969,0.074184,0.434641,-0.2422391,0.0001523,-0.105249,-0.010705,0.000149,-0.000063,37,O +2020-05-01,58970,0.075876,0.435873,-0.2424745,0.0003425,-0.104877,-0.010695,0.000161,-0.000074,37,O +2020-05-02,58971,0.077588,0.436915,-0.2429170,0.0005860,-0.104504,-0.010735,0.000179,-0.000093,37,O +2020-05-03,58972,0.079720,0.438133,-0.2436308,0.0008396,-0.104236,-0.010751,0.000197,-0.000112,37,O +2020-05-04,58973,0.081539,0.439339,-0.2445748,0.0010690,-0.104164,-0.010635,0.000216,-0.000131,37,O +2020-05-05,58974,0.083001,0.440397,-0.2456700,0.0011321,-0.104431,-0.010443,0.000234,-0.000149,37,O +2020-05-06,58975,0.084371,0.441298,-0.2468040,0.0011108,-0.105097,-0.010359,0.000219,-0.000162,37,O +2020-05-07,58976,0.085880,0.442199,-0.2478448,0.0009728,-0.105809,-0.010446,0.000195,-0.000173,37,O +2020-05-08,58977,0.087577,0.442774,-0.2486936,0.0007462,-0.106198,-0.010544,0.000172,-0.000184,37,O +2020-05-09,58978,0.089488,0.443500,-0.2493145,0.0005172,-0.106130,-0.010504,0.000159,-0.000168,37,O +2020-05-10,58979,0.091613,0.444552,-0.2497270,0.0003195,-0.105757,-0.010452,0.000151,-0.000142,37,O +2020-05-11,58980,0.093236,0.445566,-0.2499850,0.0001858,-0.105356,-0.010560,0.000142,-0.000116,37,O +2020-05-12,58981,0.094612,0.446353,-0.2501641,0.0001770,-0.105189,-0.010778,0.000133,-0.000090,37,O +2020-05-13,58982,0.095989,0.446778,-0.2503571,0.0001767,-0.105297,-0.010922,0.000145,-0.000093,37,O +2020-05-14,58983,0.097182,0.446651,-0.2505619,0.0001941,-0.105516,-0.010861,0.000162,-0.000103,37,O +2020-05-15,58984,0.098876,0.446341,-0.2507604,0.0002778,-0.105536,-0.010690,0.000180,-0.000114,37,O +2020-05-16,58985,0.100314,0.446369,-0.2510803,0.0003654,-0.105365,-0.010536,0.000170,-0.000114,37,O +2020-05-17,58986,0.101760,0.446093,-0.2514781,0.0004799,-0.105227,-0.010422,0.000150,-0.000110,37,O +2020-05-18,58987,0.102987,0.446067,-0.2520116,0.0005811,-0.105372,-0.010272,0.000129,-0.000106,37,O +2020-05-19,58988,0.104425,0.445811,-0.2526084,0.0005937,-0.105774,-0.010077,0.000109,-0.000102,37,O +2020-05-20,58989,0.106126,0.445938,-0.2531595,0.0005169,-0.106129,-0.009951,0.000118,-0.000097,37,O +2020-05-21,58990,0.107451,0.446340,-0.2536215,0.0004139,-0.106311,-0.010015,0.000135,-0.000093,37,O +2020-05-22,58991,0.108276,0.446830,-0.2539584,0.0002708,-0.106320,-0.010248,0.000152,-0.000088,37,O +2020-05-23,58992,0.108413,0.447082,-0.2541455,0.0001033,-0.106287,-0.010513,0.000143,-0.000084,37,O +2020-05-24,58993,0.108453,0.446641,-0.2541522,-0.0000695,-0.106250,-0.010675,0.000125,-0.000079,37,O +2020-05-25,58994,0.108379,0.446015,-0.2540079,-0.0001838,-0.106292,-0.010717,0.000107,-0.000075,37,O +2020-05-26,58995,0.108296,0.445345,-0.2538363,-0.0002193,-0.106487,-0.010705,0.000089,-0.000071,37,O +2020-05-27,58996,0.109175,0.444412,-0.2536837,-0.0001520,-0.106744,-0.010711,0.000071,-0.000067,37,O +2020-05-28,58997,0.110181,0.443910,-0.2535569,-0.0000617,-0.106628,-0.010805,0.000132,-0.000121,37,O +2020-05-29,58998,0.110932,0.443391,-0.2535459,0.0000737,-0.106144,-0.010894,0.000213,-0.000191,37,O +2020-05-30,58999,0.112039,0.442888,-0.2537140,0.0002698,-0.105698,-0.010833,0.000211,-0.000201,37,O +2020-05-31,59000,0.113109,0.442390,-0.2540926,0.0004718,-0.105517,-0.010624,0.000177,-0.000189,37,O +2020-06-01,59001,0.114095,0.441605,-0.2546428,0.0006051,-0.105806,-0.010341,0.000144,-0.000176,37,O +2020-06-02,59002,0.115356,0.440965,-0.2552636,0.0005944,-0.106564,-0.010124,0.000111,-0.000164,37,O +2020-06-03,59003,0.116557,0.440577,-0.2558111,0.0004238,-0.107494,-0.010093,0.000078,-0.000152,37,O +2020-06-04,59004,0.117960,0.440275,-0.2561433,0.0001999,-0.108118,-0.010211,0.000086,-0.000144,37,O +2020-06-05,59005,0.119592,0.440373,-0.2562125,-0.0000442,-0.108296,-0.010303,0.000106,-0.000138,37,O +2020-06-06,59006,0.121341,0.440754,-0.2560362,-0.0002611,-0.108144,-0.010264,0.000109,-0.000129,37,O +2020-06-07,59007,0.123021,0.441349,-0.2556732,-0.0004235,-0.107813,-0.010194,0.000107,-0.000119,37,O +2020-06-08,59008,0.124214,0.441730,-0.2551905,-0.0005518,-0.107489,-0.010254,0.000105,-0.000109,37,O +2020-06-09,59009,0.125342,0.441604,-0.2546373,-0.0006060,-0.107342,-0.010451,0.000103,-0.000099,37,O +2020-06-10,59010,0.126901,0.441125,-0.2540253,-0.0006402,-0.107467,-0.010628,0.000098,-0.000095,37,O +2020-06-11,59011,0.128704,0.440696,-0.2533824,-0.0006234,-0.107782,-0.010652,0.000092,-0.000092,37,O +2020-06-12,59012,0.130552,0.440812,-0.2527082,-0.0006319,-0.107931,-0.010533,0.000145,-0.000061,37,O +2020-06-13,59013,0.132365,0.440839,-0.2520923,-0.0005984,-0.107880,-0.010403,0.000221,-0.000018,37,O +2020-06-14,59014,0.134367,0.440694,-0.2515698,-0.0004699,-0.107775,-0.010305,0.000297,0.000025,37,O +2020-06-15,59015,0.136361,0.440461,-0.2511455,-0.0003956,-0.107793,-0.010160,0.000373,0.000067,37,O +2020-06-16,59016,0.138330,0.439889,-0.2507551,-0.0004115,-0.107995,-0.009914,0.000449,0.000110,37,O +2020-06-17,59017,0.140357,0.439316,-0.2502728,-0.0004882,-0.108624,-0.009739,0.000386,0.000059,37,O +2020-06-18,59018,0.142486,0.438802,-0.2496915,-0.0006405,-0.109271,-0.009721,0.000287,-0.000016,37,O +2020-06-19,59019,0.144941,0.438049,-0.2490204,-0.0008280,-0.109762,-0.009922,0.000187,-0.000092,37,O +2020-06-20,59020,0.147096,0.437587,-0.2481020,-0.0010077,-0.109892,-0.010209,0.000161,-0.000111,37,O +2020-06-21,59021,0.149313,0.437067,-0.2470621,-0.0011348,-0.109828,-0.010443,0.000162,-0.000109,37,O +2020-06-22,59022,0.151173,0.436544,-0.2459006,-0.0011882,-0.109758,-0.010523,0.000163,-0.000107,37,O +2020-06-23,59023,0.152501,0.435847,-0.2447075,-0.0011609,-0.109810,-0.010469,0.000163,-0.000106,37,O +2020-06-24,59024,0.153957,0.435016,-0.2435776,-0.0010590,-0.109912,-0.010391,0.000191,-0.000102,37,O +2020-06-25,59025,0.155435,0.434459,-0.2426081,-0.0008700,-0.109954,-0.010382,0.000227,-0.000098,37,O +2020-06-26,59026,0.156934,0.433845,-0.2418658,-0.0006289,-0.109798,-0.010422,0.000262,-0.000094,37,O +2020-06-27,59027,0.158898,0.433340,-0.2413584,-0.0003980,-0.109615,-0.010420,0.000243,-0.000101,37,O +2020-06-28,59028,0.160843,0.432785,-0.2410263,-0.0002585,-0.109584,-0.010291,0.000203,-0.000111,37,O +2020-06-29,59029,0.162741,0.432243,-0.2408089,-0.0002157,-0.109921,-0.010075,0.000163,-0.000121,37,O +2020-06-30,59030,0.164819,0.432093,-0.2405730,-0.0003266,-0.110655,-0.009904,0.000123,-0.000131,37,O +2020-07-01,59031,0.166926,0.431645,-0.2401540,-0.0005330,-0.111450,-0.009888,0.000117,-0.000151,37,O +2020-07-02,59032,0.168557,0.431033,-0.2394930,-0.0007733,-0.112028,-0.009994,0.000119,-0.000173,37,O +2020-07-03,59033,0.170032,0.430055,-0.2386042,-0.0009919,-0.112198,-0.010092,0.000132,-0.000181,37,O +2020-07-04,59034,0.171560,0.428853,-0.2374976,-0.0011888,-0.112030,-0.010127,0.000148,-0.000184,37,O +2020-07-05,59035,0.173368,0.427397,-0.2362157,-0.0013336,-0.111724,-0.010151,0.000164,-0.000187,37,O +2020-07-06,59036,0.175553,0.426079,-0.2348932,-0.0013264,-0.111465,-0.010244,0.000180,-0.000190,37,O +2020-07-07,59037,0.177661,0.424849,-0.2336113,-0.0012547,-0.111360,-0.010402,0.000196,-0.000193,37,O +2020-07-08,59038,0.179613,0.423425,-0.2324088,-0.0011768,-0.111541,-0.010513,0.000173,-0.000177,37,O +2020-07-09,59039,0.181521,0.421864,-0.2312898,-0.0010791,-0.111915,-0.010521,0.000139,-0.000156,37,O +2020-07-10,59040,0.183418,0.420421,-0.2302231,-0.0009941,-0.112372,-0.010458,0.000106,-0.000136,37,O +2020-07-11,59041,0.185188,0.419417,-0.2292534,-0.0009766,-0.112718,-0.010414,0.000102,-0.000134,37,O +2020-07-12,59042,0.186700,0.418240,-0.2282505,-0.0010200,-0.112927,-0.010386,0.000108,-0.000140,37,O +2020-07-13,59043,0.187629,0.416964,-0.2272025,-0.0010697,-0.113074,-0.010296,0.000115,-0.000146,37,O +2020-07-14,59044,0.188400,0.415662,-0.2261191,-0.0011213,-0.113315,-0.010100,0.000121,-0.000152,37,O +2020-07-15,59045,0.189708,0.414695,-0.2249892,-0.0011788,-0.113730,-0.009860,0.000130,-0.000152,37,O +2020-07-16,59046,0.190936,0.413918,-0.2237845,-0.0012457,-0.114237,-0.009729,0.000140,-0.000152,37,O +2020-07-17,59047,0.192195,0.412935,-0.2224785,-0.0013164,-0.114632,-0.009814,0.000149,-0.000151,37,O +2020-07-18,59048,0.193260,0.411933,-0.2211074,-0.0014070,-0.114762,-0.010090,0.000159,-0.000153,37,O +2020-07-19,59049,0.193896,0.410755,-0.2196918,-0.0014663,-0.114658,-0.010407,0.000169,-0.000156,37,O +2020-07-20,59050,0.194356,0.409458,-0.2182373,-0.0014190,-0.114471,-0.010603,0.000178,-0.000159,37,O +2020-07-21,59051,0.194688,0.408238,-0.2168640,-0.0012724,-0.114312,-0.010608,0.000188,-0.000162,37,O +2020-07-22,59052,0.195127,0.406704,-0.2156688,-0.0010646,-0.114300,-0.010469,0.000163,-0.000153,37,O +2020-07-23,59053,0.195548,0.405185,-0.2147063,-0.0008562,-0.114364,-0.010330,0.000128,-0.000142,37,O +2020-07-24,59054,0.196360,0.403989,-0.2139791,-0.0006416,-0.114489,-0.010293,0.000093,-0.000131,37,O +2020-07-25,59055,0.197205,0.402836,-0.2134367,-0.0005213,-0.114568,-0.010346,0.000106,-0.000123,37,O +2020-07-26,59056,0.197779,0.401664,-0.2129757,-0.0004897,-0.114673,-0.010390,0.000136,-0.000117,37,O +2020-07-27,59057,0.198067,0.400506,-0.2124662,-0.0005643,-0.114849,-0.010349,0.000167,-0.000110,37,O +2020-07-28,59058,0.198139,0.399287,-0.2118373,-0.0006872,-0.115111,-0.010246,0.000198,-0.000103,37,O +2020-07-29,59059,0.198581,0.398202,-0.2110818,-0.0008293,-0.115556,-0.010138,0.000183,-0.000082,37,O +2020-07-30,59060,0.199254,0.397133,-0.2101850,-0.0009562,-0.115989,-0.010075,0.000157,-0.000056,37,O +2020-07-31,59061,0.199858,0.395993,-0.2091724,-0.0010540,-0.116238,-0.010062,0.000130,-0.000031,37,O +2020-08-01,59062,0.200916,0.394791,-0.2081196,-0.0010540,-0.116211,-0.010102,0.000112,-0.000013,37,O +2020-08-02,59063,0.202618,0.394109,-0.2070472,-0.0010157,-0.116010,-0.010194,0.000097,0.000003,37,O +2020-08-03,59064,0.203857,0.393712,-0.2060676,-0.0009380,-0.115823,-0.010311,0.000082,0.000018,37,O +2020-08-04,59065,0.204978,0.393256,-0.2052248,-0.0007909,-0.115773,-0.010378,0.000066,0.000034,37,O +2020-08-05,59066,0.206149,0.392575,-0.2044963,-0.0006824,-0.115805,-0.010356,0.000077,0.000022,37,O +2020-08-06,59067,0.207131,0.391715,-0.2038968,-0.0005592,-0.115946,-0.010242,0.000094,0.000003,37,O +2020-08-07,59068,0.207997,0.390904,-0.2034232,-0.0004263,-0.116174,-0.010128,0.000111,-0.000016,37,O +2020-08-08,59069,0.208823,0.389508,-0.2030598,-0.0003350,-0.116395,-0.010086,0.000127,-0.000032,37,O +2020-08-09,59070,0.209912,0.388019,-0.2027319,-0.0003316,-0.116470,-0.010089,0.000143,-0.000047,37,O +2020-08-10,59071,0.210987,0.386680,-0.2023438,-0.0004217,-0.116390,-0.010053,0.000159,-0.000062,37,O +2020-08-11,59072,0.212000,0.385344,-0.2018452,-0.0005731,-0.116368,-0.009950,0.000175,-0.000077,37,O +2020-08-12,59073,0.213138,0.383934,-0.2012087,-0.0007229,-0.116651,-0.009858,0.000191,-0.000092,37,O +2020-08-13,59074,0.214369,0.382229,-0.2004326,-0.0008567,-0.117224,-0.009878,0.000195,-0.000106,37,O +2020-08-14,59075,0.215208,0.380501,-0.1995089,-0.0009856,-0.117713,-0.010037,0.000195,-0.000120,37,O +2020-08-15,59076,0.215710,0.379116,-0.1984422,-0.0010961,-0.117813,-0.010280,0.000192,-0.000136,37,O +2020-08-16,59077,0.216181,0.377875,-0.1972937,-0.0011496,-0.117568,-0.010520,0.000187,-0.000152,37,O +2020-08-17,59078,0.216815,0.377092,-0.1961824,-0.0010903,-0.117230,-0.010677,0.000183,-0.000169,37,O +2020-08-18,59079,0.217198,0.376427,-0.1951499,-0.0009586,-0.116952,-0.010677,0.000179,-0.000185,37,O +2020-08-19,59080,0.217097,0.375794,-0.1942910,-0.0007516,-0.116736,-0.010502,0.000174,-0.000201,37,O +2020-08-20,59081,0.216740,0.374898,-0.1936905,-0.0004787,-0.116528,-0.010230,0.000208,-0.000180,37,O +2020-08-21,59082,0.216769,0.373565,-0.1933538,-0.0002135,-0.116516,-0.010083,0.000253,-0.000149,37,O +2020-08-22,59083,0.216932,0.371778,-0.1932222,-0.0000596,-0.116944,-0.010170,0.000217,-0.000130,37,O +2020-08-23,59084,0.217580,0.370054,-0.1931667,-0.0000789,-0.117518,-0.010359,0.000151,-0.000115,37,O +2020-08-24,59085,0.218417,0.368646,-0.1930381,-0.0002268,-0.117966,-0.010456,0.000086,-0.000100,37,O +2020-08-25,59086,0.218821,0.367280,-0.1927121,-0.0004572,-0.118246,-0.010403,0.000021,-0.000085,37,O +2020-08-26,59087,0.218848,0.366011,-0.1921170,-0.0007332,-0.118255,-0.010302,0.000038,-0.000090,37,O +2020-08-27,59088,0.218568,0.364900,-0.1912433,-0.0009788,-0.118249,-0.010225,0.000077,-0.000101,37,O +2020-08-28,59089,0.218460,0.363753,-0.1901406,-0.0011675,-0.118258,-0.010195,0.000116,-0.000111,37,O +2020-08-29,59090,0.218163,0.363164,-0.1888889,-0.0012589,-0.118188,-0.010207,0.000142,-0.000102,37,O +2020-08-30,59091,0.217507,0.362331,-0.1876041,-0.0012675,-0.117952,-0.010281,0.000164,-0.000086,37,O +2020-08-31,59092,0.216816,0.361537,-0.1864039,-0.0011495,-0.117634,-0.010374,0.000185,-0.000069,37,O +2020-09-01,59093,0.215870,0.360680,-0.1853447,-0.0009829,-0.117380,-0.010369,0.000206,-0.000053,37,O +2020-09-02,59094,0.214888,0.359360,-0.1844359,-0.0008078,-0.117277,-0.010199,0.000218,-0.000059,37,O +2020-09-03,59095,0.214008,0.357869,-0.1836718,-0.0006993,-0.117281,-0.009905,0.000228,-0.000071,37,O +2020-09-04,59096,0.213234,0.356016,-0.1830210,-0.0006290,-0.117339,-0.009656,0.000237,-0.000082,37,O +2020-09-05,59097,0.212795,0.354430,-0.1824364,-0.0005731,-0.117410,-0.009573,0.000230,-0.000085,37,O +2020-09-06,59098,0.212274,0.353191,-0.1818721,-0.0005450,-0.117361,-0.009619,0.000217,-0.000084,37,O +2020-09-07,59099,0.211790,0.351835,-0.1812925,-0.0005934,-0.117172,-0.009671,0.000204,-0.000084,37,O +2020-09-08,59100,0.211193,0.350339,-0.1806562,-0.0006743,-0.117062,-0.009686,0.000191,-0.000083,37,O +2020-09-09,59101,0.210918,0.349451,-0.1799467,-0.0007776,-0.117306,-0.009743,0.000178,-0.000082,37,O +2020-09-10,59102,0.210855,0.348811,-0.1791721,-0.0008106,-0.117945,-0.009884,0.000137,-0.000059,37,O +2020-09-11,59103,0.210933,0.348368,-0.1783511,-0.0007954,-0.118497,-0.010053,0.000090,-0.000029,37,O +2020-09-12,59104,0.210314,0.347629,-0.1775178,-0.0007983,-0.118447,-0.010143,0.000085,-0.000019,37,O +2020-09-13,59105,0.209427,0.346406,-0.1767408,-0.0007225,-0.117930,-0.010102,0.000097,-0.000017,37,O +2020-09-14,59106,0.208717,0.345499,-0.1761147,-0.0005314,-0.117381,-0.009988,0.000108,-0.000014,37,O +2020-09-15,59107,0.208051,0.344156,-0.1757085,-0.0002763,-0.117022,-0.009833,0.000120,-0.000012,37,O +2020-09-16,59108,0.207856,0.342757,-0.1755535,-0.0000032,-0.116945,-0.009617,0.000082,-0.000038,37,O +2020-09-17,59109,0.207763,0.341482,-0.1756637,0.0002120,-0.117040,-0.009366,0.000030,-0.000071,37,O +2020-09-18,59110,0.207499,0.340031,-0.1759844,0.0003569,-0.117335,-0.009280,-0.000021,-0.000104,37,O +2020-09-19,59111,0.206755,0.338625,-0.1764092,0.0004253,-0.117637,-0.009464,-0.000017,-0.000110,37,O +2020-09-20,59112,0.205778,0.337224,-0.1767967,0.0003203,-0.117831,-0.009763,0.000009,-0.000106,37,O +2020-09-21,59113,0.204647,0.335988,-0.1770190,0.0001175,-0.117862,-0.009894,0.000034,-0.000102,37,O +2020-09-22,59114,0.203448,0.334984,-0.1770237,-0.0001062,-0.117782,-0.009802,0.000059,-0.000097,37,O +2020-09-23,59115,0.202369,0.333990,-0.1768324,-0.0002892,-0.117806,-0.009680,0.000033,-0.000089,37,O +2020-09-24,59116,0.201447,0.333000,-0.1764820,-0.0004005,-0.117893,-0.009670,-0.000006,-0.000079,37,O +2020-09-25,59117,0.200100,0.331835,-0.1760287,-0.0004429,-0.118024,-0.009719,-0.000045,-0.000069,37,O +2020-09-26,59118,0.198705,0.330548,-0.1755265,-0.0004754,-0.117994,-0.009700,-0.000024,-0.000032,37,O +2020-09-27,59119,0.197236,0.329251,-0.1750164,-0.0005323,-0.117779,-0.009640,0.000020,0.000015,37,O +2020-09-28,59120,0.196127,0.327949,-0.1745224,-0.0005057,-0.117408,-0.009587,0.000063,0.000062,37,O +2020-09-29,59121,0.195040,0.326608,-0.1740769,-0.0003921,-0.116991,-0.009492,0.000107,0.000108,37,O +2020-09-30,59122,0.194222,0.325303,-0.1737113,-0.0002857,-0.116712,-0.009323,0.000132,0.000080,37,O +2020-10-01,59123,0.193592,0.324399,-0.1734352,-0.0002262,-0.116558,-0.009037,0.000152,0.000032,37,O +2020-10-02,59124,0.192652,0.323725,-0.1732413,-0.0001769,-0.116447,-0.008783,0.000171,-0.000016,37,O +2020-10-03,59125,0.191328,0.322856,-0.1731044,-0.0001385,-0.116377,-0.008683,0.000158,-0.000014,37,O +2020-10-04,59126,0.190376,0.321580,-0.1729735,-0.0001437,-0.116249,-0.008755,0.000132,0.000006,37,O +2020-10-05,59127,0.190057,0.320101,-0.1727946,-0.0002063,-0.116057,-0.008872,0.000106,0.000026,37,O +2020-10-06,59128,0.189565,0.319194,-0.1725157,-0.0003291,-0.115950,-0.008947,0.000080,0.000046,37,O +2020-10-07,59129,0.188477,0.318544,-0.1720944,-0.0004769,-0.116058,-0.009059,0.000075,0.000044,37,O +2020-10-08,59130,0.187213,0.317589,-0.1715545,-0.0005752,-0.116402,-0.009250,0.000075,0.000036,37,O +2020-10-09,59131,0.185866,0.316267,-0.1709438,-0.0006027,-0.116661,-0.009422,0.000075,0.000028,37,O +2020-10-10,59132,0.184598,0.314938,-0.1703470,-0.0005638,-0.116474,-0.009397,0.000081,0.000028,37,O +2020-10-11,59133,0.183096,0.313821,-0.1698266,-0.0004507,-0.115905,-0.009145,0.000089,0.000030,37,O +2020-10-12,59134,0.181364,0.312491,-0.1694229,-0.0002698,-0.115345,-0.008820,0.000096,0.000032,37,O +2020-10-13,59135,0.180150,0.311276,-0.1692873,0.0000023,-0.115042,-0.008554,0.000104,0.000034,37,O +2020-10-14,59136,0.179028,0.310496,-0.1694783,0.0003013,-0.114958,-0.008314,0.000112,0.000036,37,O +2020-10-15,59137,0.178273,0.309566,-0.1699480,0.0005931,-0.114992,-0.008083,0.000131,0.000024,37,O +2020-10-16,59138,0.177870,0.308850,-0.1706403,0.0007682,-0.115149,-0.008005,0.000152,0.000008,37,O +2020-10-17,59139,0.177728,0.308173,-0.1714530,0.0007984,-0.115386,-0.008208,0.000134,0.000009,37,O +2020-10-18,59140,0.177883,0.307413,-0.1722056,0.0006699,-0.115413,-0.008528,0.000102,0.000015,37,O +2020-10-19,59141,0.177193,0.306640,-0.1727351,0.0003985,-0.115221,-0.008621,0.000069,0.000022,37,O +2020-10-20,59142,0.175829,0.305561,-0.1730135,0.0001477,-0.115069,-0.008425,0.000037,0.000029,37,O +2020-10-21,59143,0.174443,0.304709,-0.1731105,0.0000250,-0.114600,-0.008189,0.000201,0.000094,37,O +2020-10-22,59144,0.173243,0.304010,-0.1731120,0.0000231,-0.114500,-0.008238,0.000249,0.000130,37,O +2020-10-23,59145,0.172122,0.303220,-0.1731129,0.0000584,-0.114516,-0.008427,0.000248,0.000152,37,O +2020-10-24,59146,0.170979,0.302398,-0.1731915,0.0001102,-0.114565,-0.008525,0.000236,0.000123,37,O +2020-10-25,59147,0.169567,0.301498,-0.1733234,0.0001512,-0.114587,-0.008447,0.000219,0.000074,37,O +2020-10-26,59148,0.168213,0.300588,-0.1735104,0.0002021,-0.114466,-0.008323,0.000203,0.000025,37,O +2020-10-27,59149,0.167025,0.299828,-0.1737708,0.0003055,-0.114237,-0.008249,0.000186,-0.000024,37,O +2020-10-28,59150,0.165274,0.299221,-0.1741049,0.0003277,-0.113945,-0.008074,0.000210,0.000012,37,O +2020-10-29,59151,0.163658,0.298406,-0.1744617,0.0003476,-0.113743,-0.007783,0.000245,0.000070,37,O +2020-10-30,59152,0.162242,0.298257,-0.1747434,0.0003315,-0.113588,-0.007469,0.000280,0.000128,37,O +2020-10-31,59153,0.160455,0.297779,-0.1750666,0.0002816,-0.113483,-0.007338,0.000277,0.000138,37,O +2020-11-01,59154,0.158546,0.297059,-0.1753208,0.0002180,-0.113363,-0.007412,0.000261,0.000131,37,O +2020-11-02,59155,0.156760,0.296584,-0.1754892,0.0001127,-0.113250,-0.007572,0.000244,0.000123,37,O +2020-11-03,59156,0.155022,0.296077,-0.1755506,-0.0000052,-0.113186,-0.007698,0.000228,0.000116,37,O +2020-11-04,59157,0.153756,0.295403,-0.1755009,-0.0001017,-0.113206,-0.007789,0.000211,0.000109,37,O +2020-11-05,59158,0.153116,0.294628,-0.1753222,-0.0002389,-0.113449,-0.007880,0.000133,0.000118,37,O +2020-11-06,59159,0.152204,0.293485,-0.1750506,-0.0003217,-0.113690,-0.007949,0.000038,0.000132,37,O +2020-11-07,59160,0.150933,0.292707,-0.1747265,-0.0002549,-0.113428,-0.007918,0.000064,0.000114,37,O +2020-11-08,59161,0.149316,0.292406,-0.1745355,-0.0000783,-0.112854,-0.007723,0.000133,0.000085,37,O +2020-11-09,59162,0.147825,0.292052,-0.1745810,0.0001968,-0.112271,-0.007463,0.000203,0.000056,37,O +2020-11-10,59163,0.146154,0.291593,-0.1748950,0.0004636,-0.111866,-0.007260,0.000272,0.000027,37,O +2020-11-11,59164,0.144139,0.291248,-0.1754908,0.0006676,-0.111856,-0.007082,0.000264,0.000019,37,O +2020-11-12,59165,0.142123,0.290642,-0.1762784,0.0008387,-0.112077,-0.006888,0.000236,0.000017,37,O +2020-11-13,59166,0.140177,0.290279,-0.1771548,0.0008941,-0.112454,-0.006778,0.000208,0.000015,37,O +2020-11-14,59167,0.137794,0.289624,-0.1779689,0.0007757,-0.112856,-0.006893,0.000162,0.000020,37,O +2020-11-15,59168,0.135204,0.288983,-0.1786182,0.0005395,-0.112982,-0.007138,0.000109,0.000029,37,O +2020-11-16,59169,0.132881,0.288419,-0.1790137,0.0002432,-0.112780,-0.007208,0.000057,0.000038,37,O +2020-11-17,59170,0.130805,0.288003,-0.1791225,-0.0000384,-0.112539,-0.006999,0.000004,0.000047,37,O +2020-11-18,59171,0.129000,0.287331,-0.1790233,-0.0002270,-0.112275,-0.006789,0.000028,0.000053,37,O +2020-11-19,59172,0.127530,0.286787,-0.1787553,-0.0002633,-0.112062,-0.006858,0.000073,0.000058,37,O +2020-11-20,59173,0.126286,0.286684,-0.1784481,-0.0002468,-0.111851,-0.007106,0.000118,0.000063,37,O +2020-11-21,59174,0.125104,0.286777,-0.1781848,-0.0001944,-0.111756,-0.007212,0.000137,0.000062,37,O +2020-11-22,59175,0.124481,0.286278,-0.1780687,-0.0000424,-0.111769,-0.007037,0.000147,0.000060,37,O +2020-11-23,59176,0.124228,0.286214,-0.1781330,0.0001506,-0.111766,-0.006754,0.000157,0.000058,37,O +2020-11-24,59177,0.123617,0.286438,-0.1783447,0.0002542,-0.111679,-0.006573,0.000167,0.000055,37,O +2020-11-25,59178,0.122556,0.286916,-0.1786339,0.0002858,-0.111583,-0.006497,0.000177,0.000053,37,O +2020-11-26,59179,0.120973,0.287505,-0.1789614,0.0002630,-0.111632,-0.006331,0.000156,0.000114,37,O +2020-11-27,59180,0.118868,0.287888,-0.1791698,0.0001765,-0.111714,-0.006069,0.000126,0.000192,37,O +2020-11-28,59181,0.116181,0.288266,-0.1793065,0.0000654,-0.111727,-0.005913,0.000098,0.000193,37,O +2020-11-29,59182,0.113478,0.288418,-0.1792998,-0.0000570,-0.111707,-0.005939,0.000071,0.000165,37,O +2020-11-30,59183,0.110735,0.288608,-0.1792037,-0.0001561,-0.111732,-0.006110,0.000045,0.000137,37,O +2020-12-01,59184,0.108321,0.288148,-0.1790069,-0.0002546,-0.111780,-0.006317,0.000018,0.000108,37,O +2020-12-02,59185,0.106317,0.287572,-0.1787175,-0.0003630,-0.111655,-0.006507,0.000023,0.000041,37,O +2020-12-03,59186,0.104638,0.287348,-0.1783211,-0.0004220,-0.111381,-0.006645,0.000037,-0.000038,37,O +2020-12-04,59187,0.102958,0.287742,-0.1779212,-0.0003645,-0.111061,-0.006741,0.000051,-0.000116,37,O +2020-12-05,59188,0.101346,0.288801,-0.1776326,-0.0001936,-0.110793,-0.006736,0.000055,-0.000130,37,O +2020-12-06,59189,0.099422,0.289616,-0.1775418,-0.0000216,-0.110546,-0.006660,0.000056,-0.000121,37,O +2020-12-07,59190,0.097392,0.289604,-0.1776428,0.0002074,-0.110294,-0.006554,0.000056,-0.000112,37,O +2020-12-08,59191,0.095366,0.289667,-0.1779633,0.0004263,-0.110093,-0.006435,0.000056,-0.000103,37,O +2020-12-09,59192,0.093289,0.289586,-0.1785100,0.0005628,-0.109973,-0.006283,0.000086,-0.000091,37,O +2020-12-10,59193,0.091596,0.289267,-0.1791348,0.0006352,-0.110077,-0.006091,0.000123,-0.000078,37,O +2020-12-11,59194,0.090377,0.289317,-0.1797372,0.0005418,-0.110411,-0.005942,0.000160,-0.000065,37,O +2020-12-12,59195,0.089352,0.289933,-0.1801889,0.0003407,-0.110951,-0.005944,0.000137,-0.000041,37,O +2020-12-13,59196,0.088122,0.291099,-0.1803980,0.0000936,-0.111333,-0.006074,0.000092,-0.000014,37,O +2020-12-14,59197,0.086753,0.292095,-0.1803677,-0.0001487,-0.111383,-0.006136,0.000047,0.000013,37,O +2020-12-15,59198,0.085413,0.292842,-0.1801153,-0.0003569,-0.111225,-0.006017,0.000002,0.000041,37,O +2020-12-16,59199,0.084102,0.293335,-0.1797032,-0.0004950,-0.110928,-0.005931,-0.000003,0.000002,37,O +2020-12-17,59200,0.082931,0.293953,-0.1792128,-0.0004784,-0.110605,-0.006042,0.000002,-0.000053,37,O +2020-12-18,59201,0.082113,0.294634,-0.1787692,-0.0003551,-0.110288,-0.006303,0.000007,-0.000109,37,O +2020-12-19,59202,0.081252,0.294893,-0.1784509,-0.0002153,-0.109970,-0.006405,0.000055,-0.000102,37,O +2020-12-20,59203,0.080081,0.295269,-0.1783092,-0.0000815,-0.109817,-0.006241,0.000117,-0.000072,37,O +2020-12-21,59204,0.078855,0.295467,-0.1782871,0.0000540,-0.109810,-0.005948,0.000179,-0.000042,37,O +2020-12-22,59205,0.077844,0.295794,-0.1783855,0.0001406,-0.109823,-0.005736,0.000242,-0.000012,37,O +2020-12-23,59206,0.077211,0.296035,-0.1785628,0.0001221,-0.110230,-0.005520,0.000137,0.000157,37,O +2020-12-24,59207,0.077016,0.296473,-0.1786707,0.0000410,-0.110488,-0.005418,0.000076,0.000222,37,O +2020-12-25,59208,0.076715,0.297267,-0.1786670,-0.0000506,-0.110595,-0.005267,0.000046,0.000236,37,O +2020-12-26,59209,0.076045,0.297941,-0.1785195,-0.0002103,-0.110611,-0.005079,0.000016,0.000244,37,O +2020-12-27,59210,0.075038,0.298659,-0.1782183,-0.0003764,-0.110613,-0.005004,-0.000014,0.000256,37,O +2020-12-28,59211,0.074030,0.299926,-0.1777849,-0.0004947,-0.110694,-0.005136,-0.000043,0.000267,37,O +2020-12-29,59212,0.072622,0.301626,-0.1772430,-0.0005595,-0.110809,-0.005395,-0.000073,0.000279,37,O +2020-12-30,59213,0.071147,0.302690,-0.1766472,-0.0006211,-0.110613,-0.005732,-0.000035,0.000180,37,O +2020-12-31,59214,0.069721,0.303116,-0.1760010,-0.0006564,-0.110185,-0.005874,0.000003,0.000133,37,O +2021-01-01,59215,0.068685,0.304111,-0.1753710,-0.0005759,-0.109655,-0.005849,0.000035,0.000126,37,O +2021-01-02,59216,0.067783,0.305455,-0.1748394,-0.0004419,-0.109207,-0.005801,0.000066,0.000106,37,O +2021-01-03,59217,0.066068,0.306714,-0.1744761,-0.0002389,-0.108905,-0.005785,0.000098,0.000096,37,O +2021-01-04,59218,0.063906,0.307809,-0.1743246,-0.0000472,-0.108696,-0.005813,0.000129,0.000081,37,O +2021-01-05,59219,0.061685,0.308623,-0.1743819,0.0001362,-0.108543,-0.005819,0.000161,0.000066,37,O +2021-01-06,59220,0.060391,0.309503,-0.1746023,0.0002499,-0.108462,-0.005682,0.000217,0.000116,37,O +2021-01-07,59221,0.059466,0.310304,-0.1748751,0.0002552,-0.108581,-0.005465,0.000280,0.000183,37,O +2021-01-08,59222,0.059005,0.311054,-0.1750757,0.0001439,-0.108877,-0.005272,0.000343,0.000250,37,O +2021-01-09,59223,0.058270,0.311975,-0.1750823,-0.0000968,-0.109379,-0.005255,0.000324,0.000250,37,O +2021-01-10,59224,0.058057,0.313002,-0.1748654,-0.0003119,-0.109768,-0.005367,0.000274,0.000224,37,O +2021-01-11,59225,0.057636,0.314178,-0.1744765,-0.0004727,-0.109894,-0.005482,0.000223,0.000197,37,O +2021-01-12,59226,0.057033,0.314438,-0.1739724,-0.0005349,-0.109829,-0.005535,0.000172,0.000171,37,O +2021-01-13,59227,0.056028,0.315487,-0.1734272,-0.0005343,-0.109447,-0.005630,0.000217,0.000094,37,O +2021-01-14,59228,0.054873,0.316051,-0.1729081,-0.0004820,-0.108989,-0.005827,0.000286,0.000003,37,O +2021-01-15,59229,0.054335,0.316875,-0.1724606,-0.0004365,-0.108538,-0.006095,0.000356,-0.000087,37,O +2021-01-16,59230,0.053758,0.317833,-0.1721004,-0.0003468,-0.108364,-0.006182,0.000345,-0.000055,37,O +2021-01-17,59231,0.052962,0.318726,-0.1718081,-0.0002251,-0.108437,-0.006069,0.000302,0.000023,37,O +2021-01-18,59232,0.052474,0.319502,-0.1715790,-0.0001821,-0.108695,-0.005857,0.000261,0.000101,37,O +2021-01-19,59233,0.052506,0.319950,-0.1714126,-0.0001740,-0.109065,-0.005677,0.000219,0.000179,37,O +2021-01-20,59234,0.052837,0.320909,-0.1712427,-0.0001911,-0.109276,-0.005676,0.000232,0.000156,37,O +2021-01-21,59235,0.052498,0.321943,-0.1710484,-0.0002353,-0.109337,-0.005703,0.000259,0.000108,37,O +2021-01-22,59236,0.052370,0.323115,-0.1707975,-0.0002896,-0.109257,-0.005649,0.000287,0.000060,37,O +2021-01-23,59237,0.052397,0.324238,-0.1704758,-0.0004014,-0.109168,-0.005506,0.000284,0.000056,37,O +2021-01-24,59238,0.051888,0.325635,-0.1700327,-0.0005333,-0.109121,-0.005441,0.000269,0.000069,37,O +2021-01-25,59239,0.050946,0.327158,-0.1694247,-0.0006595,-0.109156,-0.005578,0.000255,0.000083,37,O +2021-01-26,59240,0.050305,0.328651,-0.1687165,-0.0007026,-0.109246,-0.005884,0.000241,0.000096,37,O +2021-01-27,59241,0.050009,0.330496,-0.1680026,-0.0006860,-0.109141,-0.006231,0.000276,0.000078,37,O +2021-01-28,59242,0.049854,0.332424,-0.1673675,-0.0005433,-0.108815,-0.006433,0.000324,0.000051,37,O +2021-01-29,59243,0.049925,0.334359,-0.1669073,-0.0003382,-0.108303,-0.006429,0.000372,0.000024,37,O +2021-01-30,59244,0.049593,0.336126,-0.1666565,-0.0001087,-0.107958,-0.006281,0.000334,0.000020,37,O +2021-01-31,59245,0.049315,0.337874,-0.1666887,0.0001728,-0.107833,-0.006144,0.000261,0.000024,37,O +2021-02-01,59246,0.049420,0.339866,-0.1670204,0.0004253,-0.107947,-0.006114,0.000188,0.000028,37,O +2021-02-02,59247,0.049490,0.341692,-0.1675614,0.0006019,-0.108292,-0.006165,0.000115,0.000032,37,O +2021-02-03,59248,0.049274,0.343178,-0.1681920,0.0006439,-0.108630,-0.006177,0.000107,0.000061,37,O +2021-02-04,59249,0.049231,0.344351,-0.1688000,0.0005490,-0.108983,-0.006111,0.000117,0.000097,37,O +2021-02-05,59250,0.049262,0.345628,-0.1692802,0.0003550,-0.109304,-0.006001,0.000126,0.000132,37,O +2021-02-06,59251,0.049156,0.346983,-0.1696139,0.0001374,-0.109483,-0.005921,0.000140,0.000158,37,O +2021-02-07,59252,0.049075,0.348358,-0.1696850,-0.0000406,-0.109454,-0.005901,0.000156,0.000180,37,O +2021-02-08,59253,0.049311,0.349885,-0.1694924,-0.0001406,-0.109221,-0.005926,0.000172,0.000202,37,O +2021-02-09,59254,0.049922,0.351343,-0.1693373,-0.0001271,-0.108874,-0.005989,0.000188,0.000224,37,O +2021-02-10,59255,0.050607,0.352626,-0.1692436,-0.0000444,-0.108510,-0.006178,0.000222,0.000170,37,O +2021-02-11,59256,0.051207,0.353801,-0.1692657,0.0000908,-0.108257,-0.006433,0.000261,0.000095,37,O +2021-02-12,59257,0.051383,0.354941,-0.1694090,0.0002396,-0.108111,-0.006679,0.000301,0.000020,37,O +2021-02-13,59258,0.051474,0.355706,-0.1697045,0.0004123,-0.108084,-0.006767,0.000308,0.000024,37,O +2021-02-14,59259,0.051922,0.356756,-0.1701305,0.0005143,-0.108104,-0.006728,0.000302,0.000059,37,O +2021-02-15,59260,0.051716,0.358143,-0.1706473,0.0005197,-0.108193,-0.006652,0.000296,0.000095,37,O +2021-02-16,59261,0.050949,0.359283,-0.1711965,0.0004778,-0.108366,-0.006610,0.000290,0.000131,37,O +2021-02-17,59262,0.050326,0.360338,-0.1716669,0.0003633,-0.108536,-0.006606,0.000284,0.000166,37,O +2021-02-18,59263,0.050378,0.361154,-0.1719511,0.0001677,-0.108669,-0.006586,0.000247,0.000200,37,O +2021-02-19,59264,0.050885,0.361987,-0.1720228,-0.0000263,-0.108704,-0.006521,0.000202,0.000234,37,O +2021-02-20,59265,0.051501,0.363070,-0.1719007,-0.0002145,-0.108603,-0.006534,0.000198,0.000191,37,O +2021-02-21,59266,0.051463,0.363914,-0.1715820,-0.0004374,-0.108490,-0.006656,0.000209,0.000120,37,O +2021-02-22,59267,0.050700,0.364562,-0.1710795,-0.0005628,-0.108387,-0.006899,0.000219,0.000048,37,O +2021-02-23,59268,0.049836,0.365309,-0.1704677,-0.0006244,-0.108274,-0.007237,0.000230,-0.000023,37,O +2021-02-24,59269,0.049396,0.365588,-0.1698548,-0.0005855,-0.108271,-0.007557,0.000207,-0.000047,37,O +2021-02-25,59270,0.049801,0.366059,-0.1693475,-0.0003937,-0.108285,-0.007804,0.000174,-0.000058,37,O +2021-02-26,59271,0.050306,0.367069,-0.1690477,-0.0001387,-0.108145,-0.007894,0.000142,-0.000069,37,O +2021-02-27,59272,0.050431,0.368528,-0.1690351,0.0001377,-0.107687,-0.007757,0.000151,-0.000054,37,O +2021-02-28,59273,0.050498,0.370227,-0.1693081,0.0003809,-0.107188,-0.007498,0.000176,-0.000029,37,O +2021-03-01,59274,0.050616,0.371982,-0.1697877,0.0005501,-0.107024,-0.007321,0.000201,-0.000004,37,O +2021-03-02,59275,0.050706,0.373771,-0.1703934,0.0006476,-0.107298,-0.007344,0.000226,0.000022,37,O +2021-03-03,59276,0.050584,0.375262,-0.1710261,0.0006133,-0.107867,-0.007504,0.000212,0.000040,37,O +2021-03-04,59277,0.051059,0.376549,-0.1715540,0.0004339,-0.108333,-0.007617,0.000188,0.000057,37,O +2021-03-05,59278,0.052201,0.377870,-0.1718838,0.0001699,-0.108535,-0.007596,0.000164,0.000073,37,O +2021-03-06,59279,0.053360,0.379379,-0.1719881,-0.0000526,-0.108484,-0.007535,0.000164,0.000048,37,O +2021-03-07,59280,0.054561,0.380833,-0.1718731,-0.0001992,-0.108315,-0.007503,0.000173,0.000007,37,O +2021-03-08,59281,0.056191,0.382351,-0.1716080,-0.0002890,-0.108062,-0.007541,0.000183,-0.000033,37,O +2021-03-09,59282,0.057662,0.383909,-0.1713243,-0.0002599,-0.107722,-0.007670,0.000192,-0.000074,37,O +2021-03-10,59283,0.058750,0.385265,-0.1710993,-0.0001499,-0.107375,-0.007862,0.000200,-0.000097,37,O +2021-03-11,59284,0.059621,0.386346,-0.1710012,-0.0000302,-0.107167,-0.008064,0.000207,-0.000115,37,O +2021-03-12,59285,0.060542,0.387744,-0.1710599,0.0001393,-0.107158,-0.008179,0.000214,-0.000132,37,O +2021-03-13,59286,0.061723,0.389349,-0.1712387,0.0002694,-0.107228,-0.008103,0.000230,-0.000102,37,O +2021-03-14,59287,0.063046,0.391028,-0.1715574,0.0003398,-0.107262,-0.007921,0.000248,-0.000055,37,O +2021-03-15,59288,0.064331,0.392504,-0.1719515,0.0003290,-0.107234,-0.007783,0.000267,-0.000007,37,O +2021-03-16,59289,0.065375,0.394218,-0.1722335,0.0002248,-0.107189,-0.007770,0.000286,0.000040,37,O +2021-03-17,59290,0.065657,0.395943,-0.1724026,0.0000715,-0.107206,-0.007877,0.000272,0.000050,37,O +2021-03-18,59291,0.065853,0.397460,-0.1724204,-0.0000538,-0.107183,-0.007985,0.000249,0.000049,37,O +2021-03-19,59292,0.066235,0.398938,-0.1722871,-0.0001722,-0.107132,-0.008061,0.000226,0.000048,37,O +2021-03-20,59293,0.066580,0.400421,-0.1720284,-0.0003318,-0.107100,-0.008160,0.000219,0.000055,37,O +2021-03-21,59294,0.067507,0.401767,-0.1716900,-0.0003582,-0.107085,-0.008324,0.000218,0.000065,37,O +2021-03-22,59295,0.068766,0.403525,-0.1713132,-0.0003644,-0.106944,-0.008502,0.000218,0.000075,37,O +2021-03-23,59296,0.070017,0.405095,-0.1709575,-0.0003337,-0.106635,-0.008631,0.000217,0.000085,37,O +2021-03-24,59297,0.071509,0.406504,-0.1706787,-0.0002430,-0.106366,-0.008749,0.000216,0.000095,37,O +2021-03-25,59298,0.072812,0.407873,-0.1705313,-0.0000510,-0.106282,-0.008977,0.000225,0.000066,37,O +2021-03-26,59299,0.073728,0.409056,-0.1705938,0.0002010,-0.106226,-0.009237,0.000236,0.000026,37,O +2021-03-27,59300,0.074948,0.409668,-0.1709185,0.0004661,-0.105910,-0.009285,0.000252,0.000016,37,O +2021-03-28,59301,0.076573,0.409823,-0.1714942,0.0006701,-0.105462,-0.009044,0.000270,0.000018,37,O +2021-03-29,59302,0.078236,0.410129,-0.1722454,0.0007908,-0.105357,-0.008732,0.000287,0.000019,37,O +2021-03-30,59303,0.079581,0.410456,-0.1730409,0.0007669,-0.105788,-0.008649,0.000305,0.000020,37,O +2021-03-31,59304,0.080692,0.411065,-0.1737315,0.0005975,-0.106341,-0.008853,0.000345,-0.000003,37,O +2021-04-01,59305,0.081597,0.411745,-0.1742201,0.0003752,-0.106565,-0.009093,0.000392,-0.000034,37,O +2021-04-02,59306,0.082266,0.412527,-0.1744884,0.0001577,-0.106526,-0.009134,0.000373,-0.000016,37,O +2021-04-03,59307,0.082863,0.413394,-0.1745594,-0.0000218,-0.106357,-0.009054,0.000331,0.000018,37,O +2021-04-04,59308,0.083694,0.413955,-0.1744710,-0.0001093,-0.106265,-0.008993,0.000288,0.000052,37,O +2021-04-05,59309,0.084866,0.414476,-0.1744009,-0.0000380,-0.106290,-0.008990,0.000246,0.000086,37,O +2021-04-06,59310,0.085863,0.415604,-0.1744328,0.0000917,-0.106306,-0.009021,0.000204,0.000120,37,O +2021-04-07,59311,0.086636,0.416842,-0.1745974,0.0002245,-0.106207,-0.009070,0.000162,0.000154,37,O +2021-04-08,59312,0.087374,0.417758,-0.1748862,0.0003464,-0.105886,-0.009192,0.000190,0.000100,37,O +2021-04-09,59313,0.087621,0.418801,-0.1752874,0.0004559,-0.105640,-0.009234,0.000238,0.000022,37,O +2021-04-10,59314,0.087511,0.419908,-0.1757729,0.0005100,-0.105648,-0.009045,0.000264,0.000007,37,O +2021-04-11,59315,0.087081,0.420785,-0.1762939,0.0005274,-0.105773,-0.008744,0.000281,0.000015,37,O +2021-04-12,59316,0.086768,0.421358,-0.1767986,0.0004752,-0.105846,-0.008552,0.000299,0.000023,37,O +2021-04-13,59317,0.086839,0.421892,-0.1772455,0.0004063,-0.105810,-0.008603,0.000316,0.000031,37,O +2021-04-14,59318,0.087692,0.422398,-0.1776055,0.0002914,-0.105761,-0.008851,0.000299,0.000020,37,O +2021-04-15,59319,0.088768,0.423267,-0.1778557,0.0001882,-0.105691,-0.009111,0.000272,0.000005,37,O +2021-04-16,59320,0.089996,0.423845,-0.1779907,0.0000721,-0.105670,-0.009299,0.000246,-0.000009,37,O +2021-04-17,59321,0.092158,0.424284,-0.1780250,-0.0000067,-0.105805,-0.009475,0.000213,-0.000020,37,O +2021-04-18,59322,0.094246,0.425257,-0.1779868,-0.0000674,-0.106010,-0.009692,0.000179,-0.000029,37,O +2021-04-19,59323,0.095947,0.426181,-0.1779103,-0.0000733,-0.106040,-0.009876,0.000144,-0.000039,37,O +2021-04-20,59324,0.097266,0.427588,-0.1778571,-0.0000075,-0.105762,-0.009917,0.000110,-0.000048,37,O +2021-04-21,59325,0.098245,0.428908,-0.1779160,0.0001384,-0.105268,-0.009880,0.000136,-0.000061,37,O +2021-04-22,59326,0.099005,0.430149,-0.1781298,0.0003258,-0.105013,-0.009959,0.000179,-0.000074,37,O +2021-04-23,59327,0.099573,0.431096,-0.1785406,0.0005455,-0.105001,-0.010212,0.000222,-0.000087,37,O +2021-04-24,59328,0.099809,0.432023,-0.1791390,0.0007338,-0.104988,-0.010408,0.000228,-0.000120,37,O +2021-04-25,59329,0.100034,0.432771,-0.1799364,0.0009053,-0.104884,-0.010282,0.000222,-0.000173,37,O +2021-04-26,59330,0.100355,0.433380,-0.1809123,0.0009884,-0.105067,-0.009919,0.000216,-0.000221,37,O +2021-04-27,59331,0.101324,0.433851,-0.1819026,0.0008952,-0.105732,-0.009704,0.000210,-0.000268,37,O +2021-04-28,59332,0.102654,0.434414,-0.1826964,0.0006420,-0.106374,-0.009680,0.000244,-0.000185,37,O +2021-04-29,59333,0.104008,0.434868,-0.1831982,0.0003262,-0.106517,-0.009750,0.000288,-0.000071,37,O +2021-04-30,59334,0.105404,0.435218,-0.1833833,0.0000436,-0.106106,-0.009736,0.000332,0.000043,37,O +2021-05-01,59335,0.106820,0.435779,-0.1833089,-0.0001567,-0.105639,-0.009780,0.000316,0.000058,37,O +2021-05-02,59336,0.108188,0.436419,-0.1830909,-0.0002640,-0.105392,-0.009936,0.000276,0.000037,37,O +2021-05-03,59337,0.109767,0.437441,-0.1827909,-0.0002949,-0.105435,-0.010113,0.000237,0.000016,37,O +2021-05-04,59338,0.111592,0.438462,-0.1825243,-0.0002191,-0.105659,-0.010174,0.000197,-0.000006,37,O +2021-05-05,59339,0.113313,0.439364,-0.1823978,-0.0000554,-0.105759,-0.010107,0.000182,-0.000033,37,O +2021-05-06,59340,0.115279,0.440309,-0.1824200,0.0000973,-0.105659,-0.009997,0.000173,-0.000063,37,O +2021-05-07,59341,0.117172,0.441478,-0.1825670,0.0002145,-0.105509,-0.009864,0.000164,-0.000092,37,O +2021-05-08,59342,0.118681,0.442646,-0.1827886,0.0002700,-0.105519,-0.009632,0.000166,-0.000099,37,O +2021-05-09,59343,0.120432,0.443435,-0.1830318,0.0002301,-0.105761,-0.009338,0.000172,-0.000097,37,O +2021-05-10,59344,0.122013,0.444253,-0.1832398,0.0001781,-0.106060,-0.009161,0.000178,-0.000096,37,O +2021-05-11,59345,0.123229,0.444950,-0.1833696,0.0000832,-0.106211,-0.009260,0.000184,-0.000094,37,O +2021-05-12,59346,0.124570,0.445119,-0.1834050,-0.0000417,-0.106142,-0.009592,0.000197,-0.000091,37,O +2021-05-13,59347,0.126398,0.444900,-0.1833166,-0.0001604,-0.105971,-0.009938,0.000212,-0.000088,37,O +2021-05-14,59348,0.128393,0.445000,-0.1831001,-0.0002467,-0.105857,-0.010138,0.000228,-0.000084,37,O +2021-05-15,59349,0.130276,0.445421,-0.1828031,-0.0003065,-0.105951,-0.010226,0.000226,-0.000081,37,O +2021-05-16,59350,0.132466,0.445767,-0.1824802,-0.0003050,-0.106179,-0.010311,0.000219,-0.000079,37,O +2021-05-17,59351,0.134899,0.446354,-0.1822601,-0.0002399,-0.106325,-0.010390,0.000212,-0.000076,37,O +2021-05-18,59352,0.137096,0.446653,-0.1820734,-0.0001333,-0.106203,-0.010375,0.000204,-0.000073,37,O +2021-05-19,59353,0.139382,0.446488,-0.1819842,0.0000440,-0.105891,-0.010264,0.000197,-0.000071,37,O +2021-05-20,59354,0.142062,0.446194,-0.1821300,0.0002771,-0.105602,-0.010265,0.000227,-0.000129,37,O +2021-05-21,59355,0.144518,0.446092,-0.1825058,0.0004653,-0.105556,-0.010433,0.000267,-0.000204,37,O +2021-05-22,59356,0.146638,0.446087,-0.1830591,0.0006161,-0.105780,-0.010527,0.000254,-0.000207,37,O +2021-05-23,59357,0.148357,0.446319,-0.1837359,0.0007012,-0.106114,-0.010345,0.000222,-0.000183,37,O +2021-05-24,59358,0.150055,0.446007,-0.1844377,0.0006778,-0.106686,-0.009942,0.000190,-0.000159,37,O +2021-05-25,59359,0.151671,0.445578,-0.1850358,0.0005120,-0.107551,-0.009625,0.000157,-0.000135,37,O +2021-05-26,59360,0.153177,0.445002,-0.1854186,0.0002683,-0.108338,-0.009587,0.000125,-0.000111,37,O +2021-05-27,59361,0.154610,0.444641,-0.1855433,-0.0000135,-0.108444,-0.009736,0.000155,-0.000132,37,O +2021-05-28,59362,0.156083,0.444149,-0.1854061,-0.0002723,-0.107948,-0.009867,0.000203,-0.000165,37,O +2021-05-29,59363,0.157787,0.443296,-0.1850586,-0.0004259,-0.107319,-0.009999,0.000216,-0.000173,37,O +2021-05-30,59364,0.159496,0.443194,-0.1846181,-0.0004360,-0.106855,-0.010257,0.000215,-0.000173,37,O +2021-05-31,59365,0.160764,0.443056,-0.1841962,-0.0003658,-0.106714,-0.010524,0.000215,-0.000172,37,O +2021-06-01,59366,0.162221,0.442541,-0.1838763,-0.0002431,-0.106913,-0.010562,0.000215,-0.000172,37,O +2021-06-02,59367,0.163505,0.442197,-0.1837088,-0.0001118,-0.107189,-0.010310,0.000238,-0.000157,37,O +2021-06-03,59368,0.164269,0.441835,-0.1836734,0.0000119,-0.107307,-0.009973,0.000267,-0.000139,37,O +2021-06-04,59369,0.165264,0.441101,-0.1837182,0.0000536,-0.107243,-0.009722,0.000296,-0.000120,37,O +2021-06-05,59370,0.166494,0.439959,-0.1837435,-0.0000156,-0.107338,-0.009564,0.000285,-0.000120,37,O +2021-06-06,59371,0.167443,0.438760,-0.1837213,-0.0001340,-0.107712,-0.009420,0.000260,-0.000126,37,O +2021-06-07,59372,0.168452,0.437773,-0.1835146,-0.0002761,-0.108222,-0.009335,0.000235,-0.000131,37,O +2021-06-08,59373,0.169988,0.437038,-0.1831307,-0.0004348,-0.108616,-0.009447,0.000210,-0.000137,37,O +2021-06-09,59374,0.171662,0.436466,-0.1825961,-0.0006056,-0.108746,-0.009756,0.000198,-0.000126,37,O +2021-06-10,59375,0.173060,0.436107,-0.1819126,-0.0007632,-0.108720,-0.010098,0.000190,-0.000111,37,O +2021-06-11,59376,0.174245,0.435720,-0.1810931,-0.0008734,-0.108643,-0.010282,0.000205,-0.000105,37,O +2021-06-12,59377,0.175463,0.435402,-0.1802017,-0.0009192,-0.108645,-0.010266,0.000228,-0.000104,37,O +2021-06-13,59378,0.176463,0.435076,-0.1792824,-0.0009227,-0.108763,-0.010171,0.000251,-0.000102,37,O +2021-06-14,59379,0.177561,0.434800,-0.1783898,-0.0008460,-0.108931,-0.010112,0.000274,-0.000100,37,O +2021-06-15,59380,0.178436,0.434544,-0.1776041,-0.0007086,-0.109005,-0.010092,0.000297,-0.000098,37,O +2021-06-16,59381,0.179161,0.433958,-0.1769638,-0.0005221,-0.109007,-0.010090,0.000273,-0.000128,37,O +2021-06-17,59382,0.179975,0.433150,-0.1765219,-0.0003366,-0.108937,-0.010073,0.000235,-0.000167,37,O +2021-06-18,59383,0.181538,0.431985,-0.1762920,-0.0001418,-0.108971,-0.010051,0.000198,-0.000206,37,O +2021-06-19,59384,0.183459,0.431221,-0.1762499,-0.0000088,-0.109186,-0.009941,0.000195,-0.000200,37,O +2021-06-20,59385,0.185268,0.430690,-0.1762848,0.0000040,-0.109672,-0.009715,0.000204,-0.000177,37,O +2021-06-21,59386,0.187008,0.430371,-0.1762299,-0.0001366,-0.110397,-0.009446,0.000213,-0.000153,37,O +2021-06-22,59387,0.188612,0.429729,-0.1759694,-0.0003671,-0.111169,-0.009304,0.000223,-0.000130,37,O +2021-06-23,59388,0.190249,0.428692,-0.1754577,-0.0006531,-0.111740,-0.009402,0.000211,-0.000157,37,O +2021-06-24,59389,0.191984,0.427561,-0.1746551,-0.0009461,-0.111870,-0.009570,0.000193,-0.000198,37,O +2021-06-25,59390,0.193895,0.426260,-0.1736026,-0.0011467,-0.111627,-0.009678,0.000175,-0.000239,37,O +2021-06-26,59391,0.195529,0.424979,-0.1723902,-0.0012514,-0.111223,-0.009764,0.000169,-0.000232,37,O +2021-06-27,59392,0.197249,0.423941,-0.1711520,-0.0012122,-0.110867,-0.009981,0.000169,-0.000206,37,O +2021-06-28,59393,0.199016,0.423212,-0.1700013,-0.0010808,-0.110723,-0.010241,0.000168,-0.000180,37,O +2021-06-29,59394,0.201014,0.422014,-0.1689979,-0.0008954,-0.110903,-0.010285,0.000167,-0.000155,37,O +2021-06-30,59395,0.203151,0.420682,-0.1681557,-0.0007509,-0.111326,-0.010039,0.000175,-0.000142,37,O +2021-07-01,59396,0.205011,0.419357,-0.1674255,-0.0007061,-0.111755,-0.009689,0.000185,-0.000133,37,O +2021-07-02,59397,0.206921,0.418137,-0.1667352,-0.0007290,-0.112004,-0.009464,0.000195,-0.000125,37,O +2021-07-03,59398,0.209024,0.416956,-0.1660067,-0.0007956,-0.112140,-0.009398,0.000213,-0.000118,37,O +2021-07-04,59399,0.211331,0.415811,-0.1651797,-0.0008841,-0.112363,-0.009373,0.000234,-0.000112,37,O +2021-07-05,59400,0.213414,0.414996,-0.1642095,-0.0010197,-0.112694,-0.009336,0.000255,-0.000106,37,O +2021-07-06,59401,0.215650,0.414027,-0.1630892,-0.0011760,-0.112980,-0.009377,0.000276,-0.000100,37,O +2021-07-07,59402,0.218140,0.413172,-0.1618291,-0.0013002,-0.113113,-0.009583,0.000297,-0.000094,37,O +2021-07-08,59403,0.220214,0.412138,-0.1604574,-0.0014004,-0.113230,-0.009877,0.000276,-0.000077,37,O +2021-07-09,59404,0.221832,0.410821,-0.1590228,-0.0014520,-0.113321,-0.010078,0.000245,-0.000059,37,O +2021-07-10,59405,0.223600,0.409097,-0.1575892,-0.0014271,-0.113323,-0.010077,0.000240,-0.000056,37,O +2021-07-11,59406,0.225666,0.407615,-0.1562169,-0.0013154,-0.113312,-0.009920,0.000245,-0.000060,37,O +2021-07-12,59407,0.227521,0.406499,-0.1549674,-0.0011382,-0.113374,-0.009766,0.000250,-0.000064,37,O +2021-07-13,59408,0.229363,0.405735,-0.1538980,-0.0009647,-0.113495,-0.009729,0.000256,-0.000067,37,O +2021-07-14,59409,0.230852,0.405177,-0.1530567,-0.0007412,-0.113617,-0.009794,0.000239,-0.000073,37,O +2021-07-15,59410,0.232364,0.404183,-0.1524225,-0.0005190,-0.113614,-0.009847,0.000216,-0.000080,37,O +2021-07-16,59411,0.233932,0.403085,-0.1520045,-0.0003391,-0.113595,-0.009787,0.000193,-0.000086,37,O +2021-07-17,59412,0.235568,0.402256,-0.1517411,-0.0002516,-0.113759,-0.009608,0.000192,-0.000098,37,O +2021-07-18,59413,0.236938,0.401571,-0.1515176,-0.0002888,-0.114276,-0.009388,0.000197,-0.000111,37,O +2021-07-19,59414,0.238366,0.400312,-0.1511975,-0.0003898,-0.115015,-0.009262,0.000202,-0.000125,37,O +2021-07-20,59415,0.239941,0.398929,-0.1507114,-0.0005551,-0.115643,-0.009312,0.000207,-0.000138,37,O +2021-07-21,59416,0.241402,0.397614,-0.1500616,-0.0007199,-0.115876,-0.009476,0.000224,-0.000143,37,O +2021-07-22,59417,0.242550,0.396349,-0.1492653,-0.0008670,-0.115745,-0.009604,0.000244,-0.000145,37,O +2021-07-23,59418,0.243559,0.394850,-0.1483896,-0.0009224,-0.115468,-0.009626,0.000263,-0.000148,37,O +2021-07-24,59419,0.244504,0.393363,-0.1475216,-0.0008550,-0.115321,-0.009619,0.000241,-0.000137,37,O +2021-07-25,59420,0.244659,0.392108,-0.1467385,-0.0007245,-0.115265,-0.009715,0.000205,-0.000120,37,O +2021-07-26,59421,0.244282,0.390818,-0.1460743,-0.0006021,-0.115280,-0.009873,0.000168,-0.000104,37,O +2021-07-27,59422,0.244021,0.389282,-0.1455380,-0.0004795,-0.115457,-0.009910,0.000132,-0.000087,37,O +2021-07-28,59423,0.243957,0.387023,-0.1451164,-0.0004072,-0.115784,-0.009750,0.000131,-0.000079,37,O +2021-07-29,59424,0.244271,0.384533,-0.1447485,-0.0003704,-0.116221,-0.009509,0.000140,-0.000073,37,O +2021-07-30,59425,0.245054,0.382456,-0.1443684,-0.0004102,-0.116596,-0.009367,0.000149,-0.000067,37,O +2021-07-31,59426,0.246021,0.381094,-0.1439172,-0.0005170,-0.116756,-0.009383,0.000182,-0.000083,37,O +2021-08-01,59427,0.246780,0.380162,-0.1433541,-0.0006384,-0.116809,-0.009429,0.000223,-0.000105,37,O +2021-08-02,59428,0.247724,0.379020,-0.1426563,-0.0007555,-0.116864,-0.009419,0.000264,-0.000127,37,O +2021-08-03,59429,0.248665,0.377672,-0.1418281,-0.0008856,-0.116928,-0.009418,0.000305,-0.000149,37,O +2021-08-04,59430,0.249247,0.376225,-0.1408819,-0.0009926,-0.117087,-0.009488,0.000295,-0.000110,37,O +2021-08-05,59431,0.250318,0.374716,-0.1398588,-0.0010475,-0.117212,-0.009692,0.000272,-0.000054,37,O +2021-08-06,59432,0.251557,0.373439,-0.1388293,-0.0010580,-0.117228,-0.009944,0.000256,-0.000038,37,O +2021-08-07,59433,0.252384,0.372189,-0.1377997,-0.0010329,-0.117131,-0.010037,0.000244,-0.000034,37,O +2021-08-08,59434,0.252618,0.370959,-0.1367543,-0.0009699,-0.116976,-0.009913,0.000231,-0.000031,37,O +2021-08-09,59435,0.251958,0.369547,-0.1358220,-0.0008438,-0.116861,-0.009698,0.000219,-0.000028,37,O +2021-08-10,59436,0.250843,0.367504,-0.1350686,-0.0006799,-0.116860,-0.009570,0.000206,-0.000025,37,O +2021-08-11,59437,0.250176,0.365255,-0.1345085,-0.0004603,-0.116935,-0.009605,0.000194,-0.000022,37,O +2021-08-12,59438,0.249897,0.363348,-0.1341190,-0.0003252,-0.117018,-0.009784,0.000182,-0.000080,37,O +2021-08-13,59439,0.249586,0.361519,-0.1338317,-0.0003000,-0.117129,-0.009917,0.000169,-0.000157,37,O +2021-08-14,59440,0.249168,0.359749,-0.1335458,-0.0003549,-0.117340,-0.009843,0.000169,-0.000170,37,O +2021-08-15,59441,0.248726,0.358103,-0.1331531,-0.0004593,-0.117733,-0.009659,0.000172,-0.000160,37,O +2021-08-16,59442,0.248321,0.356538,-0.1325675,-0.0006686,-0.118199,-0.009514,0.000176,-0.000150,37,O +2021-08-17,59443,0.248130,0.354895,-0.1317488,-0.0009228,-0.118520,-0.009488,0.000179,-0.000140,37,O +2021-08-18,59444,0.248008,0.353279,-0.1307185,-0.0010982,-0.118546,-0.009545,0.000183,-0.000131,37,O +2021-08-19,59445,0.247978,0.351653,-0.1295488,-0.0011741,-0.118297,-0.009587,0.000203,-0.000126,37,O +2021-08-20,59446,0.247731,0.350108,-0.1283563,-0.0011739,-0.117988,-0.009566,0.000229,-0.000124,37,O +2021-08-21,59447,0.247290,0.348276,-0.1272649,-0.0010243,-0.117743,-0.009514,0.000268,-0.000114,37,O +2021-08-22,59448,0.246822,0.346558,-0.1263384,-0.0008459,-0.117577,-0.009494,0.000313,-0.000103,37,O +2021-08-23,59449,0.246343,0.344554,-0.1255763,-0.0006538,-0.117446,-0.009485,0.000357,-0.000091,37,O +2021-08-24,59450,0.245986,0.342232,-0.1249636,-0.0005235,-0.117350,-0.009416,0.000401,-0.000080,37,O +2021-08-25,59451,0.246006,0.340077,-0.1244735,-0.0004466,-0.117582,-0.009295,0.000360,-0.000093,37,O +2021-08-26,59452,0.246029,0.338309,-0.1240162,-0.0004798,-0.118022,-0.009189,0.000296,-0.000112,37,O +2021-08-27,59453,0.246039,0.336463,-0.1235117,-0.0005674,-0.118513,-0.009184,0.000233,-0.000131,37,O +2021-08-28,59454,0.246083,0.334712,-0.1228899,-0.0006892,-0.118761,-0.009205,0.000223,-0.000091,37,O +2021-08-29,59455,0.246022,0.333214,-0.1221387,-0.0008198,-0.118783,-0.009190,0.000231,-0.000031,37,O +2021-08-30,59456,0.245834,0.331664,-0.1212791,-0.0008920,-0.118708,-0.009104,0.000239,0.000029,37,O +2021-08-31,59457,0.245060,0.329881,-0.1203267,-0.0009814,-0.118658,-0.009011,0.000247,0.000089,37,O +2021-09-01,59458,0.244291,0.327776,-0.1193071,-0.0010322,-0.118653,-0.009123,0.000253,0.000051,37,O +2021-09-02,59459,0.243859,0.325972,-0.1182574,-0.0010516,-0.118581,-0.009390,0.000260,-0.000013,37,O +2021-09-03,59460,0.243838,0.324135,-0.1172280,-0.0010009,-0.118364,-0.009679,0.000266,-0.000077,37,O +2021-09-04,59461,0.243924,0.322819,-0.1162657,-0.0008934,-0.118147,-0.009782,0.000233,-0.000089,37,O +2021-09-05,59462,0.243284,0.321221,-0.1154565,-0.0007065,-0.117995,-0.009664,0.000188,-0.000083,37,O +2021-09-06,59463,0.242288,0.319291,-0.1149183,-0.0004500,-0.117966,-0.009415,0.000143,-0.000077,37,O +2021-09-07,59464,0.241085,0.317267,-0.1145864,-0.0002230,-0.118054,-0.009194,0.000097,-0.000071,37,O +2021-09-08,59465,0.240168,0.315380,-0.1144389,-0.0000487,-0.118217,-0.009134,0.000052,-0.000065,37,O +2021-09-09,59466,0.239509,0.313682,-0.1144456,0.0000445,-0.118199,-0.009278,0.000108,-0.000082,37,O +2021-09-10,59467,0.239055,0.311944,-0.1145001,0.0000481,-0.118196,-0.009493,0.000190,-0.000103,37,O +2021-09-11,59468,0.238903,0.310398,-0.1145067,-0.0000661,-0.118376,-0.009600,0.000217,-0.000108,37,O +2021-09-12,59469,0.239057,0.309176,-0.1143417,-0.0002835,-0.118582,-0.009536,0.000225,-0.000108,37,O +2021-09-13,59470,0.239061,0.308241,-0.1139194,-0.0005446,-0.118703,-0.009367,0.000233,-0.000107,37,O +2021-09-14,59471,0.238135,0.306840,-0.1132542,-0.0007658,-0.118709,-0.009209,0.000240,-0.000106,37,O +2021-09-15,59472,0.236855,0.305424,-0.1124265,-0.0008470,-0.118560,-0.009153,0.000260,-0.000133,37,O +2021-09-16,59473,0.235175,0.304217,-0.1115600,-0.0008380,-0.118299,-0.009166,0.000282,-0.000168,37,O +2021-09-17,59474,0.234052,0.302470,-0.1107776,-0.0006952,-0.117981,-0.009206,0.000304,-0.000203,37,O +2021-09-18,59475,0.233267,0.300669,-0.1101847,-0.0004981,-0.117771,-0.009190,0.000294,-0.000179,37,O +2021-09-19,59476,0.231901,0.298971,-0.1097908,-0.0003079,-0.117692,-0.009120,0.000271,-0.000133,37,O +2021-09-20,59477,0.230860,0.297082,-0.1095369,-0.0001935,-0.117703,-0.008971,0.000250,-0.000088,37,O +2021-09-21,59478,0.230386,0.295169,-0.1093835,-0.0001309,-0.117745,-0.008710,0.000229,-0.000021,37,O +2021-09-22,59479,0.230280,0.293410,-0.1092939,-0.0000808,-0.117784,-0.008514,0.000215,-0.000032,37,O +2021-09-23,59480,0.229745,0.291932,-0.1092075,-0.0001148,-0.117885,-0.008448,0.000201,-0.000063,37,O +2021-09-24,59481,0.229059,0.290744,-0.1090710,-0.0001808,-0.118056,-0.008545,0.000187,-0.000093,37,O +2021-09-25,59482,0.228196,0.289721,-0.1088548,-0.0002793,-0.118125,-0.008697,0.000198,-0.000095,37,O +2021-09-26,59483,0.226765,0.288616,-0.1085235,-0.0004236,-0.118017,-0.008793,0.000218,-0.000088,37,O +2021-09-27,59484,0.224983,0.286909,-0.1080259,-0.0005541,-0.117799,-0.008801,0.000237,-0.000081,37,O +2021-09-28,59485,0.223233,0.285091,-0.1073996,-0.0006578,-0.117613,-0.008799,0.000257,-0.000075,37,O +2021-09-29,59486,0.221642,0.283266,-0.1067014,-0.0007266,-0.117515,-0.008884,0.000266,-0.000086,37,O +2021-09-30,59487,0.220649,0.281274,-0.1059687,-0.0007290,-0.117316,-0.009021,0.000272,-0.000102,37,O +2021-10-01,59488,0.219900,0.279843,-0.1052566,-0.0006552,-0.116894,-0.009099,0.000278,-0.000118,37,O +2021-10-02,59489,0.219232,0.278385,-0.1046635,-0.0005041,-0.116396,-0.009043,0.000288,-0.000132,37,O +2021-10-03,59490,0.218114,0.277440,-0.1042262,-0.0003168,-0.116108,-0.008872,0.000301,-0.000145,37,O +2021-10-04,59491,0.216463,0.276398,-0.1040412,-0.0000538,-0.116115,-0.008648,0.000314,-0.000158,37,O +2021-10-05,59492,0.214966,0.275265,-0.1041427,0.0002367,-0.116245,-0.008435,0.000326,-0.000172,37,O +2021-10-06,59493,0.212886,0.274073,-0.1045130,0.0004438,-0.116543,-0.008305,0.000255,-0.000172,37,O +2021-10-07,59494,0.210670,0.272310,-0.1050355,0.0005448,-0.116846,-0.008364,0.000164,-0.000169,37,O +2021-10-08,59495,0.208740,0.270354,-0.1055552,0.0004758,-0.117140,-0.008593,0.000073,-0.000166,37,O +2021-10-09,59496,0.206987,0.268630,-0.1059176,0.0002801,-0.117149,-0.008775,0.000080,-0.000140,37,O +2021-10-10,59497,0.205587,0.267049,-0.1060489,0.0000458,-0.117005,-0.008734,0.000123,-0.000105,37,O +2021-10-11,59498,0.204294,0.265940,-0.1059506,-0.0002003,-0.116845,-0.008499,0.000164,-0.000071,37,O +2021-10-12,59499,0.202929,0.265318,-0.1056985,-0.0003003,-0.116696,-0.008264,0.000206,-0.000037,37,O +2021-10-13,59500,0.201347,0.265115,-0.1053769,-0.0003296,-0.116533,-0.008163,0.000249,-0.000003,37,O +2021-10-14,59501,0.199531,0.264474,-0.1050561,-0.0002785,-0.116392,-0.008233,0.000253,-0.000031,37,O +2021-10-15,59502,0.197144,0.264052,-0.1048215,-0.0001786,-0.116168,-0.008339,0.000247,-0.000076,37,O +2021-10-16,59503,0.194540,0.263311,-0.1047296,-0.0000160,-0.115892,-0.008371,0.000238,-0.000079,37,O +2021-10-17,59504,0.192522,0.262732,-0.1047961,0.0001436,-0.115671,-0.008326,0.000228,-0.000068,37,O +2021-10-18,59505,0.190330,0.262116,-0.1049797,0.0002729,-0.115586,-0.008172,0.000218,-0.000056,37,O +2021-10-19,59506,0.188419,0.261094,-0.1053261,0.0003283,-0.115599,-0.007898,0.000207,-0.000044,37,O +2021-10-20,59507,0.186951,0.260372,-0.1056852,0.0003063,-0.115532,-0.007637,0.000226,-0.000066,37,O +2021-10-21,59508,0.185890,0.259671,-0.1059933,0.0002542,-0.115408,-0.007531,0.000253,-0.000096,37,O +2021-10-22,59509,0.185109,0.258931,-0.1061695,0.0001074,-0.115283,-0.007652,0.000280,-0.000127,37,O +2021-10-23,59510,0.183997,0.258126,-0.1061599,-0.0001073,-0.115214,-0.007852,0.000282,-0.000110,37,O +2021-10-24,59511,0.182170,0.256859,-0.1059532,-0.0003135,-0.115105,-0.007981,0.000275,-0.000073,37,O +2021-10-25,59512,0.180765,0.255674,-0.1055673,-0.0004478,-0.114951,-0.007995,0.000267,-0.000036,37,O +2021-10-26,59513,0.179443,0.255135,-0.1050710,-0.0004914,-0.114842,-0.007976,0.000259,0.000001,37,O +2021-10-27,59514,0.177475,0.254614,-0.1045560,-0.0004736,-0.114798,-0.008064,0.000244,-0.000029,37,O +2021-10-28,59515,0.174986,0.254210,-0.1040921,-0.0004235,-0.114636,-0.008154,0.000226,-0.000076,37,O +2021-10-29,59516,0.172883,0.253703,-0.1037503,-0.0002679,-0.114222,-0.008112,0.000209,-0.000124,37,O +2021-10-30,59517,0.171153,0.253485,-0.1035881,-0.0000628,-0.113712,-0.007886,0.000211,-0.000123,37,O +2021-10-31,59518,0.169153,0.253030,-0.1036762,0.0002284,-0.113489,-0.007636,0.000221,-0.000105,37,O +2021-11-01,59519,0.167161,0.252590,-0.1040619,0.0005226,-0.113648,-0.007463,0.000230,-0.000087,37,O +2021-11-02,59520,0.165421,0.252037,-0.1047142,0.0007367,-0.113919,-0.007301,0.000239,-0.000069,37,O +2021-11-03,59521,0.164345,0.251154,-0.1055305,0.0008486,-0.114076,-0.007098,0.000249,-0.000051,37,O +2021-11-04,59522,0.163380,0.250407,-0.1063597,0.0007779,-0.114274,-0.006977,0.000200,-0.000036,37,O +2021-11-05,59523,0.161527,0.249780,-0.1070350,0.0005185,-0.114417,-0.007068,0.000135,-0.000022,37,O +2021-11-06,59524,0.158959,0.249274,-0.1074216,0.0002206,-0.114174,-0.007273,0.000153,-0.000034,37,O +2021-11-07,59525,0.156428,0.248766,-0.1075061,-0.0000193,-0.113720,-0.007312,0.000204,-0.000058,37,O +2021-11-08,59526,0.154365,0.248057,-0.1073849,-0.0001713,-0.113374,-0.007138,0.000254,-0.000081,37,O +2021-11-09,59527,0.152501,0.247567,-0.1071716,-0.0002182,-0.113247,-0.007009,0.000304,-0.000104,37,O +2021-11-10,59528,0.150781,0.247125,-0.1069620,-0.0001425,-0.113363,-0.007072,0.000289,-0.000093,37,O +2021-11-11,59529,0.149470,0.246785,-0.1068772,0.0000166,-0.113428,-0.007227,0.000255,-0.000072,37,O +2021-11-12,59530,0.148470,0.246564,-0.1069721,0.0001709,-0.113370,-0.007262,0.000222,-0.000052,37,O +2021-11-13,59531,0.147692,0.246455,-0.1072523,0.0003196,-0.113185,-0.007165,0.000220,-0.000061,37,O +2021-11-14,59532,0.147041,0.246459,-0.1076527,0.0003813,-0.112994,-0.007024,0.000230,-0.000082,37,O +2021-11-15,59533,0.145836,0.246338,-0.1080024,0.0003295,-0.112892,-0.006878,0.000239,-0.000102,37,O +2021-11-16,59534,0.143555,0.246023,-0.1082774,0.0002430,-0.112883,-0.006691,0.000249,-0.000122,37,O +2021-11-17,59535,0.141392,0.245346,-0.1084806,0.0001504,-0.112918,-0.006416,0.000247,-0.000082,37,O +2021-11-18,59536,0.139789,0.245077,-0.1085552,0.0000024,-0.112878,-0.006226,0.000242,-0.000025,37,O +2021-11-19,59537,0.137868,0.245245,-0.1084680,-0.0001716,-0.112755,-0.006253,0.000237,0.000032,37,O +2021-11-20,59538,0.135470,0.245267,-0.1081943,-0.0003451,-0.112586,-0.006495,0.000242,0.000032,37,O +2021-11-21,59539,0.133433,0.245936,-0.1077699,-0.0004589,-0.112425,-0.006731,0.000250,0.000011,37,O +2021-11-22,59540,0.131584,0.246933,-0.1072664,-0.0005149,-0.112282,-0.006830,0.000257,-0.000010,37,O +2021-11-23,59541,0.129614,0.247350,-0.1067281,-0.0005456,-0.112157,-0.006857,0.000265,-0.000031,37,O +2021-11-24,59542,0.127746,0.247246,-0.1062044,-0.0005261,-0.112031,-0.006907,0.000273,-0.000052,37,O +2021-11-25,59543,0.126546,0.247694,-0.1057277,-0.0004280,-0.111742,-0.006906,0.000305,-0.000029,37,O +2021-11-26,59544,0.125318,0.248339,-0.1053900,-0.0002261,-0.111266,-0.006772,0.000344,0.000006,37,O +2021-11-27,59545,0.123926,0.249137,-0.1053000,0.0000260,-0.110920,-0.006579,0.000321,-0.000017,37,O +2021-11-28,59546,0.122510,0.250182,-0.1054501,0.0002285,-0.110873,-0.006446,0.000278,-0.000060,37,O +2021-11-29,59547,0.120935,0.250800,-0.1057693,0.0003902,-0.111138,-0.006451,0.000234,-0.000103,37,O +2021-11-30,59548,0.119462,0.251409,-0.1062356,0.0005403,-0.111496,-0.006463,0.000190,-0.000147,37,O +2021-12-01,59549,0.117908,0.252101,-0.1068219,0.0005712,-0.111672,-0.006258,0.000205,-0.000142,37,O +2021-12-02,59550,0.116646,0.253077,-0.1073817,0.0004702,-0.111874,-0.005966,0.000235,-0.000125,37,O +2021-12-03,59551,0.115236,0.254139,-0.1077758,0.0002768,-0.112122,-0.005874,0.000265,-0.000108,37,O +2021-12-04,59552,0.113528,0.254463,-0.1079062,-0.0000071,-0.112187,-0.006031,0.000270,-0.000106,37,O +2021-12-05,59553,0.112210,0.254544,-0.1077891,-0.0002049,-0.111884,-0.006154,0.000266,-0.000109,37,O +2021-12-06,59554,0.110933,0.255126,-0.1075299,-0.0002631,-0.111458,-0.006078,0.000263,-0.000112,37,O +2021-12-07,59555,0.109262,0.255631,-0.1072636,-0.0001957,-0.111227,-0.006002,0.000259,-0.000116,37,O +2021-12-08,59556,0.106686,0.256326,-0.1071092,-0.0000541,-0.111176,-0.006134,0.000249,-0.000116,37,O +2021-12-09,59557,0.103984,0.256757,-0.1071653,0.0001373,-0.111132,-0.006338,0.000237,-0.000116,37,O +2021-12-10,59558,0.101414,0.257116,-0.1074002,0.0003090,-0.111095,-0.006308,0.000225,-0.000115,37,O +2021-12-11,59559,0.098426,0.257383,-0.1077748,0.0004257,-0.111085,-0.005998,0.000239,-0.000111,37,O +2021-12-12,59560,0.095231,0.257384,-0.1082102,0.0004477,-0.111113,-0.005653,0.000263,-0.000105,37,O +2021-12-13,59561,0.092509,0.257408,-0.1086201,0.0003713,-0.111139,-0.005474,0.000286,-0.000099,37,O +2021-12-14,59562,0.090306,0.258026,-0.1089586,0.0002966,-0.111161,-0.005420,0.000310,-0.000093,37,O +2021-12-15,59563,0.087829,0.258992,-0.1091980,0.0001665,-0.111310,-0.005388,0.000278,-0.000106,37,O +2021-12-16,59564,0.085353,0.259707,-0.1093060,0.0000223,-0.111400,-0.005371,0.000232,-0.000124,37,O +2021-12-17,59565,0.082621,0.260745,-0.1092661,-0.0001186,-0.111355,-0.005475,0.000186,-0.000142,37,O +2021-12-18,59566,0.080179,0.261328,-0.1090678,-0.0002676,-0.111129,-0.005691,0.000193,-0.000128,37,O +2021-12-19,59567,0.078732,0.261660,-0.1087469,-0.0003304,-0.110910,-0.005904,0.000220,-0.000102,37,O +2021-12-20,59568,0.077355,0.262569,-0.1083780,-0.0003631,-0.110743,-0.005989,0.000247,-0.000076,37,O +2021-12-21,59569,0.075405,0.263444,-0.1079991,-0.0003958,-0.110539,-0.005957,0.000274,-0.000050,37,O +2021-12-22,59570,0.073133,0.264278,-0.1076234,-0.0003472,-0.110373,-0.005927,0.000250,-0.000038,37,O +2021-12-23,59571,0.070881,0.265173,-0.1073418,-0.0001681,-0.110167,-0.005926,0.000213,-0.000030,37,O +2021-12-24,59572,0.068514,0.266510,-0.1072445,0.0000386,-0.109820,-0.005940,0.000223,-0.000071,37,O +2021-12-25,59573,0.066054,0.267813,-0.1073681,0.0002146,-0.109476,-0.005907,0.000252,-0.000130,37,O +2021-12-26,59574,0.064264,0.268977,-0.1077173,0.0004337,-0.109284,-0.005886,0.000280,-0.000190,37,O +2021-12-27,59575,0.062771,0.270366,-0.1082590,0.0006074,-0.109258,-0.005945,0.000309,-0.000249,37,O +2021-12-28,59576,0.061119,0.271893,-0.1089162,0.0006456,-0.109321,-0.005997,0.000337,-0.000309,37,O +2021-12-29,59577,0.059184,0.273531,-0.1095688,0.0005855,-0.109831,-0.005839,0.000221,-0.000316,37,O +2021-12-30,59578,0.057753,0.274728,-0.1101029,0.0004366,-0.110666,-0.005560,0.000068,-0.000309,37,O +2021-12-31,59579,0.056304,0.275973,-0.1104355,0.0001907,-0.111412,-0.005426,0.000040,-0.000287,37,O +2022-01-01,59580,0.054574,0.276983,-0.1105197,-0.0000357,-0.111899,-0.005573,0.000059,-0.000259,37,O +2022-01-02,59581,0.053381,0.277886,-0.1103891,-0.0002254,-0.111877,-0.005801,0.000077,-0.000230,37,O +2022-01-03,59582,0.052855,0.278999,-0.1101398,-0.0002593,-0.111401,-0.005868,0.000095,-0.000202,37,O +2022-01-04,59583,0.053294,0.280607,-0.1099190,-0.0001210,-0.110807,-0.005829,0.000114,-0.000174,37,O +2022-01-05,59584,0.053559,0.282963,-0.1098692,0.0000832,-0.110307,-0.005882,0.000132,-0.000152,37,O +2022-01-06,59585,0.053042,0.285048,-0.1100259,0.0002481,-0.109937,-0.005974,0.000150,-0.000132,37,O +2022-01-07,59586,0.051849,0.286983,-0.1103610,0.0003632,-0.109778,-0.005861,0.000169,-0.000113,37,O +2022-01-08,59587,0.050225,0.288671,-0.1107892,0.0004361,-0.109885,-0.005484,0.000194,-0.000092,37,O +2022-01-09,59588,0.048602,0.290231,-0.1112277,0.0004120,-0.110147,-0.005099,0.000222,-0.000071,37,O +2022-01-10,59589,0.047155,0.291472,-0.1116091,0.0003188,-0.110373,-0.004960,0.000249,-0.000050,37,O +2022-01-11,59590,0.045595,0.292576,-0.1118697,0.0001719,-0.110484,-0.005049,0.000277,-0.000029,37,O +2022-01-12,59591,0.044205,0.293449,-0.1119606,-0.0000010,-0.110597,-0.005195,0.000266,-0.000035,37,O +2022-01-13,59592,0.043394,0.294345,-0.1118677,-0.0001786,-0.110603,-0.005273,0.000244,-0.000047,37,O +2022-01-14,59593,0.043106,0.295839,-0.1115941,-0.0003603,-0.110438,-0.005353,0.000223,-0.000060,37,O +2022-01-15,59594,0.043114,0.297844,-0.1111643,-0.0004983,-0.110195,-0.005540,0.000205,-0.000078,37,O +2022-01-16,59595,0.042534,0.299918,-0.1106129,-0.0005991,-0.110039,-0.005787,0.000188,-0.000097,37,O +2022-01-17,59596,0.041549,0.301463,-0.1100064,-0.0006154,-0.109987,-0.005955,0.000172,-0.000117,37,O +2022-01-18,59597,0.039912,0.303016,-0.1093760,-0.0006054,-0.109902,-0.005973,0.000155,-0.000136,37,O +2022-01-19,59598,0.038420,0.303951,-0.1088179,-0.0004807,-0.109671,-0.005907,0.000139,-0.000156,37,O +2022-01-20,59599,0.037831,0.305025,-0.1084531,-0.0002680,-0.109285,-0.005871,0.000157,-0.000185,37,O +2022-01-21,59600,0.037456,0.306196,-0.1082981,-0.0000409,-0.108956,-0.005893,0.000184,-0.000218,37,O +2022-01-22,59601,0.036968,0.307328,-0.1083306,0.0001170,-0.108866,-0.005897,0.000174,-0.000208,37,O +2022-01-23,59602,0.036011,0.308634,-0.1085119,0.0002229,-0.108922,-0.005877,0.000149,-0.000180,37,O +2022-01-24,59603,0.034458,0.310100,-0.1087689,0.0002555,-0.109048,-0.005839,0.000124,-0.000153,37,O +2022-01-25,59604,0.032747,0.311519,-0.1090294,0.0002359,-0.109241,-0.005759,0.000100,-0.000126,37,O +2022-01-26,59605,0.031327,0.312793,-0.1092242,0.0001302,-0.109416,-0.005652,0.000124,-0.000137,37,O +2022-01-27,59606,0.030254,0.314102,-0.1092764,-0.0000451,-0.109698,-0.005548,0.000162,-0.000159,37,O +2022-01-28,59607,0.029060,0.315654,-0.1091370,-0.0002362,-0.110085,-0.005577,0.000200,-0.000181,37,O +2022-01-29,59608,0.028306,0.317130,-0.1088191,-0.0004108,-0.110488,-0.005790,0.000198,-0.000190,37,O +2022-01-30,59609,0.027664,0.318978,-0.1083658,-0.0004934,-0.110627,-0.006064,0.000181,-0.000195,37,O +2022-01-31,59610,0.026619,0.320963,-0.1078483,-0.0004966,-0.110424,-0.006222,0.000165,-0.000200,37,O +2022-02-01,59611,0.026107,0.323014,-0.1073994,-0.0003435,-0.110029,-0.006256,0.000148,-0.000205,37,O +2022-02-02,59612,0.025834,0.325489,-0.1071431,-0.0001248,-0.109538,-0.006310,0.000154,-0.000230,37,O +2022-02-03,59613,0.025683,0.327751,-0.1070987,0.0000410,-0.109116,-0.006393,0.000165,-0.000260,37,O +2022-02-04,59614,0.025779,0.330022,-0.1072225,0.0001631,-0.108919,-0.006381,0.000176,-0.000291,37,O +2022-02-05,59615,0.025738,0.332211,-0.1074267,0.0002001,-0.109063,-0.006141,0.000179,-0.000242,37,O +2022-02-06,59616,0.025676,0.333942,-0.1076113,0.0001192,-0.109447,-0.005873,0.000180,-0.000163,37,O +2022-02-07,59617,0.025772,0.335603,-0.1076870,-0.0000055,-0.109853,-0.005790,0.000180,-0.000084,37,O +2022-02-08,59618,0.025193,0.337374,-0.1075919,-0.0001773,-0.110126,-0.005888,0.000180,-0.000005,37,O +2022-02-09,59619,0.024114,0.338478,-0.1072977,-0.0003784,-0.110203,-0.006067,0.000186,0.000003,37,O +2022-02-10,59620,0.022952,0.339544,-0.1067962,-0.0005835,-0.110062,-0.006157,0.000194,-0.000009,37,O +2022-02-11,59621,0.021317,0.340636,-0.1061126,-0.0007824,-0.109706,-0.006193,0.000202,-0.000020,37,O +2022-02-12,59622,0.019510,0.341957,-0.1052912,-0.0008659,-0.109259,-0.006321,0.000208,-0.000043,37,O +2022-02-13,59623,0.017952,0.343165,-0.1044265,-0.0008125,-0.108917,-0.006560,0.000214,-0.000071,37,O +2022-02-14,59624,0.017178,0.344276,-0.1036375,-0.0006966,-0.108763,-0.006785,0.000221,-0.000099,37,O +2022-02-15,59625,0.016814,0.345848,-0.1029937,-0.0005407,-0.108690,-0.006864,0.000227,-0.000127,37,O +2022-02-16,59626,0.016373,0.347600,-0.1025279,-0.0003604,-0.108569,-0.006803,0.000222,-0.000167,37,O +2022-02-17,59627,0.016174,0.349955,-0.1022855,-0.0001249,-0.108379,-0.006702,0.000213,-0.000210,37,O +2022-02-18,59628,0.015893,0.352552,-0.1022778,0.0001177,-0.108238,-0.006679,0.000205,-0.000253,37,O +2022-02-19,59629,0.016057,0.355009,-0.1024803,0.0003106,-0.108239,-0.006688,0.000199,-0.000224,37,O +2022-02-20,59630,0.016152,0.357350,-0.1028229,0.0003746,-0.108367,-0.006714,0.000194,-0.000170,37,O +2022-02-21,59631,0.016225,0.359459,-0.1032042,0.0003443,-0.108568,-0.006699,0.000189,-0.000115,37,O +2022-02-22,59632,0.016672,0.361277,-0.1035256,0.0002538,-0.108817,-0.006617,0.000184,-0.000061,37,O +2022-02-23,59633,0.017619,0.362779,-0.1037081,0.0000945,-0.109078,-0.006583,0.000177,-0.000085,37,O +2022-02-24,59634,0.018496,0.364360,-0.1036928,-0.0001444,-0.109259,-0.006613,0.000169,-0.000128,37,O +2022-02-25,59635,0.018931,0.365807,-0.1034734,-0.0003469,-0.109270,-0.006743,0.000162,-0.000172,37,O +2022-02-26,59636,0.019607,0.367229,-0.1031018,-0.0004237,-0.109106,-0.006902,0.000156,-0.000164,37,O +2022-02-27,59637,0.020241,0.368836,-0.1026797,-0.0004119,-0.108854,-0.007042,0.000150,-0.000136,37,O +2022-02-28,59638,0.020656,0.370624,-0.1023250,-0.0002793,-0.108624,-0.007107,0.000144,-0.000108,37,O +2022-03-01,59639,0.020909,0.372342,-0.1021425,-0.0000861,-0.108462,-0.007107,0.000139,-0.000080,37,O +2022-03-02,59640,0.021778,0.373951,-0.1021944,0.0001374,-0.108199,-0.007104,0.000190,-0.000054,37,O +2022-03-03,59641,0.023290,0.376273,-0.1024561,0.0003524,-0.107898,-0.007117,0.000256,-0.000028,37,O +2022-03-04,59642,0.024972,0.378479,-0.1028435,0.0004407,-0.107637,-0.007109,0.000322,-0.000003,37,O +2022-03-05,59643,0.026774,0.380581,-0.1032424,0.0003800,-0.107706,-0.007086,0.000310,-0.000006,37,O +2022-03-06,59644,0.028086,0.382600,-0.1035550,0.0002448,-0.108027,-0.007094,0.000269,-0.000021,37,O +2022-03-07,59645,0.029543,0.384798,-0.1037203,0.0000610,-0.108450,-0.007191,0.000228,-0.000036,37,O +2022-03-08,59646,0.031018,0.386712,-0.1036844,-0.0001762,-0.108826,-0.007354,0.000187,-0.000051,37,O +2022-03-09,59647,0.032281,0.388541,-0.1034089,-0.0003856,-0.108866,-0.007460,0.000208,-0.000044,37,O +2022-03-10,59648,0.033104,0.390312,-0.1029383,-0.0005485,-0.108612,-0.007475,0.000245,-0.000032,37,O +2022-03-11,59649,0.033708,0.392105,-0.1023346,-0.0006461,-0.108109,-0.007473,0.000283,-0.000019,37,O +2022-03-12,59650,0.034130,0.393729,-0.1016864,-0.0006622,-0.107569,-0.007581,0.000282,-0.000021,37,O +2022-03-13,59651,0.034502,0.395152,-0.1010372,-0.0006340,-0.107117,-0.007813,0.000267,-0.000027,37,O +2022-03-14,59652,0.034354,0.396685,-0.1004104,-0.0005758,-0.106877,-0.008063,0.000251,-0.000033,37,O +2022-03-15,59653,0.034250,0.398014,-0.0998830,-0.0004198,-0.106865,-0.008198,0.000236,-0.000040,37,O +2022-03-16,59654,0.033972,0.399563,-0.0995467,-0.0002068,-0.106918,-0.008181,0.000240,-0.000064,37,O +2022-03-17,59655,0.033426,0.401244,-0.0994339,0.0000163,-0.106930,-0.008064,0.000248,-0.000093,37,O +2022-03-18,59656,0.033046,0.402931,-0.0995428,0.0001805,-0.106876,-0.007950,0.000256,-0.000123,37,O +2022-03-19,59657,0.032894,0.404430,-0.0998242,0.0003191,-0.106884,-0.007889,0.000250,-0.000121,37,O +2022-03-20,59658,0.033017,0.405997,-0.1001905,0.0003801,-0.107059,-0.007919,0.000239,-0.000108,37,O +2022-03-21,59659,0.033291,0.407432,-0.1005194,0.0002940,-0.107409,-0.008005,0.000227,-0.000094,37,O +2022-03-22,59660,0.034163,0.408866,-0.1007374,0.0000994,-0.107806,-0.008084,0.000216,-0.000081,37,O +2022-03-23,59661,0.035739,0.410677,-0.1007668,-0.0001129,-0.108069,-0.008122,0.000204,-0.000068,37,O +2022-03-24,59662,0.037184,0.412921,-0.1005632,-0.0003225,-0.108121,-0.008146,0.000172,-0.000063,37,O +2022-03-25,59663,0.038276,0.415002,-0.1001852,-0.0004645,-0.107917,-0.008187,0.000135,-0.000060,37,O +2022-03-26,59664,0.039275,0.416959,-0.0997325,-0.0004511,-0.107413,-0.008263,0.000151,-0.000064,37,O +2022-03-27,59665,0.040293,0.418593,-0.0993188,-0.0003561,-0.106845,-0.008345,0.000188,-0.000069,37,O +2022-03-28,59666,0.041691,0.420175,-0.0990554,-0.0001799,-0.106412,-0.008410,0.000224,-0.000075,37,O +2022-03-29,59667,0.042792,0.421696,-0.0989777,0.0000252,-0.106189,-0.008449,0.000260,-0.000080,37,O +2022-03-30,59668,0.043491,0.423055,-0.0990426,0.0001445,-0.106244,-0.008453,0.000260,-0.000082,37,O +2022-03-31,59669,0.043570,0.424794,-0.0992346,0.0002320,-0.106398,-0.008414,0.000250,-0.000084,37,O +2022-04-01,59670,0.043301,0.426919,-0.0995031,0.0002946,-0.106506,-0.008343,0.000240,-0.000085,37,O +2022-04-02,59671,0.043471,0.428898,-0.0997958,0.0002749,-0.106536,-0.008278,0.000233,-0.000071,37,O +2022-04-03,59672,0.044401,0.430964,-0.1000185,0.0001447,-0.106583,-0.008291,0.000226,-0.000050,37,O +2022-04-04,59673,0.045179,0.433548,-0.1000877,-0.0000328,-0.106727,-0.008395,0.000220,-0.000030,37,O +2022-04-05,59674,0.045558,0.436184,-0.0999601,-0.0002317,-0.106928,-0.008515,0.000214,-0.000009,37,O +2022-04-06,59675,0.046324,0.438296,-0.0996161,-0.0004384,-0.107011,-0.008588,0.000222,-0.000008,37,O +2022-04-07,59676,0.047660,0.440084,-0.0991087,-0.0005727,-0.106904,-0.008610,0.000233,-0.000013,37,O +2022-04-08,59677,0.049412,0.441800,-0.0985116,-0.0006006,-0.106602,-0.008670,0.000245,-0.000018,37,O +2022-04-09,59678,0.051279,0.443588,-0.0979207,-0.0005595,-0.106131,-0.008844,0.000264,-0.000022,37,O +2022-04-10,59679,0.052631,0.445310,-0.0973816,-0.0005042,-0.105574,-0.009106,0.000286,-0.000028,37,O +2022-04-11,59680,0.053447,0.447037,-0.0969159,-0.0004145,-0.105095,-0.009347,0.000307,-0.000033,37,O +2022-04-12,59681,0.054284,0.449011,-0.0965845,-0.0002357,-0.104884,-0.009491,0.000329,-0.000038,37,O +2022-04-13,59682,0.055292,0.451073,-0.0964523,-0.0000043,-0.105062,-0.009565,0.000323,-0.000084,37,O +2022-04-14,59683,0.056547,0.452892,-0.0965557,0.0002481,-0.105379,-0.009547,0.000309,-0.000141,37,O +2022-04-15,59684,0.057823,0.454485,-0.0968994,0.0004668,-0.105550,-0.009362,0.000302,-0.000137,37,O +2022-04-16,59685,0.059424,0.456172,-0.0974129,0.0005563,-0.105603,-0.009095,0.000298,-0.000109,37,O +2022-04-17,59686,0.061164,0.457851,-0.0979865,0.0005239,-0.105807,-0.008908,0.000293,-0.000082,37,O +2022-04-18,59687,0.063734,0.459266,-0.0985020,0.0004144,-0.106274,-0.008922,0.000289,-0.000054,37,O +2022-04-19,59688,0.066192,0.460869,-0.0988272,0.0002090,-0.106773,-0.009104,0.000284,-0.000027,37,O +2022-04-20,59689,0.068329,0.461999,-0.0988949,-0.0000552,-0.106960,-0.009291,0.000280,0.000001,37,O +2022-04-21,59690,0.070468,0.463064,-0.0987060,-0.0003082,-0.106695,-0.009434,0.000297,-0.000039,37,O +2022-04-22,59691,0.072707,0.464098,-0.0983386,-0.0004087,-0.106211,-0.009508,0.000320,-0.000096,37,O +2022-04-23,59692,0.075204,0.465058,-0.0979051,-0.0003976,-0.105797,-0.009527,0.000323,-0.000106,37,O +2022-04-24,59693,0.077859,0.466247,-0.0975194,-0.0003138,-0.105498,-0.009555,0.000318,-0.000099,37,O +2022-04-25,59694,0.080557,0.467896,-0.0972632,-0.0001778,-0.105265,-0.009590,0.000313,-0.000093,37,O +2022-04-26,59695,0.082859,0.469891,-0.0971847,-0.0000024,-0.105109,-0.009593,0.000308,-0.000086,37,O +2022-04-27,59696,0.084908,0.471486,-0.0972203,0.0001167,-0.105096,-0.009548,0.000307,-0.000106,37,O +2022-04-28,59697,0.086518,0.472819,-0.0973522,0.0001364,-0.105258,-0.009407,0.000307,-0.000133,37,O +2022-04-29,59698,0.087895,0.473595,-0.0974914,0.0001236,-0.105480,-0.009203,0.000308,-0.000160,37,O +2022-04-30,59699,0.089653,0.474104,-0.0975559,0.0000411,-0.105614,-0.009011,0.000307,-0.000141,37,O +2022-05-01,59700,0.091728,0.474632,-0.0975257,-0.0000873,-0.105627,-0.008987,0.000306,-0.000104,37,O +2022-05-02,59701,0.093634,0.475311,-0.0974187,-0.0001804,-0.105619,-0.009154,0.000304,-0.000068,37,O +2022-05-03,59702,0.095563,0.476140,-0.0972185,-0.0002597,-0.105662,-0.009372,0.000303,-0.000031,37,O +2022-05-04,59703,0.097691,0.476906,-0.0969126,-0.0003627,-0.105734,-0.009493,0.000302,0.000005,37,O +2022-05-05,59704,0.099882,0.477903,-0.0964992,-0.0004471,-0.105770,-0.009526,0.000306,0.000025,37,O +2022-05-06,59705,0.101687,0.478833,-0.0960256,-0.0004926,-0.105754,-0.009581,0.000311,0.000041,37,O +2022-05-07,59706,0.103404,0.479538,-0.0955546,-0.0004413,-0.105646,-0.009779,0.000312,0.000014,37,O +2022-05-08,59707,0.105117,0.480078,-0.0951550,-0.0003482,-0.105347,-0.010030,0.000312,-0.000029,37,O +2022-05-09,59708,0.106699,0.480537,-0.0949242,-0.0001830,-0.104904,-0.010197,0.000312,-0.000072,37,O +2022-05-10,59709,0.108427,0.480933,-0.0948334,0.0000630,-0.104607,-0.010261,0.000311,-0.000116,37,O +2022-05-11,59710,0.110941,0.481776,-0.0950144,0.0003317,-0.104732,-0.010281,0.000308,-0.000138,37,O +2022-05-12,59711,0.113474,0.482707,-0.0954543,0.0005401,-0.105174,-0.010290,0.000303,-0.000155,37,O +2022-05-13,59712,0.116107,0.483379,-0.0960629,0.0006728,-0.105566,-0.010162,0.000299,-0.000172,37,O +2022-05-14,59713,0.118527,0.483975,-0.0967431,0.0006758,-0.105773,-0.009799,0.000308,-0.000168,37,O +2022-05-15,59714,0.120799,0.484444,-0.0973670,0.0005635,-0.106086,-0.009399,0.000321,-0.000156,37,O +2022-05-16,59715,0.122385,0.485333,-0.0978659,0.0003927,-0.106653,-0.009281,0.000335,-0.000144,37,O +2022-05-17,59716,0.123240,0.485912,-0.0981728,0.0001822,-0.107146,-0.009513,0.000349,-0.000131,37,O +2022-05-18,59717,0.124614,0.485666,-0.0982338,-0.0000398,-0.107148,-0.009846,0.000360,-0.000115,37,O +2022-05-19,59718,0.126492,0.485563,-0.0980742,-0.0001864,-0.106655,-0.010034,0.000371,-0.000098,37,O +2022-05-20,59719,0.128370,0.485536,-0.0979421,-0.0002105,-0.106062,-0.010068,0.000382,-0.000080,37,O +2022-05-21,59720,0.130677,0.486020,-0.0977739,-0.0001399,-0.105765,-0.010071,0.000370,-0.000069,37,O +2022-05-22,59721,0.132949,0.486774,-0.0977075,0.0000022,-0.105758,-0.010059,0.000349,-0.000059,37,O +2022-05-23,59722,0.135359,0.487350,-0.0977582,0.0001510,-0.105848,-0.009982,0.000327,-0.000050,37,O +2022-05-24,59723,0.137703,0.488205,-0.0979698,0.0002528,-0.105891,-0.009829,0.000306,-0.000041,37,O +2022-05-25,59724,0.139642,0.488593,-0.0982642,0.0002434,-0.105852,-0.009614,0.000312,-0.000009,37,O +2022-05-26,59725,0.141637,0.488529,-0.0985094,0.0002071,-0.105918,-0.009361,0.000325,0.000029,37,O +2022-05-27,59726,0.143638,0.488445,-0.0986407,0.0000754,-0.106153,-0.009084,0.000338,0.000066,37,O +2022-05-28,59727,0.145102,0.488400,-0.0986068,-0.0001651,-0.106467,-0.008914,0.000336,0.000064,37,O +2022-05-29,59728,0.146706,0.488268,-0.0983314,-0.0004364,-0.106669,-0.008976,0.000329,0.000046,37,O +2022-05-30,59729,0.148067,0.488086,-0.0977877,-0.0006967,-0.106716,-0.009293,0.000322,0.000028,37,O +2022-05-31,59730,0.149795,0.487092,-0.0969563,-0.0009206,-0.106703,-0.009703,0.000314,0.000011,37,O +2022-06-01,59731,0.151943,0.486170,-0.0959109,-0.0010845,-0.106731,-0.009971,0.000307,-0.000007,37,O +2022-06-02,59732,0.154357,0.485426,-0.0947757,-0.0011408,-0.106670,-0.010005,0.000376,-0.000007,37,O +2022-06-03,59733,0.156589,0.484781,-0.0936356,-0.0011169,-0.106660,-0.009955,0.000463,-0.000003,37,O +2022-06-04,59734,0.158889,0.484149,-0.0925602,-0.0010138,-0.106851,-0.009984,0.000465,-0.000013,37,O +2022-06-05,59735,0.161161,0.483622,-0.0916220,-0.0008734,-0.106921,-0.010058,0.000435,-0.000027,37,O +2022-06-06,59736,0.163382,0.483150,-0.0908246,-0.0007378,-0.106715,-0.010044,0.000405,-0.000041,37,O +2022-06-07,59737,0.166198,0.482812,-0.0901686,-0.0005555,-0.106474,-0.009925,0.000375,-0.000055,37,O +2022-06-08,59738,0.169346,0.482843,-0.0896819,-0.0003808,-0.106581,-0.009834,0.000345,-0.000069,37,O +2022-06-09,59739,0.172338,0.482895,-0.0893344,-0.0002872,-0.107056,-0.009817,0.000340,-0.000057,37,O +2022-06-10,59740,0.175150,0.482907,-0.0890843,-0.0002453,-0.107652,-0.009745,0.000341,-0.000039,37,O +2022-06-11,59741,0.177834,0.482720,-0.0888551,-0.0003041,-0.108201,-0.009465,0.000329,-0.000042,37,O +2022-06-12,59742,0.180290,0.482016,-0.0885165,-0.0004513,-0.108809,-0.009083,0.000312,-0.000054,37,O +2022-06-13,59743,0.182826,0.481258,-0.0879480,-0.0006834,-0.109531,-0.008942,0.000296,-0.000065,37,O +2022-06-14,59744,0.185100,0.480403,-0.0870940,-0.0009713,-0.110036,-0.009188,0.000279,-0.000077,37,O +2022-06-15,59745,0.187052,0.479331,-0.0859830,-0.0012046,-0.109873,-0.009588,0.000293,-0.000109,37,O +2022-06-16,59746,0.189149,0.478024,-0.0847332,-0.0012518,-0.109222,-0.009837,0.000316,-0.000146,37,O +2022-06-17,59747,0.191602,0.476728,-0.0834949,-0.0011637,-0.108594,-0.009934,0.000338,-0.000184,37,O +2022-06-18,59748,0.194019,0.475550,-0.0824189,-0.0009673,-0.108365,-0.009983,0.000341,-0.000186,37,O +2022-06-19,59749,0.196541,0.474534,-0.0815575,-0.0007600,-0.108509,-0.009976,0.000336,-0.000174,37,O +2022-06-20,59750,0.199454,0.473574,-0.0808812,-0.0006133,-0.108836,-0.009796,0.000331,-0.000163,37,O +2022-06-21,59751,0.202403,0.472799,-0.0803109,-0.0005480,-0.109153,-0.009467,0.000327,-0.000152,37,O +2022-06-22,59752,0.205128,0.472282,-0.0797589,-0.0005850,-0.109347,-0.009175,0.000322,-0.000141,37,O +2022-06-23,59753,0.207619,0.471645,-0.0791011,-0.0007191,-0.109587,-0.009025,0.000273,-0.000124,37,O +2022-06-24,59754,0.210148,0.470821,-0.0782976,-0.0009049,-0.109961,-0.008971,0.000212,-0.000107,37,O +2022-06-25,59755,0.212693,0.469719,-0.0773260,-0.0010879,-0.110305,-0.008982,0.000222,-0.000111,37,O +2022-06-26,59756,0.215376,0.468485,-0.0761726,-0.0012474,-0.110571,-0.009112,0.000259,-0.000123,37,O +2022-06-27,59757,0.218164,0.467038,-0.0748406,-0.0014033,-0.110659,-0.009428,0.000296,-0.000135,37,O +2022-06-28,59758,0.221330,0.465623,-0.0733645,-0.0015360,-0.110576,-0.009834,0.000333,-0.000147,37,O +2022-06-29,59759,0.224443,0.464165,-0.0718011,-0.0015903,-0.110496,-0.010059,0.000359,-0.000125,37,O +2022-06-30,59760,0.227220,0.462671,-0.0702118,-0.0015738,-0.110526,-0.009992,0.000382,-0.000094,37,O +2022-07-01,59761,0.230002,0.460818,-0.0686663,-0.0015022,-0.110679,-0.009749,0.000406,-0.000063,37,O +2022-07-02,59762,0.232881,0.459225,-0.0672447,-0.0013642,-0.110959,-0.009582,0.000393,-0.000073,37,O +2022-07-03,59763,0.236109,0.457809,-0.0659625,-0.0011592,-0.111150,-0.009536,0.000367,-0.000099,37,O +2022-07-04,59764,0.239234,0.456579,-0.0649159,-0.0009084,-0.111121,-0.009498,0.000340,-0.000125,37,O +2022-07-05,59765,0.241892,0.455171,-0.0641393,-0.0006862,-0.110976,-0.009390,0.000313,-0.000150,37,O +2022-07-06,59766,0.244450,0.453302,-0.0635337,-0.0005426,-0.110950,-0.009262,0.000314,-0.000154,37,O +2022-07-07,59767,0.247124,0.451582,-0.0630501,-0.0004797,-0.111305,-0.009226,0.000321,-0.000151,37,O +2022-07-08,59768,0.249756,0.450120,-0.0625785,-0.0004960,-0.111978,-0.009228,0.000318,-0.000142,37,O +2022-07-09,59769,0.252297,0.448682,-0.0620271,-0.0006294,-0.112723,-0.009129,0.000311,-0.000130,37,O +2022-07-10,59770,0.254733,0.447060,-0.0612967,-0.0008520,-0.113423,-0.008960,0.000305,-0.000118,37,O +2022-07-11,59771,0.256857,0.445395,-0.0603249,-0.0010853,-0.114007,-0.008936,0.000298,-0.000107,37,O +2022-07-12,59772,0.258411,0.443974,-0.0591324,-0.0012873,-0.114246,-0.009142,0.000291,-0.000095,37,O +2022-07-13,59773,0.259174,0.442066,-0.0577813,-0.0013649,-0.113960,-0.009403,0.000300,-0.000118,37,O +2022-07-14,59774,0.260201,0.439888,-0.0564587,-0.0012892,-0.113418,-0.009484,0.000313,-0.000150,37,O +2022-07-15,59775,0.261642,0.438122,-0.0552630,-0.0010962,-0.113037,-0.009466,0.000326,-0.000182,37,O +2022-07-16,59776,0.263441,0.436373,-0.0542876,-0.0008698,-0.112983,-0.009496,0.000335,-0.000163,37,O +2022-07-17,59777,0.265267,0.434398,-0.0535228,-0.0006893,-0.113161,-0.009544,0.000344,-0.000122,37,O +2022-07-18,59778,0.267234,0.432352,-0.0528927,-0.0005997,-0.113506,-0.009398,0.000352,-0.000081,37,O +2022-07-19,59779,0.269260,0.430298,-0.0523068,-0.0006023,-0.113947,-0.009037,0.000360,-0.000040,37,O +2022-07-20,59780,0.270974,0.428173,-0.0516628,-0.0006984,-0.114393,-0.008784,0.000337,-0.000064,37,O +2022-07-21,59781,0.272574,0.426255,-0.0508922,-0.0008571,-0.114674,-0.008805,0.000306,-0.000105,37,O +2022-07-22,59782,0.274053,0.424453,-0.0499591,-0.0010273,-0.114884,-0.009018,0.000275,-0.000147,37,O +2022-07-23,59783,0.275681,0.422673,-0.0488673,-0.0011798,-0.115096,-0.009210,0.000282,-0.000165,37,O +2022-07-24,59784,0.277006,0.420915,-0.0476028,-0.0013501,-0.115333,-0.009343,0.000304,-0.000173,37,O +2022-07-25,59785,0.278471,0.419285,-0.0462003,-0.0014358,-0.115452,-0.009519,0.000327,-0.000181,37,O +2022-07-26,59786,0.279867,0.417962,-0.0447491,-0.0014548,-0.115399,-0.009768,0.000349,-0.000190,37,O +2022-07-27,59787,0.281044,0.416126,-0.0432579,-0.0014585,-0.115379,-0.009934,0.000331,-0.000183,37,O +2022-07-28,59788,0.282267,0.414205,-0.0417953,-0.0014381,-0.115431,-0.009867,0.000303,-0.000172,37,O +2022-07-29,59789,0.283345,0.411841,-0.0404282,-0.0013321,-0.115538,-0.009595,0.000274,-0.000161,37,O +2022-07-30,59790,0.284587,0.409400,-0.0392089,-0.0011116,-0.115593,-0.009353,0.000267,-0.000190,37,O +2022-07-31,59791,0.286000,0.407286,-0.0381849,-0.0008909,-0.115593,-0.009273,0.000267,-0.000233,37,O +2022-08-01,59792,0.287161,0.405194,-0.0373892,-0.0007008,-0.115536,-0.009320,0.000268,-0.000276,37,O +2022-08-02,59793,0.287882,0.403262,-0.0367846,-0.0005426,-0.115439,-0.009376,0.000268,-0.000319,37,O +2022-08-03,59794,0.288468,0.401019,-0.0362792,-0.0004556,-0.115414,-0.009314,0.000267,-0.000295,37,O +2022-08-04,59795,0.289489,0.398709,-0.0358145,-0.0004487,-0.115635,-0.009222,0.000265,-0.000254,37,O +2022-08-05,59796,0.290582,0.396579,-0.0353263,-0.0005230,-0.116154,-0.009192,0.000267,-0.000247,37,O +2022-08-06,59797,0.291080,0.394221,-0.0347316,-0.0006895,-0.116838,-0.009204,0.000271,-0.000253,37,O +2022-08-07,59798,0.291487,0.391652,-0.0339451,-0.0008715,-0.117435,-0.009261,0.000275,-0.000259,37,O +2022-08-08,59799,0.292293,0.389056,-0.0329721,-0.0010338,-0.117715,-0.009399,0.000279,-0.000264,37,O +2022-08-09,59800,0.293211,0.386232,-0.0318918,-0.0010953,-0.117585,-0.009565,0.000282,-0.000270,37,O +2022-08-10,59801,0.293803,0.383250,-0.0308088,-0.0010233,-0.117149,-0.009591,0.000300,-0.000281,37,O +2022-08-11,59802,0.294459,0.380298,-0.0298577,-0.0008434,-0.116770,-0.009397,0.000321,-0.000293,37,O +2022-08-12,59803,0.295055,0.377755,-0.0291384,-0.0006199,-0.116681,-0.009171,0.000342,-0.000305,37,O +2022-08-13,59804,0.295537,0.375740,-0.0286307,-0.0004312,-0.116834,-0.009134,0.000344,-0.000290,37,O +2022-08-14,59805,0.296313,0.373591,-0.0282983,-0.0003275,-0.117006,-0.009266,0.000339,-0.000266,37,O +2022-08-15,59806,0.297500,0.371314,-0.0279699,-0.0003218,-0.117203,-0.009307,0.000333,-0.000241,37,O +2022-08-16,59807,0.298583,0.369059,-0.0276395,-0.0004297,-0.117555,-0.009139,0.000328,-0.000217,37,O +2022-08-17,59808,0.299254,0.366732,-0.0270866,-0.0006249,-0.118003,-0.008949,0.000323,-0.000193,37,O +2022-08-18,59809,0.299866,0.364425,-0.0263517,-0.0008700,-0.118274,-0.008860,0.000342,-0.000071,37,O +2022-08-19,59810,0.300823,0.362010,-0.0253455,-0.0010674,-0.118335,-0.008921,0.000368,0.000072,37,O +2022-08-20,59811,0.302176,0.359779,-0.0241871,-0.0012488,-0.118439,-0.009099,0.000343,0.000063,37,O +2022-08-21,59812,0.302992,0.357455,-0.0228266,-0.0013887,-0.118572,-0.009192,0.000299,-0.000002,37,O +2022-08-22,59813,0.303769,0.354926,-0.0213929,-0.0014142,-0.118711,-0.009174,0.000223,0.000000,37,O +2022-08-23,59814,0.304513,0.352500,-0.0199836,-0.0013938,-0.118563,-0.009296,0.000220,-0.000053,37,O +2022-08-24,59815,0.304896,0.349874,-0.0186613,-0.0013096,-0.118310,-0.009455,0.000250,-0.000087,37,O +2022-08-25,59816,0.305201,0.347486,-0.0174037,-0.0011721,-0.118092,-0.009509,0.000288,-0.000116,37,O +2022-08-26,59817,0.305398,0.344912,-0.0162851,-0.0010132,-0.117898,-0.009376,0.000327,-0.000145,37,O +2022-08-27,59818,0.305290,0.342335,-0.0153482,-0.0008311,-0.117776,-0.009142,0.000327,-0.000159,37,O +2022-08-28,59819,0.304974,0.339946,-0.0146136,-0.0006297,-0.117687,-0.008993,0.000314,-0.000166,37,O +2022-08-29,59820,0.304586,0.337401,-0.0140968,-0.0004071,-0.117660,-0.009022,0.000300,-0.000173,37,O +2022-08-30,59821,0.304464,0.334971,-0.0137838,-0.0002461,-0.117694,-0.009153,0.000286,-0.000180,37,O +2022-08-31,59822,0.304595,0.332751,-0.0136099,-0.0001468,-0.117736,-0.009230,0.000282,-0.000167,37,O +2022-09-01,59823,0.304814,0.330440,-0.0134836,-0.0001740,-0.117854,-0.009197,0.000281,-0.000148,37,O +2022-09-02,59824,0.304501,0.327651,-0.0132494,-0.0003019,-0.118154,-0.009102,0.000279,-0.000128,37,O +2022-09-03,59825,0.304186,0.324993,-0.0128821,-0.0004375,-0.118590,-0.009080,0.000278,-0.000145,37,O +2022-09-04,59826,0.304085,0.322764,-0.0123741,-0.0006067,-0.118929,-0.009170,0.000277,-0.000176,37,O +2022-09-05,59827,0.303820,0.320481,-0.0117203,-0.0006953,-0.118715,-0.009299,0.000356,-0.000177,37,O +2022-09-06,59828,0.303248,0.318029,-0.0110190,-0.0006716,-0.118490,-0.009420,0.000290,-0.000231,37,O +2022-09-07,59829,0.302652,0.314951,-0.0103738,-0.0005314,-0.117928,-0.009248,0.000320,-0.000193,37,O +2022-09-08,59830,0.301793,0.311758,-0.0099952,-0.0003090,-0.117555,-0.008854,0.000376,-0.000131,37,O +2022-09-09,59831,0.300297,0.308670,-0.0098037,-0.0000563,-0.117535,-0.008462,0.000431,-0.000068,37,O +2022-09-10,59832,0.299086,0.305665,-0.0098938,0.0001980,-0.117785,-0.008356,0.000425,-0.000069,37,O +2022-09-11,59833,0.298524,0.302843,-0.0101991,0.0003620,-0.117952,-0.008498,0.000396,-0.000094,37,O +2022-09-12,59834,0.298153,0.300265,-0.0105663,0.0003547,-0.118015,-0.008668,0.000364,-0.000118,37,O +2022-09-13,59835,0.297509,0.297897,-0.0108687,0.0002112,-0.118191,-0.008727,0.000336,-0.000143,37,O +2022-09-14,59836,0.296992,0.295809,-0.0110048,0.0000090,-0.118525,-0.008698,0.000331,-0.000130,37,O +2022-09-15,59837,0.296326,0.293853,-0.0109071,-0.0002310,-0.118889,-0.008737,0.000331,-0.000107,37,O +2022-09-16,59838,0.295633,0.291666,-0.0105453,-0.0004503,-0.119069,-0.008841,0.000332,-0.000084,37,O +2022-09-17,59839,0.294765,0.289613,-0.0099966,-0.0006416,-0.119260,-0.008985,0.000229,-0.000169,37,O +2022-09-18,59840,0.293594,0.287789,-0.0092502,-0.0007737,-0.119359,-0.009034,0.000089,-0.000294,37,O +2022-09-19,59841,0.292235,0.285928,-0.0084134,-0.0008552,-0.118767,-0.008893,0.000183,-0.000264,37,O +2022-09-20,59842,0.291284,0.283515,-0.0075559,-0.0008596,-0.117876,-0.008797,0.000385,-0.000164,37,O +2022-09-21,59843,0.290675,0.281089,-0.0066950,-0.0007858,-0.117536,-0.008865,0.000391,-0.000099,37,O +2022-09-22,59844,0.289785,0.278400,-0.0059969,-0.0006484,-0.117441,-0.008922,0.000347,-0.000043,37,O +2022-09-23,59845,0.288673,0.275532,-0.0054471,-0.0004588,-0.117457,-0.008810,0.000302,0.000013,37,O +2022-09-24,59846,0.287244,0.272949,-0.0051006,-0.0002620,-0.117465,-0.008621,0.000281,-0.000021,37,O +2022-09-25,59847,0.285878,0.270404,-0.0049635,-0.0000762,-0.117484,-0.008457,0.000268,-0.000089,37,O +2022-09-26,59848,0.285103,0.268121,-0.0049793,0.0000876,-0.117537,-0.008441,0.000256,-0.000157,37,O +2022-09-27,59849,0.284746,0.266357,-0.0051012,0.0001844,-0.117616,-0.008597,0.000243,-0.000225,37,O +2022-09-28,59850,0.283878,0.264953,-0.0053014,0.0001489,-0.117693,-0.008703,0.000229,-0.000180,37,O +2022-09-29,59851,0.282943,0.263319,-0.0054180,0.0000247,-0.117779,-0.008707,0.000213,-0.000102,37,O +2022-09-30,59852,0.282338,0.261528,-0.0053388,-0.0001717,-0.117905,-0.008604,0.000198,-0.000025,37,O +2022-10-01,59853,0.281388,0.259744,-0.0049041,-0.0004002,-0.117919,-0.008575,0.000233,-0.000065,37,O +2022-10-02,59854,0.280092,0.257931,-0.0043864,-0.0004904,-0.117763,-0.008633,0.000289,-0.000153,37,O +2022-10-03,59855,0.278478,0.255746,-0.0040146,-0.0004785,-0.117380,-0.008681,0.000335,-0.000178,37,O +2022-10-04,59856,0.276607,0.253527,-0.0035590,-0.0004129,-0.116777,-0.008672,0.000377,-0.000174,37,O +2022-10-05,59857,0.274352,0.251450,-0.0032281,-0.0002727,-0.116158,-0.008550,0.000419,-0.000171,37,O +2022-10-06,59858,0.272409,0.249284,-0.0030816,-0.0000290,-0.115892,-0.008306,0.000413,-0.000159,37,O +2022-10-07,59859,0.270869,0.246728,-0.0031810,0.0002299,-0.115963,-0.008047,0.000393,-0.000144,37,O +2022-10-08,59860,0.269464,0.244272,-0.0035337,0.0004475,-0.116181,-0.007889,0.000370,-0.000130,37,O +2022-10-09,59861,0.267436,0.242181,-0.0040628,0.0005515,-0.116323,-0.007852,0.000345,-0.000116,37,O +2022-10-10,59862,0.265240,0.239987,-0.0046541,0.0005668,-0.116330,-0.007871,0.000320,-0.000102,37,O +2022-10-11,59863,0.263701,0.237885,-0.0051692,0.0004419,-0.116344,-0.007899,0.000295,-0.000088,37,O +2022-10-12,59864,0.262046,0.235701,-0.0055011,0.0002017,-0.116517,-0.007950,0.000271,-0.000074,37,O +2022-10-13,59865,0.260021,0.233734,-0.0055722,-0.0000324,-0.116707,-0.008023,0.000294,-0.000044,37,O +2022-10-14,59866,0.256936,0.232102,-0.0054362,-0.0001958,-0.116793,-0.008078,0.000330,-0.000010,37,O +2022-10-15,59867,0.254063,0.230356,-0.0051876,-0.0002708,-0.116700,-0.008075,0.000335,-0.000015,37,O +2022-10-16,59868,0.251206,0.228893,-0.0049099,-0.0002692,-0.116365,-0.007987,0.000327,-0.000034,37,O +2022-10-17,59869,0.248052,0.227286,-0.0046783,-0.0001717,-0.115804,-0.007935,0.000352,-0.000079,37,O +2022-10-18,59870,0.245102,0.225158,-0.0045660,-0.0000332,-0.115200,-0.008015,0.000394,-0.000137,37,O +2022-10-19,59871,0.243041,0.222898,-0.0045814,0.0001434,-0.114747,-0.008164,0.000407,-0.000163,37,O +2022-10-20,59872,0.240817,0.221191,-0.0047645,0.0002754,-0.114446,-0.008265,0.000413,-0.000180,37,O +2022-10-21,59873,0.237688,0.219313,-0.0051434,0.0004368,-0.114344,-0.008197,0.000419,-0.000197,37,O +2022-10-22,59874,0.234606,0.217522,-0.0057243,0.0006618,-0.114532,-0.007927,0.000398,-0.000185,37,O +2022-10-23,59875,0.231878,0.216031,-0.0064986,0.0008786,-0.114866,-0.007589,0.000368,-0.000162,37,O +2022-10-24,59876,0.230043,0.214645,-0.0074339,0.0009730,-0.115163,-0.007341,0.000337,-0.000139,37,O +2022-10-25,59877,0.228137,0.213232,-0.0084121,0.0009253,-0.115318,-0.007265,0.000307,-0.000116,37,O +2022-10-26,59878,0.226115,0.211747,-0.0092591,0.0007382,-0.115297,-0.007349,0.000303,-0.000092,37,O +2022-10-27,59879,0.223756,0.210409,-0.0098856,0.0004920,-0.115222,-0.007492,0.000307,-0.000068,37,O +2022-10-28,59880,0.220823,0.208832,-0.0102779,0.0002273,-0.115143,-0.007612,0.000310,-0.000083,37,O +2022-10-29,59881,0.217711,0.207417,-0.0103958,0.0000214,-0.115022,-0.007628,0.000312,-0.000114,37,O +2022-10-30,59882,0.214479,0.206229,-0.0103095,-0.0000903,-0.114810,-0.007575,0.000314,-0.000145,37,O +2022-10-31,59883,0.211344,0.205236,-0.0101927,-0.0000786,-0.114492,-0.007537,0.000316,-0.000176,37,O +2022-11-01,59884,0.208518,0.204213,-0.0101774,0.0001052,-0.114100,-0.007544,0.000319,-0.000208,37,O +2022-11-02,59885,0.206236,0.203539,-0.0104066,0.0003887,-0.113655,-0.007496,0.000345,-0.000189,37,O +2022-11-03,59886,0.203843,0.202363,-0.0109528,0.0007038,-0.113289,-0.007387,0.000379,-0.000156,37,O +2022-11-04,59887,0.201480,0.201349,-0.0118134,0.0009475,-0.113093,-0.007232,0.000413,-0.000124,37,O +2022-11-05,59888,0.199408,0.200705,-0.0128173,0.0010203,-0.113210,-0.007050,0.000389,-0.000091,37,O +2022-11-06,59889,0.197881,0.199784,-0.0138347,0.0009614,-0.113445,-0.006858,0.000344,-0.000059,37,O +2022-11-07,59890,0.196413,0.198989,-0.0147268,0.0008196,-0.113604,-0.006682,0.000300,-0.000027,37,O +2022-11-08,59891,0.194573,0.198429,-0.0154464,0.0006267,-0.113650,-0.006581,0.000255,0.000005,37,O +2022-11-09,59892,0.192689,0.197560,-0.0159730,0.0004151,-0.113611,-0.006688,0.000239,-0.000042,37,O +2022-11-10,59893,0.190373,0.196713,-0.0162609,0.0001422,-0.113607,-0.006856,0.000249,-0.000047,37,O +2022-11-11,59894,0.187815,0.195886,-0.0162986,-0.0000879,-0.113664,-0.007014,0.000257,-0.000052,37,O +2022-11-12,59895,0.185358,0.195077,-0.0160849,-0.0002328,-0.113613,-0.007056,0.000263,-0.000057,37,O +2022-11-13,59896,0.183211,0.193994,-0.0158139,-0.0002714,-0.113353,-0.006995,0.000270,-0.000060,37,O +2022-11-14,59897,0.181781,0.192797,-0.0155463,-0.0002358,-0.112951,-0.006948,0.000276,-0.000060,37,O +2022-11-15,59898,0.181070,0.192172,-0.0153598,-0.0001051,-0.112526,-0.006990,0.000280,-0.000059,37,O +2022-11-16,59899,0.180605,0.192088,-0.0153088,0.0000691,-0.112124,-0.007060,0.000279,-0.000059,37,O +2022-11-17,59900,0.179893,0.192230,-0.0154737,0.0002577,-0.111795,-0.007032,0.000269,-0.000062,37,O +2022-11-18,59901,0.178577,0.192664,-0.0158672,0.0004613,-0.111688,-0.006855,0.000254,-0.000067,37,O +2022-11-19,59902,0.176611,0.192952,-0.0164339,0.0006352,-0.111942,-0.006595,0.000237,-0.000075,37,O +2022-11-20,59903,0.174681,0.192934,-0.0171380,0.0007456,-0.112447,-0.006335,0.000223,-0.000082,37,O +2022-11-21,59904,0.172464,0.192697,-0.0179310,0.0007712,-0.112896,-0.006109,0.000217,-0.000086,37,O +2022-11-22,59905,0.170148,0.192561,-0.0187050,0.0006878,-0.113096,-0.005950,0.000220,-0.000087,37,O +2022-11-23,59906,0.167859,0.192139,-0.0193305,0.0005103,-0.113107,-0.005944,0.000230,-0.000085,37,O +2022-11-24,59907,0.165813,0.191632,-0.0196762,0.0002469,-0.113034,-0.006130,0.000242,-0.000082,37,O +2022-11-25,59908,0.163365,0.191410,-0.0197815,-0.0000026,-0.112859,-0.006373,0.000253,-0.000079,37,O +2022-11-26,59909,0.160567,0.191170,-0.0197136,-0.0001201,-0.112567,-0.006465,0.000259,-0.000077,37,O +2022-11-27,59910,0.157813,0.190855,-0.0196014,-0.0001015,-0.112263,-0.006366,0.000261,-0.000075,37,P +2022-11-28,59911,0.155197,0.190599,-0.0195762,0.0000705,-0.112064,-0.006235,0.000258,-0.000075,37,P +2022-11-29,59912,0.152559,0.190618,-0.0197928,0.0003553,-0.111960,-0.006203,0.000251,-0.000075,37,P +2022-11-30,59913,0.149929,0.190670,-0.0202955,0.0006305,-0.111871,-0.006224,0.000241,-0.000075,37,P +2022-12-01,59914,0.147561,0.190830,-0.0210441,0.0008401,-0.111780,-0.006185,0.000230,-0.000074,37,P +2022-12-02,59915,0.145248,0.191146,-0.0219561,0.0009527,-0.111743,-0.006059,0.000220,-0.000071,37,P +2022-12-03,59916,0.142834,0.191464,-0.0229272,0.0009599,-0.111816,-0.005893,0.000216,-0.000067,37,P +2022-12-04,59917,0.140395,0.191770,-0.0238615,0.0008862,-0.111970,-0.005719,0.000218,-0.000063,37,P +2022-12-05,59918,0.137848,0.192067,-0.0246892,0.0007438,-0.112074,-0.005553,0.000226,-0.000062,37,P +2022-12-06,59919,0.135194,0.192376,-0.0253354,0.0005219,-0.111999,-0.005456,0.000238,-0.000064,37,P +2022-12-07,59920,0.132607,0.192847,-0.0257409,0.0002838,-0.111768,-0.005519,0.000251,-0.000071,37,P +2022-12-08,59921,0.130239,0.193289,-0.0259378,0.0001092,-0.111546,-0.005750,0.000261,-0.000081,37,P +2022-12-09,59922,0.127844,0.193671,-0.0259973,0.0000080,-0.111448,-0.006015,0.000269,-0.000092,37,P +2022-12-10,59923,0.125281,0.193926,-0.0259903,-0.0000231,-0.111412,-0.006156,0.000274,-0.000101,37,P +2022-12-11,59924,0.122674,0.194270,-0.0259909,0.0000263,-0.111310,-0.006148,0.000278,-0.000106,37,P +2022-12-12,59925,0.120190,0.194862,-0.0260820,0.0001542,-0.111096,-0.006107,0.000281,-0.000108,37,P +2022-12-13,59926,0.117620,0.195524,-0.0263224,0.0003137,-0.110798,-0.006123,0.000282,-0.000109,37,P +2022-12-14,59927,0.115033,0.196160,-0.0267294,0.0004975,-0.110436,-0.006135,0.000278,-0.000112,37,P +2022-12-15,59928,0.112421,0.196736,-0.0273335,0.0006951,-0.110058,-0.006030,0.000268,-0.000118,37,P +2022-12-16,59929,0.109747,0.197361,-0.0281179,0.0008528,-0.109850,-0.005818,0.000255,-0.000125,37,P +2022-12-17,59930,0.107138,0.198020,-0.0290364,0.0009655,-0.110026,-0.005641,0.000242,-0.000132,37,P +2022-12-18,59931,0.104663,0.198678,-0.0300331,0.0009911,-0.110533,-0.005579,0.000232,-0.000136,37,P +2022-12-19,59932,0.102165,0.199448,-0.0310108,0.0009531,-0.111060,-0.005532,0.000228,-0.000137,37,P +2022-12-20,59933,0.099572,0.200256,-0.0319210,0.0008223,-0.111427,-0.005391,0.000231,-0.000134,37,P +2022-12-21,59934,0.097065,0.201207,-0.0326330,0.0005887,-0.111739,-0.005278,0.000239,-0.000129,37,P +2022-12-22,59935,0.094687,0.202233,-0.0331040,0.0003351,-0.112031,-0.005414,0.000248,-0.000125,37,P +2022-12-23,59936,0.092412,0.203264,-0.0333374,0.0001431,-0.112052,-0.005766,0.000256,-0.000121,37,P +2022-12-24,59937,0.090231,0.204172,-0.0334597,0.0001133,-0.111644,-0.006005,0.000260,-0.000119,37,P +2022-12-25,59938,0.088061,0.205116,-0.0336261,0.0002218,-0.111078,-0.005932,0.000258,-0.000118,37,P +2022-12-26,59939,0.085901,0.206111,-0.0339524,0.0004327,-0.110753,-0.005725,0.000252,-0.000119,37,P +2022-12-27,59940,0.083604,0.206988,-0.0345206,0.0006920,-0.110736,-0.005636,0.000242,-0.000120,37,P +2022-12-28,59941,0.081228,0.207987,-0.0353313,0.0009013,-0.110835,-0.005644,0.000230,-0.000122,37,P +2022-12-29,59942,0.078891,0.209059,-0.0362933,0.0009862,-0.110944,-0.005558,0.000218,-0.000122,37,P +2022-12-30,59943,0.076798,0.210252,-0.0372747,0.0009480,-0.111093,-0.005351,0.000210,-0.000120,37,P +2022-12-31,59944,0.074761,0.211619,-0.0381677,0.0008077,-0.111285,-0.005178,0.000207,-0.000116,37,P +2023-01-01,59945,0.072623,0.213050,-0.0388812,0.0006034,-0.111463,-0.005132,0.000211,-0.000113,37,P +2023-01-02,59946,0.070606,0.214535,-0.0393799,0.0003780,-0.111551,-0.005154,0.000220,-0.000112,37,P +2023-01-03,59947,0.068735,0.216098,-0.0396483,0.0001470,-0.111478,-0.005183,0.000233,-0.000116,37,P +2023-01-04,59948,0.067027,0.217680,-0.0396976,-0.0000541,-0.111227,-0.005270,0.000247,-0.000126,37,P +2023-01-05,59949,0.065305,0.219368,-0.0395749,-0.0001940,-0.110901,-0.005485,0.000258,-0.000138,37,P +2023-01-06,59950,0.063576,0.221160,-0.0393508,-0.0002535,-0.110661,-0.005763,0.000266,-0.000149,37,P +2023-01-07,59951,0.061878,0.222925,-0.0391008,-0.0002555,-0.110564,-0.005932,0.000270,-0.000157,37,P +2023-01-08,59952,0.060288,0.224620,-0.0388708,-0.0002035,-0.110518,-0.005913,0.000271,-0.000161,37,P +2023-01-09,59953,0.058666,0.226316,-0.0387322,-0.0000736,-0.110397,-0.005800,0.000269,-0.000163,37,P +2023-01-10,59954,0.057101,0.227967,-0.0387526,0.0001077,-0.110156,-0.005727,0.000265,-0.000165,37,P +2023-01-11,59955,0.055677,0.229543,-0.0389587,0.0002888,-0.109823,-0.005694,0.000258,-0.000170,37,P +2023-01-12,59956,0.054271,0.231153,-0.0393272,0.0004289,-0.109478,-0.005603,0.000249,-0.000178,37,P +2023-01-13,59957,0.052810,0.232793,-0.0398151,0.0005319,-0.109273,-0.005456,0.000239,-0.000186,37,P +2023-01-14,59958,0.051302,0.234399,-0.0403859,0.0005826,-0.109370,-0.005394,0.000231,-0.000191,37,P +2023-01-15,59959,0.049700,0.236028,-0.0409681,0.0005551,-0.109739,-0.005510,0.000225,-0.000192,37,P +2023-01-16,59960,0.048074,0.237731,-0.0414818,0.0004420,-0.110149,-0.005665,0.000224,-0.000189,37,P +2023-01-17,59961,0.046407,0.239513,-0.0418395,0.0002502,-0.110496,-0.005652,0.000227,-0.000184,37,P +2023-01-18,59962,0.044736,0.241249,-0.0419878,0.0000375,-0.110960,-0.005526,0.000232,-0.000178,37,P +2023-01-19,59963,0.043179,0.243118,-0.0419369,-0.0001453,-0.111592,-0.005592,0.000238,-0.000173,37,P +2023-01-20,59964,0.041750,0.245092,-0.0417427,-0.0002329,-0.111984,-0.005959,0.000242,-0.000169,37,P +2023-01-21,59965,0.040494,0.247015,-0.0415340,-0.0001790,-0.111712,-0.006313,0.000242,-0.000168,37,P +2023-01-22,59966,0.039392,0.248952,-0.0414474,0.0000130,-0.110961,-0.006318,0.000238,-0.000168,37,P +2023-01-23,59967,0.038133,0.250944,-0.0416038,0.0002890,-0.110318,-0.006070,0.000229,-0.000169,37,P +2023-01-24,59968,0.036703,0.252924,-0.0420344,0.0005501,-0.110086,-0.005900,0.000218,-0.000171,37,P +2023-01-25,59969,0.035289,0.254933,-0.0426881,0.0007269,-0.110142,-0.005880,0.000206,-0.000173,37,P +2023-01-26,59970,0.033796,0.256863,-0.0434503,0.0007551,-0.110335,-0.005810,0.000196,-0.000173,37,P +2023-01-27,59971,0.032288,0.258719,-0.0441633,0.0006421,-0.110640,-0.005622,0.000191,-0.000170,37,P +2023-01-28,59972,0.030771,0.260760,-0.0447136,0.0004287,-0.110973,-0.005513,0.000191,-0.000165,37,P +2023-01-29,59973,0.029445,0.262801,-0.0450189,0.0001718,-0.111188,-0.005640,0.000197,-0.000160,37,P +2023-01-30,59974,0.028140,0.264923,-0.0450737,-0.0000739,-0.111239,-0.005896,0.000208,-0.000157,37,P +2023-01-31,59975,0.026760,0.267076,-0.0448974,-0.0002808,-0.111161,-0.006085,0.000222,-0.000160,37,P +2023-02-01,59976,0.025534,0.269146,-0.0445474,-0.0004251,-0.110950,-0.006173,0.000236,-0.000167,37,P +2023-02-02,59977,0.024391,0.271235,-0.0440827,-0.0005090,-0.110614,-0.006276,0.000248,-0.000175,37,P +2023-02-03,59978,0.023124,0.273390,-0.0435713,-0.0005138,-0.110273,-0.006442,0.000255,-0.000182,37,P +2023-02-04,59979,0.021696,0.275637,-0.0430950,-0.0004435,-0.110072,-0.006557,0.000258,-0.000186,37,P +2023-02-05,59980,0.020300,0.277947,-0.0427184,-0.0003127,-0.110009,-0.006498,0.000255,-0.000186,37,P +2023-02-06,59981,0.018999,0.280208,-0.0424967,-0.0001398,-0.109945,-0.006307,0.000248,-0.000187,37,P +2023-02-07,59982,0.017688,0.282429,-0.0424567,0.0000503,-0.109775,-0.006141,0.000239,-0.000190,37,P +2023-02-08,59983,0.016555,0.284762,-0.0426027,0.0002231,-0.109535,-0.006084,0.000228,-0.000196,37,P +2023-02-09,59984,0.015629,0.287020,-0.0428953,0.0003413,-0.109336,-0.006082,0.000220,-0.000205,37,P +2023-02-10,59985,0.014719,0.289328,-0.0432774,0.0004028,-0.109267,-0.006079,0.000214,-0.000213,37,P +2023-02-11,59986,0.013816,0.291525,-0.0436918,0.0003996,-0.109361,-0.006119,0.000211,-0.000217,37,P +2023-02-12,59987,0.012995,0.293723,-0.0440661,0.0003229,-0.109570,-0.006273,0.000211,-0.000217,37,P +2023-02-13,59988,0.012220,0.296011,-0.0443266,0.0001689,-0.109766,-0.006478,0.000213,-0.000213,37,P +2023-02-14,59989,0.011425,0.298312,-0.0444035,-0.0000293,-0.109899,-0.006580,0.000216,-0.000207,37,P +2023-02-15,59990,0.010608,0.300613,-0.0442857,-0.0002134,-0.110107,-0.006563,0.000219,-0.000202,37,P +2023-02-16,59991,0.009863,0.302912,-0.0440146,-0.0003215,-0.110499,-0.006628,0.000222,-0.000198,37,P +2023-02-17,59992,0.009164,0.305263,-0.0436988,-0.0003026,-0.110845,-0.006909,0.000223,-0.000196,37,P +2023-02-18,59993,0.008493,0.307617,-0.0434721,-0.0001422,-0.110765,-0.007218,0.000220,-0.000195,37,P +2023-02-19,59994,0.007910,0.310070,-0.0434730,0.0001438,-0.110236,-0.007261,0.000214,-0.000195,37,P +2023-02-20,59995,0.007333,0.312533,-0.0437908,0.0004738,-0.109646,-0.007048,0.000204,-0.000196,37,P +2023-02-21,59996,0.006829,0.314974,-0.0444149,0.0007426,-0.109317,-0.006859,0.000194,-0.000197,37,P +2023-02-22,59997,0.006285,0.317428,-0.0452394,0.0008634,-0.109266,-0.006840,0.000184,-0.000197,37,P +2023-02-23,59998,0.005578,0.320015,-0.0460983,0.0008180,-0.109422,-0.006858,0.000178,-0.000195,37,P +2023-02-24,59999,0.004906,0.322530,-0.0468442,0.0006425,-0.109749,-0.006809,0.000178,-0.000190,37,P +2023-02-25,60000,0.004359,0.324855,-0.0473708,0.0003916,-0.110122,-0.006823,0.000182,-0.000183,37,P +2023-02-26,60001,0.004012,0.327055,-0.0476362,0.0001289,-0.110343,-0.007046,0.000191,-0.000176,37,P +2023-02-27,60002,0.003655,0.329213,-0.0476511,-0.0001048,-0.110351,-0.007388,0.000202,-0.000171,37,P +2023-02-28,60003,0.003208,0.331420,-0.0474621,-0.0002725,-0.110225,-0.007621,0.000216,-0.000171,37,P +2023-03-01,60004,0.002722,0.333781,-0.0471474,-0.0003600,-0.109990,-0.007664,0.000229,-0.000173,37,P +2023-03-02,60005,0.002432,0.336216,-0.0467828,-0.0003724,-0.109605,-0.007644,0.000241,-0.000176,37,P +2023-03-03,60006,0.002276,0.338583,-0.0464433,-0.0003114,-0.109146,-0.007692,0.000248,-0.000178,37,P +2023-03-04,60007,0.002103,0.341047,-0.0461968,-0.0001874,-0.108814,-0.007766,0.000248,-0.000176,37,P +2023-03-05,60008,0.001952,0.343482,-0.0461011,-0.0000096,-0.108719,-0.007725,0.000241,-0.000174,37,P +2023-03-06,60009,0.001978,0.345995,-0.0461967,0.0001851,-0.108758,-0.007532,0.000228,-0.000175,37,P +2023-03-07,60010,0.002144,0.348448,-0.0464806,0.0003701,-0.108765,-0.007316,0.000213,-0.000179,37,P +2023-03-08,60011,0.002300,0.350918,-0.0469367,0.0005203,-0.108710,-0.007226,0.000201,-0.000188,37,P +2023-03-09,60012,0.002594,0.353507,-0.0475102,0.0006053,-0.108685,-0.007286,0.000193,-0.000198,37,P +2023-03-10,60013,0.002997,0.356205,-0.0481309,0.0006080,-0.108742,-0.007415,0.000191,-0.000207,37,P +2023-03-11,60014,0.003349,0.359011,-0.0487086,0.0005218,-0.108845,-0.007542,0.000194,-0.000211,37,P +2023-03-12,60015,0.003664,0.361923,-0.0491652,0.0003671,-0.108936,-0.007662,0.000200,-0.000211,37,P +2023-03-13,60016,0.003927,0.364774,-0.0494438,0.0001719,-0.108983,-0.007792,0.000205,-0.000208,37,P +2023-03-14,60017,0.004228,0.367418,-0.0495254,-0.0000164,-0.108956,-0.007915,0.000209,-0.000205,37,P +2023-03-15,60018,0.004606,0.369771,-0.0494423,-0.0001495,-0.108848,-0.008026,0.000211,-0.000202,37,P +2023-03-16,60019,0.005024,0.371961,-0.0492735,-0.0001780,-0.108692,-0.008163,0.000212,-0.000200,37,P +2023-03-17,60020,0.005448,0.374135,-0.0491433,-0.0000740,-0.108516,-0.008348,0.000210,-0.000200,37,P +2023-03-18,60021,0.005874,0.376318,-0.0491829,0.0001583,-0.108313,-0.008488,0.000205,-0.000199,37,P +2023-03-19,60022,0.006293,0.378663,-0.0495018,0.0004681,-0.108106,-0.008457,0.000197,-0.000199,37,P +2023-03-20,60023,0.006803,0.381129,-0.0501321,0.0007690,-0.107968,-0.008277,0.000188,-0.000199,37,P +2023-03-21,60024,0.007565,0.383722,-0.0510229,0.0009752,-0.107931,-0.008122,0.000178,-0.000198,37,P +2023-03-22,60025,0.008398,0.386476,-0.0520425,0.0010220,-0.107967,-0.008103,0.000172,-0.000197,37,P +2023-03-23,60026,0.009293,0.389110,-0.0530263,0.0009105,-0.108086,-0.008159,0.000171,-0.000193,37,P +2023-03-24,60027,0.010088,0.391569,-0.0538364,0.0006814,-0.108325,-0.008208,0.000175,-0.000187,37,P +2023-03-25,60028,0.010838,0.394026,-0.0543848,0.0004016,-0.108624,-0.008293,0.000183,-0.000179,37,P +2023-03-26,60029,0.011568,0.396444,-0.0546560,0.0001327,-0.108822,-0.008492,0.000193,-0.000173,37,P +2023-03-27,60030,0.012244,0.398806,-0.0546811,-0.0000811,-0.108829,-0.008747,0.000204,-0.000168,37,P +2023-03-28,60031,0.012953,0.401079,-0.0545348,-0.0002101,-0.108682,-0.008903,0.000216,-0.000167,37,P +2023-03-29,60032,0.013682,0.403498,-0.0543041,-0.0002511,-0.108405,-0.008905,0.000227,-0.000167,37,P +2023-03-30,60033,0.014641,0.405841,-0.0540753,-0.0002092,-0.107970,-0.008866,0.000238,-0.000166,37,P +2023-03-31,60034,0.015904,0.408032,-0.0539223,-0.0001044,-0.107438,-0.008917,0.000243,-0.000164,37,P +2023-04-01,60035,0.017065,0.410222,-0.0538986,0.0000509,-0.107020,-0.009037,0.000241,-0.000161,37,P +2023-04-02,60036,0.017927,0.412628,-0.0540493,0.0002387,-0.106905,-0.009077,0.000230,-0.000159,37,P +2023-04-03,60037,0.018814,0.415004,-0.0543906,0.0004301,-0.107071,-0.008940,0.000213,-0.000162,37,P +2023-04-04,60038,0.019651,0.417290,-0.0549127,0.0005938,-0.107330,-0.008701,0.000194,-0.000169,37,P +2023-04-05,60039,0.020401,0.419540,-0.0555705,0.0006996,-0.107533,-0.008530,0.000179,-0.000180,37,P +2023-04-06,60040,0.021074,0.421758,-0.0562981,0.0007309,-0.107670,-0.008532,0.000173,-0.000192,37,P +2023-04-07,60041,0.021853,0.424028,-0.0570126,0.0006702,-0.107787,-0.008672,0.000175,-0.000200,37,P +2023-04-08,60042,0.022698,0.426318,-0.0576209,0.0005220,-0.107897,-0.008844,0.000183,-0.000205,37,P +2023-04-09,60043,0.023480,0.428597,-0.0580503,0.0003165,-0.107984,-0.008979,0.000193,-0.000206,37,P +2023-04-10,60044,0.024332,0.430858,-0.0582651,0.0001034,-0.108034,-0.009086,0.000201,-0.000204,37,P +2023-04-11,60045,0.025291,0.432945,-0.0582872,-0.0000604,-0.107997,-0.009207,0.000206,-0.000203,37,P +2023-04-12,60046,0.026376,0.434981,-0.0581882,-0.0001306,-0.107783,-0.009362,0.000208,-0.000202,37,P +2023-04-13,60047,0.027362,0.437135,-0.0580788,-0.0000771,-0.107356,-0.009526,0.000206,-0.000203,37,P +2023-04-14,60048,0.028260,0.439284,-0.0580862,0.0000987,-0.106830,-0.009639,0.000202,-0.000203,37,P +2023-04-15,60049,0.029310,0.441448,-0.0583191,0.0003649,-0.106427,-0.009648,0.000194,-0.000202,37,P +2023-04-16,60050,0.030406,0.443520,-0.0588377,0.0006530,-0.106315,-0.009538,0.000185,-0.000201,37,P +2023-04-17,60051,0.031556,0.445658,-0.0596205,0.0008827,-0.106485,-0.009363,0.000175,-0.000200,37,P +2023-04-18,60052,0.032731,0.447721,-0.0605767,0.0009911,-0.106771,-0.009212,0.000167,-0.000197,37,P +2023-04-19,60053,0.034141,0.449766,-0.0615656,0.0009495,-0.107005,-0.009137,0.000164,-0.000194,37,P +2023-04-20,60054,0.035626,0.451739,-0.0624434,0.0007740,-0.107146,-0.009130,0.000166,-0.000190,37,P +2023-04-21,60055,0.037079,0.453566,-0.0630964,0.0005099,-0.107258,-0.009175,0.000174,-0.000185,37,P +2023-04-22,60056,0.038562,0.455400,-0.0634688,0.0002246,-0.107395,-0.009283,0.000183,-0.000181,37,P +2023-04-23,60057,0.040124,0.457317,-0.0635704,-0.0000245,-0.107529,-0.009454,0.000193,-0.000178,37,P +2023-04-24,60058,0.041751,0.459240,-0.0634573,-0.0001984,-0.107592,-0.009622,0.000203,-0.000177,37,P +2023-04-25,60059,0.043396,0.461079,-0.0632151,-0.0002848,-0.107543,-0.009709,0.000212,-0.000177,37,P +2023-04-26,60060,0.045091,0.462933,-0.0629286,-0.0002872,-0.107358,-0.009719,0.000221,-0.000177,37,P +2023-04-27,60061,0.046594,0.464831,-0.0626795,-0.0002146,-0.107025,-0.009753,0.000229,-0.000176,37,P +2023-04-28,60062,0.048033,0.466690,-0.0625327,-0.0000848,-0.106584,-0.009888,0.000233,-0.000173,37,P +2023-04-29,60063,0.049481,0.468490,-0.0625367,0.0000834,-0.106182,-0.010070,0.000228,-0.000172,37,P +2023-04-30,60064,0.050828,0.470116,-0.0627164,0.0002622,-0.106021,-0.010148,0.000215,-0.000173,37,P +2023-05-01,60065,0.052224,0.471679,-0.0630694,0.0004276,-0.106201,-0.010026,0.000195,-0.000178,37,P +2023-05-02,60066,0.053861,0.473175,-0.0635698,0.0005499,-0.106632,-0.009758,0.000175,-0.000187,37,P +2023-05-03,60067,0.055674,0.474707,-0.0641588,0.0006038,-0.107096,-0.009497,0.000160,-0.000198,37,P +2023-05-04,60068,0.057473,0.476295,-0.0647602,0.0005706,-0.107423,-0.009363,0.000156,-0.000208,37,P +2023-05-05,60069,0.059254,0.477866,-0.0652800,0.0004439,-0.107606,-0.009385,0.000161,-0.000214,37,P +2023-05-06,60070,0.061193,0.479361,-0.0656343,0.0002424,-0.107747,-0.009521,0.000172,-0.000216,37,P +2023-05-07,60071,0.063280,0.480788,-0.0657659,0.0000078,-0.107907,-0.009714,0.000184,-0.000215,37,P +2023-05-08,60072,0.065531,0.482140,-0.0656740,-0.0001941,-0.108020,-0.009914,0.000194,-0.000213,37,P +2023-05-09,60073,0.067869,0.483341,-0.0654208,-0.0003072,-0.107961,-0.010080,0.000198,-0.000212,37,P +2023-05-10,60074,0.070205,0.484590,-0.0651138,-0.0002956,-0.107678,-0.010187,0.000198,-0.000212,37,P +2023-05-11,60075,0.072486,0.485862,-0.0648819,-0.0001609,-0.107246,-0.010233,0.000193,-0.000212,37,P +2023-05-12,60076,0.074870,0.487161,-0.0648323,0.0000626,-0.106820,-0.010222,0.000186,-0.000212,37,P +2023-05-13,60077,0.077278,0.488529,-0.0650291,0.0003180,-0.106540,-0.010156,0.000175,-0.000212,37,P +2023-05-14,60078,0.079600,0.489824,-0.0654688,0.0005363,-0.106482,-0.010041,0.000163,-0.000209,37,P +2023-05-15,60079,0.081748,0.491010,-0.0660842,0.0006604,-0.106642,-0.009887,0.000153,-0.000206,37,P +2023-05-16,60080,0.084001,0.492195,-0.0667601,0.0006548,-0.106944,-0.009709,0.000146,-0.000202,37,P +2023-05-17,60081,0.086382,0.493304,-0.0673644,0.0005219,-0.107267,-0.009533,0.000145,-0.000198,37,P +2023-05-18,60082,0.088898,0.494280,-0.0677846,0.0002929,-0.107489,-0.009415,0.000151,-0.000194,37,P +2023-05-19,60083,0.091450,0.495110,-0.0679478,0.0000178,-0.107568,-0.009425,0.000160,-0.000192,37,P +2023-05-20,60084,0.094153,0.495910,-0.0678371,-0.0002466,-0.107566,-0.009589,0.000171,-0.000193,37,P +2023-05-21,60085,0.096797,0.496664,-0.0674867,-0.0004546,-0.107590,-0.009843,0.000180,-0.000196,37,P +2023-05-22,60086,0.099429,0.497472,-0.0669686,-0.0005786,-0.107677,-0.010052,0.000188,-0.000199,37,P +2023-05-23,60087,0.102079,0.498352,-0.0663711,-0.0006146,-0.107774,-0.010131,0.000194,-0.000202,37,P +2023-05-24,60088,0.104760,0.499262,-0.0657784,-0.0005706,-0.107807,-0.010123,0.000201,-0.000203,37,P +2023-05-25,60089,0.107317,0.500044,-0.0652641,-0.0004626,-0.107738,-0.010149,0.000206,-0.000202,37,P +2023-05-26,60090,0.109616,0.500706,-0.0648807,-0.0003114,-0.107554,-0.010266,0.000208,-0.000200,37,P diff --git a/Ortho/test/ceshiL.py b/Ortho/test/ceshiL.py new file mode 100644 index 0000000..d7d3e81 --- /dev/null +++ b/Ortho/test/ceshiL.py @@ -0,0 +1,24 @@ +""" +@Project :microproduct +@File :OnePlantHeight.PY +@Function :主函数 +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" + +import numpy as np +from scipy.special import lambertw +H_arr=np.array([1,2]) +array_angle=np.array([1,0.5]) +a = 0.5 * H_arr * H_arr +b = -0.5 * np.sin(array_angle) +y = 2 + + + +a1 = 2 * lambertw(-b * np.sqrt(y / a) / 2) / b +print(a1) +pass + + diff --git a/Ortho/test/test.py b/Ortho/test/test.py new file mode 100644 index 0000000..9a0fdc8 --- /dev/null +++ b/Ortho/test/test.py @@ -0,0 +1,19 @@ +import os +import sys +import cv2 +import numpy as np + +img1 = cv2.imread('D:\MicroSAR\C-SAR\Ortho\Ortho\Temporary\dem_rcs.jpg', 0) +img2 = cv2.imread('D:\MicroSAR\C-SAR\Ortho\Ortho\Temporary\sar_rcs.jpg', 0) +def cv_show(name,img): + cv2.imshow(name, img) + cv2.waitKey(0) + cv2.destroyAllWindows() +sift = cv2.xfeatures2d.SIFT_create() +kp1, des1 = sift.detectAndCompute(img1, None) +kp2, des2 = sift.detectAndCompute(img2, None) +bf = cv2.BFMatcher(crossCheck=True) +matches = bf.match(des1, des2) +matches = sorted(matches, key=lambda x: x.distance) +img3 = cv2.drawMatches(img1, kp1, img2, kp2, matches[:10], None,flags=2) +cv_show('img3',img3) diff --git a/Ortho/test/test1.py b/Ortho/test/test1.py new file mode 100644 index 0000000..949d760 --- /dev/null +++ b/Ortho/test/test1.py @@ -0,0 +1,30 @@ + +def cal(base_block,i,j): + + std=np.std(base_block) + dist=np.max(base_block)-np.min(base_block) + return [i,j,std,dist] + + +plist=[] +with Pool() as pool: + for i in range(height): + print("\r",i,"/",height," ",end="") + if i<50 or i>height-51: + continue + for j in range(width): + if j<50 or j>width-51: + continue + base_block=data[i-50:i+50,j-50:j+50] + plist.append(pool.apply_async(cal,args=(base,i,j,))) + pool.close() + pool.join() + for p in plist: + result=p.get() + [i,j,std,dist]=result + base_std[i,j]=std + base_dist[i,j]=dist + +base_std.astype(np.float32).tofile(r"D:\MicroSAR\C-SAR\Ortho\Ortho\Temporary\HH_std.bin") +base_dist.astype(np.float32).tofile(r"D:\MicroSAR\C-SAR\Ortho\Ortho\Temporary\HH_dist.bin") +print(base_dist.shape,base_dist.dtype) \ No newline at end of file diff --git a/Ortho/test/testMatch.py b/Ortho/test/testMatch.py new file mode 100644 index 0000000..b03477e --- /dev/null +++ b/Ortho/test/testMatch.py @@ -0,0 +1,113 @@ +import logging +# from re import S +# from oneOrthoAuxData import OrthoAuxData +# from OrthoImage import ImageHandler +from tool.algorithm.image.ImageHandle import ImageHandler +import tarfile +# from OrthoDB import ManageAlgXML, CheckSource +from tool.algorithm.xml.AlgXmlHandle import ManageAlgXML, CheckSource # 导入xml文件读取与检查文件 +from OrthoAlg import IndirectOrthorectification, DEMProcess,ImageMatchClass +# from logHandler import LogHandler +from tool.algorithm.algtools.logHandler import LogHandler +from tool.algorithm.xml.CreatMetafile import CreateMetafile +from OrthoXmlInfo import CreateDict, CreateStadardXmlFile +from osgeo import gdal, osr +import os +import glob +import gc +import datetime +import shutil +import sys +import cv2 + +ori_sar_path="D:\MicroWorkspace\C-SAR\Ortho\Temporary\TestSAR\GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_HH_L10003923848.jpg" +sim_sar_path="D:\MicroWorkspace\C-SAR\Ortho\Temporary\TestSim\sim_img_sum.jpg" +work_sapce_path="D:\MicroWorkspace\C-SAR\Ortho\Temporary" + +''' +import matplotlib.pyplot as plt +img1 = cv2.imread(ori_sar_path, 0) +img2 = cv2.imread(sim_sar_path, 0) +def cv_show(name,img): + cv2.imshow(name, img) + cv2.waitKey(0) + cv2.destroyAllWindows() +sift = cv2.SIFT_create() +kp1, des1 = sift.detectAndCompute(img1, None) +kp2, des2 = sift.detectAndCompute(img2, None) +bf = cv2.BFMatcher(crossCheck=True) +matches = bf.match(des1, des2) +matches = sorted(matches, key=lambda x: x.distance) +img3 = cv2.drawMatches(img1, kp1, img2, kp2, matches[:10], None,flags=2) +cv2.imwrite(work_sapce_path,img3) +''' + +# 匹配影像 +def ImageMatch(ori_sar_path,sim_sar_path,work_sapce_path): + ori_sar=gdal.Open(ori_sar_path) + sim_sar=gdal.Open(sim_sar_path) + # 影像尺寸 + ori_height=ori_sar.RasterYSize + ori_width=ori_sar.RasterXSize + sim_height=sim_sar.RasterYSize + sim_width=sim_sar.RasterXSize + # 分块匹配 + ori_sar_arr=ori_sar.GetRasterBand(1).ReadAsArray(0,0,ori_width,ori_height) # 原始影像 + ori_img=(255*ori_sar_arr/np.max(ori_sar_arr)).astype(np.uint8) + + sim_sar_arr=np.log(sim_sar.GetRasterBand(1).ReadAsArray(0,0,sim_width,sim_height)+1) # 模拟影像 + sim_img=(1+253*sim_sar_arr/np.max(sim_sar_arr)).astype(np.uint8) + + res = cv.matchTemplate(img,template,method) + min_val, max_val, min_loc, max_loc = cv.minMaxLoc(res) + top_left = max_loc + # 范围 + min_w=top_left[0] if top_left[0]>0 else 0 + min_h=top_left[1] if top_left[1]>0 else 0 + + max_w=top_left[0]+ori_width if top_left[0]+ori_width + + CSAR_202107275419_0001-0 + D:\micro\SWork\ + + File + ElementAlg + BackScattering-C-SAR-V2.1 + BackScattering-C-SAR-V2.1.exe + 后向散射系数 + 微波卫星3-5级产品生产模型 + BackScattering-C-SAR-V2.1-1 + 1.0 + 辐射类产品_后向散射系数 + 1 + BackScattering_中科卫星应用德清研究院_2.1 + 中科卫星应用德清研究院 + 景-算法 + + + + + 1.8 + python + + 0 + 0 + Windows10 + 双核 + 4GB + 20GB + 无需求 + 无需求 + 无需求 + + + + + SLC + SLC影像文件 + 正射校正后的SLC影像文件路径 + File + tar.gz + Cal + F:\MicroWorkspace\S_SAR\AHV\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458.tar.gz + True + False + File + Satellite + 1 + GF3B + + + DEM + DEM数字高程影像 + 30m分辨率DEM数字高程影像 + File + zip + Cal + F:\al_zhongji\S-SAR-data\backScattering\DEM\115E33N_COP30.zip + True + True + File + DEM + 0 + DEM + + + + + BackScatteringProduct + 后向散射系数产品 + 后向散射系数产品 + File + tar.gz + Cal + D:\micro\SWork\BackScattering\Output\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal.tar.gz + DEFAULT + DEFAULT + DEFAULT + DEFAULT + + + + \ No newline at end of file diff --git a/backScattering/BackScatteringAlg.py b/backScattering/BackScatteringAlg.py new file mode 100644 index 0000000..0786f99 --- /dev/null +++ b/backScattering/BackScatteringAlg.py @@ -0,0 +1,2944 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :OneOrthoAlg.py +@Function :正射校正算法 +@Author :KHZ +@Contact: +@Date :2021/8/14 +@Version :1.0.0 +""" +# from re import I, T, X, match +# from types import DynamicClassAttribute +# from numpy.core.einsumfunc import _parse_possible_contraction +# from numpy.core.fromnumeric import shape +# from numpy.core.shape_base import block +# from numpy.lib import row_stack +# from numpy.lib.function_base import delete +import zipfile + +import psutil +import os +import gc +# import sys +# import scipy +# from scipy.sparse import data +# from scipy.sparse.construct import random +import xmltodict +import numpy as np +import json +import datetime, time +import yaml +import math +import time +#import cv2 +#import cv2 as cv +from osgeo import gdal, gdalconst +# from yaml.events import AliasEvent, NodeEvent +from OrthoAuxData import OrthoAuxData +# from OrthoImage import ImageHandler +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.MetaDataHandler import MetaDataHandler +# from logHandler import LogHandler +from osgeo import osr +from scipy import interpolate +import scipy.io as scipyio +import copy +import scipy.sparse as ss +import shutil +import pandas +import uuid +from concurrent.futures._base import as_completed, wait +from concurrent.futures.thread import ThreadPoolExecutor +from multiprocessing import Pool + +class ScatteringAlg: + def __init__(self): + pass + + @staticmethod + def sar_backscattering_coef(in_sar_tif, meta_file_path, out_sar_tif, replece_VV = False, is_DB = True): + + # 读取原始SAR影像 + proj, geotrans, in_data = ImageHandler.read_img(in_sar_tif) + + # 计算强度信息 + I = np.array(in_data[0], dtype="float32") + Q = np.array(in_data[1], dtype="float32") + + where_9999_0 = np.where(I == -9999) + where_9999_1 = np.where(Q == -9999) + I[where_9999_0] = 1.0 + Q[where_9999_1] = 1.0 + + I2 = np.square(I) + Q2 = np.square(Q) + intensity_arr = I2 + Q2 + + # 获取极化类型 + if 'HH' in os.path.basename(in_sar_tif): + polarization = 'HH' + elif 'HV' in os.path.basename(in_sar_tif): + polarization = 'HV' + elif 'VH' in os.path.basename(in_sar_tif): + polarization = 'VH' + elif 'VV' in os.path.basename(in_sar_tif): + polarization = 'VV' + if replece_VV: + polarization = 'HV' #土壤水分算法中可能会用HV替换VV + else: + raise Exception ('there are not HH、HV、VH、VV in path:',in_sar_tif) + + # 获取参数 + QualifyValue = MetaDataHandler.get_QualifyValue(meta_file_path, polarization) + Kdb = MetaDataHandler.get_Kdb(meta_file_path, polarization) + + # 计算后向散射系数 + #对数形式 + coef_arr = 10 * (np.log10(intensity_arr * ((QualifyValue/32767)**2))) - Kdb + + coef_arr[np.isnan(coef_arr)] = -9999 + coef_arr[np.isinf(coef_arr)] = -9999 + coef_arr[where_9999_0] = -9999 + coef_arr[where_9999_1] = -9999 + ## 输出的SAR后向散射系数产品 + # ImageHandler.write_img(out_sar_tif, proj, geotrans, coef_arr, 0) + + tif_array = np.power(10.0, coef_arr / 10.0) # dB --> 线性值 后向散射系数 + + tif_array[np.isnan(tif_array)] = 0 + tif_array[np.isinf(tif_array)] = 0 + tif_array[where_9999_0] = 0 + tif_array[where_9999_1] = 0 + + + ImageHandler.write_img(out_sar_tif, proj, geotrans, tif_array, 0) + return True + + @staticmethod + def lin_to_db(lin_path, db_path): + proj, geotrans, in_data = ImageHandler.read_img(lin_path) + db_arr = 10 * np.log10(in_data) + # db_arr[np.isnan(db_arr)] = -9999 + # db_arr[np.isinf(db_arr)] = -9999 + ImageHandler.write_img(db_path, proj, geotrans, db_arr, -9999) + + +def FindInfomationFromJson(HeaderFile_dom_json, node_path_list): + """ + 在Json文件中,按照指定路径解析出制定节点 + """ + result_node = HeaderFile_dom_json + for nodename in node_path_list: + result_node = result_node[nodename] + return result_node + + +def GetVectorNorm(Vecter): + """ + 得到向量的模 + """ + Vecter = Vecter.reshape(-1,1) + Vecter_Norm_pow = np.matmul(Vecter.T,Vecter) + return np.sqrt(Vecter_Norm_pow) + + +def XYZOuterM2(A, B): + """ + 外积(叉乘),日后版本换成可以任意维度的外积运算方程 + args: + A:nx3 + B:nx3 + """ + cnt = A.shape[0] + C = np.zeros((cnt, 3)) + C[:, 0] = A[:, 1] * B[:, 2] - A[:, 2] * B[:, 1] + C[:, 1] = A[:, 2] * B[:, 0] - A[:, 0] * B[:, 2] + C[:, 2] = A[:, 0] * B[:, 1] - A[:, 1] * B[:, 0] + return C + +def LinearSampling_raster(source_raster,tar_raster,source_start_row,source_start_col,tar_start_row,tar_start_col): + ''' 双线性重采样 + agrs: + source_raster:原影像 + tar_raster:目标影像 + source_start_row:原影像的起始行号 + source_start_col:原影像的起始列号 + tar_start_row:目标影像的起始行号 + tar_start_col:目标影像的起始列号 + return: + tar_raster:目标影像 + ''' + # 根据原影像的起始行列号与目标影像行列号,计算目标影像行列号的校正值 + d_row=tar_start_row-source_start_row # + d_col=tar_start_col-source_start_col # + + + source_height=source_raster.shape[0] + source_width=source_raster.shape[1] + tar_height=tar_raster.shape[0] + tar_width=tar_raster.shape[1] + + source_row=(np.ones((source_width,source_height))*range(source_height)).transpose(1,0) + source_col=np.ones((source_height,source_width))*range(source_width) + + tar_row=(np.ones((tar_width,tar_height))*range(tar_height)).transpose(1,0) + tar_col=np.ones((tar_height,tar_width))*range(tar_width) + + tar_row=tar_row+d_row # 坐标系变换 + tar_col=tar_col+d_col # 坐标系变换 + # 确定行列号 + last_source_row=np.floor(tar_row) + last_source_col=np.floor(tar_col) + next_source_row=np.ceil(tar_row) + next_source_col=np.ceil(tar_col) + + # 双线性重采样模型示意图, + # y1 r1 y2 + # + # r + # + # y3 r2 y4 + # 计算重采样 + r1=source_raster[last_source_row,last_source_col]*(tar_col-last_source_col)+source_raster[last_source_row,next_source_col]*(next_source_col-tar_col) + r2=source_raster[next_source_row,last_source_col]*(tar_col-last_source_col)+source_raster[next_source_row,next_source_col]*(next_source_col-tar_col) + tar_raster=r1*(tar_row-last_source_row)+r2*(next_source_row-tar_row) + tar_raster=tar_raster.reshape(tar_height,tar_width) # 目标影像 + return tar_raster.copy() + +'''-----双线性重采样-----''' + + +""" RPC 校正部分 """ + +def parse_rpc_file(rpc_file): + # rpc_file:.rpc文件的绝对路径 + # rpc_dict:符号RPC域下的16个关键字的字典 + # 参考网址:http://geotiff.maptools.org/rpc_prop.html; + # https://www.osgeo.cn/gdal/development/rfc/rfc22_rpc.html + + rpc_dict = {} + with open(rpc_file) as f: + text = f.read() + + # .rpc文件中的RPC关键词 + words = ['errBias', 'errRand', 'lineOffset', 'sampOffset', 'latOffset', + 'longOffset', 'heightOffset', 'lineScale', 'sampScale', 'latScale', + 'longScale', 'heightScale', 'lineNumCoef', 'lineDenCoef','sampNumCoef', 'sampDenCoef',] + + # GDAL库对应的RPC关键词 + keys = ['ERR_BIAS', 'ERR_RAND', 'LINE_OFF', 'SAMP_OFF', 'LAT_OFF', 'LONG_OFF', + 'HEIGHT_OFF', 'LINE_SCALE', 'SAMP_SCALE', 'LAT_SCALE', + 'LONG_SCALE', 'HEIGHT_SCALE', 'LINE_NUM_COEFF', 'LINE_DEN_COEFF', + 'SAMP_NUM_COEFF', 'SAMP_DEN_COEFF'] + + for old, new in zip(words, keys): + text = text.replace(old, new) + # 以‘;\n’作为分隔符 + text_list = text.split(';\n') + # 删掉无用的行 + text_list = text_list[3:-2] + # + text_list[0] = text_list[0].split('\n')[1] + # 去掉制表符、换行符、空格 + text_list = [item.strip('\t').replace('\n', '').replace(' ', '') for item in text_list] + + for item in text_list: + # 去掉‘=’ + key, value = item.split('=') + # 去掉多余的括号‘(’,‘)’ + if '(' in value: + value = value.replace('(', '').replace(')', '') + rpc_dict[key] = value + + for key in keys[:12]: + # 为正数添加符号‘+’ + if not rpc_dict[key].startswith('-'): + rpc_dict[key] = '+' + rpc_dict[key] + # 为归一化项和误差标志添加单位 + if key in ['LAT_OFF', 'LONG_OFF', 'LAT_SCALE', 'LONG_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' degrees' + if key in ['LINE_OFF', 'SAMP_OFF', 'LINE_SCALE', 'SAMP_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' pixels' + if key in ['ERR_BIAS', 'ERR_RAND', 'HEIGHT_OFF', 'HEIGHT_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' meters' + + # 处理有理函数项 + for key in keys[-4:]: + values = [] + for item in rpc_dict[key].split(','): + #print(item) + if not item.startswith('-'): + values.append('+'+item) + else: + values.append(item) + rpc_dict[key] = ' '.join(values) + return rpc_dict + + +def write_rpc_to_tiff(inputpath,rpc_file,ap = True,outpath = None): + rpc_dict = parse_rpc_file(rpc_file) + if ap: + # 可修改读取 + dataset = gdal.Open(inputpath,gdal.GA_Update) + # 向tif影像写入rpc域信息 + # 注意,这里虽然写入了RPC域信息,但实际影像还没有进行实际的RPC校正 + # 尽管有些RS/GIS能加载RPC域信息,并进行动态校正 + for k in rpc_dict.keys(): + dataset.SetMetadataItem(k, rpc_dict[k], 'RPC') + dataset.FlushCache() + del dataset + else: + dataset = gdal.Open(inputpath,gdal.GA_Update) + tiff_driver= gdal.GetDriverByName('Gtiff') + out_ds = tiff_driver.CreateCopy(outpath, dataset, 1) + for k in rpc_dict.keys(): + out_ds.SetMetadataItem(k, rpc_dict[k], 'RPC') + out_ds.FlushCache() + + +def rpc_correction(inputpath,rpc_file,corrtiff,dem_tif_file = None): + ## 设置rpc校正的参数 + # 原图像和输出影像缺失值设置为0,输出影像坐标系为WGS84(EPSG:4326), 重采样方法为双线性插值(bilinear,还有最邻近‘near’、三次卷积‘cubic’等可选) + # 注意DEM的覆盖范围要比原影像的范围大,此外,DEM不能有缺失值,有缺失值会报错 + # 通常DEM在水域是没有值的(即缺失值的情况),因此需要将其填充设置为0,否则在RPC校正时会报错 + # 这里使用的DEM是填充0值后的SRTM V4.1 3秒弧度的DEM(分辨率为90m) + # RPC_DEMINTERPOLATION=bilinear 表示对DEM重采样使用双线性插值算法 + # 如果要修改输出的坐标系,则要修改dstSRS参数值,使用该坐标系统的EPSG代码 + # 可以在网址https://spatialreference.org/ref/epsg/32650/ 查询得到EPSG代码 + + write_rpc_to_tiff(inputpath,rpc_file,ap = True,outpath = None) + + if dem_tif_file is None: + wo = gdal.WarpOptions(srcNodata=0, dstNodata=0, dstSRS='EPSG:4326', resampleAlg='bilinear', + format='Gtiff',rpc=True, warpOptions=["INIT_DEST=NO_DATA"]) + + wr = gdal.Warp(corrtiff, inputpath, options=wo) + print("RPC_GEOcorr>>>") + else: + wo = gdal.WarpOptions(srcNodata=0, dstNodata=0, dstSRS='EPSG:4326', resampleAlg='bilinear', format='Gtiff',rpc=True, warpOptions=["INIT_DEST=NO_DATA"], + transformerOptions=["RPC_DEM=%s"%(dem_tif_file), "RPC_DEMINTERPOLATION=bilinear"]) + wr = gdal.Warp(corrtiff, inputpath, options=wo) + print("RPC_GEOcorr>>>") + ## 对于全海域的影像或者不使用DEM校正的话,可以将transformerOptions有关的RPC DEM关键字删掉 + ## 即将上面gdal.WarpOptions注释掉,将下面的语句取消注释,无DEM时,影像范围的高程默认全为0 + del wr + + +########################## +# 输出RPC 行列号到 经纬度的变换 +########################## + #最大迭代次数超过则报错 +class MaxLocalizationIterationsError(Exception): + """ + Custom rpcm Exception. + """ + pass + +def apply_poly(poly, x, y, z): + """ + Evaluates a 3-variables polynom of degree 3 on a triplet of numbers. + 将三次多项式的统一模式构建为一个单独的函数 + Args: + poly: list of the 20 coefficients of the 3-variate degree 3 polynom, + ordered following the RPC convention. + x, y, z: triplet of floats. They may be numpy arrays of same length. + Returns: + the value(s) of the polynom on the input point(s). + """ + out = 0 + out += poly[0] + out += poly[1]*y + poly[2]*x + poly[3]*z + out += poly[4]*y*x + poly[5]*y*z +poly[6]*x*z + out += poly[7]*y*y + poly[8]*x*x + poly[9]*z*z + out += poly[10]*x*y*z + out += poly[11]*y*y*y + out += poly[12]*y*x*x + poly[13]*y*z*z + poly[14]*y*y*x + out += poly[15]*x*x*x + out += poly[16]*x*z*z + poly[17]*y*y*z + poly[18]*x*x*z + out += poly[19]*z*z*z + return out + +def apply_rfm(num, den, x, y, z): + """ + Evaluates a Rational Function Model (rfm), on a triplet of numbers. + 执行20个参数的分子和20个参数的除法 + Args: + num: list of the 20 coefficients of the numerator + den: list of the 20 coefficients of the denominator + All these coefficients are ordered following the RPC convention. + x, y, z: triplet of floats. They may be numpy arrays of same length. + + Returns: + the value(s) of the rfm on the input point(s). + """ + return apply_poly(num, x, y, z) / apply_poly(den, x, y, z) + +def rpc_from_geotiff(geotiff_path): + """ + Read the RPC coefficients from a GeoTIFF file and return an RPCModel object. + 该函数返回影像的Gdal格式的影像和RPCmodel + Args: + geotiff_path (str): path or url to a GeoTIFF file + + Returns: + instance of the rpc_model.RPCModel class + """ + # with rasterio.open(geotiff_path, 'r') as src: + # + dataset = gdal.Open(geotiff_path, gdal.GA_ReadOnly) + rpc_dict = dataset.GetMetadata("RPC") + # 同时返回影像与rpc + return dataset, RPCModel(rpc_dict,'geotiff') + + +def read_rpc_file(rpc_file): + """ + Read RPC from a RPC_txt file and return a RPCmodel + 从TXT中直接单独读取RPC模型 + Args: + rpc_file: RPC sidecar file path + + Returns: + dictionary read from the RPC file, or an empty dict if fail + + """ + rpc = parse_rpc_file(rpc_file) + return RPCModel(rpc) + +class RPCModel: + def __init__(self, d, dict_format="geotiff"): + """ + Args: + d (dict): dictionary read from a geotiff file with + rasterio.open('/path/to/file.tiff', 'r').tags(ns='RPC'), + or from the .__dict__ of an RPCModel object. + dict_format (str): format of the dictionary passed in `d`. + Either "geotiff" if read from the tags of a geotiff file, + or "rpcm" if read from the .__dict__ of an RPCModel object. + """ + if dict_format == "geotiff": + self.row_offset = float(d['LINE_OFF'][0:d['LINE_OFF'].rfind(' ')]) + self.col_offset = float(d['SAMP_OFF'][0:d['SAMP_OFF'].rfind(' ')]) + self.lat_offset = float(d['LAT_OFF'][0:d['LAT_OFF'].rfind(' ')]) + self.lon_offset = float(d['LONG_OFF'][0:d['LONG_OFF'].rfind(' ')]) + self.alt_offset = float(d['HEIGHT_OFF'][0:d['HEIGHT_OFF'].rfind(' ')]) + + self.row_scale = float(d['LINE_SCALE'][0:d['LINE_SCALE'].rfind(' ')]) + self.col_scale = float(d['SAMP_SCALE'][0:d['SAMP_SCALE'].rfind(' ')]) + self.lat_scale = float(d['LAT_SCALE'][0:d['LAT_SCALE'].rfind(' ')]) + self.lon_scale = float(d['LONG_SCALE'][0:d['LONG_SCALE'].rfind(' ')]) + self.alt_scale = float(d['HEIGHT_SCALE'][0:d['HEIGHT_SCALE'].rfind(' ')]) + + self.row_num = list(map(float, d['LINE_NUM_COEFF'].split())) + self.row_den = list(map(float, d['LINE_DEN_COEFF'].split())) + self.col_num = list(map(float, d['SAMP_NUM_COEFF'].split())) + self.col_den = list(map(float, d['SAMP_DEN_COEFF'].split())) + + if 'LON_NUM_COEFF' in d: + self.lon_num = list(map(float, d['LON_NUM_COEFF'].split())) + self.lon_den = list(map(float, d['LON_DEN_COEFF'].split())) + self.lat_num = list(map(float, d['LAT_NUM_COEFF'].split())) + self.lat_den = list(map(float, d['LAT_DEN_COEFF'].split())) + + elif dict_format == "rpcm": + self.__dict__ = d + + else: + raise ValueError( + "dict_format '{}' not supported. " + "Should be {{'geotiff','rpcm'}}".format(dict_format) + ) + + + def projection(self, lon, lat, alt): + """ + Convert geographic coordinates of 3D points into image coordinates. + 正投影:从地理坐标到图像坐标 + Args: + lon (float or list): longitude(s) of the input 3D point(s) + lat (float or list): latitude(s) of the input 3D point(s) + alt (float or list): altitude(s) of the input 3D point(s) + + Returns: + float or list: horizontal image coordinate(s) (column index, ie x) + float or list: vertical image coordinate(s) (row index, ie y) + """ + nlon = (np.asarray(lon) - self.lon_offset) / self.lon_scale + nlat = (np.asarray(lat) - self.lat_offset) / self.lat_scale + nalt = (np.asarray(alt) - self.alt_offset) / self.alt_scale + + col = apply_rfm(self.col_num, self.col_den, nlat, nlon, nalt) + row = apply_rfm(self.row_num, self.row_den, nlat, nlon, nalt) + + col = col * self.col_scale + self.col_offset + row = row * self.row_scale + self.row_offset + + return col, row + + + def localization(self, col, row, alt, return_normalized=False): + """ + Convert image coordinates plus altitude into geographic coordinates. + 反投影:从图像坐标到地理坐标 + Args: + col (float or list): x image coordinate(s) of the input point(s) + row (float or list): y image coordinate(s) of the input point(s) + alt (float or list): altitude(s) of the input point(s) + + Returns: + float or list: longitude(s) + float or list: latitude(s) + """ + ncol = (np.asarray(col) - self.col_offset) / self.col_scale + nrow = (np.asarray(row) - self.row_offset) / self.row_scale + nalt = (np.asarray(alt) - self.alt_offset) / self.alt_scale + + if not hasattr(self, 'lat_num'): + lon, lat = self.localization_iterative(ncol, nrow, nalt) + else: + lon = apply_rfm(self.lon_num, self.lon_den, nrow, ncol, nalt) + lat = apply_rfm(self.lat_num, self.lat_den, nrow, ncol, nalt) + + if not return_normalized: + lon = lon * self.lon_scale + self.lon_offset + lat = lat * self.lat_scale + self.lat_offset + + return lon, lat + + + def localization_iterative(self, col, row, alt): + """ + Iterative estimation of the localization function (image to ground), + for a list of image points expressed in image coordinates. + 逆投影时的迭代函数 + Args: + col, row: normalized image coordinates (between -1 and 1) + alt: normalized altitude (between -1 and 1) of the corresponding 3D + point + + Returns: + lon, lat: normalized longitude and latitude + + Raises: + MaxLocalizationIterationsError: if the while loop exceeds the max + number of iterations, which is set to 100. + """ + # target point: Xf (f for final) + Xf = np.vstack([col, row]).T + + # use 3 corners of the lon, lat domain and project them into the image + # to get the first estimation of (lon, lat) + # EPS is 2 for the first iteration, then 0.1. + lon = -col ** 0 # vector of ones + lat = -col ** 0 + EPS = 2 + x0 = apply_rfm(self.col_num, self.col_den, lat, lon, alt) + y0 = apply_rfm(self.row_num, self.row_den, lat, lon, alt) + x1 = apply_rfm(self.col_num, self.col_den, lat, lon + EPS, alt) + y1 = apply_rfm(self.row_num, self.row_den, lat, lon + EPS, alt) + x2 = apply_rfm(self.col_num, self.col_den, lat + EPS, lon, alt) + y2 = apply_rfm(self.row_num, self.row_den, lat + EPS, lon, alt) + + + + n = 0 + while not np.all((x0 - col) ** 2 + (y0 - row) ** 2 < 1e-18): + + if n > 100: + raise MaxLocalizationIterationsError("Max localization iterations (100) exceeded") + + X0 = np.vstack([x0, y0]).T + X1 = np.vstack([x1, y1]).T + X2 = np.vstack([x2, y2]).T + e1 = X1 - X0 + e2 = X2 - X0 + u = Xf - X0 + + # project u on the base (e1, e2): u = a1*e1 + a2*e2 + # the exact computation is given by: + # M = np.vstack((e1, e2)).T + # a = np.dot(np.linalg.inv(M), u) + # but I don't know how to vectorize this. + # Assuming that e1 and e2 are orthogonal, a1 is given by + # / + num = np.sum(np.multiply(u, e1), axis=1) + den = np.sum(np.multiply(e1, e1), axis=1) + a1 = np.divide(num, den).squeeze() + + num = np.sum(np.multiply(u, e2), axis=1) + den = np.sum(np.multiply(e2, e2), axis=1) + a2 = np.divide(num, den).squeeze() + + # use the coefficients a1, a2 to compute an approximation of the + # point on the gound which in turn will give us the new X0 + lon += a1 * EPS + lat += a2 * EPS + + # update X0, X1 and X2 + EPS = .1 + x0 = apply_rfm(self.col_num, self.col_den, lat, lon, alt) + y0 = apply_rfm(self.row_num, self.row_den, lat, lon, alt) + x1 = apply_rfm(self.col_num, self.col_den, lat, lon + EPS, alt) + y1 = apply_rfm(self.row_num, self.row_den, lat, lon + EPS, alt) + x2 = apply_rfm(self.col_num, self.col_den, lat + EPS, lon, alt) + y2 = apply_rfm(self.row_num, self.row_den, lat + EPS, lon, alt) + n += 1 + + return lon, lat +############################################# +# 校正影像 输出影像转换表 +############################################# + +""" +[pool.putRequest(req) for req in requests]等同于 +  for req in requests: +     pool.putRequest(req) +""" + +def rpc_row_col(params): + rpc_mdl,r_block,c_block,ati_block,i,block_shape=params + r_block ,c_block = rpc_mdl.localization(r_block,c_block,0) + print("\t{}\t".format(i)) + return [i,r_block ,c_block,block_shape] + + +def get_RPC_lon_lat(in_rpc_tiff,out_rpc_rc_path): + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} ".format(exe_path,8,in_rpc_tiff,out_rpc_rc_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") +def getRCImageRC2(inputPath,out_rpc_rc_path): + #shutil.copy2(inputPath, out_rpc_rc_path) + # 创建重采样输出文件(设置投影及六参数) + input_rpc_sar=gdal.Open(inputPath) + + driver = gdal.GetDriverByName('GTiff') + output = driver.Create(out_rpc_rc_path, input_rpc_sar.RasterXSize,input_rpc_sar.RasterYSize, 2,gdal.GDT_Float32) + output.SetGeoTransform(list(input_rpc_sar.GetGeoTransform())) + output.SetProjection(input_rpc_sar.GetProjection()) + # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + + rpc_rc_img=output + # 计算行列号 + rc_height=rpc_rc_img.RasterYSize + rc_width=rpc_rc_img.RasterXSize + + + for i in range(0,rc_height,100): + c_block=np.ones((100,rc_width)).astype(np.float32)*(np.array(list(range(rc_width))).reshape(1,rc_width)) + r_block=np.ones((100,rc_width)).astype(np.float32)*(np.array(list(range(100))).reshape(100,1)) + r_block=r_block+i + if rc_height-i>100: + rpc_rc_img.GetRasterBand(1).WriteArray(r_block.astype(np.float32),0,i) + rpc_rc_img.GetRasterBand(2).WriteArray(c_block.astype(np.float32),0,i) + else: + num=rc_height-i + rpc_rc_img.GetRasterBand(1).WriteArray(r_block[:num,:].astype(np.float32),0,i) + rpc_rc_img.GetRasterBand(2).WriteArray(c_block[:num,:].astype(np.float32),0,i) + + del rpc_rc_img,output,input_rpc_sar + +def getRCImageRC(inputPath,out_rpc_rc_path,rpc_file_path): + rpc_tool = read_rpc_file(rpc_file_path) + #shutil.copy2(inputPath, out_rpc_rc_path) + # 创建重采样输出文件(设置投影及六参数) + input_rpc_sar=gdal.Open(inputPath) + + driver = gdal.GetDriverByName('GTiff') + output = driver.Create(out_rpc_rc_path, input_rpc_sar.RasterXSize,input_rpc_sar.RasterYSize, 2,gdal.GDT_Float32) + output.SetGeoTransform(list(input_rpc_sar.GetGeoTransform())) + output.SetProjection(input_rpc_sar.GetProjection()) + # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + + rpc_rc_img=output + # 计算行列号 + rc_height=rpc_rc_img.RasterYSize + rc_width=rpc_rc_img.RasterXSize + + + with Pool(8) as t: + plist=[] + for i in range(0,rc_height,1000): + c_block=np.ones((1000,rc_width)).astype(np.float32)*(np.array(list(range(rc_width))).reshape(1,rc_width)) + r_block=np.ones((1000,rc_width)).astype(np.float32)*(np.array(list(range(1000))).reshape(1000,1)) + r_block=r_block+i + if not rc_height-i>1000: + num=rc_height-i + r_block=r_block[:num,:].astype(np.float32) + c_block=c_block[:num,:].astype(np.float32) + block_shape=r_block.shape + + plist.append(t.apply_async(rpc_row_col,args=([rpc_tool,r_block.reshape(-1).astype(np.int32),c_block.reshape(-1).astype(np.int32) ,c_block.reshape(-1)*0+0,i,block_shape],))) + t.close() + t.join() + for future in plist: + data = future.get() + i,r_block ,c_block,block_shape=data + rpc_rc_img.GetRasterBand(1).WriteArray(r_block.reshape(block_shape).astype(np.float32),0,i) + rpc_rc_img.GetRasterBand(2).WriteArray(c_block.reshape(block_shape).astype(np.float32),0,i) + del rpc_rc_img,output,input_rpc_sar +""" RPC 结束 """ + + +class SatelliteOrbit(object): + def __init__(self) -> None: + super().__init__() + self.starttime = 1262275200.0 + self.modelName="" + + def get_starttime(self): + ''' + 返回卫星轨道时间起算点 + ''' + return self.starttime + + def ReconstructionSatelliteOrbit(self, GPSPoints_list): + ''' + 重建卫星轨道,使用多项式拟合法 + args: + GPSPoints_list:GPS 卫星轨道点 + return: + SatelliteOrbitModel 卫星轨道模型 + ''' + self.SatelliteOrbitModel = None + + def SatelliteSpaceState(self, time_float): + ''' + 根据时间戳,返回对应时间的卫星的轨迹状态 + args: + time_float:时间戳 + return: + State_list:[time,Xp,Yp,Zp,Vx,Vy,Vz] + ''' + return None + + +class SatelliteOrbitFitPoly(SatelliteOrbit): + ''' + 继承于SatelliteOribit类,为拟合多项式实现方法 + ''' + + def __init__(self) -> None: + super().__init__() + self.modelName="多项式" + self.polynum=4 + + def ReconstructionSatelliteOrbit(self, GPSPoints_list, starttime): + if len(GPSPoints_list)==2: + self.polynum=1 + self.starttime = starttime + + record_count = len(GPSPoints_list) + time_arr = np.zeros((record_count, 1), dtype=np.float64) # 使用np.float64只是为了精度高些;如果32位也能满足需求,请用32位 + state_arr = np.zeros((record_count, 6), dtype=np.float64) + A_arr = np.zeros((self.polynum+1, 6), dtype=np.float64) # 四次项 + X=np.ones((record_count,self.polynum+1),dtype=np.float64) # 记录时间坐标 + # 将点记录转换为自变量矩阵、因变量矩阵 + + for i in range(record_count): + GPSPoint = GPSPoints_list[i] + time_ = GPSPoint[0] - self.starttime # 为了保证精度,对时间进行缩放 + X[i,:]=np.array([1,time_]) + state_arr[i, :] = np.array(GPSPoint[1:],dtype=np.float64).reshape(1,6) # 空间坐标 + self.model_f=[] + for i in range(6): + Y = state_arr[:, i].reshape(-1,1) + A_arr[:,i]=np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T,X)),X.T),Y)[:,0] + + self.A_arr=copy.deepcopy(A_arr.copy()) + return self.A_arr + elif len(GPSPoints_list) > 6: + self.polynum=4 + # 多项式的节点数,理论上是超过5个可以起算,这里为了精度选择10个点起算。 + # 多项式 XA=Y ==> A=(X'X)^X'Y,其中 A 为待求系数,X为变量,Y为因变量 + # 这里使用三次项多项式,共有6组参数。 + # 声明自变量,因变量,系数矩阵 + self.starttime = starttime + + record_count = len(GPSPoints_list) + time_arr = np.zeros((record_count, 1), dtype=np.float64) # 使用np.float64只是为了精度高些;如果32位也能满足需求,请用32位 + state_arr = np.zeros((record_count, 6), dtype=np.float64) + A_arr = np.zeros((self.polynum+1, 6), dtype=np.float64) # 四次项 + X=np.ones((record_count,self.polynum+1),dtype=np.float64) # 记录时间坐标 + # 将点记录转换为自变量矩阵、因变量矩阵 + + for i in range(record_count): + GPSPoint = GPSPoints_list[i] + time_ = GPSPoint[0] - self.starttime # 为了保证精度,对时间进行缩放 + X[i,:]=np.array([1,time_,time_**2,time_**3,time_**4]) + state_arr[i, :] = np.array(GPSPoint[1:],dtype=np.float64).reshape(1,6) # 空间坐标 + self.model_f=[] + for i in range(6): + Y = state_arr[:, i].reshape(-1,1) + A_arr[:,i]=np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T,X)),X.T),Y)[:,0] + + self.A_arr=copy.deepcopy(A_arr.copy()) + ''' 测试误差 + from matplotlib import pyplot + label_list=['x','y','z','vx','vy','vz'] + color_list=['r','g','b','gold','gray','pink'] + pyplot.figure() + for i in range(6): + Y = state_arr[:, i] + Y_predict=self.model_f[i](X) + pyplot.subplot(int("23{}".format(i+1))) + d=Y-Y_predict + pyplot.plot(X,d,label=label_list[i],color=color_list[i]) + pyplot.title("max:{}".format(np.max(d))) + #self.model_f.append(interpolate.interp1d(X,Y,kind='cubic',fill_value='extrapolate')) + pyplot.legend() + pyplot.show() + ''' + return self.A_arr + else: + self.A_arr = None + return None + + def SatelliteSpaceState(self, time_float): + ''' + 逐像素求解 + 根据时间戳,返回对应时间的卫星的轨迹状态,会自动计算与起算时间之差 + args: + time_float:时间戳 + return: + State_list:[time,Xp,Yp,Zp,Vx,Vy,Vz] + ''' + if self.model_f is None: + return None + + result_arr=np.zeros((1,7)) + + time_float = time_float - self.starttime + result_arr[0,0]=time_float + #time_arr[0, 4] = time_arr[0, 3] * time_float ** 4 + time_float=np.array([1,time_float,time_float**2,time_float**3,time_float**4]).reshape(1,5) + result_arr=np.matmul(time_float,self.A_arr) + return [time_float,result_arr] + + def getSatelliteSpaceState(self, time_array): + ''' + 矩阵求解 + 根据时间戳矩阵,返回对应时刻的卫星空间状态(位置,速度),且会自动计算与起算时间之差 + args: + time_array:nparray nx1 时间戳 + return: + SatellitSpaceStateArray:nparray nx6 状态信息 + ''' + if self.model_f is None: + return None # 返回None,表示没有结果 + if self.polynum==4: + n=time_array.shape[0] + result_arr_=np.zeros((n,6),dtype=np.float64) + time_float = time_array - self.starttime + time_float=time_float.reshape(-1) # nx1 + time_arr=np.ones((time_float.shape[0],5)) # nx5 + time_arr[:,1]=time_float + time_arr[:,2]=time_float**2 + time_arr[:,3]=time_float**3 + time_arr[:,4]=time_float**4 + result_arr_=np.matmul(time_arr,self.A_arr) # nx5 5x6 + #time_arr[0, 4] = time_arr[0, 3] * time_float ** 4 + #result_arr=result_arr_ + return result_arr_ # 位置矩阵 + else: + n=time_array.shape[0] + result_arr_=np.zeros((n,6),dtype=np.float64) + time_float = time_array - self.starttime + time_float=time_float.reshape(-1) # nx1 + time_arr=np.ones((time_float.shape[0],self.polynum+1)) # nx5 + time_arr[:,1]=time_float + result_arr_=np.matmul(time_arr,self.A_arr) # nx5 5x6 + #time_arr[0, 4] = time_arr[0, 3] * time_float ** 4 + #result_arr=result_arr_ + return result_arr_ # 位置矩阵 + + +def ReconstructionSatelliteOrbit(GPSPoints_list, starttime): + ''' + 构建卫星轨道 + args: + GPSPoints_list:卫星轨道点 + starttime:起算时间 + ''' + if len(GPSPoints_list) > 10: + SatelliteOrbitModel = SatelliteOrbitFitPoly() + if SatelliteOrbitModel.ReconstructionSatelliteOrbit(GPSPoints_list, starttime=starttime) is None: + return None + return SatelliteOrbitModel + elif len(GPSPoints_list)==2: + SatelliteOrbitModel = SatelliteOrbitFitPoly() + if SatelliteOrbitModel.ReconstructionSatelliteOrbit(GPSPoints_list, starttime=starttime) is None: + return None + return SatelliteOrbitModel + + + +class DEMProcess(object): + def __init__(self): + pass + + @staticmethod + def get_extent(fn): + ''' + 原文链接:https://blog.csdn.net/XBR_2014/article/details/85255412 + ''' + ds = gdal.Open(fn) + rows = ds.RasterYSize + cols = ds.RasterXSize + # 获取图像角点坐标 + gt = ds.GetGeoTransform() + minx = gt[0] + maxy = gt[3] + maxx = gt[0] + gt[1] * rows + miny = gt[3] + gt[5] * cols + return (minx, maxy, maxx, miny) + + @staticmethod + def img_mosaic(in_files, out_dem_path): + # 通过两两比较大小,将最终符合条件的四个角点坐标保存 + # 即为拼接图像的四个角点坐标 + minX, maxY, maxX, minY = DEMProcess.get_extent(in_files[0]) + for fn in in_files[1:]: + minx, maxy, maxx, miny = DEMProcess.get_extent(fn) + minX = min(minX, minx) + maxY = max(maxY, maxy) + maxX = max(maxX, maxx) + minY = min(minY, miny) + + # 获取输出图像的行列数 + in_ds = gdal.Open(in_files[0]) + bands_num = in_ds.RasterCount + gt = in_ds.GetGeoTransform() + rows = int((maxX - minX) / abs(gt[5])) + cols = int((maxY - minY) / gt[1]) + + # 判断栅格数据的数据类型 + datatype = gdal.GDT_UInt16 + + # 创建输出图像 + driver = gdal.GetDriverByName('GTiff') + out_dem = os.path.join(out_dem_path, 'mosaic0.tif') + out_ds = driver.Create(out_dem, cols, rows, bands_num, datatype) + out_ds.SetProjection(in_ds.GetProjection()) + + gt = list(in_ds.GetGeoTransform()) + gt[0], gt[3] = minX, maxY + out_ds.SetGeoTransform(gt) + + for fn in in_files: + in_ds = gdal.Open(fn) + x_size = in_ds.RasterXSize + y_size = in_ds.RasterYSize + trans = gdal.Transformer(in_ds, out_ds, []) + success, xyz = trans.TransformPoint(False, 0, 0) + x, y, z = map(int, xyz) + for i in range(1, bands_num + 1): + data = in_ds.GetRasterBand(i).ReadAsArray() + out_band = out_ds.GetRasterBand(i) + out_data = out_band.ReadAsArray(x, y, x_size, y_size) + data = np.maximum(data, out_data) + out_band.WriteArray(data, x, y) + + del in_ds, out_band, out_ds + + @staticmethod + def unzip_file(zip_file_path, out_path): + # 获取压缩文件所在的目录 + out_path_merg = os.path.join(out_path, 'dem') + os.mkdir(out_path_merg) + + para_value_list = zip_file_path.split(";") + for n in para_value_list: + with zipfile.ZipFile(n, 'r') as zip_ref: + # 解压到和压缩文件同名的文件夹中 + zip_ref.extractall(out_path_merg) + + # 返回解压后文件夹的路径 + # unzipped_folder_path = os.path.join(out_path, os.path.splitext(os.path.basename(zip_file_path))[0]) + return out_path_merg + + @staticmethod + def dem_clip(OutFilePath, DEMFilePath, SelectArea): + ''' + 根据选择范围裁剪DEM,并输出 + agrs: + outFilePath:裁剪DEM输出地址 + DEMFilePath:被裁减DEM地址 + SelectArea:list [(xmin,ymax),(xmax,ymin)] 框选范围 左上角,右下角 + ''' + DEM_ptr = gdal.Open(DEMFilePath) + DEM_GeoTransform = DEM_ptr.GetGeoTransform() # 读取影像的投影变换 + DEM_InvGeoTransform = gdal.InvGeoTransform(DEM_GeoTransform) + SelectAreaArrayPoints = [gdal.ApplyGeoTransform(DEM_InvGeoTransform, p[0], p[1]) for p in SelectArea] + SelectAreaArrayPoints = list(map(lambda p: (int(p[0]), int(p[1])), SelectAreaArrayPoints)) # 确定坐标 + + [(ulx, uly), (brx, bry)] = SelectAreaArrayPoints + rowCount, colCount = bry - uly, brx - ulx + + # 输出DEM的桌面坐标转换 + Out_Transfrom = list(DEM_GeoTransform) + Out_Transfrom[0] = SelectArea[0][0] + Out_Transfrom[3] = SelectArea[0][1] + + # 构建输出DEM + Bands_num = DEM_ptr.RasterCount + gtiff_driver = gdal.GetDriverByName('GTiff') + datatype = gdal.GDT_UInt16 + out_dem = gtiff_driver.Create(OutFilePath, colCount, rowCount, Bands_num, datatype) + out_dem.SetProjection(DEM_ptr.GetProjection()) + out_dem.SetGeoTransform(Out_Transfrom) + + for i in range(1, Bands_num + 1): + data_band = DEM_ptr.GetRasterBand(i) + out_band = out_dem.GetRasterBand(i) + data = data_band.ReadAsArray(ulx, uly, colCount, rowCount) + out_band.WriteArray(data) + del out_dem + + @staticmethod + def dem_merged(in_dem_path, meta_file_path, out_dem_path): + ''' + DEM重采样函数,默认坐标系为WGS84 + agrs: + in_dem_path: 输入的DEM文件夹路径 + meta_file_path: 输入的xml元文件路径 + out_dem_path: 输出的DEM文件夹路径 + ''' + # 读取文件夹中所有的DEM + dem_file_paths=[os.path.join(in_dem_path,dem_name) for dem_name in os.listdir(in_dem_path) if dem_name.find(".tif")>=0 and dem_name.find(".tif.")==-1] + spatialreference=osr.SpatialReference() + spatialreference.SetWellKnownGeogCS("WGS84") # 设置地理坐标,单位为度 degree # 设置投影坐标,单位为度 degree + spatialproj=spatialreference.ExportToWkt() # 导出投影结果 + # 将DEM拼接成一张大图 + mergeFile =gdal.BuildVRT(os.path.join(out_dem_path,"mergedDEM_VRT.tif"),dem_file_paths) + out_DEM=os.path.join(out_dem_path,"mergedDEM.tif") + gdal.Warp(out_DEM, + mergeFile, + format="GTiff", + dstSRS=spatialproj, + dstNodata=-9999, + outputType=gdal.GDT_Float32) + time.sleep(3) + #gdal.CloseDir(out_DEM) + return out_DEM + @staticmethod + def dem_resampled(in_dem_path,out_dem_path,samling_f): + in_dem=gdal.Open(in_dem_path,gdalconst.GA_ReadOnly) + width=in_dem.RasterXSize + height=in_dem.RasterYSize + gt=list(in_dem.GetGeoTransform()) + width=width*samling_f + height=height*samling_f + gt=[gt[0],gt[1]/samling_f,gt[2]/samling_f,gt[3],gt[4]/samling_f,gt[5]/samling_f] + driver = gdal.GetDriverByName('GTiff') + output = driver.Create(out_dem_path, width,height, 1,in_dem.GetRasterBand(1).DataType) + output.SetGeoTransform(gt) + output.SetProjection(in_dem.GetProjection()) + # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + gdal.ReprojectImage(in_dem, output, in_dem.GetProjection(), output.GetProjection(), gdalconst.GRA_CubicSpline,0.0,0.0,) + return out_dem_path + @staticmethod + def dem_resampled_RPC(in_dem_path,refrence_img_path,out_dem_path): + in_dem=gdal.Open(in_dem_path,gdalconst.GA_ReadOnly) + refrence_img=gdal.Open(refrence_img_path,gdalconst.GA_ReadOnly) + width=refrence_img.RasterXSize + height=refrence_img.RasterYSize + gt=list(refrence_img.GetGeoTransform()) + driver = gdal.GetDriverByName('GTiff') + output = driver.Create(out_dem_path, width,height, 1,in_dem.GetRasterBand(1).DataType) + output.SetGeoTransform(gt) + output.SetProjection(refrence_img.GetProjection()) + # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + gdal.ReprojectImage(in_dem, output, in_dem.GetProjection(), output.GetProjection(), gdalconst.GRA_CubicSpline,0.0,0.0,) + return out_dem_path + # referencefile = gdal.Open(referencefilefilePath, gdal.GA_ReadOnly) + # referencefileProj = referencefile.GetProjection() + # referencefileTrans = referencefile.GetGeoTransform() + # bandreferencefile = referencefile.GetRasterBand(1) + # Width= referencefile.RasterXSize + # Height = referencefile.RasterYSize + # nbands = referencefile.RasterCount + # # 创建重采样输出文件(设置投影及六参数) + # driver = gdal.GetDriverByName('GTiff') + # output = driver.Create(outputfilePath, Width,Height, nbands, bandreferencefile.DataType) + # output.SetGeoTransform(referencefileTrans) + # output.SetProjection(referencefileProj) + # # 参数说明 输入数据集、输出文件、输入投影、参考投影、重采样方法(最邻近内插\双线性内插\三次卷积等)、回调函数 + # gdal.ReprojectImage(inputrasfile, output, inputProj, referencefileProj, gdalconst.GRA_Bilinear,0.0,0.0,) + + +class Orthorectification(object): + """ + 正射校正模块类 + """ + def __init__(self, configPath="./config.ymal") -> None: + super().__init__() + # 常量声明 + # 加载配置文件 + d=os.listdir(".") + with open(configPath, 'r', encoding='utf-8') as f: + const = f.read() + self.config = yaml.load(const, Loader=yaml.FullLoader) + self.config['SatelliteOribit']['StartTime'] = datetime.datetime.strptime( + self.config['SatelliteOribit']['StartTime']['Value'], + self.config['SatelliteOribit']['StartTime']['format']).timestamp() # 转化成UTC时间格式 + self.R_e = self.config['SatelliteOribit']['ReferenceSpheroid']['Re'] # m + self.R_p = self.config['SatelliteOribit']['ReferenceSpheroid']['Rp'] # m + self.w_e = self.config['SatelliteOribit']['ReferenceSpheroid']['we'] # rad/s + + def ParseHearderFile(self, HeaderFilePath_str): + """ + 解析头文件,返回计算所需要的必要信息。 + args: + HeaderFilePath_str: 头文件地址 + return: + HeaderFileInfomation_json: 头文件信息包 + """ + + with open(HeaderFilePath_str, 'r', encoding='utf-8') as fp: + HeaderFile_dom_str = fp.read() + HeaderFile_dom = xmltodict.parse(HeaderFile_dom_str) # 将XML转成json文本 + HeaderFile_dom_json = json.loads(json.dumps(HeaderFile_dom)) # 将json字符串,转成json对象(对应于python中的dict) + # 获取头文件 + HeaderInformation_json = {} + # 解析轨道节点,假定是GPS节点 + HeaderInformation_json['GPS'] = [] + # GPS 解析信息 + GPSNode_Path = self.config['GPS']['GPSNode_Path'] + GPSNodeNames_list = self.config['GPS']['NodeInfomation_Name'] + GPSTime_Format = self.config['GPS']['Time_format'] + GPSPoints = FindInfomationFromJson(HeaderFile_dom_json, GPSNode_Path) + + for GPSPoint in GPSPoints: + GPSPoint = [ + datetime.datetime.strptime(GPSPoint[GPSNodeNames_list[0]], GPSTime_Format).timestamp(), # TimeStamp + float(GPSPoint[GPSNodeNames_list[1]]), # Xp + float(GPSPoint[GPSNodeNames_list[2]]), # Yp + float(GPSPoint[GPSNodeNames_list[3]]), # Zp + float(GPSPoint[GPSNodeNames_list[4]]), # Vx + float(GPSPoint[GPSNodeNames_list[5]]), # Vy + float(GPSPoint[GPSNodeNames_list[6]])] # VZ + HeaderInformation_json['GPS'].append(GPSPoint) + + # 提取成像相关信息 + HeaderInformation_json['ImageInformation'] = {} + # 1、开始成像时间 + HeaderInformation_json['ImageInformation']['StartTime'] = datetime.datetime.strptime( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['StartImageTime']['NodePath']), + self.config['imageinfo']['StartImageTime']['Format'] + ).timestamp() + # 2、结束成像时间 + HeaderInformation_json['ImageInformation']['EndTime'] = datetime.datetime.strptime( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['EndImageTime']['NodePath']), + self.config['imageinfo']['StartImageTime']['Format'] + ).timestamp() + # 3、影像的宽高 + HeaderInformation_json['ImageInformation']['height'] = int( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ImageHeight']['NodePath'])) + HeaderInformation_json['ImageInformation']['width'] = int( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ImageWidth']['NodePath'])) + # 4、影像的近斜距 + HeaderInformation_json['ImageInformation']['NearRange'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['NearRange']['NodePath'])) + # 5、入射角 + HeaderInformation_json['ImageInformation']['incidenceAngle'] = { + 'NearRange': float(FindInfomationFromJson(HeaderFile_dom_json, + self.config['imageinfo']['incidenceAngle']['NearRange'][ + 'NodePath'])), + 'FarRange': float(FindInfomationFromJson(HeaderFile_dom_json, + self.config['imageinfo']['incidenceAngle']['FarRange'][ + 'NodePath'])) + } + # 6、成像时刻影像带宽 + HeaderInformation_json['ImageInformation']['bandWidth'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['bandWidth']['NodePath'])) + # 7、多普勒质心常数 + DopplerCentroidCoefficients_list = FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo'][ + 'DopplerCentroidCoefficients']['NodePath']) + HeaderInformation_json['ImageInformation']['DopplerCentroidCoefficients'] = [ + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][0]]), + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][1]]), + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][2]]), + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][3]]), + float(DopplerCentroidCoefficients_list[ + self.config['imageinfo']['DopplerCentroidCoefficients']['DopplerCentroidCoefficients_Name'][4]]), + ] + # 8、波长 + HeaderInformation_json['ImageInformation']['lambda'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['lambda']['NodePath'])) + # 9、中心像元对应的中心经纬度 + CenterPoint = FindInfomationFromJson(HeaderFile_dom_json, + self.config['imageinfo']['CenterImagePositon']['NodePath']) + HeaderInformation_json['ImageInformation']['centerPosition'] = [ + float(CenterPoint[self.config['imageinfo']['CenterImagePositon']['Value'][0]]), # 纬度 + float(CenterPoint[self.config['imageinfo']['CenterImagePositon']['Value'][1]]), # 经度 + ] + # 10、多普勒参数参考时间 + HeaderInformation_json['ImageInformation']['DopplerParametersReferenceTime'] = float( + FindInfomationFromJson(HeaderFile_dom_json, + self.config['imageinfo']['DopplerParametersReferenceTime']['NodePath'])) + # 11、参考斜距 + HeaderInformation_json['ImageInformation']['refRange'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ReferenceRange']['NodePath'])) + # 12、PRF + HeaderInformation_json['PRF'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['PRF']['NodePath'])) + HeaderInformation_json['Fs'] = float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['Fs']['NodePath'])) + # 13、中心时间 + HeaderInformation_json['ImageInformation']['CenterTime'] = datetime.datetime.strptime( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['CenterImageTime']['NodePath']), + self.config['imageinfo']['CenterImageTime']['Format'] + ).timestamp() + #14. 影像的空间间隔分辨率 + HeaderInformation_json['ImageInformation']['ImageWidthSpace']=float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ImageWidthSpace']['NodePath'])) + + HeaderInformation_json['ImageInformation']['ImageHeightSpace']=float( + FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['ImageHeightSpace']['NodePath'])) + + # 部分需要解析 + self.lamda=HeaderInformation_json['ImageInformation']['lambda'] + self.PRF=HeaderInformation_json['PRF'] + self.imgwidth=HeaderInformation_json['ImageInformation']['width'] + self.imgheight=HeaderInformation_json['ImageInformation']['height'] + self.imgstarttime=HeaderInformation_json['ImageInformation']['StartTime'] + self.widthspace=HeaderInformation_json['ImageInformation']['ImageWidthSpace'] + self.heightspace=HeaderInformation_json['ImageInformation']['ImageHeightSpace'] + self.refrange=HeaderInformation_json['ImageInformation']['refRange'] + self.nearrange=HeaderInformation_json['ImageInformation']['NearRange'] + self.Fs=HeaderInformation_json['Fs'] # Mhz + return HeaderInformation_json + pass + + def LLA_to_XYZ(self, latitude, longitude, altitude): + """ + 经纬度转大地坐标系 + args: + latitude:纬度 + longitude:经纬 + altitude:海拔高程 + refrence: https://blog.csdn.net/dulingwen/article/details/96868530 + """ + # 经纬度的余弦值 + cosLat = math.cos(latitude * math.pi / 180) + sinLat = math.sin(latitude * math.pi / 180) + cosLon = math.cos(longitude * math.pi / 180) + sinLon = math.sin(longitude * math.pi / 180) + + # WGS84坐标系的参数 + rad = 6378137.0 # 地球赤道平均半径(椭球长半轴:a) + f = 1.0 / 298.257224 # WGS84椭球扁率 :f = (a-b)/a + C = 1.0 / math.sqrt(cosLat * cosLat + (1 - f) * (1 - f) * sinLat * sinLat) + S = (1 - f) * (1 - f) * C + h = altitude + + # 计算XYZ坐标 + X = (rad * C + h) * cosLat * cosLon + Y = (rad * C + h) * cosLat * sinLon + Z = (rad * S + h) * sinLat + + return np.array([X, Y, Z]).reshape(1, 3) + + def XYZ_to_LLA(self, X, Y, Z): + """ + 大地坐标系转经纬度 + 适用于WGS84坐标系 + args: + x,y,z + return: + lat,lon,altitude + """ + # WGS84坐标系的参数 + a = 6378137.0 # 椭球长半轴 + b = 6356752.314245 # 椭球短半轴 + ea = np.sqrt((a ** 2 - b ** 2) / a ** 2) + eb = np.sqrt((a ** 2 - b ** 2) / b ** 2) + p = np.sqrt(X ** 2 + Y ** 2) + theta = np.arctan2(Z * a, p * b) + + # 计算经纬度及海拔 + longitude = np.arctan2(Y, X) + latitude = np.arctan2(Z + eb ** 2 * b * np.sin(theta) ** 3, p - ea ** 2 * a * np.cos(theta) ** 3) + N = a / np.sqrt(1 - ea ** 2 * np.sin(latitude) ** 2) + altitude = p / np.cos(latitude) - N + + return np.array([np.degrees(latitude), np.degrees(longitude), altitude]) + + def getRByColumnCode(self, c): + """ + 根据列号计算斜距 + args: + c: 列号 + """ + return self.R0 + c * self.delta_R + pass + + def getTimeByLineCode(self, r): + """ + 根据行号计算成像时间 + args: + r: 行号 + """ + return np.matmul( + np.concatenate([np.array([r ** i]).reshape(1, 1) for i in range(self.r2t_A_arr.shape[0])], axis=1), + self.r2t_A_arr) + + def ReconstuctionTimesOflyDirectionPositionModel(self, timePoints_list): + """ + 构建飞行向坐标与时间的转换模型,注意这里没有调整时间的起算点。 + args: + timePoints_list:时间点坐标 [r,t] + """ + # 根据点数确定模型,最高为3次项模型 + Y = np.zeros((len(timePoints_list), 1)) + X = np.zeros((len(timePoints_list), 1)) + + for i in range(len(timePoints_list)): + Y[i, 0] = timePoints_list[i][1] + X[i, 0] = timePoints_list[i][0] + + if len(timePoints_list) == 2: # 一次项 + X = np.concatenate([np.ones((len(timePoints_list), 1)), X], axis=1) + A = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), Y) + + elif len(timePoints_list) >= 3: # 二次项 + X = np.concatenate([np.ones(len(timePoints_list), 1), X, np.power(X, 2)], axis=1) + A = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), Y) + + elif len(timePoints_list) >= 8: # 三次项 + X = np.concatenate([np.ones(len(timePoints_list), 1), X, np.power(X, 2), np.power(X, 3)], axis=1) + A = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), Y) + + self.r2t_A_arr = A + + def PrepareConvertSystem(self): + """ + 计算常量 + 在数据计算之前,提前处理部分常量信息 + 构建r,c到坐标斜距的计算公式 + """ + self.R0 = self.header_info['ImageInformation']['NearRange'] # 起始斜距/近斜距 + self.ReconstuctionTimesOflyDirectionPositionModel([ + [0, self.header_info['ImageInformation']['StartTime']], + [self.header_info['ImageInformation']['height'] - 1, self.header_info['ImageInformation']['EndTime']] + ]) # 构建坐标到时间的变换,这里仅用两个数据点构建 + self.delta_R = self.widthspace + + + + + def ConvertCoordinary(self): + """ + 批量求解点坐标 + """ + pass + + def Orthorectification(self, FilePath_str): + """ + 正射校正组件 + 正射校正整体可以分为两个步骤: + Step 1:计算出栅格坐标对应的真实的大地坐标系坐标 + Step 2:根据大地坐标系将影像重采样到大地坐标系空间中 + args: + FilePath_str:影像所在文件夹 + """ + # 分离需要校正对象 + file_name_list = os.listdir(FilePath_str) + header_name = [file_name for file_name in file_name_list if + file_name.rfind(".meta.xml") == len(file_name) - len('.meta.xml')][0] # xml头文件,存储在list中 + tiff_name = [file_name for file_name in file_name_list if + file_name.rfind(".tiff") == len(file_name) - len('.tiff')] # tif影像文件,存储在list中 + # 解析头文件 + self.header_info = self.ParseHearderFile(os.path.join(FilePath_str, header_name)) + # 构建轨道模型 + self.SatelliteOrbitModel = ReconstructionSatelliteOrbit(self.header_info['GPS'], + starttime=self.config['SatelliteOribit']['StartTime']) + # 求解模型前计算常数变换模型 + self.PrepareConvertSystem() + # 批量计算空间坐标 + self.ConvertCoordinary() + +''' +卫星轨道定位法,修改为静态类 +间接定法法,模拟SAR方法的静态方法,与类独立,方便使用多进程 +''' +def getSatelliteSpaceState(time_array,SatelliteOrbitModelstarttime,SatelliteOrbitModelParameters=None,SatelliteOrbitModelName="多项式"): + if SatelliteOrbitModelName=="多项式": + if SatelliteOrbitModelParameters is None: + return None # 返回None,表示没有结果 + n=time_array.shape[0] + result_arr_=np.zeros((n,6),dtype=np.float64) + time_float = time_array - SatelliteOrbitModelstarttime + time_float=time_float.reshape(-1) # nx1 + time_arr=np.ones((time_float.shape[0],5)) # nx5 + time_arr[:,1]=time_float + time_arr[:,2]=time_float**2 + time_arr[:,3]=time_float**3 + time_arr[:,4]=time_float**4 + result_arr_=np.matmul(time_arr,SatelliteOrbitModelParameters) # nx5 5x6 + #time_arr[0, 4] = time_arr[0, 3] * time_float ** 4 + #result_arr=result_arr_ + return result_arr_ # 位置矩阵 + +''' +双线性重采样 +''' +def LinearSampling(ori_dem,sampling_f,offset_row=1,offset_col=1): + ''' + 简化双线性重采样模型 + 根据重采样率对原始对象进行重采样。 + 双线性重采样,这里去栅格所涉及的四个角点作为起算点。 + 模型示意图: + + y1 r1 y2 + + r + + y3 r2 y4 + args: + ori_dem:原始DEM + sampling_f:采样率 int + return: + new_dem:采样结果 + ''' + # 原始dem的行列号 + ori_height=ori_dem.shape[0]-offset_row + ori_width=ori_dem.shape[1]-offset_col + + # 采样之后的影像的范围大小 + new_height=int(ori_height*sampling_f) + new_width=int(ori_width*sampling_f) + # 获取采样之后的栅格单元对应的原DEM的行列号 + row_index_list=list(range(new_height)) + col_index_list=list(range(new_width)) + + new_dem=np.ones((new_height,new_width)) + row_index_arr=(new_dem.transpose(1,0)*row_index_list).transpose(1,0) + col_index_arr=new_dem*col_index_list + row_index_arr=row_index_arr*1.0/sampling_f + col_index_arr=col_index_arr*1.0/sampling_f + # 初始化 + new_dem=0 + # 计算权重 + row_index_arr=row_index_arr.reshape(-1) + col_index_arr=col_index_arr.reshape(-1) + last_row_index_arr=np.floor(row_index_arr).astype(np.int32) + next_row_index_arr=np.ceil(row_index_arr).astype(np.int32) + last_col_index_arr=np.floor(col_index_arr).astype(np.int32) + next_col_index_arr=np.ceil(col_index_arr).astype(np.int32) + # 双线性重采样模型示意图, + # y1 r1 y2 + # + # r + # + # y3 r2 y4 + # 计算重采样 + + R1=ori_dem[last_row_index_arr,last_col_index_arr]*(col_index_arr-last_col_index_arr)+ori_dem[last_row_index_arr,next_col_index_arr]*(next_col_index_arr-col_index_arr) + R2=ori_dem[next_row_index_arr,last_col_index_arr]*(col_index_arr-last_col_index_arr)+ori_dem[next_row_index_arr,next_col_index_arr]*(next_col_index_arr-col_index_arr) + new_dem=R1*(row_index_arr-last_row_index_arr)+R2*(next_row_index_arr-row_index_arr) # 双线性重采样 + new_dem=new_dem.reshape(new_height,new_width) + del R1,R2,next_row_index_arr,next_col_index_arr,last_row_index_arr,last_col_index_arr,row_index_arr,col_index_arr + result_dem=np.ones((new_height,new_width,3)) + result_dem[:,:,2]=new_dem + result_dem[:,:,0]=(np.ones((new_height,new_width)).transpose(1,0)*list(range(new_height))).transpose(1,0) + result_dem[:,:,1]=np.ones((new_height,new_width))*col_index_list + + return result_dem + + pass + + +class IndirectOrthorectification(Orthorectification): + """ + 间接定位法 + """ + def outParameterText(self,outparameter_path): + ''' + 生成配置文件 + ''' + with open(outparameter_path,"w",encoding='utf-8') as fp: + # 输出文件 + fp.write("{}\n".format(self.header_info['ImageInformation']['height'])) + fp.write("{}\n".format(self.header_info['ImageInformation']['width'])) + fp.write("{}\n".format(self.header_info['ImageInformation']['NearRange'])) # 近斜距 + fp.write("{}\n".format(self.header_info['ImageInformation']['incidenceAngle']['NearRange'])) # 近斜距入射角 + fp.write("{}\n".format(self.header_info['ImageInformation']['incidenceAngle']['FarRange'])) # 远距入射角 + fp.write("{}\n".format(self.config['LightSpeed'])) # 光速 + fp.write("{}\n".format(self.header_info['ImageInformation']['lambda'])) + fp.write("{}\n".format(self.header_info['ImageInformation']['StartTime'])) + fp.write("{}\n".format(self.header_info['PRF'])) + fp.write("{}\n".format(self.refrange)) + fp.write("{}\n".format(self.Fs)) + fp.write("{}\n".format(self.header_info['ImageInformation']['DopplerParametersReferenceTime'])) + # fp.write("{}\n".format(self.widthspace)) + + # 多普勒系数 + fp.write("{}\n".format(len(self.header_info['ImageInformation']['DopplerCentroidCoefficients']))) + for i in range(len(self.header_info['ImageInformation']['DopplerCentroidCoefficients'])): + fp.write("{}\n".format(self.header_info['ImageInformation']['DopplerCentroidCoefficients'][i])) + fp.write("{}\n".format(1)) + fp.write("{}\n".format(self.SatelliteOrbitModel.polynum)) + fp.write("{}\n".format(self.SatelliteOrbitModel.get_starttime())) + # X + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,0])) + # Y + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,1])) + # Z + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,2])) + # Vx + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,3])) + # Vy + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,4])) + # vz + for i in range(self.SatelliteOrbitModel.polynum+1): + fp.write("{}\n".format(self.SatelliteOrbitModel.A_arr[i,5])) + # UTC参数 + startTime=time.localtime(self.header_info['ImageInformation']["StartTime"]) + fp.write("{}\n".format(startTime.tm_year)) + fp.write("{}\n".format(startTime.tm_mon)) + fp.write("{}".format(startTime.tm_mday)) + self.paramterFile_path=outparameter_path + + def IndirectOrthorectification(self, FilePath_str,workspace_dir): + """ + 正射校正组件 + 正射校正整体可以分为两个步骤: + Step 1:计算出栅格坐标对应的真实的大地坐标系坐标 + Step 2:根据大地坐标系将影像重采样到大地坐标系空间中 + args: + FilePath_str:影像所在文件夹 + dem_resampled_path:重采样后的DEM路径 + lut_tif_path:输出的r,c,ti数据影像 + work_temp_path: 输出的临时文件地址路径,方便存放计算临时文件 + """ + # 分离需要校正对象 + file_name_list = os.listdir(FilePath_str) + # header_name = [file_name for file_name in file_name_list if + # file_name.rfind(".meta.xml") == len(file_name) - len('.meta.xml')][0] # 头文件 + header_name = [file_name for file_name in file_name_list if + file_name.rfind(".xml") == len(file_name) - len('.xml')][0] # 头文件 + tiff_name = [file_name for file_name in file_name_list if + file_name.rfind(".tiff") == len(file_name) - len('.tiff')] # 影像文件 + tiff_name = [file_name for file_name in file_name_list if + file_name.rfind(".tiff") == len(file_name) - len('.tiff')] # 影像文件 + # 解析头文件 + self.header_info = self.ParseHearderFile(os.path.join(FilePath_str, header_name)) + # 构建轨道模型 + self.SatelliteOrbitModel = ReconstructionSatelliteOrbit(self.header_info['GPS'], + starttime=self.header_info['ImageInformation']['CenterTime']) # 构建卫星轨道模型,取第0个节点的时间 + # 获取所有轨道节点时间 + gpslist=np.array(self.header_info['GPS']).reshape(-1,7) + # 验证轨道模型 + statepoints=self.SatelliteOrbitModel.getSatelliteSpaceState(gpslist[:,0].reshape(-1)) + # 计算轨道差距 + statepoints_dist=statepoints-gpslist[:,1:] + statepoints_dist_line=statepoints_dist[:,:3] + statepoints_dist_line=np.sum(statepoints_dist_line**2,axis=1)**0.5 + + statepoints_dist_ver=np.sum(statepoints_dist[:,3:]**2,axis=1)**0.5 + print("sata Point distance:\t{}\t -\t{}\t ".format(np.min(statepoints_dist_line),np.max(statepoints_dist_line))) + + # 求解模型前计算常数变换模型 + self.PrepareConvertSystem() + self.outParameterText(os.path.join(workspace_dir,"orth_para.txt")) + + def preCaldem_sar_rc(self,dem_path,ori_sar_path,work_path,taget_path): + #.\SIMOrthoProgram-S-SAR\x64\Release\SIMOrthoProgram-S-SAR.exe 1 parameter_path dem_path ori_sar_path work_path taget_path + # SIMOrthoProgram-S-SAR.exe 1 in_parameter_path in_dem_path in_ori_sar_path in_work_path in_taget_path + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6} {7}".format(exe_path,1,self.paramterFile_path,dem_path,ori_sar_path,work_path ,taget_path,"\\") + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def getRPC_incidenceAngle(self,in_dem_path,in_rpc_rc_path,out_rpc_dem_path,out_incident_angle_path,out_local_incident_angle_path): + ''' + std::cout << "mode 4: get RPC incident and local incident angle sar model:"; + std::cout << "SIMOrthoProgram-S-SAR.exe 4 in_parameter_path in_dem_path in_rpc_rc_path out_rpc_dem_path out_incident_angle_path out_local_incident_angle_path"; + + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6} {7}".format(exe_path,4,self.paramterFile_path,in_dem_path,in_rpc_rc_path,out_rpc_dem_path,out_incident_angle_path,out_local_incident_angle_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def getRPC_incidenceAngle_lon_lat(self,in_dem_path,in_gec_lon_lat_path,work_path,taget_path,out_incident_angle_path,out_local_incident_angle_path,out_incangle_geo_path,out_localincangle_geo_path): + ''' + std::cout << "mode 7: get RPC incident and local incident angle sar model:"; + std::cout << "SIMOrthoProgram-S-SAR.exe 7 in_parameter_path in_dem_path in_gec_lon_lat_path work_path taget_path out_incident_angle_path out_local_incident_angle_path"; + + ''' + cwd_path = os.getcwd() + print("cwd_path:" + cwd_path) + exe_path=r"{}\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe".format(cwd_path) + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10}".format(exe_path,7,self.paramterFile_path,in_dem_path,in_gec_lon_lat_path,work_path,taget_path,out_incident_angle_path,out_local_incident_angle_path,out_incangle_geo_path,out_localincangle_geo_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def get_incidenceAngle(self,in_dem_path,in_rc_wgs84_path,out_incident_angle_path,out_local_incident_angle_path): + ''' + std::cout << "mode 2: get incident angle and local incident angle by rc_wgs84 and dem and statellite model:\n"; + std::cout << "SIMOrthoProgram-S-SAR.exe 2 in_parameter_path in_dem_path in_rc_wgs84_path out_incident_angle_path out_local_incident_angle_path"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6}".format(exe_path,2,self.paramterFile_path,in_dem_path,in_rc_wgs84_path,out_incident_angle_path,out_local_incident_angle_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + def get_GEC_incidenceAngle(self,in_dem_path,in_gec_lon_lat_path,out_incident_angle_path,out_local_incident_angle_path): + ''' + std::cout << "mode 6: get gec incident and local incident angle sar model:"; + std::cout << "SIMOrthoProgram-S-SAR.exe 6 in_parameter_path in_dem_path in_gec_lon_lat_path out_incident_angle_path out_local_incident_angle_path"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5} {6}".format(exe_path,6,self.paramterFile_path,in_dem_path,in_gec_lon_lat_path,out_incident_angle_path,out_local_incident_angle_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + def get_GTC_SAR(self,in_rc_wgs84_path,in_ori_sar_path,out_orth_sar_path,modecode=3): + ''' + std::cout << "mode 3: interpolation(cubic convolution) orth sar value by rc_wgs84 and ori_sar image and model:\n "; + std::cout << "SIMOrthoProgram-S-SAR.exe 3 in_parameter_path in_rc_wgs84_path in_ori_sar_path out_orth_sar_path"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path,modecode,self.paramterFile_path,in_rc_wgs84_path,in_ori_sar_path,out_orth_sar_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def inter_Range2Geo(self,lon_lat_path , data_tiff , grid_path , space): + ''' + # std::cout << "mode 10"; + # std::cout << "SIMOrthoProgram-S-SAR.exe 10 lon_lat_path data_tiff grid_path space"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path,10,lon_lat_path , data_tiff , grid_path , space) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def calInterpolation_cubic_Wgs84_rc_sar_sigma(self, parameter_path, dem_rc, in_sar, out_sar): + ''' + # std::cout << "mode 9"; + # std::cout << "SIMOrthoProgram-S-SAR.exe 9 in_parameter_path in_rc_wgs84_path in_ori_sar_path out_orth_sar_path"; + ''' + exe_path = r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd = r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path, 9, parameter_path, + dem_rc, in_sar, out_sar) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def calInterpolation_bil_Wgs84_rc_sar_sigma(self, parameter_path, dem_rc, in_sar, out_sar): + ''' + # std::cout << "mode 11"; + # std::cout << "SIMOrthoProgram-S-SAR.exe 11 in_parameter_path in_rc_wgs84_path in_ori_sar_path out_orth_sar_path"; + ''' + exe_path = r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd = r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path, 11, parameter_path, + dem_rc, in_sar, out_sar) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def getPowerTif(self,in_ori_path,out_power_path): + ''' + std::cout << "mode 5: convert ori tiff to power tiff:"; + std::cout << "SIMOrthoProgram-S-SAR.exe 5 in_ori_path out_power_path"; + ''' + exe_path=r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd=r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} ".format(exe_path,5,in_ori_path,out_power_path) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def test_PSTN(self): + landpoint=np.array([-1945072.5,5344083.0,2878316.0]).reshape(1,3) + # 间接定位法所需的参数 + Doppler_d = np.array(self.header_info['ImageInformation']['DopplerCentroidCoefficients']).reshape(-1, 1) + LightSpeed = self.config['LightSpeed'] + T0 = self.header_info['ImageInformation']['refRange'] * 2 / LightSpeed + lamda = self.header_info['ImageInformation']['lambda'] + StartTime = self.header_info['ImageInformation']['StartTime'] + PRF = self.header_info['PRF'] + R0 = self.header_info['ImageInformation']['NearRange'] + r,c,ti=self.PSTN_block(landpoint, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0) + + pass + def findInitPoint(self,sim_mask,dem_gt,sim_r_tif,sim_c_tif,sampling_f): + + # 根据采样点,大致计算出影像的仿射矩阵,并以此进行外扩 + sampling_f=sampling_f//10 + [r_ids,c_ids]=np.where(sim_mask==1) + sim_r_ids=sim_r_tif[r_ids,c_ids] + sim_c_ids=sim_c_tif[r_ids,c_ids] + X=dem_gt[0]+dem_gt[1]*c_ids+dem_gt[2]*r_ids + Y=dem_gt[3]+dem_gt[4]*c_ids+dem_gt[5]*r_ids + # 首先计算X 变换式 + sim_r_ids=sim_r_ids.reshape(-1,1) + sim_c_ids=sim_c_ids.reshape(-1,1) + X=X.reshape(-1,1) + Y=Y.reshape(-1,1) + point_count=sim_c_ids.shape[0] + X_input=np.ones((point_count,3)) + X_input[:,1]=sim_c_ids[:,0] + X_input[:,2]=sim_r_ids[:,0] + A_X=np.matmul(np.matmul(np.linalg.inv(np.matmul(X_input.T,X_input)), X_input.T), X).reshape(-1,1) + A_Y=np.matmul(np.matmul(np.linalg.inv(np.matmul(X_input.T,X_input)), X_input.T), Y).reshape(-1,1) + + sar_gt=[A_X[0,0],A_X[1,0],A_X[2,0],A_Y[0,0],A_Y[1,0],A_Y[2,0]] + width=self.header_info['ImageInformation']['width'] + height=self.header_info['ImageInformation']['height'] + width_f=self.header_info['ImageInformation']['width']/width + height_f=self.header_info['ImageInformation']['height']/height + sar_gt[1]=sar_gt[1]*width_f + sar_gt[2]=sar_gt[2]*height_f + sar_gt[4]=sar_gt[4]*width_f + sar_gt[5]=sar_gt[5]*height_f + # 外扩 + sar_gt[0]=sar_gt[0]+sar_gt[1]*-60+sar_gt[2]*-60 + sar_gt[3]=sar_gt[3]+sar_gt[4]*-60+sar_gt[5]*-60 + + inv_sar_gt=gdal.InvGeoTransform(sar_gt) + for dem_height in [0,sim_mask.shape[0]-1]: + for dem_width in [0,sim_mask.shape[1]-1]: + dem_edge_x=dem_gt[0]+dem_gt[1]*dem_width+dem_gt[2]*dem_height + dem_edge_y=dem_gt[3]+dem_gt[4]*dem_width+dem_gt[5]*dem_height + c_width=inv_sar_gt[0]+inv_sar_gt[1]*dem_edge_x+inv_sar_gt[2]*dem_edge_y + r_height=inv_sar_gt[3]+inv_sar_gt[4]*dem_edge_x+inv_sar_gt[5]*dem_edge_y + if c_width<=0 or r_height<=0: + continue + width=width+120 if width+120=-3000)&(sim_r_tif=0)&(sim_c_tif=0 else 0 + c_min=c_min-len_col if c_min-len_col>=0 else 0 + r_max=r_max+len_row if r_max+len_row=0)&(r_int=0)&(c_int0: # 可以进行行前推 + start_row=1 # 因为外推了一行 + else: # 不可以进行行前推 + start_row=0 # 此时没有外推一行 + if i+block_height_width>=row_count: # 不存在行后推 + if i>0: # 存在行前推, + end_row=start_row+block_row_count-1 + else: # 不存在行前推 + end_row=start_row+block_row_count + else: # 存在行后推 + if i>0: # 存在行前推 + end_row=start_row+block_row_count-2 + else: # 不存在行前推 + end_row=start_row+block_row_count-1 + pass + # 确定列的范围 + if j>0: # 存在列前推 + start_col=1 + else: # 不存在列前推 + start_col=0 + if j+block_height_width>=col_count: # 不存在列后推 + if j>0: # 存在列前推 + end_col=start_col+block_col_count-1 + else: # 不存在列前推 + end_col=start_col+block_col_count + else: # 存在列后推 + if j>0: # 存在列前推 + end_col=start_col+block_col_count-2 + else: # 不存在列前推 + end_col=start_col+block_col_count-1 + pass + return [start_row,start_col,end_row,end_col] + + def CalIntensityResampled(self,TargetPosition,ti,min_theta=0,max_theta=1): + '''计算入射角 + agrs: + TargetPosition: 地面坐标 nxmx3 + ti:对应的卫星空间位置 nxm + return: + Intensity:入射角阵,-9999 不参与运算 + ''' + # 1 + # 2 0 4 + # 3 + # n=(n12+n23+n34+n41)/4 + # n=(n24xn31)/4 + # 计算 n24=n4-n2 + n24=TargetPosition[:,2:,:]-TargetPosition[:,:-2,:] # 4-2 2: 5070x5068 + n24=n24[1:-1,:,:] + # 计算 n31=n1-n3 + n31=TargetPosition[:-2,:,:]-TargetPosition[2:,:,:] # 1-3 5068x5070 + n31=n31[:,1:-1,:] + # 计算坡度平面向量 + N=np.zeros((n31.shape[0],n31.shape[1],n31.shape[2])) + # n24=[a,b,c] + # n31=[d,f,g] + N[:,:,0]=n24[:,:,1]*n31[:,:,2]-n24[:,:,2]*n31[:,:,1] # bg-cf + N[:,:,1]=n24[:,:,2]*n31[:,:,0]-n24[:,:,0]*n31[:,:,2] # cd-ag + N[:,:,2]=n24[:,:,0]*n31[:,:,1]-n24[:,:,1]*n31[:,:,0] # af-bd + N=N*0.25 # 平面坡度向量 + N=N.reshape(-1,3) + del n24,n31 + n=ti.shape[0] + m=ti.shape[1] + # 分块计算 + theta=np.ones((n-2,m-2)).astype(bool) + ti=ti[1:-1,1:-1] + TargetPosition=TargetPosition[1:-1,1:-1] + TargetPosition=TargetPosition.reshape(-1,3) + ti=ti.reshape(-1) + theta=theta.reshape(-1) + # 分块计算 + le_iter=4000 + for i in range(0,theta.shape[0],le_iter): + len_ti=le_iter + if len_ti+i>theta.shape[0]: + len_ti=theta.shape[0]-i + end_i=i+len_ti + # 计算卫星空间坐标 + R_sp = self.SatelliteOrbitModel.getSatelliteSpaceState(ti[i:end_i])[:, :3]-TargetPosition[i:end_i] + # 夹角=arccos((R_sp*N)/(|R_sp|*|N|)) + theta_=np.sum(R_sp*N[i:end_i],axis=1)/(np.sum(R_sp**2,axis=1)*np.sum(N[i:end_i],axis=1)) + theta[i:end_i]=(theta_>min_theta)&(theta_ self.header_info['ImageInformation']['height']+sampling_f*2: + return False,ti[-1,0] + if np.max(c)<-1*sampling_f*2 or np.min(c) > self.header_info['ImageInformation']['width']+sampling_f*2: + return False,ti[-1,0] + return True + + def ConvertCoordinary_test(self, dem_merged_path, sim_out_path,work_temp_path, flag=1): + + print("当前python程序,内存占用 {}G".format(psutil.Process(os.getpid()).memory_info().rss / 1024 / 1024 / 1024)) + """ + 批量求解点坐标的性能改进: + 主要针对数据频繁开关文件读写 + flag:是否想要经纬度转大地坐标系 + """ + start = time.time() + # 间接定位法所需的参数 + Doppler_d = np.array(self.header_info['ImageInformation']['DopplerCentroidCoefficients']).reshape(-1, 1) + LightSpeed = self.config['LightSpeed'] + T0 = self.header_info['ImageInformation']['refRange'] * 2 / LightSpeed + lamda = self.header_info['ImageInformation']['lambda'] + StartTime = self.header_info['ImageInformation']['StartTime'] + PRF = self.header_info['PRF'] + R0 = self.header_info['ImageInformation']['NearRange'] + # 计算采样率 + + # 读取影像 + dem_resampled_tiff = gdal.Open(dem_merged_path) + row_count = dem_resampled_tiff.RasterYSize # 读取图像的行数 + col_count = dem_resampled_tiff.RasterXSize # 读取图像的列数 + im_proj = dem_resampled_tiff.GetProjection() + im_geotrans = list(dem_resampled_tiff.GetGeoTransform()) + gt = im_geotrans # 坐标变换参数 + # 计算采样率 + sampling_f=self.CalSamplingRateOfDEM(dem_resampled_tiff) + + # 创建目标虚拟影像 + SAR_width=self.header_info['ImageInformation']['width'] + SAR_height=self.header_info['ImageInformation']['height'] + + SAR_row_col_array=np.zeros((row_count,col_count,2),np.float32) + + for ii in range(0,row_count,3000): + if ii==row_count: + continue + altii=dem_resampled_tiff.GetRasterBand(1).ReadAsArray(0, ii, col_count, 3000) + if altii is None: + # 长度过长,设置行数 + altii=dem_resampled_tiff.GetRasterBand(1).ReadAsArray(0, ii, col_count, int(row_count-ii)) + pass + h=int(altii.shape[0]) + w=int(altii.shape[1]) + y_pixel=(np.ones((w,h))*range(h)+ii).transpose(1,0) + x_pixel=np.ones((h,w))*range(w) + lat=gt[0]+gt[1]*x_pixel+gt[2]*y_pixel # 经度 + lon=gt[3]+gt[4]*x_pixel+gt[5]*y_pixel # 纬度 + #del x_pixel,y_pixel + #gc.collect() + [X, Y, Z] = OrthoAuxData.LLA2XYZM(lat.reshape(-1,1), lon.reshape(-1,1), altii.reshape(-1,1)) # 计算错误 + TargetPosition = np.ones((int(h*w), 3), dtype=np.float32) + TargetPosition[:, 0] = X.reshape(-1) + TargetPosition[:, 1] = Y.reshape(-1) + TargetPosition[:, 2] = Z.reshape(-1) + r, c, ti = self.PSTN_M(TargetPosition, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0) # 间接定位法,核心求解代码 + + SAR_row_col_array[ii:ii+h,:,0]=r.reshape(-1,col_count) + SAR_row_col_array[ii:ii+h,:,1]=c.reshape(-1,col_count) + gtiff_driver = gdal.GetDriverByName('GTiff') + SAR_row_col=gtiff_driver.Create(sim_out_path.replace(".tif","rc.tif"),col_count,row_count,2,gdal.GDT_Float32) + SAR_row_col.SetGeoTransform(im_geotrans) # 写入仿射变换参数 + SAR_row_col.SetProjection(im_proj) # 写入投影 + # 写入tiff + SAR_row_col.GetRasterBand(1).WriteArray(SAR_row_col_array[:,:,0]) + SAR_row_col.GetRasterBand(2).WriteArray(SAR_row_col_array[:,:,1]) + print(sim_out_path.replace(".tif","rc.tif")) + return sim_out_path.replace(".tif","rc.tif") + pass + + def CalSamplingRateOfDEM(self,DEM_tiff): + '''计算DEM的重采样率f,必须在解析头文件之后,参考陈尔学 博士学位论文 《 星载合成孔径雷达影像正射校正方法研究 》 + args: + DEM_tiff:tif DEM的影像 + return: + f:采样率,向上取整 + ''' + # 获取DEM_tiff的高宽、投影、仿射矩阵 + Trans_array=list(DEM_tiff.GetGeoTransform()) # 仿射变换矩阵 + width=DEM_tiff.RasterXSize + height=DEM_tiff.RasterYSize + # x=trans[0]+trans[1]*c+trans[2]*r + # y=trans[3]+trans[4]*c+trans[5]*r + # 获得其高宽分辨率 + delta_x=Trans_array[1]+Trans_array[2] # x轴上的分辨率 经度 + delta_y=Trans_array[4]+Trans_array[5] # y轴上的分辨率 纬度 + # 因为单位为度,所以需要转换为 米 + y_resultion=abs(111194.926644558737*delta_y) + x_resultion=abs(111194.926644*math.cos(Trans_array[3])*delta_x) + resultion=x_resultion if x_resultion>y_resultion else y_resultion + delta_R=self.delta_R # 斜距分辨率 + incidenceAngle=self.header_info['ImageInformation']['incidenceAngle']["NearRange"] # 入射角 + f=math.sin(incidenceAngle*math.pi/180)*1.4142135623730951*resultion/delta_R + f=math.ceil(f) + return f + + def PSTN_M2(self, TargetPostion, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0): + """ + 间接求解方法,使用矩阵方法,分段计算,方便加速 + args: + TargetPosition:nparray,nx3 地面坐标 + Doppler_d:多普勒系数 -1,1 + lamda:波长 + T0:多普勒参考时间 + LightSpeed:光速 + return: + rc:nparray shape nx2 行列号 + """ + # + + n = int(TargetPostion.shape[0]) # 坐标点数据 nx3 + r=np.zeros((n,1)) + c=np.zeros((n,1)) + ti=np.zeros((n,1),dtype=np.float64) + len_iter=2000 + pool= ThreadPoolExecutor() + pool_ls=[] + SatelliteOrbitModelstarttime=self.SatelliteOrbitModel.get_starttime() + SatelliteOrbitModelParameters=self.SatelliteOrbitModel.A_arr + SatelliteOrbitModelName=self.SatelliteOrbitModel.modelName + delta_R=self.delta_R + for i in range(0, n, len_iter): + start_i=i + len_block=len_iter + if start_i+len_block>n: + len_block=n-start_i + end_i=start_i+len_block + temp_TargetPosition=TargetPostion[start_i:end_i,:] + pool_ls.append( pool.submit(PSTN_block_MuilThread,copy.deepcopy(start_i),copy.deepcopy(end_i), + temp_TargetPosition.copy(), + copy.deepcopy(Doppler_d), + copy.deepcopy(StartTime), + copy.deepcopy(lamda), + copy.deepcopy(T0), copy.deepcopy(LightSpeed), + copy.deepcopy(PRF),copy.deepcopy(R0), + copy.deepcopy(delta_R), + copy.deepcopy(SatelliteOrbitModelstarttime), + SatelliteOrbitModelParameters.copy(), + copy.deepcopy(SatelliteOrbitModelName),)) + pool.close() + pool.join() + for p in pool_ls: + r_temp, c_temp, ti_temp,start_i,end_i=p.get() + r[start_i:end_i,:]=r_temp + c[start_i:end_i,:]=c_temp + ti[start_i:end_i,:]=ti_temp + + return r,c,ti + + def PSTN_M(self, TargetPostion, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0): + """ + 间接求解方法,使用矩阵方法,分段计算,方便加速 + args: + TargetPosition:nparray,nx3 地面坐标 + Doppler_d:多普勒系数 -1,1 + lamda:波长 + T0:多普勒参考时间 + LightSpeed:光速 + return: + rc:nparray shape nx2 行列号 + """ + # + n = int(TargetPostion.shape[0]) # 坐标点数据 nx3 + r=np.zeros((n,1)) + c=np.zeros((n,1)) + ti=np.zeros((n,1),dtype=np.float64) + init_size=3000 + for i in range(0,n,init_size): + start_i=i + len_block=init_size + if start_i+len_block>n: + len_block=n-start_i + end_i=start_i+len_block + temp_TargetPosition=TargetPostion[start_i:end_i,:] + r_temp, c_temp, ti_temp=self.PSTN_block(temp_TargetPosition, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0) + + r[start_i:end_i,:]=r_temp.copy() + c[start_i:end_i,:]=c_temp.copy() + ti[start_i:end_i,:]=ti_temp.copy() + return r,c,ti + + def PSTN_block(self, TargetPostion, Doppler_d, StartTime, lamda, T0, LightSpeed, PRF, R0): + ''' + 间接求解方法,使用矩阵方法 + args: + TargetPosition:nparray,nx3 地面坐标 + Doppler_d:多普勒系数 -1,1 + lamda:波长 + T0:多普勒参考时间 + LightSpeed:光速 + return: + rc:nparray shape nx2 行列号 + ''' + n = TargetPostion.shape[0] # 坐标点数据 nx3 + ti = np.ones((n, 1),dtype=np.float64) * StartTime # 初始值 + delta_R = self.delta_R + delta_t = 1 / PRF + R=np.zeros((n,1)) + Rs = np.zeros((n, 3)) + R_sc = np.zeros((n, 3)) # 地面-卫星空间位置矢量 + V_sc = np.zeros((n, 3)) # 地面-卫星空间速率矢量 + FdNumerical = np.ones((n, 1)) # 多普勒公式的数值解法 + FdTheory = np.ones((n, 1)) # 多普勒公式的理论解法 + FdTheory_grad = np.ones((n, 1)) # 多普勒公式的导数 + # 多普勒参数系数 + Doppler_d = Doppler_d.reshape(-1, 1) # 5x1 + TSR=np.ones((n, 1)) # nx1 + TSRx = np.ones((n, Doppler_d.shape[0])) # nx5 + inc_t = np.ones((n, 1)) # 计算增加的导数 + dt = 0.0001 # 数值法求解多普勒距离公式的导数 + dt_rec=1/dt + # 默认最高迭代100次,如果还未求解出结果,就将所有的未收敛的时间值记录为0 ,注意时间不能为0 + for i in range(100): + tempT = ti + dt # 计算增加时间 + # ------- 求解导数 ---------------- + #del Rs,R_sc,V_sc,TSR,TSRx,satelliteSpaceState,R + satelliteSpaceState = self.SatelliteOrbitModel.getSatelliteSpaceState(tempT) # 卫星坐标与速度 nx6 + Rs = satelliteSpaceState[:, :3] + R_sc = satelliteSpaceState[:, :3] - TargetPostion # 地面-卫星空间位置矢量 + V_sc = satelliteSpaceState[:, 3:] # 地面-卫星空间位置矢量 + R =np.sqrt(np.sum(R_sc ** 2, axis=1)).reshape(-1, 1) # nx1 + #FdTheory_grad = (-2 / lamda) * (1 / R) * np.sum(R_sc * V_sc, axis=1).reshape(-1, 1) # nx1 + FdTheory_grad = -2*np.reciprocal(R*lamda) * np.sum(R_sc * V_sc, axis=1).reshape(-1, 1) # nx1 + + # 获取卫星轨道状态信息 + satelliteSpaceState = self.SatelliteOrbitModel.getSatelliteSpaceState(ti) # 卫星坐标与速度 nx6 + # 卫星轨道坐标 + Rs =satelliteSpaceState[:, :3] + # 卫星相对地面的位置向量、卫星速度向量 + R_sc=Rs - TargetPostion # 地面-卫星空间位置矢量 + V_sc =satelliteSpaceState[:, 3:] # 地面-卫星空间位置矢量 + # 斜距 + R = np.sqrt(np.sum(R_sc ** 2, axis=1)).reshape(-1, 1) # nx1 + # 根据多普勒数值求解公式求解多普勒频移值 + TSR= R * (2 / LightSpeed) - T0 # nx1 + TSRx[:,0]=TSR[:,0]**0 # nx5 + TSRx[:,1]=TSR[:,0]**1 + TSRx[:,2]=TSR[:,0]**2 + TSRx[:,3]=TSR[:,0]**3 + TSRx[:,4]=TSR[:,0]**4 + # 根据多普勒物理公式求解求解多普勒频移值 + FdTheory=-2*np.reciprocal(lamda*R)*np.sum(R_sc * V_sc, axis=1).reshape(-1, 1) # nx1 + FdNumerical= np.matmul(TSRx, Doppler_d) # nx1 + + FdTheory_grad = np.reciprocal((FdTheory_grad - FdTheory) * dt_rec) # nx1 + inc_t = (FdTheory - FdNumerical) * FdTheory_grad #(FdTheory - FdNumerical) * (1 / FdTheory_grad) # nx1 + # inc_t = inc_t - inc_t * ti_mask # 允许继续迭代 nx1 + if np.max(np.abs(inc_t)) < delta_t * 0.001: + break + ti = ti - inc_t # 更新坐标 + #del Rs,R_sc,V_sc,R,satelliteSpaceState,FdTheory_grad,FdNumerical,inc_t + #print("当前python程序,{} step, inc_t {} 求解内存占用 {}G".format(i,np.max(inc_t),psutil.Process(os.getpid()).memory_info().rss / 1024 / 1024 / 1024)) + # 计算行号 + ti_=copy.deepcopy(ti.copy()) + r_ = (ti_ - StartTime)*PRF + delta_t_light=delta_t*LightSpeed + r=copy.deepcopy(r_.copy()) + del r_ + c_ = (R - R0) * (1 / delta_R) + c=copy.deepcopy(c_.copy()) + del c_ + ti = copy.deepcopy(ti_.copy()) + del ti_ + return r, c, ti + pass + + def sim_intensity(self, in_tif_path, dem_resampled_path, lut_tif_path, incidence_tif_path, sim_out_path): + """ + 局部入射角计算 + 原方法存在的问题:多次文件读写 + """ + dem_resampled_tiff = gdal.Open(dem_resampled_path) # 获取重采样的DEM 数据,为了减少文件读写操作,这里做了持久化 + im_proj = dem_resampled_tiff.GetProjection() # 构建投影 + im_geotrans = list(dem_resampled_tiff.GetGeoTransform()) # 构建投影变换对象 + [a1, b1, c1, a2, b2, c2] = im_geotrans # 坐标变换参数:c1=0,b2=0 + start = time.time() # 度量算法 + dem_resampled = dem_resampled_tiff.GetRasterBand(1).ReadAsArray(0, 0, dem_resampled_tiff.RasterXSize, + dem_resampled_tiff.RasterYSize) + del dem_resampled_tiff # 释放内存 + incidence = dem_resampled * 0.0 + 1.8 + # 读取时间 + in_ds = gdal.Open(lut_tif_path) # 读取间接法 + row_cnt = in_ds.RasterYSize + col_cnt = in_ds.RasterXSize + t_arr = in_ds.GetRasterBand(3).ReadAsArray(0, 0, col_cnt, row_cnt).astype(np.float64) # 获取时间阵列 + t_arr = t_arr[1:-1, 1:-1] + self.header_info['ImageInformation']['StartTime'] # 去除最外围一圈时间数据 + row_data = in_ds.GetRasterBand(1).ReadAsArray(0, 0, col_cnt, row_cnt) # 读取行号 + col_data = in_ds.GetRasterBand(2).ReadAsArray(0, 0, col_cnt, row_cnt) # 读取列号 + row_data = np.round(row_data) + col_data = np.round(col_data) + row_data = row_data.astype(np.int16) + col_data = col_data.astype(np.int16) + del in_ds # 释放内存 + c = range(0, col_cnt) + c = np.array(c).reshape(-1, 1) + + for r0 in range(1, row_cnt - 1): + T0 = np.zeros((col_cnt, 3)) # colcount-2 ,3 + T0[:, 0] = a1 + b1 * c[:, 0] + c1 * r0 + T0[:, 1] = a2 + b2 * c[:, 0] + c2 * r0 + T0[:, 2] = dem_resampled[r0, :] + + T0 = np.concatenate(OrthoAuxData.LLA2XYZM(T0[:, 0].reshape(-1, 1), T0[:, 1].reshape(-1, 1), T0[:, 2].reshape(-1, 1)), axis=1) + n1 = np.concatenate(OrthoAuxData.LLA2XYZM(a1 + b1 * c + c1 * (r0 - 1), a2 + b2 * c + c2 * (r0 - 1), + dem_resampled[r0 - 1, :]), axis=1)[1:-1, :] - T0[1:-1, :] # colcount-2 ,3 + n3 = np.concatenate(OrthoAuxData.LLA2XYZM(a1 + b1 * c + c1 * (r0 + 1), a2 + b2 * c + c2 * (r0 + 1), + dem_resampled[r0 + 1, :]), axis=1)[1:-1, :] - T0[1:-1, :] # colcount-2 ,3 + n2 = T0[:-2, :] - T0[1:-1, :] + n4 = T0[2:, :] - T0[1:-1, :] + T0 = T0[1:-1, :] + n31 = n1 - n3 + n42 = n2 - n4 + + N = XYZOuterM2(n31, n42) / 4 + ti = t_arr[r0 - 1, :].reshape(-1, 1) # rowcount-2,colcount-2 + satelliteSpaceState = self.SatelliteOrbitModel.getSatelliteSpaceState(ti) + Rps = satelliteSpaceState[:, :3] - T0 # nx3 + # 计算向量模之积 + N_Norm = np.sqrt(np.sum(N * N, axis=1)).reshape(-1, 1) + Rps_Norm = np.sqrt(np.sum(Rps * Rps, axis=1)).reshape(-1, 1) + N_Norm = np.concatenate((N_Norm, N_Norm, N_Norm), axis=1) + Rps_Norm = np.concatenate((Rps_Norm, Rps_Norm, Rps_Norm), axis=1) + N = N / N_Norm + Rps = Rps / Rps_Norm + # 计算向量相乘 + N_Rps = np.sum(N * Rps, axis=1) # col_count-2 + theta = np.arccos(N_Rps) # 入射角 + incidence[r0, 1:-1] = theta + + incidence = np.degrees(incidence) + print('整张图入射角计算完成,耗时{}秒'.format(time.time() - start)) + ImageHandler.write_img(incidence_tif_path, im_proj, im_geotrans, incidence) + + # 读取原始影像相关信息 + in_tif = gdal.Open(in_tif_path) + col_num = in_tif.RasterXSize + row_num = in_tif.RasterYSize + im_proj1 = in_tif.GetProjection() # 构建投影 + im_geotrans1 = in_tif.GetGeoTransform() + out_arr = np.zeros((row_num, col_num), dtype=np.float32) + for h in range(row_cnt): + r_min = min(row_data[h]) + r_max = max(row_data[h]) + c_min = min(col_data[h]) + c_max = max(col_data[h]) + if 0 <= r_min < row_num or 0 <= r_max < row_num or (r_min < 0 and r_max >= row_num): + if 0 <= c_min < col_num or 0 <= c_max < col_num or (c_min < 0 and c_max >= col_num): + for w in range(col_cnt): + r = row_data[h, w] + c = col_data[h, w] + if 0 <= r < row_num and 0 <= c < col_num: + if 0 <= incidence[h, w] < 90: + out_arr[r, c] += 1 + K = 10 + out_arr = K * out_arr + max_delta = np.max(out_arr) + min_delta = np.min(out_arr) + out_arr = (out_arr - min_delta) / (max_delta - min_delta) + ImageHandler.write_img(sim_out_path, im_proj1, im_geotrans1, out_arr) + + @staticmethod + def sar_intensity_synthesis(sar_in_tif, sar_out_tif): + # 获取SLC格式SAR影像的相关信息 + in_ds = gdal.Open(sar_in_tif) + bands_num = in_ds.RasterCount + rows = in_ds.RasterYSize + columns = in_ds.RasterXSize + proj = in_ds.GetProjection() + geotrans = in_ds.GetGeoTransform() + + datatype = gdal.GDT_Float32 + + # 创建输出的SAR强度图 + gtiff_driver = gdal.GetDriverByName('GTiff') + out_ds = gtiff_driver.Create(sar_out_tif, columns, rows, 1, datatype) + + # 输出SAR强度图 + out_data=np.zeros((rows,columns)) + for i in range(0,rows,10000): + for j in range(0,columns,10000): + len_row=10000 + len_col=10000 + if i+len_row>rows: + len_row=rows-i + if j+len_col>columns: + len_col=columns-j + end_i=i+len_row + end_j=j+len_col + in_data1 = in_ds.GetRasterBand(1).ReadAsArray(j, i, len_col, len_row).astype(np.float32) + in_data2 = in_ds.GetRasterBand(2).ReadAsArray(j, i, len_col, len_row).astype(np.float32) + out_data[i:end_i,j:end_j] = np.log10((in_data1**2 + in_data2**2)+1)*10 + out_ds.GetRasterBand(1).WriteArray(out_data) + del in_ds, out_ds + + @staticmethod + def img_match(sim_sar_path, ori_sar_path,work_sapce_path): + ''' 影像匹配并根据配准点 + args: + sim_sar_path:模拟SAR强度图 + orig_sar_path: 原始SAR强度图 + out_path:配准结果输出点 + work_space_path: 工作目录 + return: + point_correct: 点集映射结果 + raise: + None: 出现错误 + ''' + match_points_path=ImageMatchClass.ImageMatch(ori_sar_path,sim_sar_path,work_sapce_path) + match_points_path=os.path.join(work_sapce_path,"GridMatch.npy") + match_result_path=os.path.join(work_sapce_path,"match_result.npy") + match_result_image_path=os.path.join(work_sapce_path,"match_result_show.tif") + ImageMatchClass.DeNoiseMatch(match_points_path,match_result_path) + ImageMatchClass.DrawMatchResult(ori_sar_path,sim_sar_path,match_result_path,match_result_image_path) + return match_result_path + + def IndireOrtho_smi(self,sim_SAR_rc_path,ori_SAR_path,tar_sar_path): + ''' + 测试间接定位法计算的影像坐标是否有问题。 + 方法核心,插值出间接定位法坐标处的 实部和虚部,不考虑其他区域 + 使用插值方法:等权反距离权重法 + 考虑实际的数据量较大,为节省内存,使用分块处理方法。 + 块大小为1000。 + ''' + sim_rc_tif=gdal.Open(sim_SAR_rc_path) + sim_width=sim_rc_tif.RasterXSize + sim_height=sim_rc_tif.RasterYSize + sim_r_tif=sim_rc_tif.GetRasterBand(1).ReadAsArray(0,0,sim_width,sim_height) + sim_c_tif=sim_rc_tif.GetRasterBand(2).ReadAsArray(0,0,sim_width,sim_height) + # 构建掩膜 + sim_mask=(sim_r_tif>0)&(sim_r_tif0)&(sim_c_tif模拟 + args: + point_arr:[模拟row,模拟col,原始row,原始col] + ''' + # 由模拟->原始 + point_cnt = point_arr.shape[0] # + rs_arr = point_arr[:,2].reshape(point_cnt, 1) # 原始 行 + cs_arr = point_arr[:,3].reshape(point_cnt, 1) + + rm_arr = point_arr[:,0].reshape(point_cnt, 1)-3000 # 模拟 行 还原偏移 + cm_arr = point_arr[:,1].reshape(point_cnt, 1) + X = np.concatenate( + [np.ones((point_cnt, 1), dtype=np.float64), rm_arr, cm_arr, rm_arr ** 2, cm_arr ** 2, rm_arr * cm_arr], + axis=1) + sim2orirc_arr=np.ones((2,6)) + sim2orirc_arr[0,:] = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), rs_arr).reshape(1, 6) + sim2orirc_arr[1,:] = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), cs_arr).reshape(1, 6) + + # 翻转 sim->ori + X = np.concatenate( + [np.ones((point_cnt, 1), dtype=np.float64), rs_arr, cs_arr, rs_arr ** 2, cs_arr ** 2, rs_arr * cs_arr], + axis=1) + ori2simrc_arr=np.ones((2,6)) + ori2simrc_arr[0,:] = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), rm_arr).reshape(1, 6) + ori2simrc_arr[1,:] = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), cm_arr).reshape(1, 6) + return ori2simrc_arr.copy(),sim2orirc_arr.copy() + + @staticmethod + def ReSamplingSAR(ori_sar_path,out_sar_path,lon_lat_point_match_path,gt): + ''' 根据影像点匹配点,插值得到正射图像 + args: + ori_sar_path: 输入sar地址 + out_sar_path: 正射结果地址 + lon_lat_point_match_path: CoordinateCorrection计算结果的路径 + gt: 仿射矩阵 + return: + out_sar_path + ''' + + ori_sar=gdal.Open(ori_sar_path) + ori_height=ori_sar.RasterYSize # 获得高度 + ori_width=ori_sar.RasterXSize # 获得宽度 + # 开始插值 + spatialreference=osr.SpatialReference() + spatialreference.SetWellKnownGeogCS("WGS84") # 设置地理坐标,单位为度 degree # 设置投影坐标,单位为度 degree + spatialproj=spatialreference.ExportToWkt() # 导出投影结果 + gtiff_driver = gdal.GetDriverByName('GTiff') + out_sar=gtiff_driver.Create(out_sar_path, ori_width, ori_height, 2, gdal.GDT_Float32) + out_sar.SetGeoTransform(gt) # 写入仿射变换参数 + out_sar.SetProjection(spatialproj) # 写入投影 + + ab=np.array([gt[1],gt[2],gt[4],gt[5]]).reshape(2,2) + ab=np.np.matmul(np.linalg.inv(np.np.matmul(ab.T,ab)),ab.T) + # 解算仿射矩阵,为后面的插值做准备 + lon_lat_file_list=os.listdir(lon_lat_point_match_path) + block_info_json=[] + for lon_lat_file_name in lon_lat_file_list: + lon_lat=np.load(os.path.join(lon_lat_point_match_path,lon_lat_file_name)) + ori_r=lon_lat[:,0] # 原始影像的行坐标 + ori_c=lon_lat[:,1] # 原始影像的列坐标 + lon=lon_lat[:,2].copy() + lat=lon_lat[:,3].copy() + # 根据仿射矩阵阶段投影变换结果 + lon=lon-gt[0] + lat=lat-gt[3] + lon_lat[:,2]=ab[0,0]*lon+ab[0,1]*lat # 行 + lon_lat[:,3]=ab[1,0]*lon+ab[1,1]*lat # 列 + block_info_json.append({ + 'ori':[np.min(lon_lat[:,0]),np.max(lon_lat[:,0]),np.min(lon_lat[:,1]),np.max(lon_lat[:,1])],# r0 r1 c0 c1 + 'ortho':[np.min(lon_lat[:,2]),np.max(lon_lat[:,2]),np.min(lon_lat[:,3]),np.max(lon_lat[:,3])], + 'path':os.path.join(lon_lat_point_match_path,lon_lat_file_name) + }) + + for i in range(0,ori_height,6000): + for j in range(0,ori_width,6000): + # 判断需要检索的行列 + len_row=6000 + len_col=6000 + if i+len_row>ori_height: + len_row=ori_height-i + if j+len_col>ori_width: + len_col=ori_width-j + end_i=i+len_row + end_j=j+len_col + select_region=[i-1000,end_i+1000,j-1000,end_i+1000] + # 根据求交原则,解出需要可以参与插值计算的 方块 + inter_block=[] + for block in block_info_json: + block_ortho =block['ortho'] + if block_ortho[0]>select_region[0] and block_ortho[1]select_region[2] and block_ortho[3]模拟SAR + # X=a0+a1*r+a2*c+a5*r*c+a3*r^2+a4*c^2 + # Y=b0+b1*r+b2*c+b5*r*c+b3*r^2+b4*r^2 + point_arr=np.load(point_match_path) + rcori2simrc_arr,sim2orirc_arr=IndirectOrthorectification.CoordinateTransformation(point_arr) + # 根据行列号裁剪DEM + sim_rc_tif=gdal.Open(sim_out_path) + sim_width=sim_rc_tif.RasterXSize + sim_height=sim_rc_tif.RasterYSize + sim_r_tif=sim_rc_tif.GetRasterBand(1).ReadAsArray(0,0,sim_width,sim_height) + sim_c_tif=sim_rc_tif.GetRasterBand(2).ReadAsArray(0,0,sim_width,sim_height) + + # 计算实际行列号 + r=sim2orirc_arr[0,0]+sim2orirc_arr[0,1]*sim_r_tif+sim2orirc_arr[0,2]*sim_c_tif+sim2orirc_arr[0,3]*sim_r_tif*sim_r_tif+sim2orirc_arr[0,4]*sim_c_tif*sim_c_tif+sim2orirc_arr[0,5]*sim_r_tif*sim_c_tif + c=sim2orirc_arr[1,0]+sim2orirc_arr[1,1]*sim_r_tif+sim2orirc_arr[1,2]*sim_c_tif+sim2orirc_arr[1,3]*sim_r_tif*sim_r_tif+sim2orirc_arr[1,4]*sim_c_tif*sim_c_tif+sim2orirc_arr[1,5]*sim_r_tif*sim_c_tif + sim_r_tif=r + sim_c_tif=c + del r,c + + # + sim_mask=(sim_r_tif>=-1)&(sim_r_tif=-1)&(sim_c_tif原始 + ori_rc=np.ones((r_ids.size,2)) + ori_rc[:,0]=r_arr_trans[0,0]+r_ids*r_arr_trans[0,1]+c_ids*r_arr_trans[0,2]+r_arr_trans[0,3]*r_ids ** 2+r_arr_trans[0,4]*c_ids ** 2+r_arr_trans[0,5]*r_ids * c_ids + ori_rc[:,1]=c_arr_trans[0,0]+r_ids*c_arr_trans[0,1]+c_ids*c_arr_trans[0,2]+c_arr_trans[0,3]*r_ids ** 2+c_arr_trans[0,4]*c_ids ** 2+c_arr_trans[0,5]*r_ids * c_ids + # 插值x坐标 + sim_x_data=gdal.Open(sim_sar_x_path) + sim_x_arr=sim_x_data.GetRasterBand(1).ReadAsArray(0,0 , sim_x_data.RasterXSize, sim_x_data.RasterYSize) # 块 高程文件 + sim_x=sim_x_arr[r_ids,c_ids] + del sim_x_arr,sim_x_data + tree=KDTree(ori_rc) # 原始sar点对应的坐标 + + gtiff_driver = gdal.GetDriverByName('GTiff') + SAR_row_col=gtiff_driver.Create(ori_xyz_path,width,height,3,gdal.GDT_Float32) + # 准备插值--分块插值 + blocksize=5000 + SAR_ori=np.zeros((height,width)) + for i in range(0,height,blocksize): + for j in range(0,width,blocksize): + start_row=i + start_col=j + len_row=blocksize + len_col=blocksize + if(start_row+len_row>height): + len_row=height-start_row + if(start_col+len_col>width): + len_col=width-start_col + end_row=start_row+len_row + end_col=start_col+len_col + grid_xy= np.mgrid[start_row:end_row:1, start_col:end_col:1] + grid_xy=grid_xy.reshape(2,-1).transpose(1,0) + distance_weight,ori_select=tree.query(grid_xy,k=10) + distance_weight=np.reciprocal(distance_weight) + distance_weight=np.multiply(distance_weight.transpose(1,0),np.reciprocal(np.sum(distance_weight,axis=1))) + distance_weight=distance_weight.transpose(1,0) + SAR_ori[start_row:end_row,start_col:end_col]=np.sum( np.multiply(distance_weight,sim_x[ori_select]),axis=1).reshape(len_row,len_col) + + SAR_row_col.GetRasterBand(1).WriteArray(SAR_ori) + + # 插值y坐标 + sim_y_data=gdal.Open(sim_sar_y_path) + sim_y_arr=sim_y_data.GetRasterBand(1).ReadAsArray(0,0 , sim_y_data.RasterXSize, sim_y_data.RasterYSize) # 块 高程文件 + sim_y=sim_y_arr[r_ids,c_ids] + del sim_y_arr,sim_y_data,sim_x + # 准备插值--分块插值 + blocksize=5000 + SAR_ori=np.zeros((height,width)) + for i in range(0,height,blocksize): + for j in range(0,width,blocksize): + start_row=i + start_col=j + len_row=blocksize + len_col=blocksize + if(start_row+len_row>height): + len_row=height-start_row + if(start_col+len_col>width): + len_col=width-start_col + end_row=start_row+len_row + end_col=start_col+len_col + grid_xy= np.mgrid[start_row:end_row:1, start_col:end_col:1] + grid_xy=grid_xy.reshape(2,-1).transpose(1,0) + distance_weight,ori_select=tree.query(grid_xy,k=10) + distance_weight=np.reciprocal(distance_weight) + distance_weight=np.multiply(distance_weight.transpose(1,0),np.reciprocal(np.sum(distance_weight,axis=1))) + distance_weight=distance_weight.transpose(1,0) + SAR_ori[start_row:end_row,start_col:end_col]=np.sum(np.multiply(distance_weight,sim_y[ori_select]),axis=1).reshape(len_row,len_col) + + SAR_row_col.GetRasterBand(2).WriteArray(SAR_ori) + # 插值z坐标 + sim_z_data=gdal.Open(sim_sar_z_path) + sim_z_arr=sim_z_data.GetRasterBand(1).ReadAsArray(0,0 , sim_z_data.RasterXSize, sim_z_data.RasterYSize) # 块 高程文件 + sim_z=sim_z_arr[r_ids,c_ids] + del sim_z_arr,sim_z_data,sim_y + # 准备插值--分块插值 + blocksize=5000 + SAR_ori=np.zeros((height,width)) + for i in range(0,height,blocksize): + for j in range(0,width,blocksize): + start_row=i + start_col=j + len_row=blocksize + len_col=blocksize + if(start_row+len_row>height): + len_row=height-start_row + if(start_col+len_col>width): + len_col=width-start_col + end_row=start_row+len_row + end_col=start_col+len_col + grid_xy= np.mgrid[start_row:end_row:1, start_col:end_col:1] + grid_xy=grid_xy.reshape(2,-1).transpose(1,0) + distance_weight,ori_select=tree.query(grid_xy,k=10) + distance_weight=np.reciprocal(distance_weight) + distance_weight=np.multiply(distance_weight.transpose(1,0),np.reciprocal(np.sum(distance_weight,axis=1))) + distance_weight=distance_weight.transpose(1,0) + SAR_ori[start_row:end_row,start_col:end_col]=np.sum(np.multiply(distance_weight,sim_z[ori_select]),axis=1).reshape(len_row,len_col) + SAR_row_col.GetRasterBand(3).WriteArray(SAR_ori) + return ori_xyz_path + + def outResamplingParas(self,work_space_file,ortho_sar_xyz_pow_path,sar_xyz_path,sar_incidence_path,ortho_sar_xyz_path,ortho_sar_incidence_path,out_sar_file_list,dem_clip_path,ori2sim,sim2ori): + ''' + sar_xyz_path:xyz插值结果 + sar_incidence_path: 入射角 + ortho_sar_xyz_path: 重采样结果文件夹 + out_sar_file_list:需要重采样的文件 + rc_trans_arr:变换结果 + + ''' + with open(os.path.join(work_space_file,"resample_para.txt"),'w',encoding='utf-8') as fp: + fp.write("{}\n".format(dem_clip_path)) + fp.write("{}\n".format(os.path.join(work_space_file,"ori_sim.tif"))) + fp.write("{}\n".format(sar_xyz_path)) + fp.write("{}\n".format(sar_incidence_path)) + fp.write("{}\n".format(ortho_sar_incidence_path)) + fp.write("{}\n".format(ortho_sar_incidence_path.replace("orth_sar_incidence.tif","orth_sar_local_incidence.tif"))) + fp.write("{}\n".format(ortho_sar_xyz_path)) + fp.write("{}\n".format(len(out_sar_file_list))) + for i in range(len(out_sar_file_list)): + file_name=os.path.split(out_sar_file_list[i])[1] + fp.write("{}\n".format(out_sar_file_list[i])) + fp.write("{}\n".format(os.path.join(ortho_sar_xyz_path,file_name))) + fp.write("{}\n".format(os.path.join(ortho_sar_xyz_pow_path,file_name))) + #os.path.split(in_tif_path)[1] + + fp.write("{}\n".format(12)) + for i in range(6): + fp.write("{}\n".format(ori2sim[0,i])) + for i in range(6): + fp.write("{}\n".format(ori2sim[1,i])) + fp.write("{}\n".format(12)) + for i in range(6): + fp.write("{}\n".format(sim2ori[0,i])) + for i in range(6): + fp.write("{}\n".format(sim2ori[1,i])) + return os.path.join(work_space_file,"resample_para.txt") + + def Resampling(self,out_sar_xyz_path,inv_gt,gt,ori_resampling_file_path): + out_xyz=gdal.Open(out_sar_xyz_path) + ori_height=out_xyz.RasterYSize # 获得高度 + ori_width=out_xyz.RasterXSize # 获得宽度 + out_xyz_x=out_xyz.GetRasterBand(1).ReadAsArray(0,0 , ori_width, ori_height) + out_xyz_y=out_xyz.GetRasterBand(2).ReadAsArray(0,0 , ori_width, ori_height) + + # 计算对应的行列号 + out_xyz_rc=np.ones((ori_height,ori_width,2)) + out_xyz_rc[:,:,1]=inv_gt[0]+inv_gt[1]*out_xyz_x+inv_gt[2]*out_xyz_y + out_xyz_rc[:,:,0]=inv_gt[3]+inv_gt[4]*out_xyz_x+inv_gt[5]*out_xyz_y + del out_xyz_x,out_xyz_y,out_xyz + out_xyz_rc=out_xyz_rc.reshape(-1,2) + + blocksize=2000 + ori_data=gdal.Open(ori_resampling_file_path[0][0][0]) + width=ori_data.RasterXSize + height=ori_data.RasterYSize + SAR_ori=np.ones((width,height)) + sim_x=ori_data.GetRasterBand(1).ReadAsArray(0,0 , width, height).reshape(-1) + tree=KDTree(out_xyz_rc) + for i in range(0,height,blocksize): + for j in range(0,width,blocksize): + start_row=i + start_col=j + len_row=blocksize + len_col=blocksize + if(start_row+len_row>height): + len_row=height-start_row + if(start_col+len_col>width): + len_col=width-start_col + end_row=start_row+len_row + end_col=start_col+len_col + grid_xy= np.mgrid[start_row:end_row:1, start_col:end_col:1] + grid_xy=grid_xy.reshape(2,-1).transpose(1,0) + distance_weight,ori_select=tree.query(grid_xy,k=4) + distance_weight=np.reciprocal(distance_weight) + distance_weight=np.multiply(distance_weight.transpose(1,0),np.reciprocal(np.sum(distance_weight,axis=1))) + distance_weight=distance_weight.transpose(1,0) + SAR_ori[start_row:end_row,start_col:end_col]=np.sum( np.multiply(distance_weight,sim_x[ori_select]),axis=1).reshape(len_row,len_col) + pass + ''' + # 获得所有点集 + del point_arr + # 构建查询表 + ori_sar=gdal.Open(ori_sar_path) + ori_height=ori_sar.RasterYSize # 获得高度 + ori_width=ori_sar.RasterXSize # 获得宽度 + point_arr_path=[os.path.join(work_space_file,"point_refrence.npy")] + for point_match_arr_filename in os.listdir(os.path.join(work_space_file,'temp_point_refrence')): + point_arr_path.append(os.path.join(work_space_file,'temp_point_refrence',point_match_arr_filename)) + point_arr=np.ones((1,5)) + for point_path in point_arr_path: + point_temp_arr=np.load(point_path) + point_arr=np.row_stack((point_arr,point_temp_arr)) + point_arr=point_arr[1:,:] + ori_points=np.zeros((point_arr.shape[0],2)) + # 求解对应的行列号 + for i in range(r_arr_trans.shape[1]): + ori_points[:,0]=ori_points[:,0]+r_arr_trans[0,i]*point_arr[:,1]**i + ori_points[:,1]=ori_points[:,1]+c_arr_trans[0,i]*point_arr[:,1]**i + point_arr[:,0]=ori_points[:,0].copy() + point_arr[:,1]=ori_points[:,1].copy() + del ori_points + gc.collect() + # 根据此进行散点插值,确定 + lon_lat_point_match_path=os.path.join(work_space_file,"lon_lat_point_match") + if os.path.exists(lon_lat_point_match_path): + shutil.rmtree(lon_lat_point_match_path) + os.makedirs(lon_lat_point_match_path) + lon_lat=np.zeros((4,2)) + block_info_json={"ori_rc":[]} + # + block_size=5000 + for i in range(0,ori_height,block_size): + for j in range(0,ori_width,block_size): + len_row=block_size + len_col=block_size + if i+len_row>ori_height: + len_row=ori_height-i + if j+len_col>ori_width: + len_col=ori_width-j + end_i=i+len_row + end_j=j+len_col + + r=(np.ones((len_col,len_row))*range(len_row)).transpose(1,0)+i + c=np.ones((len_row,len_col))*range(len_col)+j + # 格网插值 + # scipy 规则格网插值 + lon_lat_r_c=np.ones((len_col*len_row,5)) + lon_lat_r_c[:,0]=r.reshape(-1) + lon_lat_r_c[:,1]=c.reshape(-1) + + SAR_ori_X=interpolate.griddata(point_arr[:,:2], point_arr[:,2], (lon_lat_r_c[:,0], lon_lat_r_c[:,1]), method='linear').reshape(-1) + SAR_ori_Y=interpolate.griddata(point_arr[:,:2], point_arr[:,3], (lon_lat_r_c[:,0], lon_lat_r_c[:,1]), method='linear').reshape(-1) + SAR_ori_Z=interpolate.griddata(point_arr[:,:2], point_arr[:,4], (lon_lat_r_c[:,0], lon_lat_r_c[:,1]), method='linear').reshape(-1) + [lon_lat_r_c[:,2],lon_lat_r_c[:,3],lon_lat_r_c[:,4]]=OrthoAuxData.XYZ2LLAM(SAR_ori_X,SAR_ori_Y,SAR_ori_Z) + temp_path=os.path.join(lon_lat_point_match_path,"r_c_{}_{}.npy".format(i,j)) + np.save(temp_path,lon_lat_r_c) + block_info_json['ori_rc'].append({'ori':[i,j,end_i,end_j],"path":temp_path}) + if i==0 and j==0: + lon_lat[0,0]=lon_lat_r_c[:,2].reshape(len_row,len_col)[0,0] # 经度 + lon_lat[0,1]=lon_lat_r_c[:,3].reshape(len_row,len_col)[0,0] # 纬度 + + if i+len_row==ori_height and j==0: + lon_lat[1,0]=lon_lat_r_c[:,2].reshape(len_row,len_col)[-1,0] + lon_lat[1,1]=lon_lat_r_c[:,3].reshape(len_row,len_col)[-1,0] + + if j+len_col==ori_width and i==0: + lon_lat[2,0]=lon_lat_r_c[:,2].reshape(len_row,len_col)[0,-1] + lon_lat[2,1]=lon_lat_r_c[:,3].reshape(len_row,len_col)[0,-1] + if j+len_col==ori_width and i+len_row==ori_height: + lon_lat[3,0]=lon_lat_r_c[:,2].reshape(len_row,len_col)[-1,-1] + lon_lat[3,1]=lon_lat_r_c[:,3].reshape(len_row,len_col)[-1,-1] + # 1 3 + # 2 4 + gt=[0,1,2,3,4,5] + # 计算 经度 + gt[0]= lon_lat[0,0] + gt[1]=(lon_lat[2,0]-gt[0])/(ori_width-1) + gt[2]=(lon_lat[3,0]-gt[0]-gt[1]*(ori_width-1))/(ori_height-1) + # 计算 纬度 + gt[3]= lon_lat[0,1] + gt[5]=(lon_lat[1,1]-gt[3])/(ori_height-1) + gt[4]=(lon_lat[3,1]-gt[3]-gt[5]*(ori_height-1))/(ori_width-1) + + + return lon_lat_point_match_path,gt + #return lon_lat_point_match_path + + return None + pass + ''' diff --git a/backScattering/BackScatteringMain.py b/backScattering/BackScatteringMain.py new file mode 100644 index 0000000..09d5ec5 --- /dev/null +++ b/backScattering/BackScatteringMain.py @@ -0,0 +1,502 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :BackscatteringMain.py +@Function :后向散射 +@Author :KHZ +@Contact: +@Date :2021/9/1 +@Version :1.0.0 +""" +import logging +from tool.algorithm.algtools.logHandler import LogHandler +from tool.algorithm.block.blockprocess import BlockProcess +from tool.algorithm.xml.AlgXmlHandle import ManageAlgXML, CheckSource +from tool.algorithm.xml.AnalysisXml import DictXml +from tool.algorithm.xml.CreateMetaDict import CreateMetaDict, CreateProductXml +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.PreProcess import PreProcess as pp +from BackScatteringAlg import IndirectOrthorectification, DEMProcess,rpc_correction,getRCImageRC,get_RPC_lon_lat,getRCImageRC2 +from BackScatteringAlg import ScatteringAlg as alg +from tool.config.ConfigeHandle import Config as cf +import os +import glob +import datetime +import shutil +import tarfile +import sys + + +if cf.get('debug') == 'True': + DEBUG = True +else: + DEBUG = False +EXE_NAME = cf.get('exe_name') +tar = cf.get('target') +productLevel = cf.get('productLevel') +LogHandler.init_log_handler('run_log\\' + EXE_NAME) +logger = logging.getLogger("mylog") +# env_str = os.path.split(os.path.realpath(__file__))[0] +env_str =os.path.dirname(os.path.abspath(sys.argv[0])) +os.environ['PROJ_LIB'] = env_str + +class ScatteringMain: + """ + 后向散射系数主函数 + """ + def __init__(self, alg_xml_path): + self.alg_xml_path = alg_xml_path + self.imageHandler = ImageHandler() + self.__alg_xml_handler = ManageAlgXML(alg_xml_path) + self.__check_handler = CheckSource(self.__alg_xml_handler) + + self.__workspace_path = None + self.__task_id = None + self.__input_paras = {} + self.__output_paras = {} + self.__in_processing_paras = {} + self.__out_para = None + self.__preprocessed_paras = {} + self.__tif_names_list = [] + self.__feature_name_list = [] + + def check_source(self): + """ + 检查算法相关的配置文件,图像,辅助文件是否齐全 + """ + logger.info("sysdir: %s", env_str) + + if self.__check_handler.check_alg_xml() is False: + return False + + if self.__check_handler.check_run_env() is False: + return False + + input_para_names = ["SLC","DEM"] + if self.__check_handler.check_input_paras(input_para_names) is False: + return False + + self.__workspace_path = self.__alg_xml_handler.get_workspace_path() + self.__create_work_space() + self.__task_id = self.__alg_xml_handler.get_task_id() + self.__input_paras = self.__alg_xml_handler.get_input_paras() + self.__in_processing_paras = self.__init_processing_paras(self.__input_paras, self.__workspace_preprocessing_path) + SrcImageName = os.path.split(self.__input_paras["SLC"]['ParaValue'])[1].split('.tar.gz')[0] + # AlgorithmName = self.__alg_xml_handler.get_algorithm_name() + # TaskId = self.__alg_xml_handler.get_task_id() + result_name = SrcImageName + "-" + tar + ".tar.gz" + # out_name = os.path.splitext(os.path.splitext(os.path.basename(self.__input_paras['SLC']['ParaValue']))[0])[0] + # self.__out_para = os.path.join(self.__workspace_path, EXE_NAME, 'Output', "BackScatteringProduct.tar.gz") + self.__out_para = os.path.join(self.__workspace_path, EXE_NAME, 'Output', result_name) + self.__alg_xml_handler.write_out_para("BackScatteringProduct", self.__out_para) # 写入输出参数 + + logger.info('check_source success!') + logger.info('progress bar: 30%') + return True + + def __init_processing_paras(self, names, out_path): + """ + :param names:字典列表,每个字典为一个输入产品的配置信息 + """ + processing_paras = {} + for name in names: + para = self.__input_paras[name] + if para is None: + logger.error(name + "is None!") + return False + if para['ParaType'] == 'File': + if para['DataType'] == 'File': + processing_paras.update({name: para['ParaValue']}) + # if para['DataType'] == 'csv': + # para_value_list = para['ParaValue'].split(";") + # if len(para_value_list) == 1: + # para_path = para['ParaValue'] + # processing_paras.update({name: para_path}) + # else: + # for n, para_value in zip(range(len(para_value_list)), para_value_list): + # processing_paras.update({'feature'+str(n): para_value}) + # self.__feature_name_list.append('feature'+str(n)) + elif para['DataType'] == 'tar.gz': + paths = para['ParaValue'].split(';') + for path in paths: + tar_gz_dic = self.__dec_tar_gz(path, self.__workspace_preprocessing_path) + processing_paras.update(tar_gz_dic) + elif para['DataType'] == 'zip': + # temp_para = para['ParaValue'].split(".")[0] + para_value_list = para['ParaValue'].split(";") + if len(para_value_list) == 1: + para_path = para['ParaValue'] + if para_path != 'empty' and para_path != '': + file_path = BlockProcess.unzip_file(para_path, out_path) + processing_paras.update({name: os.path.dirname(file_path)}) + else: + file_path = DEMProcess.unzip_file(para['ParaValue'], out_path) + processing_paras.update({name: file_path}) + elif para['DataType'] == 'tif' or para['DataType'] == 'tiff': # 新增修改dem数据为文件绝对路径 + if para['ParaValue'] != 'empty' and para['ParaValue'] != 'Empty' and para['ParaValue'] != '': + para_path_list = para['ParaValue'].split(";") + if len(para_path_list) != 0: + dem_path = os.path.join(self.__workspace_origin_path, para['ParaName']) + if os.path.exists(dem_path) is False: + os.mkdir(dem_path) + for file_path in para_path_list: + tif_name = os.path.basename(file_path) + shutil.copy(file_path, os.path.join(dem_path, tif_name)) + para_path = os.path.join(self.__workspace_origin_path, para['ParaName']) + processing_paras.update({name: para_path}) + else: + para_path = para['ParaValue'] + processing_paras.update({name: para_path}) + elif para['ParaType'] == 'Value': + if para['DataType'] == 'float': + value = float(para['ParaValue']) + elif para['DataType'] == 'int': + value = int(para['ParaValue']) + else: # 默认string + value = para['ParaValue'] + processing_paras.update({name: value}) + return processing_paras + + def __dec_tar_gz(self, tar_gz_path, out_dir): + """ + 解压.tar_gz格式景影像文件 + :param tar_gz_path:.tar_gz文件路径 + :param out_dir:输出文件夹 + :return para_dic:全极化影像路径 + """ + # 创建文件夹 + name = os.path.split(tar_gz_path)[1].rstrip('.tar.gz') + file_dir = os.path.join(out_dir, name + '\\') + if os.path.exists(file_dir) is False: + os.makedirs(file_dir) + # 解压 + t = tarfile.open(tar_gz_path) + t.extractall(path=file_dir) + + # 获取文件夹内的文件 + para_dic = {} + # if os.path.exists(file_dir + name + '\\'): + # meta_xml_paths = list(glob.glob(os.path.join(file_dir + name, '*.meta.xml'))) + # para_dic.update({'SLC': file_dir + name}) + # else: + # meta_xml_paths = list(glob.glob(os.path.join(file_dir, '*.meta.xml'))) + # para_dic.update({'SLC': file_dir}) + if os.path.exists(file_dir + name + '\\'): + meta_xml_paths = list(glob.glob(os.path.join(file_dir + name, '*.xml'))) + if os.path.exists(meta_xml_paths[0]): + print(meta_xml_paths[0]) + para_dic.update({'META': meta_xml_paths[0]}) + para_dic.update({'SLC': file_dir + name}) + else: + meta_xml_paths = list(glob.glob(os.path.join(file_dir, '*.xml'))) + if os.path.exists(meta_xml_paths[0]): + print(meta_xml_paths[0]) + para_dic.update({'SLC': file_dir}) + para_dic.update({'META': meta_xml_paths[0]}) + + if meta_xml_paths == []: + raise Exception('there is not .meta.xml in path: ', file_dir + '\\') + # para_dic.update({'META': meta_xml_paths[0]}) + self.image_meta_xml = meta_xml_paths + return para_dic + + def __create_work_space(self): + """ + 删除原有工作区文件夹,创建新工作区文件夹 + """ + self.__workspace_preprocessing_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "preprocessing") # self.__workspace_path + EXE_NAME + r"\Temporary\preprocessing""\\" + self.__workspace_preprocessed_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "preprocessed") # self.__workspace_path + EXE_NAME + r"\Temporary\preprocessed""\\" + self.__workspace_processing_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary","processing\\") #self.__workspace_path + EXE_NAME + r"\Temporary\processing""\\" + self.__workspace_origin_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "origin") + path_list = [self.__workspace_preprocessing_path, self.__workspace_preprocessed_path, + self.__workspace_processing_path, self.__workspace_origin_path] + + for path in path_list: + if os.path.exists(path): + if DEBUG is True: + continue + self.del_floder(path) + os.makedirs(path) + else: + os.makedirs(path) + logger.info('create new workspace success!') + + def del_file(self, path_data): + """ + 只删除文件,不删除文件夹 + """ + if DEBUG is True: + return + for i in os.listdir(path_data): # os.listdir(path_data)#返回一个列表,里面是当前目录下面的所有东西的相对路径 + file_data = os.path.join(path_data, i) # path_data + "\\" + i # 当前文件夹的下面的所有东西的绝对路径 + if os.path.isfile(file_data) is True: # os.path.isfile判断是否为文件,如果是文件,就删除.如果是文件夹.递归给del_file. + os.remove(file_data) + else: + self.del_file(file_data) + @staticmethod + def del_floder(dic): + """ + 删除整个文件夹 + """ + if DEBUG is True: + return + if os.path.isdir(dic): + shutil.rmtree(dic) + + @staticmethod + def make_targz(output_filename, source_dir): + """ + 一次性打包整个根目录。空子目录会被打包。 + 如果只打包不压缩,将"w:gz"参数改为"w:"或"w"即可。 + :param output_filename:输出压缩包的完整路径,eg:'E:\test.tar.gz' + :param source_dir:需要打包的跟目录,eg: 'E:\testFfile\'打包文件夹里面的所有文件,'E:\testFfile'打包文件夹 + """ + dir = os.path.split(output_filename)[0] + if os.path.exists(dir) is False: + os.makedirs(dir) + with tarfile.open(output_filename, "w:gz") as tar: + tar.add(source_dir, arcname=os.path.basename(source_dir)) + + def del_temp_workspace(self): + """ + 临时工作区 + """ + if DEBUG is True: + return + path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary") # self.__workspace_path + EXE_NAME + r"\Temporary" + if os.path.exists(path): + self.del_floder(path) + + def process_sim_ori(self, sim_ori): + + scopes = () + scopes += (DictXml(self.__in_processing_paras['META']).get_extend(),) + intersect_polygon = pp().intersect_polygon(scopes) + if intersect_polygon is None: + raise Exception('create intersect shp fail!') + shp_path = os.path.join(self.__workspace_preprocessed_path, 'IntersectPolygon.shp') + if pp().write_polygon_shp(shp_path, intersect_polygon, 4326) is False: + raise Exception('create intersect shp fail!') + sim_ori_process = os.path.join(self.__workspace_preprocessed_path, 'sim_ori_process.tif') + pp().cut_img(sim_ori_process, sim_ori, shp_path) + return sim_ori_process + + def process_handle(self,start): + in_tif_paths = list(glob.glob(os.path.join(self.__in_processing_paras['SLC'], '*.tif'))) + if in_tif_paths == []: + in_tif_paths = list(glob.glob(os.path.join(self.__in_processing_paras['SLC'], '*.tiff'))) + + hh_flag, hv_flag, vh_flag, vv_flag, angle_flag = 0, 0, 0, 0, 0 + for in_tif_path in in_tif_paths: + if 'HH' in os.path.basename(in_tif_path): + hh_flag = 1 + elif 'HV' in os.path.basename(in_tif_path): + hv_flag = 1 + elif 'VH' in os.path.basename(in_tif_path): + vh_flag = 1 + elif 'VV' in os.path.basename(in_tif_path): + vv_flag = 1 + self.processinfo=[hh_flag, hv_flag, vh_flag, vv_flag] + + ref_tif_path = "" + meta_file_path = self.__in_processing_paras['META'] + rpc_path=None + + ####################### + # RD + ###################### + # 2.2 生成局地入射角 + path2 = env_str + print("path2:" + path2) + Orthorectification = IndirectOrthorectification(os.path.join(path2,"config.yaml")) + Orthorectification.IndirectOrthorectification(self.__in_processing_paras["SLC"], self.__workspace_processing_path) # 改动1 + # 2.3 输出结果 + + # 3 处理RD + # 合并DEM + Orth_Slc=[] + in_dem_path = self.__in_processing_paras['DEM'] + meta_file_path = self.__in_processing_paras['META'] # .meta文件路径 + out_dem_path = self.__workspace_preprocessing_path + dem_merged_path=DEMProcess.dem_merged(in_dem_path, meta_file_path, out_dem_path) # 生成TestDEM\mergedDEM_VRT.tif + + in_slc_path=None + for slc_path in in_tif_paths: + if slc_path.find(".tiff")>0 and (slc_path.find("_HH_")>0 or slc_path.find("_VV_")>0): + in_slc_path=slc_path + break + + # 获取校正模型后 + Orthorectification.preCaldem_sar_rc(dem_merged_path,in_slc_path,self.__workspace_preprocessing_path,self.__workspace_processing_path.replace("\\","\\\\")) # 初步筛选坐标范围 + logger.info('progress bar: 40%') + # clip_dem_reample_path=os.path.join(self.__workspace_preprocessing_path, "SAR_dem.tiff") + # infooption=gdal.InfoOptions("-json") + # clip_dem_tif_info=gdal.Info(clip_dem_reample_path,options=infooption) + # dem_merged_info=gdal.Info(dem_merged_path,options=infooption) + # sampling_f=clip_dem_tif_info['size'][0]/dem_merged_info['size'][0] + # 处理RD 的结果 + out_dir_path=self.__workspace_processing_path.replace("\\","\\\\") + this_outSpace_path = out_dir_path + this_out_dem_slantRange_path = os.path.join(out_dir_path, "dem_slantRange.tiff") # out_dir_path + "\\" + "dem_slantRange.tiff"#// 地形斜距 + this_out_plant_slantRange_path = os.path.join(out_dir_path, "flat_slantRange.tiff") # out_dir_path + "\\" + "flat_slantRange.tiff"#// 平地斜距 + # 保留结果 + if(os.path.exists(this_out_dem_slantRange_path)): + os.remove(this_out_dem_slantRange_path) + + if(os.path.exists(this_out_plant_slantRange_path)): + os.remove(this_out_plant_slantRange_path) + + + this_out_dem_rc_path = os.path.join(out_dir_path, "WGS_SAR_map.tiff") # out_dir_path + "\\" + "WGS_SAR_map.tiff"#// 经纬度与行列号映射 + if(os.path.exists(this_out_dem_rc_path)): + os.remove(this_out_dem_rc_path) + + this_out_sar_sim_path = out_dir_path + "\\" + "sar_sim.tiff" + if (os.path.exists(this_out_sar_sim_path)): + os.remove(this_out_sar_sim_path) + + this_out_sar_sim_wgs_path = out_dir_path + "\\" + "sar_sim_wgs.tiff" # // 经纬度与行列号映射 + if (os.path.exists(this_out_sar_sim_wgs_path)): + os.remove(this_out_sar_sim_wgs_path) + + this_out_incidence_path = os.path.join(out_dir_path, "incidentAngle.tiff") # out_dir_path + "\\" + "incidentAngle.tiff"#// 入射角 + this_out_localIncidenct_path = os.path.join(out_dir_path, "localIncidentAngle.tiff") # out_dir_path + "\\" + "localIncidentAngle.tiff"#// 局地入射角 + if(os.path.exists(this_out_incidence_path)): + shutil.move(this_out_incidence_path,os.path.join(out_dir_path, "inc_angle.tif")) # out_dir_path + "\\" + "inc_angle.tif") + if(os.path.exists(this_out_localIncidenct_path)): + shutil.move(this_out_localIncidenct_path, os.path.join(out_dir_path, "LocalIncidenceAngle.tif")) # out_dir_path + "\\" + "LocalIncidenceAngle.tif") + + this_out_inc_angle_rpc_path = os.path.join(out_dir_path, "RD_incidentAngle.tiff") # out_dir_path + "\\" + "RD_incidentAngle.tiff"#// 局地入射角 + this_out_local_inc_angle_rpc_path = os.path.join(out_dir_path, "RD_localIncidentAngle.tiff") # out_dir_path + "\\" + "RD_localIncidentAngle.tiff"#// 局地入射角 + if(os.path.exists(this_out_inc_angle_rpc_path)): + os.remove(this_out_inc_angle_rpc_path) + if(os.path.exists(this_out_local_inc_angle_rpc_path)): + os.remove(this_out_local_inc_angle_rpc_path) + + this_out_ori_sim_tiff = os.path.join(out_dir_path, "RD_ori_sim.tif") # out_dir_path + "\\" + "RD_ori_sim.tif"#// 局地入射角 + this_in_rpc_lon_lat_path = this_out_ori_sim_tiff + + this_out_sim_ori_tiff = os.path.join(out_dir_path, "RD_sim_ori.tif") + this_in_rpc_x_y_path = this_out_sim_ori_tiff + + # this_in_rpc_x_y_path_pro = self.process_sim_ori(this_in_rpc_x_y_path) + + parameter_path = os.path.join(self.__workspace_processing_path, "orth_para.txt") + + + for in_tif_path in in_tif_paths: + # out_tif_path = os.path.join(self.__workspace_preprocessing_path,os.path.splitext(os.path.basename(in_tif_path))[0]) + r"_lin.tif" + out_tif_path = os.path.join(self.__workspace_preprocessing_path,os.path.splitext(os.path.basename(in_tif_path))[0]) + r"_lin.tif" + if ('HH' in os.path.basename(in_tif_path)) or ('HV' in os.path.basename(in_tif_path)) or ('VH' in os.path.basename(in_tif_path)) or ('VV' in os.path.basename(in_tif_path)): + alg.sar_backscattering_coef(in_tif_path, meta_file_path, out_tif_path) + # 构建RPC + # 查找RPC + rpc_path=in_tif_path.replace(".tiff",".rpc") if os.path.exists(in_tif_path.replace(".tiff",".rpc")) else in_tif_path.replace(".tiff",".rpb") + if not os.path.exists(rpc_path): + logger.error('rpc not found!') + + # db->地理编码 + # lin_tif_path = os.path.join(self.__workspace_processing_path, + # os.path.splitext(os.path.basename(in_tif_path))[0]) + r"-cal.tif" + # Orthorectification.calInterpolation_cubic_Wgs84_rc_sar_sigma(parameter_path, this_in_rpc_x_y_path, + # out_tif_path, + # lin_tif_path) + # 线性->地理编码->db + lin_tif_path=os.path.join(self.__workspace_preprocessing_path,os.path.splitext(os.path.basename(in_tif_path))[0]) + r"-lin_geo.tif" + # Orthorectification.calInterpolation_cubic_Wgs84_rc_sar_sigma(parameter_path, this_in_rpc_x_y_path_pro, + # out_tif_path, + # lin_tif_path) + + Orthorectification.calInterpolation_bil_Wgs84_rc_sar_sigma(parameter_path, this_in_rpc_x_y_path, + out_tif_path, + lin_tif_path) + tempout_tif_path = os.path.join(self.__workspace_processing_path, + os.path.splitext(os.path.basename(in_tif_path))[0]) + r"-" + tar + r".tif" + alg.lin_to_db(lin_tif_path, tempout_tif_path) #线性值转回DB值 + + + # 移动RPC + #rpc_correction(in_tif_path,rpc_path,out_tif_path,dem_tif_file = None) + # Orthorectification.inter_Range2Geo(this_in_rpc_lon_lat_path,out_tif_path,tempout_tif_path,Orthorectification.heightspace) + + self.imageHandler.write_quick_view(tempout_tif_path, color_img=False) + # self.imageHandler.write_quick_view(lin_tif_path, color_img=False) + else: + shutil.copy(in_tif_path,self.__workspace_processing_path) + ref_tif_path = tempout_tif_path + # ref_tif_path = lin_tif_path + # 构建行列号映射表 + #out_rpc_rc_path = os.path.join(self.__workspace_processing_path,"RPC_ori_sim.tif") + #getRCImageRC(in_tif_path,out_rpc_rc_path,rpc_path) + logger.info('progress bar: 90%') + if(os.path.exists(this_in_rpc_lon_lat_path)): + os.remove(this_in_rpc_lon_lat_path) + # if (os.path.exists(this_in_rpc_x_y_path)): + # os.remove(this_in_rpc_x_y_path) + # out_mate_file_path = os.path.join(self.__workspace_processing_path,os.path.split(meta_file_path)[1].rstrip('.meta.xml') + '_DB.meta.xml') + out_mate_file_path = os.path.join(self.__workspace_processing_path,os.path.basename(meta_file_path)) + shutil.copy(meta_file_path, out_mate_file_path) + + if ref_tif_path != "": + # xml_path = "./model_meta.xml" + tem_folder = os.path.join(self.__workspace_path, EXE_NAME, "Temporary") + image_path = ref_tif_path + out_path1 = os.path.join(tem_folder, "trans_geo_projcs.tif") + out_path2 = os.path.join(tem_folder, "trans_projcs_geo.tif") + # par_dict = CreateDict(image_path, self.processinfo, out_path1, out_path2).calu_nature(start) + # model_xml_path = os.path.join(tem_folder, "creat_standa5rd.meta.xml") # 输出xml路径 + # CreateStadardXmlFile(xml_path, par_dict, model_xml_path).create_standard_xml() + # + SrcImageName = os.path.split(self.__input_paras["SLC"]['ParaValue'])[1].split('.tar.gz')[0] + # meta_xml_path = os.path.join(self.__workspace_processing_path, SrcImageName + "-cal.meta.xml") + # CreateMetafile(self.image_meta_xml[0], self.alg_xml_path, model_xml_path,meta_xml_path).process(SrcImageName) + + model_path = "./product.xml" + meta_xml_path = os.path.join(self.__workspace_processing_path, SrcImageName + "-" + tar + ".meta.xml") + + para_dict = CreateMetaDict(image_path, self.__in_processing_paras['META'], self.__workspace_processing_path, + out_path1, out_path2).calu_nature() + para_dict.update({"imageinfo_ProductName": "后向散射系数"}) + para_dict.update({"imageinfo_ProductIdentifier": "BackScattering"}) + para_dict.update({"imageinfo_ProductLevel": productLevel}) + para_dict.update({"ProductProductionInfo_BandSelection": "1,2"}) + para_dict.update({"ProductProductionInfo_AuxiliaryDataDescription": "DEM"}) + para_dict.update({"MetaInfo_UnitDes": "DB"}) # 设置单位 + CreateProductXml(para_dict, model_path, meta_xml_path).create_standard_xml() + + temp_folder = os.path.join(self.__workspace_path, EXE_NAME, 'Output') + out_xml = os.path.join(temp_folder, os.path.basename(meta_xml_path)) + if os.path.exists(temp_folder) is False: + os.mkdir(temp_folder) + # CreateProductXml(para_dict, model_path, out_xml).create_standard_xml() + shutil.copy(meta_xml_path, out_xml) + + self.make_targz(self.__out_para, self.__workspace_processing_path) + + logger.info('process_handle finished!') + logger.info('progress bar: 100%') + return True + + +if __name__ == '__main__': + start = datetime.datetime.now() + try: + if len(sys.argv)<2: + xml_path = 'BackScattering-S-SAR.xml' + else: + xml_path = sys.argv[1] + ScatteringMain = ScatteringMain(xml_path) + if not ScatteringMain.check_source(): + raise Exception('check_source() failed!') + if not ScatteringMain.process_handle(start): + raise Exception('process_handle() failed!') + logger.info('successful production of backscattering products!') + except Exception: + logger.exception("run-time error!") + finally: + ScatteringMain.del_temp_workspace() + # pass + + end = datetime.datetime.now() + msg = 'running use time: %s ' % (end - start) + logger.info(msg) diff --git a/backScattering/BackScatteringMain.spec b/backScattering/BackScatteringMain.spec new file mode 100644 index 0000000..73405a6 --- /dev/null +++ b/backScattering/BackScatteringMain.spec @@ -0,0 +1,40 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['BackScatteringMain.py'], + pathex=[], + binaries=[], + datas=[('D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')], + hiddenimports=['pyproj._compat'], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='BackScatteringMain', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None ) diff --git a/backScattering/BackScatteringXmlInfo.py b/backScattering/BackScatteringXmlInfo.py new file mode 100644 index 0000000..93b7c6e --- /dev/null +++ b/backScattering/BackScatteringXmlInfo.py @@ -0,0 +1,208 @@ +""" +@Project :microproduct +@File :BackScatteringXmlInfo.PY +@Function :主函数 +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" +import os +from xml.etree.ElementTree import ElementTree, Element +import xml.dom.minidom +from lxml import etree +import shutil +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.PreProcess import PreProcess as pp +from osgeo import gdal +import numpy as np +import datetime +from PIL import Image + + +class CreateDict: + """根据影像信息输出属性字典""" + def __init__(self, image_path, image_pair, out_path1, out_path2): + self.ImageHandler = ImageHandler() + self.para_dict = {} + self.image_path = image_path + self.out_path = out_path1 + self.out_path2 = out_path2 + self.image_pair = image_pair + pass + + def calu_nature(self,start): + """存入字典""" + + imageinfo_width=self.ImageHandler.get_img_width(self.image_path) + self.para_dict.update({"imageinfo_width":imageinfo_width}) + imageinfo_height=self.ImageHandler.get_img_height(self.image_path) + self.para_dict.update({"imageinfo_height":imageinfo_height}) + # imageinfo_EarthModel=self.ImageHandler.get_projection(self.image_path).split("SPHEROID[", 2)[1].split(",", 2)[0] + # self.para_dict.update({"imageinfo_EarthModel":imageinfo_EarthModel.replace('"','')}) + self.para_dict.update({"imageinfo_EarthModel": "WGS84"}) + # imageinfo_ProjectModel = self.ImageHandler.get_projection(self.image_path).split("DATUM[", 2)[1].split(",", 2)[0] + # self.para_dict.update({"imageinfo_ProjectModel":imageinfo_ProjectModel.replace('"','')}) + self.para_dict.update({"imageinfo_ProjectModel": "UTM"}) + proj = self.ImageHandler.get_projection(self.image_path) # 输出的影像若是投影坐标系则先转成地理坐标系 + keyword = proj.split("[", 2)[0] # 若是地理坐标系则pass + if keyword == "GEOGCS": + pass + elif keyword == "PROJCS": + pp.trans_projcs2geogcs(self.out_path2, self.image_path) + self.image_path = self.out_path2 + elif len(keyword) == 0 or keyword.strip() == "" or keyword.isspace() is True: + raise Exception('image projection is missing!') + + pp.trans_geogcs2projcs(self.out_path, self.image_path) # 坐标投影, 地理转平面投影坐标 + imageinfo_widthspace = self.ImageHandler.get_geotransform(self.out_path)[1] # 投影后的分辨率 + imageinfo_heightspace = -self.ImageHandler.get_geotransform(self.out_path)[5] # 投影后的分辨率 + self.para_dict.update({"imageinfo_widthspace":imageinfo_widthspace}) + self.para_dict.update({"imageinfo_heightspace":imageinfo_heightspace}) + + self.para_dict.update({"imageinfo_NearincidenceAngle": "0"}) + self.para_dict.update({"imageinfo_FarIncidenceAngle": "30"}) + self.para_dict.update({"imageinfo_Azimuth": "1"}) # todo 结果xml新增字节 + + self.para_dict.update({"NominalResolution":imageinfo_widthspace}) + + WidthInMeters = imageinfo_width*imageinfo_widthspace # 投影后的分辨率×宽度 + self.para_dict.update({"WidthInMeters":WidthInMeters}) + + # image_array = self.ImageHandler.get_band_array(self.image_path) + # a2 = np.where(np.isnan(image_array), 999999, image_array) + # MinValue = np.min(a2) + # a3 = np.where(np.isnan(image_array), -999999, image_array) + # MaxValue = np.max(a3) + # + # self.para_dict.update({"MaxValue":MaxValue}) + # self.para_dict.update({"MinValue":MinValue}) + + get_scope = self.ImageHandler.get_scope(self.image_path) + point_upleft, point_upright, point_downleft, point_downright=get_scope[0], get_scope[1], get_scope[2], get_scope[3] + self.para_dict.update({"imageinfo_corner_topLeft_latitude": point_upleft[1]}) + self.para_dict.update({"imageinfo_corner_topLeft_longitude": point_upleft[0]}) + self.para_dict.update({"imageinfo_corner_topRight_latitude": point_upright[1]}) + self.para_dict.update({"imageinfo_corner_topRight_longitude": point_upright[0]}) + self.para_dict.update({"imageinfo_corner_bottomLeft_latitude": point_downleft[1]}) + self.para_dict.update({"imageinfo_corner_bottomLeft_longitude": point_downleft[0]}) + self.para_dict.update({"imageinfo_corner_bottomRight_latitude": point_downright[1]}) + self.para_dict.update({"imageinfo_corner_bottomRight_longitude": point_downright[0]}) + + longitude_max=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).max() + longitude_min=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).min() + latitude_max=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).max() + latitude_min=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).min() + imageinfo_center_latitude=(latitude_max+latitude_min)/2 + imageinfo_center_longitude=(longitude_max+longitude_min)/2 + self.para_dict.update({"imageinfo_center_latitude": imageinfo_center_latitude}) + self.para_dict.update({"imageinfo_center_longitude": imageinfo_center_longitude}) + + self.para_dict.update({"productType": "GTC"}) # 设置产品类型 + self.para_dict.update({"productFormat": "TIF"}) + productGentime = datetime.datetime.now() + self.para_dict.update({"productGentime": productGentime}) + msg=productGentime-start + self.para_dict.update({"productConsumeTime": msg}) + self.para_dict.update({"unit": "none"}) # 设置单位 + self.para_dict.update({"NoDataValue": "nan"}) + self.para_dict.update({"productLevel": "1"}) # 设置图像位深度 + + image_array = self.ImageHandler.get_band_array(self.image_path) + try: + gdal_dtypes = { + 'int8': gdal.GDT_Byte, + 'unit16': gdal.GDT_UInt16, + 'int16': gdal.GDT_Int16, + 'unit32': gdal.GDT_UInt32, + 'int32': gdal.GDT_Int32, + 'float32': gdal.GDT_Float32, + 'float64': gdal.GDT_Float64, + } + bit_dtypes = { + 'int8': 8, + 'unit16': 16, + 'int16': 16, + 'unit32': 32, + 'int32': 32, + 'float32': 32, + 'float64': 64, + } + if not gdal_dtypes.get(image_array.dtype.name, None) is None: + bit_num = str(bit_dtypes[image_array.dtype.name]) + datatype=bit_num+"bit" + else: + datatype = str(32) + "bit" + # datatype = str(gdal.GDT_Float32)+"bit" + self.para_dict.update({"imagebit": datatype}) + except Exception: + self.para_dict.update({"imagebit": "None"}) + + HH, HV, VH ,VV= self.image_pair[0],self.image_pair[1],self.image_pair[2],self.image_pair[3] + if HH == 0: + HH = "delete" + else: + HH = "NULL" + self.para_dict.update({"imageinfo_QualifyValue_HH": HH}) + if HV==0: + HV = "delete" + else: + HV = "NULL" + self.para_dict.update({"imageinfo_QualifyValue_HV": HV}) + if VH==0: + VH = "delete" + else: + VH = "NULL" + self.para_dict.update({"imageinfo_QualifyValue_VH": VH}) + if VV==0: + VV = "delete" + else: + VV = "NULL" + self.para_dict.update({"imageinfo_QualifyValue_VV": VV}) + return self.para_dict + + +class CreateStadardXmlFile: + """读取字典中的属性值,生成一个标准的xml文件""" + def __init__(self, xml_path, par_dict, path): + """ + par_dict:字典 + path:xml模板输出路径 + """ + self.par_dict = par_dict + self.path = path + shutil.copy(xml_path, path) + pass + + def create_standard_xml(self): + """将字典中的信息写入到copy的xml文件中""" + tree = ElementTree() + tree.parse(self.path) # 影像头文件 + root = tree.getroot() + productinfo = root.find("productinfo") + for key, value in self.par_dict.items(): + if key.split("_")[0] != "imageinfo": + productinfo.find(key).text = str(value) + elif key.split("_")[0] == "imageinfo": + imageinfo = productinfo.find("imageinfo") + if key.split("_")[1] in ["EarthModel", "ProjectModel", "width", "height", "widthspace", "heightspace", + "NearincidenceAngle", "FarIncidenceAngle", "Azimuth"]: # todo 新增xml字节 + imageinfo.find(key.split("_")[1]).text = str(value) + elif key.split("_")[1] == "center": + center = imageinfo.find("center") + center.find(key.split("_")[2]).text = str(value) + elif key.split("_")[1] == "corner": + corner = imageinfo.find("corner") + corner.find(key.split("_")[2]).find(key.split("_")[3]).text = str(value) + elif key.split("_")[1] == "QualifyValue": + QualifyValue = imageinfo.find("QualifyValue") + if value =="delete": + element_QualifyValue = list(QualifyValue) + for i in element_QualifyValue: + if i.tag == key.split("_")[2]: + QualifyValue.remove(i) + else: + QualifyValue.find(key.split("_")[2]).text = str(value) + pass + processinfo = root.find("processinfo") + tree.write(self.path, encoding="utf-8", xml_declaration=True) + diff --git a/backScattering/OrthoAuxData.py b/backScattering/OrthoAuxData.py new file mode 100644 index 0000000..8f443cc --- /dev/null +++ b/backScattering/OrthoAuxData.py @@ -0,0 +1,415 @@ +# 一米正射辅助数据处理类 +import time +import math +import numpy as np +from osgeo import gdal +from xml.etree.ElementTree import ElementTree +from scipy.optimize import leastsq + + +class OrthoAuxData: + def __init__(self): + pass + + @staticmethod + def time_stamp(tm): + list = tm.split(':') + sec = math.ceil(float(list[2])) + tm1 = list[0] + ':' + list[1] + ':' + str(sec) + tmArr = time.strptime(tm1, "%Y-%m-%d %H:%M:%S") + # tmArr = time.strptime(tm1, "%Y-%m-%d %H:%M:%S.%f") + ts = float(time.mktime(tmArr)) # 转换为时间戳 + return ts + + @staticmethod + def read_meta(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + T = [] + Xs = [] + Ys = [] + Zs = [] + Vsx = [] + Vsy = [] + Vsz = [] + GPS_data = root.find('GPS') + for child in GPS_data: + Xs.append(float(child.find('xPosition').text)) + Ys.append(float(child.find('yPosition').text)) + Zs.append(float(child.find('zPosition').text)) + Vsx.append(float(child.find('xVelocity').text)) + Vsy.append(float(child.find('yVelocity').text)) + Vsz.append(float(child.find('zVelocity').text)) + tm = child.find('TimeStamp').text + ts = OrthoAuxData.time_stamp(tm) + T.append(ts) + meta_data = [Xs, Ys, Zs, Vsx, Vsy, Vsz] + return T, meta_data + + @staticmethod + def read_control_points(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + center = imageinfo.find('center') + corner = imageinfo.find('corner') + ctrl_pts = [[] for i in range(2)] + ctrl_pts[0].append(float(center.find('longitude').text)) + ctrl_pts[1].append(float(center.find('latitude').text)) + + for child in corner: + ctrl_pts[0].append(float(child.find('longitude').text)) + ctrl_pts[1].append(float(child.find('latitude').text)) + return ctrl_pts + + @staticmethod + def read_dem(dem_resampled_path, flag=1): + in_ds = gdal.Open(dem_resampled_path) + gt = list(in_ds.GetGeoTransform()) + bands_num = in_ds.RasterCount + x_size = in_ds.RasterXSize + y_size = in_ds.RasterYSize + pstn_arr = np.zeros([y_size, x_size, 3], dtype=np.float) + for i in range(1, bands_num + 1): + data = in_ds.GetRasterBand(i).ReadAsArray(0, 0, x_size, y_size) + for y in range(y_size): + for x in range(x_size): + longitude = gt[0] + x * gt[1] + latitude = gt[3] + y * gt[5] + altitude = data[y, x] + if flag == 1: + pstn = OrthoAuxData.LLA2XYZ(longitude, latitude, altitude) + else: + pstn = [longitude, latitude, altitude] + pstn_arr[y, x, 0] = pstn[0] + pstn_arr[y, x, 1] = pstn[1] + pstn_arr[y, x, 2] = pstn[2] + + del in_ds, data + return pstn_arr + + @staticmethod + def read_demM(dem_resampled_path, part_cnt, r_cnt, c_cnt, flag=1): + in_ds = gdal.Open(dem_resampled_path) + gt = list(in_ds.GetGeoTransform()) + bands_num = in_ds.RasterCount + x_size = in_ds.RasterXSize // part_cnt + y_size = in_ds.RasterYSize // part_cnt + x = [[i] * y_size for i in range(x_size)] + y = [[i] * x_size for i in range(y_size)] + x = np.array(x) + x = x.T + y = np.array(y) + x_off = c_cnt * x_size + y_off = r_cnt * y_size + gt[0] = gt[0] + c_cnt * x_size * gt[1] + gt[3] = gt[3] + r_cnt * y_size * gt[5] + for i in range(1, bands_num + 1): + data = in_ds.GetRasterBand(i).ReadAsArray(x_off, y_off, x_size, y_size) + altitude = data / 255 * 1024 + longitude = gt[0] + x * gt[1] + latitude = gt[3] + y * gt[5] + if flag == 1: + pstn = OrthoAuxData.LLA2XYZM(longitude, latitude, altitude) + else: + pstn = [longitude, latitude, altitude] + + del in_ds, data + return pstn + + @staticmethod + def read_dem_row(dem_resampled_path, p, flag=1): + in_ds = gdal.Open(dem_resampled_path) + gt = list(in_ds.GetGeoTransform()) + bands_num = in_ds.RasterCount + x_size = in_ds.RasterXSize + y_size = in_ds.RasterYSize + + x = [[i] for i in range(x_size)] + x = np.array(x) + x = x.T + y = np.ones((1, x_size)) * p + x_off = 0 + y_off = p + for i in range(1, bands_num + 1): + data = in_ds.GetRasterBand(i).ReadAsArray(x_off, y_off, x_size, 1) + altitude = data + longitude = gt[0] + x * gt[1] + latitude = gt[3] + y * gt[5] + if flag == 1: + pstn = OrthoAuxData.LLA2XYZM(longitude, latitude, altitude) + else: + pstn = [longitude, latitude, altitude] + + del in_ds, data + return pstn + + @staticmethod + def orbit_fitting(time_array, meta_data): + # 最小二乘法求解轨道参数 + T0 = (time_array[0] + time_array[len(time_array)-1]) / 2 + t = [] + for i in range(len(time_array)): + t.append(time_array[i]-T0) + + def func(p, x): + w3, w2, w1, w0 = p + return w3*x**3 + w2*x**2 + w1*x + w0 + + def error(p, x, y): + return func(p, x) - y + + orbital_paras = [] + for j in range(len(meta_data)): + p0 = [1, 2, 3, 4] + x = np.array(t) + y = np.array(meta_data[j]) + Para = leastsq(error, p0, args=(x, y)) + orbital_paras.append(Para[0]) + print(Para[0], Para[1]) + + return orbital_paras, T0 + + @staticmethod + def get_PRF(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + sensor = root.find('sensor') + waveParams = sensor.find('waveParams') + PRF = float(waveParams.find('wave').find('prf').text) + return PRF + + @staticmethod + def get_delta_R(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + sensor = root.find('sensor') + pulseWidth = float(sensor.find('waveParams').find('wave').find('pulseWidth').text) + bandWidth = float(sensor.find('waveParams').find('wave').find('bandWidth').text) + c = 299792458 + delta_R = c / (1000000 * 2 * bandWidth) + return delta_R + + @staticmethod + def get_doppler_rate_coef(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + processinfo = root.find('processinfo') + doppler = processinfo.find('DopplerRateValuesCoefficients') + t0 = float(processinfo.find('DopplerParametersReferenceTime').text) + r0 = float(doppler.find('r0').text) + r1 = float(doppler.find('r1').text) + r2 = float(doppler.find('r2').text) + r3 = float(doppler.find('r3').text) + r4 = float(doppler.find('r4').text) + + return t0, np.array([r0, r1, r2, r3, r4]).reshape(5, 1) + + @staticmethod + def get_doppler_center_coef(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + processinfo = root.find('processinfo') + doppler = processinfo.find('DopplerCentroidCoefficients') + b0 = float(doppler.find('d0').text) + b1 = float(doppler.find('d1').text) + b2 = float(doppler.find('d2').text) + return b0, b1, b2 + + @staticmethod + def get_lamda(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + sensor = root.find('sensor') + λ = float(sensor.find('lamda').text) + return λ + + @staticmethod + def get_t0(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + tm = imageinfo.find('imagingTime').find('start').text + t0 = OrthoAuxData.time_stamp(tm) + return t0 + + @staticmethod + def get_start_and_end_time(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + tm0 = imageinfo.find('imagingTime').find('start').text + tm1 = imageinfo.find('imagingTime').find('end').text + starttime = OrthoAuxData.time_stamp(tm0) + endtime = OrthoAuxData.time_stamp(tm1) + return starttime, endtime + + @staticmethod + def get_width_and_height(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + width = int(imageinfo.find('width').text) + height = int(imageinfo.find('height').text) + return width, height + + @staticmethod + def get_R0(meta_file_path): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + imageinfo = root.find('imageinfo') + R0 = float(imageinfo.find('nearRange').text) + return R0 + + @staticmethod + def get_h(): + h = 6.6 + return h + + @staticmethod + def LLA2XYZ(longitude, latitude, altitude): + ''' + WGS-84坐标系下:经纬度坐标转空间直角坐标 + ''' + # 经纬度余弦值 + cosLat = math.cos(latitude * math.pi / 180) + sinLat = math.sin(latitude * math.pi / 180) + cosLon = math.cos(longitude * math.pi / 180) + sinLon = math.sin(longitude * math.pi / 180) + # WGS84坐标系参数 + rad = 6378137.0 #地球赤道平均半径 + f = 1.0/298.257224 #WGS84椭球扁率 + C = 1.0/math.sqrt(cosLat*cosLat + (1-f)*(1-f)*sinLat*sinLat) + S = (1-f)*(1-f)*C + h = altitude + # 计算XYZ坐标 + X = (rad * C + h) * cosLat * cosLon + Y = (rad * C + h) * cosLat * sinLon + Z = (rad * S + h) * sinLat + # return np.array([X, Y, Z]).reshape(1,3) + return [X, Y, Z] + + @staticmethod + def LLA2XYZM(longitude, latitude, altitude): + # 经纬度余弦值 + cosLat = np.cos(latitude * math.pi / 180).reshape(-1,1) + sinLat = np.sin(latitude * math.pi / 180).reshape(-1,1) + cosLon = np.cos(longitude * math.pi / 180).reshape(-1,1) + sinLon = np.sin(longitude * math.pi / 180).reshape(-1,1) + # WGS84坐标系参数 + rad = 6378137.0 #地球赤道平均半径 + f = 1.0/298.257224 #WGS84椭球扁率 + C = 1.0/(np.sqrt(cosLat*cosLat + (1-f)*(1-f)*sinLat*sinLat)).reshape(-1,1) + S = (1-f)*(1-f)*C + h = altitude.reshape(-1,1) + # 计算XYZ坐标 + X = (rad * C + h) * cosLat * cosLon + Y = (rad * C + h) * cosLat * sinLon + Z = (rad * S + h) * sinLat + return [X, Y, Z] + + @staticmethod + def XYZ2LLA(X, Y, Z): + ''' 大地坐标系转经纬度 + 适用于WGS84坐标系 + args: + x,y,z + return: + lat,long,altitude + ''' + # WGS84坐标系的参数 + a = 6378137.0 # 椭球长半轴 + b = 6356752.314245 # 椭球短半轴 + ea = np.sqrt((a ** 2 - b ** 2) / a ** 2) + eb = np.sqrt((a ** 2 - b ** 2) / b ** 2) + p = np.sqrt(X ** 2 + Y ** 2) + theta = np.arctan2(Z * a, p * b) + + # 计算经纬度及海拔 + longitude = np.arctan2(Y, X) + latitude = np.arctan2(Z + eb ** 2 * b * np.sin(theta) ** 3, p - ea ** 2 * a * np.cos(theta) ** 3) + N = a / np.sqrt(1 - ea ** 2 * np.sin(latitude) ** 2) + altitude = p / np.cos(latitude) - N + + # return np.array([np.degrees(latitude), np.degrees(longitude), altitude]) + return [np.degrees(longitude), np.degrees(latitude), altitude] + + @staticmethod + def XYZ2LLAM(X, Y, Z): + ''' 大地坐标系转经纬度 + 适用于WGS84坐标系 + args: + x,y,z + return: + lat,long,altitude + ''' + # WGS84坐标系的参数 + a = 6378137.0 # 椭球长半轴 + b = 6356752.314245 # 椭球短半轴 + ea = np.sqrt((a ** 2 - b ** 2) / a ** 2) + eb = np.sqrt((a ** 2 - b ** 2) / b ** 2) + p = np.sqrt(X ** 2 + Y ** 2) + theta = np.arctan2(Z * a, p * b) + + # 计算经纬度及海拔 + longitude = np.arctan2(Y, X) + latitude = np.arctan2(Z + eb ** 2 * b * np.sin(theta) ** 3, p - ea ** 2 * a * np.cos(theta) ** 3) + N = a / np.sqrt(1 - ea ** 2 * np.sin(latitude) ** 2) + altitude = p / np.cos(latitude) - N + + # return np.array([np.degrees(latitude), np.degrees(longitude), altitude]) + return [np.degrees(longitude), np.degrees(latitude), altitude] + + @staticmethod + def world2Pixel(geoMatrix, x, y): + """ + 使用GDAL库的geomatrix对象((gdal.GetGeoTransform()))计算地理坐标的像素位置 + """ + ulx = geoMatrix[0] + uly = geoMatrix[3] + xDist = geoMatrix[1] + yDist = geoMatrix[5] + rtnX = geoMatrix[2] + rtnY = geoMatrix[4] + pixel = int((x - ulx) / xDist) + line = int((uly - y) / abs(yDist)) + return pixel, line + + @staticmethod + def sar_intensity_synthesis(in_sar_tif, out_sar_tif): + # 获取SLC格式SAR影像的相关信息 + in_ds = gdal.Open(in_sar_tif) + bands_num = in_ds.RasterCount + rows = in_ds.RasterYSize + columns = in_ds.RasterXSize + proj = in_ds.GetProjection() + geotrans = in_ds.GetGeoTransform() + + # 创建输出的SAR强度图 + gtiff_driver = gdal.GetDriverByName('GTiff') + out_ds = gtiff_driver.Create(out_sar_tif, columns, rows, 1) + out_ds.SetProjection(proj) + out_ds.SetGeoTransform(geotrans) + + # 输出SAR强度图 + in_data1 = in_ds.GetRasterBand(1).ReadAsArray(0, 0, columns, rows) + in_data1 = in_data1/10 + in_data1 = np.power(10, in_data1) + in_data2 = in_ds.GetRasterBand(2).ReadAsArray(0, 0, columns, rows) + in_data2 = in_data2 / 10 + in_data2 = np.power(10, in_data2) + out_data = np.sqrt(in_data1**2 + in_data2**2) + out_ds.GetRasterBand(1).WriteArray(out_data) + + del in_ds, out_ds diff --git a/backScattering/baseTool/x64/Release/ImageMatch.obj b/backScattering/baseTool/x64/Release/ImageMatch.obj new file mode 100644 index 0000000..2dffc26 Binary files /dev/null and b/backScattering/baseTool/x64/Release/ImageMatch.obj differ diff --git a/backScattering/baseTool/x64/Release/LIBPQ.dll b/backScattering/baseTool/x64/Release/LIBPQ.dll new file mode 100644 index 0000000..21f1003 Binary files /dev/null and b/backScattering/baseTool/x64/Release/LIBPQ.dll differ diff --git a/backScattering/baseTool/x64/Release/Lerc.dll b/backScattering/baseTool/x64/Release/Lerc.dll new file mode 100644 index 0000000..29513ed Binary files /dev/null and b/backScattering/baseTool/x64/Release/Lerc.dll differ diff --git a/backScattering/baseTool/x64/Release/OctreeNode.obj b/backScattering/baseTool/x64/Release/OctreeNode.obj new file mode 100644 index 0000000..3d22e50 Binary files /dev/null and b/backScattering/baseTool/x64/Release/OctreeNode.obj differ diff --git a/backScattering/baseTool/x64/Release/RPC_Correct.obj b/backScattering/baseTool/x64/Release/RPC_Correct.obj new file mode 100644 index 0000000..4b6479f Binary files /dev/null and b/backScattering/baseTool/x64/Release/RPC_Correct.obj differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog new file mode 100644 index 0000000..fec0179 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog new file mode 100644 index 0000000..79c356d Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.15452.write.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.15452.write.1.tlog new file mode 100644 index 0000000..2b7d2b4 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.15452.write.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog new file mode 100644 index 0000000..4727173 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog new file mode 100644 index 0000000..c45d321 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog new file mode 100644 index 0000000..b56a673 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog new file mode 100644 index 0000000..605eacb Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate new file mode 100644 index 0000000..a4d4182 --- /dev/null +++ b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:VcpkgTriplet=x64-windows: +Release|x64|D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\| diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog new file mode 100644 index 0000000..024973f Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog new file mode 100644 index 0000000..71d26aa Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog new file mode 100644 index 0000000..6b36871 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog new file mode 100644 index 0000000..e69aabe Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog new file mode 100644 index 0000000..4d44e42 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog new file mode 100644 index 0000000..7404a57 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog new file mode 100644 index 0000000..af942f2 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog differ diff --git a/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.Build.CppClean.log b/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.Build.CppClean.log new file mode 100644 index 0000000..ef0c252 --- /dev/null +++ b/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.Build.CppClean.log @@ -0,0 +1,70 @@ +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simptsn.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\rpc_correct.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\imagematch.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\sateorbit.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\octreenode.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\test_moudel.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\basetool.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\interpolation.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vc142.pdb +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\concrt140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_atomic_wait.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_codecvt_ids.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vccorlib140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcruntime140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcruntime140_1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcamp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcomp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram-s-sar.exe +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram-s-sar.pdb +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram.res +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\boost_filesystem-vc142-mt-x64-1_82.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\gdal.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\zlib1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libcrypto-3-x64.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libssl-3-x64.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\liblzma.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\qhull_r.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\jpeg62.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\tiff.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\geotiff.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\proj.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\sqlite3.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libcurl.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libpng16.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\lerc.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\zstd.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\gif.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\netcdf.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\hdf5_hl.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\hdf5.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libwebp.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libsharpyuv.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libpq.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\pcre2-8.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libexpat.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libxml2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\iconv-2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\geos_c.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\geos.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\json-c.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\openjp2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\spatialite.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\freexl-1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\minizip.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\cl.11472.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\cl.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\cl.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\copylocal.read.1u.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\copylocal.write.1u.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\link.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\link.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\link.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\rc.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\rc.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\rc.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\simorthoprogram-s-sar.write.1u.tlog diff --git a/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe b/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe new file mode 100644 index 0000000..7045b35 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe differ diff --git a/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe b/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe new file mode 100644 index 0000000..80ff377 --- /dev/null +++ b/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe @@ -0,0 +1,11 @@ + + + + + D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe + + + + + + \ No newline at end of file diff --git a/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb b/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb new file mode 100644 index 0000000..934bf10 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb differ diff --git a/backScattering/baseTool/x64/Release/SIMOrthoProgram.log b/backScattering/baseTool/x64/Release/SIMOrthoProgram.log new file mode 100644 index 0000000..912d2d6 --- /dev/null +++ b/backScattering/baseTool/x64/Release/SIMOrthoProgram.log @@ -0,0 +1,59 @@ + baseTool.cpp + ImageMatch.cpp + interpolation.cpp + OctreeNode.cpp + RPC_Correct.cpp + simptsn.cpp + SateOrbit.cpp + SIMOrthoProgram.cpp + test_moudel.cpp +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 test_moudel.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 SateOrbit.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 baseTool.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 simptsn.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\test_moudel.cpp(224,31): warning C4129: “R”: 不可识别的字符转义序列 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.cpp(500,18): warning C4154: 删除数组表达式;转换到提供的指针 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.cpp(942,28): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.cpp(944,47): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(469,15): warning C4101: “asfclass”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 ImageMatch.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(1239,7): warning C4101: “temp_r”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(1239,15): warning C4101: “temp_c”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3170,18): warning C4101: “snr”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,17): warning C4101: “r2”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,37): warning C4101: “c3”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3170,15): warning C4101: “c”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,33): warning C4101: “c2”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,21): warning C4101: “r3”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3170,12): warning C4101: “r”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3327,36): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3327,54): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3328,35): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3328,54): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3352,24): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3353,22): warning C4838: 从“int”转换到“double”需要收缩转换 + LINK : 已指定 /LTCG,但不需要生成代码;从链接命令行中移除 /LTCG 以提高链接器性能 + SIMOrthoProgram.vcxproj -> D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe diff --git a/backScattering/baseTool/x64/Release/SIMOrthoProgram.obj b/backScattering/baseTool/x64/Release/SIMOrthoProgram.obj new file mode 100644 index 0000000..17450ec Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrthoProgram.obj differ diff --git a/backScattering/baseTool/x64/Release/SIMOrthoProgram.res b/backScattering/baseTool/x64/Release/SIMOrthoProgram.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/backScattering/baseTool/x64/Release/SIMOrthoProgram.res differ diff --git a/backScattering/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete b/backScattering/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/backScattering/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt b/backScattering/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..a08de7c --- /dev/null +++ b/backScattering/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt @@ -0,0 +1,47 @@ +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram.vcxproj.CopyComplete +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\concrt140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_atomic_wait.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_codecvt_ids.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vccorlib140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcruntime140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcruntime140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcamp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcomp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\boost_filesystem-vc142-mt-x64-1_82.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gdal.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zlib1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcrypto-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libssl-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\liblzma.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\qhull_r.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\jpeg62.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\tiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geotiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\proj.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\sqlite3.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcurl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libpng16.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\Lerc.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zstd.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gif.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\netcdf.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5_hl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libwebp.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libsharpyuv.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\LIBPQ.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\pcre2-8.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libexpat.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libxml2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\iconv-2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos_c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\json-c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\openjp2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\spatialite.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\freexl-1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\minizip.dll diff --git a/backScattering/baseTool/x64/Release/SateOrbit.obj b/backScattering/baseTool/x64/Release/SateOrbit.obj new file mode 100644 index 0000000..b70006e Binary files /dev/null and b/backScattering/baseTool/x64/Release/SateOrbit.obj differ diff --git a/backScattering/baseTool/x64/Release/baseTool.obj b/backScattering/baseTool/x64/Release/baseTool.obj new file mode 100644 index 0000000..c3806e0 Binary files /dev/null and b/backScattering/baseTool/x64/Release/baseTool.obj differ diff --git a/backScattering/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll b/backScattering/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll new file mode 100644 index 0000000..f5c136f Binary files /dev/null and b/backScattering/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll differ diff --git a/backScattering/baseTool/x64/Release/concrt140.dll b/backScattering/baseTool/x64/Release/concrt140.dll new file mode 100644 index 0000000..9752449 Binary files /dev/null and b/backScattering/baseTool/x64/Release/concrt140.dll differ diff --git a/backScattering/baseTool/x64/Release/freexl-1.dll b/backScattering/baseTool/x64/Release/freexl-1.dll new file mode 100644 index 0000000..9145a7d Binary files /dev/null and b/backScattering/baseTool/x64/Release/freexl-1.dll differ diff --git a/backScattering/baseTool/x64/Release/gdal.dll b/backScattering/baseTool/x64/Release/gdal.dll new file mode 100644 index 0000000..bda7c20 Binary files /dev/null and b/backScattering/baseTool/x64/Release/gdal.dll differ diff --git a/backScattering/baseTool/x64/Release/geos.dll b/backScattering/baseTool/x64/Release/geos.dll new file mode 100644 index 0000000..2edcb83 Binary files /dev/null and b/backScattering/baseTool/x64/Release/geos.dll differ diff --git a/backScattering/baseTool/x64/Release/geos_c.dll b/backScattering/baseTool/x64/Release/geos_c.dll new file mode 100644 index 0000000..d358b2a Binary files /dev/null and b/backScattering/baseTool/x64/Release/geos_c.dll differ diff --git a/backScattering/baseTool/x64/Release/geotiff.dll b/backScattering/baseTool/x64/Release/geotiff.dll new file mode 100644 index 0000000..f513a51 Binary files /dev/null and b/backScattering/baseTool/x64/Release/geotiff.dll differ diff --git a/backScattering/baseTool/x64/Release/gif.dll b/backScattering/baseTool/x64/Release/gif.dll new file mode 100644 index 0000000..27fdc78 Binary files /dev/null and b/backScattering/baseTool/x64/Release/gif.dll differ diff --git a/backScattering/baseTool/x64/Release/hdf5.dll b/backScattering/baseTool/x64/Release/hdf5.dll new file mode 100644 index 0000000..97fd469 Binary files /dev/null and b/backScattering/baseTool/x64/Release/hdf5.dll differ diff --git a/backScattering/baseTool/x64/Release/hdf5_hl.dll b/backScattering/baseTool/x64/Release/hdf5_hl.dll new file mode 100644 index 0000000..7da3e86 Binary files /dev/null and b/backScattering/baseTool/x64/Release/hdf5_hl.dll differ diff --git a/backScattering/baseTool/x64/Release/iconv-2.dll b/backScattering/baseTool/x64/Release/iconv-2.dll new file mode 100644 index 0000000..29c175c Binary files /dev/null and b/backScattering/baseTool/x64/Release/iconv-2.dll differ diff --git a/backScattering/baseTool/x64/Release/interpolation.obj b/backScattering/baseTool/x64/Release/interpolation.obj new file mode 100644 index 0000000..29cb9cc Binary files /dev/null and b/backScattering/baseTool/x64/Release/interpolation.obj differ diff --git a/backScattering/baseTool/x64/Release/jpeg62.dll b/backScattering/baseTool/x64/Release/jpeg62.dll new file mode 100644 index 0000000..9c1a2c0 Binary files /dev/null and b/backScattering/baseTool/x64/Release/jpeg62.dll differ diff --git a/backScattering/baseTool/x64/Release/json-c.dll b/backScattering/baseTool/x64/Release/json-c.dll new file mode 100644 index 0000000..abbb168 Binary files /dev/null and b/backScattering/baseTool/x64/Release/json-c.dll differ diff --git a/backScattering/baseTool/x64/Release/libcrypto-3-x64.dll b/backScattering/baseTool/x64/Release/libcrypto-3-x64.dll new file mode 100644 index 0000000..a0ee3e3 Binary files /dev/null and b/backScattering/baseTool/x64/Release/libcrypto-3-x64.dll differ diff --git a/backScattering/baseTool/x64/Release/libcurl.dll b/backScattering/baseTool/x64/Release/libcurl.dll new file mode 100644 index 0000000..647bdc6 Binary files /dev/null and b/backScattering/baseTool/x64/Release/libcurl.dll differ diff --git a/backScattering/baseTool/x64/Release/libexpat.dll b/backScattering/baseTool/x64/Release/libexpat.dll new file mode 100644 index 0000000..6cea742 Binary files /dev/null and b/backScattering/baseTool/x64/Release/libexpat.dll differ diff --git a/backScattering/baseTool/x64/Release/liblzma.dll b/backScattering/baseTool/x64/Release/liblzma.dll new file mode 100644 index 0000000..44372c5 Binary files /dev/null and b/backScattering/baseTool/x64/Release/liblzma.dll differ diff --git a/backScattering/baseTool/x64/Release/libpng16.dll b/backScattering/baseTool/x64/Release/libpng16.dll new file mode 100644 index 0000000..c06222a Binary files /dev/null and b/backScattering/baseTool/x64/Release/libpng16.dll differ diff --git a/backScattering/baseTool/x64/Release/libsharpyuv.dll b/backScattering/baseTool/x64/Release/libsharpyuv.dll new file mode 100644 index 0000000..e6c1b52 Binary files /dev/null and b/backScattering/baseTool/x64/Release/libsharpyuv.dll differ diff --git a/backScattering/baseTool/x64/Release/libssl-3-x64.dll b/backScattering/baseTool/x64/Release/libssl-3-x64.dll new file mode 100644 index 0000000..4856e67 Binary files /dev/null and b/backScattering/baseTool/x64/Release/libssl-3-x64.dll differ diff --git a/backScattering/baseTool/x64/Release/libwebp.dll b/backScattering/baseTool/x64/Release/libwebp.dll new file mode 100644 index 0000000..e758fc8 Binary files /dev/null and b/backScattering/baseTool/x64/Release/libwebp.dll differ diff --git a/backScattering/baseTool/x64/Release/libxml2.dll b/backScattering/baseTool/x64/Release/libxml2.dll new file mode 100644 index 0000000..1e2599f Binary files /dev/null and b/backScattering/baseTool/x64/Release/libxml2.dll differ diff --git a/backScattering/baseTool/x64/Release/minizip.dll b/backScattering/baseTool/x64/Release/minizip.dll new file mode 100644 index 0000000..44f5e99 Binary files /dev/null and b/backScattering/baseTool/x64/Release/minizip.dll differ diff --git a/backScattering/baseTool/x64/Release/msvcp140.dll b/backScattering/baseTool/x64/Release/msvcp140.dll new file mode 100644 index 0000000..130f84a Binary files /dev/null and b/backScattering/baseTool/x64/Release/msvcp140.dll differ diff --git a/backScattering/baseTool/x64/Release/msvcp140_1.dll b/backScattering/baseTool/x64/Release/msvcp140_1.dll new file mode 100644 index 0000000..5c2f46d Binary files /dev/null and b/backScattering/baseTool/x64/Release/msvcp140_1.dll differ diff --git a/backScattering/baseTool/x64/Release/msvcp140_2.dll b/backScattering/baseTool/x64/Release/msvcp140_2.dll new file mode 100644 index 0000000..737b70a Binary files /dev/null and b/backScattering/baseTool/x64/Release/msvcp140_2.dll differ diff --git a/backScattering/baseTool/x64/Release/msvcp140_atomic_wait.dll b/backScattering/baseTool/x64/Release/msvcp140_atomic_wait.dll new file mode 100644 index 0000000..c92fcc3 Binary files /dev/null and b/backScattering/baseTool/x64/Release/msvcp140_atomic_wait.dll differ diff --git a/backScattering/baseTool/x64/Release/msvcp140_codecvt_ids.dll b/backScattering/baseTool/x64/Release/msvcp140_codecvt_ids.dll new file mode 100644 index 0000000..9879454 Binary files /dev/null and b/backScattering/baseTool/x64/Release/msvcp140_codecvt_ids.dll differ diff --git a/backScattering/baseTool/x64/Release/netcdf.dll b/backScattering/baseTool/x64/Release/netcdf.dll new file mode 100644 index 0000000..e1cbbf1 Binary files /dev/null and b/backScattering/baseTool/x64/Release/netcdf.dll differ diff --git a/backScattering/baseTool/x64/Release/openjp2.dll b/backScattering/baseTool/x64/Release/openjp2.dll new file mode 100644 index 0000000..d6c8011 Binary files /dev/null and b/backScattering/baseTool/x64/Release/openjp2.dll differ diff --git a/backScattering/baseTool/x64/Release/pcre2-8.dll b/backScattering/baseTool/x64/Release/pcre2-8.dll new file mode 100644 index 0000000..d047b3c Binary files /dev/null and b/backScattering/baseTool/x64/Release/pcre2-8.dll differ diff --git a/backScattering/baseTool/x64/Release/proj.db b/backScattering/baseTool/x64/Release/proj.db new file mode 100644 index 0000000..7780dbe Binary files /dev/null and b/backScattering/baseTool/x64/Release/proj.db differ diff --git a/backScattering/baseTool/x64/Release/proj.dll b/backScattering/baseTool/x64/Release/proj.dll new file mode 100644 index 0000000..f4f6147 Binary files /dev/null and b/backScattering/baseTool/x64/Release/proj.dll differ diff --git a/backScattering/baseTool/x64/Release/qhull_r.dll b/backScattering/baseTool/x64/Release/qhull_r.dll new file mode 100644 index 0000000..0267c70 Binary files /dev/null and b/backScattering/baseTool/x64/Release/qhull_r.dll differ diff --git a/backScattering/baseTool/x64/Release/simptsn.obj b/backScattering/baseTool/x64/Release/simptsn.obj new file mode 100644 index 0000000..7795393 Binary files /dev/null and b/backScattering/baseTool/x64/Release/simptsn.obj differ diff --git a/backScattering/baseTool/x64/Release/spatialite.dll b/backScattering/baseTool/x64/Release/spatialite.dll new file mode 100644 index 0000000..165b6e1 Binary files /dev/null and b/backScattering/baseTool/x64/Release/spatialite.dll differ diff --git a/backScattering/baseTool/x64/Release/sqlite3.dll b/backScattering/baseTool/x64/Release/sqlite3.dll new file mode 100644 index 0000000..65359e2 Binary files /dev/null and b/backScattering/baseTool/x64/Release/sqlite3.dll differ diff --git a/backScattering/baseTool/x64/Release/test_moudel.obj b/backScattering/baseTool/x64/Release/test_moudel.obj new file mode 100644 index 0000000..d254e06 Binary files /dev/null and b/backScattering/baseTool/x64/Release/test_moudel.obj differ diff --git a/backScattering/baseTool/x64/Release/tiff.dll b/backScattering/baseTool/x64/Release/tiff.dll new file mode 100644 index 0000000..125e94b Binary files /dev/null and b/backScattering/baseTool/x64/Release/tiff.dll differ diff --git a/backScattering/baseTool/x64/Release/vc142.pdb b/backScattering/baseTool/x64/Release/vc142.pdb new file mode 100644 index 0000000..6868526 Binary files /dev/null and b/backScattering/baseTool/x64/Release/vc142.pdb differ diff --git a/backScattering/baseTool/x64/Release/vcamp140.dll b/backScattering/baseTool/x64/Release/vcamp140.dll new file mode 100644 index 0000000..9fd7179 Binary files /dev/null and b/backScattering/baseTool/x64/Release/vcamp140.dll differ diff --git a/backScattering/baseTool/x64/Release/vccorlib140.dll b/backScattering/baseTool/x64/Release/vccorlib140.dll new file mode 100644 index 0000000..7194329 Binary files /dev/null and b/backScattering/baseTool/x64/Release/vccorlib140.dll differ diff --git a/backScattering/baseTool/x64/Release/vcomp140.dll b/backScattering/baseTool/x64/Release/vcomp140.dll new file mode 100644 index 0000000..dbad71a Binary files /dev/null and b/backScattering/baseTool/x64/Release/vcomp140.dll differ diff --git a/backScattering/baseTool/x64/Release/vcpkg.applocal.log b/backScattering/baseTool/x64/Release/vcpkg.applocal.log new file mode 100644 index 0000000..fc2d884 --- /dev/null +++ b/backScattering/baseTool/x64/Release/vcpkg.applocal.log @@ -0,0 +1,35 @@ + +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\boost_filesystem-vc142-mt-x64-1_82.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gdal.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zlib1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcrypto-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libssl-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\liblzma.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\qhull_r.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\jpeg62.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\tiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geotiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\proj.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\sqlite3.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcurl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libpng16.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\Lerc.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zstd.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gif.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\netcdf.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5_hl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libwebp.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libsharpyuv.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\LIBPQ.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\pcre2-8.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libexpat.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libxml2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\iconv-2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos_c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\json-c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\openjp2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\spatialite.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\freexl-1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\minizip.dll diff --git a/backScattering/baseTool/x64/Release/vcruntime140.dll b/backScattering/baseTool/x64/Release/vcruntime140.dll new file mode 100644 index 0000000..1d6afaa Binary files /dev/null and b/backScattering/baseTool/x64/Release/vcruntime140.dll differ diff --git a/backScattering/baseTool/x64/Release/vcruntime140_1.dll b/backScattering/baseTool/x64/Release/vcruntime140_1.dll new file mode 100644 index 0000000..7bf05d3 Binary files /dev/null and b/backScattering/baseTool/x64/Release/vcruntime140_1.dll differ diff --git a/backScattering/baseTool/x64/Release/zlib1.dll b/backScattering/baseTool/x64/Release/zlib1.dll new file mode 100644 index 0000000..e9300f6 Binary files /dev/null and b/backScattering/baseTool/x64/Release/zlib1.dll differ diff --git a/backScattering/baseTool/x64/Release/zstd.dll b/backScattering/baseTool/x64/Release/zstd.dll new file mode 100644 index 0000000..09c9050 Binary files /dev/null and b/backScattering/baseTool/x64/Release/zstd.dll differ diff --git a/backScattering/config.ini b/backScattering/config.ini new file mode 100644 index 0000000..f17419f --- /dev/null +++ b/backScattering/config.ini @@ -0,0 +1,11 @@ +# -*- coding: UTF-8 -*- +# 定义config分组 +[config] +######1-算法基本参数###### +productLevel = 3 +target = cal +# 算法名称。修改临时工作区生成临时文件的名称,日志名称; +exe_name = BackScattering +# 开启调试模式则不删除临时工作区,True:开启调试,False:不开启调试 +debug = False + diff --git a/backScattering/config.yaml b/backScattering/config.yaml new file mode 100644 index 0000000..e191756 --- /dev/null +++ b/backScattering/config.yaml @@ -0,0 +1,98 @@ +SatelliteOribit: # 轨道起算时间 + StartTime: + Value: + '2017-09-15 01:55:21.0000' + format: # 时间格式 + "%Y-%m-%d %H:%M:%S.%f" + ReferenceSpheroid: + Re: # 长半轴 + 6378137 + Rp: # 短半轴 + 6356752.3142451795 + we: + 0.000072292115 +GPS: # GPS 轨道节点 + GPSNode_Path: + ['product','GPS','GPSParam'] + NodeInfomation_Name: # [时间,x坐标,y坐标,z坐标,x速度,y速度,z速度] + ['TimeStamp', 'xPosition', 'yPosition', 'zPosition', 'xVelocity', 'yVelocity', 'zVelocity'] + Time_format: + "%Y-%m-%d %H:%M:%S" + +imageinfo: # 影像信息 + ImageBox: + NodePath: + ['product','imageinfo','corner'] + NodeName: + ['topLeft','topRight','bottomLeft','bottomRight'] + latLon: + ["latitude","longitude"] + ImageWidthSpace: + NodePath: + ['product','imageinfo','widthspace'] + ImageHeightSpace: + NodePath: + ['product','imageinfo','heightspace'] + ImageWidth: # 影像宽 + NodePath: + ['product','imageinfo','width'] + ImageHeight: # 影像高 + NodePath: + ['product','imageinfo','height'] + StartImageTime: # 影像开始时间 + NodePath: + ['product','imageinfo','imagingTime',start] + Format: + "%Y-%m-%d %H:%M:%S.%f" + EndImageTime: # 影像中止时间 + NodePath: + ['product','imageinfo','imagingTime',end] + Format: + "%Y-%m-%d %H:%M:%S.%f" + CenterImageTime: # 中心像元时间 + NodePath: + ['product','platform','CenterTime'] + Format: + "%Y-%m-%d %H:%M:%S" + CenterImagePositon: # 中心像元,可以作为迭代起算点 + NodePath: + ['product','imageinfo','center'] + Value: + ['latitude','longitude'] + NearRange: # 近斜距 + NodePath: + ['product','imageinfo','nearRange'] + DopplerCentroidCoefficients: # 多普勒质心常数 + NodePath: + ['product','processinfo','DopplerCentroidCoefficients'] + DopplerCentroidCoefficients_Name: + ['d0','d1','d2','d3','d4'] + DopplerParametersReferenceTime: + NodePath: + ['product','processinfo',"DopplerParametersReferenceTime"] + ReferenceRange: + NodePath: + ['product','imageinfo','refRange'] + incidenceAngle: # 入射角 + NearRange: # 近入射角 + NodePath: + ['product','processinfo','incidenceAngleNearRange'] + FarRange: # 远入射角 + NodePath: + ['product','processinfo','incidenceAngleFarRange'] + +sensor: + PRF: # 脉冲重复频率 + NodePath: + ['product','imageinfo','eqvPRF'] + bandWidth: # 信号带宽,计算距离向分辨率 用于距离向分辨率 + NodePath: + ['product','sensor','waveParams','wave','bandWidth'] + lambda: # 波长 + NodePath: + ['product','sensor','lamda'] + Fs: # 等效采样频率 eqvFs + NodePath: + ['product','imageinfo','eqvFs'] +LightSpeed: + 299792458 diff --git a/backScattering/config_old.yaml b/backScattering/config_old.yaml new file mode 100644 index 0000000..66341df --- /dev/null +++ b/backScattering/config_old.yaml @@ -0,0 +1,99 @@ +SatelliteOribit: # 轨道起算时间 + StartTime: + Value: + '2017-09-15 01:55:21.0000' + format: # 时间格式 + "%Y-%m-%d %H:%M:%S.%f" + ReferenceSpheroid: + Re: # 长半轴 + 6378137 + Rp: # 短半轴 + 6356752.3142451795 + we: + 0.000072292115 +GPS: # GPS 轨道节点 + GPSNode_Path: + ['product','GPS','GPSParam'] + NodeInfomation_Name: # [时间,x坐标,y坐标,z坐标,x速度,y速度,z速度] + ['TimeStamp', 'xPosition', 'yPosition', 'zPosition', 'xVelocity', 'yVelocity', 'zVelocity'] + Time_format: + "%Y-%m-%d %H:%M:%S.%f" + +imageinfo: # 影像信息 + ImageBox: + NodePath: + ['product','imageinfo','corner'] + NodeName: + ['topLeft','topRight','bottomLeft','bottomRight'] + latLon: + ["latitude","longitude"] + ImageWidthSpace: + NodePath: + ['product','imageinfo','widthspace'] + ImageHeightSpace: + NodePath: + ['product','imageinfo','heightspace'] + ImageWidth: # 影像宽 + NodePath: + ['product','imageinfo','width'] + ImageHeight: # 影像高 + NodePath: + ['product','imageinfo','height'] + StartImageTime: # 影像开始时间 + NodePath: + ['product','imageinfo','imagingTime',start] + Format: + "%Y-%m-%d %H:%M:%S.%f" + EndImageTime: # 影像中止时间 + NodePath: + ['product','imageinfo','imagingTime',end] + Format: + "%Y-%m-%d %H:%M:%S.%f" + CenterImageTime: # 中心像元时间 + NodePath: + ['product','platform','CenterTime'] + Format: + "%Y-%m-%d %H:%M:%S.%f" + CenterImagePositon: # 中心像元,可以作为迭代起算点 + NodePath: + ['product','imageinfo','center'] + Value: + ['latitude','longitude'] + NearRange: # 近斜距 + NodePath: + ['product','imageinfo','nearRange'] + DopplerCentroidCoefficients: # 多普勒质心常数 + NodePath: + ['product','processinfo','DopplerCentroidCoefficients'] + DopplerCentroidCoefficients_Name: + ['d0','d1','d2','d3','d4'] + DopplerParametersReferenceTime: + NodePath: + ['product','processinfo',"DopplerParametersReferenceTime"] + ReferenceRange: + NodePath: + ['product','imageinfo','refRange'] + incidenceAngle: # 入射角 + NearRange: # 近入射角 + NodePath: + ['product','processinfo','incidenceAngleNearRange'] + FarRange: # 远入射角 + NodePath: + ['product','processinfo','incidenceAngleFarRange'] + +sensor: + PRF: # 脉冲重复频率 + NodePath: + ['product','imageinfo','eqvPRF'] + bandWidth: # 信号带宽,计算距离向分辨率 用于距离向分辨率 + NodePath: + ['product','sensor','waveParams','wave','bandWidth'] + lambda: # 波长 + NodePath: + ['product','sensor','lamda'] + Fs: # 等效采样频率 eqvFs + NodePath: + [ 'product','imageinfo','eqvFs' ] + +LightSpeed: + 299792458 diff --git a/backScattering/geo_rpc.py b/backScattering/geo_rpc.py new file mode 100644 index 0000000..58a5802 --- /dev/null +++ b/backScattering/geo_rpc.py @@ -0,0 +1,330 @@ +#命名为:geo_rpc.py +""" +RPC model parsers, localization, and projection +""" +import numpy as np +from osgeo import gdal + + #最大迭代次数超过则报错 +class MaxLocalizationIterationsError(Exception): + """ + Custom rpcm Exception. + """ + pass + +def apply_poly(poly, x, y, z): + """ + Evaluates a 3-variables polynom of degree 3 on a triplet of numbers. + 将三次多项式的统一模式构建为一个单独的函数 + Args: + poly: list of the 20 coefficients of the 3-variate degree 3 polynom, + ordered following the RPC convention. + x, y, z: triplet of floats. They may be numpy arrays of same length. + Returns: + the value(s) of the polynom on the input point(s). + """ + out = 0 + out += poly[0] + out += poly[1]*y + poly[2]*x + poly[3]*z + out += poly[4]*y*x + poly[5]*y*z +poly[6]*x*z + out += poly[7]*y*y + poly[8]*x*x + poly[9]*z*z + out += poly[10]*x*y*z + out += poly[11]*y*y*y + out += poly[12]*y*x*x + poly[13]*y*z*z + poly[14]*y*y*x + out += poly[15]*x*x*x + out += poly[16]*x*z*z + poly[17]*y*y*z + poly[18]*x*x*z + out += poly[19]*z*z*z + return out + +def apply_rfm(num, den, x, y, z): + """ + Evaluates a Rational Function Model (rfm), on a triplet of numbers. + 执行20个参数的分子和20个参数的除法 + Args: + num: list of the 20 coefficients of the numerator + den: list of the 20 coefficients of the denominator + All these coefficients are ordered following the RPC convention. + x, y, z: triplet of floats. They may be numpy arrays of same length. + + Returns: + the value(s) of the rfm on the input point(s). + """ + return apply_poly(num, x, y, z) / apply_poly(den, x, y, z) + +def rpc_from_geotiff(geotiff_path): + """ + Read the RPC coefficients from a GeoTIFF file and return an RPCModel object. + 该函数返回影像的Gdal格式的影像和RPCmodel + Args: + geotiff_path (str): path or url to a GeoTIFF file + + Returns: + instance of the rpc_model.RPCModel class + """ + # with rasterio.open(geotiff_path, 'r') as src: + # + dataset = gdal.Open(geotiff_path, gdal.GA_ReadOnly) + rpc_dict = dataset.GetMetadata("RPC") + # 同时返回影像与rpc + return dataset, RPCModel(rpc_dict,'geotiff') + + +def parse_rpc_file(rpc_file): + # rpc_file:.rpc文件的绝对路径 + # rpc_dict:符号RPC域下的16个关键字的字典 + # 参考网址:http://geotiff.maptools.org/rpc_prop.html; + # https://www.osgeo.cn/gdal/development/rfc/rfc22_rpc.html + + rpc_dict = {} + with open(rpc_file) as f: + text = f.read() + + # .rpc文件中的RPC关键词 + words = ['errBias', 'errRand', 'lineOffset', 'sampOffset', 'latOffset', + 'longOffset', 'heightOffset', 'lineScale', 'sampScale', 'latScale', + 'longScale', 'heightScale', 'lineNumCoef', 'lineDenCoef','sampNumCoef', 'sampDenCoef',] + + # GDAL库对应的RPC关键词 + keys = ['ERR_BIAS', 'ERR_RAND', 'LINE_OFF', 'SAMP_OFF', 'LAT_OFF', 'LONG_OFF', + 'HEIGHT_OFF', 'LINE_SCALE', 'SAMP_SCALE', 'LAT_SCALE', + 'LONG_SCALE', 'HEIGHT_SCALE', 'LINE_NUM_COEFF', 'LINE_DEN_COEFF', + 'SAMP_NUM_COEFF', 'SAMP_DEN_COEFF'] + + for old, new in zip(words, keys): + text = text.replace(old, new) + # 以‘;\n’作为分隔符 + text_list = text.split(';\n') + # 删掉无用的行 + text_list = text_list[3:-2] + # + text_list[0] = text_list[0].split('\n')[1] + # 去掉制表符、换行符、空格 + text_list = [item.strip('\t').replace('\n', '').replace(' ', '') for item in text_list] + + for item in text_list: + # 去掉‘=’ + key, value = item.split('=') + # 去掉多余的括号‘(’,‘)’ + if '(' in value: + value = value.replace('(', '').replace(')', '') + rpc_dict[key] = value + + for key in keys[:12]: + # 为正数添加符号‘+’ + if not rpc_dict[key].startswith('-'): + rpc_dict[key] = '+' + rpc_dict[key] + # 为归一化项和误差标志添加单位 + if key in ['LAT_OFF', 'LONG_OFF', 'LAT_SCALE', 'LONG_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' degrees' + if key in ['LINE_OFF', 'SAMP_OFF', 'LINE_SCALE', 'SAMP_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' pixels' + if key in ['ERR_BIAS', 'ERR_RAND', 'HEIGHT_OFF', 'HEIGHT_SCALE']: + rpc_dict[key] = rpc_dict[key] + ' meters' + + # 处理有理函数项 + for key in keys[-4:]: + values = [] + for item in rpc_dict[key].split(','): + #print(item) + if not item.startswith('-'): + values.append('+'+item) + else: + values.append(item) + rpc_dict[key] = ' '.join(values) + return rpc_dict + + +def read_rpc_file(rpc_file): + """ + Read RPC from a RPC_txt file and return a RPCmodel + 从TXT中直接单独读取RPC模型 + Args: + rpc_file: RPC sidecar file path + + Returns: + dictionary read from the RPC file, or an empty dict if fail + + """ + rpc = parse_rpc_file(rpc_file) + return RPCModel(rpc) + +class RPCModel: + def __init__(self, d, dict_format="geotiff"): + """ + Args: + d (dict): dictionary read from a geotiff file with + rasterio.open('/path/to/file.tiff', 'r').tags(ns='RPC'), + or from the .__dict__ of an RPCModel object. + dict_format (str): format of the dictionary passed in `d`. + Either "geotiff" if read from the tags of a geotiff file, + or "rpcm" if read from the .__dict__ of an RPCModel object. + """ + if dict_format == "geotiff": + self.row_offset = float(d['LINE_OFF'][0:d['LINE_OFF'].rfind(' ')]) + self.col_offset = float(d['SAMP_OFF'][0:d['SAMP_OFF'].rfind(' ')]) + self.lat_offset = float(d['LAT_OFF'][0:d['LAT_OFF'].rfind(' ')]) + self.lon_offset = float(d['LONG_OFF'][0:d['LONG_OFF'].rfind(' ')]) + self.alt_offset = float(d['HEIGHT_OFF'][0:d['HEIGHT_OFF'].rfind(' ')]) + + self.row_scale = float(d['LINE_SCALE'][0:d['LINE_SCALE'].rfind(' ')]) + self.col_scale = float(d['SAMP_SCALE'][0:d['SAMP_SCALE'].rfind(' ')]) + self.lat_scale = float(d['LAT_SCALE'][0:d['LAT_SCALE'].rfind(' ')]) + self.lon_scale = float(d['LONG_SCALE'][0:d['LONG_SCALE'].rfind(' ')]) + self.alt_scale = float(d['HEIGHT_SCALE'][0:d['HEIGHT_SCALE'].rfind(' ')]) + + self.row_num = list(map(float, d['LINE_NUM_COEFF'].split())) + self.row_den = list(map(float, d['LINE_DEN_COEFF'].split())) + self.col_num = list(map(float, d['SAMP_NUM_COEFF'].split())) + self.col_den = list(map(float, d['SAMP_DEN_COEFF'].split())) + + if 'LON_NUM_COEFF' in d: + self.lon_num = list(map(float, d['LON_NUM_COEFF'].split())) + self.lon_den = list(map(float, d['LON_DEN_COEFF'].split())) + self.lat_num = list(map(float, d['LAT_NUM_COEFF'].split())) + self.lat_den = list(map(float, d['LAT_DEN_COEFF'].split())) + + elif dict_format == "rpcm": + self.__dict__ = d + + else: + raise ValueError( + "dict_format '{}' not supported. " + "Should be {{'geotiff','rpcm'}}".format(dict_format) + ) + + + def projection(self, lon, lat, alt): + """ + Convert geographic coordinates of 3D points into image coordinates. + 正投影:从地理坐标到图像坐标 + Args: + lon (float or list): longitude(s) of the input 3D point(s) + lat (float or list): latitude(s) of the input 3D point(s) + alt (float or list): altitude(s) of the input 3D point(s) + + Returns: + float or list: horizontal image coordinate(s) (column index, ie x) + float or list: vertical image coordinate(s) (row index, ie y) + """ + nlon = (np.asarray(lon) - self.lon_offset) / self.lon_scale + nlat = (np.asarray(lat) - self.lat_offset) / self.lat_scale + nalt = (np.asarray(alt) - self.alt_offset) / self.alt_scale + + col = apply_rfm(self.col_num, self.col_den, nlat, nlon, nalt) + row = apply_rfm(self.row_num, self.row_den, nlat, nlon, nalt) + + col = col * self.col_scale + self.col_offset + row = row * self.row_scale + self.row_offset + + return col, row + + + def localization(self, col, row, alt, return_normalized=False): + """ + Convert image coordinates plus altitude into geographic coordinates. + 反投影:从图像坐标到地理坐标 + Args: + col (float or list): x image coordinate(s) of the input point(s) + row (float or list): y image coordinate(s) of the input point(s) + alt (float or list): altitude(s) of the input point(s) + + Returns: + float or list: longitude(s) + float or list: latitude(s) + """ + ncol = (np.asarray(col) - self.col_offset) / self.col_scale + nrow = (np.asarray(row) - self.row_offset) / self.row_scale + nalt = (np.asarray(alt) - self.alt_offset) / self.alt_scale + + if not hasattr(self, 'lat_num'): + lon, lat = self.localization_iterative(ncol, nrow, nalt) + else: + lon = apply_rfm(self.lon_num, self.lon_den, nrow, ncol, nalt) + lat = apply_rfm(self.lat_num, self.lat_den, nrow, ncol, nalt) + + if not return_normalized: + lon = lon * self.lon_scale + self.lon_offset + lat = lat * self.lat_scale + self.lat_offset + + return lon, lat + + + def localization_iterative(self, col, row, alt): + """ + Iterative estimation of the localization function (image to ground), + for a list of image points expressed in image coordinates. + 逆投影时的迭代函数 + Args: + col, row: normalized image coordinates (between -1 and 1) + alt: normalized altitude (between -1 and 1) of the corresponding 3D + point + + Returns: + lon, lat: normalized longitude and latitude + + Raises: + MaxLocalizationIterationsError: if the while loop exceeds the max + number of iterations, which is set to 100. + """ + # target point: Xf (f for final) + Xf = np.vstack([col, row]).T + + # use 3 corners of the lon, lat domain and project them into the image + # to get the first estimation of (lon, lat) + # EPS is 2 for the first iteration, then 0.1. + lon = -col ** 0 # vector of ones + lat = -col ** 0 + EPS = 2 + x0 = apply_rfm(self.col_num, self.col_den, lat, lon, alt) + y0 = apply_rfm(self.row_num, self.row_den, lat, lon, alt) + x1 = apply_rfm(self.col_num, self.col_den, lat, lon + EPS, alt) + y1 = apply_rfm(self.row_num, self.row_den, lat, lon + EPS, alt) + x2 = apply_rfm(self.col_num, self.col_den, lat + EPS, lon, alt) + y2 = apply_rfm(self.row_num, self.row_den, lat + EPS, lon, alt) + + n = 0 + while not np.all((x0 - col) ** 2 + (y0 - row) ** 2 < 1e-18): + + if n > 100: + raise MaxLocalizationIterationsError("Max localization iterations (100) exceeded") + + X0 = np.vstack([x0, y0]).T + X1 = np.vstack([x1, y1]).T + X2 = np.vstack([x2, y2]).T + e1 = X1 - X0 + e2 = X2 - X0 + u = Xf - X0 + + # project u on the base (e1, e2): u = a1*e1 + a2*e2 + # the exact computation is given by: + # M = np.vstack((e1, e2)).T + # a = np.dot(np.linalg.inv(M), u) + # but I don't know how to vectorize this. + # Assuming that e1 and e2 are orthogonal, a1 is given by + # / + num = np.sum(np.multiply(u, e1), axis=1) + den = np.sum(np.multiply(e1, e1), axis=1) + a1 = np.divide(num, den).squeeze() + + num = np.sum(np.multiply(u, e2), axis=1) + den = np.sum(np.multiply(e2, e2), axis=1) + a2 = np.divide(num, den).squeeze() + + # use the coefficients a1, a2 to compute an approximation of the + # point on the gound which in turn will give us the new X0 + lon += a1 * EPS + lat += a2 * EPS + + # update X0, X1 and X2 + EPS = .1 + x0 = apply_rfm(self.col_num, self.col_den, lat, lon, alt) + y0 = apply_rfm(self.row_num, self.row_den, lat, lon, alt) + x1 = apply_rfm(self.col_num, self.col_den, lat, lon + EPS, alt) + y1 = apply_rfm(self.row_num, self.row_den, lat, lon + EPS, alt) + x2 = apply_rfm(self.col_num, self.col_den, lat + EPS, lon, alt) + y2 = apply_rfm(self.row_num, self.row_den, lat + EPS, lon, alt) + + n += 1 + + return lon, lat + \ No newline at end of file diff --git a/backScattering/model_meta.xml b/backScattering/model_meta.xml new file mode 100644 index 0000000..c0ee92b --- /dev/null +++ b/backScattering/model_meta.xml @@ -0,0 +1,56 @@ + + + + + + + GTC + TIF + + + + nan + BSQ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
diff --git a/backScattering/packing.spec b/backScattering/packing.spec new file mode 100644 index 0000000..92de9aa --- /dev/null +++ b/backScattering/packing.spec @@ -0,0 +1,89 @@ +# -*- mode: python ; coding: utf-8 -*- +import sys +import shutil +import os +import tarfile + +#ļб +sys.setrecursionlimit(5000) +block_cipher = None + +#######begin-ǰ############## +#һtoolļ滻ǰ·µtool +# Դ +cwdpath = os.getcwd() +tool_path = '' +src = '../tool' +des = os.path.join(cwdpath, "tool") +targz_path = os.path.join(cwdpath, "tool.tar.gz") +#ļ +if os.path.exists(des): + if os.path.isdir(des): + shutil.rmtree(des) + os.makedirs(des) +#ѹ +dir = os.path.split(targz_path )[0] +if os.path.exists(dir) is False: + os.makedirs(dir) +with tarfile.open(targz_path, "w:gz") as tar: + tar.add(src, arcname=os.path.basename(src)) +#ѹ +t = tarfile.open(targz_path) +t.extractall(path=cwdpath) +#ɾʱѹ +#os.remove(targz_path) + +# +main_name = '' +for name in os.listdir(cwdpath): + if 'Main.py' in name: + main_name = name +exe_name = exe_name = main_name .split('.')[0][:-4] + '-C-SAR-V2.0' +#######end-ǰ############## + + + +#######beging-pyinstaller############## + +a = Analysis(['BackScatteringMain.py', +'./tool/algorithm/algtools/ScatteringAuxData.py', +'./tool/algorithm/algtools/CoordinateTransformation.py', +'./tool/algorithm/algtools/DEMJoint.py', +'./tool/algorithm/algtools/logHandler.py', +'./tool/algorithm/algtools/PreProcess.py', +'./tool/algorithm/algtools/RieveFilter.py', +'./tool/algorithm/algtools/ROIAlg.py', +'./tool/algorithm/block/blockprocess.py', +'./tool/algorithm/image/ImageHandle.py', +'./tool/algorithm/xml/AlgXmlHandle.py', +'./tool/algorithm/xml/CreatMetafile.py', +'./tool/config/ConfigeHandle.py', +'./tool/logs/logHandler.py',], + pathex=[cwdpath], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name= 'BackScattering-C-SAR-V2.0', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True ) +######beging-pyinstaller################# \ No newline at end of file diff --git a/backScattering/pp.py b/backScattering/pp.py new file mode 100644 index 0000000..6979e77 --- /dev/null +++ b/backScattering/pp.py @@ -0,0 +1,57 @@ +def resampling_by_scale(input_path, target_file, refer_img_path): + """ + 按照缩放比例对影像重采样 + :param input_path: GDAL地理数据路径 + :param target_file: 输出影像 + :param refer_img_path:参考影像 + :return: True or False + """ + ref_dataset = gdal.Open(refer_img_path) + ref_cols = ref_dataset.RasterXSize # 列数 + ref_rows = ref_dataset.RasterYSize # 行数 + + dataset = gdal.Open(input_path) + if dataset is None: + logger.error('resampling_by_scale:dataset is None!') + return False + + band_count = dataset.RasterCount # 波段数 + if (band_count == 0) or (target_file == ""): + logger.error("resampling_by_scale:Parameters of the abnormal!") + return False + + cols = dataset.RasterXSize # 列数 + scale = ref_cols/cols + + # rows = dataset.RasterYSize # 行数 + # cols = int(cols * scale) # 计算新的行列数 + # rows = int(rows * scale) + cols = ref_cols + rows = ref_rows + + geotrans = list(dataset.GetGeoTransform()) + geotrans[1] = geotrans[1] / scale # 像元宽度变为原来的scale倍 + geotrans[5] = geotrans[5] / scale # 像元高度变为原来的scale倍 + + if os.path.exists(target_file) and os.path.isfile(target_file): # 如果已存在同名影像 + os.remove(target_file) # 则删除之 + if not os.path.exists(os.path.split(target_file)[0]): + os.makedirs(os.path.split(target_file)[0]) + + band1 = dataset.GetRasterBand(1) + data_type = band1.DataType + target = dataset.GetDriver().Create(target_file, xsize=cols, ysize=rows, bands=band_count, + eType=data_type) + target.SetProjection(dataset.GetProjection()) # 设置投影坐标 + target.SetGeoTransform(geotrans) # 设置地理变换参数 + total = band_count + 1 + for index in range(1, total): + # 读取波段数据 + data = dataset.GetRasterBand(index).ReadAsArray(buf_xsize=cols, buf_ysize=rows) + out_band = target.GetRasterBand(index) + + no_data_value = dataset.GetRasterBand(index).GetNoDataValue() # 获取没有数据的点 + if not (no_data_value is None): + out_band.SetNoDataValue(no_data_value) + + out_band.WriteArray(data) # \ No newline at end of file diff --git a/backScattering/product.xml b/backScattering/product.xml new file mode 100644 index 0000000..78a036e --- /dev/null +++ b/backScattering/product.xml @@ -0,0 +1,60 @@ + + + 后向散射系数 + BackScattering + LEVEL3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + None + 参考产品介绍PDF + + + + + 德清 + + + + \ No newline at end of file diff --git a/backScattering/proj.db b/backScattering/proj.db new file mode 100644 index 0000000..020f3a7 Binary files /dev/null and b/backScattering/proj.db differ diff --git a/backScattering/run_log/BackScattering2024-04-07-13-41-56.log b/backScattering/run_log/BackScattering2024-04-07-13-41-56.log new file mode 100644 index 0000000..4c53e90 --- /dev/null +++ b/backScattering/run_log/BackScattering2024-04-07-13-41-56.log @@ -0,0 +1,21 @@ +[04/07/2024 13:41:56] [15772] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\backScattering ---from: BackScatteringMain.check_source (BackScatteringMain.py:Line67) +[04/07/2024 13:41:56] [15772] [ERROR]- run-time error! ---from: BackScatteringMain. (BackScatteringMain.py:Line495) +Traceback (most recent call last): + File "D:\estar-proj\microproduct-S-SAR\tool\algorithm\xml\AlgXmlHandle.py", line 48, in init_xml + self.__tree.parse(self.in_path) + File "D:\Anaconda\envs\micro\lib\xml\etree\ElementTree.py", line 584, in parse + source = open(source, "rb") +FileNotFoundError: [Errno 2] No such file or directory: 'BackScattering.xml' + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "D:/estar-proj/microproduct-S-SAR/backScattering/BackScatteringMain.py", line 489, in + if not ScatteringMain.check_source(): + File "D:/estar-proj/microproduct-S-SAR/backScattering/BackScatteringMain.py", line 69, in check_source + if self.__check_handler.check_alg_xml() is False: + File "D:\estar-proj\microproduct-S-SAR\tool\algorithm\xml\AlgXmlHandle.py", line 318, in check_alg_xml + if self.__alg_xml_handle.init_xml(): + File "D:\estar-proj\microproduct-S-SAR\tool\algorithm\xml\AlgXmlHandle.py", line 50, in init_xml + msg = ex + "xml_path = " + self.in_path +TypeError: unsupported operand type(s) for +: 'FileNotFoundError' and 'str' diff --git a/backScattering/run_log/BackScattering2024-04-07-13-42-24.log b/backScattering/run_log/BackScattering2024-04-07-13-42-24.log new file mode 100644 index 0000000..612a80f --- /dev/null +++ b/backScattering/run_log/BackScattering2024-04-07-13-42-24.log @@ -0,0 +1,5 @@ +[04/07/2024 13:42:24] [22836] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\backScattering ---from: BackScatteringMain.check_source (BackScatteringMain.py:Line67) +[04/07/2024 13:42:24] [22836] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line319) +[04/07/2024 13:42:24] [22836] [INFO]- create new workspace success! ---from: BackScatteringMain.__create_work_space (BackScatteringMain.py:Line222) +[04/07/2024 13:42:34] [22836] [INFO]- check_source success! ---from: BackScatteringMain.check_source (BackScatteringMain.py:Line93) +[04/07/2024 13:42:34] [22836] [INFO]- progress bar: 30% ---from: BackScatteringMain.check_source (BackScatteringMain.py:Line94) diff --git a/backScattering/打包命令.txt b/backScattering/打包命令.txt new file mode 100644 index 0000000..f3a5113 --- /dev/null +++ b/backScattering/打包命令.txt @@ -0,0 +1,2 @@ + +pyinstaller -D packing.spec \ No newline at end of file diff --git a/landcover-S-SAR/LandCover-S-SAR.xml b/landcover-S-SAR/LandCover-S-SAR.xml new file mode 100644 index 0000000..f677f4c --- /dev/null +++ b/landcover-S-SAR/LandCover-S-SAR.xml @@ -0,0 +1,111 @@ + + + CSAR_202107275419_0001-0 + D:\micro\SWork\ + + File + ElementAlg + LandCover_S_SAR_V2.2 + LandCover_S_SAR_V2.2.exe + 地表覆盖产品 + 微波卫星3-5级产品生产模型 + LandCover-S-SAR-V2.2-1 + 2.2 + 陆表类产品_地表覆盖 + 4 + LandCover_中科卫星应用德清研究院_2.2 + 中科卫星应用德清研究院 + 景-算法 + 1.8 + python + + 0 + 0 + Windows10 + 双核 + 4GB + 20GB + 无需求 + 无需求 + 无需求 + + + + + AHV + 全极化影像 + 单景全极化影像 + File + tar.gz + Man + E:\MicroWorkspace\S_SAR\AHV\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-Ortho.tar.gz + True + False + File + Satellite + 1 + Ortho_中科卫星应用德清研究院_2.2 + + + LabelData + 标记数据 + 标记的样本数据 + File + csv + Man + E:\MicroWorkspace\S_SAR\AHV\landCoverLable.csv + True + True + UploadInput + Label + 1 + Label + + + box + 经纬度包围盒 + 经纬度包围盒SNWE。例子:31.527611633687169;31.397153571335469;118.941525790298286;119.04(5类) + Value + string + Man + empty + True + True + UploadInput + Aux + 0 + Aux + + + FeatureCombination + 极化特征组合 + 可选极化特征组合一、共14种特征(编号依次为0-13) + Freeman:表面散射p_s(0)、偶次散射p_d(1)、体散射p_v(2); + Touzi:散射角α_s(3)、散射相位ϕ_α(4)、目标散射对称度τ(5)、相对能量λ_i(6); + Yamaguchi:表面散射f_s(7)、二次散射f_d(8)、体散射f_v(9)、螺旋体散射f_h(10); + Cloude-Pottier:分解散射熵H(11)、反熵A(12)、平均散射角α(13) + Value + string + Man + 0,1,2,7,8,9,10 + True + True + UploadInput + Aux + 0 + Aux + + + + + LandCoverProduct + 地表覆盖产品输出路径 + 地表覆盖产品输出路径 + File + tar.gz + Man + D:\micro\SWork\LandCover\Output\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-Ortho-LANDCLASS.tar.gz + + + + \ No newline at end of file diff --git a/landcover-S-SAR/LandCoverAuxData.py b/landcover-S-SAR/LandCoverAuxData.py new file mode 100644 index 0000000..4cec7c8 --- /dev/null +++ b/landcover-S-SAR/LandCoverAuxData.py @@ -0,0 +1,207 @@ +# -*- coding: UTF-8 -*- +""" +@Project:LandCover +@File:LandCoverData.py +@Function: 读取指标物候辅助数据 +@Contact: +@Author:SHJ +@Date:2021/10/21 19:25 +@Version:1.0.0 +""" +import random +import csv +import numpy as np +import mahotas +import logging +from tool.algorithm.algtools.CoordinateTransformation import lonlat2geo, geo2imagexy +from tool.algorithm.image.ImageHandle import ImageHandler +logger = logging.getLogger("mylog") + + +class LandCoverMeasCsv: + """读取地表覆盖标记数据""" + + def __init__(self, csv_path, preprocessed_paras, max_tran__num_per_class): + self.__csv_path = csv_path + self.__preprocessed_paras = preprocessed_paras + self.__max_tran__num_per_class = max_tran__num_per_class + + def api_read_measure(self): + """ + 读取csv表格数据api函数 + """ + csv_data = self.__readcsv(self.__csv_path) + return self.__trans_measuredata(csv_data) + + def class_list(self): + """ + 输出csv表中的前三列 + """ + reader = csv.reader(open(self.__csv_path, newline='')) + class_list=[] + type_id_name = {} + type_id_parent = {} + for line_data in reader: + class_list.append(line_data) # class_list含有四列 + for data in class_list[1:]: + type_parent= data[0] + type_id = int(data[1]) + type_name = data[2] + + if type_id not in type_id_name.keys(): + type_id_name.update({type_id: type_name}) + type_id_parent.update({type_id: type_parent}) + return type_id_name, type_id_parent + pass + + @staticmethod + def __readcsv(csv_path): + """ + 读取csv表格数据 + :para csv_path: csv文件路径 + """ + reader = csv.reader(open(csv_path, newline='')) + csv_list = [] + for line_data in reader: + csv_list.append(line_data) + return csv_list[1:] + + def __trans_measuredata(self, meas_data): + """ + 获取多边形区域内所有的点,分为训练集数据和测试集数据 + :para meas_data: csv读取的实测数据 + """ + type_data = {} + n = 1 + train_data_list = [] + for data in meas_data: + + for d in data: + if d == '': + raise Exception('there are empty data!', data) + + point_list = [] + dataset, rows, cols = self.__get_para_tif_inf() + + type_id = int(data[1]) + type_name = data[2] + if type_id not in type_data.keys(): + train_data_list.append([n, type_id, type_name, []]) + type_data.update({type_id: type_name}) + n += 1 + + pointList = self.__roiPolygonAnalysis(data[3]) + for points in pointList: + poly = [] + for point in points: + lon = float(point[0]) + lat = float(point[1]) + projs = lonlat2geo(dataset, lon, lat) + coord = geo2imagexy(dataset, projs[1], projs[0]) + row = round(coord[1]) + col = round(coord[0]) + if 0 <= row < rows and 0 <= col < cols: + poly.append([row, col]) + else: + logger.warning("measure data: %s is beyond tif scope !", data) + if poly != []: + # point_list.append(self.__render(poly)) + # 绘制多边形形状 + # import matplotlib.pyplot as plt + # plt.figure(None, (5, 5)) + # x, y = zip(*self.__render(poly)) + # plt.scatter(x, y) + # x, y = zip(*poly) + # plt.plot(x, y, c="r") + # plt.show() + for train_data in train_data_list: + if train_data[1] == type_id: + train_data[3] = train_data[3] + self.__render(poly) + if train_data[3] == [] : + logger.info(str(data[3]) + "is not in box") + # raise Exception('there are empty data!', train_data) + if len(train_data_list) <= 1: + raise Exception('there is only one label type!', train_data_list) + + for train_data in train_data_list: + logger.info(str(train_data[0]) + "," + str(train_data[2]) +"," + "num:" + str(len(train_data[3]))) + max_num = self.__max_tran__num_per_class + logger.info("max number =" + str(max_num) + ", random select" + str(max_num) + " point as train data!") + if (len(train_data[3]) > max_num): + train_data[3] = random.sample(train_data[3], max_num) + + return train_data_list + + @staticmethod + def __render(poly): + # https://www.cnpython.com/qa/51516 + """Return polygon as grid of points inside polygon. + Input : poly (list of lists) + Output : output (list of lists) + """ + xs, ys = zip(*poly) + minx, maxx = min(xs), max(xs) + miny, maxy = min(ys), max(ys) + + newPoly = [(int(x - minx), int(y - miny)) for (x, y) in poly] + + X = maxx - minx + 1 + Y = maxy - miny + 1 + + grid = np.zeros((X, Y), dtype=np.int8) + mahotas.polygon.fill_polygon(newPoly, grid) + data = [(x + minx, y + miny) for (x, y) in zip(*np.nonzero(grid))] + + return data + + + def __get_para_tif_inf(self): + """ + 获取影像的信息 + :para tif_name: 影像名称 + """ + tif_path = self.__preprocessed_paras + ih = ImageHandler() + dataset = ih.get_dataset(tif_path) + rows = ih.get_img_height(tif_path) + cols = ih.get_img_width(tif_path) + return dataset, rows, cols + + @staticmethod + def __roiPolygonAnalysis(roiStr): + """ + 将csv的POLY数据转为数组 + :para roiStr: poly数据 + :return pointList: 保存多边形的list + """ + pointList = [] + strContent = roiStr.replace("POLYGON", "") + # 解析轮廓字符串为二维数组 + bracketsList = [] + strTemp = '' + strList = [] + for c in strContent: + if c == '(': + bracketsList.append(c) + continue + elif c == ')': + if len(bracketsList) > 0: + bracketsList.pop(0) + if len(strTemp) > 0: + strList.append(strTemp) + strTemp = '' + else: + strTemp += c + for item in strList: + if len(item) == 0: + continue + pTempList = item.split(',') + pList = [] + for row in pTempList: + cells = row.split(' ') + if len(cells) != 2: + continue + point = [float(cells[0]), float(cells[1])] + pList.append(point) + pointList.append(pList) + return pointList \ No newline at end of file diff --git a/landcover-S-SAR/LandCoverMain.py b/landcover-S-SAR/LandCoverMain.py new file mode 100644 index 0000000..1e3f427 --- /dev/null +++ b/landcover-S-SAR/LandCoverMain.py @@ -0,0 +1,683 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :LandCoverMain.py +@Function :实现对数据地表覆盖的训练和分类识别 +@Author :SHJ +@Date :2022/11/23 +@Version :2.0.0 +""" +import datetime +import glob +import logging +import os +import shutil +import sys +from PIL import Image +import numpy as np +import cv2 +from osgeo import gdal, osr +import multiprocessing +import pyproj._compat +# 导入PreProcess模块要在其他包含gdal库的模块前面,不然剪切影像会报错,详见https://blog.csdn.net/u014656611/article/details/106450006 +from tool.algorithm.algtools.PreProcess import PreProcess as pp +from LandCoverAuxData import LandCoverMeasCsv +from tool.algorithm.polsarpro.AHVToPolsarpro import AHVToPolsarpro +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.ROIAlg import ROIAlg as alg +from tool.algorithm.xml.AlgXmlHandle import ManageAlgXML, CheckSource, InitPara +from tool.algorithm.block.blockprocess import BlockProcess +from tool.algorithm.algtools.logHandler import LogHandler +from tool.algorithm.polsarpro.pspCloudePottierDecomposition import PspCloudePottierDecomposition +from tool.algorithm.polsarpro.pspFreemanDecomposition import PspFreemanDecomposition +from tool.algorithm.polsarpro.pspLeeRefinedFilterT3 import LeeRefinedFilterT3 +from tool.algorithm.polsarpro.pspYamaguchiDecomposition import PspYamaguchiDecomposition +from tool.algorithm.polsarpro.pspTouziDecomposition import PspTouziDecomposition +from tool.algorithm.polsarpro.bin2tif import write_bin_to_tif +from tool.algorithm.xml.CreatMetafile import CreateMetafile +from tool.algorithm.algtools.MetaDataHandler import Calibration +from tool.algorithm.xml.CreateMetaDict import CreateMetaDict, CreateProductXml +from tool.algorithm.xml.AnalysisXml import DictXml, xml_extend +from LandCoverXmlInfo import CreateDict, CreateStadardXmlFile +from tool.config.ConfigeHandle import Config as cf +from tool.file.fileHandle import fileHandle +from tool.algorithm.transforml1a.transHandle import TransImgL1A +from tool.algorithm.ml.machineLearning import MachineLeaning as ml +from tool.csv.csvHandle import csvHandle + +csvh = csvHandle() + +if cf.get('debug') == 'True': + DEBUG = True +else: + DEBUG = False +EXE_NAME = cf.get('exe_name') +tar = '-' + cf.get('target') +productLevel = cf.get('productLevel') +LogHandler.init_log_handler('run_log\\' + EXE_NAME) +logger = logging.getLogger("mylog") +FILTER_SIZE = int(cf.get('filter_size')) +file =fileHandle(DEBUG) +MAX_TRAN_NUM = int(cf.get('max_tran__num_per_class')) +# env_str = os.path.split(os.path.realpath(__file__))[0] +env_str = os.path.dirname(os.path.abspath(sys.argv[0])) +os.environ['PROJ_LIB'] = os.getcwd() +class LandCoverMain: + """ + 算法主函数 + """ + def __init__(self, alg_xml_path): + self.alg_xml_path = alg_xml_path + self.imageHandler = ImageHandler() + self.__alg_xml_handler = ManageAlgXML(alg_xml_path) + self.__check_handler = CheckSource(self.__alg_xml_handler) + self.__workspace_path, self.__temp_path, self.__task_id, self.__out_para = None, None, None, None + self.__input_paras, self.__output_paras, self.__processing_paras,self.__preprocessed_paras = {},{}, {},{} + # 保存特征数据的名称 + self.__feature_name_list = [] + # xml参数字典 + self.__parameters_dic = {} + # 特征表 + self.__FeatureMap = {} + self.__TotalFeatureSize = 14 # 3+4+4+3 + # 特征索引对应的文件名 + self.___FeatureFileNameMap = {} + # 初始化特征参数 + self.__FeatureParaInit() + # 输入特征参数 + self.__FeatureInput = {} + + # 参考影像路径 + self.__ref_img_path = '' + # 宽/列数 + self.__cols = 0 + # 高/行数 + self.__rows = 0 + # 坐标系 + self.__proj = '' + # 影像投影变换矩阵 + self.__geo = [0, 0, 0, 0, 0, 0] + # 分块尺寸 + self.__block_size = 0 + self.processinfo = [1, 1, 1, 1] + + def check_source(self): + """ + 检查算法相关的配置文件,图像,辅助文件是否齐全 + """ + env_str = os.getcwd() + logger.info("sysdir: %s", env_str) + + self.__check_handler.check_alg_xml() + self.__check_handler.check_run_env() + + # 检查景影像是否为全极化 + self.__input_paras = self.__alg_xml_handler.get_input_paras() + checkFlag, self.__parameters_dic = self.__check_handler.check_input_paras(self.__input_paras) + self.__workspace_path = self.__alg_xml_handler.get_workspace_path() + self.__create_work_space() + self.__processing_paras = InitPara.init_processing_paras(self.__input_paras, self.__workspace_preprocessed_path) + self.__processing_paras.update(self.get_tar_gz_inf(self.__processing_paras["sar_path0"])) + SrcImageName = os.path.split(self.__input_paras["AHV"]['ParaValue'])[1].split('.tar.gz')[0] + result_name = SrcImageName + tar + ".tar.gz" + self.__out_para = os.path.join(self.__workspace_path, EXE_NAME, 'Output', result_name) + self.__alg_xml_handler.write_out_para("LandCoverProduct", self.__out_para) #写入输出参数 + logger.info('check_source success!') + return True + + def get_tar_gz_inf(self, tar_gz_path): + para_dic = {} + name = os.path.split(tar_gz_path)[1].rstrip('.tar.gz') + file_dir = os.path.join(self.__workspace_preprocessing_path, name + '\\') + file.de_targz(tar_gz_path, file_dir) + # 元文件字典 + para_dic.update(InitPara.get_meta_dic_new(InitPara.get_meta_paths(file_dir, name), name)) + # tif路径字典 + para_dic.update(InitPara.get_polarization_mode(InitPara.get_tif_paths(file_dir, name))) + parameter_path = os.path.join(file_dir, "orth_para.txt") + para_dic.update({"paraMeter": parameter_path}) + return para_dic + + def __create_work_space(self): + """ + 删除原有工作区文件夹,创建新工作区文件夹 + """ + self.__workspace_preprocessing_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "preprocessing\\") # self.__workspace_path + EXE_NAME + r"\Temporary\preprocessing""\\" + self.__workspace_preprocessed_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "preprocessed\\") # self.__workspace_path + EXE_NAME + r"\Temporary\preprocessed""\\" + self.__workspace_processing_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "processing\\") # self.__workspace_path + EXE_NAME + r"\Temporary\processing""\\" + self.__workspace_block_tif_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "blockTif\\") # self.__workspace_path + EXE_NAME + r"\Temporary\blockTif""\\" + self.__workspace_block_tif_processed_path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary", "blockTifProcessed\\") # self.__workspace_path + EXE_NAME + r"\Temporary\blockTifProcessed""\\" + self.__feature_tif_dir = os.path.join(self.__workspace_processing_path, 'feature_tif') # self.__workspace_processing_path + 'feature_tif' + path_list = [self.__workspace_preprocessing_path, self.__workspace_preprocessed_path, + self.__workspace_processing_path, self.__workspace_block_tif_path, + self.__workspace_block_tif_processed_path, self.__feature_tif_dir] + file.creat_dirs(path_list) + logger.info('create new workspace success!') + + + def del_temp_workspace(self): + """ + 临时工作区 + """ + if DEBUG is True: + return + path = os.path.join(self.__workspace_path, EXE_NAME, "Temporary") # self.__workspace_path + EXE_NAME + r"\Temporary" + if os.path.exists(path): + file.del_folder(path) + + def preprocess_handle(self): + """ + 预处理 + """ + + para_names_geo = ['sim_ori'] + self.__feature_name_list = para_names_geo + p = pp() + p.check_img_projection(self.__workspace_preprocessing_path, para_names_geo, self.__processing_paras) + # 计算roi + scopes = () + scopes += (xml_extend(self.__processing_paras['META']).get_extend(),) + scopes += p.box2scope(self.__processing_paras['box']) + # 计算图像的轮廓,并求相交区域 + intersect_shp_path = self.__workspace_preprocessing_path + 'IntersectPolygon.shp' + + scopes_roi = p.cal_intersect_shp(intersect_shp_path, para_names_geo, self.__processing_paras, scopes) + # 裁剪 + # 裁剪图像:裁剪微波图像,裁剪其他图像 + cutted_img_paths = p.cut_imgs(self.__workspace_preprocessing_path, para_names_geo, self.__processing_paras, + intersect_shp_path) + self.__preprocessed_paras.update(cutted_img_paths) + + para_names_l1a = ["HH", "VV", "HV", "VH"] + + l1a_width = ImageHandler.get_img_width(self.__processing_paras['HH']) + l1a_height = ImageHandler.get_img_height(self.__processing_paras['HH']) + self._tr = TransImgL1A(self.__processing_paras['sim_ori'], scopes_roi,l1a_height,l1a_width) # 裁剪图像 + + for name in para_names_l1a: + out_path = os.path.join(self.__workspace_preprocessed_path, name + "_preprocessed.tif") + self._tr.cut_L1A(self.__processing_paras[name], out_path) + self.__preprocessed_paras.update({name: out_path}) + logger.info('preprocess_handle success!') + + # for name in para_names_geo: + # l1a_path = os.path.join(self.__workspace_preprocessed_path, name+".tif") + # self._tr.tran_geo_to_l1a(self.__preprocessed_paras[name], l1a_path, self.__preprocessed_paras['ori_sim'], is_class=False) + # self.__preprocessed_paras[name] = l1a_path + self.__cols_geo = self.imageHandler.get_img_width(self.__preprocessed_paras['sim_ori']) + self.__rows_geo = self.imageHandler.get_img_height(self.__preprocessed_paras['sim_ori']) + self.__cols = self.imageHandler.get_img_width(self.__preprocessed_paras['HH']) + self.__rows = self.imageHandler.get_img_height(self.__preprocessed_paras['HH']) + + def __decompose(self, t3_path, rows, cols): + """ + 极化分解:Freeman、Touzi、Yamaguchi、Cloude + :param t3_path: t3文件路径 + :param rows: 影像行数 + :return cols:影像列数 + """ + # 计算特征组合 + self.__getInputFeatures() + exeDir = '' + outFolderDic = {} + + if 'Freeman' in self.__FeatureInput: + # freeman分解 + freemanOutDir = os.path.join(self.__workspace_processing_path, 'freeman\\') # self.__workspace_processing_path + 'freeman\\' + freemDecom = PspFreemanDecomposition( + exeDir, t3_path, freemanOutDir) + flag = freemDecom.api_freeman_decomposition_T3( + 0, 0, rows, cols) + if not flag: + logger.error('FreemanDecomposition err') + return False, None + outFolderDic['Freeman'] = freemanOutDir + + if 'Touzi' in self.__FeatureInput: + # Touzi分解 + touziOutDir = os.path.join(self.__workspace_processing_path, 'touzi\\') # self.__workspace_processing_path + 'touzi\\' + if not os.path.exists(touziOutDir): + os.makedirs(touziOutDir) + # touzi分解耗时较长,且对特征表达效果较差 + p = PspTouziDecomposition(self.__preprocessed_paras, touziOutDir) + p.Touzi_decomposition_multiprocessing() + outFolderDic['Touzi'] = touziOutDir + + if 'Yamaguchi' in self.__FeatureInput: + # Yamaguchi分解 + yamaguchiOutDir = os.path.join(self.__workspace_processing_path, 'yamaguchi\\') # self.__workspace_processing_path + 'yamaguchi\\' + yamaguchiDecom = PspYamaguchiDecomposition( + exeDir, t3_path, yamaguchiOutDir) + flag = yamaguchiDecom.api_yamaguchi_4components_decomposition_T3( + 0, 0, rows, cols) + if not flag: + logger.error('CloudePottierDecomposition err') + return False, None + outFolderDic['Yamaguchi'] = yamaguchiOutDir + + if 'Cloude' in self.__FeatureInput: + # CloudePottier分解 + cloudeOutDir = os.path.join(self.__workspace_processing_path, 'cloude\\') # self.__workspace_processing_path + 'cloude\\' + cloudeDecom = PspCloudePottierDecomposition( + exeDir, t3_path, cloudeOutDir) + flag = cloudeDecom.api_h_a_alpha_decomposition_T3( + 0, 0, rows, cols) + if not flag: + logger.error('CloudePottierDecomposition err') + return False, None + outFolderDic['Cloude'] = cloudeOutDir + return True, outFolderDic + + def __getInputFeatures(self): + """ + 获取输入特征组合 + 1.Freeman:表面散射p_s、偶次散射p_d、体散射p_v 对应序号:[0,1,2] + 2.Touzi:散射角α_s、散射相位ϕ_α、目标散射对称度τ、相对能量λ_i 对应序号:[3,4,5,6] + 3.Yamaguchi:表面散射f_s、二次散射f_d、体散射f_v、螺旋体散射f_h 对应序号:[7,8,9,10] + 4.Cloude - Pottier:分解散射熵H、反熵A、平均散射角α 对应序号:[11,12,13] + """ + decomposeList = self.__parameters_dic["FeatureCombination"].split(',') + stepSet = set() + for item in decomposeList: + stepSet.add(int(item)) + + for i in stepSet: + if 0 <= i < 3: + if 'Freeman' in self.__FeatureInput: + self.__FeatureInput['Freeman'].append(i) + else: + self.__FeatureInput['Freeman'] = [i] + elif 3 <= i < 7: + if 'Touzi' in self.__FeatureInput: + self.__FeatureInput['Touzi'].append(i) + else: + self.__FeatureInput['Touzi'] = [i] + elif 7 <= i < 11: + if 'Yamaguchi' in self.__FeatureInput: + self.__FeatureInput['Yamaguchi'].append(i) + else: + self.__FeatureInput['Yamaguchi'] = [i] + elif 11 <= i < 14: + if 'Cloude' in self.__FeatureInput: + self.__FeatureInput['Cloude'].append(i) + else: + self.__FeatureInput['Cloude'] = [i] + else: + logger.warning("__decomposeSteps Invalid data:%s!", i) + + def __FeatureParaInit(self): + self.__FeatureMap["Freeman"] = [0, 1, 2] + self.__FeatureMap["Touzi"] = [3, 4, 5, 6] + self.__FeatureMap["Yamaguchi"] = [7, 8, 9, 10] + self.__FeatureMap["Cloude"] = [11, 12, 13] + + self.___FeatureFileNameMap[0] = ['Freeman', "Freeman_Odd.bin"] + self.___FeatureFileNameMap[1] = ['Freeman', "Freeman_Dbl.bin"] + self.___FeatureFileNameMap[2] = ['Freeman', "Freeman_Vol.bin"] + self.___FeatureFileNameMap[3] = ['Touzi', "alpha.bin"] + self.___FeatureFileNameMap[4] = ['Touzi', "phi.bin"] + self.___FeatureFileNameMap[5] = ['Touzi', "tau.bin"] + self.___FeatureFileNameMap[6] = ['Touzi', "psi.bin"] + self.___FeatureFileNameMap[7] = ['Yamaguchi', "Yamaguchi4_Odd.bin"] + self.___FeatureFileNameMap[8] = ['Yamaguchi', "Yamaguchi4_Dbl.bin"] + self.___FeatureFileNameMap[9] = ['Yamaguchi', "Yamaguchi4_Vol.bin"] + self.___FeatureFileNameMap[10] = ['Yamaguchi', "Yamaguchi4_Hlx.bin"] + self.___FeatureFileNameMap[11] = ['Cloude', "anisotropy.bin"] + self.___FeatureFileNameMap[12] = ['Cloude', "entropy.bin"] + self.___FeatureFileNameMap[13] = ['Cloude', "alpha.bin"] + + def create_roi(self, img_path): + """ + 计算ROI掩膜 + :return:掩膜路径 + """ + processing_path = self.__workspace_processing_path + + # 利用影像的有效范围生成MASK + tif_mask_path = os.path.join(processing_path, "tif_mask.tif") # processing_path + "tif_mask.tif" + alg.trans_tif2mask(tif_mask_path, img_path, np.nan) + logger.info('create ROI image success!') + return tif_mask_path + + def gene_test_set(self, feature_tif_dic, optimal_feature): + """ + 生成测试集 + :param feature_tif_dic : 特征影像路径字典 + :param optimal_feature : 最优特征子集 + :return X_test_list : 分块测试集影像路径 + """ + # 特征分块 + bp = BlockProcess() + block_size = bp.get_block_size(self.__rows, self.__cols) + self.__block_size = block_size + + bp.cut_new(feature_tif_dic, self.__workspace_block_tif_path, ['tif', 'tiff'], 'tif', block_size) + img_dir, img_name = bp.get_file_names(self.__workspace_block_tif_path, ['tif']) + dir_dict_all = bp.get_same_img(img_dir, img_name) + + # 选择最优特征子集特征影像 + dir_dict = {} + for n, key in zip(range(len(dir_dict_all)),dir_dict_all): + if n in optimal_feature: + dir_dict.update({key: dir_dict_all[key]}) + logger.info('test_feature:%s', dir_dict.keys()) + logger.info('blocking tifs success!') + X_test_list = [] + # 特征维度合并 + for key in dir_dict: + key_name = key + block_num = len(dir_dict[key]) + break + for n in range(block_num): + name = os.path.basename(dir_dict[key_name][n]) + suffix = '_' + name.split('_')[-4] + "_" + name.split( + '_')[-3] + "_" + name.split('_')[-2] + "_" + name.split('_')[-1] + features_path = os.path.join(self.__workspace_block_tif_processed_path, "features","features" + suffix) # self.__workspace_block_tif_processed_path + "features\\features" + suffix + X_test_list.append(features_path) + features_array = np.zeros( + (len(dir_dict), block_size, block_size), dtype='float32') + for m, value in zip(range(len(dir_dict)), dir_dict.values()): + features_array[m, :, :] = ImageHandler.get_band_array( + value[n]) + features_array[np.isnan(features_array)] = 0.0 # 异常值转为0 + ImageHandler.write_img(features_path, '', [0, 0, 0, 0, 0, 0], features_array) + logger.info('create features matrix success!') + return X_test_list + + def predict_blok(self, clf, X_test, rows, cols, img_path, row_begin, col_begin, block_sum, n): + Y_test = clf.predict(X_test) + img = Y_test.reshape(rows, cols) + out_image = Image.fromarray(img) + out_image.save(img_path) + # bp = BlockProcess() + # bp.assign_spatial_reference_bypoint(row_begin, col_begin, self.__proj, self.__geo, img_path) + sr = osr.SpatialReference() + sr.ImportFromWkt(self.__proj) + geo_transform = (self.__geo[0] + col_begin * self.__geo[1] + row_begin * self.__geo[2], + self.__geo[1], + self.__geo[2], + self.__geo[3] + col_begin * self.__geo[4] + row_begin * self.__geo[5], + self.__geo[4], + self.__geo[5] + ) + dst_ds = gdal.Open(img_path, gdal.GA_Update) + if dst_ds is None: + return False + dst_ds.SetProjection(sr.ExportToWkt()) + dst_ds.SetGeoTransform(geo_transform) + del dst_ds + logger.info('total:%s,block:%s test data finished !', block_sum, n) + return True + + def predict(self, clf, X_test_list): + """ + 预测数据 + :param clf : svm模型 + :return X_test_list: 分块测试集影像路径 + """ + # 开启多进程处理 + bp = BlockProcess() + out_tif_name = 'landcover' + block_features_dir = X_test_list + bp_cover_dir = os.path.join(self.__workspace_block_tif_processed_path, out_tif_name + '\\') # self.__workspace_block_tif_processed_path + out_tif_name + '\\' + if not os.path.exists(bp_cover_dir): + os.makedirs(bp_cover_dir) + + processes_num = min([len(block_features_dir), 10]) + pool = multiprocessing.Pool(processes=processes_num) + pl = [] + for path, n in zip(block_features_dir, range(len(block_features_dir))): + name = os.path.split(path)[1] + features_array = self.imageHandler.get_data(path) + + X_test = np.reshape(features_array, (features_array.shape[0], features_array[0].size)).T + + suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + name.split('_')[-1] + img_path = os.path.join(bp_cover_dir, out_tif_name + suffix) # bp_cover_dir + out_tif_name + suffix + row_begin = int(name.split('_')[-4]) + col_begin = int(name.split('_')[-2]) + pl.append(pool.apply_async(self.predict_blok, (clf, X_test, self.__block_size, self.__block_size, img_path, row_begin, col_begin,len(block_features_dir), n))) + logger.info('total:%s,block:%s testing data !', len(block_features_dir), n) + pool.close() + pool.join() + + # 合并影像 + data_dir = bp_cover_dir + out_path = self.__workspace_processing_path[0:-1] + bp.combine_new( + data_dir, + self.__cols, + self.__rows, + out_path, + file_type=['tif'], + datetype='float32') + + # 添加地理信息 + cover_path = os.path.join(self.__workspace_processing_path, out_tif_name + ".tif") # self.__workspace_processing_path + out_tif_name + ".tif" + bp.assign_spatial_reference_byfile(self.__ref_img_path, cover_path) + return cover_path + + def ahv_to_t3(self): + # 全极化tif转bin格式T3数据 + atp = AHVToPolsarpro() + t3_path = os.path.join(self.__workspace_processing_path, 'psp_t3\\') # self.__workspace_processing_path + 'psp_t3\\' + # atp.ahv_to_polsarpro_t3(t3_path, self.__workspace_preprocessed_path) + + polarization = ['HH', 'HV', 'VH', 'VV'] + calibration = Calibration.get_Calibration_coefficient(self.__processing_paras['Origin_META'], polarization) + tif_path = atp.calibration(calibration, in_ahv_dir=self.__workspace_preprocessed_path) + atp.ahv_to_polsarpro_t3_soil(t3_path, tif_path) + + # Lee滤波 + leeFilter = LeeRefinedFilterT3() + lee_filter_path = os.path.join(self.__workspace_processing_path, 'lee_filter\\') # self.__workspace_processing_path + 'lee_filter\\' + + leeFilter.api_lee_refined_filter_T3('', t3_path, lee_filter_path, 0, 0, atp.rows(), atp.cols(), FILTER_SIZE) + logger.info("refine_lee filter success!") + logger.info('progress bar: 30%') + return lee_filter_path + + def calInterpolation_bil_Wgs84_rc_sar_sigma(self, parameter_path, dem_rc, in_sar, out_sar): + ''' + # std::cout << "mode 11"; + # std::cout << "SIMOrthoProgram-S-SAR.exe 11 in_parameter_path in_rc_wgs84_path in_ori_sar_path out_orth_sar_path"; + ''' + exe_path = r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd = r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path, 11, parameter_path, + dem_rc, in_sar, out_sar) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + def features_geo(self, features_path): + dir = os.path.join(self.__workspace_processing_path, 'features_geo\\') + if not os.path.exists(dir): + os.mkdir(dir) + for key, file in zip(features_path, features_path.values()): + name = key + '_geo.tif' + out_path = os.path.join(dir, name) + self.calInterpolation_bil_Wgs84_rc_sar_sigma(self.__processing_paras['paraMeter'], + self.__preprocessed_paras['sim_ori'], file, out_path) + return dir + + def process_handle(self, start): + """ + 算法主处理函数 + """ + hh_geo_path = self.__workspace_processing_path + "hh_geo.tif" + self.calInterpolation_bil_Wgs84_rc_sar_sigma(self.__processing_paras['paraMeter'], + self.__preprocessed_paras['sim_ori'], + self.__preprocessed_paras['HH'], hh_geo_path) + + # 读取实测值,获取多边形区域内所有的点,分为训练集数据和测试集数据 + pm = LandCoverMeasCsv(self.__processing_paras['LabelData'], hh_geo_path, MAX_TRAN_NUM) + train_data_list = pm.api_read_measure() + train_data_dic = csvh.trans_landCover_list2dic(train_data_list) + + csvh_roi = csvHandle(self.__rows_geo, self.__cols_geo) + # train_data_dic = csvh_roi.trans_landCover_measuredata_dic(csvh_roi.readcsv(self.__processing_paras['LabelData']), self.__preprocessed_paras['ori_sim'], MAX_TRAN_NUM) + label_img = csvh_roi.get_roi_img() + if(len(label_img) != 0): + self.imageHandler.write_img(os.path.join(self.__workspace_processing_path, "label_img.tif"),"",[0,0,0,0,0,0],label_img) + + logger.info("read csv data success!") + logger.info('progress bar: 20%') + # 极化分解 + flag, outFolder = self.__decompose(self.ahv_to_t3(), self.__rows, self.__cols) + + feature_tif_paths = {} + for key in outFolder: + feature_bin_dic = outFolder[key] + if key == 'Touzi': + for path in list(glob.glob(os.path.join(feature_bin_dic, '*.tif'))): + name = os.path.split(path)[1].split('.')[0] + shutil.copyfile(path, os.path.join(self.__feature_tif_dir, name +'.tif') ) # self.__feature_tif_dir +'\\'+name+'.tif') + feature_tif_paths.update({name: os.path.join(self.__feature_tif_dir, name+'.tif')}) # self.__feature_tif_dir +'\\'+name+'.tif'}) + else: + feature_tif_paths.update(write_bin_to_tif(self.__feature_tif_dir, feature_bin_dic)) + + logging.info("feature_tif_paths:%s",feature_tif_paths) + # 对所有特征进行地理编码 + feature_geo = self.features_geo(feature_tif_paths) + # 新添加的特征做归一化 + # for name in self.__feature_name_list: + # proj, geo, arr = self.imageHandler.read_img(self.__preprocessed_paras[name]) + # arr = ml.standardization(arr) + # self.imageHandler.write_img(os.path.join(self.__feature_tif_dir, name+".tif"), proj, geo, arr) + + logger.info("decompose feature success!") + logger.info('progress bar: 50%') + + # 生成最优特征子集训练集 + X_train, Y_train, optimal_feature = ml.gene_optimal_train_set(train_data_dic, feature_geo, 0.07, 0.85) + + # 训练模型 + # cost = self.__processing_paras["Cost"] + # kernel = self.__processing_paras["Kernel"] + # if cost < 0: + # cost = 1 + # if kernel != 'rbf' and kernel != 'poly' and kernel != 'linear' and kernel != 'sigmoid': + # kernel = 'rbf' + + # RF + clf = ml.trainRF(X_train, Y_train) + logger.info("RF train successful") + + # # SVM + # clf = ml.trainSVM(X_train, Y_train, cost, kernel) + # logger.info("SVM train successful") + logger.info('progress bar: 60%') + + # 生成测试集 + # X_test_path_list = ml.gene_test_set(self.__feature_tif_dir, optimal_feature) + X_test_path_list = ml.gene_test_set(feature_geo, optimal_feature) + # 预测 + logger.info('testing') + cover_path = ml.predict(clf, X_test_path_list, EXE_NAME, self.__workspace_processing_path, self.__rows_geo, self.__cols_geo) + logger.info('test success!') + logger.info('progress bar: 95%') + + # 转换数据 + proj, geo, cover_data = self.imageHandler.read_img(cover_path) + + # 形态学(闭运算)去roi区域噪点 + cover_data = np.uint8(cover_data) + kernel = np.ones((5, 5), np.uint8) + cover_data = cv2.erode(cv2.dilate(cover_data, kernel), kernel) + cover_data = np.int16(cover_data) + for id, class_id in zip(train_data_dic['ids'], train_data_dic['class_ids']): + cover_data[np.where(cover_data == id)] = class_id + # cover_path = cover_path.replace('.tif', '_geo.tif') + cover_geo_path = cover_path.replace('.tif', '_geo.tif') + self.imageHandler.write_img(cover_geo_path, proj, geo, cover_data) + + + # l1a图像坐标转换地理坐标 + # self.calInterpolation_bil_Wgs84_rc_sar_sigma(self.__processing_paras['paraMeter'], + # self.__preprocessed_paras['sim_ori'], cover_path, cover_geo_path) + # # self._tr.l1a_2_geo_int(self.__preprocessed_paras['ori_sim'], cover_path, cover_geo_path, 'nearest') + proj, geo, cover_data_geo = self.imageHandler.read_img(cover_geo_path) + + + proj, geo, cover_data_hh = self.imageHandler.read_img(hh_geo_path) + # self._tr.l1a_2_geo_int(self.__preprocessed_paras['ori_sim'], self.__preprocessed_paras['HH'], hh_geo_path) + roi_img = self.imageHandler.get_band_array(self.create_roi(hh_geo_path)) + + # 获取影像roi区域 + cover_data_geo = cover_data_geo * roi_img + product_dir = os.path.join(self.__workspace_processing_path, 'product\\') # self.__workspace_processing_path + 'product\\' + SrcImageName = os.path.split(self.__input_paras["AHV"]['ParaValue'])[1].split('.tar.gz')[0] + tar + '.tif' + product_path = os.path.join(product_dir, SrcImageName) # product_dir + 'LandCoverProduct.tif' + self.imageHandler.write_img(product_path, proj, geo, np.int16(cover_data_geo), no_data=0) + + # 生成快视图 + self.imageHandler.write_quick_view(product_path, color_img=True) + + self.create_meta_file(product_path) + # 文件夹打包 + file.make_targz(self.__out_para, product_dir) + logger.info('process_handle success!') + logger.info('successful production of ' + EXE_NAME + ' products!') + + def create_meta_file(self, product_path): + # 生成产品元文件 + product_dir = os.path.join(self.__workspace_processing_path, 'product\\') # self.__workspace_processing_path + 'product\\' + # xml_path = "./model_meta.xml" + tem_folder = os.path.join(self.__workspace_path, EXE_NAME, "Temporary\\") # self.__workspace_path + EXE_NAME + r"\Temporary""\\" + image_path = product_path + out_path1 = os.path.join(tem_folder, "trans_geo_projcs.tif") + out_path2 = os.path.join(tem_folder, "trans_projcs_geo.tif") + SrcImageName = os.path.split(self.__input_paras["AHV"]['ParaValue'])[1].split('.tar.gz')[0] + + # par_dict = CreateDict(image_path, self.processinfo, out_path1, out_path2).calu_nature(start) + # model_xml_path = os.path.join(tem_folder, "creat_standard.meta.xml") # 输出xml路径 + # CreateStadardXmlFile(xml_path, self.alg_xml_path, par_dict, model_xml_path).create_standard_xml() + # + # meta_xml_path = os.path.join(product_dir, EXE_NAME + "Product.meta.xml") # product_dir+EXE_NAME+"Product.meta.xml" + # type_id_name, type_id_parent = csvh.class_landcover_list(self.__processing_paras['LabelData']) + # CreateMetafile(self.__processing_paras['META'], self.alg_xml_path, model_xml_path, meta_xml_path).process2(type_id_name, type_id_parent, SrcImageName) + + model_path = "./product.xml" + meta_xml_path = os.path.join(product_dir, SrcImageName + tar + ".meta.xml") + + para_dict = CreateMetaDict(image_path, self.__processing_paras['Origin_META'], product_dir, + out_path1, out_path2).calu_nature() + para_dict.update({"imageinfo_ProductName": "地表覆盖类型"}) + para_dict.update({"imageinfo_ProductIdentifier": "LandCover"}) + para_dict.update({"imageinfo_ProductLevel": productLevel}) + para_dict.update({"ProductProductionInfo_BandSelection": "1,2"}) + para_dict.update({"ProductProductionInfo_AuxiliaryDataDescription": "LabelData"}) + CreateProductXml(para_dict, model_path, meta_xml_path).create_standard_xml() + + temp_folder = os.path.join(self.__workspace_path, EXE_NAME, 'Output') + out_xml = os.path.join(temp_folder, os.path.basename(meta_xml_path)) + if os.path.exists(temp_folder) is False: + os.mkdir(temp_folder) + # CreateProductXml(para_dict, model_path, out_xml).create_standard_xml() + shutil.copy(meta_xml_path, out_xml) + +if __name__ == '__main__': + multiprocessing.freeze_support() #解决打包与运行错误 + start = datetime.datetime.now() + try: + if len(sys.argv) < 2: + xml_path = 'LandCover.xml' + else: + xml_path = sys.argv[1] + main_handler = LandCoverMain(xml_path) + if main_handler.check_source() is False: + raise Exception('check_source() failed!') + if main_handler.preprocess_handle() is False: + raise Exception('preprocess_handle() failed!') + if main_handler.process_handle(start) is False: + raise Exception('process_handle() failed!') + except Exception: + logger.exception("run-time error!") + finally: + main_handler.del_temp_workspace() + + end = datetime.datetime.now() + msg = 'running use time: %s ' % (end - start) + logger.info(msg) + +# 模型的导入导出 https://blog.csdn.net/daxiaofan/article/details/71189015?ops_request_misc=&request_id=&biz_id=102&utm_term=scikit-learn%20%E6%A8%A1%E5%9E%8B%E5%AF%BC%E5%87%BA%E5%AF%BC%E5%85%A5&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-5-71189015.142^v59^js_top,201^v3^control_1&spm=1018.2226.3001.4187 \ No newline at end of file diff --git a/landcover-S-SAR/LandCoverMain.spec b/landcover-S-SAR/LandCoverMain.spec new file mode 100644 index 0000000..4c84f0c --- /dev/null +++ b/landcover-S-SAR/LandCoverMain.spec @@ -0,0 +1,40 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['LandCoverMain.py'], + pathex=[], + binaries=[], + datas=[('D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')], + hiddenimports=['pyproj._compat'], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='LandCoverMain', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None ) diff --git a/landcover-S-SAR/LandCoverXmlInfo.py b/landcover-S-SAR/LandCoverXmlInfo.py new file mode 100644 index 0000000..3121a06 --- /dev/null +++ b/landcover-S-SAR/LandCoverXmlInfo.py @@ -0,0 +1,224 @@ +""" +@Project :microproduct +@File :BackScatteringXmlInfo.PY +@Function :主函数 +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" +from xml.etree.ElementTree import ElementTree +import shutil +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.PreProcess import PreProcess as pp +from osgeo import gdal +import numpy as np +import datetime + + +class CreateDict: + """根据影像信息输出属性字典""" + def __init__(self, image_path, image_pair, out_path1, out_path2): + """ + image_path:影像路径 + image_pair:输入的压缩包中的极化对 例:hh,hv,vh,vv=【1,1,1,1】 + out_path1:地理转平面的输出路径 + out_path2:平面转地理的输出路径 + """ + self.ImageHandler = ImageHandler() + self.para_dict = {} + self.image_path = image_path + self.out_path = out_path1 + self.out_path2 = out_path2 + self.image_pair = image_pair + pass + + def calu_nature(self,start): + """存入字典""" + + imageinfo_width=self.ImageHandler.get_img_width(self.image_path) + self.para_dict.update({"imageinfo_width":imageinfo_width}) + imageinfo_height=self.ImageHandler.get_img_height(self.image_path) + self.para_dict.update({"imageinfo_height":imageinfo_height}) + # imageinfo_EarthModel=self.ImageHandler.get_projection(self.image_path).split("SPHEROID[", 2)[1].split(",", 2)[0] + # self.para_dict.update({"imageinfo_EarthModel":imageinfo_EarthModel.replace('"','')}) + self.para_dict.update({"imageinfo_EarthModel": "WGS84"}) + # imageinfo_ProjectModel = self.ImageHandler.get_projection(self.image_path).split("DATUM[", 2)[1].split(",", 2)[0] + # self.para_dict.update({"imageinfo_ProjectModel":imageinfo_ProjectModel.replace('"','')}) + self.para_dict.update({"imageinfo_ProjectModel": "UTM"}) + proj = self.ImageHandler.get_projection(self.image_path) # 输出的影像若是投影坐标系则先转成地理坐标系 + keyword = proj.split("[", 2)[0] # 若是地理坐标系则pass + if keyword == "GEOGCS": + pass + elif keyword == "PROJCS": + pp.trans_projcs2geogcs(self.out_path2, self.image_path) + self.image_path = self.out_path2 + elif len(keyword) == 0 or keyword.strip() == "" or keyword.isspace() is True: + raise Exception('image projection is missing!') + + pp.trans_geogcs2projcs(self.out_path, self.image_path) # 坐标投影, 地理转平面投影坐标 + imageinfo_widthspace = self.ImageHandler.get_geotransform(self.out_path)[1] # 投影后的分辨率 + imageinfo_heightspace = -self.ImageHandler.get_geotransform(self.out_path)[5] # 投影后的分辨率 + self.para_dict.update({"imageinfo_widthspace":imageinfo_widthspace}) + self.para_dict.update({"imageinfo_heightspace":imageinfo_heightspace}) + self.para_dict.update({"NominalResolution":imageinfo_widthspace}) + + WidthInMeters = imageinfo_width*imageinfo_widthspace # 投影后的分辨率×宽度 + self.para_dict.update({"WidthInMeters":WidthInMeters}) + + # image_array = self.ImageHandler.get_band_array(self.image_path) + # a2 = np.where(np.isnan(image_array), 999999, image_array) + # MinValue = np.min(a2) + # a3 = np.where(np.isnan(image_array), -999999, image_array) + # MaxValue = np.max(a3) + # + # self.para_dict.update({"MaxValue":MaxValue}) + # self.para_dict.update({"MinValue":MinValue}) + + get_scope = self.ImageHandler.get_scope(self.image_path) + point_upleft, point_upright, point_downleft, point_downright=get_scope[0], get_scope[1], get_scope[2], get_scope[3] + self.para_dict.update({"imageinfo_corner_topLeft_latitude": point_upleft[1]}) + self.para_dict.update({"imageinfo_corner_topLeft_longitude": point_upleft[0]}) + self.para_dict.update({"imageinfo_corner_topRight_latitude": point_upright[1]}) + self.para_dict.update({"imageinfo_corner_topRight_longitude": point_upright[0]}) + self.para_dict.update({"imageinfo_corner_bottomLeft_latitude": point_downleft[1]}) + self.para_dict.update({"imageinfo_corner_bottomLeft_longitude": point_downleft[0]}) + self.para_dict.update({"imageinfo_corner_bottomRight_latitude": point_downright[1]}) + self.para_dict.update({"imageinfo_corner_bottomRight_longitude": point_downright[0]}) + + longitude_max=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).max() + longitude_min=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).min() + latitude_max=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).max() + latitude_min=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).min() + imageinfo_center_latitude=(latitude_max+latitude_min)/2 + imageinfo_center_longitude=(longitude_max+longitude_min)/2 + self.para_dict.update({"imageinfo_center_latitude": imageinfo_center_latitude}) + self.para_dict.update({"imageinfo_center_longitude": imageinfo_center_longitude}) + + # self.para_dict.update({"productType": "GTC"}) # 设置产品类型 + self.para_dict.update({"productFormat": "TIF"}) + productGentime = datetime.datetime.now() + self.para_dict.update({"productGentime": productGentime}) + msg=productGentime-start + self.para_dict.update({"productConsumeTime": msg}) + self.para_dict.update({"unit": "none"}) # 设置单位 + self.para_dict.update({"NoDataValue": "nan"}) + self.para_dict.update({"productLevel": "5"}) # 设置图像位深度 + # noinspection PyBroadException + # try: # 设置图像位深度 + # imagebit="0bit" + # # im=Image.open(self.image_path) + # im = Image.open(r"E:\0test\testworkspace\DEM\ASTGTM2_N24E110_dem.tif") + # if "1" in im.getbands(): + # imagebit="1bit" + # elif "L" in im.getbands() or "P" in im.getbands(): + # imagebit = "8bit" + # elif "R" in im.getbands() and "G" in im.getbands() and "B" in im.getbands(): + # imagebit = "24bit" + # elif "R" in im.getbands() and "G" in im.getbands() and "B" in im.getbands() and "A" in im.getbands(): + # imagebit = "32bit" + # elif "C" in im.getbands() and "M" in im.getbands() and "Y" in im.getbands() and "K" in im.getbands(): + # imagebit = "32bit" + # elif "Y" in im.getbands() and "C" in im.getbands() and "b" in im.getbands() and "C" in im.getbands(): + # imagebit = "32bit" + # elif "I" in im.getbands() or "F" in im.getbands(): + # imagebit = "32bit" + image_array = self.ImageHandler.get_band_array(self.image_path) + try: + gdal_dtypes = { + 'int8': gdal.GDT_Byte, + 'unit16': gdal.GDT_UInt16, + 'int16': gdal.GDT_Int16, + 'unit32': gdal.GDT_UInt32, + 'int32': gdal.GDT_Int32, + 'float32': gdal.GDT_Float32, + 'float64': gdal.GDT_Float64, + } + bit_dtypes = { + 'int8': 8, + 'unit16': 16, + 'int16': 16, + 'unit32': 32, + 'int32': 32, + 'float32': 32, + 'float64': 64, + } + if not gdal_dtypes.get(image_array.dtype.name, None) is None: + bit_num = str(bit_dtypes[image_array.dtype.name]) + datatype=bit_num+"bit" + else: + datatype = str(32) + "bit" + # datatype = str(gdal.GDT_Float32)+"bit" + self.para_dict.update({"imagebit": datatype}) + except Exception: + self.para_dict.update({"imagebit": "None"}) + + self.para_dict.update({"imageinfo_QualifyValue_Product": "NULL"}) + + return self.para_dict + + +class CreateStadardXmlFile: + """读取字典中的属性值,生成一个标准的xml文件""" + def __init__(self, xml_path, para_xml_path, par_dict, path): + """ + xml_path:模板路径 + para_xml_path:算法配置文件的路径 + par_dict:字典 + path:xml模板输出路径 + """ + self.par_dict = par_dict + self.path = path + self.para_xml_path= para_xml_path + shutil.copy(xml_path, path) + pass + + def create_standard_xml(self): + """将字典中的信息写入到copy的xml文件中""" + tree = ElementTree() + tree.parse(self.path) # 影像头文件 + root = tree.getroot() + + para_tree = ElementTree() + para_tree.parse(self.para_xml_path) # 影像头文件 + para_root = para_tree.getroot() + + productinfo = root.find("productinfo") + for key, value in self.par_dict.items(): + if key.split("_")[0] != "imageinfo": + productinfo.find(key).text = str(value) + elif key.split("_")[0] == "imageinfo": + imageinfo = productinfo.find("imageinfo") + if key.split("_")[1] in ["EarthModel", "ProjectModel", "width", "height", "widthspace", "heightspace"]: + imageinfo.find(key.split("_")[1]).text = str(value) + elif key.split("_")[1] == "center": + center = imageinfo.find("center") + center.find(key.split("_")[2]).text = str(value) + elif key.split("_")[1] == "corner": + corner = imageinfo.find("corner") + corner.find(key.split("_")[2]).find(key.split("_")[3]).text = str(value) + elif key.split("_")[1] == "QualifyValue": + QualifyValue = imageinfo.find("QualifyValue") + QualifyValue.find(key.split("_")[2]).text = str(value) + pass + Parameter = root.find("processinfo").find("Parameter") + + para_list=para_root.find("AlgCompt").find("Inputs").findall("Parameter") + for para in para_list: + if para.find("ParaName").text=="FeatureCombination": + para_value = para.find("ParaValue").text + Parameter.find("FeatureCombination").text = str(para_value) + + elif para.find("ParaName").text=="FilterSize": + para_value = para.find("ParaValue").text + Parameter.find("FilterSize").text = str(para_value) + + elif para.find("ParaName").text=="Kernel": + para_value = para.find("ParaValue").text + Parameter.find("Kernel").text = str(para_value) + + elif para.find("ParaName").text=="Cost": + para_value = para.find("ParaValue").text + Parameter.find("Cost").text = str(para_value) + + tree.write(self.path, encoding="utf-8", xml_declaration=True) + diff --git a/landcover-S-SAR/ReferenceFile/6地表覆盖.docx b/landcover-S-SAR/ReferenceFile/6地表覆盖.docx new file mode 100644 index 0000000..f344012 Binary files /dev/null and b/landcover-S-SAR/ReferenceFile/6地表覆盖.docx differ diff --git a/landcover-S-SAR/ReferenceFile/A基于极化SAR的目标极化分解与散射特征提取研究_安文韬.caj b/landcover-S-SAR/ReferenceFile/A基于极化SAR的目标极化分解与散射特征提取研究_安文韬.caj new file mode 100644 index 0000000..4a6ef21 Binary files /dev/null and b/landcover-S-SAR/ReferenceFile/A基于极化SAR的目标极化分解与散射特征提取研究_安文韬.caj differ diff --git a/landcover-S-SAR/ReferenceFile/利用SVM的全极化_双极化与单极化SAR图像分类性能的比较_吴永辉.caj b/landcover-S-SAR/ReferenceFile/利用SVM的全极化_双极化与单极化SAR图像分类性能的比较_吴永辉.caj new file mode 100644 index 0000000..38e6bc3 Binary files /dev/null and b/landcover-S-SAR/ReferenceFile/利用SVM的全极化_双极化与单极化SAR图像分类性能的比较_吴永辉.caj differ diff --git a/landcover-S-SAR/ReferenceFile/极化SAR图像地物分类方法综述_魏丹.caj b/landcover-S-SAR/ReferenceFile/极化SAR图像地物分类方法综述_魏丹.caj new file mode 100644 index 0000000..d0d80c0 Binary files /dev/null and b/landcover-S-SAR/ReferenceFile/极化SAR图像地物分类方法综述_魏丹.caj differ diff --git a/landcover-S-SAR/SurfaceRoughnessMain.spec b/landcover-S-SAR/SurfaceRoughnessMain.spec new file mode 100644 index 0000000..a290918 --- /dev/null +++ b/landcover-S-SAR/SurfaceRoughnessMain.spec @@ -0,0 +1,33 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + + +a = Analysis(['SurfaceRoughnessMain.py'], + pathex=['D:\\Project\\microproduct\\landcover_c_sar'], + binaries=[], + datas=[('E:/soft/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('E:/soft/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='SurfaceRoughnessMain', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True ) diff --git a/landcover-S-SAR/baseTool/x64/Release/ImageMatch.obj b/landcover-S-SAR/baseTool/x64/Release/ImageMatch.obj new file mode 100644 index 0000000..2dffc26 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/ImageMatch.obj differ diff --git a/landcover-S-SAR/baseTool/x64/Release/LIBPQ.dll b/landcover-S-SAR/baseTool/x64/Release/LIBPQ.dll new file mode 100644 index 0000000..21f1003 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/LIBPQ.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/Lerc.dll b/landcover-S-SAR/baseTool/x64/Release/Lerc.dll new file mode 100644 index 0000000..29513ed Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/Lerc.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/OctreeNode.obj b/landcover-S-SAR/baseTool/x64/Release/OctreeNode.obj new file mode 100644 index 0000000..3d22e50 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/OctreeNode.obj differ diff --git a/landcover-S-SAR/baseTool/x64/Release/RPC_Correct.obj b/landcover-S-SAR/baseTool/x64/Release/RPC_Correct.obj new file mode 100644 index 0000000..4b6479f Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/RPC_Correct.obj differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog new file mode 100644 index 0000000..fec0179 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog new file mode 100644 index 0000000..79c356d Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog new file mode 100644 index 0000000..4727173 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog new file mode 100644 index 0000000..c45d321 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog new file mode 100644 index 0000000..b56a673 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog new file mode 100644 index 0000000..605eacb Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate new file mode 100644 index 0000000..a4d4182 --- /dev/null +++ b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:VcpkgTriplet=x64-windows: +Release|x64|D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\| diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog new file mode 100644 index 0000000..024973f Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog new file mode 100644 index 0000000..71d26aa Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog new file mode 100644 index 0000000..6b36871 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog new file mode 100644 index 0000000..e69aabe Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog new file mode 100644 index 0000000..4d44e42 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog new file mode 100644 index 0000000..7404a57 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog new file mode 100644 index 0000000..af942f2 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.Build.CppClean.log b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.Build.CppClean.log new file mode 100644 index 0000000..ef0c252 --- /dev/null +++ b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.Build.CppClean.log @@ -0,0 +1,70 @@ +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simptsn.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\rpc_correct.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\imagematch.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\sateorbit.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\octreenode.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\test_moudel.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\basetool.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\interpolation.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vc142.pdb +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\concrt140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_atomic_wait.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_codecvt_ids.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vccorlib140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcruntime140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcruntime140_1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcamp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcomp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram-s-sar.exe +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram-s-sar.pdb +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram.res +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\boost_filesystem-vc142-mt-x64-1_82.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\gdal.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\zlib1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libcrypto-3-x64.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libssl-3-x64.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\liblzma.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\qhull_r.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\jpeg62.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\tiff.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\geotiff.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\proj.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\sqlite3.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libcurl.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libpng16.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\lerc.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\zstd.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\gif.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\netcdf.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\hdf5_hl.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\hdf5.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libwebp.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libsharpyuv.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libpq.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\pcre2-8.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libexpat.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libxml2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\iconv-2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\geos_c.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\geos.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\json-c.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\openjp2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\spatialite.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\freexl-1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\minizip.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\cl.11472.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\cl.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\cl.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\copylocal.read.1u.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\copylocal.write.1u.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\link.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\link.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\link.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\rc.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\rc.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\rc.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\simorthoprogram-s-sar.write.1u.tlog diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe new file mode 100644 index 0000000..7045b35 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe new file mode 100644 index 0000000..80ff377 --- /dev/null +++ b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe @@ -0,0 +1,11 @@ + + + + + D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe + + + + + + \ No newline at end of file diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb new file mode 100644 index 0000000..934bf10 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.log b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.log new file mode 100644 index 0000000..912d2d6 --- /dev/null +++ b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.log @@ -0,0 +1,59 @@ + baseTool.cpp + ImageMatch.cpp + interpolation.cpp + OctreeNode.cpp + RPC_Correct.cpp + simptsn.cpp + SateOrbit.cpp + SIMOrthoProgram.cpp + test_moudel.cpp +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 test_moudel.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 SateOrbit.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 baseTool.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 simptsn.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\test_moudel.cpp(224,31): warning C4129: “R”: 不可识别的字符转义序列 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.cpp(500,18): warning C4154: 删除数组表达式;转换到提供的指针 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.cpp(942,28): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.cpp(944,47): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(469,15): warning C4101: “asfclass”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 ImageMatch.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(1239,7): warning C4101: “temp_r”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(1239,15): warning C4101: “temp_c”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3170,18): warning C4101: “snr”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,17): warning C4101: “r2”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,37): warning C4101: “c3”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3170,15): warning C4101: “c”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,33): warning C4101: “c2”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,21): warning C4101: “r3”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3170,12): warning C4101: “r”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3327,36): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3327,54): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3328,35): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3328,54): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3352,24): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3353,22): warning C4838: 从“int”转换到“double”需要收缩转换 + LINK : 已指定 /LTCG,但不需要生成代码;从链接命令行中移除 /LTCG 以提高链接器性能 + SIMOrthoProgram.vcxproj -> D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.obj b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.obj new file mode 100644 index 0000000..17450ec Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.obj differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.res b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.res differ diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..a08de7c --- /dev/null +++ b/landcover-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt @@ -0,0 +1,47 @@ +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram.vcxproj.CopyComplete +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\concrt140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_atomic_wait.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_codecvt_ids.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vccorlib140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcruntime140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcruntime140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcamp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcomp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\boost_filesystem-vc142-mt-x64-1_82.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gdal.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zlib1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcrypto-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libssl-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\liblzma.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\qhull_r.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\jpeg62.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\tiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geotiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\proj.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\sqlite3.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcurl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libpng16.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\Lerc.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zstd.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gif.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\netcdf.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5_hl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libwebp.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libsharpyuv.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\LIBPQ.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\pcre2-8.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libexpat.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libxml2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\iconv-2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos_c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\json-c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\openjp2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\spatialite.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\freexl-1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\minizip.dll diff --git a/landcover-S-SAR/baseTool/x64/Release/SateOrbit.obj b/landcover-S-SAR/baseTool/x64/Release/SateOrbit.obj new file mode 100644 index 0000000..b70006e Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/SateOrbit.obj differ diff --git a/landcover-S-SAR/baseTool/x64/Release/baseTool.obj b/landcover-S-SAR/baseTool/x64/Release/baseTool.obj new file mode 100644 index 0000000..c3806e0 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/baseTool.obj differ diff --git a/landcover-S-SAR/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll b/landcover-S-SAR/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll new file mode 100644 index 0000000..f5c136f Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/concrt140.dll b/landcover-S-SAR/baseTool/x64/Release/concrt140.dll new file mode 100644 index 0000000..9752449 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/concrt140.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/freexl-1.dll b/landcover-S-SAR/baseTool/x64/Release/freexl-1.dll new file mode 100644 index 0000000..9145a7d Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/freexl-1.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/gdal.dll b/landcover-S-SAR/baseTool/x64/Release/gdal.dll new file mode 100644 index 0000000..bda7c20 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/gdal.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/geos.dll b/landcover-S-SAR/baseTool/x64/Release/geos.dll new file mode 100644 index 0000000..2edcb83 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/geos.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/geos_c.dll b/landcover-S-SAR/baseTool/x64/Release/geos_c.dll new file mode 100644 index 0000000..d358b2a Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/geos_c.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/geotiff.dll b/landcover-S-SAR/baseTool/x64/Release/geotiff.dll new file mode 100644 index 0000000..f513a51 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/geotiff.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/gif.dll b/landcover-S-SAR/baseTool/x64/Release/gif.dll new file mode 100644 index 0000000..27fdc78 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/gif.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/hdf5.dll b/landcover-S-SAR/baseTool/x64/Release/hdf5.dll new file mode 100644 index 0000000..97fd469 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/hdf5.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/hdf5_hl.dll b/landcover-S-SAR/baseTool/x64/Release/hdf5_hl.dll new file mode 100644 index 0000000..7da3e86 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/hdf5_hl.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/iconv-2.dll b/landcover-S-SAR/baseTool/x64/Release/iconv-2.dll new file mode 100644 index 0000000..29c175c Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/iconv-2.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/interpolation.obj b/landcover-S-SAR/baseTool/x64/Release/interpolation.obj new file mode 100644 index 0000000..29cb9cc Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/interpolation.obj differ diff --git a/landcover-S-SAR/baseTool/x64/Release/jpeg62.dll b/landcover-S-SAR/baseTool/x64/Release/jpeg62.dll new file mode 100644 index 0000000..9c1a2c0 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/jpeg62.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/json-c.dll b/landcover-S-SAR/baseTool/x64/Release/json-c.dll new file mode 100644 index 0000000..abbb168 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/json-c.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/libcrypto-3-x64.dll b/landcover-S-SAR/baseTool/x64/Release/libcrypto-3-x64.dll new file mode 100644 index 0000000..a0ee3e3 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/libcrypto-3-x64.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/libcurl.dll b/landcover-S-SAR/baseTool/x64/Release/libcurl.dll new file mode 100644 index 0000000..647bdc6 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/libcurl.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/libexpat.dll b/landcover-S-SAR/baseTool/x64/Release/libexpat.dll new file mode 100644 index 0000000..6cea742 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/libexpat.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/liblzma.dll b/landcover-S-SAR/baseTool/x64/Release/liblzma.dll new file mode 100644 index 0000000..44372c5 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/liblzma.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/libpng16.dll b/landcover-S-SAR/baseTool/x64/Release/libpng16.dll new file mode 100644 index 0000000..c06222a Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/libpng16.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/libsharpyuv.dll b/landcover-S-SAR/baseTool/x64/Release/libsharpyuv.dll new file mode 100644 index 0000000..e6c1b52 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/libsharpyuv.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/libssl-3-x64.dll b/landcover-S-SAR/baseTool/x64/Release/libssl-3-x64.dll new file mode 100644 index 0000000..4856e67 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/libssl-3-x64.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/libwebp.dll b/landcover-S-SAR/baseTool/x64/Release/libwebp.dll new file mode 100644 index 0000000..e758fc8 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/libwebp.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/libxml2.dll b/landcover-S-SAR/baseTool/x64/Release/libxml2.dll new file mode 100644 index 0000000..1e2599f Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/libxml2.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/minizip.dll b/landcover-S-SAR/baseTool/x64/Release/minizip.dll new file mode 100644 index 0000000..44f5e99 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/minizip.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/msvcp140.dll b/landcover-S-SAR/baseTool/x64/Release/msvcp140.dll new file mode 100644 index 0000000..130f84a Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/msvcp140.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/msvcp140_1.dll b/landcover-S-SAR/baseTool/x64/Release/msvcp140_1.dll new file mode 100644 index 0000000..5c2f46d Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/msvcp140_1.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/msvcp140_2.dll b/landcover-S-SAR/baseTool/x64/Release/msvcp140_2.dll new file mode 100644 index 0000000..737b70a Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/msvcp140_2.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/msvcp140_atomic_wait.dll b/landcover-S-SAR/baseTool/x64/Release/msvcp140_atomic_wait.dll new file mode 100644 index 0000000..c92fcc3 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/msvcp140_atomic_wait.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/msvcp140_codecvt_ids.dll b/landcover-S-SAR/baseTool/x64/Release/msvcp140_codecvt_ids.dll new file mode 100644 index 0000000..9879454 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/msvcp140_codecvt_ids.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/netcdf.dll b/landcover-S-SAR/baseTool/x64/Release/netcdf.dll new file mode 100644 index 0000000..e1cbbf1 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/netcdf.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/openjp2.dll b/landcover-S-SAR/baseTool/x64/Release/openjp2.dll new file mode 100644 index 0000000..d6c8011 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/openjp2.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/pcre2-8.dll b/landcover-S-SAR/baseTool/x64/Release/pcre2-8.dll new file mode 100644 index 0000000..d047b3c Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/pcre2-8.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/proj.db b/landcover-S-SAR/baseTool/x64/Release/proj.db new file mode 100644 index 0000000..7780dbe Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/proj.db differ diff --git a/landcover-S-SAR/baseTool/x64/Release/proj.dll b/landcover-S-SAR/baseTool/x64/Release/proj.dll new file mode 100644 index 0000000..f4f6147 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/proj.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/qhull_r.dll b/landcover-S-SAR/baseTool/x64/Release/qhull_r.dll new file mode 100644 index 0000000..0267c70 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/qhull_r.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/simptsn.obj b/landcover-S-SAR/baseTool/x64/Release/simptsn.obj new file mode 100644 index 0000000..7795393 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/simptsn.obj differ diff --git a/landcover-S-SAR/baseTool/x64/Release/spatialite.dll b/landcover-S-SAR/baseTool/x64/Release/spatialite.dll new file mode 100644 index 0000000..165b6e1 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/spatialite.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/sqlite3.dll b/landcover-S-SAR/baseTool/x64/Release/sqlite3.dll new file mode 100644 index 0000000..65359e2 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/sqlite3.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/test_moudel.obj b/landcover-S-SAR/baseTool/x64/Release/test_moudel.obj new file mode 100644 index 0000000..d254e06 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/test_moudel.obj differ diff --git a/landcover-S-SAR/baseTool/x64/Release/tiff.dll b/landcover-S-SAR/baseTool/x64/Release/tiff.dll new file mode 100644 index 0000000..125e94b Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/tiff.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/vc142.pdb b/landcover-S-SAR/baseTool/x64/Release/vc142.pdb new file mode 100644 index 0000000..6868526 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/vc142.pdb differ diff --git a/landcover-S-SAR/baseTool/x64/Release/vcamp140.dll b/landcover-S-SAR/baseTool/x64/Release/vcamp140.dll new file mode 100644 index 0000000..9fd7179 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/vcamp140.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/vccorlib140.dll b/landcover-S-SAR/baseTool/x64/Release/vccorlib140.dll new file mode 100644 index 0000000..7194329 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/vccorlib140.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/vcomp140.dll b/landcover-S-SAR/baseTool/x64/Release/vcomp140.dll new file mode 100644 index 0000000..dbad71a Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/vcomp140.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/vcpkg.applocal.log b/landcover-S-SAR/baseTool/x64/Release/vcpkg.applocal.log new file mode 100644 index 0000000..fc2d884 --- /dev/null +++ b/landcover-S-SAR/baseTool/x64/Release/vcpkg.applocal.log @@ -0,0 +1,35 @@ + +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\boost_filesystem-vc142-mt-x64-1_82.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gdal.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zlib1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcrypto-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libssl-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\liblzma.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\qhull_r.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\jpeg62.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\tiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geotiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\proj.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\sqlite3.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcurl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libpng16.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\Lerc.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zstd.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gif.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\netcdf.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5_hl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libwebp.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libsharpyuv.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\LIBPQ.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\pcre2-8.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libexpat.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libxml2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\iconv-2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos_c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\json-c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\openjp2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\spatialite.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\freexl-1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\minizip.dll diff --git a/landcover-S-SAR/baseTool/x64/Release/vcruntime140.dll b/landcover-S-SAR/baseTool/x64/Release/vcruntime140.dll new file mode 100644 index 0000000..1d6afaa Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/vcruntime140.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/vcruntime140_1.dll b/landcover-S-SAR/baseTool/x64/Release/vcruntime140_1.dll new file mode 100644 index 0000000..7bf05d3 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/vcruntime140_1.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/zlib1.dll b/landcover-S-SAR/baseTool/x64/Release/zlib1.dll new file mode 100644 index 0000000..e9300f6 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/zlib1.dll differ diff --git a/landcover-S-SAR/baseTool/x64/Release/zstd.dll b/landcover-S-SAR/baseTool/x64/Release/zstd.dll new file mode 100644 index 0000000..09c9050 Binary files /dev/null and b/landcover-S-SAR/baseTool/x64/Release/zstd.dll differ diff --git a/landcover-S-SAR/config.ini b/landcover-S-SAR/config.ini new file mode 100644 index 0000000..626ebf2 --- /dev/null +++ b/landcover-S-SAR/config.ini @@ -0,0 +1,16 @@ +# -*- coding: UTF-8 -*- +# 定义config分组 +[config] +######1-算法基本参数###### +target = LANDCLASS +productLevel = 5 +# 算法名称。修改临时工作区生成临时文件的名称,日志名称; +exe_name = LandCover +# 开启调试模式则不删除临时工作区,True:开启调试,False:不开启调试 +debug = False +######2-算法处理参数###### +# 影像滤波尺寸。取值范围:大于1的奇数,默认值:3 +filter_size = 3 + +#每个类别最大训练样本量 +max_tran__num_per_class =10000 \ No newline at end of file diff --git a/landcover-S-SAR/freeman_decomposition_T3.exe b/landcover-S-SAR/freeman_decomposition_T3.exe new file mode 100644 index 0000000..7871ae7 Binary files /dev/null and b/landcover-S-SAR/freeman_decomposition_T3.exe differ diff --git a/landcover-S-SAR/h_a_alpha_decomposition_T3.exe b/landcover-S-SAR/h_a_alpha_decomposition_T3.exe new file mode 100644 index 0000000..43b0c18 Binary files /dev/null and b/landcover-S-SAR/h_a_alpha_decomposition_T3.exe differ diff --git a/landcover-S-SAR/lee_refined_filter_T3.exe b/landcover-S-SAR/lee_refined_filter_T3.exe new file mode 100644 index 0000000..3b4839c Binary files /dev/null and b/landcover-S-SAR/lee_refined_filter_T3.exe differ diff --git a/landcover-S-SAR/model_meta.xml b/landcover-S-SAR/model_meta.xml new file mode 100644 index 0000000..4600504 --- /dev/null +++ b/landcover-S-SAR/model_meta.xml @@ -0,0 +1,57 @@ + + + + + + + GTC + TIF + + + + nan + BSQ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
diff --git a/landcover-S-SAR/packing.spec b/landcover-S-SAR/packing.spec new file mode 100644 index 0000000..3eca3d4 --- /dev/null +++ b/landcover-S-SAR/packing.spec @@ -0,0 +1,83 @@ +# -*- mode: python ; coding: utf-8 -*- +import sys +import shutil +import os +import tarfile +sys.setrecursionlimit(5000) + +block_cipher = None + +#######begin-ǰ############## +#һtoolļ滻ǰ·µtool +# Դ +cwdpath = os.getcwd() +tool_path = '' +src = '../tool' +des = os.path.join(cwdpath, "tool") +targz_path = os.path.join(cwdpath, "tool.tar.gz") +#ļ +if os.path.exists(des): + if os.path.isdir(des): + shutil.rmtree(des) + os.makedirs(des) +#ѹ +dir = os.path.split(targz_path )[0] +if os.path.exists(dir) is False: + os.makedirs(dir) +with tarfile.open(targz_path, "w:gz") as tar: + tar.add(src, arcname=os.path.basename(src)) +#ѹ +t = tarfile.open(targz_path) +t.extractall(path=cwdpath) +#ɾʱѹ +#os.remove(targz_path) + +# +main_name = '' +for name in os.listdir(cwdpath): + if 'Main.py' in name: + main_name = name +exe_name = exe_name = main_name .split('.')[0][:-4] + '-C-SAR-V2.0' +#######end-ǰ############## + +a = Analysis(['LandCoverMain.py', +'./tool/algorithm/algtools/ScatteringAuxData.py', +'./tool/algorithm/algtools/CoordinateTransformation.py', +'./tool/algorithm/algtools/DEMJoint.py', +'./tool/algorithm/algtools/logHandler.py', +'./tool/algorithm/algtools/PreProcess.py', +'./tool/algorithm/algtools/RieveFilter.py', +'./tool/algorithm/algtools/ROIAlg.py', +'./tool/algorithm/block/blockprocess.py', +'./tool/algorithm/image/ImageHandle.py', +'./tool/algorithm/xml/AlgXmlHandle.py', +'./tool/algorithm/xml/CreatMetafile.py', +'./tool/config/ConfigeHandle.py', +'./tool/logs/logHandler.py',], + pathex=[cwdpath], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='LandCover-C-SAR-V2.1.exe', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True ) diff --git a/landcover-S-SAR/product.xml b/landcover-S-SAR/product.xml new file mode 100644 index 0000000..055c9a6 --- /dev/null +++ b/landcover-S-SAR/product.xml @@ -0,0 +1,60 @@ + + + 地表覆盖类型 + LandCover + LEVEL5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + None + 参考产品介绍PDF + + + + + 德清 + + + + \ No newline at end of file diff --git a/landcover-S-SAR/proj.db b/landcover-S-SAR/proj.db new file mode 100644 index 0000000..7ba6b08 Binary files /dev/null and b/landcover-S-SAR/proj.db differ diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-18-59.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-18-59.log new file mode 100644 index 0000000..2c43a6b --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-18-59.log @@ -0,0 +1,67 @@ +[01/10/2024 18:18:59] [17188] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\landcover-S-SAR ---from: LandCoverMain.check_source (LandCoverMain.py:Line109) +[01/10/2024 18:18:59] [17188] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line319) +[01/10/2024 18:18:59] [17188] [INFO]- create new workspace success! ---from: LandCoverMain.__create_work_space (LandCoverMain.py:Line155) +[01/10/2024 18:19:32] [17188] [INFO]- check_source success! ---from: LandCoverMain.check_source (LandCoverMain.py:Line125) +[01/10/2024 18:19:32] [17188] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[01/10/2024 18:19:32] [17188] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[01/10/2024 18:19:32] [17188] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[01/10/2024 18:19:45] [17188] [INFO]- cut sim_ori success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[01/10/2024 18:20:17] [17188] [INFO]- preprocess_handle success! ---from: LandCoverMain.preprocess_handle (LandCoverMain.py:Line201) +[01/10/2024 18:20:37] [17188] [INFO]- 1,water,num:17285 ---from: LandCoverAuxData.__trans_measuredata (LandCoverAuxData.py:Line127) +[01/10/2024 18:20:37] [17188] [INFO]- max number =10000, random select10000 point as train data! ---from: LandCoverAuxData.__trans_measuredata (LandCoverAuxData.py:Line129) +[01/10/2024 18:20:37] [17188] [INFO]- 2,building,num:10560 ---from: LandCoverAuxData.__trans_measuredata (LandCoverAuxData.py:Line127) +[01/10/2024 18:20:37] [17188] [INFO]- max number =10000, random select10000 point as train data! ---from: LandCoverAuxData.__trans_measuredata (LandCoverAuxData.py:Line129) +[01/10/2024 18:20:37] [17188] [INFO]- 3,crop,num:39396 ---from: LandCoverAuxData.__trans_measuredata (LandCoverAuxData.py:Line127) +[01/10/2024 18:20:37] [17188] [INFO]- max number =10000, random select10000 point as train data! ---from: LandCoverAuxData.__trans_measuredata (LandCoverAuxData.py:Line129) +[01/10/2024 18:20:38] [17188] [INFO]- read csv data success! ---from: LandCoverMain.process_handle (LandCoverMain.py:Line523) +[01/10/2024 18:20:38] [17188] [INFO]- progress bar: 20% ---from: LandCoverMain.process_handle (LandCoverMain.py:Line524) +[01/10/2024 18:20:38] [17188] [WARNING]- OrthoMetaData.get_QualifyValue() error! ---from: MetaDataHandler.get_QualifyValue (MetaDataHandler.py:Line87) +[01/10/2024 18:20:38] [17188] [INFO]- GF3L1AMetaData.get_QualifyValue() success! ---from: MetaDataHandler.get_QualifyValue (MetaDataHandler.py:Line89) +[01/10/2024 18:20:38] [17188] [WARNING]- OrthoMetaData.get_Kdb() error! ---from: MetaDataHandler.get_Kdb (MetaDataHandler.py:Line97) +[01/10/2024 18:20:38] [17188] [INFO]- GF3L1AMetaData.get_Kdb() success! ---from: MetaDataHandler.get_Kdb (MetaDataHandler.py:Line99) +[01/10/2024 18:20:38] [17188] [WARNING]- OrthoMetaData.get_QualifyValue() error! ---from: MetaDataHandler.get_QualifyValue (MetaDataHandler.py:Line87) +[01/10/2024 18:20:38] [17188] [INFO]- GF3L1AMetaData.get_QualifyValue() success! ---from: MetaDataHandler.get_QualifyValue (MetaDataHandler.py:Line89) +[01/10/2024 18:20:38] [17188] [WARNING]- OrthoMetaData.get_Kdb() error! ---from: MetaDataHandler.get_Kdb (MetaDataHandler.py:Line97) +[01/10/2024 18:20:38] [17188] [INFO]- GF3L1AMetaData.get_Kdb() success! ---from: MetaDataHandler.get_Kdb (MetaDataHandler.py:Line99) +[01/10/2024 18:20:38] [17188] [WARNING]- OrthoMetaData.get_QualifyValue() error! ---from: MetaDataHandler.get_QualifyValue (MetaDataHandler.py:Line87) +[01/10/2024 18:20:38] [17188] [INFO]- GF3L1AMetaData.get_QualifyValue() success! ---from: MetaDataHandler.get_QualifyValue (MetaDataHandler.py:Line89) +[01/10/2024 18:20:38] [17188] [WARNING]- OrthoMetaData.get_Kdb() error! ---from: MetaDataHandler.get_Kdb (MetaDataHandler.py:Line97) +[01/10/2024 18:20:38] [17188] [INFO]- GF3L1AMetaData.get_Kdb() success! ---from: MetaDataHandler.get_Kdb (MetaDataHandler.py:Line99) +[01/10/2024 18:20:38] [17188] [WARNING]- OrthoMetaData.get_QualifyValue() error! ---from: MetaDataHandler.get_QualifyValue (MetaDataHandler.py:Line87) +[01/10/2024 18:20:38] [17188] [INFO]- GF3L1AMetaData.get_QualifyValue() success! ---from: MetaDataHandler.get_QualifyValue (MetaDataHandler.py:Line89) +[01/10/2024 18:20:38] [17188] [WARNING]- OrthoMetaData.get_Kdb() error! ---from: MetaDataHandler.get_Kdb (MetaDataHandler.py:Line97) +[01/10/2024 18:20:38] [17188] [INFO]- GF3L1AMetaData.get_Kdb() success! ---from: MetaDataHandler.get_Kdb (MetaDataHandler.py:Line99) +[01/10/2024 18:23:05] [17188] [INFO]- refine_lee filter success! ---from: LandCoverMain.ahv_to_t3 (LandCoverMain.py:Line476) +[01/10/2024 18:23:05] [17188] [INFO]- progress bar: 30% ---from: LandCoverMain.ahv_to_t3 (LandCoverMain.py:Line477) +[01/10/2024 18:24:02] [17188] [INFO]- feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\SWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\SWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\SWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\SWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\SWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\SWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\SWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif'} ---from: LandCoverMain.process_handle (LandCoverMain.py:Line539) +[01/10/2024 18:26:06] [17188] [INFO]- decompose feature success! ---from: LandCoverMain.process_handle (LandCoverMain.py:Line548) +[01/10/2024 18:26:06] [17188] [INFO]- progress bar: 50% ---from: LandCoverMain.process_handle (LandCoverMain.py:Line549) +[01/10/2024 18:26:06] [17188] [INFO]- feature_list:['0: Freeman_Dbl_geo.tif', '1: Freeman_Odd_geo.tif', '2: Freeman_Vol_geo.tif', '3: Yamaguchi4_Dbl_geo.tif', '4: Yamaguchi4_Hlx_geo.tif', '5: Yamaguchi4_Odd_geo.tif', '6: Yamaguchi4_Vol_geo.tif'] ---from: machineLearning.get_name_list (machineLearning.py:Line233) +[01/10/2024 18:26:13] [17188] [INFO]- gene_train_set success! ---from: machineLearning.gene_train_set (machineLearning.py:Line271) +[01/10/2024 18:26:15] [17188] [INFO]- importances:[0.05689924 0.02829015 0.29919273 0.09420504 0.16191243 0.08964642 + 0.26985399],threshold=0.07 ---from: machineLearning.sel_optimal_feature_set (machineLearning.py:Line295) +[01/10/2024 18:26:15] [17188] [INFO]- optimal_feature:[2, 6, 4, 3, 5] ---from: machineLearning.sel_optimal_feature_set (machineLearning.py:Line301) +[01/10/2024 18:26:15] [17188] [INFO]- correlation_map: + [[0. 0.8585481 0.64122694 0.15675201 0.23713112] + [0. 0. 0.20026 0.11654953 0.17071176] + [0. 0. 0. 0.01785906 0.03469099] + [0. 0. 0. 0. 0.05625127] + [0. 0. 0. 0. 0. ]] ---from: machineLearning.remove_correlation_feature (machineLearning.py:Line335) +[01/10/2024 18:26:15] [17188] [INFO]- validity_list_corr:[2 4 3 5] ---from: machineLearning.remove_correlation_feature (machineLearning.py:Line339) +[01/10/2024 18:26:15] [17188] [INFO]- [2 4 3 5] ---from: machineLearning.remove_correlation_feature (machineLearning.py:Line340) +[01/10/2024 18:26:15] [17188] [INFO]- train_feature:['2: Freeman_Vol_geo.tif' '4: Yamaguchi4_Hlx_geo.tif' + '3: Yamaguchi4_Dbl_geo.tif' '5: Yamaguchi4_Odd_geo.tif'] ---from: machineLearning.gene_optimal_train_set (machineLearning.py:Line43) +[01/10/2024 18:26:15] [17188] [INFO]- RF trainning ---from: machineLearning.trainRF (machineLearning.py:Line381) +[01/10/2024 18:26:17] [17188] [INFO]- RF train successful ---from: LandCoverMain.process_handle (LandCoverMain.py:Line564) +[01/10/2024 18:26:17] [17188] [INFO]- progress bar: 60% ---from: LandCoverMain.process_handle (LandCoverMain.py:Line569) +[01/10/2024 18:29:54] [17188] [INFO]- test_feature:dict_keys(['Freeman_Vol_geo', 'Yamaguchi4_Dbl_geo', 'Yamaguchi4_Hlx_geo', 'Yamaguchi4_Odd_geo']) ---from: machineLearning.gene_test_set (machineLearning.py:Line83) +[01/10/2024 18:29:54] [17188] [INFO]- blocking tifs success! ---from: machineLearning.gene_test_set (machineLearning.py:Line84) +[01/10/2024 18:30:00] [17188] [INFO]- create features matrix success! ---from: machineLearning.gene_test_set (machineLearning.py:Line101) +[01/10/2024 18:30:00] [17188] [INFO]- testing ---from: LandCoverMain.process_handle (LandCoverMain.py:Line575) +[01/10/2024 18:32:14] [17188] [INFO]- test success! ---from: LandCoverMain.process_handle (LandCoverMain.py:Line577) +[01/10/2024 18:32:14] [17188] [INFO]- progress bar: 95% ---from: LandCoverMain.process_handle (LandCoverMain.py:Line578) +[01/10/2024 18:32:18] [17188] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LandCover\Temporary\processing\tif_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[01/10/2024 18:32:18] [17188] [INFO]- create ROI image success! ---from: LandCoverMain.create_roi (LandCoverMain.py:Line339) +[01/10/2024 18:32:49] [17188] [INFO]- process_handle success! ---from: LandCoverMain.process_handle (LandCoverMain.py:Line619) +[01/10/2024 18:32:49] [17188] [INFO]- successful production of LandCover products! ---from: LandCoverMain.process_handle (LandCoverMain.py:Line620) +[01/10/2024 18:32:51] [17188] [INFO]- running use time: 0:13:52.343642 ---from: LandCoverMain. (LandCoverMain.py:Line681) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-06.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-06.log new file mode 100644 index 0000000..25c8bf2 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-06.log @@ -0,0 +1,16 @@ +[01/10/2024 18:30:15] [16712] [INFO]- total:110,block:0 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:27] [16712] [INFO]- total:110,block:0 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:28] [16712] [INFO]- total:110,block:15 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:43] [16712] [INFO]- total:110,block:15 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:44] [16712] [INFO]- total:110,block:30 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:59] [16712] [INFO]- total:110,block:30 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:59] [16712] [INFO]- total:110,block:45 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:15] [16712] [INFO]- total:110,block:45 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:15] [16712] [INFO]- total:110,block:60 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:30] [16712] [INFO]- total:110,block:60 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:30] [16712] [INFO]- total:110,block:75 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:47] [16712] [INFO]- total:110,block:75 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:47] [16712] [INFO]- total:110,block:90 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:02] [16712] [INFO]- total:110,block:90 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:32:02] [16712] [INFO]- total:110,block:105 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:11] [16712] [INFO]- total:110,block:105 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-07.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-07.log new file mode 100644 index 0000000..3c1cd48 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-07.log @@ -0,0 +1,30 @@ +[01/10/2024 18:30:15] [17668] [INFO]- total:110,block:1 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:15] [14248] [INFO]- total:110,block:2 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:28] [17668] [INFO]- total:110,block:1 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:28] [17668] [INFO]- total:110,block:16 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:28] [14248] [INFO]- total:110,block:2 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:28] [14248] [INFO]- total:110,block:17 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:44] [17668] [INFO]- total:110,block:16 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:44] [14248] [INFO]- total:110,block:17 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:45] [17668] [INFO]- total:110,block:33 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:45] [14248] [INFO]- total:110,block:34 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:01] [17668] [INFO]- total:110,block:33 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:01] [17668] [INFO]- total:110,block:48 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:01] [14248] [INFO]- total:110,block:34 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:01] [14248] [INFO]- total:110,block:50 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:16] [17668] [INFO]- total:110,block:48 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:17] [14248] [INFO]- total:110,block:50 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:17] [17668] [INFO]- total:110,block:64 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:17] [14248] [INFO]- total:110,block:65 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:32] [17668] [INFO]- total:110,block:64 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:32] [17668] [INFO]- total:110,block:78 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:33] [14248] [INFO]- total:110,block:65 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:33] [14248] [INFO]- total:110,block:80 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:47] [17668] [INFO]- total:110,block:78 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:47] [17668] [INFO]- total:110,block:93 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:49] [14248] [INFO]- total:110,block:80 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:49] [14248] [INFO]- total:110,block:95 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:03] [17668] [INFO]- total:110,block:93 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:32:03] [17668] [INFO]- total:110,block:108 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:05] [14248] [INFO]- total:110,block:95 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:32:11] [17668] [INFO]- total:110,block:108 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-08.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-08.log new file mode 100644 index 0000000..0fe8460 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-08.log @@ -0,0 +1,16 @@ +[01/10/2024 18:30:15] [17840] [INFO]- total:110,block:3 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:29] [17840] [INFO]- total:110,block:3 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:29] [17840] [INFO]- total:110,block:18 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:44] [17840] [INFO]- total:110,block:18 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:44] [17840] [INFO]- total:110,block:31 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:59] [17840] [INFO]- total:110,block:31 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:59] [17840] [INFO]- total:110,block:46 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:15] [17840] [INFO]- total:110,block:46 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:16] [17840] [INFO]- total:110,block:61 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:31] [17840] [INFO]- total:110,block:61 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:31] [17840] [INFO]- total:110,block:76 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:47] [17840] [INFO]- total:110,block:76 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:47] [17840] [INFO]- total:110,block:92 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:03] [17840] [INFO]- total:110,block:92 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:32:03] [17840] [INFO]- total:110,block:107 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:12] [17840] [INFO]- total:110,block:107 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-09.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-09.log new file mode 100644 index 0000000..06697fb --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-09.log @@ -0,0 +1,14 @@ +[01/10/2024 18:30:15] [10168] [INFO]- total:110,block:4 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:29] [10168] [INFO]- total:110,block:4 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:30] [10168] [INFO]- total:110,block:21 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:45] [10168] [INFO]- total:110,block:21 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:45] [10168] [INFO]- total:110,block:36 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:02] [10168] [INFO]- total:110,block:36 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:02] [10168] [INFO]- total:110,block:51 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:17] [10168] [INFO]- total:110,block:51 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:18] [10168] [INFO]- total:110,block:67 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:34] [10168] [INFO]- total:110,block:67 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:34] [10168] [INFO]- total:110,block:83 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:50] [10168] [INFO]- total:110,block:83 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:50] [10168] [INFO]- total:110,block:96 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:06] [10168] [INFO]- total:110,block:96 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-10.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-10.log new file mode 100644 index 0000000..170f136 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-10.log @@ -0,0 +1,16 @@ +[01/10/2024 18:30:15] [5336] [INFO]- total:110,block:5 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:29] [5336] [INFO]- total:110,block:5 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:30] [5336] [INFO]- total:110,block:20 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:44] [5336] [INFO]- total:110,block:20 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:44] [5336] [INFO]- total:110,block:32 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:00] [5336] [INFO]- total:110,block:32 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:00] [5336] [INFO]- total:110,block:47 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:15] [5336] [INFO]- total:110,block:47 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:16] [5336] [INFO]- total:110,block:62 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:31] [5336] [INFO]- total:110,block:62 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:32] [5336] [INFO]- total:110,block:77 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:47] [5336] [INFO]- total:110,block:77 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:47] [5336] [INFO]- total:110,block:91 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:02] [5336] [INFO]- total:110,block:91 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:32:02] [5336] [INFO]- total:110,block:106 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:12] [5336] [INFO]- total:110,block:106 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-11.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-11.log new file mode 100644 index 0000000..ec18881 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-11.log @@ -0,0 +1,16 @@ +[01/10/2024 18:30:15] [8892] [INFO]- total:110,block:6 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:29] [8892] [INFO]- total:110,block:6 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:29] [8892] [INFO]- total:110,block:19 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:45] [8892] [INFO]- total:110,block:19 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:45] [8892] [INFO]- total:110,block:35 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:01] [8892] [INFO]- total:110,block:35 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:01] [8892] [INFO]- total:110,block:49 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:16] [8892] [INFO]- total:110,block:49 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:16] [8892] [INFO]- total:110,block:63 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:32] [8892] [INFO]- total:110,block:63 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:33] [8892] [INFO]- total:110,block:79 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:48] [8892] [INFO]- total:110,block:79 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:48] [8892] [INFO]- total:110,block:94 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:04] [8892] [INFO]- total:110,block:94 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:32:04] [8892] [INFO]- total:110,block:109 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:12] [8892] [INFO]- total:110,block:109 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-12.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-12.log new file mode 100644 index 0000000..f5424f0 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-12.log @@ -0,0 +1,14 @@ +[01/10/2024 18:30:16] [5692] [INFO]- total:110,block:7 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:30] [5692] [INFO]- total:110,block:7 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:30] [5692] [INFO]- total:110,block:22 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:46] [5692] [INFO]- total:110,block:22 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:46] [5692] [INFO]- total:110,block:37 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:02] [5692] [INFO]- total:110,block:37 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:02] [5692] [INFO]- total:110,block:52 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:17] [5692] [INFO]- total:110,block:52 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:17] [5692] [INFO]- total:110,block:66 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:33] [5692] [INFO]- total:110,block:66 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:33] [5692] [INFO]- total:110,block:81 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:50] [5692] [INFO]- total:110,block:81 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:50] [5692] [INFO]- total:110,block:98 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:06] [5692] [INFO]- total:110,block:98 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-13.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-13.log new file mode 100644 index 0000000..cbbd92f --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-13.log @@ -0,0 +1,14 @@ +[01/10/2024 18:30:16] [19128] [INFO]- total:110,block:8 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:30] [19128] [INFO]- total:110,block:8 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:30] [19128] [INFO]- total:110,block:23 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:46] [19128] [INFO]- total:110,block:23 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:46] [19128] [INFO]- total:110,block:38 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:02] [19128] [INFO]- total:110,block:38 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:02] [19128] [INFO]- total:110,block:53 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:18] [19128] [INFO]- total:110,block:53 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:18] [19128] [INFO]- total:110,block:68 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:33] [19128] [INFO]- total:110,block:68 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:34] [19128] [INFO]- total:110,block:82 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:50] [19128] [INFO]- total:110,block:82 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:50] [19128] [INFO]- total:110,block:97 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:05] [19128] [INFO]- total:110,block:97 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-14.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-14.log new file mode 100644 index 0000000..de2d131 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-14.log @@ -0,0 +1,14 @@ +[01/10/2024 18:30:16] [17908] [INFO]- total:110,block:9 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:30] [17908] [INFO]- total:110,block:9 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:31] [17908] [INFO]- total:110,block:24 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:47] [17908] [INFO]- total:110,block:24 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:47] [17908] [INFO]- total:110,block:39 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:02] [17908] [INFO]- total:110,block:39 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:03] [17908] [INFO]- total:110,block:55 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:19] [17908] [INFO]- total:110,block:55 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:19] [17908] [INFO]- total:110,block:70 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:34] [17908] [INFO]- total:110,block:70 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:35] [17908] [INFO]- total:110,block:85 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:50] [17908] [INFO]- total:110,block:85 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:51] [17908] [INFO]- total:110,block:100 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:06] [17908] [INFO]- total:110,block:100 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-16.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-16.log new file mode 100644 index 0000000..047788c --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-16.log @@ -0,0 +1,14 @@ +[01/10/2024 18:30:16] [16460] [INFO]- total:110,block:10 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:30] [16460] [INFO]- total:110,block:10 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:31] [16460] [INFO]- total:110,block:25 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:47] [16460] [INFO]- total:110,block:25 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_5120_6144.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:47] [16460] [INFO]- total:110,block:40 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:02] [16460] [INFO]- total:110,block:40 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_0_1024.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:03] [16460] [INFO]- total:110,block:54 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:18] [16460] [INFO]- total:110,block:54 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:18] [16460] [INFO]- total:110,block:69 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:34] [16460] [INFO]- total:110,block:69 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:34] [16460] [INFO]- total:110,block:84 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:50] [16460] [INFO]- total:110,block:84 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:51] [16460] [INFO]- total:110,block:99 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:06] [16460] [INFO]- total:110,block:99 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-18.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-18.log new file mode 100644 index 0000000..c61423f --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-18.log @@ -0,0 +1,14 @@ +[01/10/2024 18:30:18] [14628] [INFO]- total:110,block:11 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:33] [14628] [INFO]- total:110,block:11 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:33] [14628] [INFO]- total:110,block:26 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:49] [14628] [INFO]- total:110,block:26 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:49] [14628] [INFO]- total:110,block:41 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:05] [14628] [INFO]- total:110,block:41 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:05] [14628] [INFO]- total:110,block:56 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:21] [14628] [INFO]- total:110,block:56 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:21] [14628] [INFO]- total:110,block:71 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:37] [14628] [INFO]- total:110,block:71 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:37] [14628] [INFO]- total:110,block:86 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:53] [14628] [INFO]- total:110,block:86 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_6144_7168.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:53] [14628] [INFO]- total:110,block:101 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:07] [14628] [INFO]- total:110,block:101 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_1024_2048.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-20.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-20.log new file mode 100644 index 0000000..afba466 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-20.log @@ -0,0 +1,14 @@ +[01/10/2024 18:30:20] [6820] [INFO]- total:110,block:12 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:36] [6820] [INFO]- total:110,block:12 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:36] [6820] [INFO]- total:110,block:27 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:52] [6820] [INFO]- total:110,block:27 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:52] [6820] [INFO]- total:110,block:42 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:08] [6820] [INFO]- total:110,block:42 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:08] [6820] [INFO]- total:110,block:57 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:23] [6820] [INFO]- total:110,block:57 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:23] [6820] [INFO]- total:110,block:72 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:39] [6820] [INFO]- total:110,block:72 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:39] [6820] [INFO]- total:110,block:87 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:55] [6820] [INFO]- total:110,block:87 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_7168_8192.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:55] [6820] [INFO]- total:110,block:102 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:08] [6820] [INFO]- total:110,block:102 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_2048_3072.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-22.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-22.log new file mode 100644 index 0000000..9153e43 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-22.log @@ -0,0 +1,14 @@ +[01/10/2024 18:30:22] [16528] [INFO]- total:110,block:13 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:38] [16528] [INFO]- total:110,block:13 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:38] [16528] [INFO]- total:110,block:28 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:54] [16528] [INFO]- total:110,block:28 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:54] [16528] [INFO]- total:110,block:43 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:10] [16528] [INFO]- total:110,block:43 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:10] [16528] [INFO]- total:110,block:58 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:25] [16528] [INFO]- total:110,block:58 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:25] [16528] [INFO]- total:110,block:73 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:41] [16528] [INFO]- total:110,block:73 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:41] [16528] [INFO]- total:110,block:88 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:57] [16528] [INFO]- total:110,block:88 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_8192_9216.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:57] [16528] [INFO]- total:110,block:103 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:09] [16528] [INFO]- total:110,block:103 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_3072_4096.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-23.log b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-23.log new file mode 100644 index 0000000..1f54657 --- /dev/null +++ b/landcover-S-SAR/run_log/LandCover2024-01-10-18-30-23.log @@ -0,0 +1,14 @@ +[01/10/2024 18:30:23] [11612] [INFO]- total:110,block:14 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:39] [11612] [INFO]- total:110,block:14 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:39] [11612] [INFO]- total:110,block:29 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:30:55] [11612] [INFO]- total:110,block:29 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:30:55] [11612] [INFO]- total:110,block:44 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:11] [11612] [INFO]- total:110,block:44 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:11] [11612] [INFO]- total:110,block:59 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:26] [11612] [INFO]- total:110,block:59 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:27] [11612] [INFO]- total:110,block:74 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:42] [11612] [INFO]- total:110,block:74 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:42] [11612] [INFO]- total:110,block:89 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:31:58] [11612] [INFO]- total:110,block:89 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_8926_9950.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) +[01/10/2024 18:31:58] [11612] [INFO]- total:110,block:104 testing data !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line108) +[01/10/2024 18:32:10] [11612] [INFO]- total:110,block:104 test data finished !path:D:\micro\SWork\LandCover\Temporary\processing\LandCover\LandCover_9340_10364_4096_5120.tif ---from: machineLearning.predict_blok (machineLearning.py:Line131) diff --git a/landcover-S-SAR/test_tool/MarkRange.py b/landcover-S-SAR/test_tool/MarkRange.py new file mode 100644 index 0000000..3619d01 --- /dev/null +++ b/landcover-S-SAR/test_tool/MarkRange.py @@ -0,0 +1,101 @@ +# -*- coding: UTF-8 -*- +""" +@Function :标记工具 +""" +import cv2 +from tool.algorithm.algtools.CoordinateTransformation import * +import numpy as np + + +# mouse callback function +def draw_circle(event, x, y, flags, param): + if event == cv2.EVENT_LBUTTONDOWN: + param.appendPoint(x, y) + #print("{0},{1}".format(x, y)) + +class MarkRange: + def __init__(self,img=None,imgWidth=512,imgHeight=512): + self._PointList=[] + if img is None: + self._img = np.zeros((imgWidth, imgHeight, 3), np.uint8) + else: + self._img=img.copy() + self._imgShow=self._img.copy() + self._MarkFlag=False + + def doMark(self,pointNum=-1): + cv2.namedWindow('image') + cv2.setMouseCallback('image', draw_circle,self) + while (True): + cv2.imshow('image', self._imgShow) + code=cv2.waitKey(20) + if code==115: + break + if pointNum!=-1 and pointNum==len(self._PointList): + break + if self._MarkFlag==True: + self._MarkFlag=False + self._drawPoint() + + cv2.destroyAllWindows() + return self._PointList + + def appendPoint(self,x,y): + self._PointList.append([x,y]) + self._MarkFlag=True + + def _drawPoint(self): + for p in self._PointList: + cv2.circle(self._imgShow,p,2,[0,0,255],cv2.FILLED) + +def Mark(): + img = np.zeros((512, 512, 3), np.uint8) + markRag=MarkRange(img,400,300) + + markRag.doMark(4) + +def GetlonlatFromMark(markRag,ref_tif_path): + counterSize = [2] + pointNum=10 + tif = ref_tif_path + # bmp = 'polarisation_fraction.bmp' + # img = cv2.imread(bmp,1) + # if img is None: + # print("img is none") + # return + outline = [] + for item in counterSize: + # markRag = MasrkRange(img) + plist = markRag.doMark(-1) # 点击‘s’退出标记 + if len(plist) > 0: + outline.append(plist) + + gdal.AllRegister() + # dataset = gdal.Open(r"D:\\DATA\\雷达测试\\GaoFen3_20200528_HH_DB.tif") + dataset = gdal.Open(tif) + print('数据投影:') + print(dataset.GetProjection()) + print('数据的大小(行,列):') + print('(%s %s)' % (dataset.RasterYSize, dataset.RasterXSize)) + lonlatList=[] + fw = open('coords.txt', "w") + poly = 'POLYGON((' + for item in outline: + for cell in item: + projs = imagexy2geo(dataset, cell[1], cell[0]) + coords = geo2lonlat(dataset,projs[0], projs[1]) + coordstr="{0} {1},".format(coords[1],coords[0]) + poly = poly + str(coordstr) + print(coordstr) + + poly = poly[:-1] + poly +='))' + print(poly) + fw.write(poly) + fw.write('\n') + +if __name__ == '__main__': + # mr = MarkRange(cv2.imread('polarisation_fraction.bmp',1)) + mr = MarkRange(cv2.imread('D:\\1.tif', 1)) + ref_tif_path = 'D:\\1.tif' + GetlonlatFromMark(mr,ref_tif_path) # 在图像上标记,输出图像轮廓点; 点击's'退出标记 \ No newline at end of file diff --git a/landcover-S-SAR/yamaguchi_4components_decomposition_T3.exe b/landcover-S-SAR/yamaguchi_4components_decomposition_T3.exe new file mode 100644 index 0000000..4abd50b Binary files /dev/null and b/landcover-S-SAR/yamaguchi_4components_decomposition_T3.exe differ diff --git a/landcover-S-SAR/打包命令.txt b/landcover-S-SAR/打包命令.txt new file mode 100644 index 0000000..23defac --- /dev/null +++ b/landcover-S-SAR/打包命令.txt @@ -0,0 +1,5 @@ +cd landcover_c_sar +打包成一个文件: pyinstaller -D packing.spec +打包成一个目录: pyinstaller -D LandCoverMain.py + +pyinstaller -F --add-data "D/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml;./dask" --add-data "D/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml;./distributed" SurfaceRoughnessMain.py diff --git a/leafAreaIndex-S-SAR/LeafAreaIndex.xml b/leafAreaIndex-S-SAR/LeafAreaIndex.xml new file mode 100644 index 0000000..2a0452f --- /dev/null +++ b/leafAreaIndex-S-SAR/LeafAreaIndex.xml @@ -0,0 +1,246 @@ + + + CSAR_202107275419_0001-0 + D:\micro\SWork\ + + File + ElementAlg + LeafAreaIndex_S_SAR_V2.2 + LeafAreaIndex_S_SAR_V2.2.exe + 叶面积指数产品反演 + 微波卫星3-5级产品生产模型 + LeafAreaIndex_S_SAR_V2.2-1 + 2.2 + 陆表类产品_叶面积指数 + 5 + LeafAreaIndex_中科卫星应用德清研究院_2.2 + 中科卫星应用德清研究院 + 景-算法 + 1.8 + python + + 0 + 0 + Windows10 + 单核 + 4GB + 20GB + 无需求 + 无需求 + 无需求 + + + + + Polarization + 极化方式 + 选择处理的极化方式输入:优先选择HV,其次选择HH或VV。填写'empty',则软件按照HV、HH、VV的顺序自动搜索 + Value + string + Man + HV + True + False + UploadInput + Aux + 0 + Aux + + + SAR + SAR影像后向散射产品 + 经过辐射校正、地理定标(WGS84)的后向散射产品,包含HV、HH或VV极化方法 + File + tar.gz + Man + E:\MicroWorkspace\S_SAR\AHV\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal.tar.gz + True + False + File + production + 0 + BackScattering_中科卫星应用德清研究院_2.1 + + + box + 经纬度包围盒 + 经纬度包围盒SNWE。例子:30.0;30.2;117.3;117.5,不填写则使用影像相交区域作为包围盒 + Value + string + Man + empty + True + False + UploadInput + Aux + 0 + Aux + + + soilMeasured + 土壤水分产品 + 土壤水分产品 + File + tif + Man + E:\MicroWorkspace\S_SAR\AHV\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal-SMC.tif + True + False + File + Aux + 1 + Aux + + + laiMeasuredData + 叶面积指数实测数据 + 叶面积指数实测数据 + File + csv + Man + E:\MicroWorkspace\S_SAR\AHV\laiplus2.csv + True + False + File + Aux + 1 + Aux + + + NDVI + NDVI + NDVI影像,坐标系要求:WGS84 + File + tif + Cal + E:\MicroWorkspace\S_SAR\AHV\S2_NDVImed.tif + True + False + File + production + 1 + Aux + + + NDVIScope + NDVI范围 + NDVI最小值和NDVI最大值,使用“;”分割 + Value + string + Man + 0;1 + True + False + UploadInput + Aux + 0 + Aux + + + Covering + 地表覆盖度 + 地表覆盖度数据,坐标系要求:WGS84 + File + tif + Cal + E:\MicroWorkspace\S_SAR\AHV\n50_35_2010lc030.tif + True + False + File + production + 1 + Aux + + + CoveringIDs + 地表覆盖类型数据的类别id + 地表覆盖类型数据中植被区域、裸土区域的类别id,多个id使用“;”分割。示例:GlobeLand30数据的cover_roi_ids = 10;20;30;40;50;70;71;72;90 + Value + string + Man + empty + True + False + UploadInput + Aux + 0 + Aux + + + A + 经验系数A + A与郁闭度为1的植被层后向散射系数-31.6 + Value + float + Cal + -31.6 + True + False + UploadInput + Aux + 1 + Aux + + + B + 经验系数B + B为植被层衰减系数 + Value + float + Cal + 0.01 + True + False + UploadInput + Aux + 1 + Aux + + + C + 经验系数C + C与土壤含水量相关 + Value + float + Cal + 0.001 + True + False + UploadInput + Aux + 1 + Aux + + + D + 经验系数D + D为完全干燥土壤的后向散射系数,与土壤表面粗糙度相关 + Value + float + Cal + -5 + True + False + UploadInput + Aux + 1 + Aux + + + + + LeafAreaIndexProduct + 叶面积指数反演产品 + 叶面积指数反演产品 + File + tar.gz + Cal + D:\micro\SWork\LeafAreaIndex\Output\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal-LAI.tar.gz + DEFAULT + DEFAULT + DEFAULT + DEFAULT + + + + \ No newline at end of file diff --git a/leafAreaIndex-S-SAR/LeafIndexMain.py b/leafAreaIndex-S-SAR/LeafIndexMain.py new file mode 100644 index 0000000..dbf2d44 --- /dev/null +++ b/leafAreaIndex-S-SAR/LeafIndexMain.py @@ -0,0 +1,566 @@ +# -*- coding: UTF-8 -*- +""" +@Project :MicroProduct +@File :LeafIndexMain.PY +@Function :主函数 +@Author :SHJ +@Date :2022/11/07 +@Version :2.0.0 +修改历史: +[修改序列] [修改日期] [修改者] [修改内容] + 1 2022-6-27 李明明 1.增加配置文件config.ini; 2.修复快速图全黑的问题; 3.内部处理使用地理坐标系(4326); +""" +from osgeo import gdalconst + +from tool.algorithm.algtools.PreProcess import PreProcess as pp # 此行放在下面会报错,最好放在上面 +from tool.algorithm.xml.AlgXmlHandle import ManageAlgXML, CheckSource, InitPara # 导入xml文件读取与检查文件 +from tool.algorithm.algtools.logHandler import LogHandler +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.block.blockprocess import BlockProcess +from tool.algorithm.xml.CreateMetaDict import CreateMetaDict, CreateProductXml +from tool.config.ConfigeHandle import Config as cf +from tool.algorithm.xml.CreatMetafile import CreateMetafile +from tool.algorithm.algtools.ROIAlg import ROIAlg as roi +from tool.algorithm.algtools.filter.lee_Filter import Filter +from LeafIndexXmlInfo import CreateDict, CreateStadardXmlFile +from tool.csv.csvHandle import csvHandle +import os +import shutil +import logging +import datetime +import glob +import numpy as np +import scipy.spatial.transform # 用于解决打包错误 +import scipy.spatial.transform._rotation_groups # 用于解决打包错误 +import scipy.special.cython_special # 用于解决打包错误 +import pyproj._compat +from scipy.interpolate import griddata +import sys +import multiprocessing +from tool.file.fileHandle import fileHandle +from sample_process import read_sample_csv,combine_sample_attr,ReprojectImages2,read_tiff,check_sample,split_sample_list +from tool.LAI.LAIProcess import train_WMCmodel,test_WMCModel,process_tiff + +cover_id_list = [] +threshold_of_ndvi_min = 0 +threshold_of_ndvi_max = 0 +multiprocessing_num = int(cf.get('multiprocessing_num')) +leaf_index_value_min = float(cf.get('product_value_min')) +leaf_index_value_max = float(cf.get('product_value_max')) + +FILTER_SISE = int(cf.get('filter_sise')) +if cf.get('debug') == 'True': + DEBUG = True +else: + DEBUG = False +file = fileHandle(DEBUG) +EXE_NAME = cf.get('exe_name') +tar = '-' + cf.get('target') +productLevel = cf.get('productLevel') +LogHandler.init_log_handler('run_log\\' + EXE_NAME) +logger = logging.getLogger("mylog") +csvh = csvHandle() +# env_str = os.path.split(os.path.realpath(__file__))[0] +env_str =os.path.dirname(os.path.abspath(sys.argv[0])) +os.environ['PROJ_LIB'] = env_str +class LeafIndexMain: + """ + 叶面积指数主函数 + """ + def __init__(self, alg_xml_path): + self.alg_xml_path = alg_xml_path + self.imageHandler = ImageHandler() + self.BlockProcess = BlockProcess() + self.__alg_xml_handler = ManageAlgXML(alg_xml_path) + self.__check_handler = CheckSource(self.__alg_xml_handler) + + self.__workspace_path, self.__workspace_soimois_path,self.__workspace_soimois_path = None, None, None + self.__input_paras, self.__processing_paras, self.__processing_paras = {}, {}, {} + self.__out_para = None + # 参考影像路径,坐标系 + self.__ref_img_path, self.__proj = '', '' + # 宽/列数,高/行数 + self.__cols, self.__rows = 0, 0 + # 影像投影变换矩阵 + self.__geo = [0, 0, 0, 0, 0, 0] + # 极化影像的名称 + self.__sar_tif_name = None + + def check_source(self): + """ + 检查算法相关的配置文件,图像,辅助文件是否齐全 + """ + env_str = os.getcwd() + logger.info("sysdir: %s", env_str) + if self.__check_handler.check_alg_xml() is False: + return False + if self.__check_handler.check_run_env() is False: + return False + self.__workspace_path = self.__alg_xml_handler.get_workspace_path() + self.__create_work_space() + self.__task_id = self.__alg_xml_handler.get_task_id() + self.__input_paras = self.__alg_xml_handler.get_input_paras() # 获取输入文件夹中的数据名、类型、地址 + # self.__out_para = os.path.join(self.__workspace_path,EXE_NAME, 'Output', r"LeafAreaIndexProduct.tar.gz") + SrcImageName = os.path.split(self.__input_paras["SAR"]['ParaValue'])[1].split('.tar.gz')[0] + result_name = SrcImageName + tar + ".tar.gz" + # out_name = os.path.splitext(os.path.splitext(os.path.basename(self.__input_paras['SLC']['ParaValue']))[0])[0] + # self.__out_para = os.path.join(self.__workspace_path, EXE_NAME, 'Output', "BackScatteringProduct.tar.gz") + self.__out_para = os.path.join(self.__workspace_path, EXE_NAME, 'Output', result_name) + self.__alg_xml_handler.write_out_para("LeafAreaIndexProduct", self.__out_para) # 写入输出参数 + + Polarization = self.__input_paras['Polarization']['ParaValue'] + if Polarization == "HV": + self.__sar_tif_name = "HV" + elif Polarization == "HH": + self.__sar_tif_name = "HH" + elif Polarization == "VV": + self.__sar_tif_name = "VV" + elif Polarization == 'empty' or Polarization == 'Empty' or Polarization == 'EMPTY': + self.__sar_tif_name = 'empty' + else: + raise ValueError("input Para 'Polarization' is not 'HV'、'HH'、'VV'or 'empty'!") + self.__processing_paras = InitPara.init_processing_paras(self.__input_paras, self.__workspace_preprocessed_path) + self.__processing_paras.update(self.get_tar_gz_inf(self.__processing_paras["sar_path0"])) + logger.info('check_source success!') + return True + + def get_tar_gz_inf(self, tar_gz_path): + para_dic = {} + name = os.path.split(tar_gz_path)[1].rstrip('.tar.gz') + file_dir = os.path.join(self.__workspace_preprocessing_path, name + '\\') + file.de_targz(tar_gz_path, file_dir) + # 元文件字典 + para_dic.update(InitPara.get_meta_dic_new(InitPara.get_meta_paths(file_dir, name), name)) + # tif路径字典 + pol_dic = InitPara.get_polarization_mode(InitPara.get_tif_paths(file_dir, name)) + flag_list = [0, 0] + if self.__sar_tif_name == 'empty': + for key, in_tif_path in pol_dic.items(): + # 获取极化类型 + if 'HV' == key and flag_list[0] == 0: + para_dic.update({'HV': in_tif_path}) + flag_list[0] = 1 + elif 'HH' == key and flag_list[0] == 0: + para_dic.update({'HH': in_tif_path}) + flag_list[0] = 1 + elif 'VV' == key and flag_list[0] == 0: + para_dic.update({'VV': in_tif_path}) + flag_list[0] = 1 + elif 'LocalIncidenceAngle' == key: + para_dic.update({'LocalIncidenceAngle': in_tif_path}) + flag_list[1] = 1 + else: + continue + else: + for key, in_tif_path in pol_dic.items(): + # 获取极化类型 + if self.__sar_tif_name == key and flag_list[0] == 0: + para_dic.update({self.__sar_tif_name: in_tif_path}) + flag_list[0] = 1 + elif 'LocalIncidenceAngle' == key: + para_dic.update({'LocalIncidenceAngle': in_tif_path}) + flag_list[1] = 1 + if flag_list != [1, 1]: + raise Exception('There are not ' + self.__sar_tif_name + '、LocalIncidenceAngle or meta.xml in path:', tar_gz_path) + return para_dic + + def __create_work_space(self): + """ + 删除原有工作区文件夹,创建新工作区文件夹 + """ + self.__workspace_preprocessing_path = self.__workspace_path + EXE_NAME + "\\Temporary\\preprocessing""\\" + self.__workspace_preprocessed_path = self.__workspace_path + EXE_NAME + "\\Temporary\\preprocessed""\\" + self.__workspace_processing_path = self.__workspace_path + EXE_NAME + "\\Temporary\\processing""\\" + + self.__workspace_maskcai_image_path = self.__workspace_path + EXE_NAME + "\\Temporary\\maskcai_image""\\" + self.__workspace_maskcai_SoilMoi_path = self.__workspace_path + EXE_NAME + "\\Temporary\\maskcai_SoilMoi""\\" + self.__workspace_maskcai_localang_path = self.__workspace_path + EXE_NAME + "\\Temporary\\maskcai_localang\\" + + self.__workspace_cai_sartif_path = self.__workspace_path + EXE_NAME + "\\Temporary\\cai_sartif""\\" + self.__workspace_cai_SoilMoi_path = self.__workspace_path + EXE_NAME + "\\Temporary\\cai_SoilMoi""\\" + self.__workspace_cai_localang_path = self.__workspace_path + EXE_NAME + "\\Temporary\\cai_localang""\\" + self.__workspace_Leafindex_path = self.__workspace_path + EXE_NAME + "\\Temporary\\Leafindex""\\" + self.__product_dic = self.__workspace_processing_path + "product\\" + + path_list = [self.__workspace_preprocessing_path, self.__workspace_preprocessed_path, + self.__workspace_processing_path, self.__workspace_maskcai_image_path, + self.__workspace_maskcai_SoilMoi_path, self.__workspace_maskcai_localang_path, + self.__workspace_cai_sartif_path, + self.__workspace_cai_SoilMoi_path, self.__workspace_cai_localang_path, + self.__workspace_Leafindex_path] + file.creat_dirs(path_list) + logger.info('create new workspace success!') + + def del_temp_workspace(self): + """ + 临时工作区 + """ + if DEBUG is True: + return + path = self.__workspace_path + EXE_NAME + r'\Temporary' + if os.path.exists(path): + file.del_folder(path) + + def preprocess_handle(self): + """ + 预处理 + """ + para_names = [self.__sar_tif_name, 'LocalIncidenceAngle', "NDVI", "Covering", 'soilMeasured'] + ref_img_name = self.__sar_tif_name + p = pp() + self.__preprocessed_paras = p.preprocessing(para_names, ref_img_name, + self.__processing_paras, + self.__workspace_preprocessing_path, + self.__workspace_preprocessed_path) + self.__ref_img_path, self.__cols, self.__rows, self.__proj, self.__geo = p.get_ref_inf( + self.__preprocessed_paras[ref_img_name]) + + logger.info('preprocess_handle success!') + logger.info('progress bar: 30%') + + + def cal_roi(self): + """ + 创建掩膜,并裁剪成统一范围 + """ + # 1、利用叠掩区域生成局部入射角的Mask + processing_path = self.__workspace_processing_path + # 利用角度为nan生成Mask + pp.check_LocalIncidenceAngle(self.__preprocessed_paras['LocalIncidenceAngle'], self.__preprocessed_paras['LocalIncidenceAngle']) + angle_nan_mask_path = processing_path + 'angle_nan_mask.tif' + roi.trans_tif2mask(angle_nan_mask_path, self.__preprocessed_paras['LocalIncidenceAngle'], np.nan) + # 利用影像的有效范围生成MASK + tif_nan_mask_path = processing_path + 'tif_mask_nan.tif' + roi.trans_tif2mask(tif_nan_mask_path, self.__preprocessed_paras[self.__sar_tif_name], np.nan) + # tif_zero_mask_path = processing_path + 'tif_mask_zero.tif' + # roi.trans_tif2mask(tif_zero_mask_path, self.__preprocessed_paras[self.__sar_tif_name], 0,0) + + # 2、利用cover计算植被覆盖范围 + cover_mask_path = self.__workspace_processing_path + "SurfaceCover_mask.tif" + if self.__processing_paras['CoveringIDs'] == 'empty': + cover_data = ImageHandler.get_data(self.__preprocessed_paras["Covering"]) + cover_data[np.where(np.isnan(cover_data))] = 0 + cover_id_list = list(np.unique(cover_data)) + else: + cover_id_list = list(self.__processing_paras['CoveringIDs'].split(';')) + cover_id_list = [int(num) for num in cover_id_list] + roi.trans_cover2mask(cover_mask_path, self.__preprocessed_paras["Covering"], cover_id_list) + # 3、利用NDVI计算裸土范围该指数的输出值在 -1.0 和 1.0 之间,大部分表示植被量, + # 负值主要根据云、水和雪而生成 + # 接近零的值则主要根据岩石和裸土而生成。 + # 较低的(小于等于 0.1)NDVI 值表示岩石、沙石或雪覆盖的贫瘠区域。 + # 中等值(0.2 至 0.3)表示灌木丛和草地 + # 较高的值(0.6 至 0.8)表示温带雨林和热带雨林。 + ndvi_mask_path = self.__workspace_processing_path + "Ndvi_mask.tif" + ndvi_scope = list(self.__processing_paras['NDVIScope'].split(';')) + threshold_of_ndvi_min = float(ndvi_scope[0]) + threshold_of_ndvi_max = float(ndvi_scope[1]) + roi.trans_tif2mask(ndvi_mask_path, self.__preprocessed_paras["NDVI"], threshold_of_ndvi_min, threshold_of_ndvi_max) + logger.info('create masks success!') + # 4、利用覆盖范围和裸土范围 生成总的MASK + bare_land_mask_path = self.__workspace_processing_path + "bare_land_mask.tif" + roi.combine_mask(bare_land_mask_path, ndvi_mask_path, cover_mask_path) + roi.combine_mask(bare_land_mask_path, bare_land_mask_path, tif_nan_mask_path) + # roi.combine_mask(bare_land_mask_path, bare_land_mask_path, tif_zero_mask_path) + roi.combine_mask(bare_land_mask_path, bare_land_mask_path, angle_nan_mask_path) + logger.info('combine_mask success!') + + # 5、使用ROI区域进行掩膜 + roi.cal_roi(self.__workspace_maskcai_localang_path + "LocalIncidenceAngle_preproed.tif", + self.__preprocessed_paras["LocalIncidenceAngle"], bare_land_mask_path, background_value=1) + logger.info('create ROI three image success!') + return bare_land_mask_path + + def cal_leaf_index(self, vm_file, image_file, angle_file, v2_path, num): + """ + 叶面积指数计算公式 + V1:植被层特征参数,V1设定为1 + v2:植被层特征参数,V2为叶面积指数 + A,B,C,D 经验系数 + vm 土壤体积含水量 + """ + # 滤波 + # image_filter_path = v2_path.replace("LeafAreaIndexProduct","lee_filer_img") + # f.lee_filter(image_file, image_filter_path, FILTER_SISE) + + a = self.__processing_paras["A"] + b = self.__processing_paras["B"] + c = self.__processing_paras["C"] + d = self.__processing_paras["D"] + # k = self.__processing_paras["K"] + # m = self.__processing_paras["M"] + v1 = 1 + vm_value = self.imageHandler.get_band_array(vm_file, 1) + image_value = self.imageHandler.get_band_array(image_file, 1) + + # Filter.lee_filter_array(image_value, image_value, FILTER_SISE) + + angle = self.imageHandler.get_band_array(angle_file, 1) + cos_angle_value = np.cos(angle) + # 开始计算叶面积指数 + back_soil = c * vm_value - d + t = (image_value - a * v1 * cos_angle_value) / (back_soil - a * v1 * cos_angle_value) + where_0 = np.where(t <= 0) + t[where_0] = 1 + array_v2 = -1 * (np.log(t)) * cos_angle_value / (2 * b) + array_v2[where_0] = 0 + self.imageHandler.write_img(v2_path, self.__proj, self.__geo, array_v2) + logger.info('block:%s cal LeafIndex success!', num) + + def create_soil_moisture_tif(self): + """ + 创建土壤介电常数影像 + """ + # 读取实测值,从经纬度坐标系转为图像坐标系 + measured_data_img = csvh.trans_measuredata(csvh.readcsv(self.__processing_paras['MeasuredData']), self.__ref_img_path) + # 插值法生成土壤水分二维影像 + grid_x, grid_y = np.mgrid[0:self.__rows:1, 0:self.__cols:1] + points = np.array(measured_data_img)[:, 0:2] + values = np.array(measured_data_img)[:, 2].T + grid_z0 = griddata(points, values, (grid_x, grid_y), method='nearest') + self.__processing_paras['SoilMoisture'] = os.path.join(self.__workspace_maskcai_SoilMoi_path, 'soil_moisture.tif') + self.imageHandler.write_img(self.__processing_paras['SoilMoisture'], self.__proj, self.__geo, grid_z0) + logger.info('create soil_moisture image success!') + logger.info('progress bar: 40%') + + def cal_empirical_parameters(self): + work_path = self.__workspace_path + EXE_NAME + "\\Temporary\\empirical""\\" + # b. 结果工作 + result_dir_path = self.__workspace_path + EXE_NAME + "\\Temporary\\empirical_result""\\" + path_list = [work_path, result_dir_path] + file.creat_dirs(path_list) + + # 1. 后向散射系数 dB + sigma_path = self.__workspace_maskcai_image_path + self.__sar_tif_name+'.tif' + # 2. 局地入射角 + incident_angle_path = self.__workspace_maskcai_localang_path + "LocalIncidenceAngle_preproed.tif" + # 3. 样本csv地址 + lai_csv_path = self.__processing_paras['laiMeasuredData'] + # 4. NDVI影像地址 -- 修正模型 + NDVI_tiff_path = self.__preprocessed_paras["NDVI"] + # 5. 土壤含水量影像地址 + soil_water_tiff_path = self.__preprocessed_paras['soilMeasured'] + # 6. 土壤含水量样本地址 + soil_water_csv_path = r"" + + # 7. 选择土壤含水量影像 + soil_water = 'tiff' + # 8. 输出图片 + train_err_image_path = os.path.join(result_dir_path, "train_image.png") + NDVI_min = -1 # 完全裸土对应的 NDVI 值 + NDVI_max = 1 # 完全植被覆盖对应的 NDVI 值 + # 临时变量 + soil_tiff_resample_path = os.path.join(work_path, "soil_water.tiff") # 与 后向散射系数同样分辨率的 土壤水分影像 + NDVI_tiff_resample_path = os.path.join(work_path, 'NDVI.tiff') # 与 后向散射系数产品同样分辨率的 NDVI影像 + incident_angle_resample_path = os.path.join(work_path, "localincangle.tiff") + + # 读取数据 + lai_sample = read_sample_csv(lai_csv_path) # 读取样本数据 + sigma_tiff = read_tiff(sigma_path) # 读取后向散射系数 + incident_angle = read_tiff(incident_angle_path) # 读取局地入射角 + + # 对于土壤水分、NDVI做重采样 + ReprojectImages2(soil_water_tiff_path, sigma_path, soil_tiff_resample_path, resampleAlg=gdalconst.GRA_Bilinear) + ReprojectImages2(NDVI_tiff_path, sigma_path, NDVI_tiff_resample_path, resampleAlg=gdalconst.GRA_Bilinear) + ReprojectImages2(incident_angle_path, sigma_path, incident_angle_resample_path, + resampleAlg=gdalconst.GRA_NearestNeighbour) + + soil_water_tiff = read_tiff(soil_tiff_resample_path) # 读取土壤含水量影像 + NDVI_tiff = read_tiff(NDVI_tiff_resample_path) # 引入NDVI + incident_angle = read_tiff(incident_angle_resample_path) # 读取局地入射角 + + # 处理归一化植被指数 + F_VEG = (NDVI_tiff['data'] - NDVI_min) / (NDVI_max - NDVI_min) # 处理得到植被覆盖度 + + soil_water_tiff['data'] = soil_water_tiff['data'] / 100.0 # 转换为百分比 + incident_angle['data'] = incident_angle['data'] * np.pi / 180.0 # 转换为弧度值 + sigma_tiff['data'] = np.power(10, (sigma_tiff['data'] / 10)) # 转换为线性值 + + # float32 转 float64 + soil_water_tiff['data'] = soil_water_tiff['data'].astype(np.float64) + incident_angle['data'] = incident_angle['data'].astype(np.float64) + sigma_tiff['data'] = sigma_tiff['data'].astype(np.float64) + # 将土壤水分与lai样本之间进行关联 + lai_water_sample = [] # ['日期', '样方编号', '经度', '纬度', 'LAI','土壤含水量'] + if soil_water == 'tiff': + lai_water_sample = combine_sample_attr(lai_sample, soil_water_tiff) + pass + else: # 这个暂时没有考虑 + pass + + # 将入射角、后向散射系数与lai样本之间进行关联 + lai_water_inc_list = combine_sample_attr(lai_water_sample, + incident_angle) # ['日期','样方编号','经度','纬度','叶面积指数',"后向散射系数",'土壤含水量','入射角'] + lai_waiter_inc_sigma_list = combine_sample_attr(lai_water_inc_list, + sigma_tiff) # ['日期','样方编号','经度','纬度','叶面积指数',"后向散射系数",'土壤含水量','入射角','后向散射系数'] + # lai_waiter_inc_sigma_NDVI_list=combine_sample_attr(lai_waiter_inc_sigma_list,NDVI_tiff) # ['日期','样方编号','经度','纬度','叶面积指数',"后向散射系数",'土壤含水量','入射角','后向散射系数','NDVI'] + lai_waiter_inc_sigma_list = check_sample( + lai_waiter_inc_sigma_list) # 清理样本 ['日期','样方编号','经度','纬度','叶面积指数',"后向散射系数",'土壤含水量','入射角','后向散射系数'] + # lai_waiter_inc_sigma_NDVI_list=check_sample(lai_waiter_inc_sigma_NDVI_list) # ['日期','样方编号','经度','纬度','叶面积指数',"后向散射系数",'土壤含水量','入射角','后向散射系数','NDVI'] + # 数据集筛选 + lai_waiter_inc_sigma_list_result = [] + # 筛选保留的数据集 + logger.info("保留得数据集如下") + for i in range(len(lai_waiter_inc_sigma_list)): + if i in []: + continue + logger.info(str(lai_waiter_inc_sigma_list[i])) + lai_waiter_inc_sigma_list_result.append(lai_waiter_inc_sigma_list[i]) + lai_waiter_inc_sigma_list = lai_waiter_inc_sigma_list_result + + # [sample_train,sample_test]=split_sample_list(lai_waiter_inc_sigma_list,0.6) # step 1 切分数据集 + [sample_train, sample_test] = [lai_waiter_inc_sigma_list[:], lai_waiter_inc_sigma_list[:]] # step 1 切分数据集 + + logger.info("训练模型") + a = self.__processing_paras["A"] + b = self.__processing_paras["B"] + c = self.__processing_paras["C"] + d = self.__processing_paras["D"] + params_X0 = [a, b, c, d, 0.771, -0.028] + params_arr = train_WMCmodel(sample_train, params_X0, train_err_image_path, False) + print("模型初值:" + str(params_X0)) + print("训练得到的模型系数:" + str(params_arr)) + self.__processing_paras.update({"A": params_arr[0]}) + self.__processing_paras.update({"B": params_arr[1]}) + self.__processing_paras.update({"C": params_arr[2]}) + self.__processing_paras.update({"D": params_arr[3]}) + + def block_process(self,start): + """ + 生成叶面积指数产品 + """ + # 生成土壤水分影像 + # self.create_soil_moisture_tif() + if os.path.exists(self.__preprocessed_paras['soilMeasured']): + soil_new = os.path.join(self.__workspace_maskcai_SoilMoi_path, 'soil_moisture.tif') + shutil.copy(self.__preprocessed_paras['soilMeasured'], soil_new) + + lee_path = os.path.join(self.__workspace_preprocessed_path, self.__sar_tif_name + '.tif') + Filter().lee_process_sar(self.__preprocessed_paras[self.__sar_tif_name], lee_path, 3, 0.25) + shutil.copyfile(lee_path, self.__workspace_maskcai_image_path + self.__sar_tif_name+'.tif') + # shutil.copyfile(self.__preprocessed_paras[self.__sar_tif_name], self.__workspace_maskcai_image_path + self.__sar_tif_name+'.tif') + logger.info('progress bar: 50%') + # 模型训练得到经验系数 + self.cal_empirical_parameters() + + block_size = self.BlockProcess.get_block_size(self.__rows, self.__cols) + + self.BlockProcess.cut_new(self.__workspace_maskcai_image_path, self.__workspace_cai_sartif_path, ['tif', 'tiff'], 'tif', block_size) + self.BlockProcess.cut_new(self.__workspace_maskcai_localang_path, self.__workspace_cai_localang_path, ['tif', 'tiff'], 'tif', block_size) + self.BlockProcess.cut_new(self.__workspace_maskcai_SoilMoi_path, self.__workspace_cai_SoilMoi_path, ['tif', 'tiff'], 'tif', block_size) + logger.info('mask data image success!') + + # 计算每小块的叶面积指数 + in_tif_paths = list(glob.glob(os.path.join(self.__workspace_cai_sartif_path, '*.tif'))) + num = 0 + + # 开启多进程处理 + processes_num = min([len(in_tif_paths), multiprocessing_num]) + + + # Filter().lee_filter_multiprocess(in_tif_paths, in_tif_paths, FILTER_SISE, processes_num) + + pool = multiprocessing.Pool(processes=processes_num) + pl = [] + for name in in_tif_paths: + suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + \ + name.split('_')[-1] + tif_path = name + vm_path = self.__workspace_cai_SoilMoi_path + "soil_moisture" + suffix + angle_path = self.__workspace_cai_localang_path + "LocalIncidenceAngle_preproed" + suffix + v2_save_path = self.__workspace_Leafindex_path + "LeafAreaIndexProduct" + suffix + pl.append(pool.apply_async(self.cal_leaf_index, (vm_path, tif_path, angle_path, v2_save_path, num))) + logger.info('total:%s, block:%s calculating leaf_index!', len(in_tif_paths), num) + num = num + 1 + + pool.close() + pool.join() + logger.info('all img cal LeafIndex success!') + logger.info('progress bar: 80%') + ref_tif_path = self.__ref_img_path + date_type = 'float32' + self.BlockProcess.combine_new(self.__workspace_Leafindex_path, self.__cols, self.__rows, self.__workspace_processing_path + "combine", 'tif', ['tif'], date_type) + # 添加地理信息 + out_path = self.__workspace_processing_path + "combine\\LeafAreaIndexProduct.tif" + self.BlockProcess.assign_spatial_reference_byfile(ref_tif_path, out_path) + + # 截取roi区域 + bare_land_mask_path = self.cal_roi() + SrcImageName = os.path.split(self.__input_paras["SAR"]['ParaValue'])[1].split('.tar.gz')[0] + tar + '.tif' + # product_path = self.__product_dic + "LeafAreaIndexProduct.tif" + product_path = os.path.join(self.__product_dic, SrcImageName) + roi.cal_roi(product_path, out_path, bare_land_mask_path, background_value=np.nan) + + logger.info('block_process finished!') + + proj, geos, data = self.imageHandler.read_img(product_path) + data[data < leaf_index_value_min] = leaf_index_value_min + data[data > leaf_index_value_max] = leaf_index_value_max + self.imageHandler.write_img(product_path, proj, geos, data) + # 生成快视图 + self.imageHandler.write_quick_view(product_path) + + tem_folder = self.__workspace_path + EXE_NAME + r"\Temporary""\\" + image_path = product_path + out_path1 = os.path.join(tem_folder, "trans_geo_projcs.tif") + out_path2 = os.path.join(tem_folder, "trans_projcs_geo.tif") + + SrcImagePath = self.__input_paras["SAR"]['ParaValue'] + paths = SrcImagePath.split(';') + SrcImageName=os.path.split(paths[0])[1].split('.tar.gz')[0] + + model_path = "./product.xml" + meta_xml_path = os.path.join(self.__product_dic, SrcImageName + tar + ".meta.xml") + + para_dict = CreateMetaDict(image_path, self.__processing_paras['Origin_META'], self.__workspace_processing_path, + out_path1, out_path2).calu_nature() + para_dict.update({"imageinfo_ProductName": "叶面积指数"}) + para_dict.update({"imageinfo_ProductIdentifier": "LeafAreaIndex"}) + para_dict.update({"imageinfo_ProductLevel": productLevel}) + para_dict.update({"ProductProductionInfo_BandSelection": "1"}) + para_dict.update({"ProductProductionInfo_AuxiliaryDataDescription": "MeasuredData,NDVI,LandCover"}) + # para_dict.update({"MetaInfo_Unit": "None"}) # 设置单位 + CreateProductXml(para_dict, model_path, meta_xml_path).create_standard_xml() + + temp_folder = os.path.join(self.__workspace_path, EXE_NAME, 'Output') + out_xml = os.path.join(temp_folder, os.path.basename(meta_xml_path)) + if os.path.exists(temp_folder) is False: + os.mkdir(temp_folder) + # CreateProductXml(para_dict, model_path, out_xml).create_standard_xml() + shutil.copy(meta_xml_path, out_xml) + + # 文件夹打包 + file.make_targz(self.__out_para, self.__product_dic) + logger.info('process_handle success!') + logger.info('progress bar: 100%') + + def process_handle(self,start): + self.cal_roi() + self.block_process(start) + return True + + +if __name__ == '__main__': + multiprocessing.freeze_support() # 解决多进程打包错误 + start = datetime.datetime.now() + try: + if len(sys.argv) < 2: + xml_path = 'LeafAreaIndex.xml' + else: + xml_path = sys.argv[1] + main_handler = LeafIndexMain(xml_path) + if main_handler.check_source() is False: + raise Exception('check_source() failed!') + if main_handler.preprocess_handle() is False: + raise Exception('preprocess_handle() failed!') + if main_handler.process_handle(start) is False: + raise Exception('process_handle() failed!') + logger.info('successful production of ' + EXE_NAME + ' products!') + except Exception: + logger.exception('run-time error!') + finally: + main_handler.del_temp_workspace() + + end = datetime.datetime.now() + msg = 'running use time: %s ' % (end - start) + logger.info(msg) diff --git a/leafAreaIndex-S-SAR/LeafIndexMain.spec b/leafAreaIndex-S-SAR/LeafIndexMain.spec new file mode 100644 index 0000000..c2228e9 --- /dev/null +++ b/leafAreaIndex-S-SAR/LeafIndexMain.spec @@ -0,0 +1,40 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['LeafIndexMain.py'], + pathex=[], + binaries=[], + datas=[('D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')], + hiddenimports=['pyproj._compat'], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='LeafIndexMain', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None ) diff --git a/leafAreaIndex-S-SAR/LeafIndexXmlInfo.py b/leafAreaIndex-S-SAR/LeafIndexXmlInfo.py new file mode 100644 index 0000000..f2fa11e --- /dev/null +++ b/leafAreaIndex-S-SAR/LeafIndexXmlInfo.py @@ -0,0 +1,234 @@ +""" +@Project :microproduct +@File :BackScatteringXmlInfo.PY +@Function :主函数 +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" + +from xml.etree.ElementTree import ElementTree +import shutil +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.PreProcess import PreProcess as pp +from osgeo import gdal +import numpy as np +import datetime + + +class CreateDict: + """根据影像信息输出属性字典""" + def __init__(self, image_path, out_path1, out_path2): + """ + image_path:影像路径 + image_pair:输入的压缩包中的极化对 例:hh,hv,vh,vv=【1,1,1,1】 + out_path1:地理转平面的输出路径 + out_path2:平面转地理的输出路径 + """ + self.ImageHandler = ImageHandler() + self.para_dict = {} + self.image_path = image_path + self.out_path = out_path1 + self.out_path2 = out_path2 + pass + + def calu_nature(self,start): + """存入字典""" + + imageinfo_width=self.ImageHandler.get_img_width(self.image_path) + self.para_dict.update({"imageinfo_width":imageinfo_width}) + imageinfo_height=self.ImageHandler.get_img_height(self.image_path) + self.para_dict.update({"imageinfo_height":imageinfo_height}) + # imageinfo_EarthModel=self.ImageHandler.get_projection(self.image_path).split("SPHEROID[", 2)[1].split(",", 2)[0] + # self.para_dict.update({"imageinfo_EarthModel":imageinfo_EarthModel.replace('"','')}) + self.para_dict.update({"imageinfo_EarthModel": "WGS84"}) + # imageinfo_ProjectModel = self.ImageHandler.get_projection(self.image_path).split("DATUM[", 2)[1].split(",", 2)[0] + # self.para_dict.update({"imageinfo_ProjectModel":imageinfo_ProjectModel.replace('"','')}) + self.para_dict.update({"imageinfo_ProjectModel": "UTM"}) + proj = self.ImageHandler.get_projection(self.image_path) # 输出的影像若是投影坐标系则先转成地理坐标系 + keyword = proj.split("[", 2)[0] # 若是地理坐标系则pass + if keyword == "GEOGCS": + pass + elif keyword == "PROJCS": + pp.trans_projcs2geogcs(self.out_path2, self.image_path) + self.image_path = self.out_path2 + elif len(keyword) == 0 or keyword.strip() == "" or keyword.isspace() is True: + raise Exception('image projection is missing!') + + pp.trans_geogcs2projcs(self.out_path, self.image_path) # 坐标投影, 地理转平面投影坐标 + imageinfo_widthspace = self.ImageHandler.get_geotransform(self.out_path)[1] # 投影后的分辨率 + imageinfo_heightspace = -self.ImageHandler.get_geotransform(self.out_path)[5] # 投影后的分辨率 + self.para_dict.update({"imageinfo_widthspace":imageinfo_widthspace}) + self.para_dict.update({"imageinfo_heightspace":imageinfo_heightspace}) + self.para_dict.update({"NominalResolution":imageinfo_widthspace}) + + WidthInMeters = imageinfo_width*imageinfo_widthspace # 投影后的分辨率×宽度 + self.para_dict.update({"WidthInMeters":WidthInMeters}) + + # image_array = self.ImageHandler.get_band_array(self.image_path) + # a2 = np.where(np.isnan(image_array), 999999, image_array) + # MinValue = np.min(a2) + # a3 = np.where(np.isnan(image_array), -999999, image_array) + # MaxValue = np.max(a3) + # + # self.para_dict.update({"MaxValue":MaxValue}) + # self.para_dict.update({"MinValue":MinValue}) + + get_scope = self.ImageHandler.get_scope(self.image_path) + point_upleft, point_upright, point_downleft, point_downright=get_scope[0], get_scope[1], get_scope[2], get_scope[3] + self.para_dict.update({"imageinfo_corner_topLeft_latitude": point_upleft[1]}) + self.para_dict.update({"imageinfo_corner_topLeft_longitude": point_upleft[0]}) + self.para_dict.update({"imageinfo_corner_topRight_latitude": point_upright[1]}) + self.para_dict.update({"imageinfo_corner_topRight_longitude": point_upright[0]}) + self.para_dict.update({"imageinfo_corner_bottomLeft_latitude": point_downleft[1]}) + self.para_dict.update({"imageinfo_corner_bottomLeft_longitude": point_downleft[0]}) + self.para_dict.update({"imageinfo_corner_bottomRight_latitude": point_downright[1]}) + self.para_dict.update({"imageinfo_corner_bottomRight_longitude": point_downright[0]}) + + longitude_max=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).max() + longitude_min=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).min() + latitude_max=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).max() + latitude_min=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).min() + imageinfo_center_latitude=(latitude_max+latitude_min)/2 + imageinfo_center_longitude=(longitude_max+longitude_min)/2 + self.para_dict.update({"imageinfo_center_latitude": imageinfo_center_latitude}) + self.para_dict.update({"imageinfo_center_longitude": imageinfo_center_longitude}) + + # self.para_dict.update({"productType": "GTC"}) # 设置产品类型 + self.para_dict.update({"productFormat": "TIF"}) + productGentime = datetime.datetime.now() + self.para_dict.update({"productGentime": productGentime}) + + msg=productGentime-start + self.para_dict.update({"productConsumeTime": msg}) + self.para_dict.update({"unit": "none"}) # 设置单位 + self.para_dict.update({"NoDataValue": "nan"}) + self.para_dict.update({"productLevel": "5"}) # 设置图像位深度 + # noinspection PyBroadException + # try: # 设置图像位深度 + # imagebit="0bit" + # # im=Image.open(self.image_path) + # im = Image.open(r"E:\0test\testworkspace\DEM\ASTGTM2_N24E110_dem.tif") + # if "1" in im.getbands(): + # imagebit="1bit" + # elif "L" in im.getbands() or "P" in im.getbands(): + # imagebit = "8bit" + # elif "R" in im.getbands() and "G" in im.getbands() and "B" in im.getbands(): + # imagebit = "24bit" + # elif "R" in im.getbands() and "G" in im.getbands() and "B" in im.getbands() and "A" in im.getbands(): + # imagebit = "32bit" + # elif "C" in im.getbands() and "M" in im.getbands() and "Y" in im.getbands() and "K" in im.getbands(): + # imagebit = "32bit" + # elif "Y" in im.getbands() and "C" in im.getbands() and "b" in im.getbands() and "C" in im.getbands(): + # imagebit = "32bit" + # elif "I" in im.getbands() or "F" in im.getbands(): + # imagebit = "32bit" + image_array = self.ImageHandler.get_band_array(self.image_path) + try: + gdal_dtypes = { + 'int8': gdal.GDT_Byte, + 'unit16': gdal.GDT_UInt16, + 'int16': gdal.GDT_Int16, + 'unit32': gdal.GDT_UInt32, + 'int32': gdal.GDT_Int32, + 'float32': gdal.GDT_Float32, + 'float64': gdal.GDT_Float64, + } + bit_dtypes = { + 'int8': 8, + 'unit16': 16, + 'int16': 16, + 'unit32': 32, + 'int32': 32, + 'float32': 32, + 'float64': 64, + } + if not gdal_dtypes.get(image_array.dtype.name, None) is None: + bit_num = str(bit_dtypes[image_array.dtype.name]) + datatype=bit_num+"bit" + else: + datatype = str(32) + "bit" + # datatype = str(gdal.GDT_Float32)+"bit" + self.para_dict.update({"imagebit": datatype}) + except Exception: + self.para_dict.update({"imagebit": "None"}) + + self.para_dict.update({"imageinfo_QualifyValue_Product": "NULL"}) + + return self.para_dict + + +class CreateStadardXmlFile: + """读取字典中的属性值,生成一个标准的xml文件""" + def __init__(self, xml_path, para_xml_path, par_dict, set_threshold, path): + """ + xml_path:模板路径 + para_xml_path:算法配置文件的路径 + par_dict:字典 + path:xml模板输出路径 + """ + self.par_dict = par_dict + self.path = path + self.para_xml_path= para_xml_path + self.set_threshold = set_threshold + shutil.copy(xml_path, path) + pass + + def create_standard_xml(self): + """将字典中的信息写入到copy的xml文件中""" + tree = ElementTree() + tree.parse(self.path) # 影像头文件 + root = tree.getroot() + + para_tree = ElementTree() + para_tree.parse(self.para_xml_path) # 影像头文件 + para_root = para_tree.getroot() + + productinfo = root.find("productinfo") + for key, value in self.par_dict.items(): + if key.split("_")[0] != "imageinfo": + productinfo.find(key).text = str(value) + elif key.split("_")[0] == "imageinfo": + imageinfo = productinfo.find("imageinfo") + if key.split("_")[1] in ["EarthModel", "ProjectModel", "width", "height", "widthspace", "heightspace"]: + imageinfo.find(key.split("_")[1]).text = str(value) + elif key.split("_")[1] == "center": + center = imageinfo.find("center") + center.find(key.split("_")[2]).text = str(value) + elif key.split("_")[1] == "corner": + corner = imageinfo.find("corner") + corner.find(key.split("_")[2]).find(key.split("_")[3]).text = str(value) + elif key.split("_")[1] == "QualifyValue": + QualifyValue = imageinfo.find("QualifyValue") + QualifyValue.find(key.split("_")[2]).text = str(value) + pass + Parameter = root.find("processinfo").find("Parameter") + + para_list=para_root.find("AlgCompt").find("Inputs").findall("Parameter") + for para in para_list: + if para.find("ParaName").text=="Polarization": + para_value = para.find("ParaValue").text + Parameter.find("Polarization").text = str(para_value) + + elif para.find("ParaName").text=="A": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaA").text = str(para_value) + + elif para.find("ParaName").text=="B": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaB").text = str(para_value) + + elif para.find("ParaName").text=="C": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaC").text = str(para_value) + + elif para.find("ParaName").text=="D": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaD").text = str(para_value) + + Parameter.find("NdviThresholdMin").text = str(self.set_threshold[0]) + Parameter.find("NdviThresholdMax").text = str(self.set_threshold[1]) + Parameter.find("CoverThresholdMin").text = str(self.set_threshold[2]) + Parameter.find("CoverThresholdMax").text = str(self.set_threshold[3]) + tree.write(self.path, encoding="utf-8", xml_declaration=True) + diff --git a/leafAreaIndex-S-SAR/LeafIndex_env.yaml b/leafAreaIndex-S-SAR/LeafIndex_env.yaml new file mode 100644 index 0000000..eb816d4 Binary files /dev/null and b/leafAreaIndex-S-SAR/LeafIndex_env.yaml differ diff --git a/leafAreaIndex-S-SAR/ReferenceFile/~WRL0005.tmp b/leafAreaIndex-S-SAR/ReferenceFile/~WRL0005.tmp new file mode 100644 index 0000000..e84ccd2 Binary files /dev/null and b/leafAreaIndex-S-SAR/ReferenceFile/~WRL0005.tmp differ diff --git a/leafAreaIndex-S-SAR/ReferenceFile/利用RADARSAT-2雷...云模型反演冬小麦叶面积指数_陶亮亮.caj b/leafAreaIndex-S-SAR/ReferenceFile/利用RADARSAT-2雷...云模型反演冬小麦叶面积指数_陶亮亮.caj new file mode 100644 index 0000000..7410658 Binary files /dev/null and b/leafAreaIndex-S-SAR/ReferenceFile/利用RADARSAT-2雷...云模型反演冬小麦叶面积指数_陶亮亮.caj differ diff --git a/leafAreaIndex-S-SAR/ReferenceFile/叶面积指数方案.docx b/leafAreaIndex-S-SAR/ReferenceFile/叶面积指数方案.docx new file mode 100644 index 0000000..9dfa952 Binary files /dev/null and b/leafAreaIndex-S-SAR/ReferenceFile/叶面积指数方案.docx differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/ImageMatch.obj b/leafAreaIndex-S-SAR/baseTool/x64/Release/ImageMatch.obj new file mode 100644 index 0000000..9644f22 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/ImageMatch.obj differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/LIBPQ.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/LIBPQ.dll new file mode 100644 index 0000000..21f1003 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/LIBPQ.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/Lerc.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/Lerc.dll new file mode 100644 index 0000000..29513ed Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/Lerc.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/OctreeNode.obj b/leafAreaIndex-S-SAR/baseTool/x64/Release/OctreeNode.obj new file mode 100644 index 0000000..898e778 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/OctreeNode.obj differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/RPC_Correct.obj b/leafAreaIndex-S-SAR/baseTool/x64/Release/RPC_Correct.obj new file mode 100644 index 0000000..2564a7d Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/RPC_Correct.obj differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.Build.CppClean.log b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.Build.CppClean.log new file mode 100644 index 0000000..14c26e2 --- /dev/null +++ b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.Build.CppClean.log @@ -0,0 +1,70 @@ +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\basetool.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simptsn.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\sateorbit.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\rpc_correct.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\imagematch.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\test_moudel.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\octreenode.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\interpolation.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\vc142.pdb +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\concrt140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\msvcp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\msvcp140_1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\msvcp140_2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\msvcp140_atomic_wait.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\msvcp140_codecvt_ids.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\vccorlib140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\vcruntime140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\vcruntime140_1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\vcamp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\vcomp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.exe +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.pdb +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.res +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\boost_filesystem-vc142-mt-x64-1_82.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\gdal.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\zlib1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\libcrypto-3-x64.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\libssl-3-x64.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\liblzma.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\qhull_r.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\jpeg62.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\tiff.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\geotiff.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\proj.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\sqlite3.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\libcurl.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\libpng16.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\lerc.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\zstd.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\gif.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\netcdf.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\hdf5_hl.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\hdf5.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\libwebp.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\libsharpyuv.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\libpq.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\pcre2-8.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\libexpat.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\libxml2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\iconv-2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\geos_c.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\geos.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\json-c.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\openjp2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\spatialite.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\freexl-1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\minizip.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\cl.10612.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\cl.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\cl.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\copylocal.read.1u.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\copylocal.write.1u.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\link.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\link.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\link.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\rc.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\rc.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\rc.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_gf3-strip\x64\release\simorthoprogram.tlog\simorthoprogram.write.1u.tlog diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.exe b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.exe new file mode 100644 index 0000000..55bce33 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.exe differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.exe.recipe b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.exe.recipe new file mode 100644 index 0000000..d8d2007 --- /dev/null +++ b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.exe.recipe @@ -0,0 +1,11 @@ + + + + + D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\SIMOrthoProgram.exe + + + + + + \ No newline at end of file diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.log b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.log new file mode 100644 index 0000000..6218c45 --- /dev/null +++ b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.log @@ -0,0 +1,59 @@ + baseTool.cpp + ImageMatch.cpp + interpolation.cpp + OctreeNode.cpp + RPC_Correct.cpp + simptsn.cpp + SateOrbit.cpp + SIMOrthoProgram.cpp + test_moudel.cpp +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 SateOrbit.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 test_moudel.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 simptsn.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\test_moudel.cpp(224,31): warning C4129: “R”: 不可识别的字符转义序列 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 baseTool.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(466,15): warning C4101: “asfclass”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.cpp(500,18): warning C4154: 删除数组表达式;转换到提供的指针 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 ImageMatch.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.cpp(942,28): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\baseTool.cpp(944,47): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(1234,7): warning C4101: “temp_r”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(1234,15): warning C4101: “temp_c”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3157,18): warning C4101: “snr”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3156,17): warning C4101: “r2”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3156,37): warning C4101: “c3”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3157,15): warning C4101: “c”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3156,33): warning C4101: “c2”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3156,21): warning C4101: “r3”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3157,12): warning C4101: “r”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3314,36): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3314,54): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3315,35): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3315,54): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3339,24): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\simptsn.cpp(3340,22): warning C4838: 从“int”转换到“double”需要收缩转换 + LINK : 已指定 /LTCG,但不需要生成代码;从链接命令行中移除 /LTCG 以提高链接器性能 + SIMOrthoProgram.vcxproj -> D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\SIMOrthoProgram.exe diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.obj b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.obj new file mode 100644 index 0000000..8f90f21 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.obj differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.pdb b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.pdb new file mode 100644 index 0000000..87f4aee Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.pdb differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.res b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.res differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CL.13592.write.1.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CL.13592.write.1.tlog new file mode 100644 index 0000000..301bb9e Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CL.13592.write.1.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CL.command.1.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CL.command.1.tlog new file mode 100644 index 0000000..b1f1d33 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CL.command.1.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CL.read.1.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CL.read.1.tlog new file mode 100644 index 0000000..c438d71 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CL.read.1.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CopyLocal.read.1u.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CopyLocal.read.1u.tlog new file mode 100644 index 0000000..8588902 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CopyLocal.read.1u.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CopyLocal.write.1u.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CopyLocal.write.1u.tlog new file mode 100644 index 0000000..f1a36ae Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/CopyLocal.write.1u.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/SIMOrthoProgram.lastbuildstate b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/SIMOrthoProgram.lastbuildstate new file mode 100644 index 0000000..4772980 --- /dev/null +++ b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/SIMOrthoProgram.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:VcpkgTriplet=x64-windows: +Release|x64|D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\| diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/SIMOrthoProgram.write.1u.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/SIMOrthoProgram.write.1u.tlog new file mode 100644 index 0000000..cd5bbba Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/SIMOrthoProgram.write.1u.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/link.command.1.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/link.command.1.tlog new file mode 100644 index 0000000..565dbeb Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/link.command.1.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/link.read.1.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/link.read.1.tlog new file mode 100644 index 0000000..8d7f566 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/link.read.1.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/link.write.1.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/link.write.1.tlog new file mode 100644 index 0000000..dc7e79a Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/link.write.1.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/rc.command.1.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/rc.command.1.tlog new file mode 100644 index 0000000..0190689 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/rc.command.1.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/rc.read.1.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/rc.read.1.tlog new file mode 100644 index 0000000..cf06a88 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/rc.read.1.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/rc.write.1.tlog b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/rc.write.1.tlog new file mode 100644 index 0000000..136d0c3 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.tlog/rc.write.1.tlog differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..22940bb --- /dev/null +++ b/leafAreaIndex-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt @@ -0,0 +1,47 @@ +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\SIMOrthoProgram.vcxproj.CopyComplete +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\SIMOrthoProgram.exe +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\concrt140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\msvcp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\msvcp140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\msvcp140_2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\msvcp140_atomic_wait.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\msvcp140_codecvt_ids.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\vccorlib140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\vcruntime140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\vcruntime140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\vcamp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\vcomp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\boost_filesystem-vc142-mt-x64-1_82.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\gdal.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\zlib1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libcrypto-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libssl-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\liblzma.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\qhull_r.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\jpeg62.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\tiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\geotiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\proj.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\sqlite3.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libcurl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libpng16.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\Lerc.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\zstd.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\gif.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\netcdf.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\hdf5_hl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\hdf5.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libwebp.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libsharpyuv.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\LIBPQ.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\pcre2-8.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libexpat.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libxml2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\iconv-2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\geos_c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\geos.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\json-c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\openjp2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\spatialite.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\freexl-1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\minizip.dll diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/SateOrbit.obj b/leafAreaIndex-S-SAR/baseTool/x64/Release/SateOrbit.obj new file mode 100644 index 0000000..cd95a87 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/SateOrbit.obj differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/baseTool.obj b/leafAreaIndex-S-SAR/baseTool/x64/Release/baseTool.obj new file mode 100644 index 0000000..a9e889c Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/baseTool.obj differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll new file mode 100644 index 0000000..f5c136f Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/concrt140.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/concrt140.dll new file mode 100644 index 0000000..9752449 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/concrt140.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/freexl-1.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/freexl-1.dll new file mode 100644 index 0000000..9145a7d Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/freexl-1.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/gdal.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/gdal.dll new file mode 100644 index 0000000..bda7c20 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/gdal.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/geos.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/geos.dll new file mode 100644 index 0000000..2edcb83 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/geos.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/geos_c.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/geos_c.dll new file mode 100644 index 0000000..d358b2a Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/geos_c.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/geotiff.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/geotiff.dll new file mode 100644 index 0000000..f513a51 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/geotiff.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/gif.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/gif.dll new file mode 100644 index 0000000..27fdc78 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/gif.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/hdf5.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/hdf5.dll new file mode 100644 index 0000000..97fd469 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/hdf5.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/hdf5_hl.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/hdf5_hl.dll new file mode 100644 index 0000000..7da3e86 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/hdf5_hl.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/iconv-2.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/iconv-2.dll new file mode 100644 index 0000000..29c175c Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/iconv-2.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/interpolation.obj b/leafAreaIndex-S-SAR/baseTool/x64/Release/interpolation.obj new file mode 100644 index 0000000..1ba4eb4 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/interpolation.obj differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/jpeg62.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/jpeg62.dll new file mode 100644 index 0000000..9c1a2c0 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/jpeg62.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/json-c.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/json-c.dll new file mode 100644 index 0000000..abbb168 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/json-c.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/libcrypto-3-x64.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/libcrypto-3-x64.dll new file mode 100644 index 0000000..a0ee3e3 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/libcrypto-3-x64.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/libcurl.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/libcurl.dll new file mode 100644 index 0000000..647bdc6 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/libcurl.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/libexpat.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/libexpat.dll new file mode 100644 index 0000000..6cea742 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/libexpat.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/liblzma.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/liblzma.dll new file mode 100644 index 0000000..44372c5 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/liblzma.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/libpng16.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/libpng16.dll new file mode 100644 index 0000000..c06222a Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/libpng16.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/libsharpyuv.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/libsharpyuv.dll new file mode 100644 index 0000000..e6c1b52 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/libsharpyuv.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/libssl-3-x64.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/libssl-3-x64.dll new file mode 100644 index 0000000..4856e67 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/libssl-3-x64.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/libwebp.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/libwebp.dll new file mode 100644 index 0000000..e758fc8 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/libwebp.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/libxml2.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/libxml2.dll new file mode 100644 index 0000000..1e2599f Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/libxml2.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/minizip.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/minizip.dll new file mode 100644 index 0000000..44f5e99 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/minizip.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140.dll new file mode 100644 index 0000000..130f84a Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_1.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_1.dll new file mode 100644 index 0000000..5c2f46d Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_1.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_2.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_2.dll new file mode 100644 index 0000000..737b70a Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_2.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_atomic_wait.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_atomic_wait.dll new file mode 100644 index 0000000..c92fcc3 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_atomic_wait.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_codecvt_ids.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_codecvt_ids.dll new file mode 100644 index 0000000..9879454 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/msvcp140_codecvt_ids.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/netcdf.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/netcdf.dll new file mode 100644 index 0000000..e1cbbf1 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/netcdf.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/openjp2.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/openjp2.dll new file mode 100644 index 0000000..d6c8011 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/openjp2.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/pcre2-8.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/pcre2-8.dll new file mode 100644 index 0000000..d047b3c Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/pcre2-8.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/proj.db b/leafAreaIndex-S-SAR/baseTool/x64/Release/proj.db new file mode 100644 index 0000000..7780dbe Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/proj.db differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/proj.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/proj.dll new file mode 100644 index 0000000..f4f6147 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/proj.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/qhull_r.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/qhull_r.dll new file mode 100644 index 0000000..0267c70 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/qhull_r.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/simptsn.obj b/leafAreaIndex-S-SAR/baseTool/x64/Release/simptsn.obj new file mode 100644 index 0000000..d16b6ef Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/simptsn.obj differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/spatialite.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/spatialite.dll new file mode 100644 index 0000000..165b6e1 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/spatialite.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/sqlite3.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/sqlite3.dll new file mode 100644 index 0000000..65359e2 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/sqlite3.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/test_moudel.obj b/leafAreaIndex-S-SAR/baseTool/x64/Release/test_moudel.obj new file mode 100644 index 0000000..18de183 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/test_moudel.obj differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/tiff.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/tiff.dll new file mode 100644 index 0000000..125e94b Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/tiff.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/vc142.pdb b/leafAreaIndex-S-SAR/baseTool/x64/Release/vc142.pdb new file mode 100644 index 0000000..94a4900 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/vc142.pdb differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/vcamp140.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcamp140.dll new file mode 100644 index 0000000..9fd7179 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcamp140.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/vccorlib140.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/vccorlib140.dll new file mode 100644 index 0000000..7194329 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/vccorlib140.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/vcomp140.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcomp140.dll new file mode 100644 index 0000000..dbad71a Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcomp140.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/vcpkg.applocal.log b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcpkg.applocal.log new file mode 100644 index 0000000..6046b30 --- /dev/null +++ b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcpkg.applocal.log @@ -0,0 +1,35 @@ + +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\boost_filesystem-vc142-mt-x64-1_82.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\gdal.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\zlib1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libcrypto-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libssl-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\liblzma.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\qhull_r.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\jpeg62.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\tiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\geotiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\proj.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\sqlite3.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libcurl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libpng16.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\Lerc.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\zstd.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\gif.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\netcdf.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\hdf5_hl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\hdf5.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libwebp.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libsharpyuv.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\LIBPQ.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\pcre2-8.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libexpat.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\libxml2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\iconv-2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\geos_c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\geos.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\json-c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\openjp2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\spatialite.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\freexl-1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_gf3-strip\x64\Release\minizip.dll diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/vcruntime140.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcruntime140.dll new file mode 100644 index 0000000..1d6afaa Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcruntime140.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/vcruntime140_1.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcruntime140_1.dll new file mode 100644 index 0000000..7bf05d3 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/vcruntime140_1.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/zlib1.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/zlib1.dll new file mode 100644 index 0000000..e9300f6 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/zlib1.dll differ diff --git a/leafAreaIndex-S-SAR/baseTool/x64/Release/zstd.dll b/leafAreaIndex-S-SAR/baseTool/x64/Release/zstd.dll new file mode 100644 index 0000000..09c9050 Binary files /dev/null and b/leafAreaIndex-S-SAR/baseTool/x64/Release/zstd.dll differ diff --git a/leafAreaIndex-S-SAR/config.ini b/leafAreaIndex-S-SAR/config.ini new file mode 100644 index 0000000..97adcb0 --- /dev/null +++ b/leafAreaIndex-S-SAR/config.ini @@ -0,0 +1,21 @@ +# -*- coding: UTF-8 -*- +# 定义config分组 +[config] +# 算法名称。修改临时工作区生成临时文件的名称,日志名称; +exe_name = LeafAreaIndex +# 开启调试模式则不删除临时工作区,True:开启调试,False:不开启调试 +debug = True +target = LAI +productLevel = 5 +# 影像滤波尺寸。取值范围:大于1的奇数,默认值:7 +filter_sise = 7 + +######2-算法处理参数###### +# 多进程最大进程数。取值范围:大于1的整数 +multiprocessing_num = 5 + +######3-算法结果参数###### + +# 叶面积指数产品值范围,超出范围的用最大值或最小值代替 +product_value_min = 0 +product_value_max = 7 \ No newline at end of file diff --git a/leafAreaIndex-S-SAR/model_meta.xml b/leafAreaIndex-S-SAR/model_meta.xml new file mode 100644 index 0000000..f3a8a22 --- /dev/null +++ b/leafAreaIndex-S-SAR/model_meta.xml @@ -0,0 +1,62 @@ + + + + + + + GTC + TIF + + + + nan + BSQ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
diff --git a/leafAreaIndex-S-SAR/product.xml b/leafAreaIndex-S-SAR/product.xml new file mode 100644 index 0000000..017cb13 --- /dev/null +++ b/leafAreaIndex-S-SAR/product.xml @@ -0,0 +1,60 @@ + + + 后向散射系数 + BackScattering + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + None + 参考产品介绍PDF + + + + + 德清 + + + + \ No newline at end of file diff --git a/leafAreaIndex-S-SAR/proj.db b/leafAreaIndex-S-SAR/proj.db new file mode 100644 index 0000000..7ba6b08 Binary files /dev/null and b/leafAreaIndex-S-SAR/proj.db differ diff --git a/leafAreaIndex-S-SAR/pyinstaller.spec b/leafAreaIndex-S-SAR/pyinstaller.spec new file mode 100644 index 0000000..66864b4 --- /dev/null +++ b/leafAreaIndex-S-SAR/pyinstaller.spec @@ -0,0 +1,86 @@ +# -*- mode: python ; coding: utf-8 -*- +# -*- mode: python ; coding: utf-8 -*- +import sys +import shutil +import os +import tarfile + +#ļб +sys.setrecursionlimit(5000) +block_cipher = None + +#######begin-ǰ############## +#һtoolļ滻ǰ·µtool +# Դ +cwdpath = os.getcwd() +tool_path = '' +src = '../tool' +des = os.path.join(cwdpath, "tool") +targz_path = os.path.join(cwdpath, "tool.tar.gz") +#ļ +if os.path.exists(des): + if os.path.isdir(des): + shutil.rmtree(des) + os.makedirs(des) +#ѹ +dir = os.path.split(targz_path )[0] +if os.path.exists(dir) is False: + os.makedirs(dir) +with tarfile.open(targz_path, "w:gz") as tar: + tar.add(src, arcname=os.path.basename(src)) +#ѹ +t = tarfile.open(targz_path) +t.extractall(path=cwdpath) +#ɾʱѹ +#os.remove(targz_path) + +# +main_name = '' +for name in os.listdir(cwdpath): + if 'Main.py' in name: + main_name = name +exe_name = exe_name = main_name .split('.')[0][:-4] + '-C-SAR-V2.0' +#######end-ǰ############## + + +a = Analysis(['LeafIndexMain.py', +'./tool/algorithm/algtools/ScatteringAuxData.py', +'./tool/algorithm/algtools/CoordinateTransformation.py', +'./tool/algorithm/algtools/DEMJoint.py', +'./tool/algorithm/algtools/logHandler.py', +'./tool/algorithm/algtools/PreProcess.py', +'./tool/algorithm/algtools/RieveFilter.py', +'./tool/algorithm/algtools/ROIAlg.py', +'./tool/algorithm/block/blockprocess.py', +'./tool/algorithm/image/ImageHandle.py', +'./tool/algorithm/xml/AlgXmlHandle.py', +'./tool/algorithm/xml/CreatMetafile.py', +'./tool/config/ConfigeHandle.py', +'./tool/logs/logHandler.py'], + pathex=[cwdpath], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='LeafIndexMain-C-SAR-V2.1.exe', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + runtime_tmpdir=None, + console=True ) + diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-36-58.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-36-58.log new file mode 100644 index 0000000..71e64f2 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-36-58.log @@ -0,0 +1,37 @@ +[12/18/2023 10:36:58] [24376] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\leafAreaIndex-S-SAR ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line94) +[12/18/2023 10:36:58] [24376] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line319) +[12/18/2023 10:36:58] [24376] [INFO]- create new workspace success! ---from: LeafIndexMain.__create_work_space (LeafIndexMain.py:Line192) +[12/18/2023 10:37:23] [24376] [INFO]- check_source success! ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line124) +[12/18/2023 10:37:38] [24376] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:37:38] [24376] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:37:38] [24376] [INFO]- scope2:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:37:38] [24376] [INFO]- scope3:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:37:38] [24376] [INFO]- scope4:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:37:38] [24376] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[12/18/2023 10:37:38] [24376] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[12/18/2023 10:37:45] [24376] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:37:52] [24376] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:37:54] [24376] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:37:54] [24376] [INFO]- cut surface_coverage success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:38:00] [24376] [INFO]- cut soilMeasured success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:38:00] [24376] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[12/18/2023 10:38:00] [24376] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:38:00] [24376] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:38:01] [24376] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:38:02] [24376] [INFO]- resampling surface_coverage success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:38:02] [24376] [INFO]- resampling soilMeasured success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:38:02] [24376] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[12/18/2023 10:38:02] [24376] [INFO]- preprocess_handle success! ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line218) +[12/18/2023 10:38:02] [24376] [INFO]- progress bar: 30% ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line219) +[12/18/2023 10:38:06] [24376] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:38:07] [24376] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\tif_mask_nan.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:38:07] [24376] [ERROR]- run-time error! ---from: LeafIndexMain. (LeafIndexMain.py:Line559) +Traceback (most recent call last): + File "D:/estar-proj/microproduct-S-SAR/leafAreaIndex-S-SAR/LeafIndexMain.py", line 555, in + if main_handler.process_handle(start) is False: + File "D:/estar-proj/microproduct-S-SAR/leafAreaIndex-S-SAR/LeafIndexMain.py", line 537, in process_handle + self.cal_roi() + File "D:/estar-proj/microproduct-S-SAR/leafAreaIndex-S-SAR/LeafIndexMain.py", line 241, in cal_roi + cover_data = ImageHandler.get_data(self.__preprocessed_paras["Covering"]) +KeyError: 'Covering' +[12/18/2023 10:38:07] [24376] [INFO]- running use time: 0:01:09.111417 ---from: LeafIndexMain. (LeafIndexMain.py:Line565) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-39-00.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-39-00.log new file mode 100644 index 0000000..310c2e3 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-39-00.log @@ -0,0 +1,37 @@ +[12/18/2023 10:39:00] [8584] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\leafAreaIndex-S-SAR ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line94) +[12/18/2023 10:39:00] [8584] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line319) +[12/18/2023 10:39:00] [8584] [INFO]- create new workspace success! ---from: LeafIndexMain.__create_work_space (LeafIndexMain.py:Line192) +[12/18/2023 10:39:21] [8584] [INFO]- check_source success! ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line124) +[12/18/2023 10:39:37] [8584] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:39:37] [8584] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:39:37] [8584] [INFO]- scope2:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:39:37] [8584] [INFO]- scope3:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:39:37] [8584] [INFO]- scope4:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:39:37] [8584] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[12/18/2023 10:39:37] [8584] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[12/18/2023 10:39:45] [8584] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:39:52] [8584] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:39:53] [8584] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:39:53] [8584] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:40:00] [8584] [INFO]- cut soilMeasured success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:40:00] [8584] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[12/18/2023 10:40:00] [8584] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:40:00] [8584] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:40:02] [8584] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:40:02] [8584] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:40:02] [8584] [INFO]- resampling soilMeasured success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:40:02] [8584] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[12/18/2023 10:40:02] [8584] [INFO]- preprocess_handle success! ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line218) +[12/18/2023 10:40:02] [8584] [INFO]- progress bar: 30% ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line219) +[12/18/2023 10:40:06] [8584] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:40:07] [8584] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\tif_mask_nan.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:40:08] [8584] [ERROR]- run-time error! ---from: LeafIndexMain. (LeafIndexMain.py:Line559) +Traceback (most recent call last): + File "D:/estar-proj/microproduct-S-SAR/leafAreaIndex-S-SAR/LeafIndexMain.py", line 555, in + if main_handler.process_handle(start) is False: + File "D:/estar-proj/microproduct-S-SAR/leafAreaIndex-S-SAR/LeafIndexMain.py", line 537, in process_handle + self.cal_roi() + File "D:/estar-proj/microproduct-S-SAR/leafAreaIndex-S-SAR/LeafIndexMain.py", line 246, in cal_roi + roi.trans_cover2mask(cover_mask_path, self.__preprocessed_paras["surface_coverage"], cover_id_list) +KeyError: 'surface_coverage' +[12/18/2023 10:40:08] [8584] [INFO]- running use time: 0:01:08.104210 ---from: LeafIndexMain. (LeafIndexMain.py:Line565) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-40-48.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-40-48.log new file mode 100644 index 0000000..28a1776 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-40-48.log @@ -0,0 +1,210 @@ +[12/18/2023 10:40:48] [26572] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\leafAreaIndex-S-SAR ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line94) +[12/18/2023 10:40:48] [26572] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line319) +[12/18/2023 10:40:48] [26572] [INFO]- create new workspace success! ---from: LeafIndexMain.__create_work_space (LeafIndexMain.py:Line192) +[12/18/2023 10:41:10] [26572] [INFO]- check_source success! ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line124) +[12/18/2023 10:41:25] [26572] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:41:25] [26572] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:41:25] [26572] [INFO]- scope2:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:41:25] [26572] [INFO]- scope3:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:41:25] [26572] [INFO]- scope4:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:41:25] [26572] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[12/18/2023 10:41:25] [26572] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[12/18/2023 10:41:32] [26572] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:41:40] [26572] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:41:41] [26572] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:41:41] [26572] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:41:46] [26572] [INFO]- cut soilMeasured success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:41:46] [26572] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[12/18/2023 10:41:47] [26572] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:41:47] [26572] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:41:48] [26572] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:41:49] [26572] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:41:49] [26572] [INFO]- resampling soilMeasured success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:41:49] [26572] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[12/18/2023 10:41:49] [26572] [INFO]- preprocess_handle success! ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line218) +[12/18/2023 10:41:49] [26572] [INFO]- progress bar: 30% ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line219) +[12/18/2023 10:41:52] [26572] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:41:54] [26572] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\tif_mask_nan.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:42:02] [26572] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\Ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:42:02] [26572] [INFO]- create masks success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line258) +[12/18/2023 10:42:03] [26572] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:42:05] [26572] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:42:06] [26572] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:42:06] [26572] [INFO]- combine_mask success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line265) +[12/18/2023 10:42:07] [26572] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\maskcai_localang\LocalIncidenceAngle_preproed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 10:42:07] [26572] [INFO]- create ROI three image success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line270) +[12/18/2023 10:42:14] [26572] [INFO]- progress bar: 50% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line441) +[12/18/2023 10:42:32] [26572] [INFO]- 保留得数据集如下 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line402) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 1, 118.037315, 37.628621, 0.647, 0.00031600939904479484, 0.0035441595052058497, 0.011499127764024852, 0.07841542092968284] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 2, 118.037415, 37.628721, 1.85, 0.0006487838043422757, 0.0037419428016967427, 0.011395231671171424, 0.09455256313545468] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 3, 118.037515, 37.628821, 2.548, 0.0011948131671611912, 0.0037569264639858847, 0.01133885210448945, 0.08196406780431668] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 4, 118.037615, 37.628921, 4.399, 0.000707945784384138, 0.003653807647491771, 0.011634949928172577, 0.07409728646140408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 5, 118.037715, 37.629021, 3.118, 0.0037282068494295653, 0.003769166641121293, 0.01186657450909232, 0.12197119549468712] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 6, 118.037815, 37.629121, 3.045, 0.0033970348320337945, 0.00393355179026171, 0.011545482459535569, 0.21129441012938818] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 7, 118.037915, 37.629221, 0.703, 0.0002786121168629772, 0.004000000189989805, 0.010852086990151876, 0.3833015576510886] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 8, 118.038015, 37.629321, 1.879, 0.000647142615748583, 0.004000000189989805, 0.01061685162561911, 0.5832591384281347] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 9, 118.038115, 37.629421, 3.634, 0.001071519305237607, 0.004000000189989805, 0.01081088441711517, 0.8028442104473527] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 10, 118.038215, 37.629521, 3.698, 0.001281814558871049, 0.004000000189989805, 0.010996482277541984, 0.6656071119654325] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 11, 118.038315, 37.629621, 2.499, 0.0013689891307007353, 0.003106724709433354, 0.013181755790647901, 0.8254400415369022] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 12, 118.038415, 37.629721, 6.474, 0.011617160780585677, 0.0017733913127700855, 0.013708339532676302, 0.7161886968914374] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 13, 118.038515, 37.629821, 2.227, 0.007277798045368242, 0.0004444444655544228, 0.014681509339515075, 0.5202048383193252] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 26, 118.039815, 37.631121, 1.966, 0.0008375292821268827, 0.0004332647716373573, 0.015016999394621379, 0.5263507707435408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 27, 118.039915, 37.631221, 2.994, 0.0017060823890031242, 0.0015071874763241705, 0.014463746161372573, 1.0328524809928588] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- [0, 29, 118.040015, 37.631321, 2.125, 0.0007935969681957695, 0.002840520872987439, 0.014409249878407996, 1.1679075368116667] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:42:32] [26572] [INFO]- 训练模型 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line413) +[12/18/2023 10:42:32] [26572] [INFO]- [-31.6, 0.01, 0.001, -5.0, 0.771, -0.028] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 训练集: +根据误差输出点序 +数量:(16,) +点序 误差值 样点信息 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 11 -0.005453507148711106 [0, 12, 118.038415, 37.629721, 6.474, 0.011617160780585677, 0.0017733913127700855, 0.013708339532676302, 0.7161886968914374] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 12 -0.005157583802476022 [0, 13, 118.038515, 37.629821, 2.227, 0.007277798045368242, 0.0004444444655544228, 0.014681509339515075, 0.5202048383193252] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 4 -0.0007596055715058951 [0, 5, 118.037715, 37.629021, 3.118, 0.0037282068494295653, 0.003769166641121293, 0.01186657450909232, 0.12197119549468712] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 5 -0.0004979248675158654 [0, 6, 118.037815, 37.629121, 3.045, 0.0033970348320337945, 0.00393355179026171, 0.011545482459535569, 0.21129441012938818] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 0 0.00029999229190307215 [0, 1, 118.037315, 37.628621, 0.647, 0.00031600939904479484, 0.0035441595052058497, 0.011499127764024852, 0.07841542092968284] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 6 0.0003907114075400056 [0, 7, 118.037915, 37.629221, 0.703, 0.0002786121168629772, 0.004000000189989805, 0.010852086990151876, 0.3833015576510886] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 10 0.001010232291167542 [0, 11, 118.038315, 37.629621, 2.499, 0.0013689891307007353, 0.003106724709433354, 0.013181755790647901, 0.8254400415369022] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 13 0.0010341907153155092 [0, 26, 118.039815, 37.631121, 1.966, 0.0008375292821268827, 0.0004332647716373573, 0.015016999394621379, 0.5263507707435408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 1 0.0011125832492330258 [0, 2, 118.037415, 37.628721, 1.85, 0.0006487838043422757, 0.0037419428016967427, 0.011395231671171424, 0.09455256313545468] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 7 0.0011418503831524336 [0, 8, 118.038015, 37.629321, 1.879, 0.000647142615748583, 0.004000000189989805, 0.01061685162561911, 0.5832591384281347] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 14 0.0011443628687675942 [0, 27, 118.039915, 37.631221, 2.994, 0.0017060823890031242, 0.0015071874763241705, 0.014463746161372573, 1.0328524809928588] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 15 0.0012295162377183528 [0, 29, 118.040015, 37.631321, 2.125, 0.0007935969681957695, 0.002840520872987439, 0.014409249878407996, 1.1679075368116667] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 2 0.0012311144700446087 [0, 3, 118.037515, 37.628821, 2.548, 0.0011948131671611912, 0.0037569264639858847, 0.01133885210448945, 0.08196406780431668] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 9 0.0022390310865591945 [0, 10, 118.038215, 37.629521, 3.698, 0.001281814558871049, 0.004000000189989805, 0.010996482277541984, 0.6656071119654325] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 8 0.0023883992911094996 [0, 9, 118.038115, 37.629421, 3.634, 0.001071519305237607, 0.004000000189989805, 0.01081088441711517, 0.8028442104473527] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 3 0.003480287880295174 [0, 4, 118.037615, 37.628921, 4.399, 0.000707945784384138, 0.003653807647491771, 0.011634949928172577, 0.07409728646140408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- +误差点序输出结束 + ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:42:32] [26572] [INFO]- 模型初值: [-31.6, 0.01, 0.001, -5.0, 0.771, -0.028] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line420) +[12/18/2023 10:42:32] [26572] [INFO]- 训练得到的模型系数: [ 9.52152118e-04 -1.12703401e+00 1.08788416e-01 -5.73520734e+02 + -4.58677874e-01 -2.82267478e-04] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line421) +[12/18/2023 10:44:19] [26572] [INFO]- mask data image success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line450) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:0 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:1 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:2 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:3 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:4 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:5 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:6 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:7 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:8 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:9 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:10 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:11 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:12 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:13 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:14 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:15 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:16 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:17 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:18 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:19 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:20 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:21 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:22 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:23 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:24 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:25 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:26 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:27 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:28 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:29 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:30 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:31 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:32 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:33 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:34 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:35 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:36 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:37 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:38 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:39 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:40 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:41 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:42 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:43 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:44 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:45 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:46 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:47 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:48 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:49 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:50 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:51 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:52 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:53 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:54 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:55 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:56 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:57 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:58 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:59 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:60 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:61 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:62 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:63 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:64 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:65 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:66 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:67 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:68 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:69 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:70 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:71 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:72 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:73 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:74 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:75 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:76 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:77 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:78 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:79 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:80 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:81 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:82 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:83 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:84 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:85 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:86 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:87 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:88 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:89 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:90 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:91 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:92 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:93 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:94 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:95 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:96 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:97 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:98 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:99 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:100 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:101 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:102 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:103 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:104 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:105 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:106 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:107 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:108 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:22] [26572] [INFO]- total:110, block:109 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:44:28] [26572] [INFO]- all img cal LeafIndex success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line477) +[12/18/2023 10:44:28] [26572] [INFO]- progress bar: 80% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line478) +[12/18/2023 10:44:31] [26572] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:44:33] [26572] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\tif_mask_nan.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:44:42] [26572] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\Ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:44:42] [26572] [INFO]- create masks success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line258) +[12/18/2023 10:44:43] [26572] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:44:44] [26572] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:44:45] [26572] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:44:45] [26572] [INFO]- combine_mask success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line265) +[12/18/2023 10:44:46] [26572] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\maskcai_localang\LocalIncidenceAngle_preproed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 10:44:46] [26572] [INFO]- create ROI three image success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line270) +[12/18/2023 10:44:47] [26572] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\product\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal-LAI.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 10:44:47] [26572] [INFO]- block_process finished! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line493) +[12/18/2023 10:45:18] [26572] [INFO]- process_handle success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line533) +[12/18/2023 10:45:18] [26572] [INFO]- progress bar: 100% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line534) +[12/18/2023 10:45:18] [26572] [INFO]- successful production of LeafAreaIndex products! ---from: LeafIndexMain. (LeafIndexMain.py:Line557) +[12/18/2023 10:45:18] [26572] [INFO]- running use time: 0:04:29.783088 ---from: LeafIndexMain. (LeafIndexMain.py:Line565) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-24.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-24.log new file mode 100644 index 0000000..2b4572f --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-24.log @@ -0,0 +1,53 @@ +[12/18/2023 10:44:24] [10660] [INFO]- block:0 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:24] [10660] [INFO]- block:1 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:24] [10660] [INFO]- block:2 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:24] [10660] [INFO]- block:3 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:24] [10660] [INFO]- block:4 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:5 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:6 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:7 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:8 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:9 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:10 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:11 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:12 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:13 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:15 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:17 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:19 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:21 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:23 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:24 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:26 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:28 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:30 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:32 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [10660] [INFO]- block:34 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:35 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:37 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:39 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:41 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:43 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:45 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:46 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:49 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:52 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:55 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:59 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:62 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:65 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:69 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:72 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:75 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [10660] [INFO]- block:78 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:79 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:82 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:85 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:89 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:90 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:93 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:97 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:100 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:102 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:105 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [10660] [INFO]- block:109 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-25.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-25.log new file mode 100644 index 0000000..db09816 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-25.log @@ -0,0 +1,35 @@ +[12/18/2023 10:44:25] [13268] [INFO]- block:14 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [13268] [INFO]- block:16 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [13268] [INFO]- block:18 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [13268] [INFO]- block:20 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [13268] [INFO]- block:22 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [13268] [INFO]- block:25 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [13268] [INFO]- block:27 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [13268] [INFO]- block:29 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:25] [13268] [INFO]- block:31 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:33 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:36 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:38 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:40 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:42 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:44 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:47 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:50 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:53 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:56 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:57 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:60 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:63 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:66 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:70 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:73 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13268] [INFO]- block:76 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13268] [INFO]- block:80 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13268] [INFO]- block:83 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13268] [INFO]- block:86 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13268] [INFO]- block:88 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13268] [INFO]- block:92 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13268] [INFO]- block:95 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13268] [INFO]- block:99 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13268] [INFO]- block:103 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13268] [INFO]- block:107 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-26.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-26.log new file mode 100644 index 0000000..121ae72 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-26.log @@ -0,0 +1,19 @@ +[12/18/2023 10:44:26] [13808] [INFO]- block:48 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13808] [INFO]- block:51 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13808] [INFO]- block:54 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13808] [INFO]- block:58 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13808] [INFO]- block:61 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13808] [INFO]- block:64 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13808] [INFO]- block:67 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13808] [INFO]- block:68 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13808] [INFO]- block:71 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:26] [13808] [INFO]- block:74 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13808] [INFO]- block:77 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13808] [INFO]- block:81 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13808] [INFO]- block:84 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13808] [INFO]- block:87 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13808] [INFO]- block:91 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13808] [INFO]- block:94 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13808] [INFO]- block:98 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13808] [INFO]- block:104 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [13808] [INFO]- block:108 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-27.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-27.log new file mode 100644 index 0000000..82a3afd --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-44-27.log @@ -0,0 +1,3 @@ +[12/18/2023 10:44:27] [23192] [INFO]- block:96 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [23192] [INFO]- block:101 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:44:27] [23192] [INFO]- block:106 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-53-37.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-53-37.log new file mode 100644 index 0000000..c99cd25 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-53-37.log @@ -0,0 +1,207 @@ +[12/18/2023 10:53:37] [19824] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\leafAreaIndex-S-SAR ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line94) +[12/18/2023 10:53:37] [19824] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line319) +[12/18/2023 10:53:37] [19824] [INFO]- create new workspace success! ---from: LeafIndexMain.__create_work_space (LeafIndexMain.py:Line192) +[12/18/2023 10:53:59] [19824] [INFO]- check_source success! ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line124) +[12/18/2023 10:54:14] [19824] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:54:14] [19824] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:54:14] [19824] [INFO]- scope2:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:54:14] [19824] [INFO]- scope3:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:54:14] [19824] [INFO]- scope4:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 10:54:14] [19824] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[12/18/2023 10:54:14] [19824] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[12/18/2023 10:54:23] [19824] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:54:30] [19824] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:54:31] [19824] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:54:31] [19824] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:54:37] [19824] [INFO]- cut soilMeasured success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 10:54:37] [19824] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[12/18/2023 10:54:37] [19824] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:54:38] [19824] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:54:39] [19824] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:54:39] [19824] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:54:40] [19824] [INFO]- resampling soilMeasured success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 10:54:40] [19824] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[12/18/2023 10:54:40] [19824] [INFO]- preprocess_handle success! ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line218) +[12/18/2023 10:54:40] [19824] [INFO]- progress bar: 30% ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line219) +[12/18/2023 10:54:44] [19824] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:54:46] [19824] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\tif_mask_nan.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:54:55] [19824] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\Ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:54:56] [19824] [INFO]- create masks success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line258) +[12/18/2023 10:54:57] [19824] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:54:58] [19824] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:54:59] [19824] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:54:59] [19824] [INFO]- combine_mask success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line265) +[12/18/2023 10:55:00] [19824] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\maskcai_localang\LocalIncidenceAngle_preproed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 10:55:00] [19824] [INFO]- create ROI three image success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line270) +[12/18/2023 10:55:07] [19824] [INFO]- progress bar: 50% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line441) +[12/18/2023 10:55:25] [19824] [INFO]- 保留得数据集如下 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line402) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 1, 118.037315, 37.628621, 0.647, 0.00031600939904479484, 0.0035441595052058497, 0.011499127764024852, 0.07841542092968284] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 2, 118.037415, 37.628721, 1.85, 0.0006487838043422757, 0.0037419428016967427, 0.011395231671171424, 0.09455256313545468] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 3, 118.037515, 37.628821, 2.548, 0.0011948131671611912, 0.0037569264639858847, 0.01133885210448945, 0.08196406780431668] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 4, 118.037615, 37.628921, 4.399, 0.000707945784384138, 0.003653807647491771, 0.011634949928172577, 0.07409728646140408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 5, 118.037715, 37.629021, 3.118, 0.0037282068494295653, 0.003769166641121293, 0.01186657450909232, 0.12197119549468712] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 6, 118.037815, 37.629121, 3.045, 0.0033970348320337945, 0.00393355179026171, 0.011545482459535569, 0.21129441012938818] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 7, 118.037915, 37.629221, 0.703, 0.0002786121168629772, 0.004000000189989805, 0.010852086990151876, 0.3833015576510886] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 8, 118.038015, 37.629321, 1.879, 0.000647142615748583, 0.004000000189989805, 0.01061685162561911, 0.5832591384281347] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 9, 118.038115, 37.629421, 3.634, 0.001071519305237607, 0.004000000189989805, 0.01081088441711517, 0.8028442104473527] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 10, 118.038215, 37.629521, 3.698, 0.001281814558871049, 0.004000000189989805, 0.010996482277541984, 0.6656071119654325] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 11, 118.038315, 37.629621, 2.499, 0.0013689891307007353, 0.003106724709433354, 0.013181755790647901, 0.8254400415369022] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 12, 118.038415, 37.629721, 6.474, 0.011617160780585677, 0.0017733913127700855, 0.013708339532676302, 0.7161886968914374] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 13, 118.038515, 37.629821, 2.227, 0.007277798045368242, 0.0004444444655544228, 0.014681509339515075, 0.5202048383193252] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 26, 118.039815, 37.631121, 1.966, 0.0008375292821268827, 0.0004332647716373573, 0.015016999394621379, 0.5263507707435408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 27, 118.039915, 37.631221, 2.994, 0.0017060823890031242, 0.0015071874763241705, 0.014463746161372573, 1.0328524809928588] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- [0, 29, 118.040015, 37.631321, 2.125, 0.0007935969681957695, 0.002840520872987439, 0.014409249878407996, 1.1679075368116667] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 10:55:25] [19824] [INFO]- 训练模型 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line413) +[12/18/2023 10:55:25] [19824] [INFO]- [-31.6, 0.01, 0.001, -5.0, 0.771, -0.028] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 训练集: +根据误差输出点序 +数量:(16,) +点序 误差值 样点信息 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 11 -0.005453507148711106 [0, 12, 118.038415, 37.629721, 6.474, 0.011617160780585677, 0.0017733913127700855, 0.013708339532676302, 0.7161886968914374] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 12 -0.005157583802476022 [0, 13, 118.038515, 37.629821, 2.227, 0.007277798045368242, 0.0004444444655544228, 0.014681509339515075, 0.5202048383193252] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 4 -0.0007596055715058951 [0, 5, 118.037715, 37.629021, 3.118, 0.0037282068494295653, 0.003769166641121293, 0.01186657450909232, 0.12197119549468712] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 5 -0.0004979248675158654 [0, 6, 118.037815, 37.629121, 3.045, 0.0033970348320337945, 0.00393355179026171, 0.011545482459535569, 0.21129441012938818] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 0 0.00029999229190307215 [0, 1, 118.037315, 37.628621, 0.647, 0.00031600939904479484, 0.0035441595052058497, 0.011499127764024852, 0.07841542092968284] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 6 0.0003907114075400056 [0, 7, 118.037915, 37.629221, 0.703, 0.0002786121168629772, 0.004000000189989805, 0.010852086990151876, 0.3833015576510886] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 10 0.001010232291167542 [0, 11, 118.038315, 37.629621, 2.499, 0.0013689891307007353, 0.003106724709433354, 0.013181755790647901, 0.8254400415369022] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 13 0.0010341907153155092 [0, 26, 118.039815, 37.631121, 1.966, 0.0008375292821268827, 0.0004332647716373573, 0.015016999394621379, 0.5263507707435408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 1 0.0011125832492330258 [0, 2, 118.037415, 37.628721, 1.85, 0.0006487838043422757, 0.0037419428016967427, 0.011395231671171424, 0.09455256313545468] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 7 0.0011418503831524336 [0, 8, 118.038015, 37.629321, 1.879, 0.000647142615748583, 0.004000000189989805, 0.01061685162561911, 0.5832591384281347] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 14 0.0011443628687675942 [0, 27, 118.039915, 37.631221, 2.994, 0.0017060823890031242, 0.0015071874763241705, 0.014463746161372573, 1.0328524809928588] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 15 0.0012295162377183528 [0, 29, 118.040015, 37.631321, 2.125, 0.0007935969681957695, 0.002840520872987439, 0.014409249878407996, 1.1679075368116667] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 2 0.0012311144700446087 [0, 3, 118.037515, 37.628821, 2.548, 0.0011948131671611912, 0.0037569264639858847, 0.01133885210448945, 0.08196406780431668] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 9 0.0022390310865591945 [0, 10, 118.038215, 37.629521, 3.698, 0.001281814558871049, 0.004000000189989805, 0.010996482277541984, 0.6656071119654325] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 8 0.0023883992911094996 [0, 9, 118.038115, 37.629421, 3.634, 0.001071519305237607, 0.004000000189989805, 0.01081088441711517, 0.8028442104473527] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- 3 0.003480287880295174 [0, 4, 118.037615, 37.628921, 4.399, 0.000707945784384138, 0.003653807647491771, 0.011634949928172577, 0.07409728646140408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:55:25] [19824] [INFO]- +误差点序输出结束 + ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line419) +[12/18/2023 10:57:12] [19824] [INFO]- mask data image success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line450) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:0 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:1 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:2 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:3 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:4 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:5 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:6 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:7 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:8 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:9 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:10 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:11 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:12 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:13 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:14 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:15 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:16 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:17 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:18 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:19 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:20 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:21 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:22 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:23 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:24 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:25 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:26 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:27 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:28 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:29 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:30 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:31 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:32 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:33 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:34 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:35 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:36 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:37 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:38 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:39 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:40 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:41 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:42 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:43 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:44 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:45 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:46 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:47 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:48 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:49 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:50 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:51 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:52 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:53 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:54 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:55 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:56 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:57 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:58 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:59 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:60 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:61 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:62 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:63 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:64 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:65 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:66 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:67 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:68 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:69 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:70 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:71 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:72 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:73 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:74 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:75 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:76 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:77 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:78 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:79 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:80 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:81 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:82 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:83 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:84 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:85 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:86 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:87 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:88 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:89 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:90 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:91 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:92 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:93 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:94 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:95 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:96 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:97 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:98 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:99 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:100 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:101 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:102 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:103 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:104 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:105 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:106 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:107 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:108 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:15] [19824] [INFO]- total:110, block:109 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 10:57:21] [19824] [INFO]- all img cal LeafIndex success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line477) +[12/18/2023 10:57:21] [19824] [INFO]- progress bar: 80% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line478) +[12/18/2023 10:57:25] [19824] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:57:26] [19824] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\tif_mask_nan.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:57:35] [19824] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\Ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 10:57:36] [19824] [INFO]- create masks success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line258) +[12/18/2023 10:57:37] [19824] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:57:38] [19824] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:57:39] [19824] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 10:57:39] [19824] [INFO]- combine_mask success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line265) +[12/18/2023 10:57:40] [19824] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\maskcai_localang\LocalIncidenceAngle_preproed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 10:57:40] [19824] [INFO]- create ROI three image success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line270) +[12/18/2023 10:57:41] [19824] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\product\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal-LAI.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 10:57:41] [19824] [INFO]- block_process finished! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line493) +[12/18/2023 10:58:13] [19824] [INFO]- process_handle success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line533) +[12/18/2023 10:58:13] [19824] [INFO]- progress bar: 100% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line534) +[12/18/2023 10:58:13] [19824] [INFO]- successful production of LeafAreaIndex products! ---from: LeafIndexMain. (LeafIndexMain.py:Line557) +[12/18/2023 10:58:13] [19824] [INFO]- running use time: 0:04:35.307045 ---from: LeafIndexMain. (LeafIndexMain.py:Line565) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-18.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-18.log new file mode 100644 index 0000000..87427d8 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-18.log @@ -0,0 +1,84 @@ +[12/18/2023 10:57:18] [18924] [INFO]- block:0 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:1 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:2 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:3 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:4 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:5 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:6 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:7 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:8 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [5580] [INFO]- block:9 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:10 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:12 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [5580] [INFO]- block:11 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:13 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [5580] [INFO]- block:14 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:15 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [5580] [INFO]- block:16 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:17 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [5580] [INFO]- block:18 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:19 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [5580] [INFO]- block:20 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:21 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [18924] [INFO]- block:23 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:18] [5580] [INFO]- block:22 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:24 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:25 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:26 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:27 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:28 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:29 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:30 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:31 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:32 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:33 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:34 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:36 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:35 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:38 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:37 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:39 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:40 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:42 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:41 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:45 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:44 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:47 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:48 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:50 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:51 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:53 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:56 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:54 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:57 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:59 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:60 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [18924] [INFO]- block:61 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [5580] [INFO]- block:63 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:64 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:66 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:68 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:70 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:71 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:72 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:74 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:75 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:78 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:77 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:80 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:81 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:83 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:84 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:86 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:87 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:88 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:91 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:92 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:94 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:95 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:98 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:99 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:103 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:104 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18924] [INFO]- block:107 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [5580] [INFO]- block:108 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-19.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-19.log new file mode 100644 index 0000000..e1aed80 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-19.log @@ -0,0 +1,22 @@ +[12/18/2023 10:57:19] [8104] [INFO]- block:43 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [8104] [INFO]- block:46 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [8104] [INFO]- block:49 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [8104] [INFO]- block:52 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [8104] [INFO]- block:55 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [8104] [INFO]- block:58 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:19] [8104] [INFO]- block:62 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:65 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:67 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:69 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:73 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:76 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:79 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:82 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:85 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:89 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:90 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:93 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:97 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:100 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:102 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [8104] [INFO]- block:106 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-20.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-20.log new file mode 100644 index 0000000..b93e507 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-20.log @@ -0,0 +1,4 @@ +[12/18/2023 10:57:20] [18052] [INFO]- block:96 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18052] [INFO]- block:101 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18052] [INFO]- block:105 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 10:57:20] [18052] [INFO]- block:109 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-21.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-10-57-21.log new file mode 100644 index 0000000..e69de29 diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-06-43.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-06-43.log new file mode 100644 index 0000000..6104309 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-06-43.log @@ -0,0 +1,167 @@ +[12/18/2023 11:06:43] [23304] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\leafAreaIndex-S-SAR ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line94) +[12/18/2023 11:06:43] [23304] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line319) +[12/18/2023 11:06:43] [23304] [INFO]- create new workspace success! ---from: LeafIndexMain.__create_work_space (LeafIndexMain.py:Line192) +[12/18/2023 11:07:07] [23304] [INFO]- check_source success! ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line124) +[12/18/2023 11:07:23] [23304] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:07:23] [23304] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:07:23] [23304] [INFO]- scope2:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:07:23] [23304] [INFO]- scope3:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:07:23] [23304] [INFO]- scope4:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:07:23] [23304] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[12/18/2023 11:07:23] [23304] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[12/18/2023 11:07:30] [23304] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:07:38] [23304] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:07:40] [23304] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:07:40] [23304] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:07:49] [23304] [INFO]- cut soilMeasured success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:07:49] [23304] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[12/18/2023 11:07:49] [23304] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:07:50] [23304] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:07:51] [23304] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:07:51] [23304] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:07:52] [23304] [INFO]- resampling soilMeasured success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:07:52] [23304] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[12/18/2023 11:07:52] [23304] [INFO]- preprocess_handle success! ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line218) +[12/18/2023 11:07:52] [23304] [INFO]- progress bar: 30% ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line219) +[12/18/2023 11:07:55] [23304] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 11:07:56] [23304] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\tif_mask_nan.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 11:08:05] [23304] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\Ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 11:08:06] [23304] [INFO]- create masks success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line258) +[12/18/2023 11:08:07] [23304] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 11:08:08] [23304] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 11:08:09] [23304] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 11:08:09] [23304] [INFO]- combine_mask success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line265) +[12/18/2023 11:08:10] [23304] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\maskcai_localang\LocalIncidenceAngle_preproed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 11:08:10] [23304] [INFO]- create ROI three image success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line270) +[12/18/2023 11:08:17] [23304] [INFO]- progress bar: 50% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line441) +[12/18/2023 11:08:35] [23304] [INFO]- 保留得数据集如下 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line402) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 1, 118.037315, 37.628621, 0.647, 0.00031600939904479484, 0.0035441595052058497, 0.011499127764024852, 0.07841542092968284] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 2, 118.037415, 37.628721, 1.85, 0.0006487838043422757, 0.0037419428016967427, 0.011395231671171424, 0.09455256313545468] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 3, 118.037515, 37.628821, 2.548, 0.0011948131671611912, 0.0037569264639858847, 0.01133885210448945, 0.08196406780431668] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 4, 118.037615, 37.628921, 4.399, 0.000707945784384138, 0.003653807647491771, 0.011634949928172577, 0.07409728646140408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 5, 118.037715, 37.629021, 3.118, 0.0037282068494295653, 0.003769166641121293, 0.01186657450909232, 0.12197119549468712] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 6, 118.037815, 37.629121, 3.045, 0.0033970348320337945, 0.00393355179026171, 0.011545482459535569, 0.21129441012938818] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 7, 118.037915, 37.629221, 0.703, 0.0002786121168629772, 0.004000000189989805, 0.010852086990151876, 0.3833015576510886] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 8, 118.038015, 37.629321, 1.879, 0.000647142615748583, 0.004000000189989805, 0.01061685162561911, 0.5832591384281347] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 9, 118.038115, 37.629421, 3.634, 0.001071519305237607, 0.004000000189989805, 0.01081088441711517, 0.8028442104473527] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 10, 118.038215, 37.629521, 3.698, 0.001281814558871049, 0.004000000189989805, 0.010996482277541984, 0.6656071119654325] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 11, 118.038315, 37.629621, 2.499, 0.0013689891307007353, 0.003106724709433354, 0.013181755790647901, 0.8254400415369022] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 12, 118.038415, 37.629721, 6.474, 0.011617160780585677, 0.0017733913127700855, 0.013708339532676302, 0.7161886968914374] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 13, 118.038515, 37.629821, 2.227, 0.007277798045368242, 0.0004444444655544228, 0.014681509339515075, 0.5202048383193252] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 26, 118.039815, 37.631121, 1.966, 0.0008375292821268827, 0.0004332647716373573, 0.015016999394621379, 0.5263507707435408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 27, 118.039915, 37.631221, 2.994, 0.0017060823890031242, 0.0015071874763241705, 0.014463746161372573, 1.0328524809928588] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- [0, 29, 118.040015, 37.631321, 2.125, 0.0007935969681957695, 0.002840520872987439, 0.014409249878407996, 1.1679075368116667] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:08:35] [23304] [INFO]- 训练模型 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line413) +[12/18/2023 11:10:23] [23304] [INFO]- mask data image success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line450) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:0 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:1 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:2 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:3 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:4 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:5 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:6 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:7 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:8 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:9 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:10 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:11 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:12 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:13 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:14 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:15 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:16 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:17 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:18 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:19 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:20 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:21 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:22 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:23 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:24 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:25 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:26 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:27 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:28 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:29 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:30 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:31 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:32 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:33 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:34 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:35 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:36 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:37 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:38 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:39 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:40 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:41 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:42 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:43 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:44 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:45 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:46 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:47 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:48 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:49 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:50 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:51 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:52 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:53 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:54 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:55 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:56 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:57 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:58 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:59 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:60 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:61 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:62 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:63 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:64 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:65 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:66 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:67 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:68 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:69 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:70 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:71 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:72 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:73 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:74 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:75 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:76 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:77 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:78 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:79 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:80 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:81 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:82 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:83 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:84 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:85 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:86 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:87 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:88 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:89 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:90 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:91 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:92 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:93 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:94 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:95 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:96 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:97 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:98 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:99 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:100 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:101 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:102 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:103 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:104 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:105 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:106 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:107 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:108 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:27] [23304] [INFO]- total:110, block:109 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:10:32] [23304] [INFO]- all img cal LeafIndex success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line477) +[12/18/2023 11:10:32] [23304] [INFO]- progress bar: 80% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line478) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-29.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-29.log new file mode 100644 index 0000000..a70c9a2 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-29.log @@ -0,0 +1,81 @@ +[12/18/2023 11:10:29] [21744] [INFO]- block:0 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:1 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:2 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:3 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:4 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:5 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:6 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:7 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:8 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:10 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [23120] [INFO]- block:9 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [23120] [INFO]- block:12 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:29] [21744] [INFO]- block:11 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:13 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:14 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:15 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:16 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:17 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:18 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:19 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:20 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:21 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:23 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:22 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:24 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:25 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:26 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:27 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:28 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:29 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:30 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:31 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:32 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:33 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:34 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:35 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:36 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:37 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:38 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:40 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:41 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:43 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [21744] [INFO]- block:42 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [23120] [INFO]- block:45 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:46 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:47 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:49 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:50 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:53 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:52 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:56 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:57 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:58 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:60 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:61 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:63 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:64 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:67 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:66 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:68 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:70 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:71 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:73 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:74 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:76 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:77 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:80 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:81 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:83 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:85 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:87 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [21744] [INFO]- block:90 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [23120] [INFO]- block:92 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [21744] [INFO]- block:94 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [23120] [INFO]- block:97 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [21744] [INFO]- block:98 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [23120] [INFO]- block:99 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [21744] [INFO]- block:103 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [23120] [INFO]- block:104 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [21744] [INFO]- block:107 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [23120] [INFO]- block:108 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-30.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-30.log new file mode 100644 index 0000000..bd47535 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-30.log @@ -0,0 +1,21 @@ +[12/18/2023 11:10:30] [18656] [INFO]- block:39 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:30] [18656] [INFO]- block:44 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:48 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:51 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:54 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:55 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:59 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:62 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:65 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:69 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:72 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:75 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:78 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:79 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:84 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:88 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [18656] [INFO]- block:93 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [18656] [INFO]- block:95 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [18656] [INFO]- block:100 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [18656] [INFO]- block:102 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [18656] [INFO]- block:106 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-31.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-31.log new file mode 100644 index 0000000..9136931 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-31.log @@ -0,0 +1,8 @@ +[12/18/2023 11:10:31] [10692] [INFO]- block:82 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [10692] [INFO]- block:86 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [10692] [INFO]- block:89 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:31] [10692] [INFO]- block:91 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [10692] [INFO]- block:96 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [10692] [INFO]- block:101 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [10692] [INFO]- block:105 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:10:32] [10692] [INFO]- block:109 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-32.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-10-32.log new file mode 100644 index 0000000..e69de29 diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-11-27.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-11-27.log new file mode 100644 index 0000000..810ab2b --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-11-27.log @@ -0,0 +1,183 @@ +[12/18/2023 11:11:27] [22436] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\leafAreaIndex-S-SAR ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line94) +[12/18/2023 11:11:27] [22436] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line319) +[12/18/2023 11:11:27] [22436] [INFO]- create new workspace success! ---from: LeafIndexMain.__create_work_space (LeafIndexMain.py:Line192) +[12/18/2023 11:11:51] [22436] [INFO]- check_source success! ---from: LeafIndexMain.check_source (LeafIndexMain.py:Line124) +[12/18/2023 11:12:07] [22436] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:12:07] [22436] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:12:07] [22436] [INFO]- scope2:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:12:07] [22436] [INFO]- scope3:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:12:07] [22436] [INFO]- scope4:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[12/18/2023 11:12:07] [22436] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[12/18/2023 11:12:07] [22436] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[12/18/2023 11:12:14] [22436] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:12:21] [22436] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:12:23] [22436] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:12:23] [22436] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:12:31] [22436] [INFO]- cut soilMeasured success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[12/18/2023 11:12:31] [22436] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[12/18/2023 11:12:32] [22436] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:12:32] [22436] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:12:33] [22436] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:12:34] [22436] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:12:34] [22436] [INFO]- resampling soilMeasured success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[12/18/2023 11:12:34] [22436] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[12/18/2023 11:12:34] [22436] [INFO]- preprocess_handle success! ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line218) +[12/18/2023 11:12:34] [22436] [INFO]- progress bar: 30% ---from: LeafIndexMain.preprocess_handle (LeafIndexMain.py:Line219) +[12/18/2023 11:12:37] [22436] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 11:12:38] [22436] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\tif_mask_nan.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 11:12:47] [22436] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\Ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 11:12:47] [22436] [INFO]- create masks success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line258) +[12/18/2023 11:12:48] [22436] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 11:12:50] [22436] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 11:12:51] [22436] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 11:12:51] [22436] [INFO]- combine_mask success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line265) +[12/18/2023 11:12:52] [22436] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\maskcai_localang\LocalIncidenceAngle_preproed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 11:12:52] [22436] [INFO]- create ROI three image success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line270) +[12/18/2023 11:12:59] [22436] [INFO]- progress bar: 50% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line441) +[12/18/2023 11:13:17] [22436] [INFO]- 保留得数据集如下 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line402) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 1, 118.037315, 37.628621, 0.647, 0.00031600939904479484, 0.0035441595052058497, 0.011499127764024852, 0.07841542092968284] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 2, 118.037415, 37.628721, 1.85, 0.0006487838043422757, 0.0037419428016967427, 0.011395231671171424, 0.09455256313545468] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 3, 118.037515, 37.628821, 2.548, 0.0011948131671611912, 0.0037569264639858847, 0.01133885210448945, 0.08196406780431668] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 4, 118.037615, 37.628921, 4.399, 0.000707945784384138, 0.003653807647491771, 0.011634949928172577, 0.07409728646140408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 5, 118.037715, 37.629021, 3.118, 0.0037282068494295653, 0.003769166641121293, 0.01186657450909232, 0.12197119549468712] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 6, 118.037815, 37.629121, 3.045, 0.0033970348320337945, 0.00393355179026171, 0.011545482459535569, 0.21129441012938818] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 7, 118.037915, 37.629221, 0.703, 0.0002786121168629772, 0.004000000189989805, 0.010852086990151876, 0.3833015576510886] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 8, 118.038015, 37.629321, 1.879, 0.000647142615748583, 0.004000000189989805, 0.01061685162561911, 0.5832591384281347] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 9, 118.038115, 37.629421, 3.634, 0.001071519305237607, 0.004000000189989805, 0.01081088441711517, 0.8028442104473527] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 10, 118.038215, 37.629521, 3.698, 0.001281814558871049, 0.004000000189989805, 0.010996482277541984, 0.6656071119654325] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 11, 118.038315, 37.629621, 2.499, 0.0013689891307007353, 0.003106724709433354, 0.013181755790647901, 0.8254400415369022] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 12, 118.038415, 37.629721, 6.474, 0.011617160780585677, 0.0017733913127700855, 0.013708339532676302, 0.7161886968914374] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 13, 118.038515, 37.629821, 2.227, 0.007277798045368242, 0.0004444444655544228, 0.014681509339515075, 0.5202048383193252] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 26, 118.039815, 37.631121, 1.966, 0.0008375292821268827, 0.0004332647716373573, 0.015016999394621379, 0.5263507707435408] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 27, 118.039915, 37.631221, 2.994, 0.0017060823890031242, 0.0015071874763241705, 0.014463746161372573, 1.0328524809928588] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- [0, 29, 118.040015, 37.631321, 2.125, 0.0007935969681957695, 0.002840520872987439, 0.014409249878407996, 1.1679075368116667] ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line406) +[12/18/2023 11:13:17] [22436] [INFO]- 训练模型 ---from: LeafIndexMain.cal_empirical_parameters (LeafIndexMain.py:Line413) +[12/18/2023 11:15:00] [22436] [INFO]- mask data image success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line450) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:0 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:1 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:2 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:3 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:4 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:5 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:6 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:7 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:8 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:9 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:10 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:11 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:12 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:13 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:14 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:15 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:16 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:17 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:18 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:19 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:20 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:21 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:22 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:23 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:24 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:25 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:26 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:27 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:28 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:29 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:30 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:31 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:32 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:33 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:34 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:35 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:36 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:37 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:38 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:39 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:40 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:41 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:42 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:43 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:44 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:45 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:46 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:47 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:48 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:49 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:50 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:51 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:52 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:53 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:54 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:55 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:56 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:57 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:58 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:59 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:60 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:61 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:62 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:63 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:64 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:65 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:66 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:67 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:68 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:69 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:70 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:71 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:72 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:73 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:74 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:75 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:76 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:77 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:78 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:79 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:80 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:81 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:82 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:83 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:84 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:85 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:86 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:87 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:88 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:89 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:90 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:91 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:92 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:93 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:94 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:95 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:96 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:97 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:98 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:99 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:100 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:101 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:102 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:103 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:104 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:105 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:106 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:107 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:108 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:03] [22436] [INFO]- total:110, block:109 calculating leaf_index! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line472) +[12/18/2023 11:15:09] [22436] [INFO]- all img cal LeafIndex success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line477) +[12/18/2023 11:15:09] [22436] [INFO]- progress bar: 80% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line478) +[12/18/2023 11:15:12] [22436] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 11:15:14] [22436] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\tif_mask_nan.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 11:15:23] [22436] [INFO]- trans_tif2mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\Ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[12/18/2023 11:15:23] [22436] [INFO]- create masks success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line258) +[12/18/2023 11:15:24] [22436] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 11:15:25] [22436] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 11:15:26] [22436] [INFO]- combine_mask success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[12/18/2023 11:15:26] [22436] [INFO]- combine_mask success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line265) +[12/18/2023 11:15:27] [22436] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\maskcai_localang\LocalIncidenceAngle_preproed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 11:15:27] [22436] [INFO]- create ROI three image success! ---from: LeafIndexMain.cal_roi (LeafIndexMain.py:Line270) +[12/18/2023 11:15:28] [22436] [INFO]- cal_roi success, path: D:\micro\SWork\LeafAreaIndex\Temporary\processing\product\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal-LAI.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[12/18/2023 11:15:29] [22436] [INFO]- block_process finished! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line493) +[12/18/2023 11:16:00] [22436] [INFO]- process_handle success! ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line533) +[12/18/2023 11:16:00] [22436] [INFO]- progress bar: 100% ---from: LeafIndexMain.block_process (LeafIndexMain.py:Line534) +[12/18/2023 11:16:00] [22436] [INFO]- successful production of LeafAreaIndex products! ---from: LeafIndexMain. (LeafIndexMain.py:Line557) +[12/18/2023 11:16:00] [22436] [INFO]- running use time: 0:04:32.721935 ---from: LeafIndexMain. (LeafIndexMain.py:Line565) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-05.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-05.log new file mode 100644 index 0000000..ea88713 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-05.log @@ -0,0 +1,45 @@ +[12/18/2023 11:15:05] [25612] [INFO]- block:0 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:05] [25612] [INFO]- block:1 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:05] [25612] [INFO]- block:2 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:3 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:4 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:5 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:6 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:8 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:10 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:11 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:14 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:16 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:18 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:20 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:22 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:25 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:27 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:29 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:31 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25612] [INFO]- block:33 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:35 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:37 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:39 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:42 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:45 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:47 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:50 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:53 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:56 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:58 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:61 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:64 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:67 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:68 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:71 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:74 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25612] [INFO]- block:77 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25612] [INFO]- block:80 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25612] [INFO]- block:85 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25612] [INFO]- block:89 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25612] [INFO]- block:90 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25612] [INFO]- block:94 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25612] [INFO]- block:98 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25612] [INFO]- block:103 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25612] [INFO]- block:107 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-06.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-06.log new file mode 100644 index 0000000..ef5c011 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-06.log @@ -0,0 +1,37 @@ +[12/18/2023 11:15:06] [25724] [INFO]- block:7 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:9 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:12 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:13 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:15 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:17 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:19 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:21 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:23 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:24 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:26 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:28 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:30 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:32 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:06] [25724] [INFO]- block:34 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:36 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:38 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:40 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:43 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:46 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:49 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:52 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:55 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:59 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:62 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:65 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:69 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:73 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [25724] [INFO]- block:76 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25724] [INFO]- block:79 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25724] [INFO]- block:83 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25724] [INFO]- block:86 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25724] [INFO]- block:92 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25724] [INFO]- block:96 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25724] [INFO]- block:99 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25724] [INFO]- block:104 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [25724] [INFO]- block:108 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-07.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-07.log new file mode 100644 index 0000000..f51351e --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-07.log @@ -0,0 +1,21 @@ +[12/18/2023 11:15:07] [24504] [INFO]- block:41 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:44 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:48 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:51 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:54 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:57 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:60 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:63 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:66 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:70 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:72 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:75 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:07] [24504] [INFO]- block:78 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [24504] [INFO]- block:81 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [24504] [INFO]- block:84 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [24504] [INFO]- block:88 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [24504] [INFO]- block:93 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [24504] [INFO]- block:97 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [24504] [INFO]- block:100 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [24504] [INFO]- block:102 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [24504] [INFO]- block:106 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-08.log b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-08.log new file mode 100644 index 0000000..aabd928 --- /dev/null +++ b/leafAreaIndex-S-SAR/run_log/LeafAreaIndex2023-12-18-11-15-08.log @@ -0,0 +1,7 @@ +[12/18/2023 11:15:08] [23444] [INFO]- block:82 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [23444] [INFO]- block:87 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [23444] [INFO]- block:91 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [23444] [INFO]- block:95 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [23444] [INFO]- block:101 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [23444] [INFO]- block:105 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) +[12/18/2023 11:15:08] [23444] [INFO]- block:109 cal LeafIndex success! ---from: LeafIndexMain.cal_leaf_index (LeafIndexMain.py:Line307) diff --git a/leafAreaIndex-S-SAR/sample_process.py b/leafAreaIndex-S-SAR/sample_process.py new file mode 100644 index 0000000..c32132e --- /dev/null +++ b/leafAreaIndex-S-SAR/sample_process.py @@ -0,0 +1,202 @@ +# +# 样本处理的相关的库 +# + +from tool.algorithm.image.ImageHandle import ImageHandler +import math +import numpy as np +import random +import scipy +# 最小二乘求解非线性方程组 +from scipy.optimize import leastsq,fsolve,root +from osgeo import gdal,gdalconst +import pandas as pds +from scipy import interpolate +from multiprocessing import pool +# 常量声明区域 +imageHandler=ImageHandler() + + +# python 的函数类 +def read_sample_csv(csv_path): + """ 读取样本的csv + Args: + csv_path (string): 样本csv的地址,绝对路径 + return: + [ + ['日期','样方编号','经度','纬度','叶面积指数',"后向散射系数"], + ['日期','样方编号','经度','纬度','叶面积指数',"后向散射系数"],...... + ] + """ + lai_csv=pds.read_csv(csv_path)# 代码测试区域 + lai_csv=lai_csv.loc[:,['id','lon','lat','leaf',"cal"]] + result=[] + for i in range(len(lai_csv)): + result.append([ + 0, + lai_csv.loc[i,'id'], + lai_csv.loc[i,'lon'], # lon,x + lai_csv.loc[i,'lat'], # lat,y + lai_csv.loc[i,'leaf'], + 10**(float(lai_csv.loc[i,'cal'])/10), + ]) + return result +def read_tiff(tiff_path): + """ 从文件中读取影像 + + Args: + tiff_path (string): 文件影像路径 + """ + im_proj, im_geotrans, im_arr=imageHandler.read_img(tiff_path) + return { + 'proj':im_proj, + 'geotrans':im_geotrans, + 'data':im_arr + } + +def ReprojectImages2(in_tiff_path,ref_tiff_path,out_tiff_path,resampleAlg=gdalconst.GRA_Bilinear): + """ 将输入影像重采样到参考影像的范围内 + + Args: + in_tiff_path (string): 输入影像 + ref_tiff_path (string): 参考影像 + out_tiff_path (string): 输出地址 + resampleAlg (gadlconst): 插值方法 + """ + # 若采用gdal.Warp()方法进行重采样 + # 获取输出影像信息 + inputrasfile = gdal.Open(in_tiff_path, gdal.GA_ReadOnly) + inputProj = inputrasfile.GetProjection() + # 获取参考影像信息 + referencefile = gdal.Open(ref_tiff_path, gdal.GA_ReadOnly) + referencefileProj = referencefile.GetProjection() + referencefileTrans = referencefile.GetGeoTransform() + bandreferencefile = referencefile.GetRasterBand(1) + x = referencefile.RasterXSize + y = referencefile.RasterYSize + nbands = referencefile.RasterCount + # 创建重采样输出文件(设置投影及六参数) + driver = gdal.GetDriverByName('GTiff') + output = driver.Create(out_tiff_path, x, y, nbands, bandreferencefile.DataType) + output.SetGeoTransform(referencefileTrans) + output.SetProjection(referencefileProj) + options = gdal.WarpOptions(srcSRS=inputProj, dstSRS=referencefileProj, resampleAlg=gdalconst.GRA_Bilinear) + gdal.Warp(output, in_tiff_path, options=options) + +def combine_sample_attr(sample_list,attr_tiff): + """ 构建样本 + + Args: + sample_list (list): 原样本 + attr_tiff (string): 添加的属性数据 + + Returns: + list:[sample,new_attr] + """ + result=[] + # 因为soil_tiff 的影像的 影像分辨率较低 + inv_gt=gdal.InvGeoTransform(attr_tiff['geotrans']) + for sample_item in sample_list: + sample_lon=sample_item[2] + sample_lat=sample_item[3] + sample_in_tiff_x=inv_gt[0]+inv_gt[1]*sample_lon+inv_gt[2]*sample_lat # x + sample_in_tiff_y=inv_gt[3]+inv_gt[4]*sample_lon+inv_gt[5]*sample_lat # y + x_min=int(np.floor(sample_in_tiff_x)) + x_max=int(np.ceil(sample_in_tiff_x)) + y_min=int(np.floor(sample_in_tiff_y)) + y_max=int(np.ceil(sample_in_tiff_y)) + if x_min<0 or y_min<0 or x_max>=attr_tiff['data'].shape[1] or y_max>=attr_tiff['data'].shape[0]: + continue + # + """ + f = interpolate.interp2d([0,0,1,1], [0,1,1,0], + [attr_tiff['data'][y_min,x_min], + attr_tiff['data'][y_max,x_min], + attr_tiff['data'][y_max,x_max], + attr_tiff['data'][y_min,x_min] + ], kind='linear') + interp_value=f(sample_in_tiff_x-x_min,sample_in_tiff_y-y_min) + sample_item.append(interp_value[0]) + """ + # 9x9 + x_min=x_min-4 if x_min-9>=0 else 0 + y_min=y_min-4 if y_min-9>=0 else 0 + x_max=x_max+4 if x_max+490: + continue + if sample_soil<=0 or sample_soil>=1: + continue + if sample_lai<=0 or sample_lai>=20: + continue + result.append(item) + # 绘制分布图 + # lai=[] + # sigma=[] + # csv_sigmas=[] + # text_label=[] + # for item in result: + # if len(item)==10: + # sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma,sample_NDVI=item + # else: + # sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=item + # text_label.append(sample_code) + # lai.append(sample_lai) + # sigma.append(sample_sigma) + # csv_sigmas.append(csv_sigma) + # from matplotlib import pyplot as plt + # plt.scatter(np.array(lai),np.array(sigma),label="lai-tiff_sigma") + # for i in range(len(sigma)): + # plt.annotate(text_label[i], xy = (lai[i], sigma[i])) # 这里xy是需要标记的坐标,xytext是对应的标签坐标 + # + # plt.scatter(np.array(lai),np.array(csv_sigmas),label="lai-csv_sigmas") + # for i in range(len(csv_sigmas)): + # plt.annotate(text_label[i], xy = (lai[i],csv_sigmas[i])) # 这里xy是需要标记的坐标,xytext是对应的标签坐标 + # plt.legend() + # plt.show() + + return result + + + +def split_sample_list(sample_list,train_ratio): + """ 切分样本比值 + + Args: + sample_list (list): 样本列表 + train_ratio (double): 训练样本的比重 + + Returns: + list: [sample_train,sample_test] + """ + sample_train=[] + sample_test=[] + n=len(sample_list) + for i in range(n): + if random.random()<=train_ratio: + sample_train.append(sample_list[i]) + else: + sample_test.append(sample_list[i]) + return [sample_train,sample_test] \ No newline at end of file diff --git a/leafAreaIndex-S-SAR/打包步骤.txt b/leafAreaIndex-S-SAR/打包步骤.txt new file mode 100644 index 0000000..802d164 --- /dev/null +++ b/leafAreaIndex-S-SAR/打包步骤.txt @@ -0,0 +1,13 @@ +ļ¼Ϊexe +һanaconda ˮлpycharmնˣ +ڶcdleafAreaIndexļ +cd ./leafAreaIndex +д +pyinstaller -D pyinstaller.spec +IJconfig.ini,model_meta.xml,proj.db distļУɾbuildʱļС +岽ɵsoilMoisture_c_sar.exedistļ,exeԳǷУ +distļеĿ¼distļиΪгơ + +οӣhttps://www.jb51.net/article/187806.htm + +pyinstaller -F --add-data "D/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml;./dask" --add-data "D/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml;./distributed" SurfaceRoughnessMain.py \ No newline at end of file diff --git a/soilMoisture-S-SAR/SoilMoisture.xml b/soilMoisture-S-SAR/SoilMoisture.xml new file mode 100644 index 0000000..26a6a8d --- /dev/null +++ b/soilMoisture-S-SAR/SoilMoisture.xml @@ -0,0 +1,285 @@ + + + CSAR_202107275419_0001-0 + D:\micro\LWork\ + + File + ElementAlg + SoilMositure_S_SAR_V3 + SoilMositure_S_SAR_V3.exe + 土壤水分反演 + 土壤水分反演 + SoilMositure_S_SAR_V3 + 3 + 陆表类_地表土壤水分产品 + 5 + SoilMoisture_SSAR_中科卫星应用德清研究院_3 + 中科卫星应用德清研究院 + 景-算法 + + 0 + 0 + Windows10 + 双核 + 32GB + 64GB + 无需求 + 无需求 + 无需求 + + + + + DualPolarSAR + 包含HH和VV极化方式的后向散射产品 + 经过辐射校正、地理定标(WGS84)的后向散射产品,包含HH和VV两种极化方式 + File + tar.gz + DEFAULT + DEFAULT + DEFAULT + Cal + + F:\MicroWorkspace\S_SAR\AHV\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal.tar.gz + True + False + File + production + 1 + BackScattering_SSAR_中科卫星应用德清研究院_3 + + + Covering + 地表覆盖类型数据 + 经过地理定标(WGS84)的地表覆盖类型数据 + File + zip + DEFAULT + DEFAULT + DEFAULT + Cal + F:\al_zhongji\S-SAR-data\soilMoisture\SSAR_soilMoisture_landCover.zip + True + False + UploadTable + Aux + 1 + Aux + + + CoveringIDs + 地表覆盖类型数据的类别id + 地表覆盖类型数据中植被区域、裸土区域的类别id,多个id使用“;”分割。示例:GlobeLand30数据的cover_roi_ids = + 10;20;30;40;50;70;71;72;83;74;90 + Value + string + Man + empty + DEFAULT + DEFAULT + DEFAULT + True + False + UploadInput + Aux + 0 + Aux + + + NDVI + NDVI数据 + 经过地理定标(WGS84)的NDVI数据 + File + zip + DEFAULT + DEFAULT + DEFAULT + Cal + F:\al_zhongji\S-SAR-data\soilMoisture\SSAR_soilMoisture_NDVI.zip + True + False + UploadTable + Aux + 1 + Aux + + + NDVIScope + NDVI范围 + NDVI最小值和NDVI最大值,使用“;”分割 + Value + string + Man + -1;1 + True + False + UploadInput + Aux + 0 + Aux + DEFAULT + DEFAULT + DEFAULT + + + box + 经纬度包围盒 + 经纬度包围盒SNWE。例子:31.36;31.42;118.89;118.94,不填写则使用影像相交区域作为包围盒 + Value + string + Man + empty + True + False + UploadInput + Aux + 0 + Aux + DEFAULT + DEFAULT + DEFAULT + + + NDWI + NDWI数据 + 经过地理定标(WGS84)的NDWI数据 + File + zip + DEFAULT + DEFAULT + DEFAULT + Cal + F:\al_zhongji\S-SAR-data\soilMoisture\SSAR_soilMoisture_NDWI.zip + True + False + UploadTable + Aux + 1 + Aux + + + e1 + 经验系数e1 + 计算VWC经验系数e1 pj272.4990417750755 + Value + float + Man + -22.482554048434324 + True + False + UploadInput + Aux + 0 + Aux + DEFAULT + DEFAULT + DEFAULT + + + e2 + 经验系数e2 + 计算VWC经验系数e2 -239.64612385952591华北 + Value + float + Man + -10.72946251632336 + True + False + UploadInput + Aux + 0 + Aux + 100 + -100 + DEFAULT + + + Chh + HH极化经验系数c + 计算裸土总后向散射系数的经验系数c-0.08238130673792357 -427.85537039258094 + Value + float + Man + -0.08238130673792357 + True + False + UploadInput + Aux + 0 + Aux + 9999 + -9999 + DEFAULT + + + Dhh + HH极化经验系数d + 计算裸土总后向散射系数的经验系数d 1.0194495140476119 0.0004032420007417529 + Value + float + Man + 1.0194495140476119 + True + False + UploadInput + Aux + 0 + Aux + 9999 + -9999 + DEFAULT + + + Cvv + VV极化经验系数c + 计算裸土总后向散射系数的经验系数c 6.107713980885245 1183.1090524710369 + Value + float + Man + 6.107713980885245 + True + False + UploadInput + Aux + 0 + Aux + 9999 + -9999 + DEFAULT + + + Dvv + VV极化经验系数d + 计算裸土总后向散射系数的经验系数d -4.496951628949385 -0.0028930332578555444 + Value + float + Man + -4.496951628949385 + True + False + UploadInput + Aux + 0 + Aux + 9999 + -9999 + DEFAULT + + + + + SoilMoistureProduct + 土壤水分反演产品 + 土壤水分反演产品 + File + tar.gz + Man + D:\micro\LWork\SoilMoisture\Output\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal-SMC.tar.gz + DEFAULT + DEFAULT + DEFAULT + DEFAULT + + + + \ No newline at end of file diff --git a/soilMoisture-S-SAR/SoilMoistureALg.py b/soilMoisture-S-SAR/SoilMoistureALg.py new file mode 100644 index 0000000..931c719 --- /dev/null +++ b/soilMoisture-S-SAR/SoilMoistureALg.py @@ -0,0 +1,266 @@ +# -*- coding: UTF-8 -*- +""" +@Project:microproduct +@File:SoilMoistureALg.py +@Function:实现土壤水分计算的算法 +@Contact: +@Author:SHJ +@Date:2021/8/10 10:01 +@Version:1.0.0 +""" +import logging +from tool.algorithm.image.ImageHandle import ImageHandler +import numpy as np +import time +import scipy +import scipy.spatial.transform._rotation_groups # 解决打包的问题 +from scipy.optimize import fmin +import math +from tool.algorithm.algtools.oh2004 import oh2004 + +logger = logging.getLogger("mylog") + +class MoistureAlg: + def __init__(self,): + pass + + @staticmethod + def cal_vwc(vwc_path, ndwi_path, e1, e2): + """ + :param vwc_path: + :param ndwi_path: + :param e1: + :param e2: + :return: True or False + """ + image_handler = ImageHandler() + proj = image_handler.get_projection(ndwi_path) + geotrans = image_handler.get_geotransform(ndwi_path) + array = image_handler.get_band_array(ndwi_path, 1) + # 原方案的计算方式 + vwc = e1 * np.square(array) + e2 * array + # 论文《基于Radarsat-2全极化数据的高原牧草覆盖地表土壤水分反演》的计算方式 + #vwc = e1 * array + e2 + image_handler.write_img(vwc_path, proj, geotrans, vwc) + return True + + @staticmethod + def cal_bare_soil_bsc(bsc_path, tif_path, vwc_path, arrival_angle_path, c, d): + """ + :param bsc_path:裸土后向散射系数(线性值) + :param tif_path:输入影像 会自动完成 dB 到线性值变换 + :param vwc_path:vwc影像路径 + :param arrival_angle_path:入射角影像文件(单位:弧度) + :param c:经验系数 a + :param d:经验系数 b + """ + image_handler = ImageHandler() + proj = image_handler.get_projection(tif_path) + geotrans = image_handler.get_geotransform(tif_path) + tif_array = image_handler.get_band_array(tif_path, 1) + vwc_array = image_handler.get_band_array(vwc_path, 1) + angle_array = image_handler.get_band_array(arrival_angle_path, 1) + + tif_array=np.power(10.0,tif_array/10.0) # dB --> 线性值 后向散射系数 + + + try: + cos_angle = np.cos(angle_array) + tmp1 = tif_array - c * vwc_array * cos_angle + tmp2 = np.exp(-2 * d * vwc_array * (1/cos_angle)) + bsc_array =c * vwc_array * cos_angle + tmp1/tmp2 # --- 公式计算错误 + + except BaseException as msg: + logger.error(msg) + return False + bsc_array = np.where(bsc_array > 0, bsc_array, 0) + + image_handler.write_img(bsc_path, proj, geotrans, bsc_array) + return True + + @staticmethod + def cal_soil_moisture(soil_moisture_path, hh_bsc_path, vv_bsc_path, arrival_angle_path, mask_path, λ, f=5.3, T=24.5,bd=1, vsand=0.54, vclay=0.19,block_num=0): + """ + :param soil_moisture_path:土壤水分产品路径 + :param hh_bsc_path:hh裸土后向散射系数 + :param vv_bsc_path:vv裸土后向散射系数 + :param arrival_angle_path:入射角影像文件 + :param mask_path:掩膜影像文件 + :param λ:经验系数 + :param f:微波频率,单位GHz + :param T:温度,摄氏度 + :param bd:土壤容重 + :param vsand:沙土含量,范围0-1 + :param vclay:黏土含量,范围0-1 + :return: True or False + """ + image_handler = ImageHandler() + proj = image_handler.get_projection(hh_bsc_path) + geotrans = image_handler.get_geotransform(hh_bsc_path) + + angle_array = image_handler.get_band_array(arrival_angle_path, 1) + + try: + # 计算土壤介电常数 + hh_bsc_array = image_handler.get_band_array(hh_bsc_path, 1) + + if np.any(hh_bsc_array < 0): + logger.error("hh_bsc_array include negative value!") + return False + tmp = np.power(10, 0.19) * np.power(float(λ), 0.15) * hh_bsc_array + # 处理异常值 + where_tmp1_0 = np.where(tmp == 0.0) + tmp[where_tmp1_0] = 1 + except BaseException as msg: + logger.error(msg) + return False + + try: + vv_bsc_array = image_handler.get_band_array(vv_bsc_path, 1) + + if np.any(vv_bsc_array < 0): + logger.error("vv_bsc_array include negative value!") + return False + tmp2 = np.power(np.cos(angle_array), 1.82) * np.power(np.sin(angle_array), 0.93) *\ + np.power(vv_bsc_array, 0.786) + # 处理异常值 + where_tmp2_0 = np.where(tmp2 == 0.0) + tmp2[where_tmp2_0] = 1 + tmp = tmp/tmp2 + + # 土壤介电常数 + soil_dielectric = (1/(0.024 * np.tan(angle_array))) * np.log10(tmp) + soil_dielectric_path = soil_moisture_path.replace("soil_moisture","soil_dielectric") + image_handler.write_img(soil_dielectric_path, proj, geotrans, soil_dielectric) + except BaseException as msg: + logger.error(msg) + return False + + + mask_array = ImageHandler.get_band_array(mask_path, 1) + soil_dielectric[np.where(mask_array == 0)] = np.nan + + try: + # Dobsen模型计算土壤水分 + # soil_moisture = dobsen_inverse(f, T, bd, vsand, vclay, soil_dielectric, block_num) + + # topp模型计算土壤水分 + soil_moisture = -5.3 * np.power(10.0, -2) + 2.92 * np.power(10.0, -2) * soil_dielectric - \ + 5.5 * np.power(10.0, -4) * np.power(soil_dielectric, 2) + \ + 4.3 * np.power(10.0, -6) * np.power(soil_dielectric, 3) + # 处理异常值 + soil_moisture[where_tmp1_0] = 0 + soil_moisture[where_tmp2_0] = 0 + except BaseException as msg: + logger.error(msg) + return False + image_handler.write_img(soil_moisture_path, proj, geotrans, soil_moisture) + return True + + + @staticmethod + def cal_soilM(soil_moisture_path, hh_bsc_path, vv_bsc_path, hv_bsc_path, vh_bsc_path, angle_path,mask_path, wl): + """ + + :param soil_moisture_path: 土壤水分路径 + :param hh_bsc_path: hh极化路径 + :param vv_bsc_path: vv极化路径 + :param hv_bsc_path: hv极化路径 + :param vh_bsc_path: vh极化路径 + :param angle_path: 入射角 + :param wl: 波长 + :return: + """ + + image_handler = ImageHandler() + proj = image_handler.get_projection(hh_bsc_path) + geotrans = image_handler.get_geotransform(hh_bsc_path) + + hh_arr = ImageHandler.get_band_array(hh_bsc_path, 1) + hv_arr = ImageHandler.get_band_array(hv_bsc_path, 1) + vh_arr = ImageHandler.get_band_array(vh_bsc_path, 1) + vv_arr = ImageHandler.get_band_array(vv_bsc_path, 1) + angle_arr = ImageHandler.get_band_array(angle_path, 1) + mask_arr = ImageHandler.get_band_array(mask_path, 1) + f = oh2004.lamda2freq(wl/100)/1e9 # wl 原来是cm ,得转成m + n = np.array(hh_arr).shape[0] * np.array(hh_arr).shape[1] + + hh = np.array(hh_arr).flatten().astype(np.double) + hh[np.where(hh == -9999)] = np.nan + hv = np.array(hv_arr).flatten().astype(np.double) + hv[np.where(hv == -9999)] = np.nan + vv = np.array(vv_arr).flatten().astype(np.double) + vv[np.where(vv == -9999)] = np.nan + angle = np.array(angle_arr).flatten().astype(np.double) + angle[np.where(angle == -9999)] = np.nan + mask = np.array(mask_arr).flatten().astype(np.int32) + + # foo_retrieve = inverse_radar(hh_arr, hv_arr, vh_arr, vv_arr, angle_arr, wl) + # mv, h = foo_retrieve.retrieve_oh2004_Cython() + mv = np.zeros(np.array(hh_arr).shape, dtype=np.double).flatten() + h = np.zeros(np.array(hh_arr).shape, dtype=np.double).flatten() + angle=angle*180/3.1415926 + + oh2004.retrieve_oh2004_main(n, mv, h, mask, vv, hh, hv, hv, angle, f) + + soil = np.array(mv).reshape(np.array(hh_arr).shape) + + image_handler.write_img(soil_moisture_path, proj, geotrans, soil) + return True + +def dobsen_inverse(f, T, bd, vsand, vclay, soil_dielectric_array,block_num, x0=0): + """ + Dobsen模型,土壤水分反演 + :param f:微波频率,单位GHz + :param T:温度,摄氏度 + :param bd:土壤容重 + :param vsand:沙土含量,范围0-1 + :param vclay:黏土含量,范围0-1 + :param soil_dielectric_array:土壤介电常数 + :param x0 :土壤水分寻优,初始值 + :return: True or False + """ + alpha = 0.65 + sd = 2.65 + dcs = (1.01 + 0.44 * sd) ** 2 - 0.062 + dc0 = 0.008854 + dcw0 = 88.045 - 0.4147 * T + 6.295e-4 * (T ** 2) + 1.075e-5 * (T ** 3) + tpt = 0.11109 - 3.824e-3 * T + 6.938e-5 * (T ** 2) - 5.096e-7 * (T ** 3) + dcwinf = 4.9 + if f >= 1.4: + sigma = -1.645 + 1.939 * bd - 2.013e-2 * vsand + 1.594e-2 * vclay + else: + sigma = 0.0467 + 0.2204 * bd - 4.111e-3 * vsand + 6.614e-3 * vclay + + dcwr = dcwinf + ((dcw0 - dcwinf) / (1 + (tpt * f) ** 2)) + + betar = 1.2748 - 0.00519 * vsand - 0.00152 * vclay + betai = 1.33797 - 0.00603 * vsand - 0.00166 * vclay + + # fun = lambda vwc: np.abs(np.sqrt( + # ((1.0 + (bd / sd) * ((dcs ** alpha) - 1.0) + (vwc ** betar) * (dcwr ** alpha) - vwc) ** (1 / alpha)) ** 2 + + # ((vwc ** (betai / alpha)) * ((tpt * f * (dcw0 - dcwinf)) / (1 + (tpt * f) ** 2) + sigma * (1.0 - (bd / sd)) / (2 * np.pi * dc0 * f * vwc))) ** 2 + # ) - soil_dielectric) + fun = lambda vwc: np.abs(np.sqrt( + ((1.0 + (bd / sd) * ((dcs ** alpha) - 1.0) + (vwc ** betar) * (dcwr ** alpha) - vwc) ** (1 / alpha)) ** 2 + + ((vwc ** (betai / alpha)) * ((tpt * f * (dcw0 - dcwinf)) / (1 + (tpt * f) ** 2) + sigma * (1.0 - (bd / sd)) / (8 * math.atan(1.0) * dc0 * f * vwc))) ** 2 + ) - soil_dielectric) + + soil_dielectric_array[np.isnan(soil_dielectric_array)] = 0 + w = np.where((soil_dielectric_array == 0) == False) + num = len(w[0]) + soil_mois = np.zeros(num) + bar_list = [0, int(0.1*num), int(0.2*num), int(0.3*num), int(0.4*num), int(0.5*num), int(0.6*num), int(0.7*num), int(0.8*num), int(0.9*num), num-1] + + start = time.perf_counter() + for soil_dielectric, n in zip(soil_dielectric_array[w], range(num)): + soil_mois[n] = fmin(fun, x0, disp=0) + if n in bar_list: + logger.info('block:{},cal soil_moisture proggress bar:{}%,use time :{}s'.format(block_num, round(n/num * 100), int(time.perf_counter()-start))) + soil_dielectric_array[w] = soil_mois # 土壤水分 + return soil_dielectric_array + + + + + diff --git a/soilMoisture-S-SAR/SoilMoistureMain.py b/soilMoisture-S-SAR/SoilMoistureMain.py new file mode 100644 index 0000000..dc6f5c3 --- /dev/null +++ b/soilMoisture-S-SAR/SoilMoistureMain.py @@ -0,0 +1,473 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :SoilMoistureMain.py +@Author :SHJ +@Contact: +@Date :2021/7/26 17:11 +@Version :1.0.0 +修改历史: +[修改序列] [修改日期] [修改者] [修改内容] + 1 2022-6-30 石海军 1.使用cover_roi_id来选取ROI区域; 2.内部处理使用地理坐标系(4326); +""" +import glob + +from tool.algorithm.algtools.PreProcess import PreProcess as pp +from tool.algorithm.xml.AlgXmlHandle import ManageAlgXML, CheckSource, InitPara # 导入xml文件读取与检查文件 +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.logHandler import LogHandler +from SoilMoistureALg import MoistureAlg as alg +from tool.algorithm.block.blockprocess import BlockProcess +from tool.algorithm.algtools.MetaDataHandler import MetaDataHandler +from tool.algorithm.xml.CreateMetaDict import CreateMetaDict, CreateProductXml +from tool.config.ConfigeHandle import Config as cf +from tool.algorithm.xml.CreatMetafile import CreateMetafile +from tool.algorithm.algtools.ROIAlg import ROIAlg as roi +from SoilMoistureXmlInfo import CreateDict, CreateStadardXmlFile +from tool.algorithm.algtools.filter.lee_Filter import Filter +from tool.file.fileHandle import fileHandle +import logging +import os +import shutil +import datetime +import numpy as np +import sys +import multiprocessing + +cover_id_list = [] +threshold_of_ndvi_min = 0 +threshold_of_ndvi_max = 0 +multiprocessing_num = int(cf.get('multiprocessing_num')) +if cf.get('debug') == 'True': + DEBUG = True +else: + DEBUG = False +file = fileHandle(DEBUG) +EXE_NAME = cf.get('exe_name') +FILTER_SIZE = int(cf.get('filter_size')) +tar = '-' + cf.get('target') +productLevel = cf.get('productLevel') +soil_moisture_value_min = float(cf.get('product_value_min')) +soil_moisture_value_max = float(cf.get('product_value_max')) + +LogHandler.init_log_handler('run_log\\' + EXE_NAME) +logger = logging.getLogger("mylog") +# env_str = os.path.split(os.path.realpath(__file__))[0] +env_str = os.path.dirname(os.path.abspath(sys.argv[0])) +os.environ['PROJ_LIB'] = env_str +block_size_config = int(cf.get('block_size_config')) + + +class MoistureMain: + """ + 土壤水分处理主函数 + """ + + def __init__(self, alg_xml_path): + self.alg_xml_path = alg_xml_path + self.imageHandler = ImageHandler() + self.__alg_xml_handler = ManageAlgXML(alg_xml_path) + self.__check_handler = CheckSource(self.__alg_xml_handler) + self.__workspace_path, self.__out_para = None, None + self.__input_paras, self.__output_paras, self.__processing_paras, self.__preprocessed_paras = {}, {}, {}, {} + # 参考影像路径 + self.__ref_img_path = '' + # 宽/列数,高/行数 + self.__cols, self.__rows = 0, 0 + # 坐标系 + self.__proj = '' + # 影像投影变换矩阵 + self.__geo = [0, 0, 0, 0, 0, 0] + + def check_source(self): + """ + 检查算法相关的配置文件,图像,辅助文件是否齐全 + """ + env_str = os.getcwd() + logger.info("sysdir: %s", env_str) + + if self.__check_handler.check_alg_xml() is False: + return False + + if self.__check_handler.check_run_env() is False: + return False + input_para_names = ['box', 'CoveringIDs', 'DualPolarSAR', 'Covering', 'NDVI', 'NDWI', 'e1', 'e2', 'Chh', 'Dhh', + 'Cvv', 'Dvv'] # , 'T', 'Pb', 'vsand', 'vclay'] + if self.__check_handler.check_input_paras(input_para_names) is False: + return False + self.__workspace_path = self.__alg_xml_handler.get_workspace_path() + self.__create_work_space() + self.__input_paras = self.__alg_xml_handler.get_input_paras() + self.__processing_paras = InitPara.init_processing_paras(self.__input_paras, self.__workspace_preprocessed_path) + self.__processing_paras.update(self.get_tar_gz_inf(self.__processing_paras["sar_path0"])) + SrcImageName = os.path.split(self.__input_paras["DualPolarSAR"]['ParaValue'])[1].split('.tar.gz')[0] + result_name = SrcImageName + tar + ".tar.gz" + self.__out_para = os.path.join(self.__workspace_path, EXE_NAME, 'Output', result_name) + self.__alg_xml_handler.write_out_para("SoilMoistureProduct", self.__out_para) # 写入输出参数 + + logger.info('check_source success!') + logger.info('progress bar: 10%') + return True + + def get_tar_gz_inf(self, tar_gz_path): + para_dic = {} + name = os.path.split(tar_gz_path)[1].rstrip('.tar.gz') + file_dir = os.path.join(self.__workspace_preprocessing_path, name + '\\') + file.de_targz(tar_gz_path, file_dir) + # 元文件字典 + para_dic.update(InitPara.get_meta_dic_new(InitPara.get_meta_paths(file_dir, name), name)) + # tif路径字典 + pol_dic = InitPara.get_polarization_mode(InitPara.get_tif_paths(file_dir, name)) + + flag_list = [0, 0, 0, 0, 0] + + for key, in_tif_path in pol_dic.items(): + # 获取极化类型 + if 'HH' == key: + para_dic.update({'HH': in_tif_path}) + flag_list[0] = 1 + elif 'HV' == key: + para_dic.update({'HV': in_tif_path}) # 如果没有VV,用HV代替 + flag_list[1] = 1 + elif 'VV' == key: + para_dic.update({'VV': in_tif_path}) + flag_list[2] = 1 + elif 'VH' == key: + para_dic.update({'VH': in_tif_path}) + flag_list[3] = 1 + # elif 'inc_angle' == key: + elif 'inc_angle' == key: + para_dic.update({'LocalIncidenceAngle': in_tif_path}) + flag_list[4] = 1 + if flag_list != [1, 1, 1, 1, 1]: + raise Exception('There are not tar_gz path: HH、HV(VV)、LocalIncidenceAngle or meta.xml in path:', + tar_gz_path) + self.processinfo = flag_list + return para_dic + + def __create_work_space(self): + """ + 删除原有工作区文件夹,创建新工作区文件夹 + """ + self.__workspace_preprocessing_path = self.__workspace_path + EXE_NAME + r'\Temporary\preprocessing''\\' + self.__workspace_preprocessed_path = self.__workspace_path + EXE_NAME + r'\Temporary\preprocessed''\\' + self.__workspace_processing_path = self.__workspace_path + EXE_NAME + r'\Temporary\processing''\\' + self.__workspace_block_tif_path = self.__workspace_path + EXE_NAME + r'\Temporary\blockTif''\\' + self.__workspace_block_tif_processed_path = self.__workspace_path + EXE_NAME + r'\Temporary\blockTifProcessed''\\' + self.__product_dic = self.__workspace_processing_path + 'product\\' + path_list = [self.__workspace_preprocessing_path, self.__workspace_preprocessed_path, + self.__workspace_processing_path, self.__workspace_block_tif_path, + self.__workspace_block_tif_processed_path, self.__product_dic] + + file.creat_dirs(path_list) + logger.info('create new workspace success!') + + def preprocess_handle(self): + """ + 预处理 + """ + para_names = ['HH', 'VV', 'VH', 'HV', 'Covering', 'NDVI', 'NDWI', 'LocalIncidenceAngle'] # LocalIncidenceAngle + ref_img_name = 'HH' + p = pp() + self.__preprocessed_paras = p.preprocessing(para_names, ref_img_name, + self.__processing_paras, + self.__workspace_preprocessing_path, + self.__workspace_preprocessed_path) + self.__ref_img_path, self.__cols, self.__rows, self.__proj, self.__geo = p.get_ref_inf( + self.__preprocessed_paras[ref_img_name]) + logger.info('progress bar: 40%') + + def create_roi(self): + """ + 计算ROI掩膜 + :return: 掩膜路径 + """ + processing_path = self.__workspace_processing_path + # 利用角度为nan生成Mask + pp.check_LocalIncidenceAngle(self.__preprocessed_paras['LocalIncidenceAngle'], + self.__preprocessed_paras['LocalIncidenceAngle']) + angle_nan_mask_path = processing_path + 'angle_nan_mask.tif' + roi.trans_tif2mask(angle_nan_mask_path, self.__preprocessed_paras['LocalIncidenceAngle'], np.nan) + + # 利用影像的有效范围生成MASK + tif_mask_path = processing_path + 'tif_mask.tif' + roi.trans_tif2mask(tif_mask_path, self.__preprocessed_paras['HH'], 0, 0) # 0,0修改为np.nan + tif_zero_mask_path = processing_path + 'tif_mask_zero.tif' + roi.trans_tif2mask(tif_zero_mask_path, self.__preprocessed_paras['HH'], np.nan) + + # 利用cover计算植被覆盖范围 + cover_mask_path = processing_path + 'cover_mask.tif' + # alg.trans_tif2mask(cover_mask_path, self.__preprocessed_paras['Covering'], threshold_of_cover_min, threshold_of_cover_max) + + if self.__processing_paras['CoveringIDs'] == 'empty': + cover_data = ImageHandler.get_data(self.__preprocessed_paras["Covering"]) + cover_data[np.where(np.isnan(cover_data))] = 0 + cover_id_list = list(np.unique(cover_data)) + else: + cover_id_list = list(self.__processing_paras['CoveringIDs'].split(';')) + cover_id_list = [int(num) for num in cover_id_list] + + roi.trans_cover2mask(cover_mask_path, self.__preprocessed_paras["Covering"], cover_id_list) + # 利用NDVI计算裸土范围该指数的输出值在 -1.0 和 1.0 之间,大部分表示植被量, + # 负值主要根据云、水和雪而生成 + # 接近零的值则主要根据岩石和裸土而生成。 + # 较低的(小于等于 0.1)NDVI 值表示岩石、沙石或雪覆盖的贫瘠区域。 + # 中等值(0.2 至 0.3)表示灌木丛和草地 + # 较高的值(0.6 至 0.8)表示温带雨林和热带雨林。 + ndvi_mask_path = processing_path + 'ndvi_mask.tif' + ndvi_scope = list(self.__processing_paras['NDVIScope'].split(';')) + threshold_of_ndvi_min = float(ndvi_scope[0]) + threshold_of_ndvi_max = float(ndvi_scope[1]) + roi.trans_tif2mask(ndvi_mask_path, self.__preprocessed_paras['NDVI'], threshold_of_ndvi_min, + threshold_of_ndvi_max) + + logger.info('create masks success!') + # 利用覆盖范围和裸土范围 生成MASK + bare_land_mask_path = processing_path + 'bare_land_mask.tif' + roi.combine_mask(bare_land_mask_path, cover_mask_path, ndvi_mask_path) + roi.combine_mask(bare_land_mask_path, bare_land_mask_path, tif_mask_path) + roi.combine_mask(bare_land_mask_path, bare_land_mask_path, tif_zero_mask_path) + roi.combine_mask(bare_land_mask_path, bare_land_mask_path, angle_nan_mask_path) + logger.info('combine_mask success!') + + # 计算roi区域 + roi.cal_roi(self.__preprocessed_paras['LocalIncidenceAngle'], self.__preprocessed_paras['LocalIncidenceAngle'], + bare_land_mask_path, background_value=1) + shutil.copyfile(bare_land_mask_path, self.__workspace_preprocessed_path + 'mask.tif') + logger.info('create ROI image success!') + return bare_land_mask_path + + def process_handle(self, start): + """ + 算法主处理函数 + :return: True or False + """ + radar_center_frequency = MetaDataHandler.get_RadarCenterFrequency(self.__processing_paras['Origin_META']) + lamda = MetaDataHandler.get_lamda( + self.__processing_paras['Origin_META']) # * 100 #单位转为cm -> 修改 m, 陈增辉 2023.08.29 + k = 2 * 3.1415926 / lamda # 1/m --- ? + # 计算ROI区域 + bare_land_mask_path = self.create_roi() + logger.info('progress bar: 50%') + + para_names = ['HH', 'VV', 'VH', 'HV'] + for i in para_names: + if os.path.exists(self.__preprocessed_paras[i]): + lee_path = os.path.join(self.__workspace_preprocessed_path, + os.path.basename(self.__preprocessed_paras[i]).split(".")[0] + '_lee.tif') + Filter().lee_process_sar(self.__preprocessed_paras[i], lee_path, 3, 0.25) + logger.info('lee process finish: ' + self.__preprocessed_paras[i]) + os.remove(self.__preprocessed_paras[i]) + self.__preprocessed_paras.update({i: lee_path}) + + # 分块 + bp = BlockProcess() + # block_size = bp.get_block_size(self.__rows, self.__cols,block_size_config) + block_size = bp.get_block_size(self.__rows, self.__cols) + + pre_cuts = list(glob.glob(os.path.join(self.__workspace_preprocessed_path, '*.tif'))) + cut_dir = os.path.join(self.__workspace_preprocessed_path, 'cut_tif') + if not os.path.exists(cut_dir): + os.makedirs(cut_dir) + for cut_tif in pre_cuts: + tif_name = os.path.basename(cut_tif) + if 'HH' in tif_name or 'VV' in tif_name or 'NDWI' in tif_name or 'LocalIncidenceAngle' in tif_name or 'mask' in tif_name: + shutil.copy(cut_tif, os.path.join(cut_dir, tif_name)) + bp.cut(cut_dir, self.__workspace_block_tif_path, ['tif', 'tiff'], 'tif', block_size) + logger.info('blocking tifs success!') + + img_dir, img_name = bp.get_file_names(self.__workspace_block_tif_path, ['tif']) + dir_dict = bp.get_same_img(img_dir, img_name) + + angle_list, hh_list, vv_list, ndwi_list, mask_list = None, None, None, None, None + for key in dir_dict.keys(): + tmp = key.split('_', 2)[0] + if tmp == 'LocalIncidenceAngle': + angle_list = dir_dict[key] + elif tmp == 'HH': + hh_list = dir_dict[key] + elif tmp == 'VV': + vv_list = dir_dict[key] + elif tmp == 'NDWI': + ndwi_list = dir_dict[key] + elif tmp == 'mask': + mask_list = dir_dict[key] + + if angle_list is None or hh_list is None or vv_list is None or ndwi_list is None or mask_list is None: + logger.info( + 'angle_list is None or hh_list is None or vv_list is None or vh_list is None or hv_list is None or ndwi_list is None') + return False + if not len(angle_list) == len(hh_list) == len(vv_list) == len(ndwi_list) == len(mask_list): + logger.info( + '[len(angle_list) == len(hh_list) == len(vv_list) == len(vh_list) == len(hv_list) == len(ndwi_list)] is False!') + return False + + processes_num = min([len(angle_list), multiprocessing_num, multiprocessing.cpu_count() - 1]) + # f = Filter() + # f.lee_filter_multiprocess(hh_list, hh_list, FILTER_SIZE, processes_num) + # f.lee_filter_multiprocess(vv_list, vv_list, FILTER_SIZE, processes_num) + # f.lee_filter_multiprocess(vh_list, vh_list, FILTER_SIZE, processes_num) + # f.lee_filter_multiprocess(hv_list, hv_list, FILTER_SIZE, processes_num) + # 开启多进程处理 + pool = multiprocessing.Pool(processes=processes_num) + pl = [] + for i in range(len(angle_list)): + suffix = bp.get_suffix(os.path.basename(angle_list[i])) + # 利用NDWI计算VWCs + vwc_path = self.__workspace_block_tif_processed_path + 'vwc' + suffix + alg.cal_vwc(vwc_path, ndwi_list[i], self.__processing_paras['e1'], self.__processing_paras['e2']) # + + # 利用VWC、入射角 计算裸土后向散射系数 + hh_bare_soil_bsc_path = self.__workspace_block_tif_processed_path + 'hh_bare_soil_bsc' + suffix + vv_bare_soil_bsc_path = self.__workspace_block_tif_processed_path + 'vv_bare_soil_bsc' + suffix + # vh_bare_soil_bsc_path = self.__workspace_block_tif_processed_path + 'vh_bare_soil_bsc' + suffix + # hv_bare_soil_bsc_path = self.__workspace_block_tif_processed_path + 'hv_bare_soil_bsc' + suffix + + flag = alg.cal_bare_soil_bsc(hh_bare_soil_bsc_path, hh_list[i], vwc_path, angle_list[i], + self.__processing_paras['Chh'], + self.__processing_paras['Dhh']) # 裸土后向散射系统(线性值) + if flag is False: + return False + + flag = alg.cal_bare_soil_bsc(vv_bare_soil_bsc_path, vv_list[i], vwc_path, angle_list[i], + self.__processing_paras['Cvv'], self.__processing_paras['Dvv']) + if flag is False: + return False + + # flag = alg.cal_bare_soil_bsc(vh_bare_soil_bsc_path, vh_list[i], vwc_path, angle_list[i], + # self.__processing_paras['Cvv'], self.__processing_paras['Dvv']) + # if flag is False: + # return False + # + # flag = alg.cal_bare_soil_bsc(hv_bare_soil_bsc_path, hv_list[i], vwc_path, angle_list[i], + # self.__processing_paras['Cvv'], self.__processing_paras['Dvv']) + # if flag is False: + # return False + + # 利用后向散射系数,计算土壤含水量 + soil_moisture_path = self.__workspace_block_tif_processed_path + 'soil_moisture' + suffix + # pl.append(pool.apply_async(alg.cal_soil_moisture, (soil_moisture_path, hh_bare_soil_bsc_path, vv_bare_soil_bsc_path, + # angle_list[i], mask_list[i], lamda, radar_center_frequency, self.__processing_paras['T'], + # self.__processing_paras['Pb'], self.__processing_paras['vsand'], self.__processing_paras['vclay'],i))) # dobsen + pl.append(pool.apply_async(alg.cal_soil_moisture, + (soil_moisture_path, hh_bare_soil_bsc_path, vv_bare_soil_bsc_path, + angle_list[i], mask_list[i], lamda, radar_center_frequency, 0, + 0, 0, 0, i))) # topp + # pl.append((pool.apply_async(alg.cal_soilM, (soil_moisture_path, hh_list[i], vv_list[i], hv_list[i], vh_list[i], angle_list[i], mask_list[i], lamda)))) # oh 2004 + # alg.cal_soilM(soil_moisture_path, hh_list[i], vv_list[i], hv_list[i], vh_list[i], angle_list[i], mask_list[i], lamda) + logger.info('total:%s, block:%s calculating soil_moisture!', len(angle_list), i) + + pool.close() + pool.join() + logger.info(pl) + logger.info('progress bar: 80%') + # 合并处理后的影像 + data_dir = self.__workspace_block_tif_processed_path + w = ImageHandler.get_img_width(self.__preprocessed_paras['HH']) + h = ImageHandler.get_img_height(self.__preprocessed_paras['HH']) + out_path = self.__workspace_processing_path[0:-1] + tif_type = bp.get_tif_dtype(self.__preprocessed_paras['HH']) + bp.combine(data_dir, w, h, out_path, file_type=['tif'], datetype=tif_type) + + # 添加地理信息 + soil_moisture_path = self.__workspace_processing_path + 'soil_moisture.tif' + bp.assign_spatial_reference_byfile(self.__preprocessed_paras['HH'], soil_moisture_path) + + # 生成roi区域 + SrcImageName = os.path.split(self.__input_paras["DualPolarSAR"]['ParaValue'])[1].split('.tar.gz')[ + 0] + tar + '.tif' + product_path = os.path.join(self.__product_dic, SrcImageName) + roi.cal_roi(product_path, soil_moisture_path, bare_land_mask_path, background_value=np.nan) + logger.info('cal soil_moisture success!') + + proj, geos, data = self.imageHandler.read_img(product_path) + data[data < soil_moisture_value_min] = soil_moisture_value_min + data[data > soil_moisture_value_max] = soil_moisture_value_max + self.imageHandler.write_img(product_path, proj, geos, data) + + # 生成快视图 + self.imageHandler.write_quick_view(product_path) + + # 生成元文件案例 + xml_path = "./model_meta.xml" + tem_folder = self.__workspace_path + EXE_NAME + r"\Temporary""\\" + image_path = product_path + out_path1 = os.path.join(tem_folder, "trans_geo_projcs.tif") + out_path2 = os.path.join(tem_folder, "trans_projcs_geo.tif") + + model_xml_path = os.path.join(tem_folder, "creat_standard.meta.xml") # 输出xml路径 + + # id_min = 0 + # id_max = 1000 + # threshold_of_ndvi_min = 0 + # threshold_of_ndvi_max = 1 + # set_threshold = [id_max, id_min, threshold_of_ndvi_min, threshold_of_ndvi_max] + # par_dict = CreateDict(image_path, self.processinfo, out_path1, out_path2).calu_nature(start) + # CreateStadardXmlFile(xml_path, self.alg_xml_path, par_dict, set_threshold, model_xml_path).create_standard_xml() + + SrcImagePath = self.__input_paras["DualPolarSAR"]['ParaValue'] + paths = SrcImagePath.split(';') + SrcImageName = os.path.split(paths[0])[1].split('.tar.gz')[0] + # if len(paths) >= 2: + # for i in range(1, len(paths)): + # SrcImageName=SrcImageName+";"+os.path.split(paths[i])[1].split('.tar.gz')[0] + # meta_xml_path = self.__product_dic+EXE_NAME+"Product.meta.xml" + # CreateMetafile(self.__processing_paras['META'], self.alg_xml_path, model_xml_path, meta_xml_path).process(SrcImageName) + + model_path = "./product.xml" + meta_xml_path = os.path.join(self.__product_dic, SrcImageName + tar + ".meta.xml") + + para_dict = CreateMetaDict(image_path, self.__processing_paras['Origin_META'], self.__product_dic, + out_path1, out_path2).calu_nature() + para_dict.update({"imageinfo_ProductName": "土壤水分产品"}) + para_dict.update({"imageinfo_ProductLevel": productLevel}) + para_dict.update({"imageinfo_ProductIdentifier": "SoilMositure"}) + para_dict.update({"ProductProductionInfo_BandSelection": "1,2"}) + CreateProductXml(para_dict, model_path, meta_xml_path).create_standard_xml() + + temp_folder = os.path.join(self.__workspace_path, EXE_NAME, 'Output') + out_xml = os.path.join(temp_folder, os.path.basename(meta_xml_path)) + if os.path.exists(temp_folder) is False: + os.mkdir(temp_folder) + # CreateProductXml(para_dict, model_path, out_xml).create_standard_xml() + shutil.copy(meta_xml_path, out_xml) + + # 文件夹打包 + file.make_targz(self.__out_para, self.__product_dic) + logger.info('process_handle success!') + logger.info('progress bar: 100%') + + def del_temp_workspace(self): + """ + 临时工作区 + """ + if DEBUG is False: + path = self.__workspace_path + EXE_NAME + r'\Temporary' + if os.path.exists(path): + file.del_folder(path) + + +if __name__ == '__main__': + multiprocessing.freeze_support() + start = datetime.datetime.now() + try: + if len(sys.argv) < 2: + xml_path = 'SoilMoisture.xml' + else: + xml_path = sys.argv[1] + main_handler = MoistureMain(xml_path) + if main_handler.check_source() is False: + raise Exception('check_source() failed!') + if main_handler.preprocess_handle() is False: + raise Exception('preprocess_handle() failed!') + if main_handler.process_handle(start) is False: + raise Exception('process_handle() failed!') + logger.info('successful production of ' + EXE_NAME + ' products!') + except Exception: + logger.exception('run-time error!') + finally: + main_handler.del_temp_workspace() + pass + end = datetime.datetime.now() + msg = 'running use time: %s ' % (end - start) + logger.info(msg) diff --git a/soilMoisture-S-SAR/SoilMoistureMain.spec b/soilMoisture-S-SAR/SoilMoistureMain.spec new file mode 100644 index 0000000..643578a --- /dev/null +++ b/soilMoisture-S-SAR/SoilMoistureMain.spec @@ -0,0 +1,40 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['SoilMoistureMain.py'], + pathex=[], + binaries=[], + datas=[('D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')], + hiddenimports=['pyproj._compat'], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='SoilMoistureMain', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None ) diff --git a/soilMoisture-S-SAR/SoilMoistureXmlInfo.py b/soilMoisture-S-SAR/SoilMoistureXmlInfo.py new file mode 100644 index 0000000..af9a035 --- /dev/null +++ b/soilMoisture-S-SAR/SoilMoistureXmlInfo.py @@ -0,0 +1,254 @@ +""" +@Project :microproduct +@File :BackScatteringXmlInfo.PY +@Function :主函数 +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" +import os +from xml.etree.ElementTree import ElementTree, Element +import xml.dom.minidom +from lxml import etree +import shutil +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.PreProcess import PreProcess as pp +from osgeo import gdal +import numpy as np +import datetime +from PIL import Image + + +class CreateDict: + """根据影像信息输出属性字典""" + def __init__(self, image_path, image_pair, out_path1, out_path2): + """ + image_path:影像路径 + image_pair:输入的压缩包中的极化对 例:hh,hv,vh,vv=【1,1,1,1】 + out_path1:地理转平面的输出路径 + out_path2:平面转地理的输出路径 + """ + self.ImageHandler = ImageHandler() + self.para_dict = {} + self.image_path = image_path + self.out_path = out_path1 + self.out_path2 = out_path2 + self.image_pair = image_pair + pass + + def calu_nature(self,start): + """存入字典""" + + imageinfo_width=self.ImageHandler.get_img_width(self.image_path) + self.para_dict.update({"imageinfo_width":imageinfo_width}) + imageinfo_height=self.ImageHandler.get_img_height(self.image_path) + self.para_dict.update({"imageinfo_height":imageinfo_height}) + # imageinfo_EarthModel=self.ImageHandler.get_projection(self.image_path).split("SPHEROID[", 2)[1].split(",", 2)[0] + # self.para_dict.update({"imageinfo_EarthModel":imageinfo_EarthModel.replace('"','')}) + self.para_dict.update({"imageinfo_EarthModel": "WGS84"}) + # imageinfo_ProjectModel = self.ImageHandler.get_projection(self.image_path).split("DATUM[", 2)[1].split(",", 2)[0] + # self.para_dict.update({"imageinfo_ProjectModel":imageinfo_ProjectModel.replace('"','')}) + self.para_dict.update({"imageinfo_ProjectModel": "UTM"}) + proj = self.ImageHandler.get_projection(self.image_path) # 输出的影像若是投影坐标系则先转成地理坐标系 + keyword = proj.split("[", 2)[0] # 若是地理坐标系则pass + if keyword == "GEOGCS": + pass + elif keyword == "PROJCS": + pp.trans_projcs2geogcs(self.out_path2, self.image_path) + self.image_path = self.out_path2 + elif len(keyword) == 0 or keyword.strip() == "" or keyword.isspace() is True: + raise Exception('image projection is missing!') + + pp.trans_geogcs2projcs(self.out_path, self.image_path) # 坐标投影, 地理转平面投影坐标 + imageinfo_widthspace = self.ImageHandler.get_geotransform(self.out_path)[1] # 投影后的分辨率 + imageinfo_heightspace = -self.ImageHandler.get_geotransform(self.out_path)[5] # 投影后的分辨率 + self.para_dict.update({"imageinfo_widthspace":imageinfo_widthspace}) + self.para_dict.update({"imageinfo_heightspace":imageinfo_heightspace}) + self.para_dict.update({"NominalResolution":imageinfo_widthspace}) + + WidthInMeters = imageinfo_width*imageinfo_widthspace # 投影后的分辨率×宽度 + self.para_dict.update({"WidthInMeters":WidthInMeters}) + + # image_array = self.ImageHandler.get_band_array(self.image_path) + # a2 = np.where(np.isnan(image_array), 999999, image_array) + # MinValue = np.min(a2) + # a3 = np.where(np.isnan(image_array), -999999, image_array) + # MaxValue = np.max(a3) + # + # self.para_dict.update({"MaxValue":MaxValue}) + # self.para_dict.update({"MinValue":MinValue}) + + get_scope = self.ImageHandler.get_scope(self.image_path) + point_upleft, point_upright, point_downleft, point_downright=get_scope[0], get_scope[1], get_scope[2], get_scope[3] + self.para_dict.update({"imageinfo_corner_topLeft_latitude": point_upleft[1]}) + self.para_dict.update({"imageinfo_corner_topLeft_longitude": point_upleft[0]}) + self.para_dict.update({"imageinfo_corner_topRight_latitude": point_upright[1]}) + self.para_dict.update({"imageinfo_corner_topRight_longitude": point_upright[0]}) + self.para_dict.update({"imageinfo_corner_bottomLeft_latitude": point_downleft[1]}) + self.para_dict.update({"imageinfo_corner_bottomLeft_longitude": point_downleft[0]}) + self.para_dict.update({"imageinfo_corner_bottomRight_latitude": point_downright[1]}) + self.para_dict.update({"imageinfo_corner_bottomRight_longitude": point_downright[0]}) + + longitude_max=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).max() + longitude_min=np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).min() + latitude_max=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).max() + latitude_min=np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).min() + imageinfo_center_latitude=(latitude_max+latitude_min)/2 + imageinfo_center_longitude=(longitude_max+longitude_min)/2 + self.para_dict.update({"imageinfo_center_latitude": imageinfo_center_latitude}) + self.para_dict.update({"imageinfo_center_longitude": imageinfo_center_longitude}) + + self.para_dict.update({"productType": "GTC"}) # 设置产品类型 + self.para_dict.update({"productFormat": "TIF"}) + productGentime = datetime.datetime.now() + self.para_dict.update({"productGentime": productGentime}) + + msg=productGentime-start + self.para_dict.update({"productConsumeTime": msg}) + self.para_dict.update({"unit": "none"}) # 设置单位 + self.para_dict.update({"NoDataValue": "nan"}) + self.para_dict.update({"productLevel": "5"}) # 设置图像位深度 + # noinspection PyBroadException + # try: # 设置图像位深度 + # imagebit="0bit" + # # im=Image.open(self.image_path) + # im = Image.open(r"E:\0test\testworkspace\DEM\ASTGTM2_N24E110_dem.tif") + # if "1" in im.getbands(): + # imagebit="1bit" + # elif "L" in im.getbands() or "P" in im.getbands(): + # imagebit = "8bit" + # elif "R" in im.getbands() and "G" in im.getbands() and "B" in im.getbands(): + # imagebit = "24bit" + # elif "R" in im.getbands() and "G" in im.getbands() and "B" in im.getbands() and "A" in im.getbands(): + # imagebit = "32bit" + # elif "C" in im.getbands() and "M" in im.getbands() and "Y" in im.getbands() and "K" in im.getbands(): + # imagebit = "32bit" + # elif "Y" in im.getbands() and "C" in im.getbands() and "b" in im.getbands() and "C" in im.getbands(): + # imagebit = "32bit" + # elif "I" in im.getbands() or "F" in im.getbands(): + # imagebit = "32bit" + image_array = self.ImageHandler.get_band_array(self.image_path) + try: + gdal_dtypes = { + 'int8': gdal.GDT_Byte, + 'unit16': gdal.GDT_UInt16, + 'int16': gdal.GDT_Int16, + 'unit32': gdal.GDT_UInt32, + 'int32': gdal.GDT_Int32, + 'float32': gdal.GDT_Float32, + 'float64': gdal.GDT_Float64, + } + bit_dtypes = { + 'int8': 8, + 'unit16': 16, + 'int16': 16, + 'unit32': 32, + 'int32': 32, + 'float32': 32, + 'float64': 64, + } + if not gdal_dtypes.get(image_array.dtype.name, None) is None: + bit_num = str(bit_dtypes[image_array.dtype.name]) + datatype=bit_num+"bit" + else: + datatype = str(32) + "bit" + # datatype = str(gdal.GDT_Float32)+"bit" + self.para_dict.update({"imagebit": datatype}) + except Exception: + self.para_dict.update({"imagebit": "None"}) + + self.para_dict.update({"imageinfo_QualifyValue_Product": "NULL"}) + + return self.para_dict + + +class CreateStadardXmlFile: + """读取字典中的属性值,生成一个标准的xml文件""" + def __init__(self, xml_path, para_xml_path, par_dict, set_threshold, path): + """ + xml_path:模板路径 + para_xml_path:算法配置文件的路径 + par_dict:字典 + path:xml模板输出路径 + """ + self.par_dict = par_dict + self.path = path + self.para_xml_path= para_xml_path + self.set_threshold = set_threshold + shutil.copy(xml_path, path) + pass + + def create_standard_xml(self): + """将字典中的信息写入到copy的xml文件中""" + tree = ElementTree() + tree.parse(self.path) # 影像头文件 + root = tree.getroot() + + para_tree = ElementTree() + para_tree.parse(self.para_xml_path) # 影像头文件 + para_root = para_tree.getroot() + + productinfo = root.find("productinfo") + for key, value in self.par_dict.items(): + if key.split("_")[0] != "imageinfo": + productinfo.find(key).text = str(value) + elif key.split("_")[0] == "imageinfo": + imageinfo = productinfo.find("imageinfo") + if key.split("_")[1] in ["EarthModel", "ProjectModel", "width", "height", "widthspace", "heightspace"]: + imageinfo.find(key.split("_")[1]).text = str(value) + elif key.split("_")[1] == "center": + center = imageinfo.find("center") + center.find(key.split("_")[2]).text = str(value) + elif key.split("_")[1] == "corner": + corner = imageinfo.find("corner") + corner.find(key.split("_")[2]).find(key.split("_")[3]).text = str(value) + elif key.split("_")[1] == "QualifyValue": + QualifyValue = imageinfo.find("QualifyValue") + QualifyValue.find(key.split("_")[2]).text = str(value) + pass + Parameter = root.find("processinfo").find("Parameter") + + para_list=para_root.find("AlgCompt").find("Inputs").findall("Parameter") + for para in para_list: + if para.find("ParaName").text=="e1": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaE1").text = str(para_value) + + elif para.find("ParaName").text=="e2": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaE2").text = str(para_value) + + elif para.find("ParaName").text=="c": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaC").text = str(para_value) + + elif para.find("ParaName").text=="d": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaD").text = str(para_value) + + elif para.find("ParaName").text=="λ": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaLambda").text = str(para_value) + + elif para.find("ParaName").text=="T": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaT").text = str(para_value) + + elif para.find("ParaName").text=="Pb": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaPb").text = str(para_value) + + elif para.find("ParaName").text=="vsand": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaVsand").text = str(para_value) + + elif para.find("ParaName").text=="vclay": + para_value = para.find("ParaValue").text + Parameter.find("ExperienceParaVclay").text = str(para_value) + + Parameter.find("NdviThresholdMin").text = str(self.set_threshold[0]) + Parameter.find("NdviThresholdMax").text = str(self.set_threshold[1]) + Parameter.find("CoverThresholdMin").text = str(self.set_threshold[2]) + Parameter.find("CoverThresholdMax").text = str(self.set_threshold[3]) + tree.write(self.path, encoding="utf-8", xml_declaration=True) + diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/ImageMatch.obj b/soilMoisture-S-SAR/baseTool/x64/Release/ImageMatch.obj new file mode 100644 index 0000000..2dffc26 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/ImageMatch.obj differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/LIBPQ.dll b/soilMoisture-S-SAR/baseTool/x64/Release/LIBPQ.dll new file mode 100644 index 0000000..21f1003 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/LIBPQ.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/Lerc.dll b/soilMoisture-S-SAR/baseTool/x64/Release/Lerc.dll new file mode 100644 index 0000000..29513ed Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/Lerc.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/OctreeNode.obj b/soilMoisture-S-SAR/baseTool/x64/Release/OctreeNode.obj new file mode 100644 index 0000000..3d22e50 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/OctreeNode.obj differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/RPC_Correct.obj b/soilMoisture-S-SAR/baseTool/x64/Release/RPC_Correct.obj new file mode 100644 index 0000000..4b6479f Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/RPC_Correct.obj differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog new file mode 100644 index 0000000..fec0179 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11108.write.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog new file mode 100644 index 0000000..79c356d Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.11472.write.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog new file mode 100644 index 0000000..4727173 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.command.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog new file mode 100644 index 0000000..c45d321 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CL.read.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog new file mode 100644 index 0000000..b56a673 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.read.1u.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog new file mode 100644 index 0000000..605eacb Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/CopyLocal.write.1u.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate new file mode 100644 index 0000000..a4d4182 --- /dev/null +++ b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:VcpkgTriplet=x64-windows: +Release|x64|D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\| diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog new file mode 100644 index 0000000..024973f Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/SIMOrthoProgram-S-SAR.write.1u.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog new file mode 100644 index 0000000..71d26aa Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.command.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog new file mode 100644 index 0000000..6b36871 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.read.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog new file mode 100644 index 0000000..e69aabe Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/link.write.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog new file mode 100644 index 0000000..4d44e42 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.command.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog new file mode 100644 index 0000000..7404a57 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.read.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog new file mode 100644 index 0000000..af942f2 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrtho.7722b0a9.tlog/rc.write.1.tlog differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.Build.CppClean.log b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.Build.CppClean.log new file mode 100644 index 0000000..ef0c252 --- /dev/null +++ b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.Build.CppClean.log @@ -0,0 +1,70 @@ +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simptsn.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\rpc_correct.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\imagematch.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\sateorbit.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\octreenode.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\test_moudel.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\basetool.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\interpolation.obj +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vc142.pdb +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\concrt140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_atomic_wait.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\msvcp140_codecvt_ids.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vccorlib140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcruntime140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcruntime140_1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcamp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\vcomp140.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram-s-sar.exe +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram-s-sar.pdb +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simorthoprogram.res +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\boost_filesystem-vc142-mt-x64-1_82.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\gdal.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\zlib1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libcrypto-3-x64.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libssl-3-x64.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\liblzma.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\qhull_r.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\jpeg62.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\tiff.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\geotiff.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\proj.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\sqlite3.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libcurl.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libpng16.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\lerc.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\zstd.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\gif.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\netcdf.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\hdf5_hl.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\hdf5.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libwebp.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libsharpyuv.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libpq.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\pcre2-8.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libexpat.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\libxml2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\iconv-2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\geos_c.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\geos.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\json-c.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\openjp2.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\spatialite.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\freexl-1.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\minizip.dll +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\cl.11472.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\cl.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\cl.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\copylocal.read.1u.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\copylocal.write.1u.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\link.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\link.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\link.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\rc.command.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\rc.read.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\rc.write.1.tlog +d:\estar-proj\simorthoprogram-orth_gf3-strip-master\simorthoprogram-orth_s_sar-strip\x64\release\simortho.7722b0a9.tlog\simorthoprogram-s-sar.write.1u.tlog diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe new file mode 100644 index 0000000..7045b35 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe new file mode 100644 index 0000000..80ff377 --- /dev/null +++ b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.exe.recipe @@ -0,0 +1,11 @@ + + + + + D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe + + + + + + \ No newline at end of file diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb new file mode 100644 index 0000000..934bf10 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram-S-SAR.pdb differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.log b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.log new file mode 100644 index 0000000..912d2d6 --- /dev/null +++ b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.log @@ -0,0 +1,59 @@ + baseTool.cpp + ImageMatch.cpp + interpolation.cpp + OctreeNode.cpp + RPC_Correct.cpp + simptsn.cpp + SateOrbit.cpp + SIMOrthoProgram.cpp + test_moudel.cpp +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\Half.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\BFloat16.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 baseTool.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SateOrbit.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 simptsn.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 test_moudel.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\Vcpkg\vcpkg\installed\x64-windows\include\Eigen\src\Core\arch\Default\GenericPacketMathFunctions.h(676,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 (编译源文件 ImageMatch.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 SIMOrthoProgram.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 test_moudel.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 SateOrbit.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 baseTool.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 RPC_Correct.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 simptsn.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\test_moudel.cpp(224,31): warning C4129: “R”: 不可识别的字符转义序列 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.cpp(500,18): warning C4154: 删除数组表达式;转换到提供的指针 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.cpp(942,28): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.cpp(944,47): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(469,15): warning C4101: “asfclass”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\baseTool.h(257,11): warning C4101: “res”: 未引用的局部变量 (编译源文件 ImageMatch.cpp) +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(1239,7): warning C4101: “temp_r”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(1239,15): warning C4101: “temp_c”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3170,18): warning C4101: “snr”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,17): warning C4101: “r2”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,37): warning C4101: “c3”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3170,15): warning C4101: “c”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,33): warning C4101: “c2”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3169,21): warning C4101: “r3”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3170,12): warning C4101: “r”: 未引用的局部变量 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3327,36): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3327,54): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3328,35): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3328,54): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3352,24): warning C4838: 从“int”转换到“double”需要收缩转换 +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\simptsn.cpp(3353,22): warning C4838: 从“int”转换到“double”需要收缩转换 + LINK : 已指定 /LTCG,但不需要生成代码;从链接命令行中移除 /LTCG 以提高链接器性能 + SIMOrthoProgram.vcxproj -> D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.obj b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.obj new file mode 100644 index 0000000..17450ec Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.obj differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.res b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.res new file mode 100644 index 0000000..36f26e2 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.res differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..a08de7c --- /dev/null +++ b/soilMoisture-S-SAR/baseTool/x64/Release/SIMOrthoProgram.vcxproj.FileListAbsolute.txt @@ -0,0 +1,47 @@ +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram.vcxproj.CopyComplete +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\SIMOrthoProgram-S-SAR.exe +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\concrt140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_atomic_wait.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\msvcp140_codecvt_ids.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vccorlib140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcruntime140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcruntime140_1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcamp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\vcomp140.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\boost_filesystem-vc142-mt-x64-1_82.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gdal.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zlib1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcrypto-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libssl-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\liblzma.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\qhull_r.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\jpeg62.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\tiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geotiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\proj.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\sqlite3.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcurl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libpng16.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\Lerc.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zstd.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gif.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\netcdf.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5_hl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libwebp.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libsharpyuv.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\LIBPQ.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\pcre2-8.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libexpat.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libxml2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\iconv-2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos_c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\json-c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\openjp2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\spatialite.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\freexl-1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\minizip.dll diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/SateOrbit.obj b/soilMoisture-S-SAR/baseTool/x64/Release/SateOrbit.obj new file mode 100644 index 0000000..b70006e Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/SateOrbit.obj differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/baseTool.obj b/soilMoisture-S-SAR/baseTool/x64/Release/baseTool.obj new file mode 100644 index 0000000..c3806e0 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/baseTool.obj differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll b/soilMoisture-S-SAR/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll new file mode 100644 index 0000000..f5c136f Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/boost_filesystem-vc142-mt-x64-1_82.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/concrt140.dll b/soilMoisture-S-SAR/baseTool/x64/Release/concrt140.dll new file mode 100644 index 0000000..9752449 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/concrt140.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/freexl-1.dll b/soilMoisture-S-SAR/baseTool/x64/Release/freexl-1.dll new file mode 100644 index 0000000..9145a7d Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/freexl-1.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/gdal.dll b/soilMoisture-S-SAR/baseTool/x64/Release/gdal.dll new file mode 100644 index 0000000..bda7c20 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/gdal.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/geos.dll b/soilMoisture-S-SAR/baseTool/x64/Release/geos.dll new file mode 100644 index 0000000..2edcb83 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/geos.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/geos_c.dll b/soilMoisture-S-SAR/baseTool/x64/Release/geos_c.dll new file mode 100644 index 0000000..d358b2a Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/geos_c.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/geotiff.dll b/soilMoisture-S-SAR/baseTool/x64/Release/geotiff.dll new file mode 100644 index 0000000..f513a51 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/geotiff.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/gif.dll b/soilMoisture-S-SAR/baseTool/x64/Release/gif.dll new file mode 100644 index 0000000..27fdc78 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/gif.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/hdf5.dll b/soilMoisture-S-SAR/baseTool/x64/Release/hdf5.dll new file mode 100644 index 0000000..97fd469 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/hdf5.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/hdf5_hl.dll b/soilMoisture-S-SAR/baseTool/x64/Release/hdf5_hl.dll new file mode 100644 index 0000000..7da3e86 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/hdf5_hl.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/iconv-2.dll b/soilMoisture-S-SAR/baseTool/x64/Release/iconv-2.dll new file mode 100644 index 0000000..29c175c Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/iconv-2.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/interpolation.obj b/soilMoisture-S-SAR/baseTool/x64/Release/interpolation.obj new file mode 100644 index 0000000..29cb9cc Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/interpolation.obj differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/jpeg62.dll b/soilMoisture-S-SAR/baseTool/x64/Release/jpeg62.dll new file mode 100644 index 0000000..9c1a2c0 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/jpeg62.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/json-c.dll b/soilMoisture-S-SAR/baseTool/x64/Release/json-c.dll new file mode 100644 index 0000000..abbb168 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/json-c.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/libcrypto-3-x64.dll b/soilMoisture-S-SAR/baseTool/x64/Release/libcrypto-3-x64.dll new file mode 100644 index 0000000..a0ee3e3 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/libcrypto-3-x64.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/libcurl.dll b/soilMoisture-S-SAR/baseTool/x64/Release/libcurl.dll new file mode 100644 index 0000000..647bdc6 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/libcurl.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/libexpat.dll b/soilMoisture-S-SAR/baseTool/x64/Release/libexpat.dll new file mode 100644 index 0000000..6cea742 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/libexpat.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/liblzma.dll b/soilMoisture-S-SAR/baseTool/x64/Release/liblzma.dll new file mode 100644 index 0000000..44372c5 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/liblzma.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/libpng16.dll b/soilMoisture-S-SAR/baseTool/x64/Release/libpng16.dll new file mode 100644 index 0000000..c06222a Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/libpng16.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/libsharpyuv.dll b/soilMoisture-S-SAR/baseTool/x64/Release/libsharpyuv.dll new file mode 100644 index 0000000..e6c1b52 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/libsharpyuv.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/libssl-3-x64.dll b/soilMoisture-S-SAR/baseTool/x64/Release/libssl-3-x64.dll new file mode 100644 index 0000000..4856e67 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/libssl-3-x64.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/libwebp.dll b/soilMoisture-S-SAR/baseTool/x64/Release/libwebp.dll new file mode 100644 index 0000000..e758fc8 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/libwebp.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/libxml2.dll b/soilMoisture-S-SAR/baseTool/x64/Release/libxml2.dll new file mode 100644 index 0000000..1e2599f Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/libxml2.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/minizip.dll b/soilMoisture-S-SAR/baseTool/x64/Release/minizip.dll new file mode 100644 index 0000000..44f5e99 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/minizip.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140.dll b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140.dll new file mode 100644 index 0000000..130f84a Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_1.dll b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_1.dll new file mode 100644 index 0000000..5c2f46d Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_1.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_2.dll b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_2.dll new file mode 100644 index 0000000..737b70a Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_2.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_atomic_wait.dll b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_atomic_wait.dll new file mode 100644 index 0000000..c92fcc3 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_atomic_wait.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_codecvt_ids.dll b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_codecvt_ids.dll new file mode 100644 index 0000000..9879454 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/msvcp140_codecvt_ids.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/netcdf.dll b/soilMoisture-S-SAR/baseTool/x64/Release/netcdf.dll new file mode 100644 index 0000000..e1cbbf1 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/netcdf.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/openjp2.dll b/soilMoisture-S-SAR/baseTool/x64/Release/openjp2.dll new file mode 100644 index 0000000..d6c8011 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/openjp2.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/pcre2-8.dll b/soilMoisture-S-SAR/baseTool/x64/Release/pcre2-8.dll new file mode 100644 index 0000000..d047b3c Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/pcre2-8.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/proj.db b/soilMoisture-S-SAR/baseTool/x64/Release/proj.db new file mode 100644 index 0000000..7780dbe Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/proj.db differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/proj.dll b/soilMoisture-S-SAR/baseTool/x64/Release/proj.dll new file mode 100644 index 0000000..f4f6147 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/proj.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/qhull_r.dll b/soilMoisture-S-SAR/baseTool/x64/Release/qhull_r.dll new file mode 100644 index 0000000..0267c70 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/qhull_r.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/simptsn.obj b/soilMoisture-S-SAR/baseTool/x64/Release/simptsn.obj new file mode 100644 index 0000000..7795393 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/simptsn.obj differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/spatialite.dll b/soilMoisture-S-SAR/baseTool/x64/Release/spatialite.dll new file mode 100644 index 0000000..165b6e1 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/spatialite.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/sqlite3.dll b/soilMoisture-S-SAR/baseTool/x64/Release/sqlite3.dll new file mode 100644 index 0000000..65359e2 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/sqlite3.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/test_moudel.obj b/soilMoisture-S-SAR/baseTool/x64/Release/test_moudel.obj new file mode 100644 index 0000000..d254e06 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/test_moudel.obj differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/tiff.dll b/soilMoisture-S-SAR/baseTool/x64/Release/tiff.dll new file mode 100644 index 0000000..125e94b Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/tiff.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/vc142.pdb b/soilMoisture-S-SAR/baseTool/x64/Release/vc142.pdb new file mode 100644 index 0000000..6868526 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/vc142.pdb differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/vcamp140.dll b/soilMoisture-S-SAR/baseTool/x64/Release/vcamp140.dll new file mode 100644 index 0000000..9fd7179 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/vcamp140.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/vccorlib140.dll b/soilMoisture-S-SAR/baseTool/x64/Release/vccorlib140.dll new file mode 100644 index 0000000..7194329 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/vccorlib140.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/vcomp140.dll b/soilMoisture-S-SAR/baseTool/x64/Release/vcomp140.dll new file mode 100644 index 0000000..dbad71a Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/vcomp140.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/vcpkg.applocal.log b/soilMoisture-S-SAR/baseTool/x64/Release/vcpkg.applocal.log new file mode 100644 index 0000000..fc2d884 --- /dev/null +++ b/soilMoisture-S-SAR/baseTool/x64/Release/vcpkg.applocal.log @@ -0,0 +1,35 @@ + +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\boost_filesystem-vc142-mt-x64-1_82.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gdal.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zlib1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcrypto-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libssl-3-x64.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\liblzma.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\qhull_r.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\jpeg62.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\tiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geotiff.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\proj.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\sqlite3.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libcurl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libpng16.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\Lerc.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\zstd.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\gif.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\netcdf.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5_hl.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\hdf5.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libwebp.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libsharpyuv.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\LIBPQ.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\pcre2-8.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libexpat.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\libxml2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\iconv-2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos_c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\geos.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\json-c.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\openjp2.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\spatialite.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\freexl-1.dll +D:\estar-proj\SIMOrthoProgram-Orth_GF3-Strip-master\simorthoprogram-orth_s_sar-strip\x64\Release\minizip.dll diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/vcruntime140.dll b/soilMoisture-S-SAR/baseTool/x64/Release/vcruntime140.dll new file mode 100644 index 0000000..1d6afaa Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/vcruntime140.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/vcruntime140_1.dll b/soilMoisture-S-SAR/baseTool/x64/Release/vcruntime140_1.dll new file mode 100644 index 0000000..7bf05d3 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/vcruntime140_1.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/zlib1.dll b/soilMoisture-S-SAR/baseTool/x64/Release/zlib1.dll new file mode 100644 index 0000000..e9300f6 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/zlib1.dll differ diff --git a/soilMoisture-S-SAR/baseTool/x64/Release/zstd.dll b/soilMoisture-S-SAR/baseTool/x64/Release/zstd.dll new file mode 100644 index 0000000..09c9050 Binary files /dev/null and b/soilMoisture-S-SAR/baseTool/x64/Release/zstd.dll differ diff --git a/soilMoisture-S-SAR/config.ini b/soilMoisture-S-SAR/config.ini new file mode 100644 index 0000000..8e8a2f1 --- /dev/null +++ b/soilMoisture-S-SAR/config.ini @@ -0,0 +1,23 @@ +# -*- coding: UTF-8 -*- +# 定义config分组 +[config] +######1-算法基本参数###### +target = SMC +productLevel = 5 +# 算法名称。修改临时工作区生成临时文件的名称,日志名称; +exe_name = SoilMoisture +# 开启调试模式则不删除临时工作区,True:开启调试,False:不开启调试 +debug = False + +######2-算法处理参数###### +# 影像滤波尺寸。取值范围:大于1的奇数,默认值:3 +filter_size = 3 +# 多进程最大进程数。取值范围:大于1的整数 +multiprocessing_num = 4 +# 分块尺寸大小 +block_size_config=1024 +######3-算法结果参数###### + +# 土壤水分产品值范围,超出范围的用最大值或最小值代替 +product_value_min = 0 +product_value_max = 0.4 \ No newline at end of file diff --git a/soilMoisture-S-SAR/model_meta.xml b/soilMoisture-S-SAR/model_meta.xml new file mode 100644 index 0000000..bbd953a --- /dev/null +++ b/soilMoisture-S-SAR/model_meta.xml @@ -0,0 +1,66 @@ + + + + + + + GTC + TIF + + + + nan + BSQ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
diff --git a/soilMoisture-S-SAR/product.xml b/soilMoisture-S-SAR/product.xml new file mode 100644 index 0000000..017cb13 --- /dev/null +++ b/soilMoisture-S-SAR/product.xml @@ -0,0 +1,60 @@ + + + 后向散射系数 + BackScattering + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + None + 参考产品介绍PDF + + + + + 德清 + + + + \ No newline at end of file diff --git a/soilMoisture-S-SAR/proj.db b/soilMoisture-S-SAR/proj.db new file mode 100644 index 0000000..65f08f8 Binary files /dev/null and b/soilMoisture-S-SAR/proj.db differ diff --git a/soilMoisture-S-SAR/pyinstaller.spec b/soilMoisture-S-SAR/pyinstaller.spec new file mode 100644 index 0000000..425b222 --- /dev/null +++ b/soilMoisture-S-SAR/pyinstaller.spec @@ -0,0 +1,84 @@ +# -*- mode: python ; coding: utf-8 -*- +import sys +import shutil +import os +import tarfile +sys.setrecursionlimit(5000) + +block_cipher = None + +#######begin-ǰ############## +#һtoolļ滻ǰ·µtool +# Դ +cwdpath = os.getcwd() +tool_path = '' +src = '../tool' +des = os.path.join(cwdpath, "tool") +targz_path = os.path.join(cwdpath, "tool.tar.gz") +#ļ +if os.path.exists(des): + if os.path.isdir(des): + shutil.rmtree(des) + os.makedirs(des) +#ѹ +dir = os.path.split(targz_path )[0] +if os.path.exists(dir) is False: + os.makedirs(dir) +with tarfile.open(targz_path, "w:gz") as tar: + tar.add(src, arcname=os.path.basename(src)) +#ѹ +t = tarfile.open(targz_path) +t.extractall(path=cwdpath) +#ɾʱѹ +#os.remove(targz_path) + +# +main_name = '' +for name in os.listdir(cwdpath): + if 'Main.py' in name: + main_name = name +exe_name = exe_name = main_name .split('.')[0][:-4] + '-C-SAR-V2.1' +#######end-ǰ############## + +a = Analysis(['SoilMoistureMain.py', +'./tool/algorithm/algtools/ScatteringAuxData.py', +'./tool/algorithm/algtools/CoordinateTransformation.py', +'./tool/algorithm/algtools/MetaDataHandler.py', +'./tool/algorithm/algtools/DEMJoint.py', +'./tool/algorithm/algtools/logHandler.py', +'./tool/algorithm/algtools/PreProcess.py', +'./tool/algorithm/algtools/RieveFilter.py', +'./tool/algorithm/algtools/ROIAlg.py', +'./tool/algorithm/block/blockprocess.py', +'./tool/algorithm/image/ImageHandle.py', +'./tool/algorithm/xml/AlgXmlHandle.py', +'./tool/algorithm/xml/CreatMetafile.py', +'./tool/config/ConfigeHandle.py', +'./tool/logs/logHandler.py',], + pathex=[cwdpath], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='SoilMoisture-C-SAR-V2.1.exe', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True ) diff --git a/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-05-37.log b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-05-37.log new file mode 100644 index 0000000..92a9eda --- /dev/null +++ b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-05-37.log @@ -0,0 +1,38 @@ +[04/07/2024 18:05:37] [26396] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\soilMoisture-S-SAR ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line87) +[04/07/2024 18:05:37] [26396] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line321) +[04/07/2024 18:05:37] [26396] [WARNING]- mem_free 20.0GB less than32GB ---from: AlgXmlHandle.check_run_env (AlgXmlHandle.py:Line351) +[04/07/2024 18:05:39] [26396] [INFO]- create new workspace success! ---from: SoilMoistureMain.__create_work_space (SoilMoistureMain.py:Line163) +[04/07/2024 18:06:43] [26396] [INFO]- check_source success! ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line108) +[04/07/2024 18:06:43] [26396] [INFO]- progress bar: 10% ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line109) +[04/07/2024 18:06:58] [26396] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:06:58] [26396] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:06:58] [26396] [INFO]- scope2:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:06:58] [26396] [INFO]- scope3:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:06:58] [26396] [INFO]- scope4:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:06:58] [26396] [INFO]- scope5:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:06:58] [26396] [INFO]- scope6:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:06:58] [26396] [INFO]- scope7:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:06:58] [26396] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[04/07/2024 18:06:58] [26396] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[04/07/2024 18:07:06] [26396] [INFO]- cut HH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:07:14] [26396] [INFO]- cut VV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:07:21] [26396] [INFO]- cut VH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:07:28] [26396] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:07:29] [26396] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:07:29] [26396] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:07:30] [26396] [INFO]- cut NDWI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:07:38] [26396] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:07:38] [26396] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[04/07/2024 18:07:38] [26396] [INFO]- resampling HH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:07:38] [26396] [INFO]- resampling VV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:07:39] [26396] [INFO]- resampling VH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:07:39] [26396] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:07:39] [26396] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:07:40] [26396] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:07:41] [26396] [INFO]- resampling NDWI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:07:42] [26396] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:07:42] [26396] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[04/07/2024 18:07:42] [26396] [INFO]- progress bar: 40% ---from: SoilMoistureMain.preprocess_handle (SoilMoistureMain.py:Line178) +[04/07/2024 18:07:45] [26396] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:07:45] [26396] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:07:47] [26396] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask_zero.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) diff --git a/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-08-13.log b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-08-13.log new file mode 100644 index 0000000..71e6971 --- /dev/null +++ b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-08-13.log @@ -0,0 +1,60 @@ +[04/07/2024 18:08:13] [6332] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\soilMoisture-S-SAR ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line87) +[04/07/2024 18:08:13] [6332] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line321) +[04/07/2024 18:08:13] [6332] [WARNING]- mem_free 19.0GB less than32GB ---from: AlgXmlHandle.check_run_env (AlgXmlHandle.py:Line351) +[04/07/2024 18:08:14] [6332] [INFO]- create new workspace success! ---from: SoilMoistureMain.__create_work_space (SoilMoistureMain.py:Line163) +[04/07/2024 18:09:00] [6332] [INFO]- check_source success! ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line108) +[04/07/2024 18:09:00] [6332] [INFO]- progress bar: 10% ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line109) +[04/07/2024 18:09:15] [6332] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:09:15] [6332] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:09:15] [6332] [INFO]- scope2:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:09:15] [6332] [INFO]- scope3:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:09:15] [6332] [INFO]- scope4:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:09:15] [6332] [INFO]- scope5:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:09:15] [6332] [INFO]- scope6:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:09:15] [6332] [INFO]- scope7:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:09:15] [6332] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[04/07/2024 18:09:15] [6332] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[04/07/2024 18:09:22] [6332] [INFO]- cut HH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:09:29] [6332] [INFO]- cut VV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:09:37] [6332] [INFO]- cut VH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:09:44] [6332] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:09:44] [6332] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:09:45] [6332] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:09:46] [6332] [INFO]- cut NDWI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:09:53] [6332] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:09:53] [6332] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[04/07/2024 18:09:53] [6332] [INFO]- resampling HH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:09:54] [6332] [INFO]- resampling VV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:09:54] [6332] [INFO]- resampling VH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:09:54] [6332] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:09:54] [6332] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:09:56] [6332] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:09:57] [6332] [INFO]- resampling NDWI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:09:57] [6332] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:09:57] [6332] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[04/07/2024 18:09:57] [6332] [INFO]- progress bar: 40% ---from: SoilMoistureMain.preprocess_handle (SoilMoistureMain.py:Line178) +[04/07/2024 18:10:00] [6332] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:10:01] [6332] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:10:02] [6332] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask_zero.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:10:11] [6332] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:10:11] [6332] [INFO]- create masks success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line224) +[04/07/2024 18:10:12] [6332] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:10:13] [6332] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:10:14] [6332] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:10:16] [6332] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:10:16] [6332] [INFO]- combine_mask success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line231) +[04/07/2024 18:10:17] [6332] [INFO]- cal_roi success, path: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\LocalIncidenceAngle_preprocessed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[04/07/2024 18:10:17] [6332] [INFO]- create ROI image success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line237) +[04/07/2024 18:10:17] [6332] [INFO]- progress bar: 50% ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line251) +[04/07/2024 18:10:17] [6332] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\HH_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:10:17] [6332] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\VV_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:10:17] [6332] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\VH_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:10:17] [6332] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\HV_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:12:04] [6332] [INFO]- blocking tifs success! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line277) +[04/07/2024 18:12:04] [6332] [INFO]- angle_list is None or hh_list is None or vv_list is None or vh_list is None or hv_list is None or ndwi_list is None ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line302) +[04/07/2024 18:12:04] [6332] [ERROR]- run-time error! ---from: SoilMoistureMain. (SoilMoistureMain.py:Line473) +Traceback (most recent call last): + File "D:/estar-proj/microproduct-S-SAR/soilMoisture-S-SAR/SoilMoistureMain.py", line 470, in + raise Exception('process_handle() failed!') +Exception: process_handle() failed! +[04/07/2024 18:12:06] [6332] [INFO]- running use time: 0:03:53.253113 ---from: SoilMoistureMain. (SoilMoistureMain.py:Line479) diff --git a/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-14-01.log b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-14-01.log new file mode 100644 index 0000000..e15e8d1 --- /dev/null +++ b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-14-01.log @@ -0,0 +1,60 @@ +[04/07/2024 18:14:01] [22856] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\soilMoisture-S-SAR ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line87) +[04/07/2024 18:14:01] [22856] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line321) +[04/07/2024 18:14:01] [22856] [WARNING]- mem_free 20.0GB less than32GB ---from: AlgXmlHandle.check_run_env (AlgXmlHandle.py:Line351) +[04/07/2024 18:14:01] [22856] [INFO]- create new workspace success! ---from: SoilMoistureMain.__create_work_space (SoilMoistureMain.py:Line163) +[04/07/2024 18:15:00] [22856] [INFO]- check_source success! ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line108) +[04/07/2024 18:15:00] [22856] [INFO]- progress bar: 10% ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line109) +[04/07/2024 18:15:15] [22856] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:15:15] [22856] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:15:15] [22856] [INFO]- scope2:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:15:15] [22856] [INFO]- scope3:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:15:15] [22856] [INFO]- scope4:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:15:15] [22856] [INFO]- scope5:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:15:15] [22856] [INFO]- scope6:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:15:15] [22856] [INFO]- scope7:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:15:15] [22856] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[04/07/2024 18:15:15] [22856] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[04/07/2024 18:15:23] [22856] [INFO]- cut HH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:15:30] [22856] [INFO]- cut VV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:15:37] [22856] [INFO]- cut VH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:15:45] [22856] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:15:45] [22856] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:15:46] [22856] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:15:46] [22856] [INFO]- cut NDWI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:15:54] [22856] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:15:54] [22856] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[04/07/2024 18:15:54] [22856] [INFO]- resampling HH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:15:54] [22856] [INFO]- resampling VV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:15:54] [22856] [INFO]- resampling VH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:15:54] [22856] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:15:55] [22856] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:15:56] [22856] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:15:57] [22856] [INFO]- resampling NDWI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:15:57] [22856] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:15:57] [22856] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[04/07/2024 18:15:57] [22856] [INFO]- progress bar: 40% ---from: SoilMoistureMain.preprocess_handle (SoilMoistureMain.py:Line178) +[04/07/2024 18:16:00] [22856] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:16:01] [22856] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:16:02] [22856] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask_zero.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:16:12] [22856] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:16:12] [22856] [INFO]- create masks success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line224) +[04/07/2024 18:16:13] [22856] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:16:14] [22856] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:16:15] [22856] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:16:16] [22856] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:16:16] [22856] [INFO]- combine_mask success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line231) +[04/07/2024 18:16:17] [22856] [INFO]- cal_roi success, path: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\LocalIncidenceAngle_preprocessed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[04/07/2024 18:16:17] [22856] [INFO]- create ROI image success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line237) +[04/07/2024 18:16:17] [22856] [INFO]- progress bar: 50% ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line251) +[04/07/2024 18:16:17] [22856] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\HH_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:16:17] [22856] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\VV_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:16:18] [22856] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\VH_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:16:18] [22856] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\HV_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:18:00] [22856] [INFO]- blocking tifs success! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line277) +[04/07/2024 18:18:00] [22856] [INFO]- angle_list is None or hh_list is None or vv_list is None or vh_list is None or hv_list is None or ndwi_list is None ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line297) +[04/07/2024 18:18:00] [22856] [ERROR]- run-time error! ---from: SoilMoistureMain. (SoilMoistureMain.py:Line467) +Traceback (most recent call last): + File "D:/estar-proj/microproduct-S-SAR/soilMoisture-S-SAR/SoilMoistureMain.py", line 464, in + raise Exception('process_handle() failed!') +Exception: process_handle() failed! +[04/07/2024 18:18:02] [22856] [INFO]- running use time: 0:04:00.828204 ---from: SoilMoistureMain. (SoilMoistureMain.py:Line473) diff --git a/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-20-03.log b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-20-03.log new file mode 100644 index 0000000..4255514 --- /dev/null +++ b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-07-18-20-03.log @@ -0,0 +1,53 @@ +[04/07/2024 18:20:03] [26092] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\soilMoisture-S-SAR ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line87) +[04/07/2024 18:20:03] [26092] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line321) +[04/07/2024 18:20:03] [26092] [WARNING]- mem_free 20.0GB less than32GB ---from: AlgXmlHandle.check_run_env (AlgXmlHandle.py:Line351) +[04/07/2024 18:20:03] [26092] [INFO]- create new workspace success! ---from: SoilMoistureMain.__create_work_space (SoilMoistureMain.py:Line163) +[04/07/2024 18:21:02] [26092] [INFO]- check_source success! ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line108) +[04/07/2024 18:21:02] [26092] [INFO]- progress bar: 10% ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line109) +[04/07/2024 18:21:17] [26092] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:21:17] [26092] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:21:17] [26092] [INFO]- scope2:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:21:17] [26092] [INFO]- scope3:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:21:17] [26092] [INFO]- scope4:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:21:17] [26092] [INFO]- scope5:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:21:17] [26092] [INFO]- scope6:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:21:17] [26092] [INFO]- scope7:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/07/2024 18:21:17] [26092] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[04/07/2024 18:21:17] [26092] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[04/07/2024 18:21:24] [26092] [INFO]- cut HH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:21:32] [26092] [INFO]- cut VV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:21:39] [26092] [INFO]- cut VH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:21:46] [26092] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:21:46] [26092] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:21:47] [26092] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:21:48] [26092] [INFO]- cut NDWI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:21:55] [26092] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/07/2024 18:21:55] [26092] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[04/07/2024 18:21:56] [26092] [INFO]- resampling HH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:21:56] [26092] [INFO]- resampling VV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:21:56] [26092] [INFO]- resampling VH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:21:56] [26092] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:21:57] [26092] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:21:58] [26092] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:21:59] [26092] [INFO]- resampling NDWI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:21:59] [26092] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/07/2024 18:21:59] [26092] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[04/07/2024 18:21:59] [26092] [INFO]- progress bar: 40% ---from: SoilMoistureMain.preprocess_handle (SoilMoistureMain.py:Line178) +[04/07/2024 18:22:02] [26092] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:22:03] [26092] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:22:04] [26092] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask_zero.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:22:13] [26092] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/07/2024 18:22:13] [26092] [INFO]- create masks success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line224) +[04/07/2024 18:22:14] [26092] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:22:15] [26092] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:22:17] [26092] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:22:18] [26092] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/07/2024 18:22:18] [26092] [INFO]- combine_mask success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line231) +[04/07/2024 18:22:19] [26092] [INFO]- cal_roi success, path: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\LocalIncidenceAngle_preprocessed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[04/07/2024 18:22:19] [26092] [INFO]- create ROI image success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line237) +[04/07/2024 18:22:19] [26092] [INFO]- progress bar: 50% ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line251) +[04/07/2024 18:22:19] [26092] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\HH_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:22:19] [26092] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\VV_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:22:19] [26092] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\VH_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:22:19] [26092] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\HV_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/07/2024 18:24:03] [26092] [INFO]- blocking tifs success! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line277) diff --git a/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-09-18-35.log b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-09-18-35.log new file mode 100644 index 0000000..3dd4408 --- /dev/null +++ b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-09-18-35.log @@ -0,0 +1,171 @@ +[04/08/2024 09:18:35] [24760] [INFO]- sysdir: D:\estar-proj\microproduct-S-SAR\soilMoisture-S-SAR ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line87) +[04/08/2024 09:18:35] [24760] [INFO]- init algXML succeed ---from: AlgXmlHandle.check_alg_xml (AlgXmlHandle.py:Line321) +[04/08/2024 09:18:35] [24760] [WARNING]- mem_free 19.0GB less than32GB ---from: AlgXmlHandle.check_run_env (AlgXmlHandle.py:Line351) +[04/08/2024 09:18:37] [24760] [INFO]- create new workspace success! ---from: SoilMoistureMain.__create_work_space (SoilMoistureMain.py:Line163) +[04/08/2024 09:19:40] [24760] [INFO]- check_source success! ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line108) +[04/08/2024 09:19:40] [24760] [INFO]- progress bar: 10% ---from: SoilMoistureMain.check_source (SoilMoistureMain.py:Line109) +[04/08/2024 09:19:56] [24760] [INFO]- scope0:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/08/2024 09:19:56] [24760] [INFO]- scope1:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/08/2024 09:19:56] [24760] [INFO]- scope2:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/08/2024 09:19:56] [24760] [INFO]- scope3:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/08/2024 09:19:56] [24760] [INFO]- scope4:[[113.78551651051885, 40.044486377003494], [120.21426189495888, 40.044486377003494], [113.78551651051885, 34.95723240675342], [120.21426189495888, 34.95723240675342]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/08/2024 09:19:56] [24760] [INFO]- scope5:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/08/2024 09:19:56] [24760] [INFO]- scope6:[[116.99999620180613, 39.00008856546379], [119.00000535036983, 39.00008856546379], [116.99999620180613, 36.99998958537168], [119.00000535036983, 36.99998958537168]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/08/2024 09:19:56] [24760] [INFO]- scope7:[[117.92941666666667, 37.77280555555556], [118.24280555555556, 37.77280555555556], [117.92941666666667, 37.446361111111116], [118.24280555555556, 37.446361111111116]] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line239) +[04/08/2024 09:19:56] [24760] [INFO]- scope roi :[(117.92941666666667, 37.446361111111116), (117.92941666666667, 37.77280555555556), (118.24280555555556, 37.77280555555556), (118.24280555555556, 37.446361111111116)] ---from: PreProcess.cal_intersect_shp (PreProcess.py:Line245) +[04/08/2024 09:19:56] [24760] [INFO]- create intersect shp success! ---from: PreProcess.preprocessing (PreProcess.py:Line79) +[04/08/2024 09:20:03] [24760] [INFO]- cut HH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/08/2024 09:20:11] [24760] [INFO]- cut VV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/08/2024 09:20:18] [24760] [INFO]- cut VH success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/08/2024 09:20:25] [24760] [INFO]- cut HV success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/08/2024 09:20:25] [24760] [INFO]- cut Covering success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/08/2024 09:20:26] [24760] [INFO]- cut NDVI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/08/2024 09:20:27] [24760] [INFO]- cut NDWI success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/08/2024 09:20:35] [24760] [INFO]- cut LocalIncidenceAngle success! ---from: PreProcess.cut_imgs (PreProcess.py:Line372) +[04/08/2024 09:20:35] [24760] [INFO]- cut images success! ---from: PreProcess.preprocessing (PreProcess.py:Line84) +[04/08/2024 09:20:35] [24760] [INFO]- resampling HH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/08/2024 09:20:35] [24760] [INFO]- resampling VV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/08/2024 09:20:35] [24760] [INFO]- resampling VH success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/08/2024 09:20:35] [24760] [INFO]- resampling HV success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/08/2024 09:20:36] [24760] [INFO]- resampling Covering success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/08/2024 09:20:37] [24760] [INFO]- resampling NDVI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/08/2024 09:20:38] [24760] [INFO]- resampling NDWI success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/08/2024 09:20:38] [24760] [INFO]- resampling LocalIncidenceAngle success! ---from: PreProcess.resampling_img (PreProcess.py:Line415) +[04/08/2024 09:20:38] [24760] [INFO]- preprocess_handle success! ---from: PreProcess.preprocessing (PreProcess.py:Line90) +[04/08/2024 09:20:38] [24760] [INFO]- progress bar: 40% ---from: SoilMoistureMain.preprocess_handle (SoilMoistureMain.py:Line178) +[04/08/2024 09:20:41] [24760] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\angle_nan_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/08/2024 09:20:42] [24760] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/08/2024 09:20:44] [24760] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\tif_mask_zero.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/08/2024 09:20:54] [24760] [INFO]- trans_tif2mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\ndvi_mask.tif ---from: ROIAlg.trans_tif2mask (ROIAlg.py:Line106) +[04/08/2024 09:20:54] [24760] [INFO]- create masks success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line224) +[04/08/2024 09:20:55] [24760] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/08/2024 09:20:56] [24760] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/08/2024 09:20:57] [24760] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/08/2024 09:20:58] [24760] [INFO]- combine_mask success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\bare_land_mask.tif ---from: ROIAlg.combine_mask (ROIAlg.py:Line145) +[04/08/2024 09:20:58] [24760] [INFO]- combine_mask success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line231) +[04/08/2024 09:20:59] [24760] [INFO]- cal_roi success, path: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\LocalIncidenceAngle_preprocessed.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[04/08/2024 09:20:59] [24760] [INFO]- create ROI image success! ---from: SoilMoistureMain.create_roi (SoilMoistureMain.py:Line237) +[04/08/2024 09:20:59] [24760] [INFO]- progress bar: 50% ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line251) +[04/08/2024 09:21:07] [24760] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\HH_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/08/2024 09:21:13] [24760] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\VV_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/08/2024 09:21:20] [24760] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\VH_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/08/2024 09:21:26] [24760] [INFO]- lee process finish: D:\micro\LWork\SoilMoisture\Temporary\preprocessed\HV_preprocessed.tif ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line259) +[04/08/2024 09:24:16] [24760] [INFO]- blocking tifs success! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line277) +[04/08/2024 10:34:19] [24760] [INFO]- total:110, block:0 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:20] [24760] [INFO]- total:110, block:1 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:20] [24760] [INFO]- total:110, block:2 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:20] [24760] [INFO]- total:110, block:3 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:20] [24760] [INFO]- total:110, block:4 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:20] [24760] [INFO]- total:110, block:5 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:20] [24760] [INFO]- total:110, block:6 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:20] [24760] [INFO]- total:110, block:7 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:20] [24760] [INFO]- total:110, block:8 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:21] [24760] [INFO]- total:110, block:9 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:21] [24760] [INFO]- total:110, block:10 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:21] [24760] [INFO]- total:110, block:11 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:21] [24760] [INFO]- total:110, block:12 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:21] [24760] [INFO]- total:110, block:13 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:21] [24760] [INFO]- total:110, block:14 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:21] [24760] [INFO]- total:110, block:15 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:21] [24760] [INFO]- total:110, block:16 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:21] [24760] [INFO]- total:110, block:17 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:22] [24760] [INFO]- total:110, block:18 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:22] [24760] [INFO]- total:110, block:19 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:22] [24760] [INFO]- total:110, block:20 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:22] [24760] [INFO]- total:110, block:21 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:22] [24760] [INFO]- total:110, block:22 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:22] [24760] [INFO]- total:110, block:23 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:22] [24760] [INFO]- total:110, block:24 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:23] [24760] [INFO]- total:110, block:25 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:23] [24760] [INFO]- total:110, block:26 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:23] [24760] [INFO]- total:110, block:27 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:23] [24760] [INFO]- total:110, block:28 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:24] [24760] [INFO]- total:110, block:29 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:24] [24760] [INFO]- total:110, block:30 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:24] [24760] [INFO]- total:110, block:31 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:24] [24760] [INFO]- total:110, block:32 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:24] [24760] [INFO]- total:110, block:33 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:24] [24760] [INFO]- total:110, block:34 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:24] [24760] [INFO]- total:110, block:35 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:24] [24760] [INFO]- total:110, block:36 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:25] [24760] [INFO]- total:110, block:37 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:25] [24760] [INFO]- total:110, block:38 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:25] [24760] [INFO]- total:110, block:39 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:25] [24760] [INFO]- total:110, block:40 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:25] [24760] [INFO]- total:110, block:41 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:25] [24760] [INFO]- total:110, block:42 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:25] [24760] [INFO]- total:110, block:43 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:25] [24760] [INFO]- total:110, block:44 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:25] [24760] [INFO]- total:110, block:45 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:26] [24760] [INFO]- total:110, block:46 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:26] [24760] [INFO]- total:110, block:47 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:26] [24760] [INFO]- total:110, block:48 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:26] [24760] [INFO]- total:110, block:49 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:26] [24760] [INFO]- total:110, block:50 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:26] [24760] [INFO]- total:110, block:51 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:26] [24760] [INFO]- total:110, block:52 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:26] [24760] [INFO]- total:110, block:53 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:26] [24760] [INFO]- total:110, block:54 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:27] [24760] [INFO]- total:110, block:55 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:27] [24760] [INFO]- total:110, block:56 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:27] [24760] [INFO]- total:110, block:57 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:27] [24760] [INFO]- total:110, block:58 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:27] [24760] [INFO]- total:110, block:59 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:27] [24760] [INFO]- total:110, block:60 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:27] [24760] [INFO]- total:110, block:61 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:27] [24760] [INFO]- total:110, block:62 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:27] [24760] [INFO]- total:110, block:63 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:28] [24760] [INFO]- total:110, block:64 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:28] [24760] [INFO]- total:110, block:65 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:28] [24760] [INFO]- total:110, block:66 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:28] [24760] [INFO]- total:110, block:67 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:28] [24760] [INFO]- total:110, block:68 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:28] [24760] [INFO]- total:110, block:69 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:28] [24760] [INFO]- total:110, block:70 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:28] [24760] [INFO]- total:110, block:71 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:29] [24760] [INFO]- total:110, block:72 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:29] [24760] [INFO]- total:110, block:73 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:29] [24760] [INFO]- total:110, block:74 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:29] [24760] [INFO]- total:110, block:75 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:29] [24760] [INFO]- total:110, block:76 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:29] [24760] [INFO]- total:110, block:77 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:29] [24760] [INFO]- total:110, block:78 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:29] [24760] [INFO]- total:110, block:79 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:29] [24760] [INFO]- total:110, block:80 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:30] [24760] [INFO]- total:110, block:81 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:30] [24760] [INFO]- total:110, block:82 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:30] [24760] [INFO]- total:110, block:83 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:30] [24760] [INFO]- total:110, block:84 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:30] [24760] [INFO]- total:110, block:85 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:30] [24760] [INFO]- total:110, block:86 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:30] [24760] [INFO]- total:110, block:87 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:30] [24760] [INFO]- total:110, block:88 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:30] [24760] [INFO]- total:110, block:89 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:31] [24760] [INFO]- total:110, block:90 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:31] [24760] [INFO]- total:110, block:91 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:31] [24760] [INFO]- total:110, block:92 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:31] [24760] [INFO]- total:110, block:93 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:31] [24760] [INFO]- total:110, block:94 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:31] [24760] [INFO]- total:110, block:95 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:31] [24760] [INFO]- total:110, block:96 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:31] [24760] [INFO]- total:110, block:97 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:32] [24760] [INFO]- total:110, block:98 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:32] [24760] [INFO]- total:110, block:99 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:32] [24760] [INFO]- total:110, block:100 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:32] [24760] [INFO]- total:110, block:101 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:32] [24760] [INFO]- total:110, block:102 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:32] [24760] [INFO]- total:110, block:103 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:32] [24760] [INFO]- total:110, block:104 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:32] [24760] [INFO]- total:110, block:105 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:33] [24760] [INFO]- total:110, block:106 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:33] [24760] [INFO]- total:110, block:107 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:33] [24760] [INFO]- total:110, block:108 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:33] [24760] [INFO]- total:110, block:109 calculating soil_moisture! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line358) +[04/08/2024 10:34:34] [24760] [INFO]- [, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line362) +[04/08/2024 10:34:34] [24760] [INFO]- progress bar: 80% ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line363) +[04/08/2024 10:34:40] [24760] [INFO]- cal_roi success, path: D:\micro\LWork\SoilMoisture\Temporary\processing\product\HJ2E_MYC_QPS_001752_E118.0_N37.7_20230204_SLC_AHV_L10000010458-cal-SMC.tif ---from: ROIAlg.cal_roi (ROIAlg.py:Line174) +[04/08/2024 10:34:40] [24760] [INFO]- cal soil_moisture success! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line381) +[04/08/2024 10:34:53] [24760] [INFO]- process_handle success! ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line437) +[04/08/2024 10:34:53] [24760] [INFO]- progress bar: 100% ---from: SoilMoistureMain.process_handle (SoilMoistureMain.py:Line438) +[04/08/2024 10:34:53] [24760] [INFO]- successful production of SoilMoisture products! ---from: SoilMoistureMain. (SoilMoistureMain.py:Line465) +[04/08/2024 10:34:55] [24760] [INFO]- running use time: 1:16:19.200685 ---from: SoilMoistureMain. (SoilMoistureMain.py:Line473) diff --git a/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-10-34-17.log b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-10-34-17.log new file mode 100644 index 0000000..e69de29 diff --git a/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-10-34-18.log b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-10-34-18.log new file mode 100644 index 0000000..e69de29 diff --git a/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-10-34-20.log b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-10-34-20.log new file mode 100644 index 0000000..e69de29 diff --git a/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-10-34-22.log b/soilMoisture-S-SAR/run_log/SoilMoisture2024-04-08-10-34-22.log new file mode 100644 index 0000000..e69de29 diff --git a/soilMoisture-S-SAR/soilMoisture_env.yaml b/soilMoisture-S-SAR/soilMoisture_env.yaml new file mode 100644 index 0000000..eb816d4 Binary files /dev/null and b/soilMoisture-S-SAR/soilMoisture_env.yaml differ diff --git a/soilMoisture-S-SAR/打包步骤.txt b/soilMoisture-S-SAR/打包步骤.txt new file mode 100644 index 0000000..b70ad92 --- /dev/null +++ b/soilMoisture-S-SAR/打包步骤.txt @@ -0,0 +1,14 @@ +ļ¼Ϊexe +һanaconda ˮлpycahrmնˣ +ڶcdsoilMoisture_c_sarļ +cd .\soilMoisture_c_sar +д +pyinstaller -D pyinstaller.spec +IJconfig.ini,model_meta.xml,proj.db distļУɾbuildʱļС +岽ɵsoilMoisture_c_sar.exedistļ,exeԳǷУ +distļеĿ¼distļиΪгơ + +οӣhttps://www.jb51.net/article/187806.htm + + +pyinstaller -F --add-data "D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml;./dask" --add-data "D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml;./distributed" --hidden-import pyproj._compat VegetationPhenologyMain.py \ No newline at end of file diff --git a/tool/LAI/LAIProcess.cp38-win_amd64.pyd b/tool/LAI/LAIProcess.cp38-win_amd64.pyd new file mode 100644 index 0000000..bc5375e Binary files /dev/null and b/tool/LAI/LAIProcess.cp38-win_amd64.pyd differ diff --git a/tool/LAI/LAIProcess.pyx b/tool/LAI/LAIProcess.pyx new file mode 100644 index 0000000..a445ffd --- /dev/null +++ b/tool/LAI/LAIProcess.pyx @@ -0,0 +1,166 @@ +# +# 模型计算的库 +# +import cython +cimport cython # 必须导入 +import numpy as np +cimport numpy as np +from libc.math cimport pi +from scipy.optimize import leastsq +import random +import logging +logger = logging.getLogger("mylog") + + +def WMCModel(param_arr,sample_lai,sample_soil,sample_inc,sample_sigma): + """ WMC模型 增加 归一化植被指数 + + Args: + param_arr (np.ndarray): 参数数组 + sample_lai (double): 叶面积指数 + sample_soil (double): 土壤含水量 + sample_inc (double): 入射角(弧度值) + sample_sigma (double): 后向散射系数(线性值) + + Returns: + double: 方程值 + """ + # 映射参数,方便修改模型 + A,B,C,D,M,N=param_arr # 在这里修改模型 + V_lai=sample_lai + #V_lai=E*sample_lai+F + exp_gamma=np.exp(-2*B*((V_lai*D+C))*(1/np.cos(sample_inc))) + sigma_soil=M*sample_soil+N + sigma_veg=A*((V_lai))*np.cos(sample_inc) + f_veg=1 + result=sigma_veg*(1-exp_gamma)+sigma_soil*exp_gamma-sample_sigma + return result + + + + +def train_WMCmodel(lai_water_inc_sigma_list,params_X0,train_err_image_path,draw_flag=True): + """ 训练模型参数 + + Args: + lai_waiter_inc_sigma_list (list): 训练模型使用的样本呢 + """ + def f(X): + eqs=[] + for lai_water_inc_sigma_item in lai_water_inc_sigma_list: + sample_lai=lai_water_inc_sigma_item[4] + sample_sigma=lai_water_inc_sigma_item[5] # 5: csv_sigma, 8:tiff_sigma + sample_soil=lai_water_inc_sigma_item[6] + sample_inc=lai_water_inc_sigma_item[7] + FVC=lai_water_inc_sigma_item[8] + eqs.append(WMCModel(X,sample_lai,sample_soil,sample_inc,sample_sigma)) + return eqs + + X0 = params_X0 # 初始值 + # logger.info(str(X0)) + h = leastsq(f, X0) + # logger.info(h[0],h[1]) + err_f=f(h[0]) + x_arr=[lai_waiter_inc_sigma_item[4] for lai_waiter_inc_sigma_item in lai_water_inc_sigma_list] + # 根据误差大小进行排序 + # logger.info("训练集:\n根据误差输出点序\n数量:{}\n点序\t误差值\t 样点信息".format(str(np.array(err_f).shape))) + # for i in np.argsort(np.array(err_f)): + # logger.info('{}\t{}\t{}'.format(i,err_f[i],str(lai_water_inc_sigma_list[i]))) + # logger.info("\n误差点序输出结束\n") + + if draw_flag: + # logger.info(err_f) + # logger.info(np.where(np.abs(err_f)<10)) + from matplotlib import pyplot as plt + plt.scatter(x_arr,err_f) + plt.title("equation-err") + plt.savefig(train_err_image_path,dpi=600) + plt.show() + + return h[0] + +def test_WMCModel(lai_waiter_inc_sigma_list,param_arr,lai_X0,test_err_image_path,draw_flag=True): + """ 测试模型训练结果 + + Args: + lai_waiter_inc_sigma_list (list): 测试使用的样本集 + A (_type_): 参数A + B (_type_): 参数B + C (_type_): 参数C + D (_type_): 参数D + M (_type_): 参数M + N (_type_): 参数N + lai_X0 (_type_): 初始值 + + Returns: + list: 误差列表 [sample_lai,err,predict] + """ + err=[] + err_f=[] + x_arr=[] + err_lai=[] + for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: + sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item + def f(X): + lai=X[0] + eqs=[WMCModel(param_arr,lai,sample_soil,sample_inc,csv_sigma)] + return eqs + X0=lai_X0 + h = leastsq(f, X0) + temp_err=h[0]-sample_lai + err_lai.append(temp_err[0]) # lai预测的插值 + err.append([sample_lai,temp_err[0],h[0][0],sample_code]) + err_f.append(f(h[0])[0]) # 方程差 + x_arr.append(sample_lai) + + # 根据误差大小进行排序 + # logger.info("测试集:\n根据误差输出点序\n数量:{}\n点序\t误差值\t 方程差\t样点信息".format(str(np.array(err_lai).shape))) + # for i in np.argsort(np.array(err_lai)): + # logger.info('{}\t{}\t{}\t{}'.format(i,err_lai[i],err_f[i],str(lai_waiter_inc_sigma_list[i]))) + # logger.info("\n误差点序输出结束\n") + + if draw_flag: + from matplotlib import pyplot as plt + plt.scatter(x_arr,err_lai) + plt.title("equation-err") + plt.savefig(test_err_image_path,dpi=600) + plt.show() + return err + +def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): + + if(sigma<0 ): + return np.nan + def f(X): + lai=X[0] + eqs=[WMCModel(param_arr,lai,soil_water,inc_angle,sigma )] + return eqs + h = leastsq(f, [lai_X0]) + + return h[0][0] + +# Cython 的扩展地址 +cpdef np.ndarray[double,ndim=2] process_tiff(np.ndarray[double,ndim=2] sigma_tiff, + np.ndarray[double,ndim=2] inc_tiff, + np.ndarray[double,ndim=2] soil_water_tiff, + np.ndarray[double,ndim=1] param_arr, + double lai_X0): + + cdef np.ndarray[double,ndim=2] result=sigma_tiff + cdef int param_arr_length=param_arr.shape[0] + cdef int height=sigma_tiff.shape[0] + cdef int width=sigma_tiff.shape[1] + cdef int i=0 + cdef int j=0 + cdef double temp=0 + + while i=0 else np.nan + result[i,j]=temp + j=j+1 + i=i+1 + return result + \ No newline at end of file diff --git a/tool/LAI/build/LAIProcess.c b/tool/LAI/build/LAIProcess.c new file mode 100644 index 0000000..eb1f143 --- /dev/null +++ b/tool/LAI/build/LAIProcess.c @@ -0,0 +1,11637 @@ +/* Generated by Cython 0.29.24 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "LAIProcess", + "sources": [ + "./LAIProcess.pyx" + ] + }, + "module_name": "LAIProcess" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_24" +#define CYTHON_HEX_VERSION 0x001D18F0 +#define CYTHON_FUTURE_DIVISION 0 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #if defined(PyUnicode_IS_READY) + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #else + #define __Pyx_PyUnicode_READY(op) (0) + #endif + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__LAIProcess +#define __PYX_HAVE_API__LAIProcess +/* Early includes */ +#include +#include +#include "numpy/arrayobject.h" +#include "numpy/ndarrayobject.h" +#include "numpy/ndarraytypes.h" +#include "numpy/arrayscalars.h" +#include "numpy/ufuncobject.h" + + /* NumPy API declarations from "numpy/__init__.pxd" */ + +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + +/* Header.proto */ +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include + #else + #include + #endif +#endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + + +static const char *__pyx_f[] = { + "LAIProcess.pyx", + "__init__.pxd", + "type.pxd", +}; +/* BufferFormatStructs.proto */ +#define IS_UNSIGNED(type) (((type) -1) > 0) +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; + struct __Pyx_StructField_* fields; + size_t size; + size_t arraysize[8]; + int ndim; + char typegroup; + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":690 + * # in Cython to enable them only on the right systems. + * + * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + */ +typedef npy_int8 __pyx_t_5numpy_int8_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":691 + * + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t + */ +typedef npy_int16 __pyx_t_5numpy_int16_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":692 + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< + * ctypedef npy_int64 int64_t + * #ctypedef npy_int96 int96_t + */ +typedef npy_int32 __pyx_t_5numpy_int32_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":693 + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< + * #ctypedef npy_int96 int96_t + * #ctypedef npy_int128 int128_t + */ +typedef npy_int64 __pyx_t_5numpy_int64_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":697 + * #ctypedef npy_int128 int128_t + * + * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + */ +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":698 + * + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t + */ +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":699 + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< + * ctypedef npy_uint64 uint64_t + * #ctypedef npy_uint96 uint96_t + */ +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":700 + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< + * #ctypedef npy_uint96 uint96_t + * #ctypedef npy_uint128 uint128_t + */ +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":704 + * #ctypedef npy_uint128 uint128_t + * + * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< + * ctypedef npy_float64 float64_t + * #ctypedef npy_float80 float80_t + */ +typedef npy_float32 __pyx_t_5numpy_float32_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":705 + * + * ctypedef npy_float32 float32_t + * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< + * #ctypedef npy_float80 float80_t + * #ctypedef npy_float128 float128_t + */ +typedef npy_float64 __pyx_t_5numpy_float64_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":714 + * # The int types are mapped a bit surprising -- + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t + */ +typedef npy_long __pyx_t_5numpy_int_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":715 + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong longlong_t + * + */ +typedef npy_longlong __pyx_t_5numpy_long_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":716 + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_ulong uint_t + */ +typedef npy_longlong __pyx_t_5numpy_longlong_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":718 + * ctypedef npy_longlong longlong_t + * + * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t + */ +typedef npy_ulong __pyx_t_5numpy_uint_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":719 + * + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulonglong_t + * + */ +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":720 + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_intp intp_t + */ +typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":722 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< + * ctypedef npy_uintp uintp_t + * + */ +typedef npy_intp __pyx_t_5numpy_intp_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":723 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< + * + * ctypedef npy_double float_t + */ +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":725 + * ctypedef npy_uintp uintp_t + * + * ctypedef npy_double float_t # <<<<<<<<<<<<<< + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t + */ +typedef npy_double __pyx_t_5numpy_float_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":726 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< + * ctypedef npy_longdouble longdouble_t + * + */ +typedef npy_double __pyx_t_5numpy_double_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":727 + * ctypedef npy_double float_t + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cfloat cfloat_t + */ +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + + +/*--- Type declarations ---*/ +struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel; +struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel; +struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":729 + * ctypedef npy_longdouble longdouble_t + * + * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t + */ +typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":730 + * + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< + * ctypedef npy_clongdouble clongdouble_t + * + */ +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":731 + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cdouble complex_t + */ +typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":733 + * ctypedef npy_clongdouble clongdouble_t + * + * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew1(a): + */ +typedef npy_cdouble __pyx_t_5numpy_complex_t; + +/* "LAIProcess.pyx":42 + * + * + * def train_WMCmodel(lai_water_inc_sigma_list,params_X0,train_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ +struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel { + PyObject_HEAD + PyObject *__pyx_v_lai_water_inc_sigma_list; +}; + + +/* "LAIProcess.pyx":82 + * return h[0] + * + * def test_WMCModel(lai_waiter_inc_sigma_list,param_arr,lai_X0,test_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ +struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel { + PyObject_HEAD + PyObject *__pyx_v_csv_sigma; + PyObject *__pyx_v_param_arr; + PyObject *__pyx_v_sample_inc; + PyObject *__pyx_v_sample_soil; +}; + + +/* "LAIProcess.pyx":130 + * return err + * + * def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): # <<<<<<<<<<<<<< + * + * if(sigma<0 ): + */ +struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel { + PyObject_HEAD + PyObject *__pyx_v_inc_angle; + PyObject *__pyx_v_param_arr; + PyObject *__pyx_v_sigma; + PyObject *__pyx_v_soil_water; +}; + + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyInt_SubtractCObj(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* None.proto */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* ListAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED 1 +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { + PyCFunctionObject func; +#if PY_VERSION_HEX < 0x030500A0 + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; + PyObject *func_classobj; + void *defaults; + int defaults_pyobjects; + size_t defaults_size; // used by FusedFunction for copying defaults + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; +} __pyx_CyFunctionObject; +static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *self, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, + size_t size, + int pyobjects); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(void); + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* PyObjectCallNoArg.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#endif + +/* IsLittleEndian.proto */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); + +/* BufferFormatCheck.proto */ +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type); + +/* BufferGetAndValidate.proto */ +#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\ + ((obj == Py_None || obj == NULL) ?\ + (__Pyx_ZeroBuffer(buf), 0) :\ + __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)) +static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj, + __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); +static void __Pyx_ZeroBuffer(Py_buffer* buf); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); +static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 }; +static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + +/* BufferIndexError.proto */ +static void __Pyx_RaiseBufferIndexError(int axis); + +#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* IncludeStringH.proto */ +#include + +/* PyObject_GenericGetAttrNoDict.proto */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr +#endif + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* BufferStructDeclare.proto */ +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +#if PY_MAJOR_VERSION < 3 + static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); + static void __Pyx_ReleaseBuffer(Py_buffer *view); +#else + #define __Pyx_GetBuffer PyObject_GetBuffer + #define __Pyx_ReleaseBuffer PyBuffer_Release +#endif + + +/* GCCDiagnostics.proto */ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* RealImag.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif +#if defined(__cplusplus) && CYTHON_CCOMPLEX\ + && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_float(a, b) ((a)==(b)) + #define __Pyx_c_sum_float(a, b) ((a)+(b)) + #define __Pyx_c_diff_float(a, b) ((a)-(b)) + #define __Pyx_c_prod_float(a, b) ((a)*(b)) + #define __Pyx_c_quot_float(a, b) ((a)/(b)) + #define __Pyx_c_neg_float(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_float(z) ((z)==(float)0) + #define __Pyx_c_conj_float(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_float(z) (::std::abs(z)) + #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_float(z) ((z)==0) + #define __Pyx_c_conj_float(z) (conjf(z)) + #if 1 + #define __Pyx_c_abs_float(z) (cabsf(z)) + #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_double(a, b) ((a)==(b)) + #define __Pyx_c_sum_double(a, b) ((a)+(b)) + #define __Pyx_c_diff_double(a, b) ((a)-(b)) + #define __Pyx_c_prod_double(a, b) ((a)*(b)) + #define __Pyx_c_quot_double(a, b) ((a)/(b)) + #define __Pyx_c_neg_double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_double(z) ((z)==(double)0) + #define __Pyx_c_conj_double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (::std::abs(z)) + #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_double(z) ((z)==0) + #define __Pyx_c_conj_double(z) (conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (cabs(z)) + #define __Pyx_c_pow_double(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + + +/* Module declarations from 'cython' */ + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libc.stdio' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.type' */ +static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; + +/* Module declarations from 'cpython' */ + +/* Module declarations from 'cpython.object' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'cpython.mem' */ + +/* Module declarations from 'numpy' */ + +/* Module declarations from 'numpy' */ +static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; +static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; +static PyTypeObject *__pyx_ptype_5numpy_generic = 0; +static PyTypeObject *__pyx_ptype_5numpy_number = 0; +static PyTypeObject *__pyx_ptype_5numpy_integer = 0; +static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; +static PyTypeObject *__pyx_ptype_5numpy_floating = 0; +static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; +static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; +static PyTypeObject *__pyx_ptype_5numpy_character = 0; +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; + +/* Module declarations from 'libc.math' */ + +/* Module declarations from 'LAIProcess' */ +static PyTypeObject *__pyx_ptype_10LAIProcess___pyx_scope_struct__train_WMCmodel = 0; +static PyTypeObject *__pyx_ptype_10LAIProcess___pyx_scope_struct_1_test_WMCModel = 0; +static PyTypeObject *__pyx_ptype_10LAIProcess___pyx_scope_struct_2_processs_WMCModel = 0; +static PyArrayObject *__pyx_f_10LAIProcess_process_tiff(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, double, int __pyx_skip_dispatch); /*proto*/ +static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 }; +#define __Pyx_MODULE_NAME "LAIProcess" +extern int __pyx_module_is_main_LAIProcess; +int __pyx_module_is_main_LAIProcess = 0; + +/* Implementation of 'LAIProcess' */ +static PyObject *__pyx_builtin_ImportError; +static const char __pyx_k_A[] = "A"; +static const char __pyx_k_B[] = "B"; +static const char __pyx_k_C[] = "C"; +static const char __pyx_k_D[] = "D"; +static const char __pyx_k_M[] = "M"; +static const char __pyx_k_N[] = "N"; +static const char __pyx_k_X[] = "X"; +static const char __pyx_k_f[] = "f"; +static const char __pyx_k_h[] = "h"; +static const char __pyx_k_X0[] = "X0"; +static const char __pyx_k_np[] = "np"; +static const char __pyx_k_FVC[] = "FVC"; +static const char __pyx_k_cos[] = "cos"; +static const char __pyx_k_dpi[] = "dpi"; +static const char __pyx_k_eqs[] = "eqs"; +static const char __pyx_k_err[] = "err"; +static const char __pyx_k_exp[] = "exp"; +static const char __pyx_k_lai[] = "lai"; +static const char __pyx_k_nan[] = "nan"; +static const char __pyx_k_plt[] = "plt"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_show[] = "show"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_V_lai[] = "V_lai"; +static const char __pyx_k_err_f[] = "err_f"; +static const char __pyx_k_f_veg[] = "f_veg"; +static const char __pyx_k_mylog[] = "mylog"; +static const char __pyx_k_numpy[] = "numpy"; +static const char __pyx_k_sigma[] = "sigma"; +static const char __pyx_k_title[] = "title"; +static const char __pyx_k_x_arr[] = "x_arr"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_lai_X0[] = "lai_X0"; +static const char __pyx_k_logger[] = "logger"; +static const char __pyx_k_pyplot[] = "pyplot"; +static const char __pyx_k_random[] = "random"; +static const char __pyx_k_result[] = "result"; +static const char __pyx_k_err_lai[] = "err_lai"; +static const char __pyx_k_leastsq[] = "leastsq"; +static const char __pyx_k_logging[] = "logging"; +static const char __pyx_k_savefig[] = "savefig"; +static const char __pyx_k_scatter[] = "scatter"; +static const char __pyx_k_WMCModel[] = "WMCModel"; +static const char __pyx_k_inc_tiff[] = "inc_tiff"; +static const char __pyx_k_temp_err[] = "temp_err"; +static const char __pyx_k_csv_sigma[] = "csv_sigma"; +static const char __pyx_k_draw_flag[] = "draw_flag"; +static const char __pyx_k_exp_gamma[] = "exp_gamma"; +static const char __pyx_k_getLogger[] = "getLogger"; +static const char __pyx_k_inc_angle[] = "inc_angle"; +static const char __pyx_k_param_arr[] = "param_arr"; +static const char __pyx_k_params_X0[] = "params_X0"; +static const char __pyx_k_sigma_veg[] = "sigma_veg"; +static const char __pyx_k_LAIProcess[] = "LAIProcess"; +static const char __pyx_k_matplotlib[] = "matplotlib"; +static const char __pyx_k_sample_inc[] = "sample_inc"; +static const char __pyx_k_sample_lai[] = "sample_lai"; +static const char __pyx_k_sample_lat[] = "sample_lat"; +static const char __pyx_k_sample_lon[] = "sample_lon"; +static const char __pyx_k_sigma_soil[] = "sigma_soil"; +static const char __pyx_k_sigma_tiff[] = "sigma_tiff"; +static const char __pyx_k_soil_water[] = "soil_water"; +static const char __pyx_k_ImportError[] = "ImportError"; +static const char __pyx_k_sample_code[] = "sample_code"; +static const char __pyx_k_sample_soil[] = "sample_soil"; +static const char __pyx_k_sample_time[] = "sample_time"; +static const char __pyx_k_equation_err[] = "equation-err"; +static const char __pyx_k_sample_sigma[] = "sample_sigma"; +static const char __pyx_k_test_WMCModel[] = "test_WMCModel"; +static const char __pyx_k_LAIProcess_pyx[] = "LAIProcess.pyx"; +static const char __pyx_k_scipy_optimize[] = "scipy.optimize"; +static const char __pyx_k_train_WMCmodel[] = "train_WMCmodel"; +static const char __pyx_k_soil_water_tiff[] = "soil_water_tiff"; +static const char __pyx_k_processs_WMCModel[] = "processs_WMCModel"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_test_err_image_path[] = "test_err_image_path"; +static const char __pyx_k_train_err_image_path[] = "train_err_image_path"; +static const char __pyx_k_test_WMCModel_locals_f[] = "test_WMCModel..f"; +static const char __pyx_k_train_WMCmodel_locals_f[] = "train_WMCmodel..f"; +static const char __pyx_k_lai_water_inc_sigma_item[] = "lai_water_inc_sigma_item"; +static const char __pyx_k_lai_water_inc_sigma_list[] = "lai_water_inc_sigma_list"; +static const char __pyx_k_lai_waiter_inc_sigma_item[] = "lai_waiter_inc_sigma_item"; +static const char __pyx_k_lai_waiter_inc_sigma_list[] = "lai_waiter_inc_sigma_list"; +static const char __pyx_k_processs_WMCModel_locals_f[] = "processs_WMCModel..f"; +static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; +static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static PyObject *__pyx_n_s_A; +static PyObject *__pyx_n_s_B; +static PyObject *__pyx_n_s_C; +static PyObject *__pyx_n_s_D; +static PyObject *__pyx_n_s_FVC; +static PyObject *__pyx_n_s_ImportError; +static PyObject *__pyx_n_s_LAIProcess; +static PyObject *__pyx_kp_s_LAIProcess_pyx; +static PyObject *__pyx_n_s_M; +static PyObject *__pyx_n_s_N; +static PyObject *__pyx_n_s_V_lai; +static PyObject *__pyx_n_s_WMCModel; +static PyObject *__pyx_n_s_X; +static PyObject *__pyx_n_s_X0; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_s_cos; +static PyObject *__pyx_n_s_csv_sigma; +static PyObject *__pyx_n_s_dpi; +static PyObject *__pyx_n_s_draw_flag; +static PyObject *__pyx_n_s_eqs; +static PyObject *__pyx_kp_s_equation_err; +static PyObject *__pyx_n_s_err; +static PyObject *__pyx_n_s_err_f; +static PyObject *__pyx_n_s_err_lai; +static PyObject *__pyx_n_s_exp; +static PyObject *__pyx_n_s_exp_gamma; +static PyObject *__pyx_n_s_f; +static PyObject *__pyx_n_s_f_veg; +static PyObject *__pyx_n_s_getLogger; +static PyObject *__pyx_n_s_h; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_inc_angle; +static PyObject *__pyx_n_s_inc_tiff; +static PyObject *__pyx_n_s_lai; +static PyObject *__pyx_n_s_lai_X0; +static PyObject *__pyx_n_s_lai_waiter_inc_sigma_item; +static PyObject *__pyx_n_s_lai_waiter_inc_sigma_list; +static PyObject *__pyx_n_s_lai_water_inc_sigma_item; +static PyObject *__pyx_n_s_lai_water_inc_sigma_list; +static PyObject *__pyx_n_s_leastsq; +static PyObject *__pyx_n_s_logger; +static PyObject *__pyx_n_s_logging; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_matplotlib; +static PyObject *__pyx_n_s_mylog; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_nan; +static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_s_numpy; +static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; +static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; +static PyObject *__pyx_n_s_param_arr; +static PyObject *__pyx_n_s_params_X0; +static PyObject *__pyx_n_s_plt; +static PyObject *__pyx_n_s_processs_WMCModel; +static PyObject *__pyx_n_s_processs_WMCModel_locals_f; +static PyObject *__pyx_n_s_pyplot; +static PyObject *__pyx_n_s_random; +static PyObject *__pyx_n_s_result; +static PyObject *__pyx_n_s_sample_code; +static PyObject *__pyx_n_s_sample_inc; +static PyObject *__pyx_n_s_sample_lai; +static PyObject *__pyx_n_s_sample_lat; +static PyObject *__pyx_n_s_sample_lon; +static PyObject *__pyx_n_s_sample_sigma; +static PyObject *__pyx_n_s_sample_soil; +static PyObject *__pyx_n_s_sample_time; +static PyObject *__pyx_n_s_savefig; +static PyObject *__pyx_n_s_scatter; +static PyObject *__pyx_n_s_scipy_optimize; +static PyObject *__pyx_n_s_show; +static PyObject *__pyx_n_s_sigma; +static PyObject *__pyx_n_s_sigma_soil; +static PyObject *__pyx_n_s_sigma_tiff; +static PyObject *__pyx_n_s_sigma_veg; +static PyObject *__pyx_n_s_soil_water; +static PyObject *__pyx_n_s_soil_water_tiff; +static PyObject *__pyx_n_s_temp_err; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_test_WMCModel; +static PyObject *__pyx_n_s_test_WMCModel_locals_f; +static PyObject *__pyx_n_s_test_err_image_path; +static PyObject *__pyx_n_s_title; +static PyObject *__pyx_n_s_train_WMCmodel; +static PyObject *__pyx_n_s_train_WMCmodel_locals_f; +static PyObject *__pyx_n_s_train_err_image_path; +static PyObject *__pyx_n_s_x_arr; +static PyObject *__pyx_pf_10LAIProcess_WMCModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_param_arr, PyObject *__pyx_v_sample_lai, PyObject *__pyx_v_sample_soil, PyObject *__pyx_v_sample_inc, PyObject *__pyx_v_sample_sigma); /* proto */ +static PyObject *__pyx_pf_10LAIProcess_14train_WMCmodel_f(PyObject *__pyx_self, PyObject *__pyx_v_X); /* proto */ +static PyObject *__pyx_pf_10LAIProcess_2train_WMCmodel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lai_water_inc_sigma_list, PyObject *__pyx_v_params_X0, PyObject *__pyx_v_train_err_image_path, PyObject *__pyx_v_draw_flag); /* proto */ +static PyObject *__pyx_pf_10LAIProcess_13test_WMCModel_f(PyObject *__pyx_self, PyObject *__pyx_v_X); /* proto */ +static PyObject *__pyx_pf_10LAIProcess_4test_WMCModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lai_waiter_inc_sigma_list, PyObject *__pyx_v_param_arr, PyObject *__pyx_v_lai_X0, PyObject *__pyx_v_test_err_image_path, PyObject *__pyx_v_draw_flag); /* proto */ +static PyObject *__pyx_pf_10LAIProcess_17processs_WMCModel_f(PyObject *__pyx_self, PyObject *__pyx_v_X); /* proto */ +static PyObject *__pyx_pf_10LAIProcess_6processs_WMCModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_param_arr, PyObject *__pyx_v_lai_X0, PyObject *__pyx_v_sigma, PyObject *__pyx_v_inc_angle, PyObject *__pyx_v_soil_water); /* proto */ +static PyObject *__pyx_pf_10LAIProcess_8process_tiff(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_sigma_tiff, PyArrayObject *__pyx_v_inc_tiff, PyArrayObject *__pyx_v_soil_water_tiff, PyArrayObject *__pyx_v_param_arr, double __pyx_v_lai_X0); /* proto */ +static PyObject *__pyx_tp_new_10LAIProcess___pyx_scope_struct__train_WMCmodel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10LAIProcess___pyx_scope_struct_1_test_WMCModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10LAIProcess___pyx_scope_struct_2_processs_WMCModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_600; +static PyObject *__pyx_int_neg_2; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__5; +static PyObject *__pyx_tuple__7; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_tuple__9; +static PyObject *__pyx_tuple__10; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__16; +static PyObject *__pyx_codeobj__2; +static PyObject *__pyx_codeobj__4; +static PyObject *__pyx_codeobj__6; +static PyObject *__pyx_codeobj__11; +static PyObject *__pyx_codeobj__13; +static PyObject *__pyx_codeobj__15; +static PyObject *__pyx_codeobj__17; +/* Late includes */ + +/* "LAIProcess.pyx":15 + * + * + * def WMCModel(param_arr,sample_lai,sample_soil,sample_inc,sample_sigma): # <<<<<<<<<<<<<< + * """ WMC + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10LAIProcess_1WMCModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_10LAIProcess_WMCModel[] = " WMC\346\250\241\345\236\213 \345\242\236\345\212\240 \345\275\222\344\270\200\345\214\226\346\244\215\350\242\253\346\214\207\346\225\260\n\n Args:\n param_arr (np.ndarray): \345\217\202\346\225\260\346\225\260\347\273\204\n sample_lai (double): \345\217\266\351\235\242\347\247\257\346\214\207\346\225\260\n sample_soil (double): \345\234\237\345\243\244\345\220\253\346\260\264\351\207\217\n sample_inc (double): \345\205\245\345\260\204\350\247\222\357\274\210\345\274\247\345\272\246\345\200\274\357\274\211\n sample_sigma (double): \345\220\216\345\220\221\346\225\243\345\260\204\347\263\273\346\225\260\357\274\210\347\272\277\346\200\247\345\200\274\357\274\211\n\n Returns:\n double: \346\226\271\347\250\213\345\200\274\n "; +static PyMethodDef __pyx_mdef_10LAIProcess_1WMCModel = {"WMCModel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10LAIProcess_1WMCModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10LAIProcess_WMCModel}; +static PyObject *__pyx_pw_10LAIProcess_1WMCModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_param_arr = 0; + PyObject *__pyx_v_sample_lai = 0; + PyObject *__pyx_v_sample_soil = 0; + PyObject *__pyx_v_sample_inc = 0; + PyObject *__pyx_v_sample_sigma = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("WMCModel (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_param_arr,&__pyx_n_s_sample_lai,&__pyx_n_s_sample_soil,&__pyx_n_s_sample_inc,&__pyx_n_s_sample_sigma,0}; + PyObject* values[5] = {0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_param_arr)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sample_lai)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("WMCModel", 1, 5, 5, 1); __PYX_ERR(0, 15, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sample_soil)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("WMCModel", 1, 5, 5, 2); __PYX_ERR(0, 15, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sample_inc)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("WMCModel", 1, 5, 5, 3); __PYX_ERR(0, 15, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sample_sigma)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("WMCModel", 1, 5, 5, 4); __PYX_ERR(0, 15, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "WMCModel") < 0)) __PYX_ERR(0, 15, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_param_arr = values[0]; + __pyx_v_sample_lai = values[1]; + __pyx_v_sample_soil = values[2]; + __pyx_v_sample_inc = values[3]; + __pyx_v_sample_sigma = values[4]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("WMCModel", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 15, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("LAIProcess.WMCModel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10LAIProcess_WMCModel(__pyx_self, __pyx_v_param_arr, __pyx_v_sample_lai, __pyx_v_sample_soil, __pyx_v_sample_inc, __pyx_v_sample_sigma); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10LAIProcess_WMCModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_param_arr, PyObject *__pyx_v_sample_lai, PyObject *__pyx_v_sample_soil, PyObject *__pyx_v_sample_inc, PyObject *__pyx_v_sample_sigma) { + PyObject *__pyx_v_A = NULL; + PyObject *__pyx_v_B = NULL; + PyObject *__pyx_v_C = NULL; + PyObject *__pyx_v_D = NULL; + PyObject *__pyx_v_M = NULL; + PyObject *__pyx_v_N = NULL; + PyObject *__pyx_v_V_lai = NULL; + PyObject *__pyx_v_exp_gamma = NULL; + PyObject *__pyx_v_sigma_soil = NULL; + PyObject *__pyx_v_sigma_veg = NULL; + CYTHON_UNUSED long __pyx_v_f_veg; + PyObject *__pyx_v_result = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("WMCModel", 0); + + /* "LAIProcess.pyx":29 + * """ + * # + * A,B,C,D,M,N=param_arr # # <<<<<<<<<<<<<< + * V_lai=sample_lai + * #V_lai=E*sample_lai+F + */ + if ((likely(PyTuple_CheckExact(__pyx_v_param_arr))) || (PyList_CheckExact(__pyx_v_param_arr))) { + PyObject* sequence = __pyx_v_param_arr; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 6)) { + if (size > 6) __Pyx_RaiseTooManyValuesError(6); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 29, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 4); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 5); + } else { + __pyx_t_1 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + __pyx_t_3 = PyList_GET_ITEM(sequence, 2); + __pyx_t_4 = PyList_GET_ITEM(sequence, 3); + __pyx_t_5 = PyList_GET_ITEM(sequence, 4); + __pyx_t_6 = PyList_GET_ITEM(sequence, 5); + } + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + #else + { + Py_ssize_t i; + PyObject** temps[6] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; + for (i=0; i < 6; i++) { + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + } else { + Py_ssize_t index = -1; + PyObject** temps[6] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6}; + __pyx_t_7 = PyObject_GetIter(__pyx_v_param_arr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; + for (index=0; index < 6; index++) { + PyObject* item = __pyx_t_8(__pyx_t_7); if (unlikely(!item)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 6) < 0) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_t_8 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + __pyx_v_A = __pyx_t_1; + __pyx_t_1 = 0; + __pyx_v_B = __pyx_t_2; + __pyx_t_2 = 0; + __pyx_v_C = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_D = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_v_M = __pyx_t_5; + __pyx_t_5 = 0; + __pyx_v_N = __pyx_t_6; + __pyx_t_6 = 0; + + /* "LAIProcess.pyx":30 + * # + * A,B,C,D,M,N=param_arr # + * V_lai=sample_lai # <<<<<<<<<<<<<< + * #V_lai=E*sample_lai+F + * exp_gamma=np.exp(-2*B*((V_lai*D+C))*(1/np.cos(sample_inc))) + */ + __Pyx_INCREF(__pyx_v_sample_lai); + __pyx_v_V_lai = __pyx_v_sample_lai; + + /* "LAIProcess.pyx":32 + * V_lai=sample_lai + * #V_lai=E*sample_lai+F + * exp_gamma=np.exp(-2*B*((V_lai*D+C))*(1/np.cos(sample_inc))) # <<<<<<<<<<<<<< + * sigma_soil=M*sample_soil+N + * sigma_veg=A*((V_lai))*np.cos(sample_inc) + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyNumber_Multiply(__pyx_int_neg_2, __pyx_v_B); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PyNumber_Multiply(__pyx_v_V_lai, __pyx_v_D); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_sample_inc) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_sample_inc); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_int_1, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_exp_gamma = __pyx_t_6; + __pyx_t_6 = 0; + + /* "LAIProcess.pyx":33 + * #V_lai=E*sample_lai+F + * exp_gamma=np.exp(-2*B*((V_lai*D+C))*(1/np.cos(sample_inc))) + * sigma_soil=M*sample_soil+N # <<<<<<<<<<<<<< + * sigma_veg=A*((V_lai))*np.cos(sample_inc) + * f_veg=1 + */ + __pyx_t_6 = PyNumber_Multiply(__pyx_v_M, __pyx_v_sample_soil); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_v_N); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_sigma_soil = __pyx_t_4; + __pyx_t_4 = 0; + + /* "LAIProcess.pyx":34 + * exp_gamma=np.exp(-2*B*((V_lai*D+C))*(1/np.cos(sample_inc))) + * sigma_soil=M*sample_soil+N + * sigma_veg=A*((V_lai))*np.cos(sample_inc) # <<<<<<<<<<<<<< + * f_veg=1 + * result=sigma_veg*(1-exp_gamma)+sigma_soil*exp_gamma-sample_sigma + */ + __pyx_t_4 = PyNumber_Multiply(__pyx_v_A, __pyx_v_V_lai); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_cos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_sample_inc) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_sample_inc); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Multiply(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_sigma_veg = __pyx_t_1; + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":35 + * sigma_soil=M*sample_soil+N + * sigma_veg=A*((V_lai))*np.cos(sample_inc) + * f_veg=1 # <<<<<<<<<<<<<< + * result=sigma_veg*(1-exp_gamma)+sigma_soil*exp_gamma-sample_sigma + * return result + */ + __pyx_v_f_veg = 1; + + /* "LAIProcess.pyx":36 + * sigma_veg=A*((V_lai))*np.cos(sample_inc) + * f_veg=1 + * result=sigma_veg*(1-exp_gamma)+sigma_soil*exp_gamma-sample_sigma # <<<<<<<<<<<<<< + * return result + * + */ + __pyx_t_1 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_v_exp_gamma, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PyNumber_Multiply(__pyx_v_sigma_veg, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Multiply(__pyx_v_sigma_soil, __pyx_v_exp_gamma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_v_sample_sigma); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":37 + * f_veg=1 + * result=sigma_veg*(1-exp_gamma)+sigma_soil*exp_gamma-sample_sigma + * return result # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "LAIProcess.pyx":15 + * + * + * def WMCModel(param_arr,sample_lai,sample_soil,sample_inc,sample_sigma): # <<<<<<<<<<<<<< + * """ WMC + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("LAIProcess.WMCModel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_A); + __Pyx_XDECREF(__pyx_v_B); + __Pyx_XDECREF(__pyx_v_C); + __Pyx_XDECREF(__pyx_v_D); + __Pyx_XDECREF(__pyx_v_M); + __Pyx_XDECREF(__pyx_v_N); + __Pyx_XDECREF(__pyx_v_V_lai); + __Pyx_XDECREF(__pyx_v_exp_gamma); + __Pyx_XDECREF(__pyx_v_sigma_soil); + __Pyx_XDECREF(__pyx_v_sigma_veg); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":42 + * + * + * def train_WMCmodel(lai_water_inc_sigma_list,params_X0,train_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10LAIProcess_3train_WMCmodel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_10LAIProcess_2train_WMCmodel[] = " \350\256\255\347\273\203\346\250\241\345\236\213\345\217\202\346\225\260\n\n Args:\n lai_waiter_inc_sigma_list (list): \350\256\255\347\273\203\346\250\241\345\236\213\344\275\277\347\224\250\347\232\204\346\240\267\346\234\254\345\221\242\n "; +static PyMethodDef __pyx_mdef_10LAIProcess_3train_WMCmodel = {"train_WMCmodel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10LAIProcess_3train_WMCmodel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10LAIProcess_2train_WMCmodel}; +static PyObject *__pyx_pw_10LAIProcess_3train_WMCmodel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lai_water_inc_sigma_list = 0; + PyObject *__pyx_v_params_X0 = 0; + PyObject *__pyx_v_train_err_image_path = 0; + PyObject *__pyx_v_draw_flag = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("train_WMCmodel (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lai_water_inc_sigma_list,&__pyx_n_s_params_X0,&__pyx_n_s_train_err_image_path,&__pyx_n_s_draw_flag,0}; + PyObject* values[4] = {0,0,0,0}; + values[3] = ((PyObject *)Py_True); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lai_water_inc_sigma_list)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_params_X0)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("train_WMCmodel", 0, 3, 4, 1); __PYX_ERR(0, 42, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_train_err_image_path)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("train_WMCmodel", 0, 3, 4, 2); __PYX_ERR(0, 42, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_draw_flag); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "train_WMCmodel") < 0)) __PYX_ERR(0, 42, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_lai_water_inc_sigma_list = values[0]; + __pyx_v_params_X0 = values[1]; + __pyx_v_train_err_image_path = values[2]; + __pyx_v_draw_flag = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("train_WMCmodel", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 42, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("LAIProcess.train_WMCmodel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10LAIProcess_2train_WMCmodel(__pyx_self, __pyx_v_lai_water_inc_sigma_list, __pyx_v_params_X0, __pyx_v_train_err_image_path, __pyx_v_draw_flag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":48 + * lai_waiter_inc_sigma_list (list): + * """ + * def f(X): # <<<<<<<<<<<<<< + * eqs=[] + * for lai_water_inc_sigma_item in lai_water_inc_sigma_list: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10LAIProcess_14train_WMCmodel_1f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10LAIProcess_14train_WMCmodel_1f = {"f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10LAIProcess_14train_WMCmodel_1f, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10LAIProcess_14train_WMCmodel_1f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_X = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("f (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_X,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_X)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f") < 0)) __PYX_ERR(0, 48, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_X = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("f", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 48, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("LAIProcess.train_WMCmodel.f", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10LAIProcess_14train_WMCmodel_f(__pyx_self, __pyx_v_X); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10LAIProcess_14train_WMCmodel_f(PyObject *__pyx_self, PyObject *__pyx_v_X) { + struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *__pyx_cur_scope; + struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *__pyx_outer_scope; + PyObject *__pyx_v_eqs = NULL; + PyObject *__pyx_v_lai_water_inc_sigma_item = NULL; + PyObject *__pyx_v_sample_lai = NULL; + PyObject *__pyx_v_sample_sigma = NULL; + PyObject *__pyx_v_sample_soil = NULL; + PyObject *__pyx_v_sample_inc = NULL; + CYTHON_UNUSED PyObject *__pyx_v_FVC = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("f", 0); + __pyx_outer_scope = (struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "LAIProcess.pyx":49 + * """ + * def f(X): + * eqs=[] # <<<<<<<<<<<<<< + * for lai_water_inc_sigma_item in lai_water_inc_sigma_list: + * sample_lai=lai_water_inc_sigma_item[4] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_eqs = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":50 + * def f(X): + * eqs=[] + * for lai_water_inc_sigma_item in lai_water_inc_sigma_list: # <<<<<<<<<<<<<< + * sample_lai=lai_water_inc_sigma_item[4] + * sample_sigma=lai_water_inc_sigma_item[5] # 5: csv_sigma, 8:tiff_sigma + */ + if (unlikely(!__pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list)) { __Pyx_RaiseClosureNameError("lai_water_inc_sigma_list"); __PYX_ERR(0, 50, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 50, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 50, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 50, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_lai_water_inc_sigma_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "LAIProcess.pyx":51 + * eqs=[] + * for lai_water_inc_sigma_item in lai_water_inc_sigma_list: + * sample_lai=lai_water_inc_sigma_item[4] # <<<<<<<<<<<<<< + * sample_sigma=lai_water_inc_sigma_item[5] # 5: csv_sigma, 8:tiff_sigma + * sample_soil=lai_water_inc_sigma_item[6] + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_lai_water_inc_sigma_item, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_sample_lai, __pyx_t_4); + __pyx_t_4 = 0; + + /* "LAIProcess.pyx":52 + * for lai_water_inc_sigma_item in lai_water_inc_sigma_list: + * sample_lai=lai_water_inc_sigma_item[4] + * sample_sigma=lai_water_inc_sigma_item[5] # 5: csv_sigma, 8:tiff_sigma # <<<<<<<<<<<<<< + * sample_soil=lai_water_inc_sigma_item[6] + * sample_inc=lai_water_inc_sigma_item[7] + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_lai_water_inc_sigma_item, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_sample_sigma, __pyx_t_4); + __pyx_t_4 = 0; + + /* "LAIProcess.pyx":53 + * sample_lai=lai_water_inc_sigma_item[4] + * sample_sigma=lai_water_inc_sigma_item[5] # 5: csv_sigma, 8:tiff_sigma + * sample_soil=lai_water_inc_sigma_item[6] # <<<<<<<<<<<<<< + * sample_inc=lai_water_inc_sigma_item[7] + * FVC=lai_water_inc_sigma_item[8] + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_lai_water_inc_sigma_item, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_sample_soil, __pyx_t_4); + __pyx_t_4 = 0; + + /* "LAIProcess.pyx":54 + * sample_sigma=lai_water_inc_sigma_item[5] # 5: csv_sigma, 8:tiff_sigma + * sample_soil=lai_water_inc_sigma_item[6] + * sample_inc=lai_water_inc_sigma_item[7] # <<<<<<<<<<<<<< + * FVC=lai_water_inc_sigma_item[8] + * eqs.append(WMCModel(X,sample_lai,sample_soil,sample_inc,sample_sigma)) + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_lai_water_inc_sigma_item, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_sample_inc, __pyx_t_4); + __pyx_t_4 = 0; + + /* "LAIProcess.pyx":55 + * sample_soil=lai_water_inc_sigma_item[6] + * sample_inc=lai_water_inc_sigma_item[7] + * FVC=lai_water_inc_sigma_item[8] # <<<<<<<<<<<<<< + * eqs.append(WMCModel(X,sample_lai,sample_soil,sample_inc,sample_sigma)) + * return eqs + */ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_lai_water_inc_sigma_item, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_FVC, __pyx_t_4); + __pyx_t_4 = 0; + + /* "LAIProcess.pyx":56 + * sample_inc=lai_water_inc_sigma_item[7] + * FVC=lai_water_inc_sigma_item[8] + * eqs.append(WMCModel(X,sample_lai,sample_soil,sample_inc,sample_sigma)) # <<<<<<<<<<<<<< + * return eqs + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_WMCModel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_X, __pyx_v_sample_lai, __pyx_v_sample_soil, __pyx_v_sample_inc, __pyx_v_sample_sigma}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_X, __pyx_v_sample_lai, __pyx_v_sample_soil, __pyx_v_sample_inc, __pyx_v_sample_sigma}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_GOTREF(__pyx_t_4); + } else + #endif + { + __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_X); + __Pyx_GIVEREF(__pyx_v_X); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_X); + __Pyx_INCREF(__pyx_v_sample_lai); + __Pyx_GIVEREF(__pyx_v_sample_lai); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_sample_lai); + __Pyx_INCREF(__pyx_v_sample_soil); + __Pyx_GIVEREF(__pyx_v_sample_soil); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_sample_soil); + __Pyx_INCREF(__pyx_v_sample_inc); + __Pyx_GIVEREF(__pyx_v_sample_inc); + PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_v_sample_inc); + __Pyx_INCREF(__pyx_v_sample_sigma); + __Pyx_GIVEREF(__pyx_v_sample_sigma); + PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_v_sample_sigma); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_eqs, __pyx_t_4); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "LAIProcess.pyx":50 + * def f(X): + * eqs=[] + * for lai_water_inc_sigma_item in lai_water_inc_sigma_list: # <<<<<<<<<<<<<< + * sample_lai=lai_water_inc_sigma_item[4] + * sample_sigma=lai_water_inc_sigma_item[5] # 5: csv_sigma, 8:tiff_sigma + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "LAIProcess.pyx":57 + * FVC=lai_water_inc_sigma_item[8] + * eqs.append(WMCModel(X,sample_lai,sample_soil,sample_inc,sample_sigma)) + * return eqs # <<<<<<<<<<<<<< + * + * X0 = params_X0 # + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_eqs); + __pyx_r = __pyx_v_eqs; + goto __pyx_L0; + + /* "LAIProcess.pyx":48 + * lai_waiter_inc_sigma_list (list): + * """ + * def f(X): # <<<<<<<<<<<<<< + * eqs=[] + * for lai_water_inc_sigma_item in lai_water_inc_sigma_list: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("LAIProcess.train_WMCmodel.f", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_eqs); + __Pyx_XDECREF(__pyx_v_lai_water_inc_sigma_item); + __Pyx_XDECREF(__pyx_v_sample_lai); + __Pyx_XDECREF(__pyx_v_sample_sigma); + __Pyx_XDECREF(__pyx_v_sample_soil); + __Pyx_XDECREF(__pyx_v_sample_inc); + __Pyx_XDECREF(__pyx_v_FVC); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":42 + * + * + * def train_WMCmodel(lai_water_inc_sigma_list,params_X0,train_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + +static PyObject *__pyx_pf_10LAIProcess_2train_WMCmodel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lai_water_inc_sigma_list, PyObject *__pyx_v_params_X0, PyObject *__pyx_v_train_err_image_path, PyObject *__pyx_v_draw_flag) { + struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *__pyx_cur_scope; + PyObject *__pyx_v_f = 0; + PyObject *__pyx_v_X0 = NULL; + PyObject *__pyx_v_h = NULL; + PyObject *__pyx_v_err_f = NULL; + PyObject *__pyx_v_x_arr = NULL; + PyObject *__pyx_v_plt = NULL; + PyObject *__pyx_v_lai_waiter_inc_sigma_item = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("train_WMCmodel", 0); + __pyx_cur_scope = (struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *)__pyx_tp_new_10LAIProcess___pyx_scope_struct__train_WMCmodel(__pyx_ptype_10LAIProcess___pyx_scope_struct__train_WMCmodel, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 42, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list = __pyx_v_lai_water_inc_sigma_list; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list); + + /* "LAIProcess.pyx":48 + * lai_waiter_inc_sigma_list (list): + * """ + * def f(X): # <<<<<<<<<<<<<< + * eqs=[] + * for lai_water_inc_sigma_item in lai_water_inc_sigma_list: + */ + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_10LAIProcess_14train_WMCmodel_1f, 0, __pyx_n_s_train_WMCmodel_locals_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_LAIProcess, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_f = __pyx_t_1; + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":59 + * return eqs + * + * X0 = params_X0 # # <<<<<<<<<<<<<< + * # logger.info(str(X0)) + * h = leastsq(f, X0) + */ + __Pyx_INCREF(__pyx_v_params_X0); + __pyx_v_X0 = __pyx_v_params_X0; + + /* "LAIProcess.pyx":61 + * X0 = params_X0 # + * # logger.info(str(X0)) + * h = leastsq(f, X0) # <<<<<<<<<<<<<< + * # logger.info(h[0],h[1]) + * err_f=f(h[0]) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_leastsq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_f, __pyx_v_X0}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_f, __pyx_v_X0}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_f); + __Pyx_GIVEREF(__pyx_v_f); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_f); + __Pyx_INCREF(__pyx_v_X0); + __Pyx_GIVEREF(__pyx_v_X0); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_X0); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_h = __pyx_t_1; + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":63 + * h = leastsq(f, X0) + * # logger.info(h[0],h[1]) + * err_f=f(h[0]) # <<<<<<<<<<<<<< + * x_arr=[lai_waiter_inc_sigma_item[4] for lai_waiter_inc_sigma_item in lai_water_inc_sigma_list] + * # + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_h, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_pf_10LAIProcess_14train_WMCmodel_f(__pyx_v_f, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_err_f = __pyx_t_2; + __pyx_t_2 = 0; + + /* "LAIProcess.pyx":64 + * # logger.info(h[0],h[1]) + * err_f=f(h[0]) + * x_arr=[lai_waiter_inc_sigma_item[4] for lai_waiter_inc_sigma_item in lai_water_inc_sigma_list] # <<<<<<<<<<<<<< + * # + * # logger.info("\n\n{}\n\t\t ".format(str(np.array(err_f).shape))) + */ + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_lai_water_inc_sigma_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 64, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 64, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } else { + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 64, __pyx_L1_error) + #else + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + #endif + } + } else { + __pyx_t_5 = __pyx_t_7(__pyx_t_1); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 64, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_XDECREF_SET(__pyx_v_lai_waiter_inc_sigma_item, __pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_lai_waiter_inc_sigma_item, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_x_arr = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "LAIProcess.pyx":71 + * # logger.info("\n\n") + * + * if draw_flag: # <<<<<<<<<<<<<< + * # logger.info(err_f) + * # logger.info(np.where(np.abs(err_f)<10)) + */ + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_draw_flag); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 71, __pyx_L1_error) + if (__pyx_t_8) { + + /* "LAIProcess.pyx":74 + * # logger.info(err_f) + * # logger.info(np.where(np.abs(err_f)<10)) + * from matplotlib import pyplot as plt # <<<<<<<<<<<<<< + * plt.scatter(x_arr,err_f) + * plt.title("equation-err") + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_pyplot); + __Pyx_GIVEREF(__pyx_n_s_pyplot); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_pyplot); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_matplotlib, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_pyplot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_plt = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "LAIProcess.pyx":75 + * # logger.info(np.where(np.abs(err_f)<10)) + * from matplotlib import pyplot as plt + * plt.scatter(x_arr,err_f) # <<<<<<<<<<<<<< + * plt.title("equation-err") + * plt.savefig(train_err_image_path,dpi=600) + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_plt, __pyx_n_s_scatter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_x_arr, __pyx_v_err_f}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_x_arr, __pyx_v_err_f}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_x_arr); + __Pyx_GIVEREF(__pyx_v_x_arr); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_x_arr); + __Pyx_INCREF(__pyx_v_err_f); + __Pyx_GIVEREF(__pyx_v_err_f); + PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_v_err_f); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "LAIProcess.pyx":76 + * from matplotlib import pyplot as plt + * plt.scatter(x_arr,err_f) + * plt.title("equation-err") # <<<<<<<<<<<<<< + * plt.savefig(train_err_image_path,dpi=600) + * plt.show() + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_plt, __pyx_n_s_title); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_equation_err) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_equation_err); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "LAIProcess.pyx":77 + * plt.scatter(x_arr,err_f) + * plt.title("equation-err") + * plt.savefig(train_err_image_path,dpi=600) # <<<<<<<<<<<<<< + * plt.show() + * + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_plt, __pyx_n_s_savefig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_train_err_image_path); + __Pyx_GIVEREF(__pyx_v_train_err_image_path); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_train_err_image_path); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dpi, __pyx_int_600) < 0) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "LAIProcess.pyx":78 + * plt.title("equation-err") + * plt.savefig(train_err_image_path,dpi=600) + * plt.show() # <<<<<<<<<<<<<< + * + * return h[0] + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_plt, __pyx_n_s_show); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "LAIProcess.pyx":71 + * # logger.info("\n\n") + * + * if draw_flag: # <<<<<<<<<<<<<< + * # logger.info(err_f) + * # logger.info(np.where(np.abs(err_f)<10)) + */ + } + + /* "LAIProcess.pyx":80 + * plt.show() + * + * return h[0] # <<<<<<<<<<<<<< + * + * def test_WMCModel(lai_waiter_inc_sigma_list,param_arr,lai_X0,test_err_image_path,draw_flag=True): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_h, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "LAIProcess.pyx":42 + * + * + * def train_WMCmodel(lai_water_inc_sigma_list,params_X0,train_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("LAIProcess.train_WMCmodel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_X0); + __Pyx_XDECREF(__pyx_v_h); + __Pyx_XDECREF(__pyx_v_err_f); + __Pyx_XDECREF(__pyx_v_x_arr); + __Pyx_XDECREF(__pyx_v_plt); + __Pyx_XDECREF(__pyx_v_lai_waiter_inc_sigma_item); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":82 + * return h[0] + * + * def test_WMCModel(lai_waiter_inc_sigma_list,param_arr,lai_X0,test_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10LAIProcess_5test_WMCModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_10LAIProcess_4test_WMCModel[] = " \346\265\213\350\257\225\346\250\241\345\236\213\350\256\255\347\273\203\347\273\223\346\236\234\n\n Args:\n lai_waiter_inc_sigma_list (list): \346\265\213\350\257\225\344\275\277\347\224\250\347\232\204\346\240\267\346\234\254\351\233\206\n A (_type_): \345\217\202\346\225\260A\n B (_type_): \345\217\202\346\225\260B\n C (_type_): \345\217\202\346\225\260C\n D (_type_): \345\217\202\346\225\260D\n M (_type_): \345\217\202\346\225\260M\n N (_type_): \345\217\202\346\225\260N\n lai_X0 (_type_): \345\210\235\345\247\213\345\200\274\n\n Returns:\n list: \350\257\257\345\267\256\345\210\227\350\241\250 [sample_lai,err,predict]\n "; +static PyMethodDef __pyx_mdef_10LAIProcess_5test_WMCModel = {"test_WMCModel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10LAIProcess_5test_WMCModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10LAIProcess_4test_WMCModel}; +static PyObject *__pyx_pw_10LAIProcess_5test_WMCModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lai_waiter_inc_sigma_list = 0; + PyObject *__pyx_v_param_arr = 0; + PyObject *__pyx_v_lai_X0 = 0; + PyObject *__pyx_v_test_err_image_path = 0; + PyObject *__pyx_v_draw_flag = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("test_WMCModel (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lai_waiter_inc_sigma_list,&__pyx_n_s_param_arr,&__pyx_n_s_lai_X0,&__pyx_n_s_test_err_image_path,&__pyx_n_s_draw_flag,0}; + PyObject* values[5] = {0,0,0,0,0}; + values[4] = ((PyObject *)Py_True); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lai_waiter_inc_sigma_list)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_param_arr)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("test_WMCModel", 0, 4, 5, 1); __PYX_ERR(0, 82, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lai_X0)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("test_WMCModel", 0, 4, 5, 2); __PYX_ERR(0, 82, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_test_err_image_path)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("test_WMCModel", 0, 4, 5, 3); __PYX_ERR(0, 82, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_draw_flag); + if (value) { values[4] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "test_WMCModel") < 0)) __PYX_ERR(0, 82, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_lai_waiter_inc_sigma_list = values[0]; + __pyx_v_param_arr = values[1]; + __pyx_v_lai_X0 = values[2]; + __pyx_v_test_err_image_path = values[3]; + __pyx_v_draw_flag = values[4]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("test_WMCModel", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 82, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("LAIProcess.test_WMCModel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10LAIProcess_4test_WMCModel(__pyx_self, __pyx_v_lai_waiter_inc_sigma_list, __pyx_v_param_arr, __pyx_v_lai_X0, __pyx_v_test_err_image_path, __pyx_v_draw_flag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":104 + * for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: + * sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item + * def f(X): # <<<<<<<<<<<<<< + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,sample_soil,sample_inc,csv_sigma)] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10LAIProcess_13test_WMCModel_1f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10LAIProcess_13test_WMCModel_1f = {"f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10LAIProcess_13test_WMCModel_1f, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10LAIProcess_13test_WMCModel_1f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_X = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("f (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_X,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_X)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f") < 0)) __PYX_ERR(0, 104, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_X = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("f", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 104, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("LAIProcess.test_WMCModel.f", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10LAIProcess_13test_WMCModel_f(__pyx_self, __pyx_v_X); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10LAIProcess_13test_WMCModel_f(PyObject *__pyx_self, PyObject *__pyx_v_X) { + struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *__pyx_cur_scope; + struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *__pyx_outer_scope; + PyObject *__pyx_v_lai = NULL; + PyObject *__pyx_v_eqs = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("f", 0); + __pyx_outer_scope = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "LAIProcess.pyx":105 + * sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item + * def f(X): + * lai=X[0] # <<<<<<<<<<<<<< + * eqs=[WMCModel(param_arr,lai,sample_soil,sample_inc,csv_sigma)] + * return eqs + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_X, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lai = __pyx_t_1; + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":106 + * def f(X): + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,sample_soil,sample_inc,csv_sigma)] # <<<<<<<<<<<<<< + * return eqs + * X0=lai_X0 + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WMCModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(!__pyx_cur_scope->__pyx_v_param_arr)) { __Pyx_RaiseClosureNameError("param_arr"); __PYX_ERR(0, 106, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_v_sample_soil)) { __Pyx_RaiseClosureNameError("sample_soil"); __PYX_ERR(0, 106, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_v_sample_inc)) { __Pyx_RaiseClosureNameError("sample_inc"); __PYX_ERR(0, 106, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_v_csv_sigma)) { __Pyx_RaiseClosureNameError("csv_sigma"); __PYX_ERR(0, 106, __pyx_L1_error) } + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_param_arr, __pyx_v_lai, __pyx_cur_scope->__pyx_v_sample_soil, __pyx_cur_scope->__pyx_v_sample_inc, __pyx_cur_scope->__pyx_v_csv_sigma}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_param_arr, __pyx_v_lai, __pyx_cur_scope->__pyx_v_sample_soil, __pyx_cur_scope->__pyx_v_sample_inc, __pyx_cur_scope->__pyx_v_csv_sigma}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_param_arr); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_param_arr); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_cur_scope->__pyx_v_param_arr); + __Pyx_INCREF(__pyx_v_lai); + __Pyx_GIVEREF(__pyx_v_lai); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_lai); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sample_soil); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sample_soil); + PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_cur_scope->__pyx_v_sample_soil); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sample_inc); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sample_inc); + PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_cur_scope->__pyx_v_sample_inc); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_csv_sigma); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_csv_sigma); + PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_cur_scope->__pyx_v_csv_sigma); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_v_eqs = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "LAIProcess.pyx":107 + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,sample_soil,sample_inc,csv_sigma)] + * return eqs # <<<<<<<<<<<<<< + * X0=lai_X0 + * h = leastsq(f, X0) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_eqs); + __pyx_r = __pyx_v_eqs; + goto __pyx_L0; + + /* "LAIProcess.pyx":104 + * for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: + * sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item + * def f(X): # <<<<<<<<<<<<<< + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,sample_soil,sample_inc,csv_sigma)] + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("LAIProcess.test_WMCModel.f", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lai); + __Pyx_XDECREF(__pyx_v_eqs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":82 + * return h[0] + * + * def test_WMCModel(lai_waiter_inc_sigma_list,param_arr,lai_X0,test_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + +static PyObject *__pyx_pf_10LAIProcess_4test_WMCModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lai_waiter_inc_sigma_list, PyObject *__pyx_v_param_arr, PyObject *__pyx_v_lai_X0, PyObject *__pyx_v_test_err_image_path, PyObject *__pyx_v_draw_flag) { + struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *__pyx_cur_scope; + PyObject *__pyx_v_err = NULL; + PyObject *__pyx_v_err_f = NULL; + PyObject *__pyx_v_x_arr = NULL; + PyObject *__pyx_v_err_lai = NULL; + PyObject *__pyx_v_lai_waiter_inc_sigma_item = NULL; + CYTHON_UNUSED PyObject *__pyx_v_sample_time = NULL; + PyObject *__pyx_v_sample_code = NULL; + CYTHON_UNUSED PyObject *__pyx_v_sample_lon = NULL; + CYTHON_UNUSED PyObject *__pyx_v_sample_lat = NULL; + PyObject *__pyx_v_sample_lai = NULL; + CYTHON_UNUSED PyObject *__pyx_v_sample_sigma = NULL; + PyObject *__pyx_v_f = 0; + PyObject *__pyx_v_X0 = NULL; + PyObject *__pyx_v_h = NULL; + PyObject *__pyx_v_temp_err = NULL; + PyObject *__pyx_v_plt = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *(*__pyx_t_14)(PyObject *); + int __pyx_t_15; + int __pyx_t_16; + int __pyx_t_17; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("test_WMCModel", 0); + __pyx_cur_scope = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *)__pyx_tp_new_10LAIProcess___pyx_scope_struct_1_test_WMCModel(__pyx_ptype_10LAIProcess___pyx_scope_struct_1_test_WMCModel, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 82, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_param_arr = __pyx_v_param_arr; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_param_arr); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_param_arr); + + /* "LAIProcess.pyx":98 + * list: [sample_lai,err,predict] + * """ + * err=[] # <<<<<<<<<<<<<< + * err_f=[] + * x_arr=[] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_err = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":99 + * """ + * err=[] + * err_f=[] # <<<<<<<<<<<<<< + * x_arr=[] + * err_lai=[] + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_err_f = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":100 + * err=[] + * err_f=[] + * x_arr=[] # <<<<<<<<<<<<<< + * err_lai=[] + * for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_x_arr = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":101 + * err_f=[] + * x_arr=[] + * err_lai=[] # <<<<<<<<<<<<<< + * for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: + * sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_err_lai = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":102 + * x_arr=[] + * err_lai=[] + * for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: # <<<<<<<<<<<<<< + * sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item + * def f(X): + */ + if (likely(PyList_CheckExact(__pyx_v_lai_waiter_inc_sigma_list)) || PyTuple_CheckExact(__pyx_v_lai_waiter_inc_sigma_list)) { + __pyx_t_1 = __pyx_v_lai_waiter_inc_sigma_list; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lai_waiter_inc_sigma_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 102, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 102, __pyx_L1_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 102, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_lai_waiter_inc_sigma_item, __pyx_t_4); + __pyx_t_4 = 0; + + /* "LAIProcess.pyx":103 + * err_lai=[] + * for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: + * sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item # <<<<<<<<<<<<<< + * def f(X): + * lai=X[0] + */ + if ((likely(PyTuple_CheckExact(__pyx_v_lai_waiter_inc_sigma_item))) || (PyList_CheckExact(__pyx_v_lai_waiter_inc_sigma_item))) { + PyObject* sequence = __pyx_v_lai_waiter_inc_sigma_item; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 9)) { + if (size > 9) __Pyx_RaiseTooManyValuesError(9); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 103, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 5); + __pyx_t_10 = PyTuple_GET_ITEM(sequence, 6); + __pyx_t_11 = PyTuple_GET_ITEM(sequence, 7); + __pyx_t_12 = PyTuple_GET_ITEM(sequence, 8); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_5 = PyList_GET_ITEM(sequence, 1); + __pyx_t_6 = PyList_GET_ITEM(sequence, 2); + __pyx_t_7 = PyList_GET_ITEM(sequence, 3); + __pyx_t_8 = PyList_GET_ITEM(sequence, 4); + __pyx_t_9 = PyList_GET_ITEM(sequence, 5); + __pyx_t_10 = PyList_GET_ITEM(sequence, 6); + __pyx_t_11 = PyList_GET_ITEM(sequence, 7); + __pyx_t_12 = PyList_GET_ITEM(sequence, 8); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); + #else + { + Py_ssize_t i; + PyObject** temps[9] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12}; + for (i=0; i < 9; i++) { + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(item); + *(temps[i]) = item; + } + } + #endif + } else { + Py_ssize_t index = -1; + PyObject** temps[9] = {&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12}; + __pyx_t_13 = PyObject_GetIter(__pyx_v_lai_waiter_inc_sigma_item); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; + for (index=0; index < 9; index++) { + PyObject* item = __pyx_t_14(__pyx_t_13); if (unlikely(!item)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(item); + *(temps[index]) = item; + } + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 9) < 0) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_14 = NULL; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + goto __pyx_L6_unpacking_done; + __pyx_L5_unpacking_failed:; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_L6_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_sample_time, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_sample_code, __pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_sample_lon, __pyx_t_6); + __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_sample_lat, __pyx_t_7); + __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_sample_lai, __pyx_t_8); + __pyx_t_8 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_csv_sigma); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_csv_sigma, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __pyx_t_9 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_sample_soil); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sample_soil, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + __pyx_t_10 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_sample_inc); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sample_inc, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_11); + __pyx_t_11 = 0; + __Pyx_XDECREF_SET(__pyx_v_sample_sigma, __pyx_t_12); + __pyx_t_12 = 0; + + /* "LAIProcess.pyx":104 + * for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: + * sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item + * def f(X): # <<<<<<<<<<<<<< + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,sample_soil,sample_inc,csv_sigma)] + */ + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_10LAIProcess_13test_WMCModel_1f, 0, __pyx_n_s_test_WMCModel_locals_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_LAIProcess, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_12); + __pyx_t_12 = 0; + + /* "LAIProcess.pyx":108 + * eqs=[WMCModel(param_arr,lai,sample_soil,sample_inc,csv_sigma)] + * return eqs + * X0=lai_X0 # <<<<<<<<<<<<<< + * h = leastsq(f, X0) + * temp_err=h[0]-sample_lai + */ + __Pyx_INCREF(__pyx_v_lai_X0); + __Pyx_XDECREF_SET(__pyx_v_X0, __pyx_v_lai_X0); + + /* "LAIProcess.pyx":109 + * return eqs + * X0=lai_X0 + * h = leastsq(f, X0) # <<<<<<<<<<<<<< + * temp_err=h[0]-sample_lai + * err_lai.append(temp_err[0]) # lai + */ + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_leastsq); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = NULL; + __pyx_t_15 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + __pyx_t_15 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_f, __pyx_v_X0}; + __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_12); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { + PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_f, __pyx_v_X0}; + __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GOTREF(__pyx_t_12); + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_10) { + __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; + } + __Pyx_INCREF(__pyx_v_f); + __Pyx_GIVEREF(__pyx_v_f); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_15, __pyx_v_f); + __Pyx_INCREF(__pyx_v_X0); + __Pyx_GIVEREF(__pyx_v_X0); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_15, __pyx_v_X0); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_12); + __pyx_t_12 = 0; + + /* "LAIProcess.pyx":110 + * X0=lai_X0 + * h = leastsq(f, X0) + * temp_err=h[0]-sample_lai # <<<<<<<<<<<<<< + * err_lai.append(temp_err[0]) # lai + * err.append([sample_lai,temp_err[0],h[0][0],sample_code]) + */ + __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_h, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_11 = PyNumber_Subtract(__pyx_t_12, __pyx_v_sample_lai); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF_SET(__pyx_v_temp_err, __pyx_t_11); + __pyx_t_11 = 0; + + /* "LAIProcess.pyx":111 + * h = leastsq(f, X0) + * temp_err=h[0]-sample_lai + * err_lai.append(temp_err[0]) # lai # <<<<<<<<<<<<<< + * err.append([sample_lai,temp_err[0],h[0][0],sample_code]) + * err_f.append(f(h[0])[0]) # + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_temp_err, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_err_lai, __pyx_t_11); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + + /* "LAIProcess.pyx":112 + * temp_err=h[0]-sample_lai + * err_lai.append(temp_err[0]) # lai + * err.append([sample_lai,temp_err[0],h[0][0],sample_code]) # <<<<<<<<<<<<<< + * err_f.append(f(h[0])[0]) # + * x_arr.append(sample_lai) + */ + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_temp_err, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_h, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_12, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = PyList_New(4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_INCREF(__pyx_v_sample_lai); + __Pyx_GIVEREF(__pyx_v_sample_lai); + PyList_SET_ITEM(__pyx_t_12, 0, __pyx_v_sample_lai); + __Pyx_GIVEREF(__pyx_t_11); + PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_9); + PyList_SET_ITEM(__pyx_t_12, 2, __pyx_t_9); + __Pyx_INCREF(__pyx_v_sample_code); + __Pyx_GIVEREF(__pyx_v_sample_code); + PyList_SET_ITEM(__pyx_t_12, 3, __pyx_v_sample_code); + __pyx_t_11 = 0; + __pyx_t_9 = 0; + __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_err, __pyx_t_12); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "LAIProcess.pyx":113 + * err_lai.append(temp_err[0]) # lai + * err.append([sample_lai,temp_err[0],h[0][0],sample_code]) + * err_f.append(f(h[0])[0]) # # <<<<<<<<<<<<<< + * x_arr.append(sample_lai) + * + */ + __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_h, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_9 = __pyx_pf_10LAIProcess_13test_WMCModel_f(__pyx_v_f, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_err_f, __pyx_t_12); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "LAIProcess.pyx":114 + * err.append([sample_lai,temp_err[0],h[0][0],sample_code]) + * err_f.append(f(h[0])[0]) # + * x_arr.append(sample_lai) # <<<<<<<<<<<<<< + * + * # + */ + __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_x_arr, __pyx_v_sample_lai); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 114, __pyx_L1_error) + + /* "LAIProcess.pyx":102 + * x_arr=[] + * err_lai=[] + * for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: # <<<<<<<<<<<<<< + * sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item + * def f(X): + */ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "LAIProcess.pyx":122 + * # logger.info("\n\n") + * + * if draw_flag: # <<<<<<<<<<<<<< + * from matplotlib import pyplot as plt + * plt.scatter(x_arr,err_lai) + */ + __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_draw_flag); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 122, __pyx_L1_error) + if (__pyx_t_17) { + + /* "LAIProcess.pyx":123 + * + * if draw_flag: + * from matplotlib import pyplot as plt # <<<<<<<<<<<<<< + * plt.scatter(x_arr,err_lai) + * plt.title("equation-err") + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_pyplot); + __Pyx_GIVEREF(__pyx_n_s_pyplot); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_pyplot); + __pyx_t_12 = __Pyx_Import(__pyx_n_s_matplotlib, __pyx_t_1, -1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_12, __pyx_n_s_pyplot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_plt = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "LAIProcess.pyx":124 + * if draw_flag: + * from matplotlib import pyplot as plt + * plt.scatter(x_arr,err_lai) # <<<<<<<<<<<<<< + * plt.title("equation-err") + * plt.savefig(test_err_image_path,dpi=600) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_plt, __pyx_n_s_scatter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = NULL; + __pyx_t_15 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_15 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_x_arr, __pyx_v_err_lai}; + __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_12); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_x_arr, __pyx_v_err_lai}; + __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_GOTREF(__pyx_t_12); + } else + #endif + { + __pyx_t_11 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__pyx_t_9) { + __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; + } + __Pyx_INCREF(__pyx_v_x_arr); + __Pyx_GIVEREF(__pyx_v_x_arr); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_15, __pyx_v_x_arr); + __Pyx_INCREF(__pyx_v_err_lai); + __Pyx_GIVEREF(__pyx_v_err_lai); + PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_15, __pyx_v_err_lai); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "LAIProcess.pyx":125 + * from matplotlib import pyplot as plt + * plt.scatter(x_arr,err_lai) + * plt.title("equation-err") # <<<<<<<<<<<<<< + * plt.savefig(test_err_image_path,dpi=600) + * plt.show() + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_plt, __pyx_n_s_title); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_12 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_kp_s_equation_err) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_equation_err); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + + /* "LAIProcess.pyx":126 + * plt.scatter(x_arr,err_lai) + * plt.title("equation-err") + * plt.savefig(test_err_image_path,dpi=600) # <<<<<<<<<<<<<< + * plt.show() + * return err + */ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_plt, __pyx_n_s_savefig); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_test_err_image_path); + __Pyx_GIVEREF(__pyx_v_test_err_image_path); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_test_err_image_path); + __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dpi, __pyx_int_600) < 0) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "LAIProcess.pyx":127 + * plt.title("equation-err") + * plt.savefig(test_err_image_path,dpi=600) + * plt.show() # <<<<<<<<<<<<<< + * return err + * + */ + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_plt, __pyx_n_s_show); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_11, function); + } + } + __pyx_t_9 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "LAIProcess.pyx":122 + * # logger.info("\n\n") + * + * if draw_flag: # <<<<<<<<<<<<<< + * from matplotlib import pyplot as plt + * plt.scatter(x_arr,err_lai) + */ + } + + /* "LAIProcess.pyx":128 + * plt.savefig(test_err_image_path,dpi=600) + * plt.show() + * return err # <<<<<<<<<<<<<< + * + * def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_err); + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "LAIProcess.pyx":82 + * return h[0] + * + * def test_WMCModel(lai_waiter_inc_sigma_list,param_arr,lai_X0,test_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("LAIProcess.test_WMCModel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_err); + __Pyx_XDECREF(__pyx_v_err_f); + __Pyx_XDECREF(__pyx_v_x_arr); + __Pyx_XDECREF(__pyx_v_err_lai); + __Pyx_XDECREF(__pyx_v_lai_waiter_inc_sigma_item); + __Pyx_XDECREF(__pyx_v_sample_time); + __Pyx_XDECREF(__pyx_v_sample_code); + __Pyx_XDECREF(__pyx_v_sample_lon); + __Pyx_XDECREF(__pyx_v_sample_lat); + __Pyx_XDECREF(__pyx_v_sample_lai); + __Pyx_XDECREF(__pyx_v_sample_sigma); + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_X0); + __Pyx_XDECREF(__pyx_v_h); + __Pyx_XDECREF(__pyx_v_temp_err); + __Pyx_XDECREF(__pyx_v_plt); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":130 + * return err + * + * def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): # <<<<<<<<<<<<<< + * + * if(sigma<0 ): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10LAIProcess_7processs_WMCModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10LAIProcess_7processs_WMCModel = {"processs_WMCModel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10LAIProcess_7processs_WMCModel, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10LAIProcess_7processs_WMCModel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_param_arr = 0; + PyObject *__pyx_v_lai_X0 = 0; + PyObject *__pyx_v_sigma = 0; + PyObject *__pyx_v_inc_angle = 0; + PyObject *__pyx_v_soil_water = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("processs_WMCModel (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_param_arr,&__pyx_n_s_lai_X0,&__pyx_n_s_sigma,&__pyx_n_s_inc_angle,&__pyx_n_s_soil_water,0}; + PyObject* values[5] = {0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_param_arr)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lai_X0)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("processs_WMCModel", 1, 5, 5, 1); __PYX_ERR(0, 130, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("processs_WMCModel", 1, 5, 5, 2); __PYX_ERR(0, 130, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inc_angle)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("processs_WMCModel", 1, 5, 5, 3); __PYX_ERR(0, 130, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_soil_water)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("processs_WMCModel", 1, 5, 5, 4); __PYX_ERR(0, 130, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "processs_WMCModel") < 0)) __PYX_ERR(0, 130, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_param_arr = values[0]; + __pyx_v_lai_X0 = values[1]; + __pyx_v_sigma = values[2]; + __pyx_v_inc_angle = values[3]; + __pyx_v_soil_water = values[4]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("processs_WMCModel", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 130, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("LAIProcess.processs_WMCModel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10LAIProcess_6processs_WMCModel(__pyx_self, __pyx_v_param_arr, __pyx_v_lai_X0, __pyx_v_sigma, __pyx_v_inc_angle, __pyx_v_soil_water); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":134 + * if(sigma<0 ): + * return np.nan + * def f(X): # <<<<<<<<<<<<<< + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,soil_water,inc_angle,sigma )] + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_10LAIProcess_17processs_WMCModel_1f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_10LAIProcess_17processs_WMCModel_1f = {"f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10LAIProcess_17processs_WMCModel_1f, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10LAIProcess_17processs_WMCModel_1f(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_X = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("f (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_X,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_X)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f") < 0)) __PYX_ERR(0, 134, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_X = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("f", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 134, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("LAIProcess.processs_WMCModel.f", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_10LAIProcess_17processs_WMCModel_f(__pyx_self, __pyx_v_X); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10LAIProcess_17processs_WMCModel_f(PyObject *__pyx_self, PyObject *__pyx_v_X) { + struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *__pyx_cur_scope; + struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *__pyx_outer_scope; + PyObject *__pyx_v_lai = NULL; + PyObject *__pyx_v_eqs = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("f", 0); + __pyx_outer_scope = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope = __pyx_outer_scope; + + /* "LAIProcess.pyx":135 + * return np.nan + * def f(X): + * lai=X[0] # <<<<<<<<<<<<<< + * eqs=[WMCModel(param_arr,lai,soil_water,inc_angle,sigma )] + * return eqs + */ + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_X, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lai = __pyx_t_1; + __pyx_t_1 = 0; + + /* "LAIProcess.pyx":136 + * def f(X): + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,soil_water,inc_angle,sigma )] # <<<<<<<<<<<<<< + * return eqs + * h = leastsq(f, [lai_X0]) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WMCModel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(!__pyx_cur_scope->__pyx_v_param_arr)) { __Pyx_RaiseClosureNameError("param_arr"); __PYX_ERR(0, 136, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_v_soil_water)) { __Pyx_RaiseClosureNameError("soil_water"); __PYX_ERR(0, 136, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_v_inc_angle)) { __Pyx_RaiseClosureNameError("inc_angle"); __PYX_ERR(0, 136, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_v_sigma)) { __Pyx_RaiseClosureNameError("sigma"); __PYX_ERR(0, 136, __pyx_L1_error) } + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_param_arr, __pyx_v_lai, __pyx_cur_scope->__pyx_v_soil_water, __pyx_cur_scope->__pyx_v_inc_angle, __pyx_cur_scope->__pyx_v_sigma}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[6] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_param_arr, __pyx_v_lai, __pyx_cur_scope->__pyx_v_soil_water, __pyx_cur_scope->__pyx_v_inc_angle, __pyx_cur_scope->__pyx_v_sigma}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + } else + #endif + { + __pyx_t_5 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_param_arr); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_param_arr); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_cur_scope->__pyx_v_param_arr); + __Pyx_INCREF(__pyx_v_lai); + __Pyx_GIVEREF(__pyx_v_lai); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_lai); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_soil_water); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_soil_water); + PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_cur_scope->__pyx_v_soil_water); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inc_angle); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_inc_angle); + PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_cur_scope->__pyx_v_inc_angle); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sigma); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sigma); + PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_cur_scope->__pyx_v_sigma); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_v_eqs = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "LAIProcess.pyx":137 + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,soil_water,inc_angle,sigma )] + * return eqs # <<<<<<<<<<<<<< + * h = leastsq(f, [lai_X0]) + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_eqs); + __pyx_r = __pyx_v_eqs; + goto __pyx_L0; + + /* "LAIProcess.pyx":134 + * if(sigma<0 ): + * return np.nan + * def f(X): # <<<<<<<<<<<<<< + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,soil_water,inc_angle,sigma )] + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("LAIProcess.processs_WMCModel.f", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lai); + __Pyx_XDECREF(__pyx_v_eqs); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":130 + * return err + * + * def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): # <<<<<<<<<<<<<< + * + * if(sigma<0 ): + */ + +static PyObject *__pyx_pf_10LAIProcess_6processs_WMCModel(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_param_arr, PyObject *__pyx_v_lai_X0, PyObject *__pyx_v_sigma, PyObject *__pyx_v_inc_angle, PyObject *__pyx_v_soil_water) { + struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *__pyx_cur_scope; + PyObject *__pyx_v_f = 0; + PyObject *__pyx_v_h = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("processs_WMCModel", 0); + __pyx_cur_scope = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *)__pyx_tp_new_10LAIProcess___pyx_scope_struct_2_processs_WMCModel(__pyx_ptype_10LAIProcess___pyx_scope_struct_2_processs_WMCModel, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 130, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_v_param_arr = __pyx_v_param_arr; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_param_arr); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_param_arr); + __pyx_cur_scope->__pyx_v_sigma = __pyx_v_sigma; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sigma); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sigma); + __pyx_cur_scope->__pyx_v_inc_angle = __pyx_v_inc_angle; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inc_angle); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_inc_angle); + __pyx_cur_scope->__pyx_v_soil_water = __pyx_v_soil_water; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_soil_water); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_soil_water); + + /* "LAIProcess.pyx":132 + * def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): + * + * if(sigma<0 ): # <<<<<<<<<<<<<< + * return np.nan + * def f(X): + */ + __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_sigma, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "LAIProcess.pyx":133 + * + * if(sigma<0 ): + * return np.nan # <<<<<<<<<<<<<< + * def f(X): + * lai=X[0] + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "LAIProcess.pyx":132 + * def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): + * + * if(sigma<0 ): # <<<<<<<<<<<<<< + * return np.nan + * def f(X): + */ + } + + /* "LAIProcess.pyx":134 + * if(sigma<0 ): + * return np.nan + * def f(X): # <<<<<<<<<<<<<< + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,soil_water,inc_angle,sigma )] + */ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10LAIProcess_17processs_WMCModel_1f, 0, __pyx_n_s_processs_WMCModel_locals_f, ((PyObject*)__pyx_cur_scope), __pyx_n_s_LAIProcess, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_f = __pyx_t_3; + __pyx_t_3 = 0; + + /* "LAIProcess.pyx":138 + * eqs=[WMCModel(param_arr,lai,soil_water,inc_angle,sigma )] + * return eqs + * h = leastsq(f, [lai_X0]) # <<<<<<<<<<<<<< + * + * return h[0][0] + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_leastsq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_lai_X0); + __Pyx_GIVEREF(__pyx_v_lai_X0); + PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_lai_X0); + __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_f, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_f, __pyx_t_4}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_5) { + __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; + } + __Pyx_INCREF(__pyx_v_f); + __Pyx_GIVEREF(__pyx_v_f); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_f); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_h = __pyx_t_3; + __pyx_t_3 = 0; + + /* "LAIProcess.pyx":140 + * h = leastsq(f, [lai_X0]) + * + * return h[0][0] # <<<<<<<<<<<<<< + * + * # Cython + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_h, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "LAIProcess.pyx":130 + * return err + * + * def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): # <<<<<<<<<<<<<< + * + * if(sigma<0 ): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("LAIProcess.processs_WMCModel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_f); + __Pyx_XDECREF(__pyx_v_h); + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "LAIProcess.pyx":143 + * + * # Cython + * cpdef np.ndarray[double,ndim=2] process_tiff(np.ndarray[double,ndim=2] sigma_tiff, # <<<<<<<<<<<<<< + * np.ndarray[double,ndim=2] inc_tiff, + * np.ndarray[double,ndim=2] soil_water_tiff, + */ + +static PyObject *__pyx_pw_10LAIProcess_9process_tiff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyArrayObject *__pyx_f_10LAIProcess_process_tiff(PyArrayObject *__pyx_v_sigma_tiff, PyArrayObject *__pyx_v_inc_tiff, PyArrayObject *__pyx_v_soil_water_tiff, PyArrayObject *__pyx_v_param_arr, double __pyx_v_lai_X0, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyArrayObject *__pyx_v_result = 0; + CYTHON_UNUSED int __pyx_v_param_arr_length; + int __pyx_v_height; + int __pyx_v_width; + int __pyx_v_i; + int __pyx_v_j; + double __pyx_v_temp; + __Pyx_LocalBuf_ND __pyx_pybuffernd_inc_tiff; + __Pyx_Buffer __pyx_pybuffer_inc_tiff; + __Pyx_LocalBuf_ND __pyx_pybuffernd_param_arr; + __Pyx_Buffer __pyx_pybuffer_param_arr; + __Pyx_LocalBuf_ND __pyx_pybuffernd_result; + __Pyx_Buffer __pyx_pybuffer_result; + __Pyx_LocalBuf_ND __pyx_pybuffernd_sigma_tiff; + __Pyx_Buffer __pyx_pybuffer_sigma_tiff; + __Pyx_LocalBuf_ND __pyx_pybuffernd_soil_water_tiff; + __Pyx_Buffer __pyx_pybuffer_soil_water_tiff; + PyArrayObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + double __pyx_t_13; + int __pyx_t_14; + double __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process_tiff", 0); + __pyx_pybuffer_result.pybuffer.buf = NULL; + __pyx_pybuffer_result.refcount = 0; + __pyx_pybuffernd_result.data = NULL; + __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; + __pyx_pybuffer_sigma_tiff.pybuffer.buf = NULL; + __pyx_pybuffer_sigma_tiff.refcount = 0; + __pyx_pybuffernd_sigma_tiff.data = NULL; + __pyx_pybuffernd_sigma_tiff.rcbuffer = &__pyx_pybuffer_sigma_tiff; + __pyx_pybuffer_inc_tiff.pybuffer.buf = NULL; + __pyx_pybuffer_inc_tiff.refcount = 0; + __pyx_pybuffernd_inc_tiff.data = NULL; + __pyx_pybuffernd_inc_tiff.rcbuffer = &__pyx_pybuffer_inc_tiff; + __pyx_pybuffer_soil_water_tiff.pybuffer.buf = NULL; + __pyx_pybuffer_soil_water_tiff.refcount = 0; + __pyx_pybuffernd_soil_water_tiff.data = NULL; + __pyx_pybuffernd_soil_water_tiff.rcbuffer = &__pyx_pybuffer_soil_water_tiff; + __pyx_pybuffer_param_arr.pybuffer.buf = NULL; + __pyx_pybuffer_param_arr.refcount = 0; + __pyx_pybuffernd_param_arr.data = NULL; + __pyx_pybuffernd_param_arr.rcbuffer = &__pyx_pybuffer_param_arr; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer, (PyObject*)__pyx_v_sigma_tiff, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 143, __pyx_L1_error) + } + __pyx_pybuffernd_sigma_tiff.diminfo[0].strides = __pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sigma_tiff.diminfo[0].shape = __pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sigma_tiff.diminfo[1].strides = __pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sigma_tiff.diminfo[1].shape = __pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer, (PyObject*)__pyx_v_inc_tiff, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 143, __pyx_L1_error) + } + __pyx_pybuffernd_inc_tiff.diminfo[0].strides = __pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_inc_tiff.diminfo[0].shape = __pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_inc_tiff.diminfo[1].strides = __pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_inc_tiff.diminfo[1].shape = __pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer, (PyObject*)__pyx_v_soil_water_tiff, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 143, __pyx_L1_error) + } + __pyx_pybuffernd_soil_water_tiff.diminfo[0].strides = __pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_soil_water_tiff.diminfo[0].shape = __pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_soil_water_tiff.diminfo[1].strides = __pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_soil_water_tiff.diminfo[1].shape = __pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_param_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_param_arr, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 143, __pyx_L1_error) + } + __pyx_pybuffernd_param_arr.diminfo[0].strides = __pyx_pybuffernd_param_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_param_arr.diminfo[0].shape = __pyx_pybuffernd_param_arr.rcbuffer->pybuffer.shape[0]; + + /* "LAIProcess.pyx":149 + * double lai_X0): + * + * cdef np.ndarray[double,ndim=2] result=sigma_tiff # <<<<<<<<<<<<<< + * cdef int param_arr_length=param_arr.shape[0] + * cdef int height=sigma_tiff.shape[0] + */ + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_sigma_tiff), &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { + __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; + __PYX_ERR(0, 149, __pyx_L1_error) + } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; + } + } + __Pyx_INCREF(((PyObject *)__pyx_v_sigma_tiff)); + __pyx_v_result = ((PyArrayObject *)__pyx_v_sigma_tiff); + + /* "LAIProcess.pyx":150 + * + * cdef np.ndarray[double,ndim=2] result=sigma_tiff + * cdef int param_arr_length=param_arr.shape[0] # <<<<<<<<<<<<<< + * cdef int height=sigma_tiff.shape[0] + * cdef int width=sigma_tiff.shape[1] + */ + __pyx_v_param_arr_length = (__pyx_v_param_arr->dimensions[0]); + + /* "LAIProcess.pyx":151 + * cdef np.ndarray[double,ndim=2] result=sigma_tiff + * cdef int param_arr_length=param_arr.shape[0] + * cdef int height=sigma_tiff.shape[0] # <<<<<<<<<<<<<< + * cdef int width=sigma_tiff.shape[1] + * cdef int i=0 + */ + __pyx_v_height = (__pyx_v_sigma_tiff->dimensions[0]); + + /* "LAIProcess.pyx":152 + * cdef int param_arr_length=param_arr.shape[0] + * cdef int height=sigma_tiff.shape[0] + * cdef int width=sigma_tiff.shape[1] # <<<<<<<<<<<<<< + * cdef int i=0 + * cdef int j=0 + */ + __pyx_v_width = (__pyx_v_sigma_tiff->dimensions[1]); + + /* "LAIProcess.pyx":153 + * cdef int height=sigma_tiff.shape[0] + * cdef int width=sigma_tiff.shape[1] + * cdef int i=0 # <<<<<<<<<<<<<< + * cdef int j=0 + * cdef double temp=0 + */ + __pyx_v_i = 0; + + /* "LAIProcess.pyx":154 + * cdef int width=sigma_tiff.shape[1] + * cdef int i=0 + * cdef int j=0 # <<<<<<<<<<<<<< + * cdef double temp=0 + * + */ + __pyx_v_j = 0; + + /* "LAIProcess.pyx":155 + * cdef int i=0 + * cdef int j=0 + * cdef double temp=0 # <<<<<<<<<<<<<< + * + * while i=0 else np.nan + */ + while (1) { + __pyx_t_1 = ((__pyx_v_j < __pyx_v_width) != 0); + if (!__pyx_t_1) break; + + /* "LAIProcess.pyx":160 + * j=0 + * while j=0 else np.nan + * result[i,j]=temp + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_processs_WMCModel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_lai_X0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __pyx_v_i; + __pyx_t_6 = __pyx_v_j; + __pyx_t_7 = -1; + if (__pyx_t_5 < 0) { + __pyx_t_5 += __pyx_pybuffernd_sigma_tiff.diminfo[0].shape; + if (unlikely(__pyx_t_5 < 0)) __pyx_t_7 = 0; + } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_sigma_tiff.diminfo[0].shape)) __pyx_t_7 = 0; + if (__pyx_t_6 < 0) { + __pyx_t_6 += __pyx_pybuffernd_sigma_tiff.diminfo[1].shape; + if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 1; + } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_sigma_tiff.diminfo[1].shape)) __pyx_t_7 = 1; + if (unlikely(__pyx_t_7 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_7); + __PYX_ERR(0, 160, __pyx_L1_error) + } + __pyx_t_8 = PyFloat_FromDouble((*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_sigma_tiff.diminfo[0].strides, __pyx_t_6, __pyx_pybuffernd_sigma_tiff.diminfo[1].strides))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __pyx_v_i; + __pyx_t_5 = __pyx_v_j; + __pyx_t_7 = -1; + if (__pyx_t_6 < 0) { + __pyx_t_6 += __pyx_pybuffernd_inc_tiff.diminfo[0].shape; + if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; + } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_inc_tiff.diminfo[0].shape)) __pyx_t_7 = 0; + if (__pyx_t_5 < 0) { + __pyx_t_5 += __pyx_pybuffernd_inc_tiff.diminfo[1].shape; + if (unlikely(__pyx_t_5 < 0)) __pyx_t_7 = 1; + } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_inc_tiff.diminfo[1].shape)) __pyx_t_7 = 1; + if (unlikely(__pyx_t_7 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_7); + __PYX_ERR(0, 160, __pyx_L1_error) + } + __pyx_t_9 = PyFloat_FromDouble((*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_inc_tiff.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_inc_tiff.diminfo[1].strides))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = __pyx_v_i; + __pyx_t_6 = __pyx_v_j; + __pyx_t_7 = -1; + if (__pyx_t_5 < 0) { + __pyx_t_5 += __pyx_pybuffernd_soil_water_tiff.diminfo[0].shape; + if (unlikely(__pyx_t_5 < 0)) __pyx_t_7 = 0; + } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_soil_water_tiff.diminfo[0].shape)) __pyx_t_7 = 0; + if (__pyx_t_6 < 0) { + __pyx_t_6 += __pyx_pybuffernd_soil_water_tiff.diminfo[1].shape; + if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 1; + } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_soil_water_tiff.diminfo[1].shape)) __pyx_t_7 = 1; + if (unlikely(__pyx_t_7 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_7); + __PYX_ERR(0, 160, __pyx_L1_error) + } + __pyx_t_10 = PyFloat_FromDouble((*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_soil_water_tiff.diminfo[0].strides, __pyx_t_6, __pyx_pybuffernd_soil_water_tiff.diminfo[1].strides))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_11)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[6] = {__pyx_t_11, ((PyObject *)__pyx_v_param_arr), __pyx_t_4, __pyx_t_8, __pyx_t_9, __pyx_t_10}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[6] = {__pyx_t_11, ((PyObject *)__pyx_v_param_arr), __pyx_t_4, __pyx_t_8, __pyx_t_9, __pyx_t_10}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + } else + #endif + { + __pyx_t_12 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + if (__pyx_t_11) { + __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; + } + __Pyx_INCREF(((PyObject *)__pyx_v_param_arr)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_param_arr)); + PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_7, ((PyObject *)__pyx_v_param_arr)); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_7, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_7, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_12, 4+__pyx_t_7, __pyx_t_10); + __pyx_t_4 = 0; + __pyx_t_8 = 0; + __pyx_t_9 = 0; + __pyx_t_10 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_temp = __pyx_t_13; + + /* "LAIProcess.pyx":161 + * while j=0 else np.nan # <<<<<<<<<<<<<< + * result[i,j]=temp + * j=j+1 + */ + __pyx_t_14 = ((__pyx_v_temp < 10.0) != 0); + if (__pyx_t_14) { + } else { + __pyx_t_1 = __pyx_t_14; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_14 = ((__pyx_v_temp >= 0.0) != 0); + __pyx_t_1 = __pyx_t_14; + __pyx_L7_bool_binop_done:; + if (__pyx_t_1) { + __pyx_t_13 = __pyx_v_temp; + } else { + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_13 = __pyx_t_15; + } + __pyx_v_temp = __pyx_t_13; + + /* "LAIProcess.pyx":162 + * temp = processs_WMCModel(param_arr,lai_X0,sigma_tiff[i,j],inc_tiff[i,j],soil_water_tiff[i,j]) + * temp=temp if temp<10 and temp>=0 else np.nan + * result[i,j]=temp # <<<<<<<<<<<<<< + * j=j+1 + * i=i+1 + */ + __pyx_t_6 = __pyx_v_i; + __pyx_t_5 = __pyx_v_j; + __pyx_t_7 = -1; + if (__pyx_t_6 < 0) { + __pyx_t_6 += __pyx_pybuffernd_result.diminfo[0].shape; + if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; + } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; + if (__pyx_t_5 < 0) { + __pyx_t_5 += __pyx_pybuffernd_result.diminfo[1].shape; + if (unlikely(__pyx_t_5 < 0)) __pyx_t_7 = 1; + } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_7 = 1; + if (unlikely(__pyx_t_7 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_7); + __PYX_ERR(0, 162, __pyx_L1_error) + } + *__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_result.diminfo[1].strides) = __pyx_v_temp; + + /* "LAIProcess.pyx":163 + * temp=temp if temp<10 and temp>=0 else np.nan + * result[i,j]=temp + * j=j+1 # <<<<<<<<<<<<<< + * i=i+1 + * return result + */ + __pyx_v_j = (__pyx_v_j + 1); + } + + /* "LAIProcess.pyx":164 + * result[i,j]=temp + * j=j+1 + * i=i+1 # <<<<<<<<<<<<<< + * return result + * + */ + __pyx_v_i = (__pyx_v_i + 1); + } + + /* "LAIProcess.pyx":165 + * j=j+1 + * i=i+1 + * return result # <<<<<<<<<<<<<< + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyArrayObject *)__pyx_v_result); + goto __pyx_L0; + + /* "LAIProcess.pyx":143 + * + * # Cython + * cpdef np.ndarray[double,ndim=2] process_tiff(np.ndarray[double,ndim=2] sigma_tiff, # <<<<<<<<<<<<<< + * np.ndarray[double,ndim=2] inc_tiff, + * np.ndarray[double,ndim=2] soil_water_tiff, + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_param_arr.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("LAIProcess.process_tiff", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_param_arr.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_10LAIProcess_9process_tiff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_10LAIProcess_9process_tiff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyArrayObject *__pyx_v_sigma_tiff = 0; + PyArrayObject *__pyx_v_inc_tiff = 0; + PyArrayObject *__pyx_v_soil_water_tiff = 0; + PyArrayObject *__pyx_v_param_arr = 0; + double __pyx_v_lai_X0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("process_tiff (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sigma_tiff,&__pyx_n_s_inc_tiff,&__pyx_n_s_soil_water_tiff,&__pyx_n_s_param_arr,&__pyx_n_s_lai_X0,0}; + PyObject* values[5] = {0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma_tiff)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inc_tiff)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("process_tiff", 1, 5, 5, 1); __PYX_ERR(0, 143, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_soil_water_tiff)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("process_tiff", 1, 5, 5, 2); __PYX_ERR(0, 143, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_param_arr)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("process_tiff", 1, 5, 5, 3); __PYX_ERR(0, 143, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lai_X0)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("process_tiff", 1, 5, 5, 4); __PYX_ERR(0, 143, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "process_tiff") < 0)) __PYX_ERR(0, 143, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_sigma_tiff = ((PyArrayObject *)values[0]); + __pyx_v_inc_tiff = ((PyArrayObject *)values[1]); + __pyx_v_soil_water_tiff = ((PyArrayObject *)values[2]); + __pyx_v_param_arr = ((PyArrayObject *)values[3]); + __pyx_v_lai_X0 = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_lai_X0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("process_tiff", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 143, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("LAIProcess.process_tiff", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sigma_tiff), __pyx_ptype_5numpy_ndarray, 1, "sigma_tiff", 0))) __PYX_ERR(0, 143, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inc_tiff), __pyx_ptype_5numpy_ndarray, 1, "inc_tiff", 0))) __PYX_ERR(0, 144, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_soil_water_tiff), __pyx_ptype_5numpy_ndarray, 1, "soil_water_tiff", 0))) __PYX_ERR(0, 145, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_param_arr), __pyx_ptype_5numpy_ndarray, 1, "param_arr", 0))) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_r = __pyx_pf_10LAIProcess_8process_tiff(__pyx_self, __pyx_v_sigma_tiff, __pyx_v_inc_tiff, __pyx_v_soil_water_tiff, __pyx_v_param_arr, __pyx_v_lai_X0); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_10LAIProcess_8process_tiff(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_sigma_tiff, PyArrayObject *__pyx_v_inc_tiff, PyArrayObject *__pyx_v_soil_water_tiff, PyArrayObject *__pyx_v_param_arr, double __pyx_v_lai_X0) { + __Pyx_LocalBuf_ND __pyx_pybuffernd_inc_tiff; + __Pyx_Buffer __pyx_pybuffer_inc_tiff; + __Pyx_LocalBuf_ND __pyx_pybuffernd_param_arr; + __Pyx_Buffer __pyx_pybuffer_param_arr; + __Pyx_LocalBuf_ND __pyx_pybuffernd_sigma_tiff; + __Pyx_Buffer __pyx_pybuffer_sigma_tiff; + __Pyx_LocalBuf_ND __pyx_pybuffernd_soil_water_tiff; + __Pyx_Buffer __pyx_pybuffer_soil_water_tiff; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("process_tiff", 0); + __pyx_pybuffer_sigma_tiff.pybuffer.buf = NULL; + __pyx_pybuffer_sigma_tiff.refcount = 0; + __pyx_pybuffernd_sigma_tiff.data = NULL; + __pyx_pybuffernd_sigma_tiff.rcbuffer = &__pyx_pybuffer_sigma_tiff; + __pyx_pybuffer_inc_tiff.pybuffer.buf = NULL; + __pyx_pybuffer_inc_tiff.refcount = 0; + __pyx_pybuffernd_inc_tiff.data = NULL; + __pyx_pybuffernd_inc_tiff.rcbuffer = &__pyx_pybuffer_inc_tiff; + __pyx_pybuffer_soil_water_tiff.pybuffer.buf = NULL; + __pyx_pybuffer_soil_water_tiff.refcount = 0; + __pyx_pybuffernd_soil_water_tiff.data = NULL; + __pyx_pybuffernd_soil_water_tiff.rcbuffer = &__pyx_pybuffer_soil_water_tiff; + __pyx_pybuffer_param_arr.pybuffer.buf = NULL; + __pyx_pybuffer_param_arr.refcount = 0; + __pyx_pybuffernd_param_arr.data = NULL; + __pyx_pybuffernd_param_arr.rcbuffer = &__pyx_pybuffer_param_arr; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer, (PyObject*)__pyx_v_sigma_tiff, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 143, __pyx_L1_error) + } + __pyx_pybuffernd_sigma_tiff.diminfo[0].strides = __pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sigma_tiff.diminfo[0].shape = __pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sigma_tiff.diminfo[1].strides = __pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sigma_tiff.diminfo[1].shape = __pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer, (PyObject*)__pyx_v_inc_tiff, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 143, __pyx_L1_error) + } + __pyx_pybuffernd_inc_tiff.diminfo[0].strides = __pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_inc_tiff.diminfo[0].shape = __pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_inc_tiff.diminfo[1].strides = __pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_inc_tiff.diminfo[1].shape = __pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer, (PyObject*)__pyx_v_soil_water_tiff, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 143, __pyx_L1_error) + } + __pyx_pybuffernd_soil_water_tiff.diminfo[0].strides = __pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_soil_water_tiff.diminfo[0].shape = __pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_soil_water_tiff.diminfo[1].strides = __pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_soil_water_tiff.diminfo[1].shape = __pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_param_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_param_arr, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 143, __pyx_L1_error) + } + __pyx_pybuffernd_param_arr.diminfo[0].strides = __pyx_pybuffernd_param_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_param_arr.diminfo[0].shape = __pyx_pybuffernd_param_arr.rcbuffer->pybuffer.shape[0]; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_10LAIProcess_process_tiff(__pyx_v_sigma_tiff, __pyx_v_inc_tiff, __pyx_v_soil_water_tiff, __pyx_v_param_arr, __pyx_v_lai_X0, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_param_arr.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("LAIProcess.process_tiff", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_inc_tiff.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_param_arr.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma_tiff.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_soil_water_tiff.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":736 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":739 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":742 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":745 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":748 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); + if (__pyx_t_1) { + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":752 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< + * else: + * return () + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); + __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + } + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":754 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< + * + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_r = __pyx_empty_tuple; + goto __pyx_L0; + } + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_array_base", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":932 + * + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) + * + */ + Py_INCREF(__pyx_v_base); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":933 + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":936 + * + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: + * return None + */ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":938 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< + * return base + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + } + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":939 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< + * + * # Versions of the import_* functions which are more suitable for + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_array", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":945 + * cdef inline int import_array() except -1: + * try: + * __pyx_import_array() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") + */ + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 945, __pyx_L3_error) + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":946 + * try: + * __pyx_import_array() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.multiarray failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 946, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":947 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 947, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 947, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_umath", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":951 + * cdef inline int import_umath() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 951, __pyx_L3_error) + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":952 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 952, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":953 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 953, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 953, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_ufunc", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":957 + * cdef inline int import_ufunc() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 957, __pyx_L3_error) + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":958 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 958, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":959 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef extern from *: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 959, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 959, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":969 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` + */ + +static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_timedelta64_object", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":981 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":969 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":984 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` + */ + +static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_datetime64_object", 0); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":996 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":984 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":999 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object + */ + +static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { + npy_datetime __pyx_r; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1006 + * also needed. That can be found using `get_datetime64_unit`. + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":999 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1009 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object + */ + +static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { + npy_timedelta __pyx_r; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1013 + * returns the int64 value underlying scalar numpy timedelta64 object + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1009 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + +static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { + NPY_DATETIMEUNIT __pyx_r; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1020 + * returns the unit part of the dtype for a numpy datetime64 object. + * """ + * return (obj).obmeta.base # <<<<<<<<<<<<<< + */ + __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); + goto __pyx_L0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +static struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *__pyx_freelist_10LAIProcess___pyx_scope_struct__train_WMCmodel[8]; +static int __pyx_freecount_10LAIProcess___pyx_scope_struct__train_WMCmodel = 0; + +static PyObject *__pyx_tp_new_10LAIProcess___pyx_scope_struct__train_WMCmodel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_10LAIProcess___pyx_scope_struct__train_WMCmodel > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel)))) { + o = (PyObject*)__pyx_freelist_10LAIProcess___pyx_scope_struct__train_WMCmodel[--__pyx_freecount_10LAIProcess___pyx_scope_struct__train_WMCmodel]; + memset(o, 0, sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_10LAIProcess___pyx_scope_struct__train_WMCmodel(PyObject *o) { + struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *p = (struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_lai_water_inc_sigma_list); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_10LAIProcess___pyx_scope_struct__train_WMCmodel < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel)))) { + __pyx_freelist_10LAIProcess___pyx_scope_struct__train_WMCmodel[__pyx_freecount_10LAIProcess___pyx_scope_struct__train_WMCmodel++] = ((struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_10LAIProcess___pyx_scope_struct__train_WMCmodel(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *p = (struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *)o; + if (p->__pyx_v_lai_water_inc_sigma_list) { + e = (*v)(p->__pyx_v_lai_water_inc_sigma_list, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_10LAIProcess___pyx_scope_struct__train_WMCmodel(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *p = (struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel *)o; + tmp = ((PyObject*)p->__pyx_v_lai_water_inc_sigma_list); + p->__pyx_v_lai_water_inc_sigma_list = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_10LAIProcess___pyx_scope_struct__train_WMCmodel = { + PyVarObject_HEAD_INIT(0, 0) + "LAIProcess.__pyx_scope_struct__train_WMCmodel", /*tp_name*/ + sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct__train_WMCmodel), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_10LAIProcess___pyx_scope_struct__train_WMCmodel, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_10LAIProcess___pyx_scope_struct__train_WMCmodel, /*tp_traverse*/ + __pyx_tp_clear_10LAIProcess___pyx_scope_struct__train_WMCmodel, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_10LAIProcess___pyx_scope_struct__train_WMCmodel, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *__pyx_freelist_10LAIProcess___pyx_scope_struct_1_test_WMCModel[8]; +static int __pyx_freecount_10LAIProcess___pyx_scope_struct_1_test_WMCModel = 0; + +static PyObject *__pyx_tp_new_10LAIProcess___pyx_scope_struct_1_test_WMCModel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_10LAIProcess___pyx_scope_struct_1_test_WMCModel > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel)))) { + o = (PyObject*)__pyx_freelist_10LAIProcess___pyx_scope_struct_1_test_WMCModel[--__pyx_freecount_10LAIProcess___pyx_scope_struct_1_test_WMCModel]; + memset(o, 0, sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_10LAIProcess___pyx_scope_struct_1_test_WMCModel(PyObject *o) { + struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *p = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_csv_sigma); + Py_CLEAR(p->__pyx_v_param_arr); + Py_CLEAR(p->__pyx_v_sample_inc); + Py_CLEAR(p->__pyx_v_sample_soil); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_10LAIProcess___pyx_scope_struct_1_test_WMCModel < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel)))) { + __pyx_freelist_10LAIProcess___pyx_scope_struct_1_test_WMCModel[__pyx_freecount_10LAIProcess___pyx_scope_struct_1_test_WMCModel++] = ((struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_10LAIProcess___pyx_scope_struct_1_test_WMCModel(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *p = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *)o; + if (p->__pyx_v_csv_sigma) { + e = (*v)(p->__pyx_v_csv_sigma, a); if (e) return e; + } + if (p->__pyx_v_param_arr) { + e = (*v)(p->__pyx_v_param_arr, a); if (e) return e; + } + if (p->__pyx_v_sample_inc) { + e = (*v)(p->__pyx_v_sample_inc, a); if (e) return e; + } + if (p->__pyx_v_sample_soil) { + e = (*v)(p->__pyx_v_sample_soil, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_10LAIProcess___pyx_scope_struct_1_test_WMCModel(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *p = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel *)o; + tmp = ((PyObject*)p->__pyx_v_csv_sigma); + p->__pyx_v_csv_sigma = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_param_arr); + p->__pyx_v_param_arr = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_sample_inc); + p->__pyx_v_sample_inc = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_sample_soil); + p->__pyx_v_sample_soil = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_10LAIProcess___pyx_scope_struct_1_test_WMCModel = { + PyVarObject_HEAD_INIT(0, 0) + "LAIProcess.__pyx_scope_struct_1_test_WMCModel", /*tp_name*/ + sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct_1_test_WMCModel), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_10LAIProcess___pyx_scope_struct_1_test_WMCModel, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_10LAIProcess___pyx_scope_struct_1_test_WMCModel, /*tp_traverse*/ + __pyx_tp_clear_10LAIProcess___pyx_scope_struct_1_test_WMCModel, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_10LAIProcess___pyx_scope_struct_1_test_WMCModel, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *__pyx_freelist_10LAIProcess___pyx_scope_struct_2_processs_WMCModel[8]; +static int __pyx_freecount_10LAIProcess___pyx_scope_struct_2_processs_WMCModel = 0; + +static PyObject *__pyx_tp_new_10LAIProcess___pyx_scope_struct_2_processs_WMCModel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_10LAIProcess___pyx_scope_struct_2_processs_WMCModel > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel)))) { + o = (PyObject*)__pyx_freelist_10LAIProcess___pyx_scope_struct_2_processs_WMCModel[--__pyx_freecount_10LAIProcess___pyx_scope_struct_2_processs_WMCModel]; + memset(o, 0, sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + return o; +} + +static void __pyx_tp_dealloc_10LAIProcess___pyx_scope_struct_2_processs_WMCModel(PyObject *o) { + struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *p = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_inc_angle); + Py_CLEAR(p->__pyx_v_param_arr); + Py_CLEAR(p->__pyx_v_sigma); + Py_CLEAR(p->__pyx_v_soil_water); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_10LAIProcess___pyx_scope_struct_2_processs_WMCModel < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel)))) { + __pyx_freelist_10LAIProcess___pyx_scope_struct_2_processs_WMCModel[__pyx_freecount_10LAIProcess___pyx_scope_struct_2_processs_WMCModel++] = ((struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_10LAIProcess___pyx_scope_struct_2_processs_WMCModel(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *p = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *)o; + if (p->__pyx_v_inc_angle) { + e = (*v)(p->__pyx_v_inc_angle, a); if (e) return e; + } + if (p->__pyx_v_param_arr) { + e = (*v)(p->__pyx_v_param_arr, a); if (e) return e; + } + if (p->__pyx_v_sigma) { + e = (*v)(p->__pyx_v_sigma, a); if (e) return e; + } + if (p->__pyx_v_soil_water) { + e = (*v)(p->__pyx_v_soil_water, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_10LAIProcess___pyx_scope_struct_2_processs_WMCModel(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *p = (struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel *)o; + tmp = ((PyObject*)p->__pyx_v_inc_angle); + p->__pyx_v_inc_angle = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_param_arr); + p->__pyx_v_param_arr = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_sigma); + p->__pyx_v_sigma = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_soil_water); + p->__pyx_v_soil_water = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_10LAIProcess___pyx_scope_struct_2_processs_WMCModel = { + PyVarObject_HEAD_INIT(0, 0) + "LAIProcess.__pyx_scope_struct_2_processs_WMCModel", /*tp_name*/ + sizeof(struct __pyx_obj_10LAIProcess___pyx_scope_struct_2_processs_WMCModel), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_10LAIProcess___pyx_scope_struct_2_processs_WMCModel, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_10LAIProcess___pyx_scope_struct_2_processs_WMCModel, /*tp_traverse*/ + __pyx_tp_clear_10LAIProcess___pyx_scope_struct_2_processs_WMCModel, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_10LAIProcess___pyx_scope_struct_2_processs_WMCModel, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyMethodDef __pyx_methods[] = { + {"process_tiff", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10LAIProcess_9process_tiff, METH_VARARGS|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_LAIProcess(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_LAIProcess}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "LAIProcess", + 0, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1}, + {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1}, + {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1}, + {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1}, + {&__pyx_n_s_FVC, __pyx_k_FVC, sizeof(__pyx_k_FVC), 0, 0, 1, 1}, + {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, + {&__pyx_n_s_LAIProcess, __pyx_k_LAIProcess, sizeof(__pyx_k_LAIProcess), 0, 0, 1, 1}, + {&__pyx_kp_s_LAIProcess_pyx, __pyx_k_LAIProcess_pyx, sizeof(__pyx_k_LAIProcess_pyx), 0, 0, 1, 0}, + {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1}, + {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1}, + {&__pyx_n_s_V_lai, __pyx_k_V_lai, sizeof(__pyx_k_V_lai), 0, 0, 1, 1}, + {&__pyx_n_s_WMCModel, __pyx_k_WMCModel, sizeof(__pyx_k_WMCModel), 0, 0, 1, 1}, + {&__pyx_n_s_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 0, 1, 1}, + {&__pyx_n_s_X0, __pyx_k_X0, sizeof(__pyx_k_X0), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1}, + {&__pyx_n_s_csv_sigma, __pyx_k_csv_sigma, sizeof(__pyx_k_csv_sigma), 0, 0, 1, 1}, + {&__pyx_n_s_dpi, __pyx_k_dpi, sizeof(__pyx_k_dpi), 0, 0, 1, 1}, + {&__pyx_n_s_draw_flag, __pyx_k_draw_flag, sizeof(__pyx_k_draw_flag), 0, 0, 1, 1}, + {&__pyx_n_s_eqs, __pyx_k_eqs, sizeof(__pyx_k_eqs), 0, 0, 1, 1}, + {&__pyx_kp_s_equation_err, __pyx_k_equation_err, sizeof(__pyx_k_equation_err), 0, 0, 1, 0}, + {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1}, + {&__pyx_n_s_err_f, __pyx_k_err_f, sizeof(__pyx_k_err_f), 0, 0, 1, 1}, + {&__pyx_n_s_err_lai, __pyx_k_err_lai, sizeof(__pyx_k_err_lai), 0, 0, 1, 1}, + {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1}, + {&__pyx_n_s_exp_gamma, __pyx_k_exp_gamma, sizeof(__pyx_k_exp_gamma), 0, 0, 1, 1}, + {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, + {&__pyx_n_s_f_veg, __pyx_k_f_veg, sizeof(__pyx_k_f_veg), 0, 0, 1, 1}, + {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1}, + {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_inc_angle, __pyx_k_inc_angle, sizeof(__pyx_k_inc_angle), 0, 0, 1, 1}, + {&__pyx_n_s_inc_tiff, __pyx_k_inc_tiff, sizeof(__pyx_k_inc_tiff), 0, 0, 1, 1}, + {&__pyx_n_s_lai, __pyx_k_lai, sizeof(__pyx_k_lai), 0, 0, 1, 1}, + {&__pyx_n_s_lai_X0, __pyx_k_lai_X0, sizeof(__pyx_k_lai_X0), 0, 0, 1, 1}, + {&__pyx_n_s_lai_waiter_inc_sigma_item, __pyx_k_lai_waiter_inc_sigma_item, sizeof(__pyx_k_lai_waiter_inc_sigma_item), 0, 0, 1, 1}, + {&__pyx_n_s_lai_waiter_inc_sigma_list, __pyx_k_lai_waiter_inc_sigma_list, sizeof(__pyx_k_lai_waiter_inc_sigma_list), 0, 0, 1, 1}, + {&__pyx_n_s_lai_water_inc_sigma_item, __pyx_k_lai_water_inc_sigma_item, sizeof(__pyx_k_lai_water_inc_sigma_item), 0, 0, 1, 1}, + {&__pyx_n_s_lai_water_inc_sigma_list, __pyx_k_lai_water_inc_sigma_list, sizeof(__pyx_k_lai_water_inc_sigma_list), 0, 0, 1, 1}, + {&__pyx_n_s_leastsq, __pyx_k_leastsq, sizeof(__pyx_k_leastsq), 0, 0, 1, 1}, + {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1}, + {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_matplotlib, __pyx_k_matplotlib, sizeof(__pyx_k_matplotlib), 0, 0, 1, 1}, + {&__pyx_n_s_mylog, __pyx_k_mylog, sizeof(__pyx_k_mylog), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 1, 1}, + {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, + {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, + {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, + {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, + {&__pyx_n_s_param_arr, __pyx_k_param_arr, sizeof(__pyx_k_param_arr), 0, 0, 1, 1}, + {&__pyx_n_s_params_X0, __pyx_k_params_X0, sizeof(__pyx_k_params_X0), 0, 0, 1, 1}, + {&__pyx_n_s_plt, __pyx_k_plt, sizeof(__pyx_k_plt), 0, 0, 1, 1}, + {&__pyx_n_s_processs_WMCModel, __pyx_k_processs_WMCModel, sizeof(__pyx_k_processs_WMCModel), 0, 0, 1, 1}, + {&__pyx_n_s_processs_WMCModel_locals_f, __pyx_k_processs_WMCModel_locals_f, sizeof(__pyx_k_processs_WMCModel_locals_f), 0, 0, 1, 1}, + {&__pyx_n_s_pyplot, __pyx_k_pyplot, sizeof(__pyx_k_pyplot), 0, 0, 1, 1}, + {&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1}, + {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, + {&__pyx_n_s_sample_code, __pyx_k_sample_code, sizeof(__pyx_k_sample_code), 0, 0, 1, 1}, + {&__pyx_n_s_sample_inc, __pyx_k_sample_inc, sizeof(__pyx_k_sample_inc), 0, 0, 1, 1}, + {&__pyx_n_s_sample_lai, __pyx_k_sample_lai, sizeof(__pyx_k_sample_lai), 0, 0, 1, 1}, + {&__pyx_n_s_sample_lat, __pyx_k_sample_lat, sizeof(__pyx_k_sample_lat), 0, 0, 1, 1}, + {&__pyx_n_s_sample_lon, __pyx_k_sample_lon, sizeof(__pyx_k_sample_lon), 0, 0, 1, 1}, + {&__pyx_n_s_sample_sigma, __pyx_k_sample_sigma, sizeof(__pyx_k_sample_sigma), 0, 0, 1, 1}, + {&__pyx_n_s_sample_soil, __pyx_k_sample_soil, sizeof(__pyx_k_sample_soil), 0, 0, 1, 1}, + {&__pyx_n_s_sample_time, __pyx_k_sample_time, sizeof(__pyx_k_sample_time), 0, 0, 1, 1}, + {&__pyx_n_s_savefig, __pyx_k_savefig, sizeof(__pyx_k_savefig), 0, 0, 1, 1}, + {&__pyx_n_s_scatter, __pyx_k_scatter, sizeof(__pyx_k_scatter), 0, 0, 1, 1}, + {&__pyx_n_s_scipy_optimize, __pyx_k_scipy_optimize, sizeof(__pyx_k_scipy_optimize), 0, 0, 1, 1}, + {&__pyx_n_s_show, __pyx_k_show, sizeof(__pyx_k_show), 0, 0, 1, 1}, + {&__pyx_n_s_sigma, __pyx_k_sigma, sizeof(__pyx_k_sigma), 0, 0, 1, 1}, + {&__pyx_n_s_sigma_soil, __pyx_k_sigma_soil, sizeof(__pyx_k_sigma_soil), 0, 0, 1, 1}, + {&__pyx_n_s_sigma_tiff, __pyx_k_sigma_tiff, sizeof(__pyx_k_sigma_tiff), 0, 0, 1, 1}, + {&__pyx_n_s_sigma_veg, __pyx_k_sigma_veg, sizeof(__pyx_k_sigma_veg), 0, 0, 1, 1}, + {&__pyx_n_s_soil_water, __pyx_k_soil_water, sizeof(__pyx_k_soil_water), 0, 0, 1, 1}, + {&__pyx_n_s_soil_water_tiff, __pyx_k_soil_water_tiff, sizeof(__pyx_k_soil_water_tiff), 0, 0, 1, 1}, + {&__pyx_n_s_temp_err, __pyx_k_temp_err, sizeof(__pyx_k_temp_err), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_test_WMCModel, __pyx_k_test_WMCModel, sizeof(__pyx_k_test_WMCModel), 0, 0, 1, 1}, + {&__pyx_n_s_test_WMCModel_locals_f, __pyx_k_test_WMCModel_locals_f, sizeof(__pyx_k_test_WMCModel_locals_f), 0, 0, 1, 1}, + {&__pyx_n_s_test_err_image_path, __pyx_k_test_err_image_path, sizeof(__pyx_k_test_err_image_path), 0, 0, 1, 1}, + {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1}, + {&__pyx_n_s_train_WMCmodel, __pyx_k_train_WMCmodel, sizeof(__pyx_k_train_WMCmodel), 0, 0, 1, 1}, + {&__pyx_n_s_train_WMCmodel_locals_f, __pyx_k_train_WMCmodel_locals_f, sizeof(__pyx_k_train_WMCmodel_locals_f), 0, 0, 1, 1}, + {&__pyx_n_s_train_err_image_path, __pyx_k_train_err_image_path, sizeof(__pyx_k_train_err_image_path), 0, 0, 1, 1}, + {&__pyx_n_s_x_arr, __pyx_k_x_arr, sizeof(__pyx_k_x_arr), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 947, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "LAIProcess.pyx":48 + * lai_waiter_inc_sigma_list (list): + * """ + * def f(X): # <<<<<<<<<<<<<< + * eqs=[] + * for lai_water_inc_sigma_item in lai_water_inc_sigma_list: + */ + __pyx_tuple_ = PyTuple_Pack(8, __pyx_n_s_X, __pyx_n_s_eqs, __pyx_n_s_lai_water_inc_sigma_item, __pyx_n_s_sample_lai, __pyx_n_s_sample_sigma, __pyx_n_s_sample_soil, __pyx_n_s_sample_inc, __pyx_n_s_FVC); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_LAIProcess_pyx, __pyx_n_s_f, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 48, __pyx_L1_error) + + /* "LAIProcess.pyx":104 + * for lai_waiter_inc_sigma_item in lai_waiter_inc_sigma_list: + * sample_time,sample_code,sample_lon,sample_lat,sample_lai,csv_sigma,sample_soil,sample_inc,sample_sigma=lai_waiter_inc_sigma_item + * def f(X): # <<<<<<<<<<<<<< + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,sample_soil,sample_inc,csv_sigma)] + */ + __pyx_tuple__3 = PyTuple_Pack(3, __pyx_n_s_X, __pyx_n_s_lai, __pyx_n_s_eqs); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_LAIProcess_pyx, __pyx_n_s_f, 104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 104, __pyx_L1_error) + + /* "LAIProcess.pyx":134 + * if(sigma<0 ): + * return np.nan + * def f(X): # <<<<<<<<<<<<<< + * lai=X[0] + * eqs=[WMCModel(param_arr,lai,soil_water,inc_angle,sigma )] + */ + __pyx_tuple__5 = PyTuple_Pack(3, __pyx_n_s_X, __pyx_n_s_lai, __pyx_n_s_eqs); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_LAIProcess_pyx, __pyx_n_s_f, 134, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 134, __pyx_L1_error) + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":947 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":953 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + + /* "LAIProcess.pyx":12 + * import random + * import logging + * logger = logging.getLogger("mylog") # <<<<<<<<<<<<<< + * + * + */ + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_mylog); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + + /* "LAIProcess.pyx":15 + * + * + * def WMCModel(param_arr,sample_lai,sample_soil,sample_inc,sample_sigma): # <<<<<<<<<<<<<< + * """ WMC + * + */ + __pyx_tuple__10 = PyTuple_Pack(17, __pyx_n_s_param_arr, __pyx_n_s_sample_lai, __pyx_n_s_sample_soil, __pyx_n_s_sample_inc, __pyx_n_s_sample_sigma, __pyx_n_s_A, __pyx_n_s_B, __pyx_n_s_C, __pyx_n_s_D, __pyx_n_s_M, __pyx_n_s_N, __pyx_n_s_V_lai, __pyx_n_s_exp_gamma, __pyx_n_s_sigma_soil, __pyx_n_s_sigma_veg, __pyx_n_s_f_veg, __pyx_n_s_result); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(5, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_LAIProcess_pyx, __pyx_n_s_WMCModel, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 15, __pyx_L1_error) + + /* "LAIProcess.pyx":42 + * + * + * def train_WMCmodel(lai_water_inc_sigma_list,params_X0,train_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + __pyx_tuple__12 = PyTuple_Pack(12, __pyx_n_s_lai_water_inc_sigma_list, __pyx_n_s_params_X0, __pyx_n_s_train_err_image_path, __pyx_n_s_draw_flag, __pyx_n_s_f, __pyx_n_s_f, __pyx_n_s_X0, __pyx_n_s_h, __pyx_n_s_err_f, __pyx_n_s_x_arr, __pyx_n_s_plt, __pyx_n_s_lai_waiter_inc_sigma_item); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_LAIProcess_pyx, __pyx_n_s_train_WMCmodel, 42, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 42, __pyx_L1_error) + + /* "LAIProcess.pyx":82 + * return h[0] + * + * def test_WMCModel(lai_waiter_inc_sigma_list,param_arr,lai_X0,test_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + __pyx_tuple__14 = PyTuple_Pack(25, __pyx_n_s_lai_waiter_inc_sigma_list, __pyx_n_s_param_arr, __pyx_n_s_lai_X0, __pyx_n_s_test_err_image_path, __pyx_n_s_draw_flag, __pyx_n_s_err, __pyx_n_s_err_f, __pyx_n_s_x_arr, __pyx_n_s_err_lai, __pyx_n_s_lai_waiter_inc_sigma_item, __pyx_n_s_sample_time, __pyx_n_s_sample_code, __pyx_n_s_sample_lon, __pyx_n_s_sample_lat, __pyx_n_s_sample_lai, __pyx_n_s_csv_sigma, __pyx_n_s_sample_soil, __pyx_n_s_sample_inc, __pyx_n_s_sample_sigma, __pyx_n_s_f, __pyx_n_s_f, __pyx_n_s_X0, __pyx_n_s_h, __pyx_n_s_temp_err, __pyx_n_s_plt); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(5, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_LAIProcess_pyx, __pyx_n_s_test_WMCModel, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 82, __pyx_L1_error) + + /* "LAIProcess.pyx":130 + * return err + * + * def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): # <<<<<<<<<<<<<< + * + * if(sigma<0 ): + */ + __pyx_tuple__16 = PyTuple_Pack(8, __pyx_n_s_param_arr, __pyx_n_s_lai_X0, __pyx_n_s_sigma, __pyx_n_s_inc_angle, __pyx_n_s_soil_water, __pyx_n_s_f, __pyx_n_s_f, __pyx_n_s_h); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_LAIProcess_pyx, __pyx_n_s_processs_WMCModel, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_600 = PyInt_FromLong(600); if (unlikely(!__pyx_int_600)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_neg_2 = PyInt_FromLong(-2); if (unlikely(!__pyx_int_neg_2)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_10LAIProcess___pyx_scope_struct__train_WMCmodel) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_10LAIProcess___pyx_scope_struct__train_WMCmodel.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10LAIProcess___pyx_scope_struct__train_WMCmodel.tp_dictoffset && __pyx_type_10LAIProcess___pyx_scope_struct__train_WMCmodel.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_10LAIProcess___pyx_scope_struct__train_WMCmodel.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype_10LAIProcess___pyx_scope_struct__train_WMCmodel = &__pyx_type_10LAIProcess___pyx_scope_struct__train_WMCmodel; + if (PyType_Ready(&__pyx_type_10LAIProcess___pyx_scope_struct_1_test_WMCModel) < 0) __PYX_ERR(0, 82, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_10LAIProcess___pyx_scope_struct_1_test_WMCModel.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10LAIProcess___pyx_scope_struct_1_test_WMCModel.tp_dictoffset && __pyx_type_10LAIProcess___pyx_scope_struct_1_test_WMCModel.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_10LAIProcess___pyx_scope_struct_1_test_WMCModel.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype_10LAIProcess___pyx_scope_struct_1_test_WMCModel = &__pyx_type_10LAIProcess___pyx_scope_struct_1_test_WMCModel; + if (PyType_Ready(&__pyx_type_10LAIProcess___pyx_scope_struct_2_processs_WMCModel) < 0) __PYX_ERR(0, 130, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_10LAIProcess___pyx_scope_struct_2_processs_WMCModel.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10LAIProcess___pyx_scope_struct_2_processs_WMCModel.tp_dictoffset && __pyx_type_10LAIProcess___pyx_scope_struct_2_processs_WMCModel.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_10LAIProcess___pyx_scope_struct_2_processs_WMCModel.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + __pyx_ptype_10LAIProcess___pyx_scope_struct_2_processs_WMCModel = &__pyx_type_10LAIProcess___pyx_scope_struct_2_processs_WMCModel; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), + #else + sizeof(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error) + __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error) + __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error) + __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error) + __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error) + __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error) + __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error) + __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error) + __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error) + __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#ifndef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void +#endif +#else +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyObject * +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initLAIProcess(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initLAIProcess(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_LAIProcess(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_LAIProcess(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_LAIProcess(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'LAIProcess' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_LAIProcess(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + PyEval_InitThreads(); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("LAIProcess", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_b); + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_LAIProcess) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "LAIProcess")) { + if (unlikely(PyDict_SetItemString(modules, "LAIProcess", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "LAIProcess.pyx":6 + * import cython + * cimport cython # + * import numpy as np # <<<<<<<<<<<<<< + * cimport numpy as np + * from libc.math cimport pi + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "LAIProcess.pyx":9 + * cimport numpy as np + * from libc.math cimport pi + * from scipy.optimize import leastsq # <<<<<<<<<<<<<< + * import random + * import logging + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_leastsq); + __Pyx_GIVEREF(__pyx_n_s_leastsq); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_leastsq); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_scipy_optimize, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_leastsq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_leastsq, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "LAIProcess.pyx":10 + * from libc.math cimport pi + * from scipy.optimize import leastsq + * import random # <<<<<<<<<<<<<< + * import logging + * logger = logging.getLogger("mylog") + */ + __pyx_t_2 = __Pyx_Import(__pyx_n_s_random, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_random, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "LAIProcess.pyx":11 + * from scipy.optimize import leastsq + * import random + * import logging # <<<<<<<<<<<<<< + * logger = logging.getLogger("mylog") + * + */ + __pyx_t_2 = __Pyx_Import(__pyx_n_s_logging, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "LAIProcess.pyx":12 + * import random + * import logging + * logger = logging.getLogger("mylog") # <<<<<<<<<<<<<< + * + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "LAIProcess.pyx":15 + * + * + * def WMCModel(param_arr,sample_lai,sample_soil,sample_inc,sample_sigma): # <<<<<<<<<<<<<< + * """ WMC + * + */ + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10LAIProcess_1WMCModel, NULL, __pyx_n_s_LAIProcess); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WMCModel, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "LAIProcess.pyx":42 + * + * + * def train_WMCmodel(lai_water_inc_sigma_list,params_X0,train_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10LAIProcess_3train_WMCmodel, NULL, __pyx_n_s_LAIProcess); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_train_WMCmodel, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "LAIProcess.pyx":82 + * return h[0] + * + * def test_WMCModel(lai_waiter_inc_sigma_list,param_arr,lai_X0,test_err_image_path,draw_flag=True): # <<<<<<<<<<<<<< + * """ + * + */ + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10LAIProcess_5test_WMCModel, NULL, __pyx_n_s_LAIProcess); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_WMCModel, __pyx_t_2) < 0) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "LAIProcess.pyx":130 + * return err + * + * def processs_WMCModel(param_arr,lai_X0,sigma,inc_angle,soil_water): # <<<<<<<<<<<<<< + * + * if(sigma<0 ): + */ + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_10LAIProcess_7processs_WMCModel, NULL, __pyx_n_s_LAIProcess); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_processs_WMCModel, __pyx_t_2) < 0) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "LAIProcess.pyx":1 + * # # <<<<<<<<<<<<<< + * # + * # + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init LAIProcess", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init LAIProcess"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { + PyObject *exc_value, *exc_tb; + exc_value = tstate->curexc_value; + exc_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + Py_DECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_tb); + return 0; + } else { + return -1; + } + } + return 0; +#else + if (unlikely(PyErr_Occurred())) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { + PyErr_Clear(); + return 0; + } else { + return -1; + } + } + return 0; +#endif +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } else { + return __Pyx_IterFinish(); + } + return 0; +} + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallOneArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (__Pyx_PyFastCFunction_Check(func)) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* PyIntBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { + (void)inplace; + (void)zerodivision_check; + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op2))) { + const long a = intval; + long x; + long b = PyInt_AS_LONG(op2); + x = (long)((unsigned long)a - b); + if (likely((x^a) >= 0 || (x^~b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op2))) { + const long a = intval; + long b, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG lla = intval; + PY_LONG_LONG llb, llx; +#endif + const digit* digits = ((PyLongObject*)op2)->ob_digit; + const Py_ssize_t size = Py_SIZE(op2); + if (likely(__Pyx_sst_abs(size) <= 1)) { + b = likely(size) ? digits[0] : 0; + if (size == -1) b = -b; + } else { + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + } + x = a - b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla - llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op2)) { + const long a = intval; + double b = PyFloat_AS_DOUBLE(op2); + double result; + PyFPE_START_PROTECT("subtract", return NULL) + result = ((double)a) - (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); +} +#endif + +/* None */ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* FetchCommonType */ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* fake_module; + PyTypeObject* cached_type = NULL; + fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); + if (!fake_module) return NULL; + Py_INCREF(fake_module); + cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); + if (cached_type) { + if (!PyType_Check((PyObject*)cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", + type->tp_name); + goto bad; + } + if (cached_type->tp_basicsize != type->tp_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + type->tp_name); + goto bad; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; + } +done: + Py_DECREF(fake_module); + return cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CythonFunctionShared */ +#include +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) +{ + if (unlikely(op->func_doc == NULL)) { + if (op->func.m_ml->ml_doc) { +#if PY_MAJOR_VERSION >= 3 + op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); +#else + op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); +#endif + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp = op->func_doc; + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + op->func_doc = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_name == NULL)) { +#if PY_MAJOR_VERSION >= 3 + op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); +#else + op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + tmp = op->func_name; + Py_INCREF(value); + op->func_name = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = op->func_qualname; + Py_INCREF(value); + op->func_qualname = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) +{ + PyObject *self; + self = m->func_closure; + if (self == NULL) + self = Py_None; + Py_INCREF(self); + return self; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + tmp = op->func_dict; + Py_INCREF(value); + op->func_dict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyTuple_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_tuple; + op->defaults_tuple = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_kwdict; + op->defaults_kwdict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value || value == Py_None) { + value = NULL; + } else if (!PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + tmp = op->func_annotations; + op->func_annotations = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, + {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { + {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) +{ +#if PY_MAJOR_VERSION >= 3 + Py_INCREF(m->func_qualname); + return m->func_qualname; +#else + return PyString_FromString(m->func.m_ml->ml_name); +#endif +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if PY_VERSION_HEX < 0x030500A0 +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + if (unlikely(op == NULL)) + return NULL; + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; + op->func.m_ml = ml; + op->func.m_self = (PyObject *) op; + Py_XINCREF(closure); + op->func_closure = closure; + Py_XINCREF(module); + op->func.m_module = module; + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; + op->func_classobj = NULL; + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults_pyobjects = 0; + op->defaults_size = 0; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); + Py_CLEAR(m->func.m_module); + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); + Py_CLEAR(m->func_classobj); + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_XDECREF(pydefaults[i]); + PyObject_Free(m->defaults); + m->defaults = NULL; + } + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + PyObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + Py_VISIT(m->func_closure); + Py_VISIT(m->func.m_module); + Py_VISIT(m->func_dict); + Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + Py_VISIT(m->func_code); + Py_VISIT(m->func_classobj); + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); + } + return 0; +} +static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) +{ +#if PY_MAJOR_VERSION < 3 + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { + Py_INCREF(func); + return func; + } + if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { + if (type == NULL) + type = (PyObject *)(Py_TYPE(obj)); + return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); + } + if (obj == Py_None) + obj = NULL; +#endif + return __Pyx_PyMethod_New(func, obj, type); +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (void *)op); +#endif +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + Py_ssize_t size; + switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 0)) + return (*meth)(self, NULL); + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags in " + "__Pyx_CyFunction_Call. METH_OLDARGS is no " + "longer supported!"); + return NULL; + } + PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", + f->m_ml->ml_name); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; + argc = PyTuple_GET_SIZE(args); + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +static PyTypeObject __pyx_CyFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, + (destructor) __Pyx_CyFunction_dealloc, + 0, + 0, + 0, +#if PY_MAJOR_VERSION < 3 + 0, +#else + 0, +#endif + (reprfunc) __Pyx_CyFunction_repr, + 0, + 0, + 0, + 0, + __Pyx_CyFunction_CallAsMethod, + 0, + 0, + 0, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + 0, + (traverseproc) __Pyx_CyFunction_traverse, + (inquiry) __Pyx_CyFunction_clear, + 0, +#if PY_VERSION_HEX < 0x030500A0 + offsetof(__pyx_CyFunctionObject, func_weakreflist), +#else + offsetof(PyCFunctionObject, m_weakreflist), +#endif + 0, + 0, + __pyx_CyFunction_methods, + __pyx_CyFunction_members, + __pyx_CyFunction_getsets, + 0, + 0, + __Pyx_CyFunction_descr_get, + 0, + offsetof(__pyx_CyFunctionObject, func_dict), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +#if PY_VERSION_HEX >= 0x030400a1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b1 + 0, +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, +#endif +}; +static int __pyx_CyFunction_init(void) { + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); + if (unlikely(__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_Malloc(size); + if (unlikely(!m->defaults)) + return PyErr_NoMemory(); + memset(m->defaults, 0, size); + m->defaults_pyobjects = pyobjects; + m->defaults_size = size; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* PyObjectCallNoArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* IsLittleEndian */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } S; + S.u32 = 0x01020304; + return S.u8[0] == 4; +} + +/* BufferFormatCheck */ +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t <= '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case '?': return "'bool'"; + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparseable format string"; + } +} +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + #ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + #endif + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + __Pyx_StructField* field = ctx->head->field; + __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + __Pyx_StructField* field = ctx->head->field; + __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static PyObject * +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number, ndim; + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ndim = ctx->head->field->type->ndim; + while (*ts && *ts != ')') { + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; + } + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) + return PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + if (*ts != ',' && *ts != ')') + return PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + if (*ts == ',') ts++; + i++; + } + if (i != ndim) + return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return NULL; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return Py_None; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + CYTHON_FALLTHROUGH; + case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && + (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + CYTHON_FALLTHROUGH; + case 's': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} + +/* BufferGetAndValidate */ + static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + if (unlikely(info->buf == NULL)) return; + if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; + __Pyx_ReleaseBuffer(info); +} +static void __Pyx_ZeroBuffer(Py_buffer* buf) { + buf->buf = NULL; + buf->obj = NULL; + buf->strides = __Pyx_zeros; + buf->shape = __Pyx_zeros; + buf->suboffsets = __Pyx_minusones; +} +static int __Pyx__GetBufferAndValidate( + Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, + int nd, int cast, __Pyx_BufFmt_StackElem* stack) +{ + buf->buf = NULL; + if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) { + __Pyx_ZeroBuffer(buf); + return -1; + } + if (unlikely(buf->ndim != nd)) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + nd, buf->ndim); + goto fail; + } + if (!cast) { + __Pyx_BufFmt_Context ctx; + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + } + if (unlikely((size_t)buf->itemsize != dtype->size)) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", + buf->itemsize, (buf->itemsize > 1) ? "s" : "", + dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); + goto fail; + } + if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; + return 0; +fail:; + __Pyx_SafeReleaseBuffer(buf); + return -1; +} + +/* BufferIndexError */ + static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +/* PyErrFetchRestore */ + #if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* ArgTypeTest */ + static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* GetTopmostException */ + #if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ + #if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/* PyErrExceptionMatches */ + #if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* GetException */ + #if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* RaiseException */ + #if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* PyObject_GenericGetAttrNoDict */ + #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, attr_name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(attr_name)); +#endif + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + Py_INCREF(descr); + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + +/* TypeImport */ + #ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* CLineInTraceback */ + #ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ + static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ + #include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +#if PY_MAJOR_VERSION < 3 +static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { + if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); + PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); + return -1; +} +static void __Pyx_ReleaseBuffer(Py_buffer *view) { + PyObject *obj = view->obj; + if (!obj) return; + if (PyObject_CheckBuffer(obj)) { + PyBuffer_Release(view); + return; + } + if ((0)) {} + view->obj = NULL; + Py_DECREF(obj); +} +#endif + + + /* Declarations */ + #if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsf(b.real) >= fabsf(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + float r = b.imag / b.real; + float s = (float)(1.0) / (b.real + b.imag * r); + return __pyx_t_float_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + float r = b.real / b.imag; + float s = (float)(1.0) / (b.imag + b.real * r); + return __pyx_t_float_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + float denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_float_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_float(a, a); + case 3: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, a); + case 4: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = powf(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2f(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_float(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +/* Declarations */ + #if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs(b.real) >= fabs(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + double r = b.imag / b.real; + double s = (double)(1.0) / (b.real + b.imag * r); + return __pyx_t_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + double r = b.real / b.imag; + double s = (double)(1.0) / (b.imag + b.real * r); + return __pyx_t_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_double(a, a); + case 3: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, a); + case 4: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = pow(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_double(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif +#endif + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntFromPyVerify */ + #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ + static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ + static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ + #if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; ip) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/tool/LAI/build/temp.win-amd64-3.8/Release/build/LAIProcess.cp38-win_amd64.exp b/tool/LAI/build/temp.win-amd64-3.8/Release/build/LAIProcess.cp38-win_amd64.exp new file mode 100644 index 0000000..8d773ec Binary files /dev/null and b/tool/LAI/build/temp.win-amd64-3.8/Release/build/LAIProcess.cp38-win_amd64.exp differ diff --git a/tool/LAI/build/temp.win-amd64-3.8/Release/build/LAIProcess.cp38-win_amd64.lib b/tool/LAI/build/temp.win-amd64-3.8/Release/build/LAIProcess.cp38-win_amd64.lib new file mode 100644 index 0000000..1938c72 Binary files /dev/null and b/tool/LAI/build/temp.win-amd64-3.8/Release/build/LAIProcess.cp38-win_amd64.lib differ diff --git a/tool/LAI/build/temp.win-amd64-3.8/Release/build/LAIProcess.obj b/tool/LAI/build/temp.win-amd64-3.8/Release/build/LAIProcess.obj new file mode 100644 index 0000000..85b20de Binary files /dev/null and b/tool/LAI/build/temp.win-amd64-3.8/Release/build/LAIProcess.obj differ diff --git a/tool/LAI/setup.py b/tool/LAI/setup.py new file mode 100644 index 0000000..67c737a --- /dev/null +++ b/tool/LAI/setup.py @@ -0,0 +1,45 @@ +from setuptools import setup +from setuptools.extension import Extension +from Cython.Distutils import build_ext +from Cython.Build import cythonize +import numpy +from pathlib import Path +import shutil + + +class MyBuildExt(build_ext): + def run(self): + build_ext.run(self) + + build_dir = Path(self.build_lib) + root_dir = Path(__file__).parent + target_dir = build_dir if not self.inplace else root_dir + + self.copy_file(Path('./LAIProcess') / '__init__.py', root_dir, target_dir) + #self.copy_file(Path('./pkg2') / '__init__.py', root_dir, target_dir) + self.copy_file(Path('.') / '__init__.py', root_dir, target_dir) + def copy_file(self, path, source_dir, destination_dir): + if not (source_dir / path).exists(): + return + shutil.copyfile(str(source_dir / path), str(destination_dir / path)) + +setup( + name="MyModule", + ext_modules=cythonize( + [ + #Extension("pkg1.*", ["root/pkg1/*.py"]), + Extension("pkg2.*", ["./LAIProcess.pyx"]), + #Extension("1.*", ["root/*.py"]) + ], + build_dir="build", + compiler_directives=dict( + always_allow_keywords=True + )), + cmdclass=dict( + build_ext=MyBuildExt + ), + packages=[], + include_dirs=[numpy.get_include()], +) + +# 指令: python setup.py build_ext --inplace diff --git a/tool/algorithm/algtools/CoordinateTransformation.py b/tool/algorithm/algtools/CoordinateTransformation.py new file mode 100644 index 0000000..8afe99b --- /dev/null +++ b/tool/algorithm/algtools/CoordinateTransformation.py @@ -0,0 +1,117 @@ +# -*- encoding: utf-8 -*- +# code from https://blog.csdn.net/theonegis/article/details/54427906 +from osgeo import gdal +from osgeo import osr +import numpy as np + +def getSRSPair(dataset): + """ + 获得给定数据的投影参考系和地理参考系 + :param dataset: GDAL地理数据 + :return: 投影参考系和地理参考系 + """ + prosrs = osr.SpatialReference() + prosrs.ImportFromWkt(dataset.GetProjection()) + geosrs = prosrs.CloneGeogCS() + return prosrs, geosrs + + +def geo2lonlat(dataset, x, y): + """ + 将投影坐标转为经纬度坐标(具体的投影坐标系由给定数据确定) + :param dataset: GDAL地理数据 + :param x: 投影坐标x + :param y: 投影坐标y + :return: 投影坐标(x, y)对应的经纬度坐标(lon, lat) + """ + prosrs, geosrs = getSRSPair(dataset) + ct = osr.CoordinateTransformation(prosrs, geosrs) + coords = ct.TransformPoint(x, y) + return coords[:2] + + +def lonlat2geo(dataset, lon, lat): + """ + 将经纬度坐标转为投影坐标(具体的投影坐标系由给定数据确定) + :param dataset: GDAL地理数据 + :param lon: 地理坐标lon经度 + :param lat: 地理坐标lat纬度 + :return: 经纬度坐标(lon, lat)对应的投影坐标 + """ + prosrs, geosrs = getSRSPair(dataset) + ct = osr.CoordinateTransformation(geosrs, prosrs) + coords = ct.TransformPoint(lat, lon) + return coords[:2] + + +def imagexy2geo(dataset, row, col): + """ + 根据GDAL的六参数模型将影像图上坐标(行列号)转为投影坐标或地理坐标(根据具体数据的坐标系统转换) + :param dataset: GDAL地理数据 + :param row: 像素的行号 + :param col: 像素的列号 + :return: 行列号(row, col)对应的投影坐标或地理坐标(x, y) + """ + trans = dataset.GetGeoTransform() + px = trans[0] + col * trans[1] + row * trans[2] + py = trans[3] + col * trans[4] + row * trans[5] + return px, py + + +def geo2imagexy(dataset, x, y): + """ + 根据GDAL的六 参数模型将给定的投影或地理坐标转为影像图上坐标(行列号) + :param dataset: GDAL地理数据 + :param x: 投影或地理坐标x + :param y: 投影或地理坐标y + :return: 影坐标或地理坐标(x, y)对应的影像图上行列号(col, row) + """ + trans = dataset.GetGeoTransform() + a = np.array([[trans[1], trans[2]], [trans[4], trans[5]]]) + b = np.array([x - trans[0], y - trans[3]]) + return np.linalg.solve(a, b) # 使用numpy的linalg.solve进行二元一次方程的求解 + + +def test1(): + gdal.AllRegister() + tif = 'D:/DATA/testdata/GLCFCS30_E110N25.tif' + # dataset = gdal.Open(r"D:\\DATA\\雷达测试\\GaoFen3_20200528_HH_DB.tif") + dataset = gdal.Open(tif) + + print('数据投影:') + print(dataset.GetProjection()) + print('数据的大小(行,列):') + print('(%s %s)' % (dataset.RasterYSize, dataset.RasterXSize)) + + x = 793214.118 + y = 2485865.527 + lon = 113.84897082317516 + lat = 22.453998686022448 + row = 24576 + col = 22540 + + print('图上坐标 -> 投影坐标:') + coords = imagexy2geo(dataset, row, col) + print('(%s, %s)->(%s, %s)' % (row, col, coords[0], coords[1])) + print('投影坐标 -> 图上坐标:') + coords = geo2imagexy(dataset, x, y) + col = coords[0] + row = coords[1] + print('(%s, %s)->(%s, %s)' % (x, y, coords[0], coords[1])) + + print('投影坐标 -> 经纬度:') + coords = geo2lonlat(dataset, x, y) + print('(%s, %s)->(%s, %s)' % (x, y, coords[0], coords[1])) + print('经纬度 -> 投影坐标:') + coords = lonlat2geo(dataset, lon, lat) + print('(%s, %s)->(%s, %s)' % (lon, lat, coords[0], coords[1])) + + coords1 = geo2lonlat(dataset, 657974.118, 2633321.527) + print(coords1) + coords2 = geo2lonlat(dataset, 793214.118, 2485865.527) + print(coords2) + pass + +# if __name__ == '__main__': +# +# print('done') diff --git a/tool/algorithm/algtools/DEMJoint.py b/tool/algorithm/algtools/DEMJoint.py new file mode 100644 index 0000000..d3a71cd --- /dev/null +++ b/tool/algorithm/algtools/DEMJoint.py @@ -0,0 +1,156 @@ +""" +@Project :microproduct +@File :DEMJoint +@Function :主函数 +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" +from osgeo import gdal, osr +import os +import numpy as np + + +class DEMProcess: + """ + DEM拼接、重采样 + """ + def __init__(self): + pass + + @staticmethod + def get_extent(fn): + ''' + 原文链接:https://blog.csdn.net/XBR_2014/article/details/85255412 + ''' + ds = gdal.Open(fn) + rows = ds.RasterYSize + cols = ds.RasterXSize + # 获取图像角点坐标 + gt = ds.GetGeoTransform() + minx = gt[0] + maxy = gt[3] + maxx = gt[0] + gt[1] * rows + miny = gt[3] + gt[5] * cols + return (minx, maxy, maxx, miny) + + @staticmethod + def img_mosaic(in_files, out_dem_path): + # 通过两两比较大小,将最终符合条件的四个角点坐标保存 + # 即为拼接图像的四个角点坐标 + minX, maxY, maxX, minY = DEMProcess.get_extent(in_files[0]) + for fn in in_files[1:]: + minx, maxy, maxx, miny = DEMProcess.get_extent(fn) + minX = min(minX, minx) + maxY = max(maxY, maxy) + maxX = max(maxX, maxx) + minY = min(minY, miny) + + # 获取输出图像的行列数 + in_ds = gdal.Open(in_files[0]) + bands_num = in_ds.RasterCount + gt = in_ds.GetGeoTransform() + rows = int((maxX - minX) / abs(gt[5])) + cols = int((maxY - minY) / gt[1]) + + # 判断栅格数据的数据类型 + datatype = gdal.GDT_UInt16 + + # 创建输出图像 + driver = gdal.GetDriverByName('GTiff') + out_dem = os.path.join(out_dem_path, 'mosaic0.tif') + out_ds = driver.Create(out_dem, cols, rows, bands_num, datatype) + out_ds.SetProjection(in_ds.GetProjection()) + + gt = list(in_ds.GetGeoTransform()) + gt[0], gt[3] = minX, maxY + out_ds.SetGeoTransform(gt) + + for fn in in_files: + in_ds = gdal.Open(fn) + x_size = in_ds.RasterXSize + y_size = in_ds.RasterYSize + trans = gdal.Transformer(in_ds, out_ds, []) + success, xyz = trans.TransformPoint(False, 0, 0) + x, y, z = map(int, xyz) + for i in range(1, bands_num + 1): + data = in_ds.GetRasterBand(i).ReadAsArray() + out_band = out_ds.GetRasterBand(i) + out_data = out_band.ReadAsArray(x, y, x_size, y_size) + data = np.maximum(data, out_data) + out_band.WriteArray(data, x, y) + + del in_ds, out_band, out_ds + + @staticmethod + def dem_clip(OutFilePath, DEMFilePath, SelectArea): + ''' + 根据选择范围裁剪DEM,并输出 + agrs: + outFilePath:裁剪DEM输出地址 + DEMFilePath:被裁减DEM地址 + SelectArea:list [(xmin,ymax),(xmax,ymin)] 框选范围 左上角,右下角 + ''' + DEM_ptr = gdal.Open(DEMFilePath) + DEM_GeoTransform = DEM_ptr.GetGeoTransform() # 读取影像的投影变换 + DEM_InvGeoTransform = gdal.InvGeoTransform(DEM_GeoTransform) + SelectAreaArrayPoints = [gdal.ApplyGeoTransform(DEM_InvGeoTransform, p[0], p[1]) for p in SelectArea] + SelectAreaArrayPoints = list(map(lambda p: (int(p[0]), int(p[1])), SelectAreaArrayPoints)) # 确定坐标 + + [(ulx, uly), (brx, bry)] = SelectAreaArrayPoints + rowCount, colCount = bry - uly, brx - ulx + + # 输出DEM的桌面坐标转换 + Out_Transfrom = list(DEM_GeoTransform) + Out_Transfrom[0] = SelectArea[0][0] + Out_Transfrom[3] = SelectArea[0][1] + + # 构建输出DEM + Bands_num = DEM_ptr.RasterCount + gtiff_driver = gdal.GetDriverByName('GTiff') + datatype = gdal.GDT_UInt16 + out_dem = gtiff_driver.Create(OutFilePath, colCount, rowCount, Bands_num, datatype) + out_dem.SetProjection(DEM_ptr.GetProjection()) + out_dem.SetGeoTransform(Out_Transfrom) + + for i in range(1, Bands_num + 1): + data_band = DEM_ptr.GetRasterBand(i) + out_band = out_dem.GetRasterBand(i) + data = data_band.ReadAsArray(ulx, uly, colCount, rowCount) + out_band.WriteArray(data) + del out_dem + + @staticmethod + def dem_resample(in_dem_path, out_dem_path): + ''' + DEM重采样函数,默认坐标系为WGS84 + agrs: + in_dem_path: 输入的DEM文件夹路径 + meta_file_path: 输入的xml元文件路径 + out_dem_path: 输出的DEM文件夹路径 + ''' + # 读取文件夹中所有的DEM + dem_file_paths=[os.path.join(in_dem_path,dem_name) for dem_name in os.listdir(in_dem_path) if dem_name.find(".tif")>=0 and dem_name.find(".tif.")==-1] + spatialreference=osr.SpatialReference() + spatialreference.SetWellKnownGeogCS("WGS84") # 设置地理坐标,单位为度 degree # 设置投影坐标,单位为度 degree + spatialproj=spatialreference.ExportToWkt() # 导出投影结果 + # 将DEM拼接成一张大图 + mergeFile =gdal.BuildVRT(os.path.join(out_dem_path,"mergeDEM.tif"), dem_file_paths) + out_DEM=os.path.join(out_dem_path,"mosaic.tif") + gdal.Warp(out_DEM, + mergeFile, + format="GTiff", + dstSRS=spatialproj, + dstNodata=-9999, + outputType=gdal.GDT_Float32) + return out_DEM + + +# if __name__ == "__main__": +# DEMProcess = DEMProcess() +# in_dem_path = r'F:\大气延迟\out_dem' +# out_dem_path = r'F:\大气延迟\out_dem' +# DEMProcess.dem_resample(in_dem_path, out_dem_path) + + + diff --git a/tool/algorithm/algtools/MetaDataHandler.py b/tool/algorithm/algtools/MetaDataHandler.py new file mode 100644 index 0000000..931c5b9 --- /dev/null +++ b/tool/algorithm/algtools/MetaDataHandler.py @@ -0,0 +1,154 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :ScatteringAuxData.py +@Function :后向散射 +@Author :SHJ +@Contact: +@Date :2022/6/29 +@Version :1.0.0 +修改历史: +[修改序列] [修改日期] [修改者] [修改内容] + 1 2022-6-29 石海军 1.兼容GF3元文件和正射校正元文件提取信息 +""" +import logging +from xml.etree.ElementTree import ElementTree +import math +logger = logging.getLogger("mylog") + +class GF3L1AMetaData: + def __init__(self): + pass + @staticmethod + def get_QualifyValue(meta_file_path, polarization): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + QualifyValue = float(root.find('imageinfo').find('QualifyValue').find(polarization).text) + return QualifyValue + + + @staticmethod + def get_Kdb(meta_file_path, polarization): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + Kdb = float(root.find('processinfo').find('CalibrationConst').find(polarization).text) if root.find('processinfo').find('CalibrationConst').find(polarization).text!="NULL" else 0 + return Kdb + +class OrthoMetaData: + def __init__(self): + pass + @staticmethod + def get_QualifyValue(meta_file_path, polarization): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + QualifyValue = float(root.find('l1aInfo').find('imageinfo').find('QualifyValue').find(polarization).text) + return QualifyValue + + @staticmethod + def get_Kdb(meta_file_path, polarization): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + Kdb = float(root.find('l1aInfo').find('processinfo').find('CalibrationConst').find(polarization).text) + return Kdb + + + @staticmethod + def get_RadarCenterFrequency(meta_file_path): + # 获取微波中心频率 + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + RadarCenterFrequency = float(root.find('sensor').find('RadarCenterFrequency').text) + return RadarCenterFrequency + + + @staticmethod + def get_lamda(meta_file_path): + # 获取微波波长,单位:m + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + lamda = float(root.find('sensor').find('lamda').text) + return lamda + +class MetaDataHandler: + def __init__(self): + pass + + @staticmethod + def get_QualifyValue(meta_file_path, polarization): + try: + QualifyValue = OrthoMetaData.get_QualifyValue(meta_file_path, polarization) + except Exception: + logger.warning('OrthoMetaData.get_QualifyValue() error!') + QualifyValue = GF3L1AMetaData.get_QualifyValue(meta_file_path, polarization) + logger.info('GF3L1AMetaData.get_QualifyValue() success!') + return QualifyValue + + @staticmethod + def get_Kdb(meta_file_path, polarization): + try: + Kdb = OrthoMetaData.get_Kdb(meta_file_path, polarization) + except Exception: + logger.warning('OrthoMetaData.get_Kdb() error!') + Kdb = GF3L1AMetaData.get_Kdb(meta_file_path, polarization) + logger.info('GF3L1AMetaData.get_Kdb() success!') + return Kdb + + @staticmethod + def get_RadarCenterFrequency(meta_file_path): + # 获取微波中心频率,单位GHz + RadarCenterFrequency = OrthoMetaData.get_RadarCenterFrequency(meta_file_path) + return RadarCenterFrequency + + @staticmethod + def get_lamda(meta_file_path): + # 获取微波波长,单位:m + lamda = OrthoMetaData.get_lamda(meta_file_path) + return lamda + +class Calibration: + def __init__(self): + pass + + @staticmethod + def get_Calibration_coefficient(meta_file_path, polarization): + calibration = [0, 0, 0, 0] + for i in polarization: + if i == 'HH': + quality = MetaDataHandler.get_QualifyValue(meta_file_path, i) + kdb = MetaDataHandler.get_Kdb(meta_file_path, i) + data_value = ((quality/32767)**2) * (10**((kdb/10)*-1)) + calibration[0] = math.sqrt(data_value) + if i == 'HV': + quality = MetaDataHandler.get_QualifyValue(meta_file_path, i) + kdb = MetaDataHandler.get_Kdb(meta_file_path, i) + data_value = ((quality/32767)**2) * (10**((kdb/10)*-1)) + calibration[1] = math.sqrt(data_value) + if i == 'VH': + quality = MetaDataHandler.get_QualifyValue(meta_file_path, i) + kdb = MetaDataHandler.get_Kdb(meta_file_path, i) + data_value = ((quality/32767)**2) * (10**((kdb/10)*-1)) + calibration[2] = math.sqrt(data_value) + if i == 'VV': + quality = MetaDataHandler.get_QualifyValue(meta_file_path, i) + kdb = MetaDataHandler.get_Kdb(meta_file_path, i) + data_value = ((quality/32767)**2) * (10**((kdb/10)*-1)) + calibration[3] = math.sqrt(data_value) + return calibration + + +# if __name__ == '__main__': +# A = ScatteringAuxData() +# dir = 'G:\MicroWorkspace\C-SAR\AuxSAR\GF3_KAS_FSII_020008_E113.2_N23.1_20200528_L1A_HHHV_L10004829485_geo/' +# path = dir + 'GF3_KAS_FSII_020008_E113.2_N23.1_20200528_L1A_HHHV_L10004829485.meta.xml' +# path1 = dir + 'OrthoProduct.meta.xml' +# t1 = A.get_QualifyValue(path, 'HH') +# t2 = A.get_Kdb(path, 'HH') +# t3 = A.get_RadarCenterFrequency(path) +# t4 = A.get_lamda(path) +# pass \ No newline at end of file diff --git a/tool/algorithm/algtools/PreProcess.py b/tool/algorithm/algtools/PreProcess.py new file mode 100644 index 0000000..e9b9155 --- /dev/null +++ b/tool/algorithm/algtools/PreProcess.py @@ -0,0 +1,527 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :PreProcess.py +@Function :@Function: 坐标转换,坐标系转换,图像裁剪,重投影,重采样 +@Author :LMM +@Date :2021/8/25 14:17 +@Version :1.0.0 +""" +from shapely.geometry import Polygon # 导入 gdal库要放到这一句的后面,不然会引起错误 + +from osgeo import gdal +from osgeo import gdalconst +from osgeo import osr +from osgeo import ogr +import os +import cv2 +import numpy as np +import shutil +import scipy.spatial.transform +import scipy.spatial.transform._rotation_groups # 用于解决打包错误 +import scipy.special.cython_special # 用于解决打包错误 +import scipy.spatial.transform._rotation_groups # 解决打包的问题 +import shapefile +from shapely.errors import TopologicalError +from tool.algorithm.image.ImageHandle import ImageHandler +import logging +logger = logging.getLogger("mylog") + +os.environ['PROJ_LIB'] = os.getcwd() + + + +class PreProcess: + """ + 预处理,所有的影像配准 + """ + def __init__(self): + self._ImageHandler = ImageHandler() + pass + + def cal_scopes(self, processing_paras): + # 计算roi + scopes = () + for key, value in processing_paras.items(): + if 'ori_sim' in key: + scopes += (ImageHandler.get_scope_ori_sim(value),) + if(processing_paras['box'] != "" or processing_paras['box'] != "empty"): + scopes += self.box2scope(processing_paras['box']) + return scopes + + def cal_scopes_roi(self, processing_paras): + return self.intersect_polygon(self.cal_scopes(processing_paras)) + + def cut_geoimg(self,workspace_preprocessing_path, para_names_geo, processing_paras): + self.check_img_projection(workspace_preprocessing_path, para_names_geo, processing_paras) + # 计算roi + + scopes = self.cal_scopes(processing_paras) + # 计算图像的轮廓,并求相交区域 + intersect_shp_path = os.path.join(workspace_preprocessing_path, 'IntersectPolygon.shp') + scopes_roi = self.cal_intersect_shp(intersect_shp_path, para_names_geo, processing_paras, scopes) + # 裁剪 + # 裁剪图像:裁剪微波图像,裁剪其他图像 + cutted_img_paths = self.cut_imgs(workspace_preprocessing_path, para_names_geo, processing_paras, intersect_shp_path) + return cutted_img_paths, scopes_roi + + + + def preprocessing(self, para_names, ref_img_name, processing_paras, workspace_preprocessing_path, workspace_preprocessed_path): + # 读取每一张图像,检查图像坐标系 + + self.check_img_projection(workspace_preprocessing_path, para_names, processing_paras) + + # 计算图像的轮廓,并求相交区域 + intersect_shp_path = os.path.join(workspace_preprocessing_path, 'IntersectPolygon.shp') + self.cal_intersect_shp(intersect_shp_path, para_names, processing_paras, + self.box2scope(processing_paras['box'])) + logger.info('create intersect shp success!') + + # 裁剪图像:裁剪微波图像,裁剪其他图像 + cutted_img_paths = self.cut_imgs(workspace_preprocessing_path, para_names, processing_paras, + intersect_shp_path) + logger.info('cut images success!') + + # 重采样:重采样到跟微波图像一致的分辨率,然后保存到临时目录 + + preprocessed_paras = self.resampling_img(workspace_preprocessed_path, para_names, cutted_img_paths,cutted_img_paths[ref_img_name]) + # 清除预处理缓存文件 + logger.info('preprocess_handle success!') + return preprocessed_paras # cutted_img_paths + + def get_ref_inf(self, ref_img_path): + """获取参考影像的图像信息""" + ref_img_path = ref_img_path + cols = ImageHandler.get_img_width(ref_img_path) + rows = ImageHandler.get_img_height(ref_img_path) + proj = ImageHandler.get_projection(ref_img_path) + geo = ImageHandler.get_geotransform(ref_img_path) + return ref_img_path, cols, rows, proj, geo + + def check_img_projection(self, out_dir, para_names, processing_paras): + """ + 读取每一张图像,检查图像坐标系; + 将投影坐标系影像转换为地理坐标系影像(EPSG:4326) + :param para_names:需要检查的参数名称 + """ + if len(para_names) == 0: + return False + for name in para_names: + proj = ImageHandler.get_projection(processing_paras[name]) + keyword = proj.split("[", 2)[0] + + if keyword == "PROJCS": + # 投影坐标系 转 地理坐标系 + para_dir = os.path.split(processing_paras[name]) + out_para = os.path.join(out_dir, para_dir[1].split(".", 1)[0] + "_EPSG4326.tif") + self.trans_epsg4326(out_para, processing_paras[name]) + processing_paras[name] = out_para + elif len(keyword) == 0 or keyword.strip() == "" or keyword.isspace() is True: + raise Exception('coordinate is missing!') + + + def preprocessing_oh2004(self, para_names, processing_paras, workspace_preprocessing_path, workspace_preprocessed_path): + # 读取每一张图像,检查图像坐标系 + + self.check_img_projection(workspace_preprocessing_path, para_names, processing_paras) + + # 计算图像的轮廓,并求相交区域 + intersect_shp_path = os.path.join(workspace_preprocessing_path, 'IntersectPolygon.shp') + scopes = self.cal_intersect_shp(intersect_shp_path, para_names, processing_paras, + self.box2scope(processing_paras['box'])) + logger.info('create intersect shp success!') + + # 裁剪图像:裁剪微波图像,裁剪其他图像 + cutted_img_paths = self.cut_imgs(workspace_preprocessed_path, para_names, processing_paras, + intersect_shp_path) + logger.info('cut images success!') + + # 重采样:重采样到跟微波图像一致的分辨率,然后保存到临时目录 + + return cutted_img_paths, scopes + + @staticmethod + def lonlat2geo(lat, lon): + """ + WGS84转平面坐标 + Param: lat 为WGS_1984的纬度 + Param: lon 为WGS_1984的经度 + 输出转换后的坐标x,y + """ + + dstsrs1 = osr.SpatialReference() + dstsrs1.ImportFromEPSG(32649) + + dstsrs2 = osr.SpatialReference() + dstsrs2.ImportFromEPSG(4326) + + ct = osr.CoordinateTransformation(dstsrs2, dstsrs1) + coords = ct.TransformPoint(lat, lon) + # print("输出转换后的坐标x,y:",coords[:2]) + return coords[:2] + + @staticmethod + def trans_geogcs2projcs(out_path, in_path): + """ + :param out_path:wgs84投影坐标影像保存路径 + :param in_path:地理坐标影像输入路径 + """ + # 创建文件 + if os.path.exists(os.path.split(out_path)[0]) is False: + os.makedirs(os.path.split(out_path)[0]) + options = gdal.WarpOptions(format='GTiff', srcSRS='EPSG:4326', dstSRS='EPSG:32649') + gdal.Warp(out_path, in_path, options=options) + + @staticmethod + def trans_projcs2geogcs(out_path, in_path): + """ + :param out_path:wgs84地理坐标影像输入路径 + :param in_path:wgs84投影坐标影像保存路径 + """ + # 创建文件 + if os.path.exists(os.path.split(out_path)[0]) is False: + os.makedirs(os.path.split(out_path)[0]) + options = gdal.WarpOptions(format='GTiff', srcSRS='EPSG:32649', dstSRS='EPSG:4326') + gdal.Warp(out_path, in_path, options=options) + + @staticmethod + def trans_projcs2geogcs(out_path, in_path ,EPSG_src=32649,EPSG_dst=4326): + """ + :param out_path:wgs84地理坐标影像输入路径 + :param in_path:wgs84投影坐标影像保存路径 + :param EPSG_src:原始投影系 + :param EPSG_dst:目标坐标系 + """ + str_EPSG_src = 'EPSG:'+ str(EPSG_src) + str_EPSG_dst = 'EPSG:'+ str(EPSG_dst) + + # 创建文件 + if os.path.exists(os.path.split(out_path)[0]) is False: + os.makedirs(os.path.split(out_path)[0]) + options = gdal.WarpOptions(format='GTiff', srcSRS=str_EPSG_src, dstSRS=str_EPSG_dst) + gdal.Warp(out_path, in_path, options=options) + + @staticmethod + def trans_epsg4326(out_path, in_path): + OutTile = gdal.Warp(out_path, in_path, + dstSRS='EPSG:4326', + resampleAlg=gdalconst.GRA_Bilinear + ) + OutTile = None + return True + + @staticmethod + def box2scope(str_box): + roi_box = () + if str_box == '' or str_box == 'empty': + return roi_box + box_list = [float(num) for num in list(str_box.split(';'))] + if len(box_list) == 4: + roi_box = ([[box_list[2], box_list[1]], [box_list[3], box_list[1]], [box_list[2], box_list[0]], + [box_list[3], box_list[0]]],) + return roi_box + + def cal_intersect_shp(self, shp_path, para_names,processing_paras, add_scope =()): + """ + :param shp_path:相交区域矢量文件保存区域 + :param para_names:判断相交影像的名称 + :return: True or False + """ + scopes = () + + if len(add_scope) != 0: + scopes += add_scope + for name in para_names: + scope_tuple = (self._ImageHandler.get_scope(processing_paras[name]),) + scopes += scope_tuple + for n, scope in zip( range(len(scopes)), scopes): + logging.info("scope" + str(n) + ":%s", scope) + + intersect_polygon = self.intersect_polygon(scopes) + if intersect_polygon is None: + logger.error('image range does not overlap!') + raise Exception('create intersect shp fail!') + logging.info("scope roi :%s", intersect_polygon) + if self.write_polygon_shp(shp_path, intersect_polygon, 4326) is False: + raise Exception('create intersect shp fail!') + return intersect_polygon + + @staticmethod + def intersect_polygon(scopes_tuple): + """ + 功能说明:计算多边形相交的区域坐标;注意:多边形区域会转变成凸区域再求交 + :param scopes_tuple: 输入多个区域坐标的tuple + :return: 多边形相交的区域坐标((x0,y0),(x1,y1),..., (xn,yn)) + """ + if len(scopes_tuple) < 2: + logger.error('len(scopes_tuple) < 2') + # return # todo 修改只有单景会出现无法判断相交区域问题 + + try: + # python四边形对象,会自动计算四个点,最后四个点顺序为:左上 左下 右下 右上 左上 + tmp = tuple(scopes_tuple[0]) + poly_intersect = Polygon(tmp).convex_hull + for i in range(len(scopes_tuple)-1): + polygon_next = Polygon(tuple(scopes_tuple[i+1])).convex_hull + if poly_intersect.intersects(polygon_next): + poly_intersect = poly_intersect.intersection(polygon_next) + else: + msg = 'Image:' + str(i) + 'range does not overlap!' + logger.error(msg) + return + return list(poly_intersect.boundary.coords)[:-1] + # except shapely.geos.TopologicalError: + except TopologicalError: + logger.error('shapely.geos.TopologicalError occurred!') + return + + + @staticmethod + def write_polygon_shp(out_shp_path, point_list, EPSG =32649): + """ + 功能说明:创建闭环的矢量文件。 + :param out_shp_path :矢量文件保存路径 + :param point_list :装有闭环点的列表[[x0,y0],[x1,y1]...[xn,yn]] + :return: True or False + """ + # 为了支持中文路径,请添加下面这句代码 + gdal.SetConfigOption("GDAL_FILENAME_IS_UTF8", "NO") + # 为了使属性表字段支持中文,请添加下面这句 + gdal.SetConfigOption("SHAPE_ENCODING", "") + # 注册所有的驱动 + ogr.RegisterAll() + + # 创建数据,这里以创建ESRI的shp文件为例 + str_driver_name = "ESRI Shapefile" + o_driver = ogr.GetDriverByName(str_driver_name) + if o_driver is None: + msg = 'driver('+str_driver_name+')is invalid value' + logger.error(msg) + return False + + # 创建数据源 + if os.path.exists(out_shp_path) and os.path.isfile(out_shp_path): # 如果已存在同名文件 + os.remove(out_shp_path) # 则删除之 + o_ds = o_driver.CreateDataSource(out_shp_path) + if o_ds is None: + msg = 'create file failed!' + out_shp_path + logger.error(msg) + return False + + # 创建图层,创建一个多边形图层 + srs = osr.SpatialReference() + #srs.ImportFromEPSG(32649) # 投影坐标系,空间参考:WGS84 + + srs.ImportFromEPSG(EPSG) # 地理坐标系EPSG + o_layer = o_ds.CreateLayer("TestPolygon", srs, ogr.wkbPolygon) + if o_layer is None: + msg = 'create coverage failed!' + logger.error(msg) + return False + + # 下面创建属性表 + # 先创建一个叫FieldID的整型属性 + o_field_id = ogr.FieldDefn("FieldID", ogr.OFTInteger) + o_layer.CreateField(o_field_id, 1) + + # 再创建一个叫FeatureName的字符型属性,字符长度为50 + o_field_name = ogr.FieldDefn("FieldName", ogr.OFTString) + o_field_name.SetWidth(100) + o_layer.CreateField(o_field_name, 1) + + o_defn = o_layer.GetLayerDefn() + + # 创建矩形要素 + o_feature_rectangle = ogr.Feature(o_defn) + o_feature_rectangle.SetField(0, 1) + o_feature_rectangle.SetField(1, "IntersectRegion") + + # 创建环对象ring + ring = ogr.Geometry(ogr.wkbLinearRing) + + for i in range(len(point_list)): + ring.AddPoint(point_list[i][0], point_list[i][1]) + ring.CloseRings() + + # 创建环对象polygon + geom_rect_polygon = ogr.Geometry(ogr.wkbPolygon) + geom_rect_polygon.AddGeometry(ring) + + o_feature_rectangle.SetGeometry(geom_rect_polygon) + o_layer.CreateFeature(o_feature_rectangle) + + o_ds.Destroy() + return True + + def cut_imgs(self, out_dir, para_names, processing_paras, shp_path): + """ + 使用矢量数据裁剪影像 + :param para_names:需要检查的参数名称 + :param shp_path:裁剪的shp文件 + """ + if len(para_names) == 0: + return {} + cutted_img_paths = {} + try: + for name in para_names: + input_path = processing_paras[name] + output_path = os.path.join(out_dir, name + '_cut.tif') + self.cut_img(output_path, input_path, shp_path) + cutted_img_paths.update({name: output_path}) + logger.info('cut %s success!', name) + except BaseException: + logger.error('cut_img failed!') + return {} + return cutted_img_paths + + @staticmethod + def cut_img(output_path, input_path, shp_path): + """ + :param output_path:剪切后的影像 + :param input_path:待剪切的影像 + :param shp_path:矢量数据 + :return: True or False + """ + r = shapefile.Reader(shp_path) + box = r.bbox + + input_dataset = gdal.Open(input_path) + + gdal.Warp(output_path, input_dataset, format='GTiff', outputBounds=box, cutlineDSName=shp_path, dstNodata=-9999) + # cutlineWhere="FIELD = ‘whatever’", + # optionally you can filter your cutline (shapefile) based on attribute values + # select the no data value you like + # ds = None + # do other stuff with ds object, it is your cropped dataset. in this case we only close the dataset. + del input_dataset + return True + + def resampling_img(self, out_dir, para_names, img_paths, refer_img_path): + """ + 以主影像为参考,对影像重采样 + :param para_names:需要检查的参数名称 + :param img_paths:待重采样影像路径 + :param refer_img_path:参考影像路径 + """ + if len(para_names) == 0 or len(img_paths) == 0: + return + prepro_imgs_path = {} + for name in para_names: + img_path = img_paths[name] + output_para = os.path.join(out_dir, name + '_preprocessed.tif') # + name + '_preprocessed.tif' + self.resampling_by_scale(img_path, output_para, refer_img_path) + prepro_imgs_path.update({name: output_para}) + logger.info('resampling %s success!', name) + return prepro_imgs_path + + @staticmethod + def resampling_by_scale(input_path, target_file, refer_img_path): + """ + 按照缩放比例对影像重采样 + :param input_path: GDAL地理数据路径 + :param target_file: 输出影像 + :param refer_img_path:参考影像 + :return: True or False + """ + ref_dataset = gdal.Open(refer_img_path) + ref_cols = ref_dataset.RasterXSize # 列数 + ref_rows = ref_dataset.RasterYSize # 行数 + + target_dataset = gdal.Open(input_path) + target_cols = target_dataset.RasterXSize # 列数 + target_rows = target_dataset.RasterYSize # 行数 + + if(ref_cols == target_cols) and (ref_rows == target_rows): + shutil.copyfile(input_path, target_file) + return True + + dataset = gdal.Open(input_path) + if dataset is None: + logger.error('resampling_by_scale:dataset is None!') + return False + + band_count = dataset.RasterCount # 波段数 + if (band_count == 0) or (target_file == ""): + logger.error("resampling_by_scale:Parameters of the abnormal!") + return False + + cols = dataset.RasterXSize # 列数 + rows = dataset.RasterYSize # 行数 + scale_x = ref_cols/cols + scale_y = ref_rows/rows + + # rows = dataset.RasterYSize # 行数 + # cols = int(cols * scale) # 计算新的行列数 + # rows = int(rows * scale) + cols = ref_cols + rows = ref_rows + + geotrans = list(dataset.GetGeoTransform()) + geotrans[1] = geotrans[1] / scale_x # 像元宽度变为原来的scale倍 + geotrans[5] = geotrans[5] / scale_y # 像元高度变为原来的scale倍 + + if os.path.exists(target_file) and os.path.isfile(target_file): # 如果已存在同名影像 + os.remove(target_file) # 则删除之 + if not os.path.exists(os.path.split(target_file)[0]): + os.makedirs(os.path.split(target_file)[0]) + + band1 = dataset.GetRasterBand(1) + data_type = band1.DataType + target = dataset.GetDriver().Create(target_file, xsize=cols, ysize=rows, bands=band_count, + eType=data_type) + target.SetProjection(dataset.GetProjection()) # 设置投影坐标 + target.SetGeoTransform(geotrans) # 设置地理变换参数 + total = band_count + 1 + for index in range(1, total): + # 读取波段数据 + data = dataset.GetRasterBand(index).ReadAsArray(buf_xsize=cols, buf_ysize=rows) + out_band = target.GetRasterBand(index) + + no_data_value = dataset.GetRasterBand(index).GetNoDataValue() # 获取没有数据的点 + if not (no_data_value is None): + out_band.SetNoDataValue(no_data_value) + + out_band.WriteArray(data) # 写入数据到新影像中 + out_band.FlushCache() + out_band.ComputeBandStats(False) # 计算统计信息 + del dataset + del target + return True + + @staticmethod + def cv_mean_filter(out_path, in_path, filter_size): + """ + :param out_path:滤波后的影像 + :param in_path:滤波前的影像 + :param filter_size:滤波尺寸 + :return: True or False + """ + proj = ImageHandler.get_projection(in_path) + geotrans = ImageHandler.get_geotransform(in_path) + array = ImageHandler.get_band_array(in_path, 1) + array = cv2.blur(array, (filter_size, filter_size)) # 均值滤波 + ImageHandler.write_img(out_path, proj, geotrans, array) + return True + + @staticmethod + def check_LocalIncidenceAngle(out_tif_path, in_tif_path): + """ + 将角度的无效值设置为nan,把角度值转为弧度值 + :param out_tif_path:处理后影像路径 + :param in_tif_path:处理前影像路径 + """ + proj, geo, angle = ImageHandler.read_img(in_tif_path) + angle = angle.astype(np.float32, order='C') + angle[angle == -9999] = np.nan + + mean = np.nanmean(angle) + if mean > np.pi: + angle = np.deg2rad(angle)# 角度转弧度 + + angle[np.where(angle >= 0.5 * np.pi)] = np.nan + angle[np.where(angle < 0)] = np.nan + + ImageHandler.write_img(out_tif_path, proj, geo, angle) + + diff --git a/tool/algorithm/algtools/ROIAlg.py b/tool/algorithm/algtools/ROIAlg.py new file mode 100644 index 0000000..9a47761 --- /dev/null +++ b/tool/algorithm/algtools/ROIAlg.py @@ -0,0 +1,184 @@ +# -*- coding: UTF-8 -*- +""" +@Project:microproduct +@File:ROIAlg.py +@Function: +@Contact: +@Author:SHJ +@Date:2021/11/17 +@Version:1.0.0 +""" +import logging +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.PreProcess import PreProcess as pp +import numpy as np + + +logger = logging.getLogger("mylog") + + +class ROIAlg: + def __init__(self,): + pass + + @staticmethod + def roi_process(names, processing_path, processing_paras, preprocessed_paras): + roi_paths = [] + roi = ROIAlg() + for name in names: + if 'LocalIncidenceAngle' in name: + # 利用角度为nan生成Mask + pp.check_LocalIncidenceAngle(preprocessed_paras[name],preprocessed_paras[name]) + angle_nan_mask_path = processing_path + 'angle_nan_mask.tif' + roi.trans_tif2mask(angle_nan_mask_path, preprocessed_paras[name], np.nan) + roi_paths.append(angle_nan_mask_path) + elif ("HH" in name) or ("HV" in name) or ("VH" in name) or ("VV" in name): + # 利用影像的有效范围生成MASK + tif_mask_path = processing_path + name + "_tif_mask.tif" + roi.trans_tif2mask(tif_mask_path, preprocessed_paras[name], np.nan) + roi_paths.append(tif_mask_path) + elif name == 'Covering': + # 利用cover计算植被覆盖范围 + if processing_paras['CoveringIDs'] == 'empty': + cover_data = ImageHandler.get_data(preprocessed_paras["Covering"]) + cover_id_list = list(np.unique(cover_data)) + else: + cover_id_list = list(processing_paras['CoveringIDs'].split(';')) + cover_id_list = [int(num) for num in cover_id_list] + cover_mask_path = processing_path + "cover_mask.tif" + roi.trans_cover2mask(cover_mask_path, preprocessed_paras[name], cover_id_list) + roi_paths.append(cover_mask_path) + elif name == "NDVI": + # 利用NDVI计算裸土范围该指数的输出值在 -1.0 和 1.0 之间,大部分表示植被量, + # 负值主要根据云、水和雪而生成 + # 接近零的值则主要根据岩石和裸土而生成。 + # 较低的(小于等于 0.1)NDVI 值表示岩石、沙石或雪覆盖的贫瘠区域。 + # 中等值(0.2 至 0.3)表示灌木丛和草地 + # 较高的值(0.6 至 0.8)表示温带雨林和热带雨林。 + ndvi_mask_path = processing_path + "ndvi_mask.tif" + ndvi_scope = list(processing_paras['NDVIScope'].split(';')) + threshold_of_ndvi_min = float(ndvi_scope[0]) + threshold_of_ndvi_max = float(ndvi_scope[1]) + roi.trans_tif2mask(ndvi_mask_path, preprocessed_paras[name], threshold_of_ndvi_min, threshold_of_ndvi_max) + roi_paths.append(ndvi_mask_path) + # else: + # # 其他特征影像 + # tif_mask_path = processing_path + name + "_mask.tif" + # roi.trans_tif2mask(tif_mask_path, preprocessed_paras[name], np.nan) + # roi_paths.append(tif_mask_path) + + + bare_land_mask_path = processing_path + "bare_land_mask.tif" + for roi_path in roi_paths: + roi.combine_mask(bare_land_mask_path, roi_path, bare_land_mask_path) + return bare_land_mask_path + + @staticmethod + def trans_tif2mask(out_mask_path, in_tif_path, threshold_min, threshold_max = None): + """ + :param out_mask_path:mask输出路径 + :param in_tif_path:输入路径 + :param threshold_min:最小阈值 + :param threshold_max:最大阈值 + :return: True or False + """ + image_handler = ImageHandler() + proj = image_handler.get_projection(in_tif_path) + geotrans = image_handler.get_geotransform(in_tif_path) + array = image_handler.get_band_array(in_tif_path, 1) + if threshold_max == None and np.isnan(threshold_min)==True: + nan = np.isnan(array) + mask = (nan.astype(int) == 0).astype(int) + mask1 = ((array == -9999).astype(int) == 0).astype(int) + mask *= mask1 + image_handler.write_img(out_mask_path, proj, geotrans, mask) + else: + if threshold_min < threshold_max: + mask = ((array > threshold_min) & (array < threshold_max)).astype(int) + image_handler.write_img(out_mask_path, proj, geotrans, mask) + elif threshold_min > threshold_max: + mask = ((array < threshold_min) & (array > threshold_max)).astype(int) + image_handler.write_img(out_mask_path, proj, geotrans, mask) + elif threshold_max == threshold_min: + mask = ((array == threshold_min).astype(int) == 0).astype(int) + image_handler.write_img(out_mask_path, proj, geotrans, mask) + + logger.info("trans_tif2mask success, path: %s", out_mask_path) + return True + + @staticmethod + def trans_cover2mask(out_mask_path, in_tif_path, cover_id_list): + """ + :param out_mask_path:mask输出路径 + :param in_tif_path:输入路径 + :param cover_id_list 地表覆盖类型数据的id + :return: True or False + """ + image_handler = ImageHandler() + proj = image_handler.get_projection(in_tif_path) + geotrans = image_handler.get_geotransform(in_tif_path) + array = image_handler.get_band_array(in_tif_path, 1) + + mask = np.zeros(array.shape, dtype=bool) + for id in cover_id_list: + mask_tmp = (array == id) + mask = mask | mask_tmp + + mask = mask.astype(int) + image_handler.write_img(out_mask_path, proj, geotrans, mask) + + @staticmethod + def combine_mask(out_mask_path, in_main_mask_path, in_sub_mask_path): + """ + :param out_mask_path:输出路径 + :param in_main_mask_path:主mask路径,输出影像采用主mask的地理信息 + :param in_sub_mask_path:副mask路径 + """ + image_handler = ImageHandler() + proj = image_handler.get_projection(in_main_mask_path) + geotrans = image_handler.get_geotransform(in_main_mask_path) + main_array = image_handler.get_band_array(in_main_mask_path, 1) + if image_handler.get_dataset(in_sub_mask_path) != None: + sub_array = image_handler.get_band_array(in_sub_mask_path, 1) + main_array = main_array * sub_array + image_handler.write_img(out_mask_path, proj, geotrans, main_array) + logger.info("combine_mask success, path: %s", out_mask_path) + return True + + @staticmethod + def cal_roi(out_tif_path, in_tif_path, mask_path, background_value=1): + """ + :param out_tif_path:ROI的影像 + :param in_tif_path:计算ROI的影像 + :param mask_path:掩模 + :param background_value:无效区域设置的背景值 + :return: True or False + """ + image_handler = ImageHandler() + proj = image_handler.get_projection(in_tif_path) + geotrans = image_handler.get_geotransform(in_tif_path) + tif_array = image_handler.get_data(in_tif_path) # 读取所有波段的像元值存为数组 + mask_array = image_handler.get_band_array(mask_path, 1) + if len(tif_array.shape) == 3: + im_bands, im_height, im_width = tif_array.shape + else: + im_bands, (im_height, im_width) = 1, tif_array.shape + if im_bands == 1: + tif_array[np.isnan(mask_array)] = background_value + tif_array[mask_array == 0] = background_value + elif im_bands>1: + for i in range(0, im_bands): + tif_array[i, :, :][np.isnan(mask_array)] = background_value + tif_array[i, :, :][mask_array == 0] = background_value + image_handler.write_img(out_tif_path, proj, geotrans, tif_array, '0') + logger.info("cal_roi success, path: %s", out_tif_path) + return True + +# if __name__ == '__main__': +# dir = r'G:\MicroWorkspace\C-SAR\SoilMoisture\Temporary\processing/' +# out_tif_path = dir + 'soil_moisture_roi.tif' +# in_tif_path = dir + 'soil_moisture.tif' +# mask_path = dir + 'bare_land_mask.tif' +# background_value = np.nan +# ROIAlg.cal_roi(out_tif_path, in_tif_path, mask_path, background_value) +# pass \ No newline at end of file diff --git a/tool/algorithm/algtools/RieveFilter.py b/tool/algorithm/algtools/RieveFilter.py new file mode 100644 index 0000000..4756a76 --- /dev/null +++ b/tool/algorithm/algtools/RieveFilter.py @@ -0,0 +1,57 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:sieve_filter.py +@Function:gdal斑点滤波功能 +@Contact: 'https://www.osgeo.cn/gdal/api/gdal_alg.html?highlight=gdalsievefilter#' + '_CPPv415GDALSieveFilter15GDALRasterBandH15GDALRasterBandH15GDALRasterBandHiiPPc16GDALProgressFuncPv' +@Author:SHJ +@Date:2021/8/30 8:42 +@Version:1.0.0 +""" +import logging +from osgeo import gdal +import numpy as np +# from onestar.soilMoisture.OneMoistureImage import ImageHandler +from tool.algorithm.image.ImageHandle import ImageHandler +logger = logging.getLogger("mylog") + + +def gdal_sieve_filter(dst_filename, src_filename, threshold=100, connectedness=4): + """ + 基于python GDAL栅格滤波 + :param dst_filename: 输出滤波后的影像 + :param src_filename: 输入需要处理的文件 + :param threshold: 滤波的值大小 + :param connectedness: 连通域, 范围:4或者8 + :return: + """ + # 4表示对角像素不被视为直接相邻用于多边形成员资格,8表示对角像素不相邻 + # connectedness = 4 + gdal.AllRegister() + # print('需要处理滤波的栅格文件:{},阈值(分辨率):{}'.format(src_filename, threshold)) + dataset = gdal.Open(src_filename, gdal.GA_Update) + if dataset is None: + logger.error('{}open tif fail!'.format(src_filename)) + return False + # 获取需要处理的源栅格波段 + src_band = dataset.GetRasterBand(1) + mask_band = src_band.GetMaskBand() + dst_band = src_band + prog_func = gdal.TermProgress_nocb + # 调用gdal滤波函数 + result = gdal.SieveFilter(src_band, mask_band, dst_band, threshold, connectedness, callback=prog_func) + if result != 0: + return False + proj = dataset.GetProjection() + geotransform = dataset.GetGeoTransform() + dst_array = dst_band.ReadAsArray(0, 0, dst_band.XSize, dst_band.YSize) + ImageHandler.write_img(dst_filename, proj, geotransform, dst_array) + del dataset + return True + +# +# if __name__ == '__main__': +# inputfile = r'D:\DATA\testdata\srcimg\GLCFCS30_E110N25.tif' +# outputfile = r'D:\DATA\testdata\srcimg\GLCFCS30_E110N25_sieve_filter.tif' +# flag = gdal_sieve_filter(outputfile, inputfile, threshold=100, connectedness=4) diff --git a/tool/algorithm/algtools/ScatteringAuxData.py b/tool/algorithm/algtools/ScatteringAuxData.py new file mode 100644 index 0000000..6a00c8f --- /dev/null +++ b/tool/algorithm/algtools/ScatteringAuxData.py @@ -0,0 +1,122 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :ScatteringAuxData.py +@Function :后向散射 +@Author :SHJ +@Contact: +@Date :2022/6/29 +@Version :1.0.0 +修改历史: +[修改序列] [修改日期] [修改者] [修改内容] + 1 2022-6-29 石海军 1.兼容GF3元文件和正射校正元文件提取信息 +""" +import logging +from xml.etree.ElementTree import ElementTree +logger = logging.getLogger("mylog") + +class GF3L1AMetaData: + def __init__(self): + pass + @staticmethod + def get_QualifyValue(meta_file_path, polarization): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + QualifyValue = float(root.find('imageinfo').find('QualifyValue').find(polarization).text) + return QualifyValue + + + @staticmethod + def get_Kdb(meta_file_path, polarization): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + Kdb = float(root.find('processinfo').find('CalibrationConst').find(polarization).text) + return Kdb + +class OrthoMetaData: + def __init__(self): + pass + @staticmethod + def get_QualifyValue(meta_file_path, polarization): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + QualifyValue = float(root.find('l1aInfo').find('imageinfo').find('QualifyValue').find(polarization).text) + return QualifyValue + + @staticmethod + def get_Kdb(meta_file_path, polarization): + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + Kdb = float(root.find('l1aInfo').find('processinfo').find('CalibrationConst').find(polarization).text) + return Kdb + + + @staticmethod + def get_RadarCenterFrequency(meta_file_path): + # 获取微波中心频率 + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + RadarCenterFrequency = float(root.find('sensor').find('RadarCenterFrequency').text) + return RadarCenterFrequency + + + @staticmethod + def get_lamda(meta_file_path): + # 获取微波波长,单位:m + tree = ElementTree() + tree.parse(meta_file_path) + root = tree.getroot() + lamda = float(root.find('sensor').find('lamda').text) + return lamda + +class ScatteringAuxData: + def __init__(self): + pass + + @staticmethod + def get_QualifyValue(meta_file_path, polarization): + try: + QualifyValue = OrthoMetaData.get_QualifyValue(meta_file_path, polarization) + except Exception: + logger.warning('OrthoMetaData.get_QualifyValue() error!') + QualifyValue = GF3L1AMetaData.get_QualifyValue(meta_file_path, polarization) + logger.info('GF3L1AMetaData.get_QualifyValue() success!') + return QualifyValue + + @staticmethod + def get_Kdb(meta_file_path, polarization): + try: + Kdb = OrthoMetaData.get_Kdb(meta_file_path, polarization) + except Exception: + logger.warning('OrthoMetaData.get_Kdb() error!') + Kdb = GF3L1AMetaData.get_Kdb(meta_file_path, polarization) + logger.info('GF3L1AMetaData.get_Kdb() success!') + return Kdb + + @staticmethod + def get_RadarCenterFrequency(meta_file_path): + # 获取微波中心频率,单位GHz + RadarCenterFrequency = OrthoMetaData.get_RadarCenterFrequency(meta_file_path) + return RadarCenterFrequency + + @staticmethod + def get_lamda(meta_file_path): + # 获取微波波长,单位:m + lamda = OrthoMetaData.get_lamda(meta_file_path) + return lamda + +# if __name__ == '__main__': +# A = ScatteringAuxData() +# dir = 'G:\MicroWorkspace\C-SAR\AuxSAR\GF3_KAS_FSII_020008_E113.2_N23.1_20200528_L1A_HHHV_L10004829485_geo/' +# path = dir + 'GF3_KAS_FSII_020008_E113.2_N23.1_20200528_L1A_HHHV_L10004829485.meta.xml' +# path1 = dir + 'OrthoProduct.meta.xml' +# t1 = A.get_QualifyValue(path, 'HH') +# t2 = A.get_Kdb(path, 'HH') +# t3 = A.get_RadarCenterFrequency(path) +# t4 = A.get_lamda(path) +# pass \ No newline at end of file diff --git a/tool/algorithm/algtools/calculateLocalIncident/calculateLocalIncident.py b/tool/algorithm/algtools/calculateLocalIncident/calculateLocalIncident.py new file mode 100644 index 0000000..c2b634d --- /dev/null +++ b/tool/algorithm/algtools/calculateLocalIncident/calculateLocalIncident.py @@ -0,0 +1,414 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :CalculateIncident.py +@Function :计算、局部入射角计算 +@Author :LMM +@Date :2021/8/25 14:17 +@Version :1.0.0 +""" +import os +import numpy as np +from osgeo import gdal +from osgeo import gdalconst +import gc +import math +from xml.dom import minidom # 不需要安装,默认环境里就有 + + +class CalculateIncident: + def __init__(self): + pass + + @staticmethod + def add_round(npgrid): + """ + 边缘填充一圈,然后输出填充得到的矩阵 + param:npgrid dem数组 + """ + ny, nx = npgrid.shape # ny:行数,nx:列数 + zbc = np.zeros((ny + 2, nx + 2)) + zbc[1:-1, 1:-1] = npgrid + # 四边 + zbc[0, 1:-1] = npgrid[0, :] + zbc[-1, 1:-1] = npgrid[-1, :] + zbc[1:-1, 0] = npgrid[:, 0] + zbc[1:-1, -1] = npgrid[:, -1] + # 角点 + zbc[0, 0] = npgrid[0, 0] + zbc[0, -1] = npgrid[0, -1] + zbc[-1, 0] = npgrid[-1, 0] + zbc[-1, -1] = npgrid[-1, -1] + print("输出填充后的数组的形状", zbc.shape) + return zbc + + @staticmethod + def cal_dxdy(zbc, dx): + """ + 计算dx,dy + param:zbc填充后的数组 + param:dx dem数据像元大小 + + """ + we_x = ((zbc[1:-1, :-2]) - (zbc[1:-1, 2:])) / dx / 2 # WE方向 + ns_y = ((zbc[2:, 1:-1]) - (zbc[:-2, 1:-1])) / dx / 2 # NS方向 + print("输出Sx的数组的形状", we_x.shape, "输出Sy的数组的形状", ns_y.shape) + sx = we_x[1:-1, 1:-1] + sy = ns_y[1:-1, 1:-1] + # np.savetxt("dxdy.csv",dx,delimiter=",") + print("输出Sx2的数组的形状", sx.shape, "输出Sy2的数组的形状", sy.shape) + return sx, sy + + @staticmethod + def cal_slopasp(dx, dy): + # 计算坡度\坡向 + # 坡度计算 slope + slope = (np.arctan(np.sqrt(dx * dx + dy * dy))) * 57.29578 # 转换成°,57.29578=180/math.pi + slope = slope[1:-1, 1:-1] + # 坡向计算 aspect + aspect = np.ones([dx.shape[0], dx.shape[1]]).astype(np.float32) # 生成一个全是0的数组 + + # dx = dx.astype(np.float32) + # dy = dy.astype(np.float32) + # a1=(np.where(dx==0) and np.where(dy ==0)) + # print(a1) + # aspect[a1]=-1 + # a2 = (np.where(dx == 0) and np.where(dy > 0)) + # aspect[a2] =0.0 + # a3 = (np.where(dx == 0) and np.where(dy <0)) + # aspect[a3] =180.0 + # a4 = (np.where(dx > 0) and np.where(dy ==0)) + # aspect[a4] =90.0 + # a5 = (np.where(dx < 0) and np.where(dy ==0)) + # aspect[a5] =270.0 + # a6 = (np.where(dx != 0) or np.where(dy !=0)) + # b=dy[a6] + # print(":", 1) + # aspect[a6] =float(math.atan2(dy[i, j], dx[i, j])) * 57.29578 + # a7=np.where(aspect[a6]< 0.0) + # aspect[a7] = 90.0 - aspect[a7] + # a8=np.where(aspect[a6]> 90.0) + # aspect[a8] = 450.0- aspect[a8] + # a9 =np.where(aspect[a6] >= 0 or aspect[a6] <= 90) + # aspect[a9] =90.0 - aspect[a9] + + for i in range(dx.shape[0]): + for j in range(dx.shape[1]): + x = float(dx[i, j]) + y = float(dy[i, j]) + if (x == 0.0) & (y == 0.0): + aspect[i, j] = -1 + elif x == 0.0: + if y > 0.0: + aspect[i, j] = 0.0 + else: + aspect[i, j] = 180.0 + elif y == 0.0: + if x > 0.0: + aspect[i, j] = 90.0 + else: + aspect[i, j] = 270.0 + else: + aspect[i, j] = float(math.atan2(y, x)) * 57.29578 # 范围(-Π/2,Π/2) + if aspect[i, j] < 0.0: + aspect[i, j] = 90.0 - aspect[i, j] + elif aspect[i, j] > 90.0: + aspect[i, j] = 450.0 - aspect[i, j] + else: + aspect[i, j] = 90.0 - aspect[i, j] + print("输出aspect形状:", aspect.shape) # 3599, 3599 + print("输出aspect:", aspect) + return slope, aspect + + def creat_twofile(self, dem_file_path, slope_out_path, aspect_out_path): + """ + 生成坡度图、坡向图 + param: path_file1 为输入文件tif数据的文件路径 + + """ + if os.path.isfile(dem_file_path): + print("高程数据文件存在") + else: + print("高程数据文件不存在") + + dataset_caijian = gdal.Open(dem_file_path) + x_size = dataset_caijian.RasterXSize + y_size = dataset_caijian.RasterYSize + geo = dataset_caijian.GetGeoTransform() + pro = dataset_caijian.GetProjection() + array0 = dataset_caijian.ReadAsArray(0, 0, x_size, y_size) + print("输出dem数据的数组", array0) + zbc = self.add_round(array0) + sx, sy = self.cal_dxdy(zbc, 30) + slope, aspect = self.cal_slopasp(sx, sy) + + driver = gdal.GetDriverByName("GTiff") # 创建一个数据格式 + driver.Register() + newfile = driver.Create(slope_out_path, x_size, y_size, 1, gdal.GDT_Float32) # 存放路径文件名,长,宽,波段,数据类型 + newfile.SetProjection(pro) + geo = [geo[0], geo[1], 0, geo[3], 0, -geo[1]] + newfile.SetGeoTransform(geo) + newfile.GetRasterBand(1).WriteArray(slope) + + driver2 = gdal.GetDriverByName("GTiff") # 创建一个数据格式 + driver2.Register() + newfile2 = driver2.Create(aspect_out_path, x_size, y_size, 1, gdal.GDT_Float32) # 存放路径文件名,长,宽,波段,数据类型 + geo = [geo[0], geo[1], 0, geo[3], 0, -geo[1]] + newfile2.SetGeoTransform(geo) + newfile2.GetRasterBand(1).WriteArray(aspect) + + @staticmethod + def resampling(input_file1, input_file2, ref_file, output_file, output_file2): + """ + 采用gdal.Warp()方法进行重采样,差值法为双线性插值 + :param input_file1 slope path + :param input_file2 aspect path + :param ref_file: 参考图像路径 + :param output_file: slope path + :param output_file2 aspect path + :return: + """ + gdal.AllRegister() + in_ds1 = gdal.Open(input_file1) + in_ds2 = gdal.Open(input_file2) + ref_ds = gdal.Open(ref_file, gdal.GA_ReadOnly) + + # 获取输入影像信息 + input_file_proj = in_ds1.GetProjection() + # inputefileTrans = in_ds1.GetGeoTransform() + reference_file_proj = ref_ds.GetProjection() + reference_file_trans = ref_ds.GetGeoTransform() + + nbands = in_ds1.RasterCount + bandinputfile1 = in_ds1.GetRasterBand(1) + bandinputfile2 = in_ds2.GetRasterBand(1) + x = ref_ds.RasterXSize + y = ref_ds.RasterYSize + + # 创建重采样输出文件(设置投影及六参数) + driver1 = gdal.GetDriverByName('GTiff') + output1 = driver1.Create(output_file, x, y, nbands, bandinputfile1.DataType) + output1.SetGeoTransform(reference_file_trans) + output1.SetProjection(reference_file_proj) + # options = gdal.WarpOptions(srcSRS=inputProj, dstSRS=referencefileProj, resampleAlg=gdalconst.GRA_Bilinear) + # resampleAlg = gdalconst.GRA_NearestNeighbour + gdal.ReprojectImage(in_ds1, output1, input_file_proj, reference_file_proj, gdalconst.GRA_Bilinear) + + driver2 = gdal.GetDriverByName('GTiff') + output2 = driver2.Create(output_file2, x, y, nbands, bandinputfile2.DataType) + output2.SetGeoTransform(reference_file_trans) + output2.SetProjection(reference_file_proj) + # options = gdal.WarpOptions(srcSRS=inputProj, dstSRS=referencefileProj, resampleAlg=gdalconst.GRA_Bilinear) + # resampleAlg = gdalconst.GRA_NearestNeighbour + gdal.ReprojectImage(in_ds2, output2, input_file_proj, reference_file_proj, gdalconst.GRA_Bilinear) + + @staticmethod + def getorbitparameter(xml_path): + """ + 从轨道参数文件xml中获取升降轨信息、影像四个角的经纬度坐标 + + """ + # 打开xml文档,根据路径初始化DOM + doc = minidom.parse(xml_path) + # 得到xml文档元素对象,初始化root对象 + root = doc.documentElement + + # 输出升降轨信息,DEC降轨,ASC升轨 + direction = root.getElementsByTagName("Direction")[0] + # print("输出Direction的子节点列表",Direction.firstChild.data) + pd = direction.firstChild.data + + imageinfo = root.getElementsByTagName("imageinfo")[0] + # 输出topLeft的纬度和经度 + top_left = imageinfo.getElementsByTagName("topLeft")[0] + latitude = top_left.getElementsByTagName("latitude")[0] + longitude = top_left.getElementsByTagName("longitude")[0] + # print("输出topLeft的纬度lat和经度lon:", latitude.firstChild.data,longitude.firstChild.data) + tl_lat, tl_lon = latitude.firstChild.data, longitude.firstChild.data + + # 输出topRight的纬度和经度 + top_right = imageinfo.getElementsByTagName("topRight")[0] + latitude = top_right.getElementsByTagName("latitude")[0] + longitude = top_right.getElementsByTagName("longitude")[0] + # print("输出topRight的纬度lat和经度lon:", latitude.firstChild.data,longitude.firstChild.data) + tr_lat, tr_lon = latitude.firstChild.data, longitude.firstChild.data + + # 输出 bottomLeft的纬度和经度 + bottom_left = imageinfo.getElementsByTagName("bottomLeft")[0] + latitude = bottom_left.getElementsByTagName("latitude")[0] + longitude = bottom_left.getElementsByTagName("longitude")[0] + # print("输出bottomLeft的纬度lat和经度lon:", latitude.firstChild.data,longitude.firstChild.data) + bl_lat, bl_lon = latitude.firstChild.data, longitude.firstChild.data + + # 输出 bottomRight的纬度和经度 + bottom_right = imageinfo.getElementsByTagName("bottomRight")[0] + latitude = bottom_right.getElementsByTagName("latitude")[0] + longitude = bottom_right.getElementsByTagName("longitude")[0] + # print("输出bottomRight的纬度lat和经度lon:", latitude.firstChild.data,longitude.firstChild.data) + br_lat, br_lon = latitude.firstChild.data, longitude.firstChild.data + print("pd,tl_lat,tl_lon,tr_lat,tr_lon,bl_lat,bl_lon,br_lat,br_lon", pd, tl_lat, tl_lon, tr_lat, tr_lon, bl_lat, + bl_lon, br_lat, br_lon) + return pd, tl_lat, tl_lon, tr_lat, tr_lon, bl_lat, bl_lon, br_lat, br_lon + + def get_rparademeter(self, xml_path): + """ + 计算雷达视线向方向角R + """ + pd, tl_lat, tl_lon, tr_lat, tr_lon, bl_lat, bl_lon, br_lat, br_lon = self.getorbitparameter(xml_path) + + tl_lat = float(tl_lat) # 原来的数是带有小数点的字符串,int会报错,使用float + tl_lon = float(tl_lon) + # tr_lat = float(tr_lat) + # tr_lon = float(tr_lon) + bl_lat = float(bl_lat) + bl_lon = float(bl_lon) + # br_lat = float(br_lat) + # br_lon = float(br_lon) + + if pd == "DEC": + # 降轨 + b = np.arctan((tl_lat - bl_lat) / (tl_lon - bl_lon)) * 57.29578 + r = 270 + b + return r + # tl_lat, tl_lon = lonlat2geo(tl_lat, tl_lon) + # tr_lat, tr_lon = lonlat2geo(tr_lat, tr_lon) + # bl_lat, bl_lon = lonlat2geo(bl_lat, bl_lon) + # br_lat, br_lon = lonlat2geo(br_lat, br_lon) + # B2 = np.arctan((tl_lat - bl_lat) / (tl_lon - bl_lon)) * 57.29578 + # R2 = 270 + B2 + # print(("输出R2:", R2)) + if pd == "ASC": + # 升轨 + b = np.arctan((tl_lat - bl_lat) / (tl_lon - bl_lon)) * 57.29578 + return b + + def clau(self, pathfile1, pathfile2, pathfile3, xml_path, save_localangle_path): + """ + 计算局部入射角 + param: pathfile1是slope的坡度图路径 + param: pathfile2是aspect的坡向图路径 + param: pathfile3是入射角文件的路径 + param: xml_path是轨道参数文件 + r是雷达视线向方位角 + """ + r = self.get_rparademeter(xml_path) + pd, tl_lat, tl_lon, tr_lat, tr_lon, bl_lat, bl_lon, br_lat, br_lon = self.getorbitparameter(xml_path) + print("输出升降轨:", pd) + dataset = gdal.Open(pathfile1) + x = dataset.RasterXSize + y = dataset.RasterYSize + print("输出slope的行、列:", x, y) + slope_array = dataset.ReadAsArray(0, 0, x, y) + + dataset2 = gdal.Open(pathfile2) + x2 = dataset2.RasterXSize + y2 = dataset2.RasterYSize + print("输出aspect的行、列:", x2, y2) + aspect_array = dataset2.ReadAsArray(0, 0, x2, y2) + + dataset3 = gdal.Open(pathfile3) + x3 = dataset3.RasterXSize + y3 = dataset3.RasterYSize + geo3 = dataset3.GetGeoTransform() + pro3 = dataset3.GetProjection() + print("输出入射角文件的行、列:", x3, y3) + + rushe_array = dataset3.ReadAsArray(0, 0, x3, y3) + # b0 = np.where(rushe_array > 0.00001, 0, 1) + radina_value = 0 + if pd == "DEC": + # 降轨数据 + # 雷达视线角-坡度角在90度到270度之间 + where_0 = np.where(rushe_array == 0) + + bb1 = (r-aspect_array).all() and (r-aspect_array).all() + bb2 = np.where(90 < bb1 < 270, 1, 0) + b1 = (bb1 and bb2) + # b1 = np.where(90 < ((r-aspect_array).all()) and ((r-aspect_array).all()) < 270, 1, 0) + c1 = np.cos(rushe_array*(math.pi/180)) * np.cos(slope_array*(math.pi/180)) - np.sin(slope_array*(math.pi/180)) * np.sin( + rushe_array*(math.pi/180)) * np.cos((r - aspect_array)*(math.pi/180)) + d1 = b1 * c1 + # 雷达视线角-坡度角=90度或=270度时 + b2 = np.where((r-aspect_array == 90) | (r-aspect_array == 270), 1, 0) + d2 = b2*c1 + # 雷达视线角-坡度角在90度到270度之间 + b3 = 1-b1-b2 + c3 = np.cos(rushe_array*(math.pi/180)) * np.cos(slope_array*(math.pi/180)) + np.sin( + slope_array*(math.pi/180)) * np.sin(rushe_array*(math.pi/180)) * np.cos((r - aspect_array)*(math.pi/180)) + d3 = b3 * c3 + del b1, b2, b3, c3, c1 + gc.collect() + radina_value = d1 + d2 + d3 + radina_value[where_0] = 0 + del d1, d2, d3 + gc.collect() + if pd == "ASC": + # 升轨数据 + # 坡度-雷达视线角在90度到270度之间 + where_0 = np.where(rushe_array == 0) + + bb1 = (r-aspect_array).all() and (r-aspect_array).all() + bb2 = np.where(90 < bb1 < 270, 1, 0) + b1 = (bb1 and bb2) + # b1 = np.where(90 < ((r-aspect_array).all()) and ((r-aspect_array).all()) < 270, 1, 0) + c1 = np.cos(rushe_array*(math.pi/180)) * np.cos(slope_array*(math.pi/180)) + np.sin( + slope_array*(math.pi/180)) * np.sin(rushe_array*(math.pi/180)) * np.cos((r - aspect_array)*(math.pi/180)) + d1 = b1 * c1 + # 坡度-雷达视线角=90或=270时 + b2 = np.where((aspect_array-r == 90) | (aspect_array-r == 270), 1, 0) + d2 = b2 * c1 + # 坡度-雷达视线角在0-90度或270-360度之间 + b3 = 1 - b1-b2 + c3 = np.cos(rushe_array*(math.pi/180)) * np.cos(slope_array*(math.pi/180)) - np.sin(slope_array*(math.pi/180)) *\ + np.sin(rushe_array*(math.pi/180)) * np.cos((r - aspect_array)*(math.pi/180)) + d3 = b3 * c3 + radina_value = d1 + d2 + d3 + radina_value[where_0] = 0 + del b1, b2, b3, c3, c1, d1, d2, d3 + gc.collect() + jubu_o = 57.29578 * np.arccos(radina_value) + print("输出局部入射角", jubu_o) + driver = gdal.GetDriverByName("GTiff") # 创建一个数据格式 + driver.Register() + newfile = driver.Create(save_localangle_path, x3, y3, 1, gdal.GDT_Float32) # 存放路径文件名,长,宽,波段,数据类型 + newfile.SetProjection(pro3) + newfile.SetGeoTransform(geo3) + newfile.GetRasterBand(1).WriteArray(jubu_o) + + def localangle(self, dem_path, incidence_angle_path, orbital_parameters_path): + """ + 获取输入文件的路径 + 计算坡度图、坡向图 + 计算局部入射角 + """ + para_names = ["Dem", "IncidenceAngle", "OrbitalParameters", "经验A"] + if len(para_names) == 0: + return False + # 获取三个文件的路径 + + # print("输出三个文件路径",Dem_path,IncidenceAngle_path,OrbitalParameters_path) + # 确定坡度、坡向的输出路径,输出坡度、坡向图 + slope_out_path = r"D:\MicroWorkspace\LeafAreaIndex\Temporary\UnClipslope.tif" + aspect_out_path = r"D:\MicroWorkspace\LeafAreaIndex\Temporary\UnClipaspect.tif" + print("slope_out_path的路径是", slope_out_path) + print("aspect_out_path的路径是", aspect_out_path) + self.creat_twofile(dem_path, slope_out_path, aspect_out_path) + # 根据入射角文件对坡度坡向图进行裁剪与重采样 + slope_out_path2 = r"D:\MicroWorkspace\LocaLangle\Temporary\Clipslope.tif" + aspect_out_path2 = r"D:\MicroWorkspace\LocaLangle\Temporary\Clipaspect.tif" + self.resampling(slope_out_path, aspect_out_path, incidence_angle_path, slope_out_path2, aspect_out_path2) + + # 输出局部入射角文件 + save_localangle_path = r"D:\\MicroWorkspace\\LocaLangle\\Temporary\\\localangle.tif" + self.clau(slope_out_path2, aspect_out_path2, incidence_angle_path, + orbital_parameters_path, save_localangle_path) + + +# if __name__ == '__main__': +# calu_incident = CalculateIncident() +# Dem_path = "D:\\MicroWorkspace\\LocaLangle\\Input\\dem.tif" +# IncidenceAngle_path = "D:\\MicroWorkspace\\LocaLangle\\Input\\RSJ.tif" +# OrbitalParameters_path = "D:\\MicroWorkspace\\LocaLangle\\Input\\" \ +# "GF3_KAS_FSII_020008_E113.2_N23.1_20200528_L1A_HHHV_L10004829485.meta.xml" +# calu_incident.localangle(Dem_path, IncidenceAngle_path, OrbitalParameters_path) +# print('done') diff --git a/tool/algorithm/algtools/filter/build/lee_Filter/lee_Filter_c.c b/tool/algorithm/algtools/filter/build/lee_Filter/lee_Filter_c.c new file mode 100644 index 0000000..f14bfc5 --- /dev/null +++ b/tool/algorithm/algtools/filter/build/lee_Filter/lee_Filter_c.c @@ -0,0 +1,7654 @@ +/* Generated by Cython 0.29.24 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "lee_Filter_c", + "sources": [ + "./lee_Filter/lee_Filter_c.pyx" + ] + }, + "module_name": "lee_Filter_c" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_24" +#define CYTHON_HEX_VERSION 0x001D18F0 +#define CYTHON_FUTURE_DIVISION 0 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #if defined(PyUnicode_IS_READY) + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #else + #define __Pyx_PyUnicode_READY(op) (0) + #endif + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__lee_Filter_c +#define __PYX_HAVE_API__lee_Filter_c +/* Early includes */ +#include +#include +#include "numpy/arrayobject.h" +#include "numpy/ndarrayobject.h" +#include "numpy/ndarraytypes.h" +#include "numpy/arrayscalars.h" +#include "numpy/ufuncobject.h" + + /* NumPy API declarations from "numpy/__init__.pxd" */ + +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + +/* Header.proto */ +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include + #else + #include + #endif +#endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + + +static const char *__pyx_f[] = { + "lee_Filter\\lee_Filter_c.pyx", + "__init__.pxd", + "type.pxd", +}; +/* BufferFormatStructs.proto */ +#define IS_UNSIGNED(type) (((type) -1) > 0) +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; + struct __Pyx_StructField_* fields; + size_t size; + size_t arraysize[8]; + int ndim; + char typegroup; + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":690 + * # in Cython to enable them only on the right systems. + * + * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + */ +typedef npy_int8 __pyx_t_5numpy_int8_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":691 + * + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t + */ +typedef npy_int16 __pyx_t_5numpy_int16_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":692 + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< + * ctypedef npy_int64 int64_t + * #ctypedef npy_int96 int96_t + */ +typedef npy_int32 __pyx_t_5numpy_int32_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":693 + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< + * #ctypedef npy_int96 int96_t + * #ctypedef npy_int128 int128_t + */ +typedef npy_int64 __pyx_t_5numpy_int64_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":697 + * #ctypedef npy_int128 int128_t + * + * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + */ +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":698 + * + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t + */ +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":699 + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< + * ctypedef npy_uint64 uint64_t + * #ctypedef npy_uint96 uint96_t + */ +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":700 + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< + * #ctypedef npy_uint96 uint96_t + * #ctypedef npy_uint128 uint128_t + */ +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":704 + * #ctypedef npy_uint128 uint128_t + * + * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< + * ctypedef npy_float64 float64_t + * #ctypedef npy_float80 float80_t + */ +typedef npy_float32 __pyx_t_5numpy_float32_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":705 + * + * ctypedef npy_float32 float32_t + * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< + * #ctypedef npy_float80 float80_t + * #ctypedef npy_float128 float128_t + */ +typedef npy_float64 __pyx_t_5numpy_float64_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":714 + * # The int types are mapped a bit surprising -- + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t + */ +typedef npy_long __pyx_t_5numpy_int_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":715 + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong longlong_t + * + */ +typedef npy_longlong __pyx_t_5numpy_long_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":716 + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_ulong uint_t + */ +typedef npy_longlong __pyx_t_5numpy_longlong_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":718 + * ctypedef npy_longlong longlong_t + * + * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t + */ +typedef npy_ulong __pyx_t_5numpy_uint_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":719 + * + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulonglong_t + * + */ +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":720 + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_intp intp_t + */ +typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":722 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< + * ctypedef npy_uintp uintp_t + * + */ +typedef npy_intp __pyx_t_5numpy_intp_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":723 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< + * + * ctypedef npy_double float_t + */ +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":725 + * ctypedef npy_uintp uintp_t + * + * ctypedef npy_double float_t # <<<<<<<<<<<<<< + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t + */ +typedef npy_double __pyx_t_5numpy_float_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":726 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< + * ctypedef npy_longdouble longdouble_t + * + */ +typedef npy_double __pyx_t_5numpy_double_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":727 + * ctypedef npy_double float_t + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cfloat cfloat_t + */ +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + + +/*--- Type declarations ---*/ + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":729 + * ctypedef npy_longdouble longdouble_t + * + * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t + */ +typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":730 + * + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< + * ctypedef npy_clongdouble clongdouble_t + * + */ +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":731 + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cdouble complex_t + */ +typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":733 + * ctypedef npy_clongdouble clongdouble_t + * + * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew1(a): + */ +typedef npy_cdouble __pyx_t_5numpy_complex_t; + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* IsLittleEndian.proto */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); + +/* BufferFormatCheck.proto */ +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type); + +/* BufferGetAndValidate.proto */ +#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\ + ((obj == Py_None || obj == NULL) ?\ + (__Pyx_ZeroBuffer(buf), 0) :\ + __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)) +static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj, + __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); +static void __Pyx_ZeroBuffer(Py_buffer* buf); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); +static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 }; +static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallNoArg.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#endif + +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* WriteUnraisableException.proto */ +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback, int nogil); + +/* None.proto */ +static CYTHON_INLINE long __Pyx_div_long(long, long); + +/* BufferIndexError.proto */ +static void __Pyx_RaiseBufferIndexError(int axis); + +#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* BufferFallbackError.proto */ +static void __Pyx_RaiseBufferFallbackError(void); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyFloatBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\ + ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2))) + #endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* BufferStructDeclare.proto */ +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +#if PY_MAJOR_VERSION < 3 + static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); + static void __Pyx_ReleaseBuffer(Py_buffer *view); +#else + #define __Pyx_GetBuffer PyObject_GetBuffer + #define __Pyx_ReleaseBuffer PyBuffer_Release +#endif + + +/* GCCDiagnostics.proto */ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* RealImag.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif +#if defined(__cplusplus) && CYTHON_CCOMPLEX\ + && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_float(a, b) ((a)==(b)) + #define __Pyx_c_sum_float(a, b) ((a)+(b)) + #define __Pyx_c_diff_float(a, b) ((a)-(b)) + #define __Pyx_c_prod_float(a, b) ((a)*(b)) + #define __Pyx_c_quot_float(a, b) ((a)/(b)) + #define __Pyx_c_neg_float(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_float(z) ((z)==(float)0) + #define __Pyx_c_conj_float(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_float(z) (::std::abs(z)) + #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_float(z) ((z)==0) + #define __Pyx_c_conj_float(z) (conjf(z)) + #if 1 + #define __Pyx_c_abs_float(z) (cabsf(z)) + #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_double(a, b) ((a)==(b)) + #define __Pyx_c_sum_double(a, b) ((a)+(b)) + #define __Pyx_c_diff_double(a, b) ((a)-(b)) + #define __Pyx_c_prod_double(a, b) ((a)*(b)) + #define __Pyx_c_quot_double(a, b) ((a)/(b)) + #define __Pyx_c_neg_double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_double(z) ((z)==(double)0) + #define __Pyx_c_conj_double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (::std::abs(z)) + #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_double(z) ((z)==0) + #define __Pyx_c_conj_double(z) (conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (cabs(z)) + #define __Pyx_c_pow_double(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + + +/* Module declarations from 'cython' */ + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libc.stdio' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.type' */ +static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; + +/* Module declarations from 'cpython' */ + +/* Module declarations from 'cpython.object' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'cpython.mem' */ + +/* Module declarations from 'numpy' */ + +/* Module declarations from 'numpy' */ +static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; +static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; +static PyTypeObject *__pyx_ptype_5numpy_generic = 0; +static PyTypeObject *__pyx_ptype_5numpy_number = 0; +static PyTypeObject *__pyx_ptype_5numpy_integer = 0; +static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; +static PyTypeObject *__pyx_ptype_5numpy_floating = 0; +static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; +static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; +static PyTypeObject *__pyx_ptype_5numpy_character = 0; +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; + +/* Module declarations from 'libc.math' */ + +/* Module declarations from 'lee_Filter_c' */ +static double __pyx_v_12lee_Filter_c_COEF_VAR_DEFAULT; +static double __pyx_v_12lee_Filter_c_CU_DEFAULT; +static int __pyx_f_12lee_Filter_c_ceil_usr(double); /*proto*/ +static double __pyx_f_12lee_Filter_c_weighting(PyArrayObject *, double); /*proto*/ +static PyArrayObject *__pyx_f_12lee_Filter_c_lee_filter_array(PyArrayObject *, PyArrayObject *, int, int __pyx_skip_dispatch); /*proto*/ +static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 }; +#define __Pyx_MODULE_NAME "lee_Filter_c" +extern int __pyx_module_is_main_lee_Filter_c; +int __pyx_module_is_main_lee_Filter_c = 0; + +/* Implementation of 'lee_Filter_c' */ +static PyObject *__pyx_builtin_round; +static PyObject *__pyx_builtin_ImportError; +static const char __pyx_k_np[] = "np"; +static const char __pyx_k_os[] = "os"; +static const char __pyx_k_img[] = "img"; +static const char __pyx_k_std[] = "std"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_mean[] = "mean"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_numpy[] = "numpy"; +static const char __pyx_k_round[] = "round"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_out_arry[] = "out_arry"; +static const char __pyx_k_win_size[] = "win_size"; +static const char __pyx_k_ImportError[] = "ImportError"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_Project___init___py_File_lee_fi[] = "\n@Project:__init__.py\n@File:lee_filter.py\n@Function:lee_filter\n@Contact: https://github.com/PyRadar/pyradar\n@Author:SHJ\n@Date:2021/8/30 8:42\n@Version:1.0.0\n"; +static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; +static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static PyObject *__pyx_n_s_ImportError; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_s_img; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_mean; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_s_numpy; +static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; +static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; +static PyObject *__pyx_n_s_os; +static PyObject *__pyx_n_s_out_arry; +static PyObject *__pyx_n_s_round; +static PyObject *__pyx_n_s_std; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_win_size; +static PyObject *__pyx_pf_12lee_Filter_c_lee_filter_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_img, PyArrayObject *__pyx_v_out_arry, int __pyx_v_win_size); /* proto */ +static PyObject *__pyx_float_100000_0; +static PyObject *__pyx_int_0; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +/* Late includes */ + +/* "lee_Filter_c.pyx":40 + * + * + * cdef int ceil_usr(double v): # <<<<<<<<<<<<<< + * return int(math_ceil(v)) + * + */ + +static int __pyx_f_12lee_Filter_c_ceil_usr(double __pyx_v_v) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ceil_usr", 0); + + /* "lee_Filter_c.pyx":41 + * + * cdef int ceil_usr(double v): + * return int(math_ceil(v)) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((int)ceil(__pyx_v_v)); + goto __pyx_L0; + + /* "lee_Filter_c.pyx":40 + * + * + * cdef int ceil_usr(double v): # <<<<<<<<<<<<<< + * return int(math_ceil(v)) + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "lee_Filter_c.pyx":45 + * + * + * cdef double weighting(np.ndarray[double,ndim=2] window,double cu): # <<<<<<<<<<<<<< + * """ + * Computes the weighthing function for Lee filter using cu as the noise + */ + +static double __pyx_f_12lee_Filter_c_weighting(PyArrayObject *__pyx_v_window, double __pyx_v_cu) { + double __pyx_v_two_cu; + double __pyx_v_window_mean; + double __pyx_v_window_std; + double __pyx_v_ci; + double __pyx_v_two_ci; + double __pyx_v_w_t; + __Pyx_LocalBuf_ND __pyx_pybuffernd_window; + __Pyx_Buffer __pyx_pybuffer_window; + double __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + double __pyx_t_4; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("weighting", 0); + __pyx_pybuffer_window.pybuffer.buf = NULL; + __pyx_pybuffer_window.refcount = 0; + __pyx_pybuffernd_window.data = NULL; + __pyx_pybuffernd_window.rcbuffer = &__pyx_pybuffer_window; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_window.rcbuffer->pybuffer, (PyObject*)__pyx_v_window, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 45, __pyx_L1_error) + } + __pyx_pybuffernd_window.diminfo[0].strides = __pyx_pybuffernd_window.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_window.diminfo[0].shape = __pyx_pybuffernd_window.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_window.diminfo[1].strides = __pyx_pybuffernd_window.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_window.diminfo[1].shape = __pyx_pybuffernd_window.rcbuffer->pybuffer.shape[1]; + + /* "lee_Filter_c.pyx":51 + * """ + * # cu is the noise variation coefficient + * cdef double two_cu = cu * cu # <<<<<<<<<<<<<< + * + * # ci is the variation coefficient in the window + */ + __pyx_v_two_cu = (__pyx_v_cu * __pyx_v_cu); + + /* "lee_Filter_c.pyx":54 + * + * # ci is the variation coefficient in the window + * cdef double window_mean = window.mean() # <<<<<<<<<<<<<< + * cdef double window_std = window.std() + * cdef double ci = window_std / window_mean + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_window), __pyx_n_s_mean); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_window_mean = __pyx_t_4; + + /* "lee_Filter_c.pyx":55 + * # ci is the variation coefficient in the window + * cdef double window_mean = window.mean() + * cdef double window_std = window.std() # <<<<<<<<<<<<<< + * cdef double ci = window_std / window_mean + * + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_window), __pyx_n_s_std); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_window_std = __pyx_t_4; + + /* "lee_Filter_c.pyx":56 + * cdef double window_mean = window.mean() + * cdef double window_std = window.std() + * cdef double ci = window_std / window_mean # <<<<<<<<<<<<<< + * + * cdef double two_ci = ci * ci + */ + if (unlikely(__pyx_v_window_mean == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 56, __pyx_L1_error) + } + __pyx_v_ci = (__pyx_v_window_std / __pyx_v_window_mean); + + /* "lee_Filter_c.pyx":58 + * cdef double ci = window_std / window_mean + * + * cdef double two_ci = ci * ci # <<<<<<<<<<<<<< + * cdef double w_t=0; + * if not (two_ci==0): # dirty patch to avoid zero division + */ + __pyx_v_two_ci = (__pyx_v_ci * __pyx_v_ci); + + /* "lee_Filter_c.pyx":59 + * + * cdef double two_ci = ci * ci + * cdef double w_t=0; # <<<<<<<<<<<<<< + * if not (two_ci==0): # dirty patch to avoid zero division + * two_ci = COEF_VAR_DEFAULT + */ + __pyx_v_w_t = 0.0; + + /* "lee_Filter_c.pyx":60 + * cdef double two_ci = ci * ci + * cdef double w_t=0; + * if not (two_ci==0): # dirty patch to avoid zero division # <<<<<<<<<<<<<< + * two_ci = COEF_VAR_DEFAULT + * + */ + __pyx_t_5 = ((!((__pyx_v_two_ci == 0.0) != 0)) != 0); + if (__pyx_t_5) { + + /* "lee_Filter_c.pyx":61 + * cdef double w_t=0; + * if not (two_ci==0): # dirty patch to avoid zero division + * two_ci = COEF_VAR_DEFAULT # <<<<<<<<<<<<<< + * + * if cu > ci: + */ + __pyx_v_two_ci = __pyx_v_12lee_Filter_c_COEF_VAR_DEFAULT; + + /* "lee_Filter_c.pyx":60 + * cdef double two_ci = ci * ci + * cdef double w_t=0; + * if not (two_ci==0): # dirty patch to avoid zero division # <<<<<<<<<<<<<< + * two_ci = COEF_VAR_DEFAULT + * + */ + } + + /* "lee_Filter_c.pyx":63 + * two_ci = COEF_VAR_DEFAULT + * + * if cu > ci: # <<<<<<<<<<<<<< + * w_t = 0.0 + * else: + */ + __pyx_t_5 = ((__pyx_v_cu > __pyx_v_ci) != 0); + if (__pyx_t_5) { + + /* "lee_Filter_c.pyx":64 + * + * if cu > ci: + * w_t = 0.0 # <<<<<<<<<<<<<< + * else: + * w_t = 1.0 - (two_cu / two_ci) + */ + __pyx_v_w_t = 0.0; + + /* "lee_Filter_c.pyx":63 + * two_ci = COEF_VAR_DEFAULT + * + * if cu > ci: # <<<<<<<<<<<<<< + * w_t = 0.0 + * else: + */ + goto __pyx_L4; + } + + /* "lee_Filter_c.pyx":66 + * w_t = 0.0 + * else: + * w_t = 1.0 - (two_cu / two_ci) # <<<<<<<<<<<<<< + * + * return w_t + */ + /*else*/ { + if (unlikely(__pyx_v_two_ci == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 66, __pyx_L1_error) + } + __pyx_v_w_t = (1.0 - (__pyx_v_two_cu / __pyx_v_two_ci)); + } + __pyx_L4:; + + /* "lee_Filter_c.pyx":68 + * w_t = 1.0 - (two_cu / two_ci) + * + * return w_t # <<<<<<<<<<<<<< + * + * cpdef np.ndarray[double,ndim=2] lee_filter_array(np.ndarray[double,ndim=2] img,np.ndarray[double,ndim=2] out_arry,int win_size): + */ + __pyx_r = __pyx_v_w_t; + goto __pyx_L0; + + /* "lee_Filter_c.pyx":45 + * + * + * cdef double weighting(np.ndarray[double,ndim=2] window,double cu): # <<<<<<<<<<<<<< + * """ + * Computes the weighthing function for Lee filter using cu as the noise + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_window.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_WriteUnraisable("lee_Filter_c.weighting", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_window.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "lee_Filter_c.pyx":70 + * return w_t + * + * cpdef np.ndarray[double,ndim=2] lee_filter_array(np.ndarray[double,ndim=2] img,np.ndarray[double,ndim=2] out_arry,int win_size): # <<<<<<<<<<<<<< + * """ + * Apply lee to a numpy matrix containing the image, with a window of + */ + +static PyObject *__pyx_pw_12lee_Filter_c_1lee_filter_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyArrayObject *__pyx_f_12lee_Filter_c_lee_filter_array(PyArrayObject *__pyx_v_img, PyArrayObject *__pyx_v_out_arry, int __pyx_v_win_size, CYTHON_UNUSED int __pyx_skip_dispatch) { + double __pyx_v_cu; + int __pyx_v_i; + int __pyx_v_j; + int __pyx_v_xleft; + int __pyx_v_xright; + int __pyx_v_yup; + int __pyx_v_ydown; + PyArrayObject *__pyx_v_window = 0; + double __pyx_v_w_t; + double __pyx_v_window_mean; + CYTHON_UNUSED double __pyx_v_new_pix_valu; + int __pyx_v_n; + int __pyx_v_m; + int __pyx_v_win_offset; + PyObject *__pyx_v_pix_value = NULL; + PyObject *__pyx_v_new_pix_value = NULL; + __Pyx_LocalBuf_ND __pyx_pybuffernd_img; + __Pyx_Buffer __pyx_pybuffer_img; + __Pyx_LocalBuf_ND __pyx_pybuffernd_out_arry; + __Pyx_Buffer __pyx_pybuffer_out_arry; + __Pyx_LocalBuf_ND __pyx_pybuffernd_window; + __Pyx_Buffer __pyx_pybuffer_window; + PyArrayObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyArrayObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + double __pyx_t_13; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lee_filter_array", 0); + __pyx_pybuffer_window.pybuffer.buf = NULL; + __pyx_pybuffer_window.refcount = 0; + __pyx_pybuffernd_window.data = NULL; + __pyx_pybuffernd_window.rcbuffer = &__pyx_pybuffer_window; + __pyx_pybuffer_img.pybuffer.buf = NULL; + __pyx_pybuffer_img.refcount = 0; + __pyx_pybuffernd_img.data = NULL; + __pyx_pybuffernd_img.rcbuffer = &__pyx_pybuffer_img; + __pyx_pybuffer_out_arry.pybuffer.buf = NULL; + __pyx_pybuffer_out_arry.refcount = 0; + __pyx_pybuffernd_out_arry.data = NULL; + __pyx_pybuffernd_out_arry.rcbuffer = &__pyx_pybuffer_out_arry; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_img.rcbuffer->pybuffer, (PyObject*)__pyx_v_img, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 70, __pyx_L1_error) + } + __pyx_pybuffernd_img.diminfo[0].strides = __pyx_pybuffernd_img.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_img.diminfo[0].shape = __pyx_pybuffernd_img.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_img.diminfo[1].strides = __pyx_pybuffernd_img.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_img.diminfo[1].shape = __pyx_pybuffernd_img.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_arry.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_arry, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 70, __pyx_L1_error) + } + __pyx_pybuffernd_out_arry.diminfo[0].strides = __pyx_pybuffernd_out_arry.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_arry.diminfo[0].shape = __pyx_pybuffernd_out_arry.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out_arry.diminfo[1].strides = __pyx_pybuffernd_out_arry.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out_arry.diminfo[1].shape = __pyx_pybuffernd_out_arry.rcbuffer->pybuffer.shape[1]; + + /* "lee_Filter_c.pyx":77 + * # we process the entire img as float64 to avoid type overflow error + * #n, m = img.shape + * cdef double cu = CU_DEFAULT # <<<<<<<<<<<<<< + * cdef int i=0 + * cdef int j=0 + */ + __pyx_v_cu = __pyx_v_12lee_Filter_c_CU_DEFAULT; + + /* "lee_Filter_c.pyx":78 + * #n, m = img.shape + * cdef double cu = CU_DEFAULT + * cdef int i=0 # <<<<<<<<<<<<<< + * cdef int j=0 + * cdef int xleft=0 + */ + __pyx_v_i = 0; + + /* "lee_Filter_c.pyx":79 + * cdef double cu = CU_DEFAULT + * cdef int i=0 + * cdef int j=0 # <<<<<<<<<<<<<< + * cdef int xleft=0 + * cdef int xright=0 + */ + __pyx_v_j = 0; + + /* "lee_Filter_c.pyx":80 + * cdef int i=0 + * cdef int j=0 + * cdef int xleft=0 # <<<<<<<<<<<<<< + * cdef int xright=0 + * cdef int yup=0 + */ + __pyx_v_xleft = 0; + + /* "lee_Filter_c.pyx":81 + * cdef int j=0 + * cdef int xleft=0 + * cdef int xright=0 # <<<<<<<<<<<<<< + * cdef int yup=0 + * cdef int ydown=0 + */ + __pyx_v_xright = 0; + + /* "lee_Filter_c.pyx":82 + * cdef int xleft=0 + * cdef int xright=0 + * cdef int yup=0 # <<<<<<<<<<<<<< + * cdef int ydown=0 + * cdef np.ndarray[double,ndim=2] window; + */ + __pyx_v_yup = 0; + + /* "lee_Filter_c.pyx":83 + * cdef int xright=0 + * cdef int yup=0 + * cdef int ydown=0 # <<<<<<<<<<<<<< + * cdef np.ndarray[double,ndim=2] window; + * cdef double w_t=0; + */ + __pyx_v_ydown = 0; + + /* "lee_Filter_c.pyx":85 + * cdef int ydown=0 + * cdef np.ndarray[double,ndim=2] window; + * cdef double w_t=0; # <<<<<<<<<<<<<< + * cdef double window_mean=0; + * cdef double new_pix_valu=0; + */ + __pyx_v_w_t = 0.0; + + /* "lee_Filter_c.pyx":86 + * cdef np.ndarray[double,ndim=2] window; + * cdef double w_t=0; + * cdef double window_mean=0; # <<<<<<<<<<<<<< + * cdef double new_pix_valu=0; + * cdef int n = img.shape[0] + */ + __pyx_v_window_mean = 0.0; + + /* "lee_Filter_c.pyx":87 + * cdef double w_t=0; + * cdef double window_mean=0; + * cdef double new_pix_valu=0; # <<<<<<<<<<<<<< + * cdef int n = img.shape[0] + * cdef int m=img.shape[1] + */ + __pyx_v_new_pix_valu = 0.0; + + /* "lee_Filter_c.pyx":88 + * cdef double window_mean=0; + * cdef double new_pix_valu=0; + * cdef int n = img.shape[0] # <<<<<<<<<<<<<< + * cdef int m=img.shape[1] + * cdef int win_offset=int(win_size/2) + */ + __pyx_v_n = (__pyx_v_img->dimensions[0]); + + /* "lee_Filter_c.pyx":89 + * cdef double new_pix_valu=0; + * cdef int n = img.shape[0] + * cdef int m=img.shape[1] # <<<<<<<<<<<<<< + * cdef int win_offset=int(win_size/2) + * + */ + __pyx_v_m = (__pyx_v_img->dimensions[1]); + + /* "lee_Filter_c.pyx":90 + * cdef int n = img.shape[0] + * cdef int m=img.shape[1] + * cdef int win_offset=int(win_size/2) # <<<<<<<<<<<<<< + * + * while i= n: + */ + __pyx_t_1 = ((__pyx_v_xleft < 0) != 0); + if (__pyx_t_1) { + + /* "lee_Filter_c.pyx":96 + * xright=int(i+win_offset) + * if xleft < 0: + * xleft = 0 # <<<<<<<<<<<<<< + * if xright >= n: + * xright = n + */ + __pyx_v_xleft = 0; + + /* "lee_Filter_c.pyx":95 + * xleft=ceil_usr(i-win_offset) + * xright=int(i+win_offset) + * if xleft < 0: # <<<<<<<<<<<<<< + * xleft = 0 + * if xright >= n: + */ + } + + /* "lee_Filter_c.pyx":97 + * if xleft < 0: + * xleft = 0 + * if xright >= n: # <<<<<<<<<<<<<< + * xright = n + * j=0 + */ + __pyx_t_1 = ((__pyx_v_xright >= __pyx_v_n) != 0); + if (__pyx_t_1) { + + /* "lee_Filter_c.pyx":98 + * xleft = 0 + * if xright >= n: + * xright = n # <<<<<<<<<<<<<< + * j=0 + * while j= n: # <<<<<<<<<<<<<< + * xright = n + * j=0 + */ + } + + /* "lee_Filter_c.pyx":99 + * if xright >= n: + * xright = n + * j=0 # <<<<<<<<<<<<<< + * while j= m: + */ + __pyx_t_1 = ((__pyx_v_yup < 0) != 0); + if (__pyx_t_1) { + + /* "lee_Filter_c.pyx":105 + * ydown = int(j + win_offset) + * if yup < 0: + * yup = 0 # <<<<<<<<<<<<<< + * if ydown >= m: + * ydown = m + */ + __pyx_v_yup = 0; + + /* "lee_Filter_c.pyx":104 + * yup=0 if yup<0 else yup + * ydown = int(j + win_offset) + * if yup < 0: # <<<<<<<<<<<<<< + * yup = 0 + * if ydown >= m: + */ + } + + /* "lee_Filter_c.pyx":106 + * if yup < 0: + * yup = 0 + * if ydown >= m: # <<<<<<<<<<<<<< + * ydown = m + * + */ + __pyx_t_1 = ((__pyx_v_ydown >= __pyx_v_m) != 0); + if (__pyx_t_1) { + + /* "lee_Filter_c.pyx":107 + * yup = 0 + * if ydown >= m: + * ydown = m # <<<<<<<<<<<<<< + * + * pix_value = img[i, j] + */ + __pyx_v_ydown = __pyx_v_m; + + /* "lee_Filter_c.pyx":106 + * if yup < 0: + * yup = 0 + * if ydown >= m: # <<<<<<<<<<<<<< + * ydown = m + * + */ + } + + /* "lee_Filter_c.pyx":109 + * ydown = m + * + * pix_value = img[i, j] # <<<<<<<<<<<<<< + * + * window = img[xleft:xright+1, yup:ydown+1] + */ + __pyx_t_3 = __pyx_v_i; + __pyx_t_4 = __pyx_v_j; + __pyx_t_2 = -1; + if (__pyx_t_3 < 0) { + __pyx_t_3 += __pyx_pybuffernd_img.diminfo[0].shape; + if (unlikely(__pyx_t_3 < 0)) __pyx_t_2 = 0; + } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_img.diminfo[0].shape)) __pyx_t_2 = 0; + if (__pyx_t_4 < 0) { + __pyx_t_4 += __pyx_pybuffernd_img.diminfo[1].shape; + if (unlikely(__pyx_t_4 < 0)) __pyx_t_2 = 1; + } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_img.diminfo[1].shape)) __pyx_t_2 = 1; + if (unlikely(__pyx_t_2 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_2); + __PYX_ERR(0, 109, __pyx_L1_error) + } + __pyx_t_5 = PyFloat_FromDouble((*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_img.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_img.diminfo[0].strides, __pyx_t_4, __pyx_pybuffernd_img.diminfo[1].strides))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_pix_value, __pyx_t_5); + __pyx_t_5 = 0; + + /* "lee_Filter_c.pyx":111 + * pix_value = img[i, j] + * + * window = img[xleft:xright+1, yup:ydown+1] # <<<<<<<<<<<<<< + * + * w_t = weighting(window, cu) + */ + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_xleft); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyInt_From_long((__pyx_v_xright + 1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PySlice_New(__pyx_t_5, __pyx_t_6, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_yup); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyInt_From_long((__pyx_v_ydown + 1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = PySlice_New(__pyx_t_6, __pyx_t_5, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8); + __pyx_t_7 = 0; + __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_img), __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_window.rcbuffer->pybuffer); + __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_window.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); + if (unlikely(__pyx_t_2 < 0)) { + PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_window.rcbuffer->pybuffer, (PyObject*)__pyx_v_window, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { + Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); + __Pyx_RaiseBufferFallbackError(); + } else { + PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); + } + __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; + } + __pyx_pybuffernd_window.diminfo[0].strides = __pyx_pybuffernd_window.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_window.diminfo[0].shape = __pyx_pybuffernd_window.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_window.diminfo[1].strides = __pyx_pybuffernd_window.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_window.diminfo[1].shape = __pyx_pybuffernd_window.rcbuffer->pybuffer.shape[1]; + if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 111, __pyx_L1_error) + } + __pyx_t_9 = 0; + __Pyx_XDECREF_SET(__pyx_v_window, ((PyArrayObject *)__pyx_t_8)); + __pyx_t_8 = 0; + + /* "lee_Filter_c.pyx":113 + * window = img[xleft:xright+1, yup:ydown+1] + * + * w_t = weighting(window, cu) # <<<<<<<<<<<<<< + * + * window_mean = np.mean(window) + */ + __pyx_v_w_t = __pyx_f_12lee_Filter_c_weighting(((PyArrayObject *)__pyx_v_window), __pyx_v_cu); + + /* "lee_Filter_c.pyx":115 + * w_t = weighting(window, cu) + * + * window_mean = np.mean(window) # <<<<<<<<<<<<<< + * new_pix_value = (pix_value * w_t) + (window_mean * (1.0 - w_t)) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_mean); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + } + } + __pyx_t_8 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, ((PyObject *)__pyx_v_window)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_window)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 115, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_window_mean = __pyx_t_13; + + /* "lee_Filter_c.pyx":116 + * + * window_mean = np.mean(window) + * new_pix_value = (pix_value * w_t) + (window_mean * (1.0 - w_t)) # <<<<<<<<<<<<<< + * + * if not new_pix_value > 0: + */ + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_w_t); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PyNumber_Multiply(__pyx_v_pix_value, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyFloat_FromDouble((__pyx_v_window_mean * (1.0 - __pyx_v_w_t))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF_SET(__pyx_v_new_pix_value, __pyx_t_5); + __pyx_t_5 = 0; + + /* "lee_Filter_c.pyx":118 + * new_pix_value = (pix_value * w_t) + (window_mean * (1.0 - w_t)) + * + * if not new_pix_value > 0: # <<<<<<<<<<<<<< + * new_pix_value = 0 + * out_arry[i, j] = round(new_pix_value*100000.0)/100000.0 + */ + __pyx_t_5 = PyObject_RichCompare(__pyx_v_new_pix_value, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_14 = ((!__pyx_t_1) != 0); + if (__pyx_t_14) { + + /* "lee_Filter_c.pyx":119 + * + * if not new_pix_value > 0: + * new_pix_value = 0 # <<<<<<<<<<<<<< + * out_arry[i, j] = round(new_pix_value*100000.0)/100000.0 + * j=j+1 + */ + __Pyx_INCREF(__pyx_int_0); + __Pyx_DECREF_SET(__pyx_v_new_pix_value, __pyx_int_0); + + /* "lee_Filter_c.pyx":118 + * new_pix_value = (pix_value * w_t) + (window_mean * (1.0 - w_t)) + * + * if not new_pix_value > 0: # <<<<<<<<<<<<<< + * new_pix_value = 0 + * out_arry[i, j] = round(new_pix_value*100000.0)/100000.0 + */ + } + + /* "lee_Filter_c.pyx":120 + * if not new_pix_value > 0: + * new_pix_value = 0 + * out_arry[i, j] = round(new_pix_value*100000.0)/100000.0 # <<<<<<<<<<<<<< + * j=j+1 + * i=i+1 + */ + __pyx_t_5 = PyNumber_Multiply(__pyx_v_new_pix_value, __pyx_float_100000_0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_round, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyFloat_DivideObjC(__pyx_t_8, __pyx_float_100000_0, 100000.0, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __pyx_v_i; + __pyx_t_3 = __pyx_v_j; + __pyx_t_2 = -1; + if (__pyx_t_4 < 0) { + __pyx_t_4 += __pyx_pybuffernd_out_arry.diminfo[0].shape; + if (unlikely(__pyx_t_4 < 0)) __pyx_t_2 = 0; + } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_out_arry.diminfo[0].shape)) __pyx_t_2 = 0; + if (__pyx_t_3 < 0) { + __pyx_t_3 += __pyx_pybuffernd_out_arry.diminfo[1].shape; + if (unlikely(__pyx_t_3 < 0)) __pyx_t_2 = 1; + } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_out_arry.diminfo[1].shape)) __pyx_t_2 = 1; + if (unlikely(__pyx_t_2 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_2); + __PYX_ERR(0, 120, __pyx_L1_error) + } + *__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_out_arry.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_out_arry.diminfo[0].strides, __pyx_t_3, __pyx_pybuffernd_out_arry.diminfo[1].strides) = __pyx_t_13; + + /* "lee_Filter_c.pyx":121 + * new_pix_value = 0 + * out_arry[i, j] = round(new_pix_value*100000.0)/100000.0 + * j=j+1 # <<<<<<<<<<<<<< + * i=i+1 + * return out_arry + */ + __pyx_v_j = (__pyx_v_j + 1); + } + + /* "lee_Filter_c.pyx":122 + * out_arry[i, j] = round(new_pix_value*100000.0)/100000.0 + * j=j+1 + * i=i+1 # <<<<<<<<<<<<<< + * return out_arry + * + */ + __pyx_v_i = (__pyx_v_i + 1); + } + + /* "lee_Filter_c.pyx":123 + * j=j+1 + * i=i+1 + * return out_arry # <<<<<<<<<<<<<< + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_out_arry)); + __pyx_r = ((PyArrayObject *)__pyx_v_out_arry); + goto __pyx_L0; + + /* "lee_Filter_c.pyx":70 + * return w_t + * + * cpdef np.ndarray[double,ndim=2] lee_filter_array(np.ndarray[double,ndim=2] img,np.ndarray[double,ndim=2] out_arry,int win_size): # <<<<<<<<<<<<<< + * """ + * Apply lee to a numpy matrix containing the image, with a window of + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_arry.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_window.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("lee_Filter_c.lee_filter_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_arry.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_window.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_window); + __Pyx_XDECREF(__pyx_v_pix_value); + __Pyx_XDECREF(__pyx_v_new_pix_value); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_12lee_Filter_c_1lee_filter_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_12lee_Filter_c_lee_filter_array[] = "\n Apply lee to a numpy matrix containing the image, with a window of\n win_size x win_size.\n "; +static PyObject *__pyx_pw_12lee_Filter_c_1lee_filter_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyArrayObject *__pyx_v_img = 0; + PyArrayObject *__pyx_v_out_arry = 0; + int __pyx_v_win_size; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lee_filter_array (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_img,&__pyx_n_s_out_arry,&__pyx_n_s_win_size,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_img)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out_arry)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("lee_filter_array", 1, 3, 3, 1); __PYX_ERR(0, 70, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_win_size)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("lee_filter_array", 1, 3, 3, 2); __PYX_ERR(0, 70, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lee_filter_array") < 0)) __PYX_ERR(0, 70, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_img = ((PyArrayObject *)values[0]); + __pyx_v_out_arry = ((PyArrayObject *)values[1]); + __pyx_v_win_size = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_win_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 70, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lee_filter_array", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 70, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("lee_Filter_c.lee_filter_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_img), __pyx_ptype_5numpy_ndarray, 1, "img", 0))) __PYX_ERR(0, 70, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out_arry), __pyx_ptype_5numpy_ndarray, 1, "out_arry", 0))) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_r = __pyx_pf_12lee_Filter_c_lee_filter_array(__pyx_self, __pyx_v_img, __pyx_v_out_arry, __pyx_v_win_size); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_12lee_Filter_c_lee_filter_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_img, PyArrayObject *__pyx_v_out_arry, int __pyx_v_win_size) { + __Pyx_LocalBuf_ND __pyx_pybuffernd_img; + __Pyx_Buffer __pyx_pybuffer_img; + __Pyx_LocalBuf_ND __pyx_pybuffernd_out_arry; + __Pyx_Buffer __pyx_pybuffer_out_arry; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lee_filter_array", 0); + __pyx_pybuffer_img.pybuffer.buf = NULL; + __pyx_pybuffer_img.refcount = 0; + __pyx_pybuffernd_img.data = NULL; + __pyx_pybuffernd_img.rcbuffer = &__pyx_pybuffer_img; + __pyx_pybuffer_out_arry.pybuffer.buf = NULL; + __pyx_pybuffer_out_arry.refcount = 0; + __pyx_pybuffernd_out_arry.data = NULL; + __pyx_pybuffernd_out_arry.rcbuffer = &__pyx_pybuffer_out_arry; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_img.rcbuffer->pybuffer, (PyObject*)__pyx_v_img, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 70, __pyx_L1_error) + } + __pyx_pybuffernd_img.diminfo[0].strides = __pyx_pybuffernd_img.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_img.diminfo[0].shape = __pyx_pybuffernd_img.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_img.diminfo[1].strides = __pyx_pybuffernd_img.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_img.diminfo[1].shape = __pyx_pybuffernd_img.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out_arry.rcbuffer->pybuffer, (PyObject*)__pyx_v_out_arry, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 70, __pyx_L1_error) + } + __pyx_pybuffernd_out_arry.diminfo[0].strides = __pyx_pybuffernd_out_arry.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out_arry.diminfo[0].shape = __pyx_pybuffernd_out_arry.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out_arry.diminfo[1].strides = __pyx_pybuffernd_out_arry.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out_arry.diminfo[1].shape = __pyx_pybuffernd_out_arry.rcbuffer->pybuffer.shape[1]; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_12lee_Filter_c_lee_filter_array(__pyx_v_img, __pyx_v_out_arry, __pyx_v_win_size, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_arry.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("lee_Filter_c.lee_filter_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out_arry.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":736 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":739 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":742 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":745 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":748 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); + if (__pyx_t_1) { + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":752 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< + * else: + * return () + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); + __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + } + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":754 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< + * + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_r = __pyx_empty_tuple; + goto __pyx_L0; + } + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_array_base", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":932 + * + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) + * + */ + Py_INCREF(__pyx_v_base); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":933 + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":936 + * + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: + * return None + */ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":938 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< + * return base + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + } + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":939 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< + * + * # Versions of the import_* functions which are more suitable for + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_array", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":945 + * cdef inline int import_array() except -1: + * try: + * __pyx_import_array() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") + */ + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 945, __pyx_L3_error) + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":946 + * try: + * __pyx_import_array() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.multiarray failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 946, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":947 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 947, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 947, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_umath", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":951 + * cdef inline int import_umath() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 951, __pyx_L3_error) + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":952 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 952, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":953 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 953, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 953, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_ufunc", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":957 + * cdef inline int import_ufunc() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 957, __pyx_L3_error) + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":958 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 958, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":959 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef extern from *: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 959, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 959, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":969 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` + */ + +static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_timedelta64_object", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":981 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":969 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":984 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` + */ + +static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_datetime64_object", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":996 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":984 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":999 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object + */ + +static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { + npy_datetime __pyx_r; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1006 + * also needed. That can be found using `get_datetime64_unit`. + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":999 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1009 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object + */ + +static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { + npy_timedelta __pyx_r; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1013 + * returns the int64 value underlying scalar numpy timedelta64 object + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1009 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + +static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { + NPY_DATETIMEUNIT __pyx_r; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1020 + * returns the unit part of the dtype for a numpy datetime64 object. + * """ + * return (obj).obmeta.base # <<<<<<<<<<<<<< + */ + __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); + goto __pyx_L0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +static PyMethodDef __pyx_methods[] = { + {"lee_filter_array", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_12lee_Filter_c_1lee_filter_array, METH_VARARGS|METH_KEYWORDS, __pyx_doc_12lee_Filter_c_lee_filter_array}, + {0, 0, 0, 0} +}; + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_lee_Filter_c(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_lee_Filter_c}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "lee_Filter_c", + __pyx_k_Project___init___py_File_lee_fi, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_img, __pyx_k_img, sizeof(__pyx_k_img), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_mean, __pyx_k_mean, sizeof(__pyx_k_mean), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, + {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, + {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, + {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, + {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, + {&__pyx_n_s_out_arry, __pyx_k_out_arry, sizeof(__pyx_k_out_arry), 0, 0, 1, 1}, + {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1}, + {&__pyx_n_s_std, __pyx_k_std, sizeof(__pyx_k_std), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_win_size, __pyx_k_win_size, sizeof(__pyx_k_win_size), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 947, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":947 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":953 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_float_100000_0 = PyFloat_FromDouble(100000.0); if (unlikely(!__pyx_float_100000_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), + #else + sizeof(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error) + __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error) + __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error) + __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error) + __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error) + __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error) + __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error) + __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error) + __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error) + __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#ifndef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void +#endif +#else +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyObject * +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initlee_Filter_c(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initlee_Filter_c(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_lee_Filter_c(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_lee_Filter_c(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_lee_Filter_c(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'lee_Filter_c' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_lee_Filter_c(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + PyEval_InitThreads(); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("lee_Filter_c", __pyx_methods, __pyx_k_Project___init___py_File_lee_fi, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_b); + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_lee_Filter_c) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "lee_Filter_c")) { + if (unlikely(PyDict_SetItemString(modules, "lee_Filter_c", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + (void)__Pyx_modinit_type_init_code(); + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "lee_Filter_c.pyx":12 + * """ + * + * import os # <<<<<<<<<<<<<< + * cimport cython # + * import numpy as np##cpythonnp + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "lee_Filter_c.pyx":14 + * import os + * cimport cython # + * import numpy as np##cpythonnp # <<<<<<<<<<<<<< + * cimport numpy as np # cpythonnp + * from libc.math cimport pi + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "lee_Filter_c.pyx":36 + * from libc.math cimport lround as math_round + * + * cdef double COEF_VAR_DEFAULT = 0.01 # <<<<<<<<<<<<<< + * cdef double CU_DEFAULT = 0.25 + * + */ + __pyx_v_12lee_Filter_c_COEF_VAR_DEFAULT = 0.01; + + /* "lee_Filter_c.pyx":37 + * + * cdef double COEF_VAR_DEFAULT = 0.01 + * cdef double CU_DEFAULT = 0.25 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_12lee_Filter_c_CU_DEFAULT = 0.25; + + /* "lee_Filter_c.pyx":1 + * # -*- coding: UTF-8 -*- # <<<<<<<<<<<<<< + * """ + * @Project:__init__.py + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "../../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init lee_Filter_c", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init lee_Filter_c"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* IsLittleEndian */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } S; + S.u32 = 0x01020304; + return S.u8[0] == 4; +} + +/* BufferFormatCheck */ +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t <= '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case '?': return "'bool'"; + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparseable format string"; + } +} +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + #ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + #endif + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + __Pyx_StructField* field = ctx->head->field; + __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + __Pyx_StructField* field = ctx->head->field; + __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static PyObject * +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number, ndim; + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ndim = ctx->head->field->type->ndim; + while (*ts && *ts != ')') { + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; + } + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) + return PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + if (*ts != ',' && *ts != ')') + return PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + if (*ts == ',') ts++; + i++; + } + if (i != ndim) + return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return NULL; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return Py_None; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + CYTHON_FALLTHROUGH; + case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && + (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + CYTHON_FALLTHROUGH; + case 's': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} + +/* BufferGetAndValidate */ + static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + if (unlikely(info->buf == NULL)) return; + if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; + __Pyx_ReleaseBuffer(info); +} +static void __Pyx_ZeroBuffer(Py_buffer* buf) { + buf->buf = NULL; + buf->obj = NULL; + buf->strides = __Pyx_zeros; + buf->shape = __Pyx_zeros; + buf->suboffsets = __Pyx_minusones; +} +static int __Pyx__GetBufferAndValidate( + Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, + int nd, int cast, __Pyx_BufFmt_StackElem* stack) +{ + buf->buf = NULL; + if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) { + __Pyx_ZeroBuffer(buf); + return -1; + } + if (unlikely(buf->ndim != nd)) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + nd, buf->ndim); + goto fail; + } + if (!cast) { + __Pyx_BufFmt_Context ctx; + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + } + if (unlikely((size_t)buf->itemsize != dtype->size)) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", + buf->itemsize, (buf->itemsize > 1) ? "s" : "", + dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); + goto fail; + } + if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; + return 0; +fail:; + __Pyx_SafeReleaseBuffer(buf); + return -1; +} + +/* PyFunctionFastCall */ + #if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCall */ + #if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ + #if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallNoArg */ + #if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* PyCFunctionFastCall */ + #if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyObjectCallOneArg */ + #if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (__Pyx_PyFastCFunction_Check(func)) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* PyErrFetchRestore */ + #if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* WriteUnraisableException */ + static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback, CYTHON_UNUSED int nogil) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_PyThreadState_declare +#ifdef WITH_THREAD + PyGILState_STATE state; + if (nogil) + state = PyGILState_Ensure(); +#ifdef _MSC_VER + else state = (PyGILState_STATE)-1; +#endif +#endif + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +#ifdef WITH_THREAD + if (nogil) + PyGILState_Release(state); +#endif +} + +/* None */ + static CYTHON_INLINE long __Pyx_div_long(long a, long b) { + long q = a / b; + long r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + return q; +} + +/* BufferIndexError */ + static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +/* GetItemInt */ + static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* ObjectGetItem */ + #if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { + PyObject *runerr; + Py_ssize_t key_value; + PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; + if (unlikely(!(m && m->sq_item))) { + PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); + return NULL; + } + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { + PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; + if (likely(m && m->mp_subscript)) { + return m->mp_subscript(obj, key); + } + return __Pyx_PyObject_GetIndex(obj, key); +} +#endif + +/* ExtTypeTest */ + static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + +/* BufferFallbackError */ + static void __Pyx_RaiseBufferFallbackError(void) { + PyErr_SetString(PyExc_ValueError, + "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); +} + +/* PyDictVersioning */ + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ + #if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectCall2Args */ + static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* PyFloatBinop */ + #if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { + const double b = floatval; + double a, result; + (void)inplace; + (void)zerodivision_check; + if (likely(PyFloat_CheckExact(op1))) { + a = PyFloat_AS_DOUBLE(op1); + + } else + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + a = (double) PyInt_AS_LONG(op1); + + } else + #endif + if (likely(PyLong_CheckExact(op1))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)op1)->ob_digit; + const Py_ssize_t size = Py_SIZE(op1); + switch (size) { + case 0: a = 0.0; break; + case -1: a = -(double) digits[0]; break; + case 1: a = (double) digits[0]; break; + case -2: + case 2: + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { + a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -2) + a = -a; + break; + } + } + CYTHON_FALLTHROUGH; + case -3: + case 3: + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { + a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -3) + a = -a; + break; + } + } + CYTHON_FALLTHROUGH; + case -4: + case 4: + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { + a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -4) + a = -a; + break; + } + } + CYTHON_FALLTHROUGH; + default: + #else + { + #endif + a = PyLong_AsDouble(op1); + if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL; + + } + } else { + return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)); + } + + PyFPE_START_PROTECT("divide", return NULL) + result = a / b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); +} +#endif + +/* RaiseArgTupleInvalid */ + static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* RaiseDoubleKeywords */ + static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ + static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* ArgTypeTest */ + static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* GetTopmostException */ + #if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ + #if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/* PyErrExceptionMatches */ + #if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* GetException */ + #if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* RaiseException */ + #if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* TypeImport */ + #ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* Import */ + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* CLineInTraceback */ + #ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ + static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ + #include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +#if PY_MAJOR_VERSION < 3 +static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { + if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); + PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); + return -1; +} +static void __Pyx_ReleaseBuffer(Py_buffer *view) { + PyObject *obj = view->obj; + if (!obj) return; + if (PyObject_CheckBuffer(obj)) { + PyBuffer_Release(view); + return; + } + if ((0)) {} + view->obj = NULL; + Py_DECREF(obj); +} +#endif + + + /* CIntFromPyVerify */ + #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* Declarations */ + #if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsf(b.real) >= fabsf(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + float r = b.imag / b.real; + float s = (float)(1.0) / (b.real + b.imag * r); + return __pyx_t_float_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + float r = b.real / b.imag; + float s = (float)(1.0) / (b.imag + b.real * r); + return __pyx_t_float_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + float denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_float_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_float(a, a); + case 3: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, a); + case 4: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = powf(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2f(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_float(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +/* Declarations */ + #if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs(b.real) >= fabs(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + double r = b.imag / b.real; + double s = (double)(1.0) / (b.real + b.imag * r); + return __pyx_t_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + double r = b.real / b.imag; + double s = (double)(1.0) / (b.imag + b.real * r); + return __pyx_t_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_double(a, a); + case 3: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, a); + case 4: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = pow(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_double(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif +#endif + +/* CIntFromPy */ + static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +/* CIntFromPy */ + static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ + #if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; ip) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/tool/algorithm/algtools/filter/build/temp.win-amd64-3.8/Release/build/lee_Filter/lee_Filter_c.cp38-win_amd64.exp b/tool/algorithm/algtools/filter/build/temp.win-amd64-3.8/Release/build/lee_Filter/lee_Filter_c.cp38-win_amd64.exp new file mode 100644 index 0000000..f83e40e Binary files /dev/null and b/tool/algorithm/algtools/filter/build/temp.win-amd64-3.8/Release/build/lee_Filter/lee_Filter_c.cp38-win_amd64.exp differ diff --git a/tool/algorithm/algtools/filter/build/temp.win-amd64-3.8/Release/build/lee_Filter/lee_Filter_c.cp38-win_amd64.lib b/tool/algorithm/algtools/filter/build/temp.win-amd64-3.8/Release/build/lee_Filter/lee_Filter_c.cp38-win_amd64.lib new file mode 100644 index 0000000..96b04a7 Binary files /dev/null and b/tool/algorithm/algtools/filter/build/temp.win-amd64-3.8/Release/build/lee_Filter/lee_Filter_c.cp38-win_amd64.lib differ diff --git a/tool/algorithm/algtools/filter/build/temp.win-amd64-3.8/Release/build/lee_Filter/lee_Filter_c.obj b/tool/algorithm/algtools/filter/build/temp.win-amd64-3.8/Release/build/lee_Filter/lee_Filter_c.obj new file mode 100644 index 0000000..7a12ef4 Binary files /dev/null and b/tool/algorithm/algtools/filter/build/temp.win-amd64-3.8/Release/build/lee_Filter/lee_Filter_c.obj differ diff --git a/tool/algorithm/algtools/filter/isce.log b/tool/algorithm/algtools/filter/isce.log new file mode 100644 index 0000000..6c23767 --- /dev/null +++ b/tool/algorithm/algtools/filter/isce.log @@ -0,0 +1,7 @@ +2023-02-17 06:06:22,434 - pyproj - DEBUG - PROJ_ERROR: proj_context_set_database_path: /cygdrive/e/soft/Anaconda/envs/micro/Library/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation. +2023-02-17 06:13:33,366 - pyproj - DEBUG - PROJ_ERROR: proj_context_set_database_path: /cygdrive/e/soft/Anaconda/envs/micro/Library/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation. +2023-02-17 06:43:15,623 - pyproj - DEBUG - PROJ_ERROR: proj_context_set_database_path: /cygdrive/e/soft/Anaconda/envs/micro/Library/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation. +2023-02-17 06:46:12,386 - pyproj - DEBUG - PROJ_ERROR: proj_context_set_database_path: /cygdrive/e/soft/Anaconda/envs/micro/Library/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation. +2023-02-17 07:58:59,262 - pyproj - DEBUG - PROJ_ERROR: proj_context_set_database_path: /cygdrive/e/soft/Anaconda/envs/micro/Library/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation. +2023-02-17 07:59:05,563 - pyproj - DEBUG - PROJ_ERROR: proj_context_set_database_path: /cygdrive/e/soft/Anaconda/envs/micro/Library/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation. +2023-02-17 07:59:28,169 - pyproj - DEBUG - PROJ_ERROR: proj_context_set_database_path: /cygdrive/e/soft/Anaconda/envs/micro/Library/share/proj/proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation. diff --git a/tool/algorithm/algtools/filter/lee_Filter.py b/tool/algorithm/algtools/filter/lee_Filter.py new file mode 100644 index 0000000..b6c4973 --- /dev/null +++ b/tool/algorithm/algtools/filter/lee_Filter.py @@ -0,0 +1,302 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:lee_filter.py +@Function:lee_filter +@Contact: https://github.com/PyRadar/pyradar +@Author:SHJ +@Date:2021/8/30 8:42 +@Version:1.0.0 +""" + +import numpy as np +import math +from PIL import Image +import multiprocessing +import multiprocessing +from tool.algorithm.block.blockprocess import BlockProcess +import logging +import shutil +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.file.fileHandle import fileHandle +from tool.algorithm.algtools.filter import lee_Filter_c as lee_Filter_c +logger = logging.getLogger("mylog") +file =fileHandle(False) +COEF_VAR_DEFAULT = 0.01 +CU_DEFAULT = 0.25 +import os + + +class Filter: + def __int__(self): + pass + + @staticmethod + def assert_window_size(win_size): + """ + Asserts invalid window size. + Window size must be odd and bigger than 3. + """ + assert win_size >= 3, 'ERROR: win size must be at least 3' + + if win_size % 2 == 0: + print('It is highly recommended to user odd window sizes.' + 'You provided %s, an even number.' % (win_size, )) + + @staticmethod + def assert_indices_in_range(width, height, xleft, xright, yup, ydown): + """ + Asserts index out of image range. + """ + + # assert xleft >= 0 and xleft <= width, \ + assert 0 <= xleft <= width, \ + "index xleft:%s out of range (%s<= xleft < %s)" % (xleft, 0, width) + + # assert xright >= 0 and xright <= width, \ + assert 0 <= xright <= width, "index xright:%s out of range (%s<= xright < %s)" % (xright, 0, width) + + # assert yup >= 0 and yup <= height, \ + assert 0 <= yup <= height, "index yup:%s out of range. (%s<= yup < %s)" % (yup, 0, height) + + # assert ydown >= 0 and ydown <= height, \ + assert 0 <= ydown <= height, "index ydown:%s out of range. (%s<= ydown < %s)" % (ydown, 0, height) + + @staticmethod + def weighting(window, cu=CU_DEFAULT): + """ + Computes the weighthing function for Lee filter using cu as the noise + coefficient. + """ + # cu is the noise variation coefficient + two_cu = cu * cu + + # ci is the variation coefficient in the window + window_mean = window.mean() + window_std = window.std() + ci = window_std / window_mean + + two_ci = ci * ci + + if not two_ci: # dirty patch to avoid zero division + two_ci = COEF_VAR_DEFAULT + + if cu > ci: + w_t = 0.0 + else: + w_t = 1.0 - (two_cu / two_ci) + + return w_t + + def lee_filter(self, in_path, out_path, win_size): + """ + Apply lee to a numpy matrix containing the image, with a window of + win_size x win_size. + """ + cu = CU_DEFAULT + self.assert_window_size(win_size) + # img = self.ImageHandler.get_band_array(img, 1) + array1 = Image.open(in_path) + img = np.array(array1) + # we process the entire img as float64 to avoid type overflow error + img = np.float64(img) + img_filtered = np.zeros_like(img) + # n, m = img.shape + # win_offset = win_size / 2 + # + # for i in range(0, n): + # xleft = i - win_offset + # xright = i + win_offset + # + # if xleft < 0: + # xleft = 0 + # if xright >= n: + # xright = n + # + # for j in range(0, m): + # yup = j - win_offset + # ydown = j + win_offset + # + # if yup < 0: + # yup = 0 + # if ydown >= m: + # ydown = m + # + # self.assert_indices_in_range(n, m, xleft, xright, yup, ydown) + # + # pix_value = img[i, j] + # + # window = img[math.ceil(xleft):int(xright)+1, math.ceil(yup):int(ydown)+1] + # w_t = self.weighting(window, cu) + # window_mean = window.mean() + # new_pix_value = (pix_value * w_t) + (window_mean * (1.0 - w_t)) + # + # if not new_pix_value > 0: + # new_pix_value = 0 + # img_filtered[i, j] = round(new_pix_value) + # # return img_filtered + self.lee_filter_array(img, img_filtered, win_size) + out_image = Image.fromarray(img_filtered) + out_image.save(out_path) + print("lee_filter finish! path:" + out_path) + return True + + @staticmethod + def lee_filter_array(in_arry, out_arry, win_size): + """ + Apply lee to a numpy matrix containing the image, with a window of + win_size x win_size. + """ + f = Filter() + #cu = CU_DEFAULT + f.assert_window_size(win_size) + img = in_arry + # we process the entire img as float64 to avoid type overflow error + img = np.float64(img) + img = img + 100 + + # lee_filter_array(np.ndarray[double,ndim=2] img,np.ndarray[double,ndim=2] out_arryint win_offset,int win_size): + newOUt=lee_Filter_c.lee_filter_array(img,out_arry,win_size) + newOUt=newOUt-100 + out_arry[:,:]=newOUt[:,:] + + # def lee_filter_array(self, in_arry, out_arry, win_size): + # """ + # Apply lee to a numpy matrix containing the image, with a window of + # win_size x win_size. + # """ + # cu = CU_DEFAULT + # self.assert_window_size(win_size) + # img = in_arry + # # we process the entire img as float64 to avoid type overflow error + # img = np.float64(img) + # img = img + 100 + # img_filtered = np.zeros_like(img) + # n, m = img.shape + # win_offset = win_size / 2 + # + # for i in range(0, n): + # xleft = i - win_offset + # xright = i + win_offset + # + # if xleft < 0: + # xleft = 0 + # if xright >= n: + # xright = n + # + # for j in range(0, m): + # yup = j - win_offset + # ydown = j + win_offset + # + # if yup < 0: + # yup = 0 + # if ydown >= m: + # ydown = m + # + # self.assert_indices_in_range(n, m, xleft, xright, yup, ydown) + # + # pix_value = img[i, j] + # + # window = img[math.ceil(xleft):int(xright)+1, math.ceil(yup):int(ydown)+1] + # w_t = self.weighting(window, cu) + # window_mean = window.mean() + # new_pix_value = (pix_value * w_t) + (window_mean * (1.0 - w_t)) + # + # if not new_pix_value > 0: + # new_pix_value = 0 + # out_arry[i, j] = round(new_pix_value) + # out_arry = out_arry - 100 + # + + def lee_filter_multiprocess(self, in_paths, out_paths, win_size =3,processes_num=10): + if len(in_paths) != len(out_paths): + return False + # 开启多进程处理 + pool = multiprocessing.Pool(processes=processes_num) + pl = [] + for i in range(len(in_paths)): + #self.lee_filter(in_paths[i], out_paths[i], win_size) + pl.append(pool.apply_async(self.lee_filter,(in_paths[i], out_paths[i], win_size))) + print("lee_filter runing! path:" + in_paths[i]) + pool.close() + pool.join() + return True + + + def lee_filter_block_multiprocess(self, in_path, out_path, win_size =3): + in_name = os.path.basename(in_path) + out_name = os.path.basename(out_path) + outDir= os.path.split(out_path)[0] + #创建工作文件夹 + src_path = os.path.join(outDir, "src_img") + block_path = os.path.join(outDir, "block") + block_filtered = os.path.join(outDir, "block_filtered") + file.creat_dirs([src_path, block_path, block_filtered]) + + shutil.copyfile(in_path, os.path.join(src_path, in_name)) + cols = ImageHandler.get_img_width(in_path) + rows = ImageHandler.get_img_height(in_path) + # 分块 + bp = BlockProcess() + block_size = bp.get_block_size(rows, cols) + bp.cut(src_path, block_path, ['tif', 'tiff'], 'tif', block_size) + logger.info('blocking tifs success!') + + img_dir, img_name = bp.get_file_names(block_path, ['tif']) + dir_dict = bp.get_same_img(img_dir, img_name) + + img_path_list = [value for value in dir_dict.values()][0] + + processes_num = min([len(img_path_list), multiprocessing.cpu_count() - 1]) + + out_img_path_list =[] + for in_path in img_path_list: + suffix = bp.get_suffix(os.path.basename(in_path)) + out_path = os.path.join(block_filtered, out_name.replace('.tif', suffix)) + out_img_path_list.append(out_path) + + self.lee_filter_multiprocess(img_path_list, out_img_path_list, win_size = win_size, processes_num=processes_num) + # 开启多进程处理 + # pool = multiprocessing.Pool(processes=processes_num) + # + # for i in range(len(hh_list)): + # block_img_path = hh_list[i] + # suffix = bp.get_suffix(os.path.basename(hh_list[i])) + # filed_block_img_path = os.path.join(block_filtered,out_name.replace('.tif',suffix)) + # pool.apply_async(self.lee_filter, (block_img_path, filed_block_img_path, win_size)) + # print("lee_filter runing! path:" + block_img_path) + # logger.info('total:%s, block:%s lee_filter!', len(hh_list), i) + # + # pool.close() + # pool.join() + # # 合并处理后的影像 + bp.combine(block_filtered, cols, rows, outDir, file_type=['tif'], datetype='float32') + + file.del_folder(src_path) + file.del_folder(block_path) + file.del_folder(block_filtered) + pass + + def lee_process_sar(self, in_sar, out_sar, win_size, noise_var): + ''' + # std::cout << "mode 12" + # std::cout << "SIMOrthoProgram.exe 12 in_sar_path out_sar_path win_size noise_var" + ''' + exe_path = r".\baseTool\x64\Release\SIMOrthoProgram-S-SAR.exe" + exe_cmd = r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path, 12, in_sar, + out_sar, win_size, noise_var) + print(exe_cmd) + print(os.system(exe_cmd)) + print("==========================================================================") + + +if __name__ == '__main__': + # 示例1: + # path = r"I:\MicroWorkspace\product\C-SAR\LeafAreaIndex\Temporary\cai_sartif\HV_0_512_0_512.tif" + # f = Filter() + # f.lee_filter(path,path,3) + #示例2: + + f = Filter() + f.lee_filter_block_multiprocess('I:\preprocessed\HH.tif','I:\preprocessed\HHf.tif') + pass diff --git a/tool/algorithm/algtools/filter/lee_Filter/lee_Filter_c.pyx b/tool/algorithm/algtools/filter/lee_Filter/lee_Filter_c.pyx new file mode 100644 index 0000000..413b8a6 --- /dev/null +++ b/tool/algorithm/algtools/filter/lee_Filter/lee_Filter_c.pyx @@ -0,0 +1,124 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:lee_filter.py +@Function:lee_filter +@Contact: https://github.com/PyRadar/pyradar +@Author:SHJ +@Date:2021/8/30 8:42 +@Version:1.0.0 +""" + +import os +cimport cython # 必须导入 +import numpy as np##必须为c类型和python类型的数据都申明一个np +cimport numpy as np # 必须为c类型和python类型的数据都申明一个np +from libc.math cimport pi +from libc.math cimport atan as math_atan +from libc.math cimport log10 as math_log10 +from libc.math cimport log as math_log +from libc.math cimport floor as math_floor +from libc.math cimport sqrt as math_sqrt +from libc.math cimport exp as math_exp +from libc.math cimport sin as math_sin +from libc.math cimport cos as math_cos +from libc.math cimport tan as math_tan +from libc.math cimport asin as math_asin +from libc.math cimport acos as math_acos +from libc.math cimport tan as math_atan +from libc.math cimport sinh as math_sinh +from libc.math cimport cosh as math_cosh +from libc.math cimport tanh as math_tanh +from libc.math cimport floor as math_floor +from libc.math cimport ceil as math_ceil +from libc.math cimport lround as math_round + +cdef double COEF_VAR_DEFAULT = 0.01 +cdef double CU_DEFAULT = 0.25 + + +cdef int ceil_usr(double v): + return int(math_ceil(v)) + + + +cdef double weighting(np.ndarray[double,ndim=2] window,double cu): + """ + Computes the weighthing function for Lee filter using cu as the noise + coefficient. + """ + # cu is the noise variation coefficient + cdef double two_cu = cu * cu + + # ci is the variation coefficient in the window + cdef double window_mean = window.mean() + cdef double window_std = window.std() + cdef double ci = window_std / window_mean + + cdef double two_ci = ci * ci + cdef double w_t=0; + if not (two_ci==0): # dirty patch to avoid zero division + two_ci = COEF_VAR_DEFAULT + + if cu > ci: + w_t = 0.0 + else: + w_t = 1.0 - (two_cu / two_ci) + + return w_t + +cpdef np.ndarray[double,ndim=2] lee_filter_array(np.ndarray[double,ndim=2] img,np.ndarray[double,ndim=2] out_arry,int win_size): + """ + Apply lee to a numpy matrix containing the image, with a window of + win_size x win_size. + """ + # we process the entire img as float64 to avoid type overflow error + #n, m = img.shape + cdef double cu = CU_DEFAULT + cdef int i=0 + cdef int j=0 + cdef int xleft=0 + cdef int xright=0 + cdef int yup=0 + cdef int ydown=0 + cdef np.ndarray[double,ndim=2] window; + cdef double w_t=0; + cdef double window_mean=0; + cdef double new_pix_valu=0; + cdef int n = img.shape[0] + cdef int m=img.shape[1] + cdef int win_offset=int(win_size/2) + + while i= n: + xright = n + j=0 + while j= m: + ydown = m + + pix_value = img[i, j] + + window = img[xleft:xright+1, yup:ydown+1] + + w_t = weighting(window, cu) + + window_mean = np.mean(window) + new_pix_value = (pix_value * w_t) + (window_mean * (1.0 - w_t)) + + if not new_pix_value > 0: + new_pix_value = 0 + out_arry[i, j] = round(new_pix_value*100000.0)/100000.0 + j=j+1 + i=i+1 + return out_arry + diff --git a/tool/algorithm/algtools/filter/lee_Filter_c.cp38-win_amd64.pyd b/tool/algorithm/algtools/filter/lee_Filter_c.cp38-win_amd64.pyd new file mode 100644 index 0000000..0ed7504 Binary files /dev/null and b/tool/algorithm/algtools/filter/lee_Filter_c.cp38-win_amd64.pyd differ diff --git a/tool/algorithm/algtools/filter/setup.py b/tool/algorithm/algtools/filter/setup.py new file mode 100644 index 0000000..184d396 --- /dev/null +++ b/tool/algorithm/algtools/filter/setup.py @@ -0,0 +1,45 @@ +from setuptools import setup +from setuptools.extension import Extension +from Cython.Distutils import build_ext +from Cython.Build import cythonize +import numpy +from pathlib import Path +import shutil + + +class MyBuildExt(build_ext): + def run(self): + build_ext.run(self) + + build_dir = Path(self.build_lib) + root_dir = Path(__file__).parent + target_dir = build_dir if not self.inplace else root_dir + + self.copy_file(Path('./lee_Filter') / '__init__.py', root_dir, target_dir) + #self.copy_file(Path('./pkg2') / '__init__.py', root_dir, target_dir) + self.copy_file(Path('.') / '__init__.py', root_dir, target_dir) + def copy_file(self, path, source_dir, destination_dir): + if not (source_dir / path).exists(): + return + shutil.copyfile(str(source_dir / path), str(destination_dir / path)) + +setup( + name="MyModule", + ext_modules=cythonize( + [ + #Extension("pkg1.*", ["root/pkg1/*.py"]), + Extension("pkg2.*", ["./lee_Filter/lee_Filter_c.pyx"]), + #Extension("1.*", ["root/*.py"]) + ], + build_dir="build", + compiler_directives=dict( + always_allow_keywords=True + )), + cmdclass=dict( + build_ext=MyBuildExt + ), + packages=[], + include_dirs=[numpy.get_include()], +) + +# 指令: python setup.py build_ext --inplace diff --git a/tool/algorithm/algtools/logHandler.py b/tool/algorithm/algtools/logHandler.py new file mode 100644 index 0000000..54cdd23 --- /dev/null +++ b/tool/algorithm/algtools/logHandler.py @@ -0,0 +1,90 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :logHandler.py +@Function :日志检查、生成 +@Author :SHJ +@Date :2021/12/1 +@Version :1.0.0 +""" +import logging +import os +import time +import datetime + + +class LogHandler: + """ + 生成日志 + """ + __logger = logging.getLogger("mylog") + __format_str = logging.Formatter("[%(asctime)s] [%(process)d] [%(levelname)s] - %(module)s.%(funcName)s " + "(%(filename)s:%(lineno)d) - %(message)s") + __log_path = None + + @staticmethod + def init_log_handler(log_name): + """ + 初始化日志 + :param log_name: 日志保存的路径和名称 + :return: + """ + path = os.getcwd() + current_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(time.time())) + LogHandler.__log_path = os.path.join(path, log_name + current_time + ".log") + para_dir = os.path.split(LogHandler.__log_path) + if not os.path.exists(para_dir[0]): + os.makedirs(para_dir[0]) + # 删除七天以前的文件 + LogHandler.delete_outdate_files(para_dir[0]) + + # 方法1:普通日志 + log_format = "[%(asctime)s] [%(process)d] [%(levelname)s]- %(message)s ---from: %(module)s.%(funcName)s" \ + " (%(filename)s:Line%(lineno)d) " + date_format = "%m/%d/%Y %H:%M:%S" + fp = logging.FileHandler(LogHandler.__log_path, encoding='utf-8') + fs = logging.StreamHandler() + logging.basicConfig(level=logging.INFO, format=log_format, datefmt=date_format, handlers=[fp, fs]) # 调用 + + # 方法2:回滚日志 + # LogHandler.__logger.setLevel(logging.DEBUG) + # th = handlers.TimedRotatingFileHandler(filename=LogHandler.__log_path, when='S', interval=1, + # backupCount=2, encoding='utf-8') + # th.suffix = "%Y-%m-%d-%H-%M-%S.log" + # th.setFormatter(LogHandler.__format_str) + # th.setLevel(level=logging.DEBUG) + + # console = logging.StreamHandler() + # console.setLevel(logging.INFO) + # LogHandler.__logger.addHandler(console) + # LogHandler.__logger.addHandler(th) + + @staticmethod + def delete_outdate_files(path, date_interval=7): + """ + 删除目录下七天前创建的文件 + """ + current_time = time.strftime("%Y-%m-%d", time.localtime(time.time())) + current_time_list = current_time.split("-") + current_time_day = datetime.datetime(int(current_time_list[0]), int(current_time_list[1]), + int(current_time_list[2])) + for root, dirs, files in os.walk(path): + for item in files: + item_format = item.split(".", 2) + if item_format[1] == "log": + file_path = os.path.join(root, item) + create_time = time.strftime("%Y-%m-%d", time.localtime((os.stat(file_path)).st_mtime)) + create_time_list = create_time.split("-") + create_time_day = datetime.datetime(int(create_time_list[0]), int(create_time_list[1]), + int(create_time_list[2])) + time_difference = (current_time_day - create_time_day).days + if time_difference > date_interval: + os.remove(file_path) + +# +# if __name__ == "__main__": +# # eg2: +# log_handler = LogHandler() +# log_handler.init_log_handler(r"run_log\myrun1") +# logging.warning("1") +# print("done") diff --git a/tool/algorithm/algtools/oh2004/build/oh2004/oh2004.c b/tool/algorithm/algtools/oh2004/build/oh2004/oh2004.c new file mode 100644 index 0000000..f0bbecc --- /dev/null +++ b/tool/algorithm/algtools/oh2004/build/oh2004/oh2004.c @@ -0,0 +1,9665 @@ +/* Generated by Cython 0.29.24 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "oh2004", + "sources": [ + "./oh2004/oh2004.pyx" + ] + }, + "module_name": "oh2004" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_24" +#define CYTHON_HEX_VERSION 0x001D18F0 +#define CYTHON_FUTURE_DIVISION 0 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #if defined(PyUnicode_IS_READY) + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #else + #define __Pyx_PyUnicode_READY(op) (0) + #endif + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__oh2004 +#define __PYX_HAVE_API__oh2004 +/* Early includes */ +#include +#include +#include "numpy/arrayobject.h" +#include "numpy/ndarrayobject.h" +#include "numpy/ndarraytypes.h" +#include "numpy/arrayscalars.h" +#include "numpy/ufuncobject.h" + + /* NumPy API declarations from "numpy/__init__.pxd" */ + +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + +/* Header.proto */ +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include + #else + #include + #endif +#endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + + +static const char *__pyx_f[] = { + "oh2004\\oh2004.pyx", + "__init__.pxd", + "type.pxd", +}; +/* BufferFormatStructs.proto */ +#define IS_UNSIGNED(type) (((type) -1) > 0) +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; + struct __Pyx_StructField_* fields; + size_t size; + size_t arraysize[8]; + int ndim; + char typegroup; + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":690 + * # in Cython to enable them only on the right systems. + * + * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + */ +typedef npy_int8 __pyx_t_5numpy_int8_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":691 + * + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t + */ +typedef npy_int16 __pyx_t_5numpy_int16_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":692 + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< + * ctypedef npy_int64 int64_t + * #ctypedef npy_int96 int96_t + */ +typedef npy_int32 __pyx_t_5numpy_int32_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":693 + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< + * #ctypedef npy_int96 int96_t + * #ctypedef npy_int128 int128_t + */ +typedef npy_int64 __pyx_t_5numpy_int64_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":697 + * #ctypedef npy_int128 int128_t + * + * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + */ +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":698 + * + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t + */ +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":699 + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< + * ctypedef npy_uint64 uint64_t + * #ctypedef npy_uint96 uint96_t + */ +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":700 + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< + * #ctypedef npy_uint96 uint96_t + * #ctypedef npy_uint128 uint128_t + */ +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":704 + * #ctypedef npy_uint128 uint128_t + * + * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< + * ctypedef npy_float64 float64_t + * #ctypedef npy_float80 float80_t + */ +typedef npy_float32 __pyx_t_5numpy_float32_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":705 + * + * ctypedef npy_float32 float32_t + * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< + * #ctypedef npy_float80 float80_t + * #ctypedef npy_float128 float128_t + */ +typedef npy_float64 __pyx_t_5numpy_float64_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":714 + * # The int types are mapped a bit surprising -- + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t + */ +typedef npy_long __pyx_t_5numpy_int_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":715 + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong longlong_t + * + */ +typedef npy_longlong __pyx_t_5numpy_long_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":716 + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_ulong uint_t + */ +typedef npy_longlong __pyx_t_5numpy_longlong_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":718 + * ctypedef npy_longlong longlong_t + * + * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t + */ +typedef npy_ulong __pyx_t_5numpy_uint_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":719 + * + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulonglong_t + * + */ +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":720 + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_intp intp_t + */ +typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":722 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< + * ctypedef npy_uintp uintp_t + * + */ +typedef npy_intp __pyx_t_5numpy_intp_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":723 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< + * + * ctypedef npy_double float_t + */ +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":725 + * ctypedef npy_uintp uintp_t + * + * ctypedef npy_double float_t # <<<<<<<<<<<<<< + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t + */ +typedef npy_double __pyx_t_5numpy_float_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":726 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< + * ctypedef npy_longdouble longdouble_t + * + */ +typedef npy_double __pyx_t_5numpy_double_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":727 + * ctypedef npy_double float_t + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cfloat cfloat_t + */ +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + + +/*--- Type declarations ---*/ + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":729 + * ctypedef npy_longdouble longdouble_t + * + * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t + */ +typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":730 + * + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< + * ctypedef npy_clongdouble clongdouble_t + * + */ +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":731 + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cdouble complex_t + */ +typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":733 + * ctypedef npy_clongdouble clongdouble_t + * + * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew1(a): + */ +typedef npy_cdouble __pyx_t_5numpy_complex_t; + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* IsLittleEndian.proto */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); + +/* BufferFormatCheck.proto */ +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type); + +/* BufferGetAndValidate.proto */ +#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\ + ((obj == Py_None || obj == NULL) ?\ + (__Pyx_ZeroBuffer(buf), 0) :\ + __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)) +static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj, + __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); +static void __Pyx_ZeroBuffer(Py_buffer* buf); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); +static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 }; +static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + +/* BufferIndexError.proto */ +static void __Pyx_RaiseBufferIndexError(int axis); + +#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) +/* PyIntBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyInt_SubtractCObj(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* PyFloatBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_SubtractCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyFloat_SubtractCObj(op1, op2, floatval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) +#endif + +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* PyFloatBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\ + ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2))) + #endif + +/* PyFloatBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_AddCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyFloat_AddCObj(op1, op2, floatval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* WriteUnraisableException.proto */ +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback, int nogil); + +/* BufferFallbackError.proto */ +static void __Pyx_RaiseBufferFallbackError(void); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* BufferStructDeclare.proto */ +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +#if PY_MAJOR_VERSION < 3 + static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); + static void __Pyx_ReleaseBuffer(Py_buffer *view); +#else + #define __Pyx_GetBuffer PyObject_GetBuffer + #define __Pyx_ReleaseBuffer PyBuffer_Release +#endif + + +/* GCCDiagnostics.proto */ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* RealImag.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif +#if defined(__cplusplus) && CYTHON_CCOMPLEX\ + && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_float(a, b) ((a)==(b)) + #define __Pyx_c_sum_float(a, b) ((a)+(b)) + #define __Pyx_c_diff_float(a, b) ((a)-(b)) + #define __Pyx_c_prod_float(a, b) ((a)*(b)) + #define __Pyx_c_quot_float(a, b) ((a)/(b)) + #define __Pyx_c_neg_float(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_float(z) ((z)==(float)0) + #define __Pyx_c_conj_float(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_float(z) (::std::abs(z)) + #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_float(z) ((z)==0) + #define __Pyx_c_conj_float(z) (conjf(z)) + #if 1 + #define __Pyx_c_abs_float(z) (cabsf(z)) + #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_double(a, b) ((a)==(b)) + #define __Pyx_c_sum_double(a, b) ((a)+(b)) + #define __Pyx_c_diff_double(a, b) ((a)-(b)) + #define __Pyx_c_prod_double(a, b) ((a)*(b)) + #define __Pyx_c_quot_double(a, b) ((a)/(b)) + #define __Pyx_c_neg_double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_double(z) ((z)==(double)0) + #define __Pyx_c_conj_double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (::std::abs(z)) + #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_double(z) ((z)==0) + #define __Pyx_c_conj_double(z) (conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (cabs(z)) + #define __Pyx_c_pow_double(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + + +/* Module declarations from 'cython' */ + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libc.stdio' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.type' */ +static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; + +/* Module declarations from 'cpython' */ + +/* Module declarations from 'cpython.object' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'cpython.mem' */ + +/* Module declarations from 'numpy' */ + +/* Module declarations from 'numpy' */ +static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; +static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; +static PyTypeObject *__pyx_ptype_5numpy_generic = 0; +static PyTypeObject *__pyx_ptype_5numpy_number = 0; +static PyTypeObject *__pyx_ptype_5numpy_integer = 0; +static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; +static PyTypeObject *__pyx_ptype_5numpy_floating = 0; +static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; +static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; +static PyTypeObject *__pyx_ptype_5numpy_character = 0; +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; + +/* Module declarations from 'libc.math' */ + +/* Module declarations from 'oh2004' */ +static PyArrayObject *__pyx_f_6oh2004_inverse_oh2004(double, double, double, double, double, int __pyx_skip_dispatch); /*proto*/ +static double __pyx_f_6oh2004_lamda2freq(double, int __pyx_skip_dispatch); /*proto*/ +static double __pyx_f_6oh2004_freq2lamda(double, int __pyx_skip_dispatch); /*proto*/ +static int __pyx_f_6oh2004_retrieve_oh2004_main(int, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, double, int __pyx_skip_dispatch); /*proto*/ +static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 }; +#define __Pyx_MODULE_NAME "oh2004" +extern int __pyx_module_is_main_oh2004; +int __pyx_module_is_main_oh2004 = 0; + +/* Implementation of 'oh2004' */ +static PyObject *__pyx_builtin_ImportError; +static const char __pyx_k_f[] = "f"; +static const char __pyx_k_h[] = "h"; +static const char __pyx_k_n[] = "n"; +static const char __pyx_k_mv[] = "mv"; +static const char __pyx_k_np[] = "np"; +static const char __pyx_k_pi[] = "pi"; +static const char __pyx_k_vh[] = "vh"; +static const char __pyx_k_abs[] = "abs"; +static const char __pyx_k_cos[] = "cos"; +static const char __pyx_k_exp[] = "exp"; +static const char __pyx_k_log[] = "log"; +static const char __pyx_k_max[] = "max"; +static const char __pyx_k_nan[] = "nan"; +static const char __pyx_k_sin[] = "sin"; +static const char __pyx_k_fmin[] = "fmin"; +static const char __pyx_k_freq[] = "freq"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_mask[] = "mask"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_ones[] = "ones"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_lamda[] = "lamda"; +static const char __pyx_k_numpy[] = "numpy"; +static const char __pyx_k_power[] = "power"; +static const char __pyx_k_shape[] = "shape"; +static const char __pyx_k_theta[] = "theta"; +static const char __pyx_k_where[] = "where"; +static const char __pyx_k_arange[] = "arange"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_nanmin[] = "nanmin"; +static const char __pyx_k_sigma0hhdB[] = "sigma0hhdB"; +static const char __pyx_k_sigma0hvdB[] = "sigma0hvdB"; +static const char __pyx_k_sigma0vvdB[] = "sigma0vvdB"; +static const char __pyx_k_ImportError[] = "ImportError"; +static const char __pyx_k_scipy_optimize[] = "scipy.optimize"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_Created_on_Tue_Jun_4_14_59_54_2[] = "\nCreated on Tue Jun 4 14:59:54 2013\n\n@author: Sat Kumar Tomer\n@email: satkumartomer@gmail.com\n@website: www.ambhas.com\n\n"; +static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; +static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static PyObject *__pyx_n_s_ImportError; +static PyObject *__pyx_n_s_abs; +static PyObject *__pyx_n_s_arange; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_s_cos; +static PyObject *__pyx_n_s_exp; +static PyObject *__pyx_n_s_f; +static PyObject *__pyx_n_s_fmin; +static PyObject *__pyx_n_s_freq; +static PyObject *__pyx_n_s_h; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_lamda; +static PyObject *__pyx_n_s_log; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_mask; +static PyObject *__pyx_n_s_max; +static PyObject *__pyx_n_s_mv; +static PyObject *__pyx_n_s_n; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_nan; +static PyObject *__pyx_n_s_nanmin; +static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_s_numpy; +static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; +static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; +static PyObject *__pyx_n_s_ones; +static PyObject *__pyx_n_s_pi; +static PyObject *__pyx_n_s_power; +static PyObject *__pyx_n_s_scipy_optimize; +static PyObject *__pyx_n_s_shape; +static PyObject *__pyx_n_s_sigma0hhdB; +static PyObject *__pyx_n_s_sigma0hvdB; +static PyObject *__pyx_n_s_sigma0vvdB; +static PyObject *__pyx_n_s_sin; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_theta; +static PyObject *__pyx_n_s_vh; +static PyObject *__pyx_n_s_where; +static PyObject *__pyx_pf_6oh2004_inverse_oh2004(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_sigma0vvdB, double __pyx_v_sigma0hhdB, double __pyx_v_sigma0hvdB, double __pyx_v_theta, double __pyx_v_f); /* proto */ +static PyObject *__pyx_pf_6oh2004_2lamda2freq(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_lamda); /* proto */ +static PyObject *__pyx_pf_6oh2004_4freq2lamda(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_freq); /* proto */ +static PyObject *__pyx_pf_6oh2004_6retrieve_oh2004_main(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_n, PyArrayObject *__pyx_v_mv, PyArrayObject *__pyx_v_h, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_sigma0vvdB, PyArrayObject *__pyx_v_sigma0hhdB, PyArrayObject *__pyx_v_sigma0hvdB, PyArrayObject *__pyx_v_vh, PyArrayObject *__pyx_v_theta, double __pyx_v_f); /* proto */ +static PyObject *__pyx_float_1_; +static PyObject *__pyx_float_0_7; +static PyObject *__pyx_float_0_9; +static PyObject *__pyx_float_1_4; +static PyObject *__pyx_float_10_; +static PyObject *__pyx_float_2_2; +static PyObject *__pyx_float_0_01; +static PyObject *__pyx_float_0_05; +static PyObject *__pyx_float_0_11; +static PyObject *__pyx_float_0_13; +static PyObject *__pyx_float_0_35; +static PyObject *__pyx_float_0_095; +static PyObject *__pyx_float_0_556; +static PyObject *__pyx_float_neg_0_4; +static PyObject *__pyx_float_neg_1_3; +static PyObject *__pyx_float_neg_0_65; +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_2; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +/* Late includes */ + +/* "oh2004.pyx":16 + * from scipy.optimize import fmin + * + * cpdef np.ndarray[double,ndim=1] inverse_oh2004(double sigma0vvdB,double sigma0hhdB,double sigma0hvdB,double theta,double f): # <<<<<<<<<<<<<< + * """ + * sigma0vvdB = -14.1 dB + */ + +static PyObject *__pyx_pw_6oh2004_1inverse_oh2004(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyArrayObject *__pyx_f_6oh2004_inverse_oh2004(double __pyx_v_sigma0vvdB, double __pyx_v_sigma0hhdB, double __pyx_v_sigma0hvdB, double __pyx_v_theta, double __pyx_v_f, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyArrayObject *__pyx_v_result = 0; + double __pyx_v_k; + double __pyx_v_theta_rad; + double __pyx_v_sigma_0_vv; + double __pyx_v_sigma_0_hh; + double __pyx_v_sigma_0_hv; + double __pyx_v_p; + double __pyx_v_q; + PyArrayObject *__pyx_v_mv0 = 0; + PyArrayObject *__pyx_v_ks = 0; + PyArrayObject *__pyx_v_err = 0; + PyArrayObject *__pyx_v_abs_err = 0; + double __pyx_v_min_err; + double __pyx_v_mv1; + double __pyx_v_temp_ks1; + double __pyx_v_ks1; + double __pyx_v_s1; + double __pyx_v_ks2; + double __pyx_v_s2; + double __pyx_v_mv2; + double __pyx_v_yy; + double __pyx_v_xx; + double __pyx_v_mv3; + double __pyx_v_sf; + double __pyx_v_mvf; + __Pyx_LocalBuf_ND __pyx_pybuffernd_abs_err; + __Pyx_Buffer __pyx_pybuffer_abs_err; + __Pyx_LocalBuf_ND __pyx_pybuffernd_err; + __Pyx_Buffer __pyx_pybuffer_err; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ks; + __Pyx_Buffer __pyx_pybuffer_ks; + __Pyx_LocalBuf_ND __pyx_pybuffernd_mv0; + __Pyx_Buffer __pyx_pybuffer_mv0; + __Pyx_LocalBuf_ND __pyx_pybuffernd_result; + __Pyx_Buffer __pyx_pybuffer_result; + PyArrayObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyArrayObject *__pyx_t_4 = NULL; + double __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + PyArrayObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyArrayObject *__pyx_t_16 = NULL; + PyArrayObject *__pyx_t_17 = NULL; + PyArrayObject *__pyx_t_18 = NULL; + int __pyx_t_19; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("inverse_oh2004", 0); + __pyx_pybuffer_result.pybuffer.buf = NULL; + __pyx_pybuffer_result.refcount = 0; + __pyx_pybuffernd_result.data = NULL; + __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; + __pyx_pybuffer_mv0.pybuffer.buf = NULL; + __pyx_pybuffer_mv0.refcount = 0; + __pyx_pybuffernd_mv0.data = NULL; + __pyx_pybuffernd_mv0.rcbuffer = &__pyx_pybuffer_mv0; + __pyx_pybuffer_ks.pybuffer.buf = NULL; + __pyx_pybuffer_ks.refcount = 0; + __pyx_pybuffernd_ks.data = NULL; + __pyx_pybuffernd_ks.rcbuffer = &__pyx_pybuffer_ks; + __pyx_pybuffer_err.pybuffer.buf = NULL; + __pyx_pybuffer_err.refcount = 0; + __pyx_pybuffernd_err.data = NULL; + __pyx_pybuffernd_err.rcbuffer = &__pyx_pybuffer_err; + __pyx_pybuffer_abs_err.pybuffer.buf = NULL; + __pyx_pybuffer_abs_err.refcount = 0; + __pyx_pybuffernd_abs_err.data = NULL; + __pyx_pybuffernd_abs_err.rcbuffer = &__pyx_pybuffer_abs_err; + + /* "oh2004.pyx":25 + * """ + * #print("--------------------------------------------------------\n") + * cdef np.ndarray[double,ndim=1] result=np.ones((2)) # <<<<<<<<<<<<<< + * result[0]=np.nan + * result[1]=np.nan + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ones); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_2); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_4 = ((PyArrayObject *)__pyx_t_1); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { + __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; + __PYX_ERR(0, 25, __pyx_L1_error) + } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; + } + } + __pyx_t_4 = 0; + __pyx_v_result = ((PyArrayObject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "oh2004.pyx":26 + * #print("--------------------------------------------------------\n") + * cdef np.ndarray[double,ndim=1] result=np.ones((2)) + * result[0]=np.nan # <<<<<<<<<<<<<< + * result[1]=np.nan + * #print("*************nan****************") + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = 0; + __pyx_t_7 = -1; + if (__pyx_t_6 < 0) { + __pyx_t_6 += __pyx_pybuffernd_result.diminfo[0].shape; + if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; + } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; + if (unlikely(__pyx_t_7 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_7); + __PYX_ERR(0, 26, __pyx_L1_error) + } + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_5; + + /* "oh2004.pyx":27 + * cdef np.ndarray[double,ndim=1] result=np.ones((2)) + * result[0]=np.nan + * result[1]=np.nan # <<<<<<<<<<<<<< + * #print("*************nan****************") + * #print(sigma0vvdB,sigma0hhdB,sigma0hvdB,theta,f) + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = 1; + __pyx_t_7 = -1; + if (__pyx_t_6 < 0) { + __pyx_t_6 += __pyx_pybuffernd_result.diminfo[0].shape; + if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; + } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; + if (unlikely(__pyx_t_7 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_7); + __PYX_ERR(0, 27, __pyx_L1_error) + } + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_t_5; + + /* "oh2004.pyx":30 + * #print("*************nan****************") + * #print(sigma0vvdB,sigma0hhdB,sigma0hvdB,theta,f) + * cdef double k = 2*3.1415926*f/0.299792458; #calculate the wave number # <<<<<<<<<<<<<< + * cdef double theta_rad = theta*3.1415926/180; #represent angle in radians + * + */ + __pyx_v_k = (((2.0 * 3.1415926) * __pyx_v_f) / 0.299792458); + + /* "oh2004.pyx":31 + * #print(sigma0vvdB,sigma0hhdB,sigma0hvdB,theta,f) + * cdef double k = 2*3.1415926*f/0.299792458; #calculate the wave number + * cdef double theta_rad = theta*3.1415926/180; #represent angle in radians # <<<<<<<<<<<<<< + * + * cdef double sigma_0_vv = np.power(10.,(sigma0vvdB/10.)) #%represent data in linear scale + */ + __pyx_v_theta_rad = ((__pyx_v_theta * 3.1415926) / 180.0); + + /* "oh2004.pyx":33 + * cdef double theta_rad = theta*3.1415926/180; #represent angle in radians + * + * cdef double sigma_0_vv = np.power(10.,(sigma0vvdB/10.)) #%represent data in linear scale # <<<<<<<<<<<<<< + * cdef double sigma_0_hh = np.power(10.,(sigma0hhdB/10.)) + * cdef double sigma_0_hv = np.power(10.,(sigma0hvdB/10.)) + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_power); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyFloat_FromDouble((__pyx_v_sigma0vvdB / 10.)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_float_10_, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_float_10_, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else + #endif + { + __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; + } + __Pyx_INCREF(__pyx_float_10_); + __Pyx_GIVEREF(__pyx_float_10_); + PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_float_10_); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_sigma_0_vv = __pyx_t_5; + + /* "oh2004.pyx":34 + * + * cdef double sigma_0_vv = np.power(10.,(sigma0vvdB/10.)) #%represent data in linear scale + * cdef double sigma_0_hh = np.power(10.,(sigma0hhdB/10.)) # <<<<<<<<<<<<<< + * cdef double sigma_0_hv = np.power(10.,(sigma0hvdB/10.)) + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_power); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyFloat_FromDouble((__pyx_v_sigma0hhdB / 10.)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_float_10_, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { + PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_float_10_, __pyx_t_2}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_float_10_); + __Pyx_GIVEREF(__pyx_float_10_); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_float_10_); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_sigma_0_hh = __pyx_t_5; + + /* "oh2004.pyx":35 + * cdef double sigma_0_vv = np.power(10.,(sigma0vvdB/10.)) #%represent data in linear scale + * cdef double sigma_0_hh = np.power(10.,(sigma0hhdB/10.)) + * cdef double sigma_0_hv = np.power(10.,(sigma0hvdB/10.)) # <<<<<<<<<<<<<< + * + * if sigma_0_vv==0: + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_power); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyFloat_FromDouble((__pyx_v_sigma0hvdB / 10.)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_2 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_float_10_, __pyx_t_9}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_float_10_, __pyx_t_9}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + } else + #endif + { + __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_INCREF(__pyx_float_10_); + __Pyx_GIVEREF(__pyx_float_10_); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_float_10_); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_sigma_0_hv = __pyx_t_5; + + /* "oh2004.pyx":37 + * cdef double sigma_0_hv = np.power(10.,(sigma0hvdB/10.)) + * + * if sigma_0_vv==0: # <<<<<<<<<<<<<< + * #print("***********sigma_0_vv==0*************") + * return result + */ + __pyx_t_10 = ((__pyx_v_sigma_0_vv == 0.0) != 0); + if (__pyx_t_10) { + + /* "oh2004.pyx":39 + * if sigma_0_vv==0: + * #print("***********sigma_0_vv==0*************") + * return result # <<<<<<<<<<<<<< + * cdef double p = sigma_0_hh / sigma_0_vv; #calculate the p-ratio + * cdef double q = sigma_0_hv / sigma_0_vv; #calculate the q-ratio + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyArrayObject *)__pyx_v_result); + goto __pyx_L0; + + /* "oh2004.pyx":37 + * cdef double sigma_0_hv = np.power(10.,(sigma0hvdB/10.)) + * + * if sigma_0_vv==0: # <<<<<<<<<<<<<< + * #print("***********sigma_0_vv==0*************") + * return result + */ + } + + /* "oh2004.pyx":40 + * #print("***********sigma_0_vv==0*************") + * return result + * cdef double p = sigma_0_hh / sigma_0_vv; #calculate the p-ratio # <<<<<<<<<<<<<< + * cdef double q = sigma_0_hv / sigma_0_vv; #calculate the q-ratio + * + */ + if (unlikely(__pyx_v_sigma_0_vv == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 40, __pyx_L1_error) + } + __pyx_v_p = (__pyx_v_sigma_0_hh / __pyx_v_sigma_0_vv); + + /* "oh2004.pyx":41 + * return result + * cdef double p = sigma_0_hh / sigma_0_vv; #calculate the p-ratio + * cdef double q = sigma_0_hv / sigma_0_vv; #calculate the q-ratio # <<<<<<<<<<<<<< + * + * + */ + if (unlikely(__pyx_v_sigma_0_vv == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 41, __pyx_L1_error) + } + __pyx_v_q = (__pyx_v_sigma_0_hv / __pyx_v_sigma_0_vv); + + /* "oh2004.pyx":44 + * + * + * cdef np.ndarray[double,ndim=1] mv0 = np.arange(0.05,0.9,0.01) # set Gamma0 range of values (fine increments) # <<<<<<<<<<<<<< + * + * ## First estimates s1 and mv1 + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arange); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_11 = ((PyArrayObject *)__pyx_t_1); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mv0.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { + __pyx_v_mv0 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_mv0.rcbuffer->pybuffer.buf = NULL; + __PYX_ERR(0, 44, __pyx_L1_error) + } else {__pyx_pybuffernd_mv0.diminfo[0].strides = __pyx_pybuffernd_mv0.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mv0.diminfo[0].shape = __pyx_pybuffernd_mv0.rcbuffer->pybuffer.shape[0]; + } + } + __pyx_t_11 = 0; + __pyx_v_mv0 = ((PyArrayObject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "oh2004.pyx":47 + * + * ## First estimates s1 and mv1 + * cdef np.ndarray[double,ndim=1] ks = ((-1.)*3.125*np.log(1 - sigma_0_hv/(0.11 * mv0**0.7 * (np.cos(theta_rad))**2.2)))**0.556 # <<<<<<<<<<<<<< + * cdef np.ndarray[double,ndim=1] err = (1. - (2.*theta_rad/np.pi)**(0.35*mv0**(-0.65)) * np.exp(-0.4 * ks**1.4))-p + * cdef np.ndarray[double,ndim=1] abs_err = np.abs(err); + */ + __pyx_t_1 = PyFloat_FromDouble((-1. * 3.125)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_sigma_0_hv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyNumber_Power(((PyObject *)__pyx_v_mv0), __pyx_float_0_7, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = PyNumber_Multiply(__pyx_float_0_11, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_cos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = PyFloat_FromDouble(__pyx_v_theta_rad); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_15 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); + if (likely(__pyx_t_15)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); + __Pyx_INCREF(__pyx_t_15); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_14, function); + } + } + __pyx_t_2 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_15, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_13); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = PyNumber_Power(__pyx_t_2, __pyx_float_2_2, Py_None); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Multiply(__pyx_t_12, __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_t_14, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_14, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyNumber_Multiply(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyNumber_Power(__pyx_t_9, __pyx_float_0_556, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_t_16 = ((PyArrayObject *)__pyx_t_8); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ks.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { + __pyx_v_ks = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_ks.rcbuffer->pybuffer.buf = NULL; + __PYX_ERR(0, 47, __pyx_L1_error) + } else {__pyx_pybuffernd_ks.diminfo[0].strides = __pyx_pybuffernd_ks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ks.diminfo[0].shape = __pyx_pybuffernd_ks.rcbuffer->pybuffer.shape[0]; + } + } + __pyx_t_16 = 0; + __pyx_v_ks = ((PyArrayObject *)__pyx_t_8); + __pyx_t_8 = 0; + + /* "oh2004.pyx":48 + * ## First estimates s1 and mv1 + * cdef np.ndarray[double,ndim=1] ks = ((-1.)*3.125*np.log(1 - sigma_0_hv/(0.11 * mv0**0.7 * (np.cos(theta_rad))**2.2)))**0.556 + * cdef np.ndarray[double,ndim=1] err = (1. - (2.*theta_rad/np.pi)**(0.35*mv0**(-0.65)) * np.exp(-0.4 * ks**1.4))-p # <<<<<<<<<<<<<< + * cdef np.ndarray[double,ndim=1] abs_err = np.abs(err); + * cdef double min_err = np.nanmin(abs_err); #find the value of minimum error + */ + __pyx_t_8 = PyFloat_FromDouble((2. * __pyx_v_theta_rad)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_pi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Power(((PyObject *)__pyx_v_mv0), __pyx_float_neg_0_65, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyNumber_Multiply(__pyx_float_0_35, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Power(__pyx_t_9, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_exp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyNumber_Power(((PyObject *)__pyx_v_ks), __pyx_float_1_4, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_14 = PyNumber_Multiply(__pyx_float_neg_0_4, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_14); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyFloat_SubtractCObj(__pyx_float_1_, __pyx_t_2, 1., 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_17 = ((PyArrayObject *)__pyx_t_1); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_err.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { + __pyx_v_err = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_err.rcbuffer->pybuffer.buf = NULL; + __PYX_ERR(0, 48, __pyx_L1_error) + } else {__pyx_pybuffernd_err.diminfo[0].strides = __pyx_pybuffernd_err.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_err.diminfo[0].shape = __pyx_pybuffernd_err.rcbuffer->pybuffer.shape[0]; + } + } + __pyx_t_17 = 0; + __pyx_v_err = ((PyArrayObject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "oh2004.pyx":49 + * cdef np.ndarray[double,ndim=1] ks = ((-1.)*3.125*np.log(1 - sigma_0_hv/(0.11 * mv0**0.7 * (np.cos(theta_rad))**2.2)))**0.556 + * cdef np.ndarray[double,ndim=1] err = (1. - (2.*theta_rad/np.pi)**(0.35*mv0**(-0.65)) * np.exp(-0.4 * ks**1.4))-p + * cdef np.ndarray[double,ndim=1] abs_err = np.abs(err); # <<<<<<<<<<<<<< + * cdef double min_err = np.nanmin(abs_err); #find the value of minimum error + * #print(np.where(abs_err == min_err)[0].shape) + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_abs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_2, ((PyObject *)__pyx_v_err)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_v_err)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_t_18 = ((PyArrayObject *)__pyx_t_1); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_abs_err.rcbuffer->pybuffer, (PyObject*)__pyx_t_18, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { + __pyx_v_abs_err = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_abs_err.rcbuffer->pybuffer.buf = NULL; + __PYX_ERR(0, 49, __pyx_L1_error) + } else {__pyx_pybuffernd_abs_err.diminfo[0].strides = __pyx_pybuffernd_abs_err.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_abs_err.diminfo[0].shape = __pyx_pybuffernd_abs_err.rcbuffer->pybuffer.shape[0]; + } + } + __pyx_t_18 = 0; + __pyx_v_abs_err = ((PyArrayObject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "oh2004.pyx":50 + * cdef np.ndarray[double,ndim=1] err = (1. - (2.*theta_rad/np.pi)**(0.35*mv0**(-0.65)) * np.exp(-0.4 * ks**1.4))-p + * cdef np.ndarray[double,ndim=1] abs_err = np.abs(err); + * cdef double min_err = np.nanmin(abs_err); #find the value of minimum error # <<<<<<<<<<<<<< + * #print(np.where(abs_err == min_err)[0].shape) + * if min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0 : + */ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_nanmin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, ((PyObject *)__pyx_v_abs_err)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_abs_err)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_min_err = __pyx_t_5; + + /* "oh2004.pyx":52 + * cdef double min_err = np.nanmin(abs_err); #find the value of minimum error + * #print(np.where(abs_err == min_err)[0].shape) + * if min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0 : # <<<<<<<<<<<<<< + * #print("***************min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0") + * return result + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_min_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nan); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_19) { + } else { + __pyx_t_10 = __pyx_t_19; + goto __pyx_L5_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_where); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_min_err); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_abs_err), __pyx_t_14, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_14, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_19 < 0)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = __pyx_t_19; + __pyx_L5_bool_binop_done:; + if (__pyx_t_10) { + + /* "oh2004.pyx":54 + * if min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0 : + * #print("***************min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0") + * return result # <<<<<<<<<<<<<< + * cdef double mv1 = mv0[np.where(abs_err == min_err)[0][0]] + * cdef double temp_ks1=1. - sigma_0_hv/(0.11 * mv1**0.7 * (np.cos(theta_rad))**2.2) + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyArrayObject *)__pyx_v_result); + goto __pyx_L0; + + /* "oh2004.pyx":52 + * cdef double min_err = np.nanmin(abs_err); #find the value of minimum error + * #print(np.where(abs_err == min_err)[0].shape) + * if min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0 : # <<<<<<<<<<<<<< + * #print("***************min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0") + * return result + */ + } + + /* "oh2004.pyx":55 + * #print("***************min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0") + * return result + * cdef double mv1 = mv0[np.where(abs_err == min_err)[0][0]] # <<<<<<<<<<<<<< + * cdef double temp_ks1=1. - sigma_0_hv/(0.11 * mv1**0.7 * (np.cos(theta_rad))**2.2) + * if temp_ks1<0: + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_where); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_min_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = PyObject_RichCompare(((PyObject *)__pyx_v_abs_err), __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_2, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_8, 0, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_mv0), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_mv1 = __pyx_t_5; + + /* "oh2004.pyx":56 + * return result + * cdef double mv1 = mv0[np.where(abs_err == min_err)[0][0]] + * cdef double temp_ks1=1. - sigma_0_hv/(0.11 * mv1**0.7 * (np.cos(theta_rad))**2.2) # <<<<<<<<<<<<<< + * if temp_ks1<0: + * #print("*********************temp_ks1<0") + */ + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_sigma_0_hv); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = PyFloat_FromDouble((0.11 * pow(__pyx_v_mv1, 0.7))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_cos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_theta_rad); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_14 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_14); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_9 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_14, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Power(__pyx_t_9, __pyx_float_2_2, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyNumber_Multiply(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyFloat_SubtractCObj(__pyx_float_1_, __pyx_t_3, 1., 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_temp_ks1 = __pyx_t_5; + + /* "oh2004.pyx":57 + * cdef double mv1 = mv0[np.where(abs_err == min_err)[0][0]] + * cdef double temp_ks1=1. - sigma_0_hv/(0.11 * mv1**0.7 * (np.cos(theta_rad))**2.2) + * if temp_ks1<0: # <<<<<<<<<<<<<< + * #print("*********************temp_ks1<0") + * return result + */ + __pyx_t_10 = ((__pyx_v_temp_ks1 < 0.0) != 0); + if (__pyx_t_10) { + + /* "oh2004.pyx":59 + * if temp_ks1<0: + * #print("*********************temp_ks1<0") + * return result # <<<<<<<<<<<<<< + * cdef double ks1 = ((-1)*3.125*np.log(temp_ks1))**0.556 + * cdef double s1 = ks1/k + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyArrayObject *)__pyx_v_result); + goto __pyx_L0; + + /* "oh2004.pyx":57 + * cdef double mv1 = mv0[np.where(abs_err == min_err)[0][0]] + * cdef double temp_ks1=1. - sigma_0_hv/(0.11 * mv1**0.7 * (np.cos(theta_rad))**2.2) + * if temp_ks1<0: # <<<<<<<<<<<<<< + * #print("*********************temp_ks1<0") + * return result + */ + } + + /* "oh2004.pyx":60 + * #print("*********************temp_ks1<0") + * return result + * cdef double ks1 = ((-1)*3.125*np.log(temp_ks1))**0.556 # <<<<<<<<<<<<<< + * cdef double s1 = ks1/k + * + */ + __pyx_t_9 = PyFloat_FromDouble((-1.0 * 3.125)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_temp_ks1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Multiply(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Power(__pyx_t_1, __pyx_float_0_556, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_ks1 = __pyx_t_5; + + /* "oh2004.pyx":61 + * return result + * cdef double ks1 = ((-1)*3.125*np.log(temp_ks1))**0.556 + * cdef double s1 = ks1/k # <<<<<<<<<<<<<< + * + * ## Second estimate s2 and mv2 + */ + if (unlikely(__pyx_v_k == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 61, __pyx_L1_error) + } + __pyx_v_s1 = (__pyx_v_ks1 / __pyx_v_k); + + /* "oh2004.pyx":64 + * + * ## Second estimate s2 and mv2 + * cdef double ks2 = (np.log(1-(q/(0.095 * (0.13 + np.sin(1.5*theta_rad))**1.4))) /(-1.3))**(10./9.) # <<<<<<<<<<<<<< + * cdef double s2 = ks2/k + * cdef double mv2 =0. + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sin); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyFloat_FromDouble((1.5 * __pyx_v_theta_rad)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_14); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_14, function); + } + } + __pyx_t_8 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_12, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyFloat_AddCObj(__pyx_float_0_13, __pyx_t_8, 0.13, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyNumber_Power(__pyx_t_14, __pyx_float_1_4, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = PyNumber_Multiply(__pyx_float_0_095, __pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_t_8, 1, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_8, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_14); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyFloat_DivideObjC(__pyx_t_3, __pyx_float_neg_1_3, -1.3, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyFloat_FromDouble((10. / 9.)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_14 = PyNumber_Power(__pyx_t_9, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_14); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_v_ks2 = __pyx_t_5; + + /* "oh2004.pyx":65 + * ## Second estimate s2 and mv2 + * cdef double ks2 = (np.log(1-(q/(0.095 * (0.13 + np.sin(1.5*theta_rad))**1.4))) /(-1.3))**(10./9.) + * cdef double s2 = ks2/k # <<<<<<<<<<<<<< + * cdef double mv2 =0. + * cdef double yy =0. + */ + if (unlikely(__pyx_v_k == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 65, __pyx_L1_error) + } + __pyx_v_s2 = (__pyx_v_ks2 / __pyx_v_k); + + /* "oh2004.pyx":66 + * cdef double ks2 = (np.log(1-(q/(0.095 * (0.13 + np.sin(1.5*theta_rad))**1.4))) /(-1.3))**(10./9.) + * cdef double s2 = ks2/k + * cdef double mv2 =0. # <<<<<<<<<<<<<< + * cdef double yy =0. + * cdef double xx = (1-p)/np.exp(-0.4 * ks2**1.4) + */ + __pyx_v_mv2 = 0.; + + /* "oh2004.pyx":67 + * cdef double s2 = ks2/k + * cdef double mv2 =0. + * cdef double yy =0. # <<<<<<<<<<<<<< + * cdef double xx = (1-p)/np.exp(-0.4 * ks2**1.4) + * if xx<=0: + */ + __pyx_v_yy = 0.; + + /* "oh2004.pyx":68 + * cdef double mv2 =0. + * cdef double yy =0. + * cdef double xx = (1-p)/np.exp(-0.4 * ks2**1.4) # <<<<<<<<<<<<<< + * if xx<=0: + * mv2 =0. + */ + __pyx_t_14 = PyFloat_FromDouble((1.0 - __pyx_v_p)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_exp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyFloat_FromDouble((-0.4 * pow(__pyx_v_ks2, 1.4))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_14, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_xx = __pyx_t_5; + + /* "oh2004.pyx":69 + * cdef double yy =0. + * cdef double xx = (1-p)/np.exp(-0.4 * ks2**1.4) + * if xx<=0: # <<<<<<<<<<<<<< + * mv2 =0. + * else: + */ + __pyx_t_10 = ((__pyx_v_xx <= 0.0) != 0); + if (__pyx_t_10) { + + /* "oh2004.pyx":70 + * cdef double xx = (1-p)/np.exp(-0.4 * ks2**1.4) + * if xx<=0: + * mv2 =0. # <<<<<<<<<<<<<< + * else: + * yy = np.log(xx)/(0.35*np.log(2*theta_rad/np.pi)) + */ + __pyx_v_mv2 = 0.; + + /* "oh2004.pyx":69 + * cdef double yy =0. + * cdef double xx = (1-p)/np.exp(-0.4 * ks2**1.4) + * if xx<=0: # <<<<<<<<<<<<<< + * mv2 =0. + * else: + */ + goto __pyx_L8; + } + + /* "oh2004.pyx":72 + * mv2 =0. + * else: + * yy = np.log(xx)/(0.35*np.log(2*theta_rad/np.pi)) # <<<<<<<<<<<<<< + * mv2=np.power(yy,-100.0/65) + * + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_xx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_14); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_14, function); + } + } + __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyFloat_FromDouble((2.0 * __pyx_v_theta_rad)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_pi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_14 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyNumber_Multiply(__pyx_float_0_35, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_14); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_v_yy = __pyx_t_5; + + /* "oh2004.pyx":73 + * else: + * yy = np.log(xx)/(0.35*np.log(2*theta_rad/np.pi)) + * mv2=np.power(yy,-100.0/65) # <<<<<<<<<<<<<< + * + * ## Third estimate mv3 + */ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_power); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyFloat_FromDouble(__pyx_v_yy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = PyFloat_FromDouble((-100.0 / 65.0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = NULL; + __pyx_t_7 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + __pyx_t_7 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_9, __pyx_t_1}; + __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_9, __pyx_t_1}; + __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else + #endif + { + __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_t_1); + __pyx_t_9 = 0; + __pyx_t_1 = 0; + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_14); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_v_mv2 = __pyx_t_5; + } + __pyx_L8:; + + /* "oh2004.pyx":76 + * + * ## Third estimate mv3 + * cdef double mv3 = ((sigma_0_hv/(1 - np.exp(-0.32 * ks2**1.8)))/(0.11 * np.cos(theta_rad)**2.2))**(1/0.7) # <<<<<<<<<<<<<< + * ## weighted average s and mv------------------------------------- + * #print("q:\t",q) + */ + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_sigma_0_hv); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_exp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyFloat_FromDouble((-0.32 * pow(__pyx_v_ks2, 1.8))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_SubtractCObj(__pyx_int_1, __pyx_t_8, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_14, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_cos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = PyFloat_FromDouble(__pyx_v_theta_rad); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_14); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Power(__pyx_t_1, __pyx_float_2_2, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Multiply(__pyx_float_0_11, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyFloat_FromDouble((1.0 / 0.7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = PyNumber_Power(__pyx_t_3, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_mv3 = __pyx_t_5; + + /* "oh2004.pyx":84 + * #print("theta_rad:\t",theta_rad) + * + * cdef double sf = (s1 + 0.25*s2)/(1+0.25) # <<<<<<<<<<<<<< + * cdef double mvf = (mv1+mv2+mv3)/3 + * + */ + __pyx_v_sf = ((__pyx_v_s1 + (0.25 * __pyx_v_s2)) / (1.0 + 0.25)); + + /* "oh2004.pyx":85 + * + * cdef double sf = (s1 + 0.25*s2)/(1+0.25) + * cdef double mvf = (mv1+mv2+mv3)/3 # <<<<<<<<<<<<<< + * + * result[0]=mvf*1.0 + */ + __pyx_v_mvf = (((__pyx_v_mv1 + __pyx_v_mv2) + __pyx_v_mv3) / 3.0); + + /* "oh2004.pyx":87 + * cdef double mvf = (mv1+mv2+mv3)/3 + * + * result[0]=mvf*1.0 # <<<<<<<<<<<<<< + * result[1]=sf*1.0 + * #print("mv1:\t",mv1) + */ + __pyx_t_6 = 0; + __pyx_t_7 = -1; + if (__pyx_t_6 < 0) { + __pyx_t_6 += __pyx_pybuffernd_result.diminfo[0].shape; + if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; + } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; + if (unlikely(__pyx_t_7 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_7); + __PYX_ERR(0, 87, __pyx_L1_error) + } + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_result.diminfo[0].strides) = (__pyx_v_mvf * 1.0); + + /* "oh2004.pyx":88 + * + * result[0]=mvf*1.0 + * result[1]=sf*1.0 # <<<<<<<<<<<<<< + * #print("mv1:\t",mv1) + * #print("mv2:\t",mv2) + */ + __pyx_t_6 = 1; + __pyx_t_7 = -1; + if (__pyx_t_6 < 0) { + __pyx_t_6 += __pyx_pybuffernd_result.diminfo[0].shape; + if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0; + } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0; + if (unlikely(__pyx_t_7 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_7); + __PYX_ERR(0, 88, __pyx_L1_error) + } + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_result.diminfo[0].strides) = (__pyx_v_sf * 1.0); + + /* "oh2004.pyx":97 + * #print("Estimated rms height s (m): ",result[1]) + * #print("\nend\n") + * return result # <<<<<<<<<<<<<< + * + * cpdef double lamda2freq(double lamda): + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_result)); + __pyx_r = ((PyArrayObject *)__pyx_v_result); + goto __pyx_L0; + + /* "oh2004.pyx":16 + * from scipy.optimize import fmin + * + * cpdef np.ndarray[double,ndim=1] inverse_oh2004(double sigma0vvdB,double sigma0hhdB,double sigma0hvdB,double theta,double f): # <<<<<<<<<<<<<< + * """ + * sigma0vvdB = -14.1 dB + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_abs_err.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_err.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ks.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mv0.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("oh2004.inverse_oh2004", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_abs_err.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_err.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ks.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mv0.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XDECREF((PyObject *)__pyx_v_mv0); + __Pyx_XDECREF((PyObject *)__pyx_v_ks); + __Pyx_XDECREF((PyObject *)__pyx_v_err); + __Pyx_XDECREF((PyObject *)__pyx_v_abs_err); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_6oh2004_1inverse_oh2004(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6oh2004_inverse_oh2004[] = "\n sigma0vvdB = -14.1 dB\n sigma0hhdB = -16.0\n sigma0hvdB = -26.5\n theta = 35. \350\247\222\345\272\246\345\200\274 ##Incidence angle\n f = 5.0 ##GHz\n "; +static PyObject *__pyx_pw_6oh2004_1inverse_oh2004(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_sigma0vvdB; + double __pyx_v_sigma0hhdB; + double __pyx_v_sigma0hvdB; + double __pyx_v_theta; + double __pyx_v_f; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("inverse_oh2004 (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sigma0vvdB,&__pyx_n_s_sigma0hhdB,&__pyx_n_s_sigma0hvdB,&__pyx_n_s_theta,&__pyx_n_s_f,0}; + PyObject* values[5] = {0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma0vvdB)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma0hhdB)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("inverse_oh2004", 1, 5, 5, 1); __PYX_ERR(0, 16, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma0hvdB)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("inverse_oh2004", 1, 5, 5, 2); __PYX_ERR(0, 16, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("inverse_oh2004", 1, 5, 5, 3); __PYX_ERR(0, 16, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("inverse_oh2004", 1, 5, 5, 4); __PYX_ERR(0, 16, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inverse_oh2004") < 0)) __PYX_ERR(0, 16, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + } + __pyx_v_sigma0vvdB = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_sigma0vvdB == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 16, __pyx_L3_error) + __pyx_v_sigma0hhdB = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_sigma0hhdB == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 16, __pyx_L3_error) + __pyx_v_sigma0hvdB = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_sigma0hvdB == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 16, __pyx_L3_error) + __pyx_v_theta = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 16, __pyx_L3_error) + __pyx_v_f = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_f == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 16, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("inverse_oh2004", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 16, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("oh2004.inverse_oh2004", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oh2004_inverse_oh2004(__pyx_self, __pyx_v_sigma0vvdB, __pyx_v_sigma0hhdB, __pyx_v_sigma0hvdB, __pyx_v_theta, __pyx_v_f); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oh2004_inverse_oh2004(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_sigma0vvdB, double __pyx_v_sigma0hhdB, double __pyx_v_sigma0hvdB, double __pyx_v_theta, double __pyx_v_f) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("inverse_oh2004", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_6oh2004_inverse_oh2004(__pyx_v_sigma0vvdB, __pyx_v_sigma0hhdB, __pyx_v_sigma0hvdB, __pyx_v_theta, __pyx_v_f, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("oh2004.inverse_oh2004", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "oh2004.pyx":99 + * return result + * + * cpdef double lamda2freq(double lamda): # <<<<<<<<<<<<<< + * return 299792458.0/lamda + * + */ + +static PyObject *__pyx_pw_6oh2004_3lamda2freq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static double __pyx_f_6oh2004_lamda2freq(double __pyx_v_lamda, CYTHON_UNUSED int __pyx_skip_dispatch) { + double __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lamda2freq", 0); + + /* "oh2004.pyx":100 + * + * cpdef double lamda2freq(double lamda): + * return 299792458.0/lamda # <<<<<<<<<<<<<< + * + * cpdef double freq2lamda(double freq): + */ + if (unlikely(__pyx_v_lamda == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 100, __pyx_L1_error) + } + __pyx_r = (299792458.0 / __pyx_v_lamda); + goto __pyx_L0; + + /* "oh2004.pyx":99 + * return result + * + * cpdef double lamda2freq(double lamda): # <<<<<<<<<<<<<< + * return 299792458.0/lamda + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_WriteUnraisable("oh2004.lamda2freq", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_6oh2004_3lamda2freq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6oh2004_3lamda2freq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_lamda; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lamda2freq (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lamda,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lamda)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lamda2freq") < 0)) __PYX_ERR(0, 99, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_lamda = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_lamda == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 99, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lamda2freq", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 99, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("oh2004.lamda2freq", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oh2004_2lamda2freq(__pyx_self, __pyx_v_lamda); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oh2004_2lamda2freq(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_lamda) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lamda2freq", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6oh2004_lamda2freq(__pyx_v_lamda, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("oh2004.lamda2freq", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "oh2004.pyx":102 + * return 299792458.0/lamda + * + * cpdef double freq2lamda(double freq): # <<<<<<<<<<<<<< + * return 299792458.0/freq + * + */ + +static PyObject *__pyx_pw_6oh2004_5freq2lamda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static double __pyx_f_6oh2004_freq2lamda(double __pyx_v_freq, CYTHON_UNUSED int __pyx_skip_dispatch) { + double __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("freq2lamda", 0); + + /* "oh2004.pyx":103 + * + * cpdef double freq2lamda(double freq): + * return 299792458.0/freq # <<<<<<<<<<<<<< + * + * # double sigma0vvdB,double sigma0hhdB,double sigma0hvdB,double theta,double f + */ + if (unlikely(__pyx_v_freq == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 103, __pyx_L1_error) + } + __pyx_r = (299792458.0 / __pyx_v_freq); + goto __pyx_L0; + + /* "oh2004.pyx":102 + * return 299792458.0/lamda + * + * cpdef double freq2lamda(double freq): # <<<<<<<<<<<<<< + * return 299792458.0/freq + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_WriteUnraisable("oh2004.freq2lamda", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_6oh2004_5freq2lamda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6oh2004_5freq2lamda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + double __pyx_v_freq; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("freq2lamda (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_freq,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_freq)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "freq2lamda") < 0)) __PYX_ERR(0, 102, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_freq = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_freq == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 102, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("freq2lamda", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 102, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("oh2004.freq2lamda", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6oh2004_4freq2lamda(__pyx_self, __pyx_v_freq); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oh2004_4freq2lamda(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_freq) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("freq2lamda", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_f_6oh2004_freq2lamda(__pyx_v_freq, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("oh2004.freq2lamda", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "oh2004.pyx":106 + * + * # double sigma0vvdB,double sigma0hhdB,double sigma0hvdB,double theta,double f + * cpdef int retrieve_oh2004_main(int n,np.ndarray[double,ndim=1] mv,np.ndarray[double,ndim=1] h,np.ndarray[int,ndim=1] mask,np.ndarray[double,ndim=1] sigma0vvdB,np.ndarray[double,ndim=1] sigma0hhdB,np.ndarray[double,ndim=1] sigma0hvdB, np.ndarray[double,ndim=1] vh, np.ndarray[double,ndim=1] theta,double f): # <<<<<<<<<<<<<< + * cdef int i=0; + * cdef np.ndarray[double,ndim=1] result; + */ + +static PyObject *__pyx_pw_6oh2004_7retrieve_oh2004_main(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_f_6oh2004_retrieve_oh2004_main(int __pyx_v_n, PyArrayObject *__pyx_v_mv, PyArrayObject *__pyx_v_h, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_sigma0vvdB, PyArrayObject *__pyx_v_sigma0hhdB, PyArrayObject *__pyx_v_sigma0hvdB, CYTHON_UNUSED PyArrayObject *__pyx_v_vh, PyArrayObject *__pyx_v_theta, double __pyx_v_f, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_i; + PyArrayObject *__pyx_v_result = 0; + __Pyx_LocalBuf_ND __pyx_pybuffernd_h; + __Pyx_Buffer __pyx_pybuffer_h; + __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; + __Pyx_Buffer __pyx_pybuffer_mask; + __Pyx_LocalBuf_ND __pyx_pybuffernd_mv; + __Pyx_Buffer __pyx_pybuffer_mv; + __Pyx_LocalBuf_ND __pyx_pybuffernd_result; + __Pyx_Buffer __pyx_pybuffer_result; + __Pyx_LocalBuf_ND __pyx_pybuffernd_sigma0hhdB; + __Pyx_Buffer __pyx_pybuffer_sigma0hhdB; + __Pyx_LocalBuf_ND __pyx_pybuffernd_sigma0hvdB; + __Pyx_Buffer __pyx_pybuffer_sigma0hvdB; + __Pyx_LocalBuf_ND __pyx_pybuffernd_sigma0vvdB; + __Pyx_Buffer __pyx_pybuffer_sigma0vvdB; + __Pyx_LocalBuf_ND __pyx_pybuffernd_theta; + __Pyx_Buffer __pyx_pybuffer_theta; + __Pyx_LocalBuf_ND __pyx_pybuffernd_vh; + __Pyx_Buffer __pyx_pybuffer_vh; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + double __pyx_t_6; + Py_ssize_t __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("retrieve_oh2004_main", 0); + __pyx_pybuffer_result.pybuffer.buf = NULL; + __pyx_pybuffer_result.refcount = 0; + __pyx_pybuffernd_result.data = NULL; + __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; + __pyx_pybuffer_mv.pybuffer.buf = NULL; + __pyx_pybuffer_mv.refcount = 0; + __pyx_pybuffernd_mv.data = NULL; + __pyx_pybuffernd_mv.rcbuffer = &__pyx_pybuffer_mv; + __pyx_pybuffer_h.pybuffer.buf = NULL; + __pyx_pybuffer_h.refcount = 0; + __pyx_pybuffernd_h.data = NULL; + __pyx_pybuffernd_h.rcbuffer = &__pyx_pybuffer_h; + __pyx_pybuffer_mask.pybuffer.buf = NULL; + __pyx_pybuffer_mask.refcount = 0; + __pyx_pybuffernd_mask.data = NULL; + __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; + __pyx_pybuffer_sigma0vvdB.pybuffer.buf = NULL; + __pyx_pybuffer_sigma0vvdB.refcount = 0; + __pyx_pybuffernd_sigma0vvdB.data = NULL; + __pyx_pybuffernd_sigma0vvdB.rcbuffer = &__pyx_pybuffer_sigma0vvdB; + __pyx_pybuffer_sigma0hhdB.pybuffer.buf = NULL; + __pyx_pybuffer_sigma0hhdB.refcount = 0; + __pyx_pybuffernd_sigma0hhdB.data = NULL; + __pyx_pybuffernd_sigma0hhdB.rcbuffer = &__pyx_pybuffer_sigma0hhdB; + __pyx_pybuffer_sigma0hvdB.pybuffer.buf = NULL; + __pyx_pybuffer_sigma0hvdB.refcount = 0; + __pyx_pybuffernd_sigma0hvdB.data = NULL; + __pyx_pybuffernd_sigma0hvdB.rcbuffer = &__pyx_pybuffer_sigma0hvdB; + __pyx_pybuffer_vh.pybuffer.buf = NULL; + __pyx_pybuffer_vh.refcount = 0; + __pyx_pybuffernd_vh.data = NULL; + __pyx_pybuffernd_vh.rcbuffer = &__pyx_pybuffer_vh; + __pyx_pybuffer_theta.pybuffer.buf = NULL; + __pyx_pybuffer_theta.refcount = 0; + __pyx_pybuffernd_theta.data = NULL; + __pyx_pybuffernd_theta.rcbuffer = &__pyx_pybuffer_theta; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mv.rcbuffer->pybuffer, (PyObject*)__pyx_v_mv, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_mv.diminfo[0].strides = __pyx_pybuffernd_mv.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mv.diminfo[0].shape = __pyx_pybuffernd_mv.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_h.rcbuffer->pybuffer, (PyObject*)__pyx_v_h, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_h.diminfo[0].strides = __pyx_pybuffernd_h.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_h.diminfo[0].shape = __pyx_pybuffernd_h.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_int, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer, (PyObject*)__pyx_v_sigma0vvdB, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_sigma0vvdB.diminfo[0].strides = __pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sigma0vvdB.diminfo[0].shape = __pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer, (PyObject*)__pyx_v_sigma0hhdB, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_sigma0hhdB.diminfo[0].strides = __pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sigma0hhdB.diminfo[0].shape = __pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer, (PyObject*)__pyx_v_sigma0hvdB, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_sigma0hvdB.diminfo[0].strides = __pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sigma0hvdB.diminfo[0].shape = __pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vh.rcbuffer->pybuffer, (PyObject*)__pyx_v_vh, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_vh.diminfo[0].strides = __pyx_pybuffernd_vh.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vh.diminfo[0].shape = __pyx_pybuffernd_vh.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_theta.rcbuffer->pybuffer, (PyObject*)__pyx_v_theta, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_theta.diminfo[0].strides = __pyx_pybuffernd_theta.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_theta.diminfo[0].shape = __pyx_pybuffernd_theta.rcbuffer->pybuffer.shape[0]; + + /* "oh2004.pyx":107 + * # double sigma0vvdB,double sigma0hhdB,double sigma0hvdB,double theta,double f + * cpdef int retrieve_oh2004_main(int n,np.ndarray[double,ndim=1] mv,np.ndarray[double,ndim=1] h,np.ndarray[int,ndim=1] mask,np.ndarray[double,ndim=1] sigma0vvdB,np.ndarray[double,ndim=1] sigma0hhdB,np.ndarray[double,ndim=1] sigma0hvdB, np.ndarray[double,ndim=1] vh, np.ndarray[double,ndim=1] theta,double f): + * cdef int i=0; # <<<<<<<<<<<<<< + * cdef np.ndarray[double,ndim=1] result; + * while i= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 110, __pyx_L1_error) + } + __pyx_t_1 = (((*__Pyx_BufPtrStrided1d(int *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_mask.diminfo[0].strides)) < 0.5) != 0); + if (__pyx_t_1) { + + /* "oh2004.pyx":111 + * while i= __pyx_pybuffernd_mv.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 111, __pyx_L1_error) + } + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_mv.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_mv.diminfo[0].strides) = __pyx_t_6; + + /* "oh2004.pyx":112 + * if mask[i]<0.5: + * mv[i]=np.nan + * h[i] =np.nan # <<<<<<<<<<<<<< + * else: + * #print(i) + */ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __pyx_v_i; + __pyx_t_3 = -1; + if (__pyx_t_2 < 0) { + __pyx_t_2 += __pyx_pybuffernd_h.diminfo[0].shape; + if (unlikely(__pyx_t_2 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_h.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 112, __pyx_L1_error) + } + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_h.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_h.diminfo[0].strides) = __pyx_t_6; + + /* "oh2004.pyx":110 + * cdef np.ndarray[double,ndim=1] result; + * while i= __pyx_pybuffernd_sigma0vvdB.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 116, __pyx_L1_error) + } + __pyx_t_7 = __pyx_v_i; + __pyx_t_3 = -1; + if (__pyx_t_7 < 0) { + __pyx_t_7 += __pyx_pybuffernd_sigma0hhdB.diminfo[0].shape; + if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_sigma0hhdB.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 116, __pyx_L1_error) + } + __pyx_t_8 = __pyx_v_i; + __pyx_t_3 = -1; + if (__pyx_t_8 < 0) { + __pyx_t_8 += __pyx_pybuffernd_sigma0hvdB.diminfo[0].shape; + if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_sigma0hvdB.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 116, __pyx_L1_error) + } + __pyx_t_9 = __pyx_v_i; + __pyx_t_3 = -1; + if (__pyx_t_9 < 0) { + __pyx_t_9 += __pyx_pybuffernd_theta.diminfo[0].shape; + if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_theta.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 116, __pyx_L1_error) + } + __pyx_t_4 = ((PyObject *)__pyx_f_6oh2004_inverse_oh2004((*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_sigma0vvdB.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_sigma0hhdB.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_sigma0hvdB.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_theta.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_theta.diminfo[0].strides)), __pyx_v_f, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); + __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_4), &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); + if (unlikely(__pyx_t_3 < 0)) { + PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { + Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); + __Pyx_RaiseBufferFallbackError(); + } else { + PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12); + } + __pyx_t_10 = __pyx_t_11 = __pyx_t_12 = 0; + } + __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; + if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 116, __pyx_L1_error) + } + __Pyx_XDECREF_SET(__pyx_v_result, ((PyArrayObject *)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "oh2004.pyx":118 + * result= inverse_oh2004(sigma0vvdB[i], sigma0hhdB[i],sigma0hvdB[i], theta[i], f) + * ##print(result) + * mv[i]=result[0] # <<<<<<<<<<<<<< + * h[i] =result[1] + * ##print(mv[i],h[i]) + */ + __pyx_t_9 = 0; + __pyx_t_3 = -1; + if (__pyx_t_9 < 0) { + __pyx_t_9 += __pyx_pybuffernd_result.diminfo[0].shape; + if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 118, __pyx_L1_error) + } + __pyx_t_8 = __pyx_v_i; + __pyx_t_3 = -1; + if (__pyx_t_8 < 0) { + __pyx_t_8 += __pyx_pybuffernd_mv.diminfo[0].shape; + if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_mv.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 118, __pyx_L1_error) + } + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_mv.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mv.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_result.diminfo[0].strides)); + + /* "oh2004.pyx":119 + * ##print(result) + * mv[i]=result[0] + * h[i] =result[1] # <<<<<<<<<<<<<< + * ##print(mv[i],h[i]) + * ##print(result[0],result[1]) + */ + __pyx_t_9 = 1; + __pyx_t_3 = -1; + if (__pyx_t_9 < 0) { + __pyx_t_9 += __pyx_pybuffernd_result.diminfo[0].shape; + if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 119, __pyx_L1_error) + } + __pyx_t_8 = __pyx_v_i; + __pyx_t_3 = -1; + if (__pyx_t_8 < 0) { + __pyx_t_8 += __pyx_pybuffernd_h.diminfo[0].shape; + if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_h.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 119, __pyx_L1_error) + } + *__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_h.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_h.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_result.diminfo[0].strides)); + } + __pyx_L5:; + + /* "oh2004.pyx":122 + * ##print(mv[i],h[i]) + * ##print(result[0],result[1]) + * i=i+1 # <<<<<<<<<<<<<< + * return 1 + * + */ + __pyx_v_i = (__pyx_v_i + 1); + } + + /* "oh2004.pyx":123 + * ##print(result[0],result[1]) + * i=i+1 + * return 1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "oh2004.pyx":106 + * + * # double sigma0vvdB,double sigma0hhdB,double sigma0hvdB,double theta,double f + * cpdef int retrieve_oh2004_main(int n,np.ndarray[double,ndim=1] mv,np.ndarray[double,ndim=1] h,np.ndarray[int,ndim=1] mask,np.ndarray[double,ndim=1] sigma0vvdB,np.ndarray[double,ndim=1] sigma0hhdB,np.ndarray[double,ndim=1] sigma0hvdB, np.ndarray[double,ndim=1] vh, np.ndarray[double,ndim=1] theta,double f): # <<<<<<<<<<<<<< + * cdef int i=0; + * cdef np.ndarray[double,ndim=1] result; + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_h.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mv.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_theta.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_WriteUnraisable("oh2004.retrieve_oh2004_main", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_h.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mv.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_theta.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_6oh2004_7retrieve_oh2004_main(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6oh2004_7retrieve_oh2004_main(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_n; + PyArrayObject *__pyx_v_mv = 0; + PyArrayObject *__pyx_v_h = 0; + PyArrayObject *__pyx_v_mask = 0; + PyArrayObject *__pyx_v_sigma0vvdB = 0; + PyArrayObject *__pyx_v_sigma0hhdB = 0; + PyArrayObject *__pyx_v_sigma0hvdB = 0; + PyArrayObject *__pyx_v_vh = 0; + PyArrayObject *__pyx_v_theta = 0; + double __pyx_v_f; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("retrieve_oh2004_main (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_mv,&__pyx_n_s_h,&__pyx_n_s_mask,&__pyx_n_s_sigma0vvdB,&__pyx_n_s_sigma0hhdB,&__pyx_n_s_sigma0hvdB,&__pyx_n_s_vh,&__pyx_n_s_theta,&__pyx_n_s_f,0}; + PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9); + CYTHON_FALLTHROUGH; + case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8); + CYTHON_FALLTHROUGH; + case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7); + CYTHON_FALLTHROUGH; + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mv)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, 1); __PYX_ERR(0, 106, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, 2); __PYX_ERR(0, 106, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, 3); __PYX_ERR(0, 106, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 4: + if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma0vvdB)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, 4); __PYX_ERR(0, 106, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 5: + if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma0hhdB)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, 5); __PYX_ERR(0, 106, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 6: + if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sigma0hvdB)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, 6); __PYX_ERR(0, 106, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 7: + if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vh)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, 7); __PYX_ERR(0, 106, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 8: + if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, 8); __PYX_ERR(0, 106, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 9: + if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, 9); __PYX_ERR(0, 106, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "retrieve_oh2004_main") < 0)) __PYX_ERR(0, 106, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 10) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + values[7] = PyTuple_GET_ITEM(__pyx_args, 7); + values[8] = PyTuple_GET_ITEM(__pyx_args, 8); + values[9] = PyTuple_GET_ITEM(__pyx_args, 9); + } + __pyx_v_n = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L3_error) + __pyx_v_mv = ((PyArrayObject *)values[1]); + __pyx_v_h = ((PyArrayObject *)values[2]); + __pyx_v_mask = ((PyArrayObject *)values[3]); + __pyx_v_sigma0vvdB = ((PyArrayObject *)values[4]); + __pyx_v_sigma0hhdB = ((PyArrayObject *)values[5]); + __pyx_v_sigma0hvdB = ((PyArrayObject *)values[6]); + __pyx_v_vh = ((PyArrayObject *)values[7]); + __pyx_v_theta = ((PyArrayObject *)values[8]); + __pyx_v_f = __pyx_PyFloat_AsDouble(values[9]); if (unlikely((__pyx_v_f == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 106, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("retrieve_oh2004_main", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 106, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("oh2004.retrieve_oh2004_main", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mv), __pyx_ptype_5numpy_ndarray, 1, "mv", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_h), __pyx_ptype_5numpy_ndarray, 1, "h", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sigma0vvdB), __pyx_ptype_5numpy_ndarray, 1, "sigma0vvdB", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sigma0hhdB), __pyx_ptype_5numpy_ndarray, 1, "sigma0hhdB", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sigma0hvdB), __pyx_ptype_5numpy_ndarray, 1, "sigma0hvdB", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vh), __pyx_ptype_5numpy_ndarray, 1, "vh", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_theta), __pyx_ptype_5numpy_ndarray, 1, "theta", 0))) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_r = __pyx_pf_6oh2004_6retrieve_oh2004_main(__pyx_self, __pyx_v_n, __pyx_v_mv, __pyx_v_h, __pyx_v_mask, __pyx_v_sigma0vvdB, __pyx_v_sigma0hhdB, __pyx_v_sigma0hvdB, __pyx_v_vh, __pyx_v_theta, __pyx_v_f); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6oh2004_6retrieve_oh2004_main(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_n, PyArrayObject *__pyx_v_mv, PyArrayObject *__pyx_v_h, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_sigma0vvdB, PyArrayObject *__pyx_v_sigma0hhdB, PyArrayObject *__pyx_v_sigma0hvdB, PyArrayObject *__pyx_v_vh, PyArrayObject *__pyx_v_theta, double __pyx_v_f) { + __Pyx_LocalBuf_ND __pyx_pybuffernd_h; + __Pyx_Buffer __pyx_pybuffer_h; + __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; + __Pyx_Buffer __pyx_pybuffer_mask; + __Pyx_LocalBuf_ND __pyx_pybuffernd_mv; + __Pyx_Buffer __pyx_pybuffer_mv; + __Pyx_LocalBuf_ND __pyx_pybuffernd_sigma0hhdB; + __Pyx_Buffer __pyx_pybuffer_sigma0hhdB; + __Pyx_LocalBuf_ND __pyx_pybuffernd_sigma0hvdB; + __Pyx_Buffer __pyx_pybuffer_sigma0hvdB; + __Pyx_LocalBuf_ND __pyx_pybuffernd_sigma0vvdB; + __Pyx_Buffer __pyx_pybuffer_sigma0vvdB; + __Pyx_LocalBuf_ND __pyx_pybuffernd_theta; + __Pyx_Buffer __pyx_pybuffer_theta; + __Pyx_LocalBuf_ND __pyx_pybuffernd_vh; + __Pyx_Buffer __pyx_pybuffer_vh; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("retrieve_oh2004_main", 0); + __pyx_pybuffer_mv.pybuffer.buf = NULL; + __pyx_pybuffer_mv.refcount = 0; + __pyx_pybuffernd_mv.data = NULL; + __pyx_pybuffernd_mv.rcbuffer = &__pyx_pybuffer_mv; + __pyx_pybuffer_h.pybuffer.buf = NULL; + __pyx_pybuffer_h.refcount = 0; + __pyx_pybuffernd_h.data = NULL; + __pyx_pybuffernd_h.rcbuffer = &__pyx_pybuffer_h; + __pyx_pybuffer_mask.pybuffer.buf = NULL; + __pyx_pybuffer_mask.refcount = 0; + __pyx_pybuffernd_mask.data = NULL; + __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; + __pyx_pybuffer_sigma0vvdB.pybuffer.buf = NULL; + __pyx_pybuffer_sigma0vvdB.refcount = 0; + __pyx_pybuffernd_sigma0vvdB.data = NULL; + __pyx_pybuffernd_sigma0vvdB.rcbuffer = &__pyx_pybuffer_sigma0vvdB; + __pyx_pybuffer_sigma0hhdB.pybuffer.buf = NULL; + __pyx_pybuffer_sigma0hhdB.refcount = 0; + __pyx_pybuffernd_sigma0hhdB.data = NULL; + __pyx_pybuffernd_sigma0hhdB.rcbuffer = &__pyx_pybuffer_sigma0hhdB; + __pyx_pybuffer_sigma0hvdB.pybuffer.buf = NULL; + __pyx_pybuffer_sigma0hvdB.refcount = 0; + __pyx_pybuffernd_sigma0hvdB.data = NULL; + __pyx_pybuffernd_sigma0hvdB.rcbuffer = &__pyx_pybuffer_sigma0hvdB; + __pyx_pybuffer_vh.pybuffer.buf = NULL; + __pyx_pybuffer_vh.refcount = 0; + __pyx_pybuffernd_vh.data = NULL; + __pyx_pybuffernd_vh.rcbuffer = &__pyx_pybuffer_vh; + __pyx_pybuffer_theta.pybuffer.buf = NULL; + __pyx_pybuffer_theta.refcount = 0; + __pyx_pybuffernd_theta.data = NULL; + __pyx_pybuffernd_theta.rcbuffer = &__pyx_pybuffer_theta; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mv.rcbuffer->pybuffer, (PyObject*)__pyx_v_mv, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_mv.diminfo[0].strides = __pyx_pybuffernd_mv.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mv.diminfo[0].shape = __pyx_pybuffernd_mv.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_h.rcbuffer->pybuffer, (PyObject*)__pyx_v_h, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_h.diminfo[0].strides = __pyx_pybuffernd_h.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_h.diminfo[0].shape = __pyx_pybuffernd_h.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_int, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer, (PyObject*)__pyx_v_sigma0vvdB, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_sigma0vvdB.diminfo[0].strides = __pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sigma0vvdB.diminfo[0].shape = __pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer, (PyObject*)__pyx_v_sigma0hhdB, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_sigma0hhdB.diminfo[0].strides = __pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sigma0hhdB.diminfo[0].shape = __pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer, (PyObject*)__pyx_v_sigma0hvdB, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_sigma0hvdB.diminfo[0].strides = __pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sigma0hvdB.diminfo[0].shape = __pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vh.rcbuffer->pybuffer, (PyObject*)__pyx_v_vh, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_vh.diminfo[0].strides = __pyx_pybuffernd_vh.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vh.diminfo[0].shape = __pyx_pybuffernd_vh.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_theta.rcbuffer->pybuffer, (PyObject*)__pyx_v_theta, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 106, __pyx_L1_error) + } + __pyx_pybuffernd_theta.diminfo[0].strides = __pyx_pybuffernd_theta.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_theta.diminfo[0].shape = __pyx_pybuffernd_theta.rcbuffer->pybuffer.shape[0]; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_6oh2004_retrieve_oh2004_main(__pyx_v_n, __pyx_v_mv, __pyx_v_h, __pyx_v_mask, __pyx_v_sigma0vvdB, __pyx_v_sigma0hhdB, __pyx_v_sigma0hvdB, __pyx_v_vh, __pyx_v_theta, __pyx_v_f, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_h.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mv.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_theta.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vh.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("oh2004.retrieve_oh2004_main", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_h.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mv.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0hhdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0hvdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sigma0vvdB.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_theta.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vh.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":736 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":739 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":742 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":745 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":748 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); + if (__pyx_t_1) { + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":752 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< + * else: + * return () + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); + __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + } + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":754 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< + * + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_r = __pyx_empty_tuple; + goto __pyx_L0; + } + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_array_base", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":932 + * + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) + * + */ + Py_INCREF(__pyx_v_base); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":933 + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":936 + * + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: + * return None + */ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":938 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< + * return base + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + } + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":939 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< + * + * # Versions of the import_* functions which are more suitable for + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_array", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":945 + * cdef inline int import_array() except -1: + * try: + * __pyx_import_array() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") + */ + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 945, __pyx_L3_error) + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":946 + * try: + * __pyx_import_array() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.multiarray failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 946, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":947 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 947, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 947, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_umath", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":951 + * cdef inline int import_umath() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 951, __pyx_L3_error) + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":952 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 952, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":953 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 953, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 953, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_ufunc", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":957 + * cdef inline int import_ufunc() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 957, __pyx_L3_error) + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":958 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 958, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":959 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef extern from *: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 959, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 959, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":969 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` + */ + +static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_timedelta64_object", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":981 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":969 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":984 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` + */ + +static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_datetime64_object", 0); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":996 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":984 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":999 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object + */ + +static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { + npy_datetime __pyx_r; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1006 + * also needed. That can be found using `get_datetime64_unit`. + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":999 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1009 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object + */ + +static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { + npy_timedelta __pyx_r; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1013 + * returns the int64 value underlying scalar numpy timedelta64 object + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1009 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + +static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { + NPY_DATETIMEUNIT __pyx_r; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1020 + * returns the unit part of the dtype for a numpy datetime64 object. + * """ + * return (obj).obmeta.base # <<<<<<<<<<<<<< + */ + __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); + goto __pyx_L0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +static PyMethodDef __pyx_methods[] = { + {"inverse_oh2004", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6oh2004_1inverse_oh2004, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6oh2004_inverse_oh2004}, + {"lamda2freq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6oh2004_3lamda2freq, METH_VARARGS|METH_KEYWORDS, 0}, + {"freq2lamda", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6oh2004_5freq2lamda, METH_VARARGS|METH_KEYWORDS, 0}, + {"retrieve_oh2004_main", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6oh2004_7retrieve_oh2004_main, METH_VARARGS|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_oh2004(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_oh2004}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "oh2004", + __pyx_k_Created_on_Tue_Jun_4_14_59_54_2, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, + {&__pyx_n_s_abs, __pyx_k_abs, sizeof(__pyx_k_abs), 0, 0, 1, 1}, + {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1}, + {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1}, + {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, + {&__pyx_n_s_fmin, __pyx_k_fmin, sizeof(__pyx_k_fmin), 0, 0, 1, 1}, + {&__pyx_n_s_freq, __pyx_k_freq, sizeof(__pyx_k_freq), 0, 0, 1, 1}, + {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_lamda, __pyx_k_lamda, sizeof(__pyx_k_lamda), 0, 0, 1, 1}, + {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, + {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, + {&__pyx_n_s_mv, __pyx_k_mv, sizeof(__pyx_k_mv), 0, 0, 1, 1}, + {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 1, 1}, + {&__pyx_n_s_nanmin, __pyx_k_nanmin, sizeof(__pyx_k_nanmin), 0, 0, 1, 1}, + {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, + {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, + {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, + {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, + {&__pyx_n_s_ones, __pyx_k_ones, sizeof(__pyx_k_ones), 0, 0, 1, 1}, + {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1}, + {&__pyx_n_s_power, __pyx_k_power, sizeof(__pyx_k_power), 0, 0, 1, 1}, + {&__pyx_n_s_scipy_optimize, __pyx_k_scipy_optimize, sizeof(__pyx_k_scipy_optimize), 0, 0, 1, 1}, + {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, + {&__pyx_n_s_sigma0hhdB, __pyx_k_sigma0hhdB, sizeof(__pyx_k_sigma0hhdB), 0, 0, 1, 1}, + {&__pyx_n_s_sigma0hvdB, __pyx_k_sigma0hvdB, sizeof(__pyx_k_sigma0hvdB), 0, 0, 1, 1}, + {&__pyx_n_s_sigma0vvdB, __pyx_k_sigma0vvdB, sizeof(__pyx_k_sigma0vvdB), 0, 0, 1, 1}, + {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_theta, __pyx_k_theta, sizeof(__pyx_k_theta), 0, 0, 1, 1}, + {&__pyx_n_s_vh, __pyx_k_vh, sizeof(__pyx_k_vh), 0, 0, 1, 1}, + {&__pyx_n_s_where, __pyx_k_where, sizeof(__pyx_k_where), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 947, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "oh2004.pyx":44 + * + * + * cdef np.ndarray[double,ndim=1] mv0 = np.arange(0.05,0.9,0.01) # set Gamma0 range of values (fine increments) # <<<<<<<<<<<<<< + * + * ## First estimates s1 and mv1 + */ + __pyx_tuple_ = PyTuple_Pack(3, __pyx_float_0_05, __pyx_float_0_9, __pyx_float_0_01); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":947 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":953 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_float_1_ = PyFloat_FromDouble(1.); if (unlikely(!__pyx_float_1_)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_7 = PyFloat_FromDouble(0.7); if (unlikely(!__pyx_float_0_7)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_9 = PyFloat_FromDouble(0.9); if (unlikely(!__pyx_float_0_9)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_1_4 = PyFloat_FromDouble(1.4); if (unlikely(!__pyx_float_1_4)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_10_ = PyFloat_FromDouble(10.); if (unlikely(!__pyx_float_10_)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_2_2 = PyFloat_FromDouble(2.2); if (unlikely(!__pyx_float_2_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_01 = PyFloat_FromDouble(0.01); if (unlikely(!__pyx_float_0_01)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_05 = PyFloat_FromDouble(0.05); if (unlikely(!__pyx_float_0_05)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_11 = PyFloat_FromDouble(0.11); if (unlikely(!__pyx_float_0_11)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_13 = PyFloat_FromDouble(0.13); if (unlikely(!__pyx_float_0_13)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_35 = PyFloat_FromDouble(0.35); if (unlikely(!__pyx_float_0_35)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_095 = PyFloat_FromDouble(0.095); if (unlikely(!__pyx_float_0_095)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_0_556 = PyFloat_FromDouble(0.556); if (unlikely(!__pyx_float_0_556)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_neg_0_4 = PyFloat_FromDouble(-0.4); if (unlikely(!__pyx_float_neg_0_4)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_neg_1_3 = PyFloat_FromDouble(-1.3); if (unlikely(!__pyx_float_neg_1_3)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_float_neg_0_65 = PyFloat_FromDouble(-0.65); if (unlikely(!__pyx_float_neg_0_65)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), + #else + sizeof(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error) + __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error) + __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error) + __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error) + __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error) + __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error) + __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error) + __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error) + __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error) + __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#ifndef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void +#endif +#else +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyObject * +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initoh2004(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initoh2004(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_oh2004(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_oh2004(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_oh2004(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'oh2004' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_oh2004(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + PyEval_InitThreads(); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("oh2004", __pyx_methods, __pyx_k_Created_on_Tue_Jun_4_14_59_54_2, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_b); + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_oh2004) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "oh2004")) { + if (unlikely(PyDict_SetItemString(modules, "oh2004", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + (void)__Pyx_modinit_type_init_code(); + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "oh2004.pyx":11 + * """ + * cimport cython # + * import numpy as np##cpythonnp # <<<<<<<<<<<<<< + * cimport numpy as np # cpythonnp + * from libc.math cimport pi + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "oh2004.pyx":14 + * cimport numpy as np # cpythonnp + * from libc.math cimport pi + * from scipy.optimize import fmin # <<<<<<<<<<<<<< + * + * cpdef np.ndarray[double,ndim=1] inverse_oh2004(double sigma0vvdB,double sigma0hhdB,double sigma0hvdB,double theta,double f): + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_fmin); + __Pyx_GIVEREF(__pyx_n_s_fmin); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_fmin); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_scipy_optimize, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_fmin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fmin, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "oh2004.pyx":1 + * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<< + * """ + * Created on Tue Jun 4 14:59:54 2013 + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "E:/soft/Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init oh2004", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init oh2004"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallOneArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (__Pyx_PyFastCFunction_Check(func)) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + +/* IsLittleEndian */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } S; + S.u32 = 0x01020304; + return S.u8[0] == 4; +} + +/* BufferFormatCheck */ +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t <= '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case '?': return "'bool'"; + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparseable format string"; + } +} +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + #ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + #endif + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + __Pyx_StructField* field = ctx->head->field; + __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + __Pyx_StructField* field = ctx->head->field; + __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static PyObject * +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number, ndim; + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ndim = ctx->head->field->type->ndim; + while (*ts && *ts != ')') { + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; + } + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) + return PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + if (*ts != ',' && *ts != ')') + return PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + if (*ts == ',') ts++; + i++; + } + if (i != ndim) + return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return NULL; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return Py_None; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + CYTHON_FALLTHROUGH; + case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && + (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + CYTHON_FALLTHROUGH; + case 's': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} + +/* BufferGetAndValidate */ + static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + if (unlikely(info->buf == NULL)) return; + if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; + __Pyx_ReleaseBuffer(info); +} +static void __Pyx_ZeroBuffer(Py_buffer* buf) { + buf->buf = NULL; + buf->obj = NULL; + buf->strides = __Pyx_zeros; + buf->shape = __Pyx_zeros; + buf->suboffsets = __Pyx_minusones; +} +static int __Pyx__GetBufferAndValidate( + Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, + int nd, int cast, __Pyx_BufFmt_StackElem* stack) +{ + buf->buf = NULL; + if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) { + __Pyx_ZeroBuffer(buf); + return -1; + } + if (unlikely(buf->ndim != nd)) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + nd, buf->ndim); + goto fail; + } + if (!cast) { + __Pyx_BufFmt_Context ctx; + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + } + if (unlikely((size_t)buf->itemsize != dtype->size)) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", + buf->itemsize, (buf->itemsize > 1) ? "s" : "", + dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); + goto fail; + } + if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; + return 0; +fail:; + __Pyx_SafeReleaseBuffer(buf); + return -1; +} + +/* BufferIndexError */ + static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +/* PyIntBinop */ + #if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { + (void)inplace; + (void)zerodivision_check; + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op2))) { + const long a = intval; + long x; + long b = PyInt_AS_LONG(op2); + x = (long)((unsigned long)a - b); + if (likely((x^a) >= 0 || (x^~b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op2))) { + const long a = intval; + long b, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG lla = intval; + PY_LONG_LONG llb, llx; +#endif + const digit* digits = ((PyLongObject*)op2)->ob_digit; + const Py_ssize_t size = Py_SIZE(op2); + if (likely(__Pyx_sst_abs(size) <= 1)) { + b = likely(size) ? digits[0] : 0; + if (size == -1) b = -b; + } else { + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; +#endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); + } + } + x = a - b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla - llb; + return PyLong_FromLongLong(llx); +#endif + + + } + #endif + if (PyFloat_CheckExact(op2)) { + const long a = intval; + double b = PyFloat_AS_DOUBLE(op2); + double result; + PyFPE_START_PROTECT("subtract", return NULL) + result = ((double)a) - (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + } + return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); +} +#endif + +/* PyFloatBinop */ + #if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_SubtractCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { + const double a = floatval; + double b, result; + (void)inplace; + (void)zerodivision_check; + if (likely(PyFloat_CheckExact(op2))) { + b = PyFloat_AS_DOUBLE(op2); + + } else + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op2))) { + b = (double) PyInt_AS_LONG(op2); + + } else + #endif + if (likely(PyLong_CheckExact(op2))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)op2)->ob_digit; + const Py_ssize_t size = Py_SIZE(op2); + switch (size) { + case 0: b = 0.0; break; + case -1: b = -(double) digits[0]; break; + case 1: b = (double) digits[0]; break; + case -2: + case 2: + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { + b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -2) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + case -3: + case 3: + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { + b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -3) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + case -4: + case 4: + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { + b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -4) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + default: + #else + { + #endif + b = PyLong_AsDouble(op2); + if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL; + + } + } else { + return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); + } + + PyFPE_START_PROTECT("subtract", return NULL) + result = a - b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); +} +#endif + +/* PyIntCompare */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_TRUE; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); + const digit* digits = ((PyLongObject*)op1)->ob_digit; + if (intval == 0) { + if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_FALSE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_FALSE; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* GetItemInt */ + static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* ObjectGetItem */ + #if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { + PyObject *runerr; + Py_ssize_t key_value; + PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; + if (unlikely(!(m && m->sq_item))) { + PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); + return NULL; + } + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { + PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; + if (likely(m && m->mp_subscript)) { + return m->mp_subscript(obj, key); + } + return __Pyx_PyObject_GetIndex(obj, key); +} +#endif + +/* PyFloatBinop */ + #if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { + const double b = floatval; + double a, result; + (void)inplace; + (void)zerodivision_check; + if (likely(PyFloat_CheckExact(op1))) { + a = PyFloat_AS_DOUBLE(op1); + + } else + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + a = (double) PyInt_AS_LONG(op1); + + } else + #endif + if (likely(PyLong_CheckExact(op1))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)op1)->ob_digit; + const Py_ssize_t size = Py_SIZE(op1); + switch (size) { + case 0: a = 0.0; break; + case -1: a = -(double) digits[0]; break; + case 1: a = (double) digits[0]; break; + case -2: + case 2: + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { + a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -2) + a = -a; + break; + } + } + CYTHON_FALLTHROUGH; + case -3: + case 3: + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { + a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -3) + a = -a; + break; + } + } + CYTHON_FALLTHROUGH; + case -4: + case 4: + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { + a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -4) + a = -a; + break; + } + } + CYTHON_FALLTHROUGH; + default: + #else + { + #endif + a = PyLong_AsDouble(op1); + if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL; + + } + } else { + return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)); + } + + PyFPE_START_PROTECT("divide", return NULL) + result = a / b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); +} +#endif + +/* PyFloatBinop */ + #if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_PyFloat_AddCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { + const double a = floatval; + double b, result; + (void)inplace; + (void)zerodivision_check; + if (likely(PyFloat_CheckExact(op2))) { + b = PyFloat_AS_DOUBLE(op2); + + } else + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op2))) { + b = (double) PyInt_AS_LONG(op2); + + } else + #endif + if (likely(PyLong_CheckExact(op2))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)op2)->ob_digit; + const Py_ssize_t size = Py_SIZE(op2); + switch (size) { + case 0: b = 0.0; break; + case -1: b = -(double) digits[0]; break; + case 1: b = (double) digits[0]; break; + case -2: + case 2: + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { + b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -2) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + case -3: + case 3: + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { + b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -3) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + case -4: + case 4: + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { + b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == -4) + b = -b; + break; + } + } + CYTHON_FALLTHROUGH; + default: + #else + { + #endif + b = PyLong_AsDouble(op2); + if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL; + + } + } else { + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); + } + + PyFPE_START_PROTECT("add", return NULL) + result = a + b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); +} +#endif + +/* PyErrFetchRestore */ + #if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* RaiseArgTupleInvalid */ + static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* RaiseDoubleKeywords */ + static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ + static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* WriteUnraisableException */ + static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback, CYTHON_UNUSED int nogil) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_PyThreadState_declare +#ifdef WITH_THREAD + PyGILState_STATE state; + if (nogil) + state = PyGILState_Ensure(); +#ifdef _MSC_VER + else state = (PyGILState_STATE)-1; +#endif +#endif + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +#ifdef WITH_THREAD + if (nogil) + PyGILState_Release(state); +#endif +} + +/* BufferFallbackError */ + static void __Pyx_RaiseBufferFallbackError(void) { + PyErr_SetString(PyExc_ValueError, + "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); +} + +/* ArgTypeTest */ + static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* GetTopmostException */ + #if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ + #if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/* PyErrExceptionMatches */ + #if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* GetException */ + #if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* RaiseException */ + #if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* TypeImport */ + #ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* Import */ + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* ImportFrom */ + static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* CLineInTraceback */ + #ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ + static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ + #include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +#if PY_MAJOR_VERSION < 3 +static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { + if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); + PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); + return -1; +} +static void __Pyx_ReleaseBuffer(Py_buffer *view) { + PyObject *obj = view->obj; + if (!obj) return; + if (PyObject_CheckBuffer(obj)) { + PyBuffer_Release(view); + return; + } + if ((0)) {} + view->obj = NULL; + Py_DECREF(obj); +} +#endif + + + /* CIntFromPyVerify */ + #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* Declarations */ + #if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsf(b.real) >= fabsf(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + float r = b.imag / b.real; + float s = (float)(1.0) / (b.real + b.imag * r); + return __pyx_t_float_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + float r = b.real / b.imag; + float s = (float)(1.0) / (b.imag + b.real * r); + return __pyx_t_float_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + float denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_float_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_float(a, a); + case 3: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, a); + case 4: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = powf(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2f(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_float(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +/* Declarations */ + #if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs(b.real) >= fabs(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + double r = b.imag / b.real; + double s = (double)(1.0) / (b.real + b.imag * r); + return __pyx_t_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + double r = b.real / b.imag; + double s = (double)(1.0) / (b.imag + b.real * r); + return __pyx_t_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_double(a, a); + case 3: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, a); + case 4: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = pow(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_double(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif +#endif + +/* CIntFromPy */ + static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +/* CIntFromPy */ + static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ + #if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; ip) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/tool/algorithm/algtools/oh2004/build/temp.win-amd64-3.8/Release/build/oh2004/oh2004.cp38-win_amd64.exp b/tool/algorithm/algtools/oh2004/build/temp.win-amd64-3.8/Release/build/oh2004/oh2004.cp38-win_amd64.exp new file mode 100644 index 0000000..ce17292 Binary files /dev/null and b/tool/algorithm/algtools/oh2004/build/temp.win-amd64-3.8/Release/build/oh2004/oh2004.cp38-win_amd64.exp differ diff --git a/tool/algorithm/algtools/oh2004/build/temp.win-amd64-3.8/Release/build/oh2004/oh2004.cp38-win_amd64.lib b/tool/algorithm/algtools/oh2004/build/temp.win-amd64-3.8/Release/build/oh2004/oh2004.cp38-win_amd64.lib new file mode 100644 index 0000000..f721eee Binary files /dev/null and b/tool/algorithm/algtools/oh2004/build/temp.win-amd64-3.8/Release/build/oh2004/oh2004.cp38-win_amd64.lib differ diff --git a/tool/algorithm/algtools/oh2004/build/temp.win-amd64-3.8/Release/build/oh2004/oh2004.obj b/tool/algorithm/algtools/oh2004/build/temp.win-amd64-3.8/Release/build/oh2004/oh2004.obj new file mode 100644 index 0000000..376ebbc Binary files /dev/null and b/tool/algorithm/algtools/oh2004/build/temp.win-amd64-3.8/Release/build/oh2004/oh2004.obj differ diff --git a/tool/algorithm/algtools/oh2004/oh2004.cp38-win_amd64.pyd b/tool/algorithm/algtools/oh2004/oh2004.cp38-win_amd64.pyd new file mode 100644 index 0000000..648d72f Binary files /dev/null and b/tool/algorithm/algtools/oh2004/oh2004.cp38-win_amd64.pyd differ diff --git a/tool/algorithm/algtools/oh2004/oh2004/Oh2004_inversion.py b/tool/algorithm/algtools/oh2004/oh2004/Oh2004_inversion.py new file mode 100644 index 0000000..9a6648a --- /dev/null +++ b/tool/algorithm/algtools/oh2004/oh2004/Oh2004_inversion.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +""" +Created on Sun Mar 14 18:53:14 2021 + +@author: Dipankar +References +---------- +Oh (2004): Quantitative retrieval of soil moisture content and surface roughness from multipolarized radar observations of bare soil surface. IEEE TGRS 42(3). 596-601. +""" + + # --------------------------------------------------------------------------------------- + # Copyright (C) 2021 by Microwave Remote Sensing Lab, IITBombay http://www.mrslab.in + + # This program is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by the Free + # Software Foundation; either version 3 of the License, or (at your option) + # any later version. + # This program is distributed in the hope that it will be useful, but WITHOUT + # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + # more details. + + # You should have received a copy of the GNU General Public License along + # with this program; if not, see http://www.gnu.org/licenses/ + # --------------------------------------------------------------------------------------- + + +import numpy as np +#import matplotlib.pyplot as plt + + +## Description: Given sigma_0_vv, sigma_0_hh, and sigma_0_hv, the inverse +## model computes s, and mv + +sigma0vvdB = -14.1 +sigma0hhdB = -16.0 +sigma0hvdB = -26.5 +theta = 35. ##Incidence angle +f = 5.0 ##GHz + +k = 2*np.pi*f/0.3 #calculate the wave number + + + + +theta_rad = theta*np.pi/180 #represent angle in radians + +sigma_0_vv = np.power(10,(sigma0vvdB/10)) #%represent data in linear scale +sigma_0_hh = np.power(10,(sigma0hhdB/10)) +sigma_0_hv = np.power(10,(sigma0hvdB/10)) + + +p = sigma_0_hh / sigma_0_vv #calculate the p-ratio +q = sigma_0_hv / sigma_0_vv #calculate the q-ratio + +mv0 = np.arange(0.05,0.5,0.01) # set Gamma0 range of values (fine increments) + + + +## First estimates s1 and mv1 +ks = ((-1)*3.125*np.log(1 - sigma_0_hv/(0.11 * mv0**0.7 * (np.cos(theta_rad))**2.2)))**0.556 +err = (1 - (2.*theta_rad/np.pi)**(0.35*mv0**(-0.65)) * np.exp(-0.4 * ks**1.4))-p +abs_err = np.abs(err) +min_err = np.min(abs_err) #find the value of minimum error +mv1 = mv0[np.where(abs_err == min_err)] +ks1 = ((-1)*3.125*np.log(1 - sigma_0_hv/(0.11 * mv1**0.7 * (np.cos(theta_rad))**2.2)))**0.556 +s1 = ks1/k + + +## Second estimate s2 and mv2 +ks2 = (np.log(1-(q/(0.095 * (0.13 + np.sin(1.5*theta_rad))**1.4))) /(-1.3))**(10./9.) +s2 = ks2/k + +xx = (1-p)/np.exp(-0.4 * ks2**1.4) +if xx<=0: + mv2 =0 +else: + yy = np.log(xx)/(0.35*np.log(2*theta_rad/np.pi)) + mv2 = yy**(-100/65) + print(mv2,yy,np.power(yy,-100/65)) +## Third estimate mv3 +mv3 = ((sigma_0_hv/(1 - np.exp(-0.32 * ks2**1.8)))/(0.11 * np.cos(theta_rad)**2.2))**(1/0.7) + +## weighted average s and mv------------------------------------- +sf = (s1 + 0.25*s2)/(1+0.25) +mvf = (mv1+mv2+mv3)/3 +print(mv1,mv2,mv3,s1,s2) + +print('Estimated rms height s (cm): ', sf*100) +print('Estimated volumetric soil moisture: ', mvf) \ No newline at end of file diff --git a/tool/algorithm/algtools/oh2004/oh2004/oh2004.pyx b/tool/algorithm/algtools/oh2004/oh2004/oh2004.pyx new file mode 100644 index 0000000..ca2b08d --- /dev/null +++ b/tool/algorithm/algtools/oh2004/oh2004/oh2004.pyx @@ -0,0 +1,128 @@ +# -*- coding: utf-8 -*- +""" +Created on Tue Jun 4 14:59:54 2013 + +@author: Sat Kumar Tomer +@email: satkumartomer@gmail.com +@website: www.ambhas.com + +""" +cimport cython # 必须导入 +import numpy as np##必须为c类型和python类型的数据都申明一个np +cimport numpy as np # 必须为c类型和python类型的数据都申明一个np +from libc.math cimport pi +from scipy.optimize import fmin + +cpdef np.ndarray[double,ndim=1] inverse_oh2004(double sigma0vvdB,double sigma0hhdB,double sigma0hvdB,double theta,double f): + """ + sigma0vvdB = -14.1 dB + sigma0hhdB = -16.0 + sigma0hvdB = -26.5 + theta = 35. 角度值 ##Incidence angle + f = 5.0 ##GHz + """ + #print("--------------------------------------------------------\n") + cdef np.ndarray[double,ndim=1] result=np.ones((2)) + result[0]=np.nan + result[1]=np.nan + #print("*************设置为nan****************") + #print(sigma0vvdB,sigma0hhdB,sigma0hvdB,theta,f) + cdef double k = 2*3.1415926*f/0.299792458; #calculate the wave number + cdef double theta_rad = theta*3.1415926/180; #represent angle in radians + + cdef double sigma_0_vv = np.power(10.,(sigma0vvdB/10.)) #%represent data in linear scale + cdef double sigma_0_hh = np.power(10.,(sigma0hhdB/10.)) + cdef double sigma_0_hv = np.power(10.,(sigma0hvdB/10.)) + + if sigma_0_vv==0: + #print("***********sigma_0_vv==0*************") + return result + cdef double p = sigma_0_hh / sigma_0_vv; #calculate the p-ratio + cdef double q = sigma_0_hv / sigma_0_vv; #calculate the q-ratio + + + cdef np.ndarray[double,ndim=1] mv0 = np.arange(0.05,0.9,0.01) # set Gamma0 range of values (fine increments) + + ## First estimates s1 and mv1 + cdef np.ndarray[double,ndim=1] ks = ((-1.)*3.125*np.log(1 - sigma_0_hv/(0.11 * mv0**0.7 * (np.cos(theta_rad))**2.2)))**0.556 + cdef np.ndarray[double,ndim=1] err = (1. - (2.*theta_rad/np.pi)**(0.35*mv0**(-0.65)) * np.exp(-0.4 * ks**1.4))-p + cdef np.ndarray[double,ndim=1] abs_err = np.abs(err); + cdef double min_err = np.nanmin(abs_err); #find the value of minimum error + #print(np.where(abs_err == min_err)[0].shape) + if min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0 : + #print("***************min_err==np.nan or np.max(np.where(abs_err == min_err)[0].shape)==0") + return result + cdef double mv1 = mv0[np.where(abs_err == min_err)[0][0]] + cdef double temp_ks1=1. - sigma_0_hv/(0.11 * mv1**0.7 * (np.cos(theta_rad))**2.2) + if temp_ks1<0: + #print("*********************temp_ks1<0") + return result + cdef double ks1 = ((-1)*3.125*np.log(temp_ks1))**0.556 + cdef double s1 = ks1/k + + ## Second estimate s2 and mv2 + cdef double ks2 = (np.log(1-(q/(0.095 * (0.13 + np.sin(1.5*theta_rad))**1.4))) /(-1.3))**(10./9.) + cdef double s2 = ks2/k + cdef double mv2 =0. + cdef double yy =0. + cdef double xx = (1-p)/np.exp(-0.4 * ks2**1.4) + if xx<=0: + mv2 =0. + else: + yy = np.log(xx)/(0.35*np.log(2*theta_rad/np.pi)) + mv2=np.power(yy,-100.0/65) + + ## Third estimate mv3 + cdef double mv3 = ((sigma_0_hv/(1 - np.exp(-0.32 * ks2**1.8)))/(0.11 * np.cos(theta_rad)**2.2))**(1/0.7) + ## weighted average s and mv------------------------------------- + #print("q:\t",q) + #print("k:\t",k) + #print("ks1:\t",ks1) + #print("ks2:\t",ks2) + #print("theta_rad:\t",theta_rad) + + cdef double sf = (s1 + 0.25*s2)/(1+0.25) + cdef double mvf = (mv1+mv2+mv3)/3 + + result[0]=mvf*1.0 + result[1]=sf*1.0 + #print("mv1:\t",mv1) + #print("mv2:\t",mv2) + #print("mv3:\t",mv3) + #print("s1:\t",s1) + #print("s2:\t",s2) + #print("Estimated volumetric soil moisture: ",result[0]) + #print("Estimated rms height s (m): ",result[1]) + #print("\nend\n") + return result + +cpdef double lamda2freq(double lamda): + return 299792458.0/lamda + +cpdef double freq2lamda(double freq): + return 299792458.0/freq + +# double sigma0vvdB,double sigma0hhdB,double sigma0hvdB,double theta,double f +cpdef int retrieve_oh2004_main(int n,np.ndarray[double,ndim=1] mv,np.ndarray[double,ndim=1] h,np.ndarray[int,ndim=1] mask,np.ndarray[double,ndim=1] sigma0vvdB,np.ndarray[double,ndim=1] sigma0hhdB,np.ndarray[double,ndim=1] sigma0hvdB, np.ndarray[double,ndim=1] vh, np.ndarray[double,ndim=1] theta,double f): + cdef int i=0; + cdef np.ndarray[double,ndim=1] result; + while i 2048 and cols > 2048: + block_size = 1024 + return block_size + + # def get_block_size(rows, cols, block_size_config): + # block_size = 512 if block_size_config < 512 else block_size_config + # if rows > 2048 and cols > 2048: + # block_size = block_size_config + # return block_size + + @staticmethod + def get_suffix(path_name): + name = path_name + suffix = '_' + name.split('_')[-4] + '_' + name.split('_')[-3] + '_' + name.split('_')[-2] + '_' + \ + name.split('_')[-1] + return suffix + + @staticmethod + def get_file_names(data_dir, file_type=['tif', 'tiff']): + """ + 获取data_dir文件夹下file_type类型的文件路径 + """ + result_dir = [] + result_name = [] + for maindir, subdir, file_name_list in os.walk(data_dir): + for filename in file_name_list: + apath = os.path.join(maindir, filename) + ext = apath.split('.')[-1] + if ext in file_type: + result_dir.append(apath) + result_name.append(filename) + else: + pass + return result_dir, result_name + + @staticmethod + def unzip_file(zip_file_path, out_path): # ): + # 获取压缩文件所在的目录 + # extract_folder = os.path.dirname(zip_file_path) + + basename = os.path.splitext(os.path.basename(zip_file_path))[0] + extract_folder = os.path.join(out_path, basename) + + with zipfile.ZipFile(zip_file_path, 'r') as zip_ref: + # 解压到和压缩文件同名的文件夹中 + zip_ref.extractall(extract_folder) + + files = list(glob.glob(os.path.join(extract_folder, '*'))) + for file in files: + if basename in os.path.basename(file): + if not file.endswith(".xml"): + unzipped_folder_path = file + + return unzipped_folder_path + + @staticmethod + def unzip_dem(zip_file_path, out_path): + para_value_list = zip_file_path.split(";") + for n in para_value_list: + with zipfile.ZipFile(n, 'r') as zip_ref: + # 解压到和压缩文件同名的文件夹中 + zip_ref.extractall(out_path) + + return out_path + + @staticmethod + def get_same_img(img_dir, img_name): + """ + 在img_dir路径下,用img_name的子图像路径集合,将集合以字典输出 + """ + result = {} + for idx, name in enumerate(img_name): + temp_name = '' + for idx2, item in enumerate(name.split('_')[:-4]): + if idx2 == 0: + temp_name = temp_name + item + else: + temp_name = temp_name + '_' + item + + if temp_name in result: + result[temp_name].append(img_dir[idx]) + else: + result[temp_name] = [] + result[temp_name].append(img_dir[idx]) + return result + + @staticmethod + def assign_spatial_reference_byfile(src_path, dst_path): + """ + 将src_path的地理信息,输入到dst_path图像中 + """ + src_ds = gdal.Open(src_path, gdal.GA_ReadOnly) + if src_ds is None: + return False + sr = osr.SpatialReference() + sr.ImportFromWkt(src_ds.GetProjectionRef()) + geo_transform = src_ds.GetGeoTransform() + + dst_ds = gdal.Open(dst_path, gdal.GA_Update) + if dst_ds is None: + return False + dst_ds.SetProjection(sr.ExportToWkt()) + dst_ds.SetGeoTransform(geo_transform) + del dst_ds + del src_ds + return True + + @staticmethod + def assign_spatial_reference_bypoint(row_begin, col_begin, src_proj, src_geo, img_path): + """ + 将src_path的地理信息,输入到dst_path图像中 + """ + + sr = osr.SpatialReference() + sr.ImportFromWkt(src_proj) + geo_transform = src_geo + geo_transform[0] = src_geo[0] + col_begin * src_geo[1] + row_begin * src_geo[2] + geo_transform[3] = src_geo[3] + col_begin * src_geo[4] + row_begin * src_geo[5] + dst_ds = gdal.Open(img_path, gdal.GA_Update) + if dst_ds is None: + return False + dst_ds.SetProjection(sr.ExportToWkt()) + dst_ds.SetGeoTransform(geo_transform) + del dst_ds + return True + + @staticmethod + def __get_band_array(filename, num): + """ + :param filename: tif路径 + :param num: 波段序号 + :return: 对应波段的矩阵数据 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + bands = dataset.GetRasterBand(num) + array = bands.ReadAsArray(0, 0, bands.XSize, bands.YSize) + del dataset + return array + + @staticmethod + def get_data(filename): + """ + :param filename: tif路径 + :return: 获取所有波段的数据 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + im_width = dataset.RasterXSize + im_height = dataset.RasterYSize + im_data = dataset.ReadAsArray(0, 0, im_width, im_height) + del dataset + return im_data + + def get_tif_dtype(self, filename): + """ + :param filename: tif路径 + :return: tif数据类型 + """ + image = self.__get_band_array(filename, 1) + return image.dtype.name + + def cut(self, in_dir, out_dir, file_type=['tif', 'tiff'], out_type='tif', out_size=2048): + """ + :param in_dir:存放待裁剪的影像文件夹,不用指定到tif文件 + :param out_dir:存放裁剪结果的影像文件夹 + :param file_type:待裁剪的影像文件类型tif、tiff、bmp、jpg、png等等 + :param out_type:裁剪结果影像文件类型 + :param out_size:裁剪尺寸,裁剪为n*n的方形 + :return: True or Flase + """ + if not os.path.exists(out_dir): + os.makedirs(out_dir) + data_dir_list, _ = self.get_file_names(in_dir, file_type) + count = 0 + + for each_dir in data_dir_list: + + name_suffix = os.path.basename(each_dir) + img_name = os.path.splitext(name_suffix)[0] + + # gdal读取方法 + image = self.__get_band_array(each_dir, 1) + + cut_factor_row = int(np.ceil(image.shape[0] / out_size)) + cut_factor_clo = int(np.ceil(image.shape[1] / out_size)) + for i in range(cut_factor_row): + for j in range(cut_factor_clo): + + if i == cut_factor_row - 1: + i = image.shape[0] / out_size - 1 + else: + pass + + if j == cut_factor_clo - 1: + j = image.shape[1] / out_size - 1 + else: + pass + + start_x = int(np.rint(i * out_size)) + start_y = int(np.rint(j * out_size)) + end_x = int(np.rint((i + 1) * out_size)) + end_y = int(np.rint((j + 1) * out_size)) + out_dir_images = os.path.join(out_dir, img_name + '_' + str(start_x) + '_' + str(end_x) + '_' + str(start_y) + '_' + str( + end_y) + '.' + out_type) + # + '/' + img_name \ + # + '_' + str(start_x) + '_' + str(end_x) + '_' + str(start_y) + '_' + str( + # end_y) + '.' + out_type + + # temp_image = image[start_x:end_x, start_y:end_y] + # out_image = Image.fromarray(temp_data) + # out_image = Image.fromarray(temp_image) + # out_image.save(out_dir_images) + + data = ImageHandler.get_data(each_dir) + if ImageHandler.get_bands(each_dir) > 1: + temp_data = data[:,start_x:end_x, start_y:end_y] + else: + temp_data = data[start_x:end_x, start_y:end_y] + ImageHandler.write_img(out_dir_images, '', [0, 0, 0, 0, 0, 0], temp_data) + count += 1 + return True + + def cut_new(self, in_dir, out_dir, file_type=['tif', 'tiff'], out_type='tif', out_size=2048): + """ + :param in_dir:存放待裁剪的影像文件夹,不用指定到tif文件 + :param out_dir:存放裁剪结果的影像文件夹 + :param file_type:待裁剪的影像文件类型tif、tiff、bmp、jpg、png等等 + :param out_type:裁剪结果影像文件类型 + :param out_size:裁剪尺寸,裁剪为n*n的方形 + :return: True or Flase + 20230831修改 ----tjx + """ + if not os.path.exists(out_dir): + os.makedirs(out_dir) + data_dir_list, _ = self.get_file_names(in_dir, file_type) + count = 0 + + for each_dir in data_dir_list: + + name_suffix = os.path.basename(each_dir) + img_name = os.path.splitext(name_suffix)[0] + + # gdal读取方法 + image = self.__get_band_array(each_dir, 1) + + block_x = int(np.ceil(image.shape[1] / out_size)) + block_y = int(np.ceil(image.shape[0] / out_size)) # todo 修改分块 + for i in range(block_y): + for j in range(block_x): + start_x = image.shape[1] - out_size if (j == block_x - 1) else j * out_size + start_y = image.shape[0] - out_size if (i == block_x - 1) else i * out_size + end_x = image.shape[1] if (j + 1) * out_size > image.shape[1] else (j + 1) * out_size + end_y = image.shape[0] if (i + 1) * out_size > image.shape[0] else (i + 1) * out_size + + out_dir_images = os.path.join(out_dir, img_name + '_' + str(start_x) + '_' + str(end_x) + '_' + str(start_y) + '_' + str( + end_y) + '.' + out_type) + # print(out_dir_images) + + data = ImageHandler.get_data(each_dir) + if ImageHandler.get_bands(each_dir) > 1: + # temp_data = data[:,start_x:end_x, start_y:end_y] + temp_data = data[:,start_y:end_y, start_x:end_x] + else: + # temp_data = data[start_x:end_x, start_y:end_y] + temp_data = data[start_y:end_y, start_x:end_x] + ImageHandler.write_img(out_dir_images, '', [0, 0, 0, 0, 0, 0], temp_data) + count += 1 + return True + + def combine(self, data_dir, w, h, out_dir, out_type='tif', file_type=['tif', 'tiff'], datetype='float16'): + """ + :param data_dir: 存放待裁剪的影像文件夹,不用指定到tif文件 + :param w 拼接影像的宽度, + :param h 拼接影像的高度 + :param out_dir: 存放裁剪结果的影像文件夹 + :param out_type: 裁剪结果影像文件类型 + :param file_type: 待裁剪的影像文件类型 + :param datetype:数据类型 int8,int16,float16,float32 等 + :return: True or Flase + """ + if not os.path.exists(out_dir): + os.makedirs(out_dir) + img_dir, img_name = self.get_file_names(data_dir, file_type) + + dir_dict = self.get_same_img(img_dir, img_name) + count = 0 + for key in dir_dict.keys(): + temp_label = np.zeros(shape=(h, w), dtype=datetype) + dir_list = dir_dict[key] + for item in dir_list: + name_split = item.split('_') + x_start = int(name_split[-4]) + x_end = int(name_split[-3]) + y_start = int(name_split[-2]) + y_end = int(name_split[-1].split('.')[0]) + # img = Image.open(item) + img = ImageHandler.get_band_array(item, 1) + img = np.array(img) + + temp_label[x_start:x_end, y_start:y_end] = img + + img_name = key + '.' + out_type + new_out_dir = os.path.join(out_dir, img_name) + ImageHandler.write_img(new_out_dir, '', [0, 0, 0, 0, 0, 0], temp_label) + # label = Image.fromarray(temp_label) + # label.save(new_out_dir) + + count += 1 + return True + + # todo 20230901 修改分块同步修改合并代码 + def combine_new(self, data_dir, w, h, out_dir, out_type='tif', file_type=['tif', 'tiff'], datetype='float16'): + """ + :param data_dir: 存放待裁剪的影像文件夹,不用指定到tif文件 + :param w 拼接影像的宽度, + :param h 拼接影像的高度 + :param out_dir: 存放裁剪结果的影像文件夹 + :param out_type: 裁剪结果影像文件类型 + :param file_type: 待裁剪的影像文件类型 + :param datetype:数据类型 int8,int16,float16,float32 等 + :return: True or Flase + """ + if not os.path.exists(out_dir): + os.makedirs(out_dir) + img_dir, img_name = self.get_file_names(data_dir, file_type) + + dir_dict = self.get_same_img(img_dir, img_name) + count = 0 + for key in dir_dict.keys(): + dir_list = dir_dict[key] + bands = ImageHandler.get_bands(dir_list[0]) + if bands > 1: + temp_label = np.zeros(shape=(bands, h, w), dtype=datetype) + for item in dir_list: + name_split = item.split('_') + x_start = int(name_split[-4]) + x_end = int(name_split[-3]) + y_start = int(name_split[-2]) + y_end = int(name_split[-1].split('.')[0]) + # img = Image.open(item) + img = ImageHandler.get_band_array(item, 1) + img = np.array(img) + + temp_label[:, y_start:y_end, x_start:x_end] = img + + img_name = key + '.' + out_type + new_out_dir = os.path.join(out_dir, img_name) + ImageHandler.write_img(new_out_dir, '', [0, 0, 0, 0, 0, 0], temp_label) + # label = Image.fromarray(temp_label) + # label.save(new_out_dir) + count += 1 + else: + temp_label = np.zeros(shape=(h, w), dtype=datetype) + for item in dir_list: + name_split = item.split('_') + x_start = int(name_split[-4]) + x_end = int(name_split[-3]) + y_start = int(name_split[-2]) + y_end = int(name_split[-1].split('.')[0]) + # img = Image.open(item) + img = ImageHandler.get_band_array(item, 1) + img = np.array(img) + + temp_label[y_start:y_end, x_start:x_end] = img + + img_name = key + '.' + out_type + new_out_dir = os.path.join(out_dir, img_name) + ImageHandler.write_img(new_out_dir, '', [0, 0, 0, 0, 0, 0], temp_label) + # label = Image.fromarray(temp_label) + # label.save(new_out_dir) + + count += 1 + return True + + def combine_Tif(self, data_dir, w, h, out_dir, proj, geo, out_type='tif', file_type=['tif', 'tiff'], + datetype='float16'): + """ + 将文件夹下的tif拼接成一个大的tif + :param data_dir: 存放待裁剪的影像文件夹,不用指定到tif文件 + :param w 拼接影像的宽度, + :param h 拼接影像的高度 + :param out_dir: 存放裁剪结果的影像文件夹 + :param proj: 指定投影系 + :param geo: 指定变换参数 + :param out_type: 裁剪结果影像文件类型 + :param file_type: 待裁剪的影像文件类型 + :param datetype:数据类型 int8,int16,float16,float32 等 + :return: True or Flase + """ + image_handler = ImageHandler() + if not os.path.exists(out_dir): + os.makedirs(out_dir) + img_dir, img_name = self.get_file_names(data_dir, file_type) + + dir_dict = self.get_same_img(img_dir, img_name) + count = 0 + for key in dir_dict.keys(): + temp_label = np.zeros(shape=(h, w), dtype=datetype) + dir_list = dir_dict[key] + for item in dir_list: + name_split = item.split('_') + x_start = int(name_split[-4]) + x_end = int(name_split[-3]) + y_start = int(name_split[-2]) + y_end = int(name_split[-1].split('.')[0]) + img = image_handler.get_data(item) + temp_label[x_start:x_end, y_start:y_end] = img + + img_name = key + '.' + out_type + new_out_dir = os.path.join(out_dir,img_name) + image_handler.write_img(new_out_dir, proj, geo, temp_label) + count += 1 + return True + +# if __name__ == '__main__': +# bp = BlockProcess() +# # # cut +# data_dir = r"D:\micro\WorkSpace\LandCover\Temporary\processing\feature_tif\cut" +# out_dir = r"D:\micro\WorkSpace\LandCover\Temporary\processing\feature_tif\combine" +# file_type = ['tif'] +# out_type = 'tif' +# cut_size = 1024 +# # +# bp.cut_new(data_dir, out_dir, file_type, out_type, cut_size) +# # # combine +# # data_dir=r"D:\Workspace\SoilMoisture\Temporary\test" +# w= 5043 +# h= 1239 +# out_dirs=r"D:\BaiduNetdiskDownload\HF\cut_outs" +# # out_type='tif' +# # file_type=['tif'] +# datetype = 'float' +# # src_path = r"D:\Workspace\SoilMoisture\Temporary\preprocessed\HH_preprocessed.tif" +# # datetype = bp.get_tif_dtype(src_path) +# bp.combine_new(out_dir, w, h, out_dirs, out_type, file_type, datetype) + + # + # # 添加地理信息 + # new_out_dir =r"D:\DATA\testdata1\combine\TEST_20200429_NDVI.tif" + # bp.assign_spatial_reference_byfile(src_path, new_out_dir) + + # fn = r'D:\Workspace\SoilMoisture\Temporary\combine\soil_moisture.tif' + # product_path = r'D:\Workspace\SoilMoisture\Temporary\combine\soil_moisture_1.tif' + # + # proj, geos, img = ImageHandler.read_img(fn) + # img[img>1] = 1 + # img[img<0] = 0 + # ImageHandler.write_img(product_path, proj, geos, img) + diff --git a/tool/algorithm/image/ImageHandle.py b/tool/algorithm/image/ImageHandle.py new file mode 100644 index 0000000..b83ef1d --- /dev/null +++ b/tool/algorithm/image/ImageHandle.py @@ -0,0 +1,686 @@ +""" +@Project :microproduct +@File :ImageHandle.py +@Function :实现对待处理SAR数据的读取、格式标准化和处理完后保存文件功能 +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" +import os +from PIL import Image +from osgeo import gdal +from osgeo import osr +import numpy as np +from PIL import Image +import cv2 +import logging + +import math +logger = logging.getLogger("mylog") + + +class ImageHandler: + """ + 影像读取、编辑、保存 + """ + def __init__(self): + pass + @staticmethod + def get_dataset(filename): + """ + :param filename: tif路径 + :return: 图像句柄 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + return dataset + + def get_scope(self, filename): + """ + :param filename: tif路径 + :return: 图像范围 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + im_scope = self.cal_img_scope(dataset) + del dataset + return im_scope + + @staticmethod + def get_projection(filename): + """ + :param filename: tif路径 + :return: 地图投影信息 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + im_proj = dataset.GetProjection() + del dataset + return im_proj + + @staticmethod + def get_geotransform(filename): + """ + :param filename: tif路径 + :return: 从图像坐标空间(行、列),也称为(像素、线)到地理参考坐标空间(投影或地理坐标)的仿射变换 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + geotransform = dataset.GetGeoTransform() + del dataset + return geotransform + + def get_invgeotransform(filename): + """ + :param filename: tif路径 + :return: 从地理参考坐标空间(投影或地理坐标)的到图像坐标空间(行、列 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + geotransform = dataset.GetGeoTransform() + geotransform=gdal.InvGeoTransform(geotransform) + del dataset + return geotransform + + @staticmethod + def get_bands(filename): + """ + :param filename: tif路径 + :return: 影像的波段数 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + bands = dataset.RasterCount + del dataset + return bands + + @staticmethod + def geo2lonlat(dataset, x, y): + """ + 将投影坐标转为经纬度坐标(具体的投影坐标系由给定数据确定) + :param dataset: GDAL地理数据 + :param x: 投影坐标x + :param y: 投影坐标y + :return: 投影坐标(x, y)对应的经纬度坐标(lon, lat) + """ + prosrs = osr.SpatialReference() + prosrs.ImportFromWkt(dataset.GetProjection()) + geosrs = prosrs.CloneGeogCS() + ct = osr.CoordinateTransformation(prosrs, geosrs) + coords = ct.TransformPoint(x, y) + return coords[:2] + + @staticmethod + def get_band_array(filename, num=1): + """ + :param filename: tif路径 + :param num: 波段序号 + :return: 对应波段的矩阵数据 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + bands = dataset.GetRasterBand(num) + array = bands.ReadAsArray(0, 0, bands.XSize, bands.YSize) + + # if 'int' in str(array.dtype): + # array[np.where(array == -9999)] = np.inf + # else: + # array[np.where(array < -9000.0)] = np.nan + + del dataset + return array + + @staticmethod + def get_data(filename): + """ + :param filename: tif路径 + :return: 获取所有波段的数据 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + im_width = dataset.RasterXSize + im_height = dataset.RasterYSize + im_data = dataset.ReadAsArray(0, 0, im_width, im_height) + del dataset + return im_data + + @staticmethod + def get_all_band_array(filename): + """ + (大气延迟算法) + 将ERA-5影像所有波段存为一个数组, 波段数在第三维度 get_data()->(37,8,8) + :param filename: 影像路径 get_all_band_array ->(8,8,37) + :return: 影像数组 + """ + dataset = gdal.Open(filename) + x_size = dataset.RasterXSize + y_size = dataset.RasterYSize + nums = dataset.RasterCount + array = np.zeros((y_size, x_size, nums), dtype=float) + if nums == 1: + bands_0 = dataset.GetRasterBand(1) + array = bands_0.ReadAsArray(0, 0, x_size, y_size) + else: + for i in range(0, nums): + bands = dataset.GetRasterBand(i+1) + arr = bands.ReadAsArray(0, 0, x_size, y_size) + array[:, :, i] = arr + return array + + @staticmethod + def get_img_width(filename): + """ + :param filename: tif路径 + :return: 影像宽度 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + width = dataset.RasterXSize + + del dataset + return width + + @staticmethod + def get_img_height(filename): + """ + :param filename: tif路径 + :return: 影像高度 + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + height = dataset.RasterYSize + del dataset + return height + + @staticmethod + def read_img(filename): + """ + 影像读取 + :param filename: + :return: + """ + gdal.AllRegister() + img_dataset = gdal.Open(filename) # 打开文件 + + if img_dataset is None: + msg = 'Could not open ' + filename + logger.error(msg) + return None, None, None + + im_proj = img_dataset.GetProjection() # 地图投影信息 + if im_proj is None: + return None, None, None + im_geotrans = img_dataset.GetGeoTransform() # 仿射矩阵 + + im_width = img_dataset.RasterXSize # 栅格矩阵的行数 + im_height = img_dataset.RasterYSize # 栅格矩阵的行数 + im_arr = img_dataset.ReadAsArray(0, 0, im_width, im_height) + del img_dataset + return im_proj, im_geotrans, im_arr + + def cal_img_scope(self, dataset): + """ + 计算影像的地理坐标范围 + 根据GDAL的六参数模型将影像图上坐标(行列号)转为投影坐标或地理坐标(根据具体数据的坐标系统转换) + :param dataset :GDAL地理数据 + :return: list[point_upleft, point_upright, point_downleft, point_downright] + """ + if dataset is None: + return None + + img_geotrans = dataset.GetGeoTransform() + if img_geotrans is None: + return None + + width = dataset.RasterXSize # 栅格矩阵的列数 + height = dataset.RasterYSize # 栅格矩阵的行数 + + point_upleft = self.trans_rowcol2geo(img_geotrans, 0, 0) + point_upright = self.trans_rowcol2geo(img_geotrans, width, 0) + point_downleft = self.trans_rowcol2geo(img_geotrans, 0, height) + point_downright = self.trans_rowcol2geo(img_geotrans, width, height) + + return [point_upleft, point_upright, point_downleft, point_downright] + + @staticmethod + def get_scope_ori_sim(filename): + """ + 计算影像的地理坐标范围 + 根据GDAL的六参数模型将影像图上坐标(行列号)转为投影坐标或地理坐标(根据具体数据的坐标系统转换) + :param dataset :GDAL地理数据 + :return: list[point_upleft, point_upright, point_downleft, point_downright] + """ + gdal.AllRegister() + dataset = gdal.Open(filename) + if dataset is None: + return None + + width = dataset.RasterXSize # 栅格矩阵的列数 + height = dataset.RasterYSize # 栅格矩阵的行数 + + band1 = dataset.GetRasterBand(1) + array1 = band1.ReadAsArray(0, 0, band1.XSize, band1.YSize) + + band2 = dataset.GetRasterBand(2) + array2 = band2.ReadAsArray(0, 0, band2.XSize, band2.YSize) + + if array1[0, 0] < array1[0, width-1]: + point_upleft = [array1[0, 0], array2[0, 0]] + point_upright = [array1[0, width-1], array2[0, width-1]] + else: + point_upright = [array1[0, 0], array2[0, 0]] + point_upleft = [array1[0, width-1], array2[0, width-1]] + + + if array1[height-1, 0] < array1[height-1, width-1]: + point_downleft = [array1[height - 1, 0], array2[height - 1, 0]] + point_downright = [array1[height - 1, width - 1], array2[height - 1, width - 1]] + else: + point_downright = [array1[height - 1, 0], array2[height - 1, 0]] + point_downleft = [array1[height - 1, width - 1], array2[height - 1, width - 1]] + + + if(array2[0, 0] < array2[height - 1, 0]): + #上下调换顺序 + tmp1 = point_upleft + point_upleft = point_downleft + point_downleft = tmp1 + + tmp2 = point_upright + point_upright = point_downright + point_downright = tmp2 + + return [point_upleft, point_upright, point_downleft, point_downright] + + + @staticmethod + def trans_rowcol2geo(img_geotrans,img_col, img_row): + """ + 据GDAL的六参数模型仿射矩阵将影像图上坐标(行列号)转为投影坐标或地理坐标(根据具体数据的坐标系统转换) + :param img_geotrans: 仿射矩阵 + :param img_col:图像纵坐标 + :param img_row:图像横坐标 + :return: [geo_x,geo_y] + """ + geo_x = img_geotrans[0] + img_geotrans[1] * img_col + img_geotrans[2] * img_row + geo_y = img_geotrans[3] + img_geotrans[4] * img_col + img_geotrans[5] * img_row + return [geo_x, geo_y] + + @staticmethod + def write_era_into_img(filename, im_proj, im_geotrans, im_data): + """ + 影像保存 + :param filename: + :param im_proj: + :param im_geotrans: + :param im_data: + :return: + """ + gdal_dtypes = { + 'int8': gdal.GDT_Byte, + 'unit16': gdal.GDT_UInt16, + 'int16': gdal.GDT_Int16, + 'unit32': gdal.GDT_UInt32, + 'int32': gdal.GDT_Int32, + 'float32': gdal.GDT_Float32, + 'float64': gdal.GDT_Float64, + } + if not gdal_dtypes.get(im_data.dtype.name, None) is None: + datatype = gdal_dtypes[im_data.dtype.name] + else: + datatype = gdal.GDT_Float32 + + # 判读数组维数 + if len(im_data.shape) == 3: + im_height, im_width, im_bands = im_data.shape # shape[0] 行数 + else: + im_bands, (im_height, im_width) = 1, im_data.shape + + # 创建文件 + if os.path.exists(os.path.split(filename)[0]) is False: + os.makedirs(os.path.split(filename)[0]) + + driver = gdal.GetDriverByName("GTiff") # 数据类型必须有,因为要计算需要多大内存空间 + dataset = driver.Create(filename, im_width, im_height, im_bands, datatype) + dataset.SetGeoTransform(im_geotrans) # 写入仿射变换参数 + dataset.SetProjection(im_proj) # 写入投影 + + if im_bands == 1: + dataset.GetRasterBand(1).WriteArray(im_data) # 写入数组数据 + else: + for i in range(im_bands): + dataset.GetRasterBand(i + 1).WriteArray(im_data[:, :, i]) + # dataset.GetRasterBand(i + 1).WriteArray(im_data[i]) + del dataset + + # 写GeoTiff文件 + + @staticmethod + def lat_lon_to_pixel(raster_dataset_path, location): + """From zacharybears.com/using-python-to-translate-latlon-locations-to-pixels-on-a-geotiff/.""" + gdal.AllRegister() + raster_dataset = gdal.Open(raster_dataset_path) + if raster_dataset is None: + return None + ds = raster_dataset + gt = ds.GetGeoTransform() + srs = osr.SpatialReference() + srs.ImportFromWkt(ds.GetProjection()) + srs_lat_lon = srs.CloneGeogCS() + ct = osr.CoordinateTransformation(srs_lat_lon, srs) + new_location = [None, None] + # Change the point locations into the GeoTransform space + (new_location[1], new_location[0], holder) = ct.TransformPoint(location[1], location[0]) + # Translate the x and y coordinates into pixel values + Xp = new_location[0] + Yp = new_location[1] + dGeoTrans = gt + dTemp = dGeoTrans[1] * dGeoTrans[5] - dGeoTrans[2] * dGeoTrans[4] + Xpixel = (dGeoTrans[5] * (Xp - dGeoTrans[0]) - dGeoTrans[2] * (Yp - dGeoTrans[3])) / dTemp + Yline = (dGeoTrans[1] * (Yp - dGeoTrans[3]) - dGeoTrans[4] * (Xp - dGeoTrans[0])) / dTemp + del raster_dataset + return (Xpixel, Yline) + + @staticmethod + def write_img(filename, im_proj, im_geotrans, im_data, no_data='0'): + """ + 影像保存 + :param filename: 保存的路径 + :param im_proj: + :param im_geotrans: + :param im_data: + :param no_data: 把无效值设置为 nodata + :return: + """ + + gdal_dtypes = { + 'int8': gdal.GDT_Byte, + 'unit16': gdal.GDT_UInt16, + 'int16': gdal.GDT_Int16, + 'unit32': gdal.GDT_UInt32, + 'int32': gdal.GDT_Int32, + 'float32': gdal.GDT_Float32, + 'float64': gdal.GDT_Float64, + } + if not gdal_dtypes.get(im_data.dtype.name, None) is None: + datatype = gdal_dtypes[im_data.dtype.name] + else: + datatype = gdal.GDT_Float32 + flag = False + # 判读数组维数 + if len(im_data.shape) == 3: + im_bands, im_height, im_width = im_data.shape + flag = True + else: + im_bands, (im_height, im_width) = 1, im_data.shape + + # 创建文件 + if os.path.exists(os.path.split(filename)[0]) is False: + os.makedirs(os.path.split(filename)[0]) + + driver = gdal.GetDriverByName("GTiff") # 数据类型必须有,因为要计算需要多大内存空间 + dataset = driver.Create(filename, im_width, im_height, im_bands, datatype) + + dataset.SetGeoTransform(im_geotrans) # 写入仿射变换参数 + + dataset.SetProjection(im_proj) # 写入投影 + + if im_bands == 1: + # outRaster.GetRasterBand(1).WriteArray(array) # 写入数组数据 + if flag: + outband = dataset.GetRasterBand(1) + outband.WriteArray(im_data[0]) + if no_data != 'null': + outband.SetNoDataValue(np.double(no_data)) + outband.FlushCache() + else: + outband = dataset.GetRasterBand(1) + outband.WriteArray(im_data) + if no_data != 'null': + outband.SetNoDataValue(np.double(no_data)) + outband.FlushCache() + else: + for i in range(im_bands): + outband = dataset.GetRasterBand(1 + i) + outband.WriteArray(im_data[i]) + if no_data != 'null': + outband.SetNoDataValue(np.double(no_data)) + outband.FlushCache() + # outRaster.GetRasterBand(i + 1).WriteArray(array[i]) + del dataset + + # 写GeoTiff文件 + + @staticmethod + def write_img_envi(filename, im_proj, im_geotrans, im_data, no_data='null'): + """ + 影像保存 + :param filename: 保存的路径 + :param im_proj: + :param im_geotrans: + :param im_data: + :param no_data: 把无效值设置为 nodata + :return: + """ + + gdal_dtypes = { + 'int8': gdal.GDT_Byte, + 'unit16': gdal.GDT_UInt16, + 'int16': gdal.GDT_Int16, + 'unit32': gdal.GDT_UInt32, + 'int32': gdal.GDT_Int32, + 'float32': gdal.GDT_Float32, + 'float64': gdal.GDT_Float64, + } + if not gdal_dtypes.get(im_data.dtype.name, None) is None: + datatype = gdal_dtypes[im_data.dtype.name] + else: + datatype = gdal.GDT_Float32 + + # 判读数组维数 + if len(im_data.shape) == 3: + im_bands, im_height, im_width = im_data.shape + else: + im_bands, (im_height, im_width) = 1, im_data.shape + + # 创建文件 + if os.path.exists(os.path.split(filename)[0]) is False: + os.makedirs(os.path.split(filename)[0]) + + driver = gdal.GetDriverByName("ENVI") # 数据类型必须有,因为要计算需要多大内存空间 + dataset = driver.Create(filename, im_width, im_height, im_bands, datatype) + + dataset.SetGeoTransform(im_geotrans) # 写入仿射变换参数 + + dataset.SetProjection(im_proj) # 写入投影 + + if im_bands == 1: + # outRaster.GetRasterBand(1).WriteArray(array) # 写入数组数据 + outband = dataset.GetRasterBand(1) + outband.WriteArray(im_data) + if no_data != 'null': + outband.SetNoDataValue(no_data) + outband.FlushCache() + else: + for i in range(im_bands): + outband = dataset.GetRasterBand(1 + i) + outband.WriteArray(im_data[i]) + outband.FlushCache() + # outRaster.GetRasterBand(i + 1).WriteArray(array[i]) + del dataset + + @staticmethod + def write_img_rpc(filename, im_proj, im_geotrans, im_data, rpc_dict): + """ + 图像中写入rpc信息 + """ + # 判断栅格数据的数据类型 + if 'int8' in im_data.dtype.name: + datatype = gdal.GDT_Byte + elif 'int16' in im_data.dtype.name: + datatype = gdal.GDT_Int16 + else: + datatype = gdal.GDT_Float32 + + # 判读数组维数 + if len(im_data.shape) == 3: + im_bands, im_height, im_width = im_data.shape + else: + im_bands, (im_height, im_width) = 1, im_data.shape + + # 创建文件 + driver = gdal.GetDriverByName("GTiff") + dataset = driver.Create(filename, im_width, im_height, im_bands, datatype) + + dataset.SetGeoTransform(im_geotrans) # 写入仿射变换参数 + dataset.SetProjection(im_proj) # 写入投影 + + # 写入RPC参数 + for k in rpc_dict.keys(): + dataset.SetMetadataItem(k, rpc_dict[k], 'RPC') + + if im_bands == 1: + dataset.GetRasterBand(1).WriteArray(im_data) # 写入数组数据 + else: + for i in range(im_bands): + dataset.GetRasterBand(i + 1).WriteArray(im_data[i]) + + del dataset + + + def transtif2mask(self,out_tif_path, in_tif_path, threshold): + """ + :param out_tif_path:输出路径 + :param in_tif_path:输入的路径 + :param threshold:阈值 + """ + im_proj, im_geotrans, im_arr, im_scope = self.read_img(in_tif_path) + im_arr_mask = (im_arr < threshold).astype(int) + self.write_img(out_tif_path, im_proj, im_geotrans, im_arr_mask) + + def write_quick_view(self, tif_path, color_img=False, quick_view_path=None): + """ + 生成快视图,默认快视图和影像同路径且同名 + :param tif_path:影像路径 + :param color_img:是否生成随机伪彩色图 + :param quick_view_path:快视图路径 + """ + if quick_view_path is None: + quick_view_path = os.path.splitext(tif_path)[0]+'.jpg' + + n = self.get_bands(tif_path) + if n == 1: # 单波段 + t_data = self.get_data(tif_path) + else: # 多波段,转为强度数据 + t_data = self.get_data(tif_path) + t_data = t_data.astype(float) + t_data = np.sqrt(t_data[0] ** 2 + t_data[1] ** 2) + + t_r = self.get_img_height(tif_path) + t_c = self.get_img_width(tif_path) + if t_r > 10000 or t_c > 10000: + q_r = int(t_r / 10) + q_c = int(t_c / 10) + elif 1024 < t_r < 10000 or 1024 < t_c < 10000: + if t_r > t_c: + q_r = 1024 + q_c = int(t_c/t_r * 1024) + else: + q_c = 1024 + q_r = int(t_r/t_c * 1024) + else: + q_r = t_r + q_c = t_c + + if color_img is True: + # 生成伪彩色图 + img = np.zeros((t_r, t_c, 3), dtype=np.uint8) # (高,宽,维度) + u = np.unique(t_data) + for i in u: + if i != 0: + w = np.where(t_data == i) + img[w[0], w[1], 0] = np.random.randint(0, 255) # 随机生成一个0到255之间的整数 可以通过挑参数设定不同的颜色范围 + img[w[0], w[1], 1] = np.random.randint(0, 255) + img[w[0], w[1], 2] = np.random.randint(0, 255) + + img = cv2.resize(img, (q_c, q_r)) # (宽,高) + cv2.imwrite(quick_view_path, img) + # cv2.imshow("result4", img) + # cv2.waitKey(0) + else: + # 灰度图 + min = np.percentile(t_data, 2) # np.nanmin(t_data) + max = np.percentile(t_data, 98) # np.nanmax(t_data) + t_data[np.isnan(t_data)] = max + if (max - min) < 256: + t_data = (t_data - min) / (max - min) * 255 + out_img = Image.fromarray(t_data) + out_img = out_img.resize((q_c, q_r)) # 重采样 + out_img = out_img.convert("L") # 转换成灰度图 + out_img.save(quick_view_path) + + def limit_field(self, out_path, in_path, min_value, max_value): + """ + :param out_path:输出路径 + :param in_path:主mask路径,输出影像采用主mask的地理信息 + :param min_value + :param max_value + """ + proj = self.get_projection(in_path) + geotrans = self.get_geotransform(in_path) + array = self.get_band_array(in_path, 1) + array[array < min_value] = min_value + array[array > max_value] = max_value + self.write_img(out_path, proj, geotrans, array) + return True + + def band_merge(self, lon, lat, ori_sim): + lon_arr = self.get_data(lon) + lat_arr = self.get_data(lat) + temp = np.zeros((2, lon_arr.shape[0], lon_arr.shape[1]), dtype=float) + temp[0, :, :] = lon_arr[:, :] + temp[1, :, :] = lat_arr[:, :] + self.write_img(ori_sim, '', [0.0, 1.0, 0.0, 0.0, 0.0, 1.0], temp, '0') + + + def get_scopes(self, ori_sim): + ori_sim_data = self.get_data(ori_sim) + lon = ori_sim_data[0, :, :] + lat = ori_sim_data[1, :, :] + + min_lon = np.nanmin(np.where((lon != 0) & ~np.isnan(lon), lon, np.inf)) + max_lon = np.nanmax(np.where((lon != 0) & ~np.isnan(lon), lon, -np.inf)) + min_lat = np.nanmin(np.where((lat != 0) & ~np.isnan(lat), lat, np.inf)) + max_lat = np.nanmax(np.where((lat != 0) & ~np.isnan(lat), lat, -np.inf)) + + scopes = [[min_lon, max_lat], [max_lon, max_lat], [min_lon, min_lat], [max_lon, min_lat]] + return scopes + + +# if __name__ == '__main__': +# path = r'D:\BaiduNetdiskDownload\GZ\lon.rdr' +# path2 = r'D:\BaiduNetdiskDownload\GZ\lat.rdr' +# path3 = r'D:\BaiduNetdiskDownload\GZ\lon_lat.tif' +# s = ImageHandler().band_merge(path, path2, path3) +# print(s) +# pass \ No newline at end of file diff --git a/tool/algorithm/ml/MonteCarloSampling.py b/tool/algorithm/ml/MonteCarloSampling.py new file mode 100644 index 0000000..00af9cc --- /dev/null +++ b/tool/algorithm/ml/MonteCarloSampling.py @@ -0,0 +1,185 @@ +# -*- coding: UTF-8 -*- +""" +@Project:SalinityMain.py +@File:MonteCarloSampling.py +@Function:基于蒙特卡洛随机抽样的最优特征选择算法 +@Contact: +@Author:SHJ +@Date:2021/10/19 11:30 +@Version:1.0.0 +""" +import numpy as np +from numpy import random +import matplotlib.pyplot as plt +import seaborn as sns +import logging +logger = logging.getLogger("mylog") + + +def api_sel_feature(x_list, iter=100, alpha=0.5, ts=-0.5, iter_ratio=0.2): + """ + :para x_list: k类别的单个特征的训练样本 [X1,X2,X3,...,Xi,...,Xk], + Xi = np.array([x1,x2,x3...xn]), 第i类别的训练样本数为n + :para iter: 迭代次数 + :para alpha: 调节因子 + :para ts: com_sep_coef的阈值 + :para iter_ratio : 迭代次数阈值 + :return : True-特征与类别相关度高,False-特征与类别相关度低 + """ + com_sep_coef_old = cal_com_sep_coef(x_list, alpha) + # print('com_sep_coef_old:', com_sep_coef_old) + if com_sep_coef_old < ts: + return False, com_sep_coef_old + + X = np.zeros(1) # x_list组合为行向量X + x_len_list = [] # 记录每个类别x的位置 + num_sampler = 0 # 样本总数 + t = 0 + flag = 0 + for x in x_list: + len_x = len(x) + if t == 0: + X = x + x_len_list.append(len_x) + else: + X = np.hstack([X, x]) + x_len_list.append(x_len_list[t - 1] + len_x) + num_sampler += len_x + t += 1 + x_len_list.pop() + num = int(np.ceil(num_sampler / 3)) + + for i in range(iter): + # 生成随机数组 + randmtx = np.random.rand(1, num) + randmtx_ceil = np.ceil(randmtx * num_sampler).astype(int) + randmtx_ceil = np.sort(randmtx_ceil[0, :]) - 1 + + # 随机取值,重排后,替换原来的数据,组成新数组 + X_new_sel = X.copy() + X_new_sel[randmtx_ceil] = np.random.permutation(X[randmtx_ceil]) + + X_new_list = np.split(X_new_sel, x_len_list) + com_sep_coef_new = cal_com_sep_coef(X_new_list, alpha) + if com_sep_coef_new <= com_sep_coef_old: + flag += 1 + # print('com_sep_coef_new:', com_sep_coef_new) + logger.info('flag:' + str(flag) +', iter:' + str(iter) + ', falg/iter:' + str(int(flag)/int(iter))) + if flag > (iter * iter_ratio): + return False, com_sep_coef_old + return True, com_sep_coef_old + +def cal_com_coef(x_list): + """ + :para x_list: k类别的单个特征的训练样本 [X1,X2,X3,...,Xi,...,Xk],Xi = np.array([x1,x2,x3...xn]), 第i类别的训练样本数为n + :return com_coef : 类内聚合因子(Compactness Coefficient) + """ + class_num = len(x_list) + coef_array = np.full((1, class_num), 0.0) + for m in range(class_num): + sample_num = len(x_list[m]) + c = np.full((1, sample_num), 0.0) + for u in range(sample_num): + l = np.full((1, sample_num), x_list[m][u]) + c[0, u] = np.sum(np.abs(l - x_list[m])) + coef_array[0, m] = np.sum(c) / (sample_num * (sample_num - 1)) + com_coef = np.sum(coef_array) / class_num + return com_coef + +def cal_sep_coef(x_list): + """ + :para x_list : k类别的单个特征的训练样本 [X1,X2,X3,...,Xi,...,Xk],Xi = np.array([x1,x2,x3...xn]), 第i类别的训练样本数为n + :return sep_coef : 类间离散度(Separation Coefficient) + """ + class_num = len(x_list) + coef_list = [] + coef_sum = 0 + for m in range(class_num): + xm = x_list[m] + l_xm = len(xm) + for n in range(class_num): + if not n == m: + xn = x_list[n] + l_xn = len(xn) + xm = np.expand_dims(xm, 1) + coef_list.append(np.sum(np.abs(xm - xn)) / (l_xm * l_xn)) + for coef in coef_list: + coef_sum = coef_sum + coef + + if class_num == 1 or class_num == 0: + sep_coef = coef_sum + else: + sep_coef = coef_sum / (class_num * (class_num - 1)) + return sep_coef + +def cal_com_sep_coef(x_list, alpha = 0.5): + """ + :para x_list: k类别的单个特征的训练样本 [X1,X2,X3,...,Xi,...,Xk],Xi = np.array([x1,x2,x3...xn]), 第i类别的训练样本数为n + :para alpha : 调节因子 + :return com_sep_coef: 类内聚合度和类间离散度的因子(Compactness- Separation Coeffcient) + """ + if not alpha >= 0 and alpha <= 1: + raise ('input_para_alpha beyond (0,1)!') + com_coef = cal_com_coef(x_list) + sep_coef = cal_sep_coef(x_list) + com_sep_coef = alpha * com_coef - (1-alpha) * sep_coef + return com_sep_coef + +def get_logistic_rand_number(num, u=0.4): #弃用 + randmtx = np.full((1, num), 0.0) + # randmtx[0,0] = np.random.rand(1, 1) #随机初始值 + randmtx[0, 0] = 0.5 #初始值 + + for i in range(1, num): + randmtx[0, i] = u * randmtx[0, i-1]*(1-randmtx[0, i-1]) + randmtx = randmtx * 3 * num + randmtx_ceil = np.ceil(randmtx) + + # 绘制随机数分布图 + # randmty = np.arange(0,num,1) + # randmty = np.expand_dims( randmty, 1) + # fig, axes = plt.subplots(1, 1, figsize=(5, 5)) + # axes.scatter(randmty, randmtx_ceil, alpha=.3, label='ground truth') + # axes.legend() + # plt.tight_layout() + # plt.show() + return randmtx_ceil + +def test(): + '''测试生成随机数''' + # 插入 + # a = np.array([3.4, 2.5, 1.8, 4.7, 5.6, 2.1]) + # b = np.array([2.5, 4.7, 5.6]) + # c = a[[0,1]] + # a[[0,1]] = np.array([1, 1]) + + # 随机排列 + random.shuffle() + + # logist随机数 + sns.distplot(random.normal(scale=2, size=1000), hist=False, label='normal') + sns.distplot(random.logistic(loc=2, scale=0.5, size=1000), hist=False, label='logistic') + plt.show() + + # 绘制随机数 + randmtx = random.logistic(loc=0.5, scale=0.5, size=100) + randmtx.sort(axis=0) + randmty = np.arange(0,100,1) + randmty = np.expand_dims(randmty, 1) + fig, axes = plt.subplots(1, 1, figsize=(5, 5)) + axes.scatter(randmty, randmtx, alpha=.3, label='ground truth') + axes.legend() + plt.tight_layout() + plt.show() + +# if __name__ == '__main__': + # 例子 + # x1 = np.array([1, 1.1]) + # x2 = np.array([2, 2.1, 2.2]) + # x3 = np.array([3, 3.4, 3.1]) + # x_list = [x1, x2, x3] + # com_sep_coef = cal_com_sep_coef(x_list, 0.5) + # flag = api_sel_feature(x_list) + # print('done') + + diff --git a/tool/algorithm/ml/machineLearning.py b/tool/algorithm/ml/machineLearning.py new file mode 100644 index 0000000..c70a675 --- /dev/null +++ b/tool/algorithm/ml/machineLearning.py @@ -0,0 +1,421 @@ +import sklearn # 用于解决打包错误 +import sklearn.utils # 用于解决打包错误 +import sklearn.utils._cython_blas # 用于解决打包错误 +import sklearn.utils._weight_vector # 用于解决打包错误 +import sklearn.neighbors # 用于解决打包错误 +import sklearn.neighbors._typedefs # 用于解决打包错误 +import sklearn.neighbors._partition_nodes # 用于解决打包错误 +import sklearn.neighbors._quad_tree # 用于解决打包错误 +import sklearn.tree._utils # 用于解决打包错误 +from sklearn.cross_decomposition import PLSRegression +from sklearn.ensemble import ExtraTreesClassifier +from sklearn.ensemble import RandomForestClassifier +from sklearn.ensemble import ExtraTreesClassifier +from sklearn.svm import SVC +import numpy as np +from scipy.stats import pearsonr +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.block.blockprocess import BlockProcess +import logging +import os +import glob +from PIL import Image +from tool.file.fileHandle import fileHandle +import multiprocessing +logger = logging.getLogger("mylog") +file = fileHandle() + +class MachineLeaning: + """ + 机器学习库 + """ + def __init__(self): + pass + + @staticmethod + def gene_optimal_train_set(train_data_dic, feature_tif_dir, important_threshold=0.3, correlation_threshold=0.7): # todo 修改特征重要性 + ml = MachineLeaning() + name_list = ml.get_name_list(feature_tif_dir) + X_train, Y_train = ml.gene_train_set(train_data_dic, feature_tif_dir) + optimal_feature = ml.sel_optimal_feature_set(X_train, Y_train, threshold=important_threshold) + optimal_feature = ml.remove_correlation_feature(X_train, optimal_feature, threshold=correlation_threshold) + X_train = X_train[:, optimal_feature] + logger.info('train_feature:%s', np.array(name_list)[optimal_feature]) + return X_train, Y_train, optimal_feature + + @ staticmethod + def sel_optimal_feature(X_train, Y_train, name_list,important_threshold=0.3, correlation_threshold=0.7): + ml = MachineLeaning() + optimal_feature = ml.sel_optimal_feature_set(X_train, Y_train, threshold=important_threshold) + optimal_feature = ml.remove_correlation_feature(X_train, optimal_feature, threshold=correlation_threshold) + X_train = X_train[:, optimal_feature] + logger.info('train_feature:%s', np.array(name_list)[optimal_feature]) + return X_train, Y_train, optimal_feature + + @staticmethod + def gene_test_set(feature_tif_dir, optimal_feature): + """ + 生成测试集 + :param feature_tif_dir : 特征影像路径字典 + :param optimal_feature : 最优特征子集 + :return X_test_list : 分块测试集影像路径 + """ + in_tif_paths = list(glob.glob(os.path.join(feature_tif_dir, '*.tif'))) + cols = ImageHandler.get_img_width(in_tif_paths[0]) + rows = ImageHandler.get_img_height(in_tif_paths[0]) + workspace_block_tif_path = os.path.join(feature_tif_dir, 'block') + workspace_block_feature_path = os.path.join(feature_tif_dir, 'feature') + file.creat_dirs([workspace_block_tif_path, workspace_block_feature_path]) + + # 特征分块 + bp = BlockProcess() + block_size = bp.get_block_size(rows, cols) + + bp.cut(feature_tif_dir, workspace_block_tif_path, ['tif', 'tiff'], 'tif', block_size) + img_dir, img_name = bp.get_file_names(workspace_block_tif_path, ['tif']) + dir_dict_all = bp.get_same_img(img_dir, img_name) + + # 选择最优特征子集特征影像 + dir_dict = {} + for n, key in zip(range(len(dir_dict_all)), dir_dict_all): + if n in optimal_feature: + dir_dict.update({key: dir_dict_all[key]}) + logger.info('test_feature:%s', dir_dict.keys()) + logger.info('blocking tifs success!') + X_test_list = [] + # 特征维度合并 + for key in dir_dict: + key_name = key + block_num = len(dir_dict[key]) + break + for n in range(block_num): + name = os.path.basename(dir_dict[key_name][n]) + suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + name.split('_')[-1] + features_path = os.path.join(workspace_block_feature_path, "features" + suffix) # + "\\features" + suffix + X_test_list.append(features_path) + features_array = np.zeros((len(dir_dict), block_size, block_size), dtype='float32') + for m, value in zip(range(len(dir_dict)), dir_dict.values()): + features_array[m, :, :] = ImageHandler.get_band_array(value[n]) + features_array[np.isnan(features_array)] = 0.0 # 异常值转为0 + ImageHandler.write_img(features_path, '', [0, 0, 0, 0, 0, 0], features_array) + logger.info('create features matrix success!') + # file.del_folder(workspace_block_tif_path) + # file.del_folder(workspace_block_feature_path) + return X_test_list + + @staticmethod + def predict_blok(clf, X_test, rows, cols, img_path, row_begin, col_begin, block_sum, n): + logger.info('total:%s,block:%s testing data !path:%s', block_sum, n, img_path) + + Y_test = clf.predict(X_test) + img = Y_test.reshape(rows, cols) + out_image = Image.fromarray(img) + out_image.save(img_path) + # bp = BlockProcess() + # bp.assign_spatial_reference_bypoint(row_begin, col_begin, self.__proj, self.__geo, img_path) + # sr = osr.SpatialReference() + # sr.ImportFromWkt(self.__proj) + # geo_transform = (self.__geo[0] + col_begin * self.__geo[1] + row_begin * self.__geo[2], + # self.__geo[1], + # self.__geo[2], + # self.__geo[3] + col_begin * self.__geo[4] + row_begin * self.__geo[5], + # self.__geo[4], + # self.__geo[5] + # ) + # dst_ds = gdal.Open(img_path, gdal.GA_Update) + # if dst_ds is None: + # return False + # dst_ds.SetProjection(sr.ExportToWkt()) + # dst_ds.SetGeoTransform(geo_transform) + # del dst_ds + logger.info('total:%s,block:%s test data finished !path:%s', block_sum, n, img_path) + return True + + @staticmethod + def predict(clf, X_test_list, out_tif_name, workspace_processing_path,rows, cols): + """ + 预测数据 + :param clf : svm模型 + :return X_test_list: 分块测试集影像路径 + """ + ml = MachineLeaning() + # 开启多进程处理 + bp = BlockProcess() + block_size = bp.get_block_size(rows, cols) + + block_features_dir = X_test_list + bp_cover_dir = os.path.join(workspace_processing_path, out_tif_name + '\\') # workspace_processing_path + out_tif_name + '\\' + file.creat_dirs([bp_cover_dir]) + + processes_num = min([len(block_features_dir), multiprocessing.cpu_count() - 1]) + pool = multiprocessing.Pool(processes=processes_num) + + for path, n in zip(block_features_dir, range(len(block_features_dir))): + name = os.path.split(path)[1] + band = ImageHandler.get_bands(path) + if band == 1: + features_array = np.zeros((1, 1024, 1024), dtype=float) + feature_array = ImageHandler.get_data(path) + features_array[0, :, :] = feature_array + else: + features_array = ImageHandler.get_data(path) + X_test = np.reshape(features_array, (features_array.shape[0], features_array[0].size)).T + + suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + name.split('_')[-1] + img_path = os.path.join(bp_cover_dir, out_tif_name + suffix) # bp_cover_dir + out_tif_name + suffix + row_begin = int(name.split('_')[-4]) + col_begin = int(name.split('_')[-2]) + pool.apply_async(ml.predict_blok, (clf, X_test, block_size, block_size, img_path, row_begin, col_begin, len(block_features_dir), n)) + + pool.close() + pool.join() + + # 合并影像 + data_dir = bp_cover_dir + out_path = workspace_processing_path[0:-1] + bp.combine(data_dir, cols, rows, out_path, file_type=['tif'], datetype='float32') + + # 添加地理信息 + cover_path = os.path.join(workspace_processing_path, out_tif_name + ".tif") # workspace_processing_path + out_tif_name + ".tif" + # bp.assign_spatial_reference_byfile(self.__ref_img_path, cover_path) + return cover_path + + @staticmethod + def predict_VP(clf, X_test_list, out_tif_name, workspace_processing_path, rows, cols): + """ + 预测数据 + :param clf : svm模型 + :return X_test_list: 分块测试集影像路径 + """ + ml = MachineLeaning() + # 开启多进程处理 + bp = BlockProcess() + block_size = bp.get_block_size(rows, cols) + + block_features_dir = X_test_list + bp_cover_dir = os.path.join(workspace_processing_path, out_tif_name, + 'pre_result\\') # workspace_processing_path + out_tif_name + '\\' + file.creat_dirs([bp_cover_dir]) + + processes_num = min([len(block_features_dir), multiprocessing.cpu_count() - 1]) + pool = multiprocessing.Pool(processes=processes_num) + + for path, n in zip(block_features_dir, range(len(block_features_dir))): + name = os.path.split(path)[1] + features_array = ImageHandler.get_data(path) + + X_test = np.reshape(features_array, (features_array.shape[0], features_array[0].size)).T + + suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + \ + name.split('_')[-1] + img_path = os.path.join(bp_cover_dir, out_tif_name + suffix) # bp_cover_dir + out_tif_name + suffix + row_begin = int(name.split('_')[-4]) + col_begin = int(name.split('_')[-2]) + pool.apply_async(ml.predict_blok, ( + clf, X_test, block_size, block_size, img_path, row_begin, col_begin, len(block_features_dir), n)) + + pool.close() + pool.join() + + # 合并影像 + data_dir = bp_cover_dir + out_path = workspace_processing_path[0:-1] + bp.combine(data_dir, cols, rows, out_path, file_type=['tif'], datetype='float32') + + # 添加地理信息 + cover_path = os.path.join(workspace_processing_path, + out_tif_name + ".tif") # workspace_processing_path + out_tif_name + ".tif" + # bp.assign_spatial_reference_byfile(self.__ref_img_path, cover_path) + return cover_path + + @staticmethod + def get_name_list(feature_tif_dir): + in_tif_paths = list(glob.glob(os.path.join(feature_tif_dir, '*.tif'))) + name_list = [] + dim = len(in_tif_paths) + for n, path in zip(range(dim), in_tif_paths): + name_list.append(str(n)+': '+os.path.split(path)[1]) + logger.info('feature_list:%s', name_list) + return name_list + + + @staticmethod + def gene_train_set(train_data_dic, feature_tif_dir): + """ + 生成训练集 + :param train_data_dic : 从csv读取的训练数据 + :param feature_tif_dir : 特征影像路径路径 + :return X_train, Y_train : 训练数据 + """ + in_tif_paths = list(glob.glob(os.path.join(feature_tif_dir, '*.tif'))) + dim = len(in_tif_paths) + X_train = np.empty(shape=(0, dim)) + Y_train = np.empty(shape=(0, 1)) + + ids = train_data_dic['ids'] + positions = train_data_dic['positions'] + for id, points in zip(ids, positions): + # for data in train_data_list: + if points == []: + raise Exception('data is empty!') + row, col = zip(*points) + l = len(points) + X = np.empty(shape=(l, dim)) + + for n, tif_path in zip(range(dim), in_tif_paths): + feature_array = ImageHandler.get_data(tif_path) + feature_array[np.isnan(feature_array)] = 0 # 异常值填充为0 + x = feature_array[row, col].T + X[:, n] = x + + Y = np.full((l, 1), id) + X_train = np.vstack((X_train, X)) + Y_train = np.vstack((Y_train, Y)) + Y_train = Y_train.T[0, :] + + logger.info("gene_train_set success!") + return X_train, Y_train + + @staticmethod + def standardization(data, num=1): + # 矩阵标准化到[0,1] + min = np.nanmin(data) + max = np.nanmax(data) + data[np.isnan(data)] = min # 异常值填充为0 + _range = max - min + return (data - min) / _range * num + + @staticmethod + def sel_optimal_feature_set(X_train, Y_train, threshold=0.01): + """ + 筛选最优特征组合(极度随机树) + """ + model = ExtraTreesClassifier() + max = np.max(Y_train) + if max < 0.1: + Y_train = (Y_train*10000).astype('int') + model.fit(X_train, Y_train.astype('int')) + # select the relative importance of each attribute + importances = model.feature_importances_ + logger.info('importances:%s,threshold=%s', importances, threshold) + + importances_resort = -np.sort(-importances) # 从大到小排序 + imp_argsort = np.argsort(-importances) # 输出从大到小的序号 + + optimal_feature = list(imp_argsort[np.where(importances_resort > threshold)]) # 过滤重要性低的特征 + logger.info('optimal_feature:%s', optimal_feature) + + if len(optimal_feature)==0: + logger.error('optimal_feature is empty') + optimal_feature = list(imp_argsort) + return optimal_feature + + @staticmethod + def correlation_map(x, y): + # https://blog.csdn.net/weixin_39836726/article/details/110783640 + # cc matrix based on scipy pearsonr + n_row_x = x.shape[0] + n_row_y = x.shape[0] + ccmtx_xy = np.empty((n_row_x, n_row_y)) + for n in range(n_row_x): + for m in range(n_row_y): + ccmtx_xy[n, m] = pearsonr(x[n, :], y[m, :])[0] + return ccmtx_xy + + @staticmethod + def remove_correlation_feature(X_train,validity_list, threshold=0.85): + """ + 相关性抑制,去除相关性 + :param X_train : 训练集 + :param validity_list : 最优特征子集 + :param threshold: 相关性阈值 + :return validity_list : 最优特征子集 + """ + ccmtx = MachineLeaning().correlation_map(X_train[:, validity_list].T, X_train[:, validity_list].T) + ccmtx = np.abs(ccmtx) + for r in range(len(validity_list)): + for c in range(len(validity_list)): + if c <= r: + ccmtx[r, c] = 0 + logger.info('correlation_map:\n %s', ccmtx) + # 相关性大于0.85的特征,删除com_sep_coef较大的特征 + high_corr = np.unique(np.where(ccmtx > threshold)[1]) # 删除的特征序号 + validity_list = np.delete(validity_list, high_corr) + logger.info('validity_list_corr:%s', validity_list) + logger.info(validity_list) + return validity_list + + @staticmethod + def gene_train_data(block_features_dir,rows,cols,block_size,measured_data_img): + # 生成训练集 + X_train = [] + Y_train = [] + + block_rows = int(np.ceil(rows/block_size)) + block_cols = int(np.ceil(cols/block_size)) + + for data, n in zip(measured_data_img, range(len(measured_data_img))): + row = data[0] + col = data[1] + block_row = row//block_size + block_col = col//block_size + + if block_row == block_rows-1: + part_img_row = row - (rows - block_size) + else: + part_img_row = row % block_size + + if block_col == block_cols-1: + part_img_col = col - (cols-block_size) + else: + part_img_col = col % block_size + + features_path = block_features_dir[block_row*block_rows + block_col] + features_array = ImageHandler().get_data(features_path) + + feature = features_array[:, part_img_row, part_img_col] + if not np.isnan(feature).any() or np.isinf(feature).any(): + X_train.append(list(feature)) + Y_train.append([data[2]]) + logger.info('total:%s,num:%s create train set success!', len(measured_data_img), n) + return np.array(X_train), np.array(Y_train) + + @staticmethod + def trainRF(X_train, Y_train): + #随机森林 + logger.info('RF trainning') + clf = RandomForestClassifier() + clf.fit(X_train, Y_train) + return clf + + @staticmethod + def trainSVM(X_train, Y_train, cost=1, kernel='rbf'): + logger.info('svm trainning') + clf = SVC(decision_function_shape='ovo') + clf.fit(X_train, Y_train) + SVC(C=cost, cache_size=1000, class_weight='balanced', coef0=0.0, decision_function_shape='ovr', + degree=3, gamma='auto', kernel=kernel, max_iter=-1, probability=False, random_state=None, + shrinking=True, tol=0.001, verbose=True) + return clf + @staticmethod + def vegetationPhenology_combine_feature(feature_dir,workspace_processing_path, name, rows, cols, debug =False): + ml = MachineLeaning() + path_list = list(glob.glob(os.path.join(feature_dir, '*.tif'))) + #多维矩阵合并为一个 + name_featuresPath_dic = {} + dim = len(path_list) + features_path = workspace_processing_path + name + "/"+ name +'_features.tif' + if debug== False: + features_array = np.zeros((dim, rows, cols), dtype='float16') + for m, path in zip(range(dim), path_list): + data = ImageHandler.get_data(path) + data = ml.standardization(data) + features_array[m, :, :] = data + # 异常值转为0 + features_array[np.isnan(features_array)] = 0.0 + features_array[np.isinf(features_array)] = 0.0 + ImageHandler.write_img(features_path, '', [0, 0, 0, 0, 0, 0], features_array) + name_featuresPath_dic.update({name: features_path}) + return name_featuresPath_dic + + diff --git a/tool/algorithm/polsarpro/AHVToPolsarpro.py b/tool/algorithm/polsarpro/AHVToPolsarpro.py new file mode 100644 index 0000000..ef60b54 --- /dev/null +++ b/tool/algorithm/polsarpro/AHVToPolsarpro.py @@ -0,0 +1,491 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:AHVToPolsarpro.py +@Function:全极化影像转成polsarpro格式T3数据 +@Contact: +@Author:SHJ +@Date:2021/9/18 16:44 +@Version:1.0.0 +""" +import os +import numpy as np +import glob +import struct +from tool.algorithm.image.ImageHandle import ImageHandler + + +class AHVToPolsarpro: + """ + 全极化影像转换为bin格式T3矩阵,支持polsarpro处理 + """ + + def __init__(self, hh_hv_vh_vv_path_list=[]): + self._hh_hv_vh_vv_path_list = hh_hv_vh_vv_path_list + pass + + @staticmethod + def __ahv_to_s2_veg(ahv_dir): + """ + 全极化影像转S2矩阵 + :param ahv_dir: 全极化影像文件夹路径 + :return: 极化散射矩阵S2 + """ + global s11 + in_tif_paths = list(glob.glob(os.path.join(ahv_dir, '*.tif'))) + in_tif_paths1 = list(glob.glob(os.path.join(ahv_dir, '*.tiff'))) + in_tif_paths += in_tif_paths1 + s11, s12, s21, s22 = None, None, None, None + flag_list = [0, 0, 0, 0] + for in_tif_path in in_tif_paths: + + # 读取原始SAR影像 + proj, geotrans, data = ImageHandler.read_img(in_tif_path) + + # 获取极化类型 + if '_HH' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s11 = data_real + 1j * data_imag + flag_list[0] = 1 + elif '_HV' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s12 = data_real + 1j * data_imag + flag_list[1] = 1 + elif '_VH' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s21 = data_real + 1j * data_imag + flag_list[2] = 1 + elif '_VV' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s22 = data_real + 1j * data_imag + flag_list[3] = 1 + else: + continue + if not flag_list == [1, 1, 1, 1]: + raise Exception('HH or HV or VH or VV is not in path :%s', ahv_dir) + return s11, s12, s21, s22 + + @staticmethod + def __ahv_to_s2_soil(ahv_dir): + """ + 全极化影像转S2矩阵 + :param ahv_dir: 全极化影像文件夹路径 + :return: 极化散射矩阵S2 + """ + global s11 + in_tif_paths = list(glob.glob(os.path.join(ahv_dir, '*.tif'))) + in_tif_paths1 = list(glob.glob(os.path.join(ahv_dir, '*.tiff'))) + in_tif_paths += in_tif_paths1 + s11, s12, s21, s22 = None, None, None, None + flag_list = [0, 0, 0, 0] + for in_tif_path in in_tif_paths: + + # 读取原始SAR影像 + proj, geotrans, data = ImageHandler.read_img(in_tif_path) + + # 获取极化类型 + if 'HH' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s11 = data_real + 1j * data_imag + flag_list[0] = 1 + elif 'HV' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s12 = data_real + 1j * data_imag + flag_list[1] = 1 + elif 'VH' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s21 = data_real + 1j * data_imag + flag_list[2] = 1 + elif 'VV' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s22 = data_real + 1j * data_imag + flag_list[3] = 1 + else: + continue + if not flag_list == [1, 1, 1, 1]: + raise Exception('HH or HV or VH or VV is not in path :%s', ahv_dir) + return s11, s12, s21, s22 + + @staticmethod + def __ahv_to_s2_list(ahv_path_list): + """ + 全极化影像转S2矩阵 + :param ahv_dir: 全极化影像文件夹路径 + :return: 极化散射矩阵S2 + """ + global s11 + in_tif_paths = ahv_path_list + s11, s12, s21, s22 = None, None, None, None + flag_list = [0, 0, 0, 0] + for in_tif_path in in_tif_paths: + + # 读取原始SAR影像 + proj, geotrans, data = ImageHandler.read_img(in_tif_path) + + # 获取极化类型 + if 'HH' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s11 = data_real + 1j * data_imag + flag_list[0] = 1 + elif 'HV' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s12 = data_real + 1j * data_imag + flag_list[1] = 1 + elif 'VH' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s21 = data_real + 1j * data_imag + flag_list[2] = 1 + elif 'VV' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s22 = data_real + 1j * data_imag + flag_list[3] = 1 + else: + continue + if not flag_list == [1, 1, 1, 1]: + raise Exception('HH or HV or VH or VV is not in path') + return s11, s12, s21, s22 + + + @staticmethod + def __ahv_to_s2_list_2(hh_hv_vh_vv_path_list): + """ + 全极化影像转S2矩阵 + :param ahv_dir: 全极化影像文件夹路径 + :return: 极化散射矩阵S2 + """ + global s11 + in_tif_paths = hh_hv_vh_vv_path_list + s11, s12, s21, s22 = None, None, None, None + flag_list = [0, 0, 0, 0] + for in_tif_path, n in zip(in_tif_paths, range(len(in_tif_paths))): + + # 读取原始SAR影像 + proj, geotrans, data = ImageHandler.read_img(in_tif_path) + + # 获取极化类型 + if n == 0: + data_real = data[0, :, :] + data_imag = data[1, :, :] + s11 = data_real + 1j * data_imag + flag_list[0] = 1 + elif n == 1: + data_real = data[0, :, :] + data_imag = data[1, :, :] + s12 = data_real + 1j * data_imag + flag_list[1] = 1 + elif n == 2: + data_real = data[0, :, :] + data_imag = data[1, :, :] + s21 = data_real + 1j * data_imag + flag_list[2] = 1 + elif n == 3: + data_real = data[0, :, :] + data_imag = data[1, :, :] + s22 = data_real + 1j * data_imag + flag_list[3] = 1 + else: + continue + if not flag_list == [1, 1, 1, 1]: + raise Exception('HH or HV or VH or VV is not in path') + return s11, s12, s21, s22 + + @staticmethod + def __s2_to_t3(s11, s12, s21, s22): + """ + S2矩阵转T3矩阵 + :param s11: HH极化数据 + :param s12: HV极化数据 + :param s21: VH极化数据 + :param s22: VV极化数据 + :return: 极化相干矩阵T3 + """ + HH = s11 + HV = s12 + VH = s21 + VV = s22 + + t11 = (np.abs(HH + VV)) ** 2 / 2 + t12 = (HH + VV) * np.conj(HH - VV) / 2 + t13 = (HH + VV) * np.conj(HV + VH) + + t21 = (HH - VV) * np.conj(HH + VV) / 2 + t22 = np.abs(HH - VV) ** 2 / 2 + t23 = (HH - VV) * np.conj(HV + VH) + + t31 = (HV + VH) * np.conj(HH + VV) + t32 = (HV + VH) * np.conj(HH - VV) + t33 = 2 * np.abs(HV + VH) ** 2 + return t11, t12, t13, t21, t22, t23, t31, t32, t33 + + def __t3_to_polsarpro_t3(self, out_dir, t11, t12, t13, t22, t23, t33): + """ + T3矩阵转bin格式,支持 polsarpro处理 + :param out_dir: 输出的文件夹路径 + :param t11: + :param t12: + :param t13: + :param t22: + :param t23: + :param t33: + :return: bin格式矩阵T3和头文件 + """ + if not os.path.exists(out_dir): + os.makedirs(out_dir) + + rows = t11.shape[0] + cols = t11.shape[1] + bins_dict = { + 'T11.bin': t11, + 'T12_real.bin': t12.real, + 'T12_imag.bin': t12.imag, + 'T13_real.bin': t13.real, + 'T13_imag.bin': t13.imag, + 'T22.bin': t22, + 'T23_real.bin': t23.real, + 'T23_imag.bin': t23.imag, + 'T33.bin': t33} + + for name, data in bins_dict.items(): + bin_path = os.path.join(out_dir, name) + self.__write_img_bin(data, bin_path) # todo 修改T3阵保存方式 + # data.tofile(bin_path) + out_hdr_path = bin_path + '.hdr' + self.__write_bin_hdr(out_hdr_path, bin_path, rows, cols) + + self.__write_config_file(out_dir, rows, cols) + + def rows(self): + """获取影像行数""" + return self._rows + + def cols(self): + """获取影像列数""" + return self._cols + + def __write_img_bin(self, im, file_path): + """ + 写入影像到bin文件中,保存为float32类型 + :param im : 影像矩阵数据,暂支持单通道影像数据 + :param file_path: bin文件的完整路径 + """ + with open(file_path, 'wb') as f: + self._rows = im.shape[0] + self._cols = im.shape[1] + for row in range(self._rows): + im_bin = struct.pack("f" * self._cols, *np.reshape(im[row, :], (self._cols, 1), order='F')) + f.write(im_bin) + f.close() + + @staticmethod + def __write_bin_hdr(out_hdr_path, bin_path, rows, cols): + """ + 写入影像的头文件 + :param out_hdr_path : 头文件的路径 + :param bin_path: bin文件的路径 + :param rows: 影像的行数 + :param cols: 影像的列数 + """ + h1 = 'ENVI' + h2 = 'description = {' + h3 = 'File Imported into ENVI. }' + h4 = 'samples = ' + str(cols) # 列 + h5 = 'lines = ' + str(rows) # 行 + h6 = 'bands = 1 ' # 波段数 + h7 = 'header offset = 0' + h8 = 'file type = ENVI Standard' + h9 = 'data type = 4' # 数据格式 + h10 = 'interleave = bsq' # 存储格式 + h11 = 'sensor type = Unknown' + h12 = 'byte order = 0' + h13 = 'band names = {' + h14 = bin_path + '}' + # h = [h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14] + # doc = open(out_hdr_path, 'w') + # for i in range(0, 14): + # print(h[i], end='', file=doc) + # print('\n', end='', file=doc) + h = [h1, h4, h5, h6, h7, h8, h9, h10, h12] + doc = open(out_hdr_path, 'w') + for i in range(0, 9): + print(h[i], end='', file=doc) + print('\n', end='', file=doc) + doc.close() + + @staticmethod + def __write_config_file(out_config_dir, rows, cols): + """ + 写入polsarpro配置文件 + :param out_config_dir : 配置文件路径 + :param rows: 影像的行数 + :param cols: 影像的列数 + """ + h1 = 'Nrow' + h2 = str(rows) + h3 = '---------' + h4 = 'Ncol' + h5 = str(cols) + h6 = '---------' + h7 = 'PolarCase' + h8 = 'monostatic' + h9 = '---------' + h10 = 'PolarType' + h11 = 'full' + h = [h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11] + + out_config_path = os.path.join(out_config_dir, 'config.txt') + doc = open(out_config_path, 'w') + for i in range(0, 11): + print(h[i], end='', file=doc) + print('\n', end='', file=doc) + doc.close() + + def incidence_tif2bin(self, incidence_file, out_path): + if not os.path.exists(out_path): + os.mkdir(out_path) + incidence_bin = os.path.join(out_path, 'incidence.bin') + data = ImageHandler().get_data(incidence_file) + rows = data.shape[0] + cols = data.shape[1] + self.__write_img_bin(data, incidence_bin) + if not os.path.exists(incidence_bin): + raise Exception('incidence to bin failed') + out_hdr_path = incidence_bin + '.hdr' + self.__write_bin_hdr(out_hdr_path, incidence_bin, rows, cols) + return incidence_bin + + def ahv_to_polsarpro_t3_veg(self, out_file_dir, in_ahv_dir=''): + + if self._hh_hv_vh_vv_path_list == [] : + s11, s12, s21, s22 = self.__ahv_to_s2_veg(in_ahv_dir) + else: + s11, s12, s21, s22 = self.__ahv_to_s2_list_2(self._hh_hv_vh_vv_path_list) + + t11, t12, t13, t21, t22, t23, t31, t32, t33 = self.__s2_to_t3( + s11, s12, s21, s22) + + self.__t3_to_polsarpro_t3(out_file_dir, t11, t12, t13, t22, t23, t33) + + + def ahv_to_polsarpro_t3_soil(self, out_file_dir, in_ahv_dir=''): + + if self._hh_hv_vh_vv_path_list == [] : + s11, s12, s21, s22 = self.__ahv_to_s2_soil(in_ahv_dir) + else: + s11, s12, s21, s22 = self.__ahv_to_s2_list_2(self._hh_hv_vh_vv_path_list) + + t11, t12, t13, t21, t22, t23, t31, t32, t33 = self.__s2_to_t3( + s11, s12, s21, s22) + + self.__t3_to_polsarpro_t3(out_file_dir, t11, t12, t13, t22, t23, t33) + + def calibration(self, calibration_value, in_ahv_dir='', name=''): + if name == '': + out_dir = os.path.join(in_ahv_dir, 'calibration') + else: + out_dir = os.path.join(in_ahv_dir, name, 'calibration') + flag_list = [0, 0, 0, 0] + if self._hh_hv_vh_vv_path_list == []: # 地表覆盖、土壤盐碱度 + in_tif_paths = list(glob.glob(os.path.join(in_ahv_dir, '*.tif'))) + in_tif_paths1 = list(glob.glob(os.path.join(in_ahv_dir, '*.tiff'))) + in_tif_paths += in_tif_paths1 + for in_tif_path in in_tif_paths: + # 读取原始SAR影像 + proj, geotrans, data = ImageHandler.read_img(in_tif_path) + name = os.path.basename(in_tif_path) + data_new = np.zeros(data.shape) + # 获取极化类型 + if 'HH' in os.path.basename(in_tif_path): + data_new[0, :, :] = data[0, :, :] * calibration_value[0] + data_new[1, :, :] = data[1, :, :] * calibration_value[0] + ImageHandler.write_img(os.path.join(out_dir, name), proj, geotrans, data_new) + flag_list[0] = 1 + elif 'HV' in os.path.basename(in_tif_path): + data_new[0, :, :] = data[0, :, :] * calibration_value[1] + data_new[1, :, :] = data[1, :, :] * calibration_value[1] + ImageHandler.write_img(os.path.join(out_dir, name), proj, geotrans, data_new) + flag_list[1] = 1 + elif 'VH' in os.path.basename(in_tif_path): + data_new[0, :, :] = data[0, :, :] * calibration_value[2] + data_new[1, :, :] = data[1, :, :] * calibration_value[2] + ImageHandler.write_img(os.path.join(out_dir, name), proj, geotrans, data_new) + flag_list[2] = 1 + elif 'VV' in os.path.basename(in_tif_path): + data_new[0, :, :] = data[0, :, :] * calibration_value[3] + data_new[1, :, :] = data[1, :, :] * calibration_value[3] + ImageHandler.write_img(os.path.join(out_dir, name), proj, geotrans, data_new) + flag_list[3] = 1 + if not flag_list == [1, 1, 1, 1]: + raise Exception('calibration error! ') + else: + for in_tif_path in self._hh_hv_vh_vv_path_list: # 植被物候 + # 读取原始SAR影像 + proj, geotrans, data = ImageHandler.read_img(in_tif_path) + name = os.path.basename(in_tif_path) + data_new = np.zeros(data.shape) + + # 获取极化类型 + if '_HH' in os.path.basename(in_tif_path): + data_new[0, :, :] = data[0, :, :] * calibration_value[0] + data_new[1, :, :] = data[1, :, :] * calibration_value[0] + ImageHandler.write_img(os.path.join(out_dir, name), proj, geotrans, data_new) + flag_list[0] = 1 + elif '_HV' in os.path.basename(in_tif_path): + data_new[0, :, :] = data[0, :, :] * calibration_value[1] + data_new[1, :, :] = data[1, :, :] * calibration_value[1] + ImageHandler.write_img(os.path.join(out_dir, name), proj, geotrans, data_new) + flag_list[1] = 1 + elif '_VH' in os.path.basename(in_tif_path): + data_new[0, :, :] = data[0, :, :] * calibration_value[2] + data_new[1, :, :] = data[1, :, :] * calibration_value[2] + ImageHandler.write_img(os.path.join(out_dir, name), proj, geotrans, data_new) + flag_list[2] = 1 + elif '_VV' in os.path.basename(in_tif_path): + data_new[0, :, :] = data[0, :, :] * calibration_value[3] + data_new[1, :, :] = data[1, :, :] * calibration_value[3] + ImageHandler.write_img(os.path.join(out_dir, name), proj, geotrans, data_new) + flag_list[3] = 1 + if not flag_list == [1, 1, 1, 1]: + raise Exception('calibration error! ') + self._hh_hv_vh_vv_path_list = [] + return out_dir + + + +if __name__ == '__main__': + #实例1: + # atp = AHVToPolsarpro() + # ahv_path = 'D:\\DATA\\GAOFEN3\\2-GF3_MYN_WAV_020086_E107.2_N27.6_20200603_L1A_AHV_L10004843087\\' + # # ahv_path = 'D:\\DATA\\GAOFEN3\\2598957_Paris\\' + # out_file_path = 'D:\\bintest0923\\' + # atp.ahv_to_polsarpro_t3(out_file_path, ahv_path) + + # # 极化分解得到T3矩阵 + # atp = AHVToPolsarpro() + # ahv_path = r"I:\MicroWorkspace\product\C-SAR\SoilSalinity\GF3B_MYC_QPSI_003581_E120.6_N31.3_20220729_L1A_AHV_L10000073024_RPC" + # t3_path = ahv_path + 'psp_t3\\' + # atp.ahv_to_polsarpro_t3(t3_path, ahv_path) + + #实例2: + # dir = r'D:\MicroWorkspace\product\C-SAR\VegetationPhenology\Temporary\preprocessed/' + # path_list = [dir +'GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC_HH_preprocessed.tif', + # dir +'GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC_HV_preprocessed.tif', + # dir +'GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC_VH_preprocessed.tif', + # dir +'GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC_VV_preprocessed.tif'] + # + # + # atp = AHVToPolsarpro(path_list) + # atp.ahv_to_polsarpro_t3(r'D:\MicroWorkspace\product\C-SAR\VegetationPhenology\Temporary\processing\GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC/t3') + + print("done") diff --git a/tool/algorithm/polsarpro/AHVToPolsarproS2.py b/tool/algorithm/polsarpro/AHVToPolsarproS2.py new file mode 100644 index 0000000..1b6fa83 --- /dev/null +++ b/tool/algorithm/polsarpro/AHVToPolsarproS2.py @@ -0,0 +1,228 @@ +""" +@Project :microproduct +@File :AHVToPolsarpro.PY +@Function :将四个极化数据转成S2矩阵文件 +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" +import os +import numpy as np +import glob +import struct +from tool.algorithm.image.ImageHandle import ImageHandler + + +class AHVToPolsarproS2: + """ + 全极化影像转换为bin格式S2矩阵,支持polsarpro处理 + """ + def __init__(self): + + pass + + @staticmethod + def __ahv_to_s2(ahv_dir): + """ + 全极化影像转S2矩阵 + :param ahv_dir: 全极化影像文件夹路径 + :return: 极化散射矩阵S2 + """ + in_tif_paths = list(glob.glob(os.path.join(ahv_dir, '*.tif'))) + + if in_tif_paths == []: + in_tif_paths = list(glob.glob(os.path.join(ahv_dir, '*.tiff'))) + s11, s12, s21, s22 = None,None,None,None + flag_list = [0, 0, 0, 0] + for in_tif_path in in_tif_paths: + + # 读取原始SAR影像 + proj, geotrans, data = ImageHandler.read_img(in_tif_path) + + # 获取极化类型 + if 'HH' in os.path.basename(in_tif_path): + data_real = data[0, :, :] # 获取第一个波段 (实部) + data_imag = data[1, :, :] # 获取第二个波段 (虚部) + s11 = data_real + 1j * data_imag + flag_list[0] = 1 + elif 'HV' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s12 = data_real + 1j * data_imag + flag_list[1] = 1 + elif 'VH' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s21 = data_real + 1j * data_imag + flag_list[2] = 1 + elif 'VV' in os.path.basename(in_tif_path): + data_real = data[0, :, :] + data_imag = data[1, :, :] + s22 = data_real + 1j * data_imag + flag_list[3] = 1 + else: + continue + if not flag_list == [1, 1, 1, 1]: + raise Exception('tif of HH or HV or VH or VV is not in path :%s', ahv_dir) + return s11, s12, s21, s22 + + def __s2_to_bin(self, out_dir, s11, s12, s21, s22): + """ + S2矩阵转bin格式,支持 polsarpro处理 + :param out_dir: 输出的文件夹路径 + :param s11: + :param s12: + :param s21 + :param s22: + :return: bin格式矩阵S2和头文件 + """ + if not os.path.exists(out_dir): + os.makedirs(out_dir) + + rows = s11.shape[0] + cols = s11.shape[1] + bins_dict = {'s11.bin': s11, + 's12.bin': s12, + 's21.bin': s21, + 's22.bin': s22} + + + for name, data in bins_dict.items(): + + bin_path = os.path.join(out_dir, name) + self.__write_slc_img_bin(data, bin_path,name) + out_hdr_path = bin_path+'.hdr' + self.__write_bin_hdr(out_hdr_path, bin_path, rows, cols) + + self.__write_config_file(out_dir, rows, cols) + + @staticmethod + def __write_slc_img_bin(im, file_path,name): + """ + 写入影像到bin文件中,保存为float32类型 + :param im : 影像矩阵数据,暂支持单通道影像数据 + :param file_path: bin文件的完整路径 + """ + with open(file_path, 'wb') as f: + rows = im.shape[0] + cols = im.shape[1] + cre_im = np.zeros((rows, 2*cols), dtype=float) + cre_im[:, ::2] = im.real #存 real + cre_im[:, 1::2] = im.imag #存 imag + for row in range(rows): + cre_im_bin = struct.pack("f" * 2*cols, *np.reshape(cre_im[row, :], (2*cols, 1), order='F')) + f.write(cre_im_bin) + f.close() + + @staticmethod + def read_slc_bin_to_img(bin_path): + """ + 读取bin格式二进制数据,输出为矩阵 + :param bin_path : bin文件的路径,包含.bin,.config + :return : 矩阵信息 + """ + (bin_dir, bin_name) = os.path.split(bin_path) + config_path = os.path.join(bin_dir, 'config.txt') + config = open(config_path, 'r').read().split('\n', -1) + rows = int(config[1]) + cols = int(config[4]) + + bin_file = open(bin_path, 'rb') # 打开二进制文件 + size = os.path.getsize(bin_path) # 获得文件大小 + if size < rows * cols * 4 * 2: + raise Exception( + 'bin size less than rows*cols*4! size:', + size, + 'byte, rows:', + rows, + 'cols:', + cols) + + bin_data = np.zeros([rows, cols*2], dtype=np.float32) + img_array = np.zeros([2,rows, cols], dtype=np.float32) + for row in range(rows): + data = bin_file.read(4 * cols * 2) # 每次读取一行的二进制数据 + row_data = struct.unpack('f' * cols*2, data) # 转为一行float数据 + bin_data[row, :] = row_data + bin_file.close() + img_array[0] = bin_data[:, ::2] # real + img_array[1] = bin_data[:, 1::2] # imag + return img_array + + + @staticmethod + def __write_bin_hdr(out_hdr_path, bin_path, rows, cols): + """ + 写入影像的头文件 + :param out_hdr_path : 头文件的路径 + :param bin_path: bin文件的路径 + :param rows: 影像的行数 + :param cols: 影像的列数 + """ + h1 = 'ENVI' + h2 = 'description = {' + h3 = 'ENVI File, Created [] }' + h4 = 'samples = ' + str(cols) # 列 + h5 = 'lines = ' + str(rows) # 行 + h6 = 'bands = 1 ' # 波段数 + h7 = 'header offset = 0' + h8 = 'file type = ENVI Standard' + h9 = 'data type = 6' # 数据格式,6代表复数 + h10 = 'interleave = bsq' # 存储格式 + h11 = 'sensor type = Unknown' + h12 = 'byte order = 0' + h13 = 'wavelength units = Unknown' + h14 = 'complex function = Power' + h = [h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14] + doc = open(out_hdr_path, 'w') + for i in range(0, 14): + print(h[i], end='', file=doc) + print('\n', end='', file=doc) + doc.close() + + @staticmethod + def __write_config_file(out_config_dir, rows, cols): + """ + 写入polsarpro配置文件 + :param out_config_dir : 配置文件路径 + :param rows: 影像的行数 + :param cols: 影像的列数 + """ + h1 = 'Nrow' + h2 = str(rows) + h3 = '---------' + h4 = 'Ncol' + h5 = str(cols) + h6 = '---------' + h7 = 'PolarCase' + # h8 = 'monostatic' + h8 = 'bistatic' + h9 = '---------' + h10 = 'PolarType' + h11 = 'full' + h = [h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11] + + out_config_path = os.path.join(out_config_dir, 'config.txt') + doc = open(out_config_path, 'w') + for i in range(0, 11): + print(h[i], end='', file=doc) + print('\n', end='', file=doc) + doc.close() + + def api_ahv_to_polsarpro_s2(self, out_file_dir, in_ahv_dir): + + s11, s12, s21, s22 = self.__ahv_to_s2(in_ahv_dir) + + self.__s2_to_bin(out_file_dir, s11, s12, s21, s22) + + +# if __name__ == '__main__': +# # test() +# atp = AHVToPolsarproS2() +# ahv_path = r'D:\DATA\GAOFEN3\2-GF3_MYN_WAV_020086_E107.2_N27.6_20200603_L1A_AHV_L10004843087' +# # ahv_path = 'D:\\DATA\\GAOFEN3\\2598957_Paris\\' +# out_file_path = r'D:\DATA\GAOFEN3\2-GF3_MYN_WAV_020086_E107.2_N27.6_20200603_L1A_AHV_L10004843087\SLC_SHJ_2' +# atp.api_ahv_to_polsarpro_s2(out_file_path, ahv_path) +# bin_path = r'D:\DATA\GAOFEN3\2-GF3_MYN_WAV_020086_E107.2_N27.6_20200603_L1A_AHV_L10004843087\SLC_SHJ\s11.bin' +# # data = atp.read_slc_bin_to_img(bin_path) +# print("done") diff --git a/tool/algorithm/polsarpro/DualPolarToPolsarproC2.py b/tool/algorithm/polsarpro/DualPolarToPolsarproC2.py new file mode 100644 index 0000000..ca0950b --- /dev/null +++ b/tool/algorithm/polsarpro/DualPolarToPolsarproC2.py @@ -0,0 +1,196 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:DualPolarToPolsarproC2.py +@Function:双极化影像转成polsarpro格式C2数据 +@Contact: +@Author:SHJ +@Date:2021/11/5 +@Version:1.0.0 +""" +import os +import numpy as np +import glob +import struct +import gc +from tool.algorithm.image.ImageHandle import ImageHandler + + +class DualPolarToPolsarproC2: + """ + 双极化影像转换为bin格式C2矩阵,支持polsarpro处理 + """ + + def __init__(self): + pass + + @staticmethod + def __dual_polar_to_c2(dual_polar_dir): + """ + 双影像转S2矩阵 + :param dual_polar_dir: 双极化影像文件夹路径 + :return: C2矩阵 + """ + in_tif_paths = list(glob.glob(os.path.join(dual_polar_dir, '*.tif'))) + + if in_tif_paths == []: + in_tif_paths = list(glob.glob(os.path.join(dual_polar_dir, '*.tiff'))) + s11, s22 = None, None + flag_list = [0, 0, 0, 0] + for in_tif_path in in_tif_paths: + # 读取原始SAR影像 + proj, geotrans, data = ImageHandler.read_img(in_tif_path) + # 获取极化类型 + if 'HH' in os.path.basename(in_tif_path): + s11 = data[0, :, :] + 1j * data[1, :, :] + flag_list[0] = 1 + elif 'HV' in os.path.basename(in_tif_path): + s22 = data[0, :, :] + 1j * data[1, :, :] + flag_list[1] = 1 + elif 'VH' in os.path.basename(in_tif_path): + s22 = data[0, :, :] + 1j * data[1, :, :] + flag_list[2] = 1 + elif 'VV' in os.path.basename(in_tif_path): + s11 = data[0, :, :] + 1j * data[1, :, :] + flag_list[3] = 1 + else: + continue + del data + gc.collect() + + if flag_list != [1, 1, 0, 0] and flag_list != [0, 0, 1, 1] : + raise Exception('Dual-Polarization SAR is not in path :%s',in_tif_path) + + c11,c12,c22 = None, None, None + c11 = np.abs(s11)** 2 + c12 = s11 * np.conj(s22) + del s11 + gc.collect() + c22 = np.abs(s22)**2 + return c11, c12, c22 + + def __c2_to_polsarpro_c2(self, out_dir, c11, c12, c22): + """ + C2矩阵转bin格式,支持 polsarpro处理 + :param out_dir: 输出的文件夹路径 + :param c11: + :param c12: + :param c21: + :param c22: + :return: bin格式矩阵C3和头文件 + """ + if not os.path.exists(out_dir): + os.makedirs(out_dir) + + rows = c11.shape[0] + cols = c11.shape[1] + bins_dict = { + 'C11.bin': c11, + 'C12_real.bin': c12.real, + 'C12_imag.bin': c12.imag, + 'C22.bin': c22} + + for name, data in bins_dict.items(): + bin_path = os.path.join(out_dir, name) + self.__write_img_bin(data, bin_path) + out_hdr_path = bin_path + '.hdr' + self.__write_bin_hdr(out_hdr_path, bin_path, rows, cols) + + self.__write_config_file(out_dir, rows, cols) + + def rows(self): + """获取影像行数""" + return self._rows + + def cols(self): + """获取影像列数""" + return self._cols + + def __write_img_bin(self, im, file_path): + """ + 写入影像到bin文件中,保存为float32类型 + :param im : 影像矩阵数据,暂支持单通道影像数据 + :param file_path: bin文件的完整路径 + """ + with open(file_path, 'wb') as f: + self._rows = im.shape[0] + self._cols = im.shape[1] + for row in range(self._rows): + im_bin = struct.pack("f" * self._cols, *np.reshape(im[row, :], (self._cols, 1), order='F')) + f.write(im_bin) + f.close() + + @staticmethod + def __write_bin_hdr(out_hdr_path, bin_path, rows, cols): + """ + 写入影像的头文件 + :param out_hdr_path : 头文件的路径 + :param bin_path: bin文件的路径 + :param rows: 影像的行数 + :param cols: 影像的列数 + """ + name = os.path.split(bin_path)[1] + h1 = 'ENVI' + h2 = 'description = {' + h3 = 'File Imported into ENVI. }' + h4 = 'samples = ' + str(cols) # 列 + h5 = 'lines = ' + str(rows) # 行 + h6 = 'bands = 1 ' # 波段数 + h7 = 'header offset = 0' + h8 = 'file type = ENVI Standard' + h9 = 'data type = 4' # 数据格式 浮点型 + h10 = 'interleave = bsq' # 存储格式 + h11 = 'sensor type = Unknown' + h12 = 'byte order = 0' + h13 = 'band names = {' + h14 = name + '}' + h = [h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14] + doc = open(out_hdr_path, 'w') + for i in range(0, 14): + print(h[i], end='', file=doc) + print('\n', end='', file=doc) + doc.close() + + @staticmethod + def __write_config_file(out_config_dir, rows, cols): + """ + 写入polsarpro配置文件 + :param out_config_dir : 配置文件路径 + :param rows: 影像的行数 + :param cols: 影像的列数 + """ + h1 = 'Nrow' + h2 = str(rows) + h3 = '---------' + h4 = 'Ncol' + h5 = str(cols) + h6 = '---------' + h7 = 'PolarCase' + h8 = 'monostatic' + h9 = '---------' + h10 = 'PolarType' + h11 = 'pp1' + h = [h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11] + + out_config_path = os.path.join(out_config_dir, 'config.txt') + doc = open(out_config_path, 'w') + for i in range(0, 11): + print(h[i], end='', file=doc) + print('\n', end='', file=doc) + doc.close() + + + def api_dual_polar__to_polsarpro_c2(self, out_file_dir, dual_polar_dir): + c11, c12, c22 = self.__dual_polar_to_c2(dual_polar_dir) + self.__c2_to_polsarpro_c2(out_file_dir,c11, c12, c22) + + +# if __name__ == '__main__': +# tp = DualPolarToPolsarproC2() +# out_dic = 'E:\\3-GF3_KAS_FSI_020253_E110.8_N25.5_20200614_L1A_HHHV_L10004871459\\SLC_SHJ1' +# in_dic = 'E:\\3-GF3_KAS_FSI_020253_E110.8_N25.5_20200614_L1A_HHHV_L10004871459\\' +# # out_file_path = 'D:\\bintest0923\\' +# tp.api_dual_polar__to_polsarpro_c2(out_dic,in_dic) +# # atp.ahv_to_polsarpro_t3(out_file_path, ahv_path) +# +# print("done") diff --git a/tool/algorithm/polsarpro/GLCM_当前没用到灰度共生矩阵特征.py b/tool/algorithm/polsarpro/GLCM_当前没用到灰度共生矩阵特征.py new file mode 100644 index 0000000..01d86dd --- /dev/null +++ b/tool/algorithm/polsarpro/GLCM_当前没用到灰度共生矩阵特征.py @@ -0,0 +1,97 @@ +# -*- coding: UTF-8 -*- +""" +@Project :onestar +@File :GLDM.py +@Contact: +scikit-image feature计算图像特征:https://blog.csdn.net/lyxleft/article/details/102904909 +python如何在二维图像上进行卷积:https://www.xz577.com/j/281686.html +利用python的skimage计算灰度共生矩阵:https://zhuanlan.zhihu.com/p/147066037 +@function :计算图像灰度共生矩阵 +@Author :SHJ +@Date :2021/11/10 14:42 +@Version :1.0.0 +""" +import numpy as np +import os +from skimage.feature import greycomatrix, greycoprops +import datetime +from tool.algorithm.image.ImageHandle import ImageHandler + +class GLDM: + def __init__(self,win_size = 15, step=2,levels=16,angles=[0,45,90,135], + prop=['contrast', 'dissimilarity', 'homogeneity', 'energy', 'correlation', 'ASM']): + self._win_size = win_size # 计算灰度共生矩阵窗口尺寸,为奇数 + self._step = step # 步长 + self._levels = levels # 灰度等级:例如16,256 + self._angles = list(np.deg2rad(np.array(angles))) #角度,使用弧度制 + """ + 'contrast':对比度:反映了图像的清晰度和纹理沟纹深浅的程度 + 'dissimilarity':差异性 + 'homogeneity':同质性/逆差距:度量图像纹理局部变化的多少。其值大则说明图像纹理的不同区域间缺少变化,局部非常均匀。 + 'energy':能量:是灰度共生矩阵元素值的平方和,所以也称能量,反映了图像灰度分布均匀程度和纹理粗细度 + 'correlation':相关性:它度量空间灰度共生矩阵元素在行或列方向上的相似程度 + 'ASM':二阶距 + """ + self._prop = prop #纹理特征名称 + + def get_glcm_value(self,input): + values_temp = [] + # 统计得到glcm + # 得到共生矩阵,参数:图像矩阵,距离,方向,灰度级别,是否对称,是否标准化 + # para2: [0, np.pi / 4, np.pi / 2, np.pi * 3 / 4] 一共计算了四个方向,你也可以选择一个方向 + glcm = greycomatrix(input, [self._step], self._angles, self._levels, symmetric=False, normed=True) + # print(glcm.shape) + # 循环计算表征纹理的参数 + for prop in self._prop: + temp = greycoprops(glcm, prop) + # print(temp) + values_temp.append(np.mean(temp)) + return values_temp + + + def get_glcm_array(self,inputs: np.ndarray, win_size): + h, w = inputs.shape + pad = (win_size - 1) // 2 + inputs = np.pad(inputs, pad_width=[(pad, pad), (pad, pad)], mode="constant", constant_values=0) + glcm_array ={} + for name in self._prop: + glcm_array.update({name:np.zeros(shape=(h, w),dtype=np.float32)}) + + for i in range(h): # 行号 + for j in range(w): # 列号 + window = inputs[i: i + win_size, j: j + win_size] + value = self.get_glcm_value(window) + print('i:%s,j:%s',i,j) + # print(value) + for n,array in zip(range(len(glcm_array)),glcm_array.values()): + array[i,j] = value[n] + return glcm_array + + @staticmethod + def standardization(data, num=1): + # 矩阵标准化到[0,1] + data[np.isnan(data)] = np.min(data) # 异常值填充为0 + _range = np.max(data) - np.min(data) + return (data - np.min(data)) / _range * num + + def api_get_glcm_array(self,out_dir,in_tif_path,name=''): + + ih = ImageHandler() + proj, geotrans, array = ih.read_img(in_tif_path) + array[np.where(array > 500000)]=500000 #去除过大的值,避免标准化时,大部分的值都接近0 + array = self.standardization(array,self._levels-1) #标准化到0~(self._levels-1) + array = np.uint8(array) + glcm_array = self.get_glcm_array(array, self._win_size) + for key,value in glcm_array.items(): + out_path = os.path.join(out_dir,name+'_'+key+'.tif') + ih.write_img(out_path, proj, geotrans,value) + +if __name__ == '__main__': + start = datetime.datetime.now() + gldm = GLDM(win_size=9,levels=16,step=3,angles=[0,45,90,135]) + gldm.api_get_glcm_array('D:\glcm','D:\glcm\src_img.tif',) + end = datetime.datetime.now() + msg = 'running use time: %s ' % (end - start) + print(msg) + + # 666*720尺寸影像消耗的running use time: 0:04:23.155424 \ No newline at end of file diff --git a/tool/algorithm/polsarpro/bin2tif.py b/tool/algorithm/polsarpro/bin2tif.py new file mode 100644 index 0000000..a970584 --- /dev/null +++ b/tool/algorithm/polsarpro/bin2tif.py @@ -0,0 +1,85 @@ +import os +import glob +import numpy as np +import struct +from PIL import Image +from tool.algorithm.ml.machineLearning import MachineLeaning as ml + + +def read_bin_to_img(bin_path): + """ + 读取bin格式二进制数据,输出为矩阵 + :param bin_path : bin文件的路径,包含.bin,.config + :return : 矩阵信息 + """ + (bin_dir, bin_name) = os.path.split(bin_path) + config_path = os.path.join(bin_dir, 'config.txt') + config = open(config_path, 'r').read().split('\n', -1) + rows = int(config[1]) + cols = int(config[4]) + + bin_file = open(bin_path, 'rb') # 打开二进制文件 + size = os.path.getsize(bin_path) # 获得文件大小 + if size < rows * cols * 4: + raise Exception( + 'bin size less than rows*cols*4! size:', + size, + 'byte, rows:', + rows, + 'cols:', + cols) + + img = np.zeros([rows, cols], dtype=np.float32) + for row in range(rows): + data = bin_file.read(4 * cols) # 每次读取一行的二进制数据 + row_data = struct.unpack('f' * cols, data) # 转为一行float数据 + img[row, :] = row_data + bin_file.close() + return img + +def write_bin_to_tif(out_tif_dir, bin_dir): + """ + 读取H-A-Alpha分解二进制数据,输出为矩阵格式的字典 + :param out_tif_dir : tif的输出路径 + :param bin_dir : 二进制数据的目录,包含.bin,.config + :return out_tif_path: 生成tif的路径字典 + """ + bin_paths = list(glob.glob(os.path.join(bin_dir, '*.bin'))) + out_tif_path = {} + for in_path in bin_paths: + name = os.path.split(in_path)[1].split('.')[0] + out_path = os.path.join(out_tif_dir, name + '.tif') + out_tif_path.update({name: out_path}) + if os.path.exists(os.path.split(out_path)[0]) is False: + os.makedirs(os.path.split(out_path)[0]) + img_array = read_bin_to_img(in_path) + img_array[np.isnan(img_array)] = 0 # 异常值填充为0 + img_array = ml.standardization(img_array) # 数据标准化到[0,1] + out_image = Image.fromarray(img_array) + out_image.save(out_path) + return out_tif_path + +def write_bin_to_tif_soil(out_tif_dir, bin_dir): + """ + 读取H-A-Alpha分解二进制数据,输出为矩阵格式的字典 + :param out_tif_dir : tif的输出路径 + :param bin_dir : 二进制数据的目录,包含.bin,.config + :return out_tif_path: 生成tif的路径字典 + """ + bin_paths = list(glob.glob(os.path.join(bin_dir, '*.bin'))) + out_tif_path = {} + for in_path in bin_paths: + name = os.path.split(in_path)[1].split('.')[0] + out_path = os.path.join(out_tif_dir, name + '.tif') + out_tif_path.update({name: out_path}) + if os.path.exists(os.path.split(out_path)[0]) is False: + os.makedirs(os.path.split(out_path)[0]) + img_array = read_bin_to_img(in_path) + img_array[np.isnan(img_array)] = 0 # 异常值填充为0 + # img_array = ml.standardization(img_array) # 数据标准化到[0,1] + out_image = Image.fromarray(img_array) + out_image.save(out_path) + return out_tif_path + + + diff --git a/tool/algorithm/polsarpro/createfeature.py b/tool/algorithm/polsarpro/createfeature.py new file mode 100644 index 0000000..6640d49 --- /dev/null +++ b/tool/algorithm/polsarpro/createfeature.py @@ -0,0 +1,190 @@ +from tool.algorithm.algtools.MetaDataHandler import Calibration +from tool.algorithm.polsarpro.AHVToPolsarpro import AHVToPolsarpro +from tool.algorithm.polsarpro.pspLeeRefinedFilterT3 import LeeRefinedFilterT3 +from tool.algorithm.polsarpro.pspCloudePottierDecomposition import PspCloudePottierDecomposition +from tool.algorithm.polsarpro.pspFreemanDecomposition import PspFreemanDecomposition +from tool.algorithm.polsarpro.pspYamaguchiDecomposition import PspYamaguchiDecomposition +from tool.algorithm.polsarpro.pspTouziDecomposition import PspTouziDecomposition +from tool.algorithm.polsarpro.bin2tif import write_bin_to_tif +from tool.algorithm.polsarpro.pspHAAlphaDecomposition import PspHAAlphaDecomposition +from tool.algorithm.xml.AlgXmlHandle import InitPara +import logging +import os +import shutil +import glob +logger = logging.getLogger("mylog") + +class CreateFeature: + """ + 生产特征 + """ + def __init__(self, debug = False, exe_dir = ''): + self._debug = debug + self._exe_dir = exe_dir + pass + + + def ahv_to_t3(self, workspace_processing_path, workspace_preprocessing_path, hh_hv_vh_vv_list, name='',FILTER_SIZE=3): + # 全极化tif转bin格式T3数据 + atp = AHVToPolsarpro() + + atp = AHVToPolsarpro(hh_hv_vh_vv_list) + lee_filter_path = os.path.join(workspace_processing_path, name, 'lee_filter\\') # workspace_processing_path + name + '\\lee_filter\\' + if self._debug == False: + + t3_path = os.path.join(workspace_processing_path, name, 'psp_t3\\') # workspace_processing_path + name + '\\psp_t3\\' + # atp.ahv_to_polsarpro_t3(t3_path, tif_path) + + polarization = ['HH', 'HV', 'VH', 'VV'] + if os.path.exists(workspace_preprocessing_path + name + '\\'): + meta_xml_paths = list(glob.glob(os.path.join(workspace_preprocessing_path + name, '*.meta.xml'))) + meta_dic = InitPara.get_meta_dic_new(meta_xml_paths, name) + calibration = Calibration.get_Calibration_coefficient(meta_dic['Origin_META'], polarization) + tif_path = atp.calibration(calibration, workspace_preprocessing_path, name) + atp.ahv_to_polsarpro_t3_veg(t3_path, tif_path) + + # Lee滤波 + leeFilter = LeeRefinedFilterT3() + leeFilter.api_lee_refined_filter_T3('', t3_path, lee_filter_path, 0, 0, atp.rows(), atp.cols(), FILTER_SIZE) + logger.info("refine_lee filter success!") + return lee_filter_path + + def decompose(self,workspace_processing_path, name, t3_path, rows, cols, hh_hv_vh_vv_dic={},FeatureInput=['Freeman', 'Yamaguchi', 'Cloude']): # , 'Touzi' + """ + 极化分解:Freeman、Touzi、Yamaguchi、Cloude + :param t3_path: t3文件路径 + :param rows: 影像行数 + :return cols:影像列数 + """ + # 计算特征组合 + exeDir = self._exe_dir + outFolderDic = {} + if 'Freeman' in FeatureInput: + # freeman分解 + freemanOutDir = os.path.join(workspace_processing_path, name + '\\freeman\\') + if self._debug == False: + freemDecom = PspFreemanDecomposition(exeDir, t3_path, freemanOutDir) + flag = freemDecom.api_freeman_decomposition_T3(0, 0, rows, cols) + if not flag: + logger.error('FreemanDecomposition err') + return False, None + outFolderDic['Freeman'] = freemanOutDir + + # Touzi分解 + if 'Touzi' in FeatureInput: + + touziOutDir = os.path.join(workspace_processing_path, name + '\\touzi\\') + if not os.path.exists(touziOutDir): + os.makedirs(touziOutDir) + if self._debug == False: + # touzi分解耗时较长,且对特征表达效果较差 + p = PspTouziDecomposition(hh_hv_vh_vv_dic, touziOutDir) + p.Touzi_decomposition_multiprocessing() + outFolderDic['Touzi'] = touziOutDir + + if 'Yamaguchi' in FeatureInput: + # Yamaguchi分解 + yamaguchiOutDir = os.path.join(workspace_processing_path, name + '\\yamaguchi\\') + if self._debug == False: + yamaguchiDecom = PspYamaguchiDecomposition(exeDir, t3_path, yamaguchiOutDir) + flag = yamaguchiDecom.api_yamaguchi_4components_decomposition_T3(0, 0, rows, cols) + if not flag: + logger.error('CloudePottierDecomposition err') + return False, None + outFolderDic['Yamaguchi'] = yamaguchiOutDir + + if 'Cloude' in FeatureInput: + # CloudePottier分解 + cloudeOutDir = os.path.join(workspace_processing_path, name + '\\cloude\\') + if self._debug == False: + cloudeDecom = PspCloudePottierDecomposition( + exeDir, t3_path, cloudeOutDir) + flag = cloudeDecom.api_h_a_alpha_decomposition_T3( + 0, 0, rows, cols) + if not flag: + logger.error('CloudePottierDecomposition err') + return False, None + outFolderDic['Cloude'] = cloudeOutDir + return True, outFolderDic + + def creat_h_a_alpha_features(self, t3_path, out_dir): + logger.info('ahv transform to polsarpro T3 matrix success!') + logger.info('progress bar: 20%') + h_a_alpha_decomposition_T3_path = os.path.join(self._exe_dir, 'h_a_alpha_decomposition_T3.exe') + h_a_alpha_eigenvalue_set_T3_path = os.path.join(self._exe_dir, 'h_a_alpha_eigenvalue_set_T3.exe') + h_a_alpha_eigenvector_set_T3_path = os.path.join(self._exe_dir, 'h_a_alpha_eigenvector_set_T3.exe') + + if self._debug == False: + haa = PspHAAlphaDecomposition(normalization=True) + haa.api_creat_h_a_alpha_features(h_a_alpha_out_dir=out_dir, + h_a_alpha_decomposition_T3_path=h_a_alpha_decomposition_T3_path , + h_a_alpha_eigenvalue_set_T3_path=h_a_alpha_eigenvalue_set_T3_path , + h_a_alpha_eigenvector_set_T3_path=h_a_alpha_eigenvector_set_T3_path, + polsarpro_in_dir=t3_path) + + + def cereat_features_dic(self,outFolderDic, feature_tif_dir): + + if not os.path.exists(feature_tif_dir): + os.makedirs(feature_tif_dir) + + feature_tif_paths = {} + for key in outFolderDic: + feature_bin_dic = outFolderDic[key] + if key == 'Touzi': + for path in list(glob.glob(os.path.join(feature_bin_dic, '*.tif'))): + name = os.path.split(path)[1].split('.')[0] + if self._debug == False: + shutil.copyfile(path, os.path.join(feature_tif_dir, name + '.tif')) # feature_tif_dir + '\\' + name + '.tif') + feature_tif_paths.update({name: os.path.join(feature_tif_dir, name + '.tif')}) # feature_tif_dir + '\\' + name + '.tif' + else: + feature_tif_paths.update(write_bin_to_tif(feature_tif_dir, feature_bin_dic)) + return feature_tif_paths + + @staticmethod + def decompose_single_tar(hh_hv_vh_vv_list, workspace_processing_path, workspace_preprocessing_path, name, exe_dir, rows, cols, FILTER_SIZE = 3, debug =False, FeatureInput=['Freeman', 'Yamaguchi', 'Cloude']): + hh_hv_vh_vv_dic = {} + hh_hv_vh_vv_dic.update({'HH': hh_hv_vh_vv_list[0]}) + hh_hv_vh_vv_dic.update({'HV': hh_hv_vh_vv_list[1]}) + hh_hv_vh_vv_dic.update({'VH': hh_hv_vh_vv_list[2]}) + hh_hv_vh_vv_dic.update({'VV': hh_hv_vh_vv_list[3]}) + t3_path = os.path.join(workspace_processing_path, name, "lee_filter") # workspace_processing_path + name + "\\lee_filter" + feature_tif_dir = os.path.join(workspace_processing_path, name, 'features') # workspace_processing_path + name + "\\features" + + cfeature = CreateFeature(debug, exe_dir) + + cfeature.creat_h_a_alpha_features(t3_path, feature_tif_dir) + + t3_path = cfeature.ahv_to_t3(workspace_processing_path, workspace_preprocessing_path, hh_hv_vh_vv_list, name, FILTER_SIZE) + flag, outFolderDic = cfeature.decompose(workspace_processing_path, name, t3_path, rows, cols, hh_hv_vh_vv_dic, FeatureInput) # , 'Touzi' + cfeature.cereat_features_dic(outFolderDic, feature_tif_dir) + return feature_tif_dir + +if __name__ == '__main__': + # # 实例1: + # exe_dir = os.getcwd() + # dir = r'D:\MicroWorkspace\product\C-SAR\VegetationPhenology\Temporary\preprocessed/' + # hh_hv_vh_vv_list = [dir +'GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC_HH_preprocessed.tif', + # dir +'GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC_HV_preprocessed.tif', + # dir +'GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC_VH_preprocessed.tif', + # dir +'GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC_VV_preprocessed.tif'] + # + # workspace_processing_path= r"D:\MicroWorkspace\product\C-SAR\VegetationPhenology\Temporary\processing/" + # name= 'GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC' + # hh_hv_vh_vv_dic = {} + # hh_hv_vh_vv_dic.update({'HH': hh_hv_vh_vv_list[0]}) + # hh_hv_vh_vv_dic.update({'HV': hh_hv_vh_vv_list[1]}) + # hh_hv_vh_vv_dic.update({'VH': hh_hv_vh_vv_list[2]}) + # hh_hv_vh_vv_dic.update({'VV': hh_hv_vh_vv_list[3]}) + # t3_path = workspace_processing_path + name + "\\lee_filter" + # feature_tif_dir = workspace_processing_path + name + "\\features" + # + # cfeature = CreateFeature(False, exe_dir) + # + # cfeature.creat_h_a_alpha_features(t3_path, feature_tif_dir) + # + # t3_path = cfeature.ahv_to_t3(workspace_processing_path, hh_hv_vh_vv_list, name, 3) + # flag, outFolderDic = cfeature.decompose(workspace_processing_path, name, t3_path, 997, 1227, hh_hv_vh_vv_dic, FeatureInput=['Freeman', 'Touzi', 'Yamaguchi', 'Cloude']) + # + # feature_tifs_dic = cfeature.cereat_features_dic(outFolderDic, feature_tif_dir) + pass \ No newline at end of file diff --git a/tool/algorithm/polsarpro/polarizationDecomposition.py b/tool/algorithm/polsarpro/polarizationDecomposition.py new file mode 100644 index 0000000..5e1798d --- /dev/null +++ b/tool/algorithm/polsarpro/polarizationDecomposition.py @@ -0,0 +1,2283 @@ +# -*- coding: UTF-8 -*- + +from typing import Union +import os +from osgeo import gdal +import numpy as np +import cv2 +import math +import cmath +import scipy.linalg as la +import struct + +"*** ======================================================================================== ***" +" This program is written to implement the miscellaneous target decomposition theorems in the domain " \ + +"of polarimetric radar remote sensing using full polarimetric information" + + +"*** Programmer - Raktim Ghosh (MSc, University of Twente) Date Written - May, 2020***" + + +""" List of scattering power decompositions implemented """ + +"""========================================================================""" + +"Touzi Decomposition - Class Name (ModTouzi) *** Including orientation angle" + +"Touzi Decomposition - CLass Name (Touzi) *** Excluding orientation angle" + +"H/A/Alpha Decompositions (Cloude-Pottier) - Class Name (HAAlpha)" + +"Sinclair Decomposition - Class Name (Sinclair)" + +"Cloude Decomposition - CLass Name (Cloude)" + +"Pauli Decomposition - Class Name (Pauli)" + +"Van Zyl Decomposition - Class Name (Vanzyl)" + +"FreeMan-Durden Decomposition Class Name (FreeMan)" + +"Yamaguchi 4-Component Decomposition Class Name (Yamaguchi2005) *** Original - Introduced Helix Scattering" + +"Yamaguchi 4-Component Decomposition Class Name (Yamaguchi2011) *** Modified - Rotated Coherency Matrix" + +"General 4-Component Decomposition (Singh) Class Name (General4SD)" + +"Model-based 6-Component Decomposition (Singh) Class Name (General6SD) *** Extension of General 4SD" + +"Seven Component Decomposition (Singh) Class Name (General7SD) *** Extension of 6SD" + +"""========================================================================""" + + +class Polarimetry: + def __init__(self, b, w): + + self.__band = b + self.__w = w + self.__band_list = list() + self.__band_list_avg = list() + + """ + A list is created to append all the full polarimetric channels with conjugates + """ + for item in self.__band: + for i in range(1, item.RasterCount + 1): + self.__temp = item.GetRasterBand(i).ReadAsArray().astype(float) + self.__band_list.append(self.__temp) + + for i in range(len(self.__band_list)): + self.__band_list_avg.append(cv2.blur(self.__band_list[i], (self.__w, self.__w))) + + """ + The private variables are consisting of the fully polarimetric channels. As for a fully polarimetric + synthetic aperture radar system, there are four components according to the Sinclair matrix. + + :param s_hh: represents the horizontal-horizontal channel + :param s_hh_conj: represents the conjugate of horizontal-horizontal channel + :param s_hv: represents the horizontal-vertical channel + :param s_hv_conj: represents the conjugate of horizontal-horizontal channel + :param s_vh: represents the vertical-horizontal channel + :param s_vh_conj: represents the conjugate of horizontal-horizontal channel + :param s_vv: represents the vertical-vertical channel + :param s_vv_conj: represents the conjugate of horizontal-horizontal channel + :param b: represents the object of bands + """ + + self.__S_hh = self.__band_list_avg[0] + 1j * self.__band_list_avg[1] + self.__S_hh_conj = self.__band_list_avg[0] - 1j * self.__band_list_avg[1] + self.__S_hv = self.__band_list_avg[2] + 1j * self.__band_list_avg[3] + self.__S_hv_conj = self.__band_list_avg[2] - 1j * self.__band_list_avg[3] + self.__S_vh = self.__band_list_avg[4] + 1j * self.__band_list_avg[5] + self.__S_vh_conj = self.__band_list_avg[4] - 1j * self.__band_list_avg[5] + self.__S_vv = self.__band_list_avg[6] + 1j * self.__band_list_avg[7] + self.__S_vv_conj = self.__band_list_avg[6] - 1j * self.__band_list_avg[7] + + def get_cov_mat_img(self): + + """ + This function returns the 3 * 3 covariance matrix based on physically measurable parameters. + The covariance matrix consists of 9 components. + + Format of the covariance matrix: + + [ 2 ^ 0.5 * + <2 ^ 0.5 * <2 * 2 ^ 0.5 * + 2 ^ 0.5 * ] + + :return: It returns the nine parameters. t_ij represents the components of covariance matrix with + ith row and jth column + """ + + s_11 = abs(self.__S_hh * self.__S_hh_conj) + s_12 = np.sqrt(2) * self.__S_hh * self.__S_hv_conj + s_13 = self.__S_hh * self.__S_vv_conj + s_21 = np.sqrt(2) * self.__S_hv * self.__S_hh_conj + s_22 = abs(2 * self.__S_hv * self.__S_hv_conj) + s_23 = np.sqrt(2) * self.__S_hv * self.__S_vv_conj + s_31 = self.__S_vv * self.__S_hh_conj + s_32 = np.sqrt(2) * self.__S_vv * self.__S_hv_conj + s_33 = abs(self.__S_vv * self.__S_vv_conj) + + return [s_11, s_12, s_13, s_21, s_22, s_23, s_31, s_32, s_33] + + def get_coh_mat_img(self): + + """ + This function returns the 3 * 3 coherency (Pauli-based covariance) matrix based on + physically measurable parameters based on mathematically and orthogonal Pauli matrix components. + The coherency matrix consists of 9 components. + + Format of the coherency matrix: + + 0.5 * [<(Shh + Svv) * conj(Shh + Svv)> <(Shh + Svv) * conj(Shh + Svv)> 2 * <(Shh + Svv) * conj(Shv)> + <(Shh - Svv) * conj(Shh + Svv)> <(Shh - Svv) * conj(Shh - Svv)> 2 * <(Shh - Svv) * conj(Shv)> + <2 * Shv * conj(Shh + Svv)> <2 * Shv * conj(Shh - Svv)> 4 * ] + + :return: It returns the nine parameters. s_ij represents the components of covariance matrix with + ith row and jth column + """ + + t_11 = 0.5 * abs((self.__S_hh + self.__S_vv) * (self.__S_hh_conj + self.__S_vv_conj)) + t_12 = 0.5 * (self.__S_hh + self.__S_vv) * (self.__S_hh_conj - self.__S_vv_conj) + t_13 = (self.__S_hh + self.__S_vv) * self.__S_hv_conj + t_21 = 0.5 * (self.__S_hh - self.__S_vv) * (self.__S_hh_conj + self.__S_vv_conj) + t_22 = 0.5 * abs((self.__S_hh - self.__S_vv) * (self.__S_hh_conj - self.__S_vv_conj)) + t_23 = (self.__S_hh - self.__S_vv) * self.__S_hv_conj + t_31 = self.__S_hv * (self.__S_hh_conj + self.__S_vv_conj) + t_32 = self.__S_hv * (self.__S_hh_conj - self.__S_vv_conj) + t_33 = 2 * abs(self.__S_hv * self.__S_hv_conj) + + return [t_11, t_12, t_13, t_21, t_22, t_23, t_31, t_32, t_33] + + def get_eig_val(self): + + """ + This function returns the eigen values extracted from the 3 * 3 coherency matrix. + """ + + coh_mat = self.get_coh_mat_img() + + rows, cols = np.shape(coh_mat[0])[0], np.shape(coh_mat[0])[1] + + t11, t12, t13 = coh_mat[0], coh_mat[1], coh_mat[2] + t21, t22, t23 = coh_mat[3], coh_mat[4], coh_mat[5] + t31, t32, t33 = coh_mat[6], coh_mat[7], coh_mat[8] + + ev1 = np.zeros([rows, cols], dtype=complex) + ev2 = np.zeros([rows, cols], dtype=complex) + ev3 = np.zeros([rows, cols], dtype=complex) + + for i in range(rows): + for j in range(cols): + + x = np.array([ + [t11[i, j], t12[i, j], t13[i, j]], + [t21[i, j], t22[i, j], t23[i, j]], + [t31[i, j], t32[i, j], t33[i, j]] + ]) + eigV = la.eig(x)[0] + ev1[i, j] = abs(eigV[0]) + ev2[i, j] = abs(eigV[1]) + ev3[i, j] = abs(eigV[2]) + + if ev2[i, j] < ev3[i, j]: + ev2[i, j], ev3[i, j] = ev3[i, j], ev2[i, j] + + ev1[~np.isfinite(ev1)] = 0 + ev2[~np.isfinite(ev2)] = 0 + ev3[~np.isfinite(ev3)] = 0 + + trt = t11 + t22 + t33 + + return [ev1, ev2, ev3, trt] + + def get_eig_vect(self): + + """ + This function returns the normalized eigen vectors extracted from the coherency matrix + """ + + coh_mat = self.get_coh_mat_img() + + rows, cols = np.shape(coh_mat[0])[0], np.shape(coh_mat[0])[1] + + t11, t12, t13 = coh_mat[0], coh_mat[1], coh_mat[2] + t21, t22, t23 = coh_mat[3], coh_mat[4], coh_mat[5] + t31, t32, t33 = coh_mat[6], coh_mat[7], coh_mat[8] + + list2 = list() + + for i in range(rows): + list1 = list() + for j in range(cols): + + x = np.array([ + [t11[i, j], t12[i, j], t13[i, j]], + [t21[i, j], t22[i, j], t23[i, j]], + [t31[i, j], t32[i, j], t33[i, j]] + ]) + list1.append(la.eig(x)[1]) + + list2.append(list1) + + # print(len(list2)) + x = np.array(list2) + y = np.reshape(x, (rows, cols, 3, 3)) + # print(np.shape(y)) + # print(type(y[1, 1][1, 1])) + + return y + + def rot_coh_mat_img(self): + + """ + This function returns rotated version of the 3 * 3 coherency (Pauli-based covariance) matrix based on + physically measurable parameters based on mathematically and orthogonal Pauli matrix components. + The rotated coherency matrix consists of 9 components. + + t_ij_theta: the components of rotated coherency matrix is derived by multiplying the 3 * 3 rotation + matrices and its transpose conjugate. + + Format of the rotation matrix: + + [1 0 0 + Rp(theta) = 0 cos(2 * theta) sin(2 * theta) + 0 - sin(2 * theta) cos(2 * theta)] + + + T(theta) = Rp(theta) * T * transpose(conj(Rp(theta)) + + T => Denote the coherency matrix + theta => Denote the rotation angle + T(theta) => Denote the rotated coherency matrix + + :return: It returns the nine parameters. t_ij_theta represents the components of + rotated coherency matrix with ith row and jth column + """ + + t = self.get_coh_mat_img() + rows, cols = np.shape(t[0])[0], np.shape(t[0])[1] + t_theta_mat = np.zeros([rows, cols]) + + for i in range(rows): + for j in range(cols): + a = t[5][i, j].real + b, c = t[4][i, j], t[8][i, j] + if b == c: + t_theta_mat[i, j] = math.pi / 4 + else: + t_theta_mat[i, j] = 0.5 * math.atan((2 * a.real) / (b - c)) + + t_11_theta = t[0] + t_12_theta = t[1] * np.cos(t_theta_mat) + t[2] * np.sin(t_theta_mat) + t_13_theta = - t[1] * np.sin(t_theta_mat) + t[2] * np.cos(t_theta_mat) + t_21_theta = np.conj(t_12_theta) + t_22_theta = t[4] * (np.cos(t_theta_mat) ** 2) + t[8] * (np.sin(t_theta_mat) ** 2) + t_22_theta += np.real(t[5]) * np.sin(2 * t_theta_mat) + t_23_theta = np.imag(t[5]) * 1j + t_31_theta = np.conj(t_13_theta) + t_32_theta = - np.imag(t[5]) * 1j + t_33_theta = t[8] * (np.cos(t_theta_mat) ** 2) + t[4] * (np.sin(t_theta_mat) ** 2) + t_33_theta -= np.real(t[5]) * (np.sin(t_theta_mat) ** 2) + + return [t_11_theta, t_12_theta, t_13_theta, t_21_theta, t_22_theta, + t_23_theta, t_31_theta, t_32_theta, t_33_theta] + + def get_image(self, ps, pd, pv, pc): + + """ + After estimating the corresponding power term, we generate the decomposed power images of surface, + double-bounce and volume scattering respectively. + + :param ps: power term associated with surface scattering + :param pd: power term associated with double-bounce scattering + :param pv: power term associated with volume scattering + :param pc: power term associated with helix scattering + :return: Images of surface, double-bounce, and volume scattering + """ + + cols, rows = pd.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'helix_Scattering_yamaguchi' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.__band[0].GetProjection()) + out_data.SetGeoTransform(self.__band[0].GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(pc / (ps + pd + pv + pc)) + + def get_band(self): + return self.__band + + +class ModTouzi(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + self.__band = b + self.__w = w + + def get_psi(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "Target Scattering Decomposition in Terms of Roll-Invariant Target Parameters" + + IEEEXplore: https://ieeexplore.ieee.org/document/4039635 + + DOI: 10.1109/TGRS.2006.886176 + + With the projection of Kennaugh-Huynen scattering matrix into the Pauli basis, this model established + the basis invariant representation of coherent target scattering. + + alp: for symmetric scattering type magnitude (normalized) + phi: for symmetric scattering type phase (normalized) + psi: orientation angle (Kennaugh-Huynen maximum polarization parameter (normalized) + tau: target helicity (normalized) + + :return: It returns alp, psi, tau, phi + """ + + ev = self.get_eig_val() + ev1, ev2, ev3, trt = ev[0], ev[1], ev[2], ev[3] + + p1 = ev1 / trt + p2 = ev2 / trt + p3 = ev3 / trt + + rows, cols = np.shape(ev[0])[0], np.shape(ev[0])[1] + eig_vect = self.get_eig_vect() + + alp1, alp2, alp3 = np.zeros([rows, cols]), np.zeros([rows, cols]), np.zeros([rows, cols]) + psi1, psi2, psi3 = np.zeros([rows, cols]), np.zeros([rows, cols]), np.zeros([rows, cols]) + tau1, tau2, tau3 = np.zeros([rows, cols]), np.zeros([rows, cols]), np.zeros([rows, cols]) + phis1, phis2, phis3 = np.zeros([rows, cols]), np.zeros([rows, cols]), np.zeros([rows, cols]) + + print(np.shape(eig_vect)) + + for i in range(rows): + for j in range(cols): + u = np.array([ + [eig_vect[i, j][0, 0], eig_vect[i, j][0, 1], eig_vect[i, j][0, 2]], + [eig_vect[i, j][1, 0], eig_vect[i, j][1, 1], eig_vect[i, j][1, 2]], + [eig_vect[i, j][2, 0], eig_vect[i, j][2, 1], eig_vect[i, j][2, 2]] + ]) + + psi1[i, j] = 0.5 * np.arctan(abs(np.real(u[2, 0]) / np.real(u[1, 0]))) * 180 / math.pi + alp1[i, j] = np.arcsin(abs(np.real(u[1, 0]) / np.cos(2 * psi1[i, j] * math.pi / 180))) * 180 / math.pi + tau1[i, j] = 0.5 * np.arccos(np.real(u[0, 0]) / np.cos(alp1[i, j] * math.pi / 180)) * 180 / math.pi + + psi2[i, j] = 0.5 * np.arctan(abs(np.real(u[2, 1]) / np.real(u[1, 1]))) * 180 / math.pi + alp2[i, j] = np.arcsin(abs(np.real(u[1, 1]) / np.cos(2 * psi2[i, j] * math.pi / 180))) * 180 / math.pi + tau2[i, j] = 0.5 * np.arccos(np.real(u[0, 1]) / np.cos(alp2[i, j] * math.pi / 180)) * 180 / math.pi + + psi3[i, j] = 0.5 * np.arctan(abs(np.real(u[2, 2]) / np.real(u[1, 2]))) * 180 / math.pi + alp3[i, j] = np.arcsin(abs(np.real(u[1, 2]) / np.cos(2 * psi3[i, j] * math.pi / 180))) * 180 / math.pi + tau3[i, j] = 0.5 * np.arccos(np.real(u[0, 2]) / np.cos(alp3[i, j] * math.pi / 180)) * 180 / math.pi + + phis1[i, j] = np.arctan(np.imag(u[1, 0]) / np.real(u[1, 0])) * 180 / math.pi + phis2[i, j] = np.arctan(np.imag(u[1, 1]) / np.real(u[1, 1])) * 180 / math.pi + phis3[i, j] = np.arctan(np.imag(u[1, 2]) / np.real(u[1, 2])) * 180 / math.pi + + alp = p1 * alp1 + p2 * alp2 + p3 * alp3 + psi = p1 * psi1 + p2 * psi2 + p3 * psi3 + tau = p1 * tau1 + p2 * tau2 + p3 * tau3 + phi = p1 * phis1 + p2 * phis2 + p3 * phis3 + + return [alp, psi, tau, phi] + + def get_result(self, saveFolder): + x = self.get_psi() + scattering_list = ['alpha', 'psi', 'tau', 'phi'] + for i in range(len(x)): + + cols, rows = x[0].shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Touzi_New' + outfile += '.tif' + # 创建文件 + #if os.path.exists(os.path.split(outfile)) is False: + # os.makedirs(os.path.split(outfile)) + out_data = driver.Create(os.path.join(saveFolder,outfile) , rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band()[0].GetProjection()) + out_data.SetGeoTransform(self.get_band()[0].GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + + def get_result_block(self, saveFolder, suffix): + x = self.get_psi() + scattering_list = ['alpha', 'psi', 'tau', 'phi'] + for i in range(len(x)): + + cols, rows = x[0].shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Touzi_New' + outfile += suffix + # 创建文件 + #if os.path.exists(os.path.split(outfile)) is False: + # os.makedirs(os.path.split(outfile)) + out_data = driver.Create(os.path.join(saveFolder,outfile) , rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band()[0].GetProjection()) + out_data.SetGeoTransform(self.get_band()[0].GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + +class Touzi(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + self.__band = b + self.__w = w + + def get_eig_value(self): + coh_mat = self.get_coh_mat_img() + + rows, cols = np.shape(coh_mat[0])[0], np.shape(coh_mat[0])[1] + + t11, t12, t13 = coh_mat[0], coh_mat[1], coh_mat[2] + t21, t22, t23 = coh_mat[3], coh_mat[4], coh_mat[5] + t31, t32, t33 = coh_mat[6], coh_mat[7], coh_mat[8] + + ev1 = np.zeros([rows, cols], dtype=complex) + ev2 = np.zeros([rows, cols], dtype=complex) + ev3 = np.zeros([rows, cols], dtype=complex) + + for i in range(rows): + for j in range(cols): + + x = np.array([ + [t11[i, j], t12[i, j], t13[i, j]], + [t21[i, j], t22[i, j], t23[i, j]], + [t31[i, j], t32[i, j], t33[i, j]] + ]) + + ev1[i, j] = abs(la.eig(x)[0][0]) + ev2[i, j] = abs(la.eig(x)[0][1]) + ev3[i, j] = abs(la.eig(x)[0][2]) + + if ev2[i, j] < ev3[i, j]: + ev2[i, j], ev3[i, j] = ev3[i, j], ev2[i, j] + + ev1[~np.isfinite(ev1)] = 0 + ev2[~np.isfinite(ev2)] = 0 + ev3[~np.isfinite(ev3)] = 0 + + trt = t11 + t22 + t33 + """ + det = t11 * t22 * t33 - t33 * t12 * np.conj(t12) - t22 * t13 * np.conj(t13) + det += t12 * np.conj(t13) * t23 + np.conj(t12) * t13 * np.conj(t23) - t11 * t23 * np.conj(t23) + det = abs(det) + + a = abs(t11 * t22 + t11 * t33 + t22 * t33 - t12 * np.conj(t12) - t13 * np.conj(t13) - t23 * np.conj(t23)) + + b = t11 * t11 - t11 * t22 + t22 * t22 - t11 * t33 - t22 * t33 + t33 * t33 + b = b + 3.0 * (t12 * np.conj(t12) + t13 * np.conj(t13) + t23 * np.conj(t23)) + + c = 27.0 * det - 9.0 * a * trt + 2.0 * (trt ** 3) + c = c + 0.0j + c = c + np.sqrt(c ** 2.0 - 4.0 * b ** 3.0) + c = c ** (1.0 / 3.0) + + trt = (1.0 / 3.0) * trt + + eig1 = trt + ((2 ** (1.0 / 3.0)) * b) / (3.0 * c) + c / (3.0 * 2 ** (1.0 / 3.0)) + eig2 = trt - complex(1, math.sqrt(3)) * b / (3 * 2 ** (2 / 3) * c) - complex( + 1, -math.sqrt(3)) * c / (6 * 2 ** (1 / 3)) + eig3 = trt - complex(1, -math.sqrt(3)) * b / (3 * 2 ** (2 / 3) * c) - complex( + 1, math.sqrt(3)) * c / (6 * 2 ** (1 / 3)) + + eig1, eig2, eig3 = abs(eig1), abs(eig2), abs(eig3) + + eig1[~np.isfinite(eig1)] = 0 + eig2[~np.isfinite(eig2)] = 0 + eig3[~np.isfinite(eig3)] = 0 + + x = eig2 >= eig3 + y = eig2 < eig3 + + ref_eig2 = x * eig2 + y * eig3 + ref_eig3 = x * eig3 + y * eig2 + + print(ref_eig2[200:205, 200:205], ref_eig3[200:205, 200:205]) + + trt = t11 + t22 + t33 + """ + + return [ev1, ev2, ev3, trt] + + def get_params(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "Target Scattering Decomposition in Terms of Roll-Invariant Target Parameters" + + IEEEXplore: https://ieeexplore.ieee.org/document/4039635 + + DOI: 10.1109/TGRS.2006.886176 + + With the projection of Kennaugh-Huynen scattering matrix into the Pauli basis, this model established + the basis invariant representation of coherent target scattering. + + U3 = [cos(alp1)*cos(2*taum1) cos(alp2)*cos(2*taum2) cos(alp3)*cos(2*taum3) + sin(alp1)*exp(j*phi1) sin(alp2)*exp(j*phi2) sin(alp3)*exp(j*phi3) + -j*cos(alp1)*sin(2*taum1) -j*cos(alp2)*sin(2*taum2) -j*cos(alp3)*sin(2*taum3)] + + T = U3 * [lambda1 0 0 * Transpose(conj(U3)) + 0 lambda2 0 + 0 0 lambda3] + + alp: for symmetric scattering type magnitude (normalized) + phi: for symmetric scattering type phase (normalized) + psi: orientation angle (Kennaugh-Huynen maximum polarization parameter (normalized) + tau: target helicity (normalized) + + Pseudo Probability = The pseudo probability is estimated by normalizing each eigen values with the + total summation of all the eigen values + + :return: It returns u11, u12, u13, u21, u22, u23 of U3 matrix and pseudo probabilities + + ** Note: In this implementation, orientation angle has been neglected. Please refer ModTouzi for the + orientation angle + """ + + coh_mat = self.get_coh_mat_img() + x = self.get_eig_value() + ev1, ev2, ev3 = x[0], x[1], x[2] + + t11, t12, t13 = coh_mat[0], coh_mat[1], coh_mat[2] + t21, t22, t23 = coh_mat[3], coh_mat[4], coh_mat[5] + t31, t32, t33 = coh_mat[6], coh_mat[7], coh_mat[8] + + t12c, t13c, t23c = np.conj(t12), np.conj(t13), np.conj(t23) + + u11 = (ev1 - t33) / t13c + ((ev1 - t33) * t12c + t13c * t23) * t23c / ( + ((t22 - ev1) * t13c - t12c * t23c) * t13c) + + u21 = ((ev1 - t33) * t12c + t13c * t23) / ((t22 - ev1) * t13c - t12c * t23c) + + nrm = np.sqrt(u11 * np.conj(u11) + u21 * np.conj(u21) + 1) + + u11 = u11 / nrm + u21 = u21 / nrm + + u11[~np.isfinite(u11)] = 0 + u21[~np.isfinite(u21)] = 0 + + u12 = (ev2 - t33) / t13c + ((ev2 - t33) * t12c + t13c * t23) * t23c / ( + ((t22 - ev2) * t13c - t12c * t23c) * t13c) + + u22 = ((ev2 - t33) * t12c + t13c * t23) / ((t22 - ev2) * t13c - t12c * t23c) + + nrm = np.sqrt(u12 * np.conj(u12) + u22 * np.conj(u22) + 1) + + u12 = u12 / nrm + u22 = u22 / nrm + + u12[~np.isfinite(u12)] = 0 + u22[~np.isfinite(u22)] = 0 + + u13 = (ev3 - t33) / t13c + ((ev3 - t33) * t12c + t13c * t23) * t23c / ( + ((t22 - ev3) * t13c - t12c * t23c) * t13c) + + u23 = ((ev3 - t33) * t12c + t13c * t23) / ((t22 - ev3) * t13c - t12c * t23c) + + nrm = np.sqrt(u13 * np.conj(u13) + u23 * np.conj(u23) + 1) + + u13 = u13 / nrm + u23 = u23 / nrm + + u13[~np.isfinite(u13)] = 0 + u23[~np.isfinite(u23)] = 0 + + trt = t11 + t22 + t33 + + p1 = ev1 / trt + p2 = ev2 / trt + p3 = ev3 / trt + + p1[~np.isfinite(p1)] = 0 + p2[~np.isfinite(p2)] = 0 + p3[~np.isfinite(p3)] = 0 + + return [u11, u12, u13, u21, u22, u23, p1, p2, p3] + + def get_alpha(self): + + """ + The alpha parameter is introduced as a symmetric scattering type magnitude + + tan(alpha) * exp(phi) = {(mu1 - mu2) / (mu1 + mu2)} + mu1, mu2 are coneignevalues + + :return: It returns the normalized alpha using the linear combination of pseudo probabilities and alpha + parameters (p1 * alpha1 + p2 * alpha2 + p3 * alpha3) + """ + + x = self.get_params() + u11, u12, u13 = x[0], x[1], x[2] + u21, u22, u23 = x[3], x[4], x[5] + p1, p2, p3 = x[6], x[7], x[8] + + alps1 = np.arcsin(abs(u21)) * 180 / math.pi + alps2 = np.arcsin(abs(u22)) * 180 / math.pi + alps3 = np.arcsin(abs(u23)) * 180 / math.pi + + alps1[~np.isfinite(alps1)] = 0 + alps2[~np.isfinite(alps2)] = 0 + alps3[~np.isfinite(alps3)] = 0 + + alps = p1 * alps1 + p2 * alps2 + p3 * alps3 + + return [u11, u12, u13, u21, u22, u23, p1, p2, p3, alps] + + def get_tau(self): + + """ + The tau parameter is defined as the target helicity. Under the assumption of target reciprocity, the Kennaugh- + Huynen condiagonalization is performed using: + + [S] = [R(psi)].[T(taum)].[Sd].[T(taum)].[R(-psi)] + + [R(psi)] = [cos(psi) - sin(psi) [T(taum)] = [cos(taum) -j * sin(taum) Sd = [mu1 0 + sin(psi) cos(psi)] -j * sin(taum) cos(taum)] 0 mu2] + + :return: It returns the normalized tau using the linear combination of pseudo probabilities and tau + parameters (p1 * tau1 + p2 * tau2 + p3 * tau3) + """ + + x = self.get_alpha() + u11, u12, u13 = x[0], x[1], x[2] + u21, u22, u23 = x[3], x[4], x[5] + p1, p2, p3 = x[6], x[7], x[8] + alps = x[9] + + taum1 = 0.5 * np.arccos(abs(u11 / (np.cos(u21 * math.pi / 180)))) * 180 / math.pi + taum2 = 0.5 * np.arccos(abs(u12 / (np.cos(u22 * math.pi / 180)))) * 180 / math.pi + taum3 = 0.5 * np.arccos(abs(u13 / (np.cos(u23 * math.pi / 180)))) * 180 / math.pi + + taum1[~np.isfinite(taum1)] = 0 + taum2[~np.isfinite(taum2)] = 0 + taum3[~np.isfinite(taum3)] = 0 + + taum = p1 * taum1 + p2 * taum2 + p3 * taum3 + + return [u11, u12, u13, u21, u22, u23, p1, p2, p3, alps, taum] + + def get_phi(self): + + """ + The parameter phi is the phase difference between the vector components in the trihedral-dihedral basis + + :return: It returns the normalized phi using the linear combination of pseudo probabilities and phi + parameters (p1 * tau1 + p2 * tau2 + p3 * tau3) + """ + + x = self.get_tau() + # u11, u12, u13 = x[0], x[1], x[2] + u21, u22, u23 = x[3], x[4], x[5] + p1, p2, p3 = x[6], x[7], x[8] + alps, taum = x[9], x[10] + + phis1 = np.arctan(np.imag(u21) / np.real(u21)) * 180 / math.pi + phis2 = np.arctan(np.imag(u22) / np.real(u22)) * 180 / math.pi + phis3 = np.arctan(np.imag(u23) / np.real(u23)) * 180 / math.pi + + phis = p1 * phis1 + p2 * phis2 + p3 * phis3 + + return [alps, taum, phis] + + def get_result(self): + x = self.get_phi() + + scattering_list = ['alpha', 'tau', 'phi'] + + for i in range(len(x)): + + cols, rows = x[0].shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Touzi' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + + +class HAAlpha(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + self.__band = b + self.__w = w + + def get_eigen_value(self): + + coh_mat = self.get_coh_mat_img() + + rows, cols = np.shape(coh_mat[0])[0], np.shape(coh_mat[0])[1] + + t11, t12, t13 = coh_mat[0], coh_mat[1], coh_mat[2] + t21, t22, t23 = coh_mat[3], coh_mat[4], coh_mat[5] + t31, t32, t33 = coh_mat[6], coh_mat[7], coh_mat[8] + + ev1 = np.zeros([rows, cols], dtype=complex) + ev2 = np.zeros([rows, cols], dtype=complex) + ev3 = np.zeros([rows, cols], dtype=complex) + + for i in range(rows): + for j in range(cols): + + x = np.array([ + [t11[i, j], t12[i, j], t13[i, j]], + [t21[i, j], t22[i, j], t23[i, j]], + [t31[i, j], t32[i, j], t33[i, j]] + ]) + + ev1[i, j] = abs(la.eig(x)[0][0]) + ev2[i, j] = abs(la.eig(x)[0][1]) + ev3[i, j] = abs(la.eig(x)[0][2]) + + if ev2[i, j] < ev3[i, j]: + ev2[i, j], ev3[i, j] = ev3[i, j], ev2[i, j] + + ev1[~np.isfinite(ev1)] = 0 + ev2[~np.isfinite(ev2)] = 0 + ev3[~np.isfinite(ev3)] = 0 + + trt = t11 + t22 + t33 + """ + det = t11 * t22 * t33 - t33 * t12 * np.conj(t12) - t22 * t13 * np.conj(t13) + det += t12 * np.conj(t13) * t23 + np.conj(t12) * t13 * np.conj(t23) - t11 * t23 * np.conj(t23) + det = abs(det) + + a = abs(t11 * t22 + t11 * t33 + t22 * t33 - t12 * np.conj(t12) - t13 * np.conj(t13) - t23 * np.conj(t23)) + + b = t11 * t11 - t11 * t22 + t22 * t22 - t11 * t33 - t22 * t33 + t33 * t33 + b = b + 3.0 * (t12 * np.conj(t12) + t13 * np.conj(t13) + t23 * np.conj(t23)) + + c = 27.0 * det - 9.0 * a * trt + 2.0 * (trt ** 3) + c = c + 0.0j + c = c + np.sqrt(c ** 2.0 - 4.0 * b ** 3.0) + c = c ** (1.0 / 3.0) + + trt = (1.0 / 3.0) * trt + + eig1 = trt + ((2 ** (1.0 / 3.0)) * b) / (3.0 * c) + c / (3.0 * 2 ** (1.0 / 3.0)) + eig2 = trt - complex(1, math.sqrt(3)) * b / (3 * 2 ** (2 / 3) * c) - complex( + 1, -math.sqrt(3)) * c / (6 * 2 ** (1 / 3)) + eig3 = trt - complex(1, -math.sqrt(3)) * b / (3 * 2 ** (2 / 3) * c) - complex( + 1, math.sqrt(3)) * c / (6 * 2 ** (1 / 3)) + + eig1, eig2, eig3 = abs(eig1), abs(eig2), abs(eig3) + + eig1[~np.isfinite(eig1)] = 0 + eig2[~np.isfinite(eig2)] = 0 + eig3[~np.isfinite(eig3)] = 0 + + x = eig2 >= eig3 + y = eig2 < eig3 + + ref_eig2 = x * eig2 + y * eig3 + ref_eig3 = x * eig3 + y * eig2 + + print(ref_eig2[200:205, 200:205], ref_eig3[200:205, 200:205]) + + trt = t11 + t22 + t33 + """ + + return [ev1, ev2, ev3, trt] + + def get_entropy(self): + + """ + The scattering entropy is associated with the degree of randomness under the assumption of reflection symmetric + media. The entropy is calculated using the eigen values and pseudo probabilities as follows: + + H = - (p1 * log3(p1) + p2 * log3(p2) + p3 * log3(p3)) + + The pseudo probabilities are estimated as + + p1 = lambda1 / (lambda1 + lambda2 + lambda3) + p2 = lambda2 / (lambda1 + lambda2 + lambda3) + p3 = lambda3 / (lambda1 + lambda2 + lambda3) + + :return: It returns primarily the entropy along with three eigen values extracted from the 3 * 3 coherency + matrices + """ + + x = self.get_eigen_value() + ev1, ev2, ev3, trt = x[0], x[1], x[2], x[3] + + p1 = ev1 / trt + p2 = ev2 / trt + p3 = ev3 / trt + + ent = - (p1 * (np.log(p1) / np.log(3)) + p2 * (np.log(p2) / np.log(3)) + p3 * (np.log(p3) / np.log(3))) + ent[~np.isfinite(ent)] = 0 + + return [ent, ev1, ev2, ev3] + + def get_anisotropy(self): + + """ + The anisotropy is the measure of the amount of the forward direction retained after a single scattering event + + :return:It returns majorly the anisotropy + """ + + x = self.get_entropy() + ent = x[0] + ev1, ev2, ev3 = x[1], x[2], x[3] + + ani = abs((ev2 - ev3) / (ev2 + ev3)) + + ani[~np.isfinite(ani)] = 0 + + return [ani, ev1, ev2, ev3, ent] + + def get_alpha(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "An entropy based classification scheme for land applications of polarimetric SAR" + + IEEEXplore: https://ieeexplore.ieee.org/document/551935 + + DOI: 10.1109/36.551935 + + This method employs the eigen value analysis of coherency matrix by employing 3-level Bernoulli + statistical model to estimate the average target scattering parameters. + + U3 = [cos(alp1) cos(alp2) cos(alp3) + sin(alp1)*cos(beta1)*exp(j*del1) sin(alp1)*cos(beta1)*exp(j*del2) sin(alp1)*cos(beta3)*exp(j*del3) + sin(alp1)*sin(beta1)*exp(j*gama1) sin(alp2)*cos(beta2)*exp(j*gama2) sin(alp3)*sin(beta3)*exp(j*gama3)] + + T = U3 * [lambda1 0 0 * Transpose(conj(U3)) + 0 lambda2 0 + 0 0 lambda3] + + Pseudo Probability = The pseudo probability is estimated by normalizing each eigen values with the + total summation of all the eigen values + + :return: It returns the alpha parameter along with entropy and anisotropy + """ + + coh_mat = self.get_coh_mat_img() + x = self.get_anisotropy() + ev1, ev2, ev3 = x[1], x[2], x[3] + ent, ani = x[4], x[0] + + t11, t12, t13 = coh_mat[0], coh_mat[1], coh_mat[2] + t21, t22, t23 = coh_mat[3], coh_mat[4], coh_mat[5] + t31, t32, t33 = coh_mat[6], coh_mat[7], coh_mat[8] + + t12c, t13c, t23c = np.conj(t12), np.conj(t13), np.conj(t23) + + u11 = (ev1 - t33) / t13c + ((ev1 - t33) * t12c + t13c * t23) * t23c / ( + ((t22 - ev1) * t13c - t12c * t23c) * t13c) + + u21 = ((ev1 - t33) * t12c + t13c * t23) / ((t22 - ev1) * t13c - t12c * t23c) + + nrm = np.sqrt(u11 * np.conj(u11) + u21 * np.conj(u21) + 1) + + u11 = u11 / nrm + u21 = u21 / nrm + + u11[~np.isfinite(u11)] = 0 + u21[~np.isfinite(u21)] = 0 + + u12 = (ev2 - t33) / t13c + ((ev2 - t33) * t12c + t13c * t23) * t23c / ( + ((t22 - ev2) * t13c - t12c * t23c) * t13c) + + u22 = ((ev2 - t33) * t12c + t13c * t23) / ((t22 - ev2) * t13c - t12c * t23c) + + nrm = np.sqrt(u12 * np.conj(u12) + u22 * np.conj(u22) + 1) + + u12 = u12 / nrm + u22 = u22 / nrm + + u12[~np.isfinite(u12)] = 0 + u22[~np.isfinite(u22)] = 0 + + u13 = (ev3 - t33) / t13c + ((ev3 - t33) * t12c + t13c * t23) * t23c / ( + ((t22 - ev3) * t13c - t12c * t23c) * t13c) + + u23 = ((ev3 - t33) * t12c + t13c * t23) / ((t22 - ev3) * t13c - t12c * t23c) + + nrm = np.sqrt(u13 * np.conj(u13) + u23 * np.conj(u23) + 1) + + u13 = u13 / nrm + u23 = u23 / nrm + + u13[~np.isfinite(u13)] = 0 + u23[~np.isfinite(u23)] = 0 + + trt = t11 + t22 + t33 + + p1 = ev1 / trt + p2 = ev2 / trt + p3 = ev3 / trt + + p1[~np.isfinite(p1)] = 0 + p2[~np.isfinite(p2)] = 0 + p3[~np.isfinite(p3)] = 0 + + alp1 = np.arccos(abs(u11)) * 180 / math.pi + alp2 = np.arccos(abs(u12)) * 180 / math.pi + alp3 = np.arccos(abs(u13)) * 180 / math.pi + + alp1[~np.isfinite(alp1)] = 0 + alp2[~np.isfinite(alp2)] = 0 + alp3[~np.isfinite(alp3)] = 0 + + alp = p1 * alp1 + p2 * alp2 + p3 * alp3 + + return [ent, ani, alp] + + def get_result(self): + x = self.get_alpha() + ent, ani, alp = x[0], x[1], x[2] + + scattering_list = ['entropy', 'anisotropy', 'alpha'] + + for i in range(len(x)): + + cols, rows = ent.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Cloude_Pottier' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + + +class Sinclair(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + self.__band = b + self.__w = w + self.__band_list = list() + self.__band_list_avg = list() + + for i in range(self.__band.RasterCount): + self.__band_list.append(self.__band.GetRasterBand(i).ReadAsArray().astype(float)) + + for i in range(len(self.__band_list)): + self.__band_list_avg.append(cv2.blur(self.__band_list[i], (5, 5))) + + """ + The private variables are consisting of the fully polarimetric channels. As for a fully polarimetric + synthetic aperture radar system, there are four components according to the Sinclair matrix. + + :param s_hh: represents the horizontal-horizontal channel + :param s_hh_conj: represents the conjugate of horizontal-horizontal channel + :param s_hv: represents the horizontal-vertical channel + :param s_hv_conj: represents the conjugate of horizontal-horizontal channel + :param s_vh: represents the vertical-horizontal channel + :param s_vh_conj: represents the conjugate of horizontal-horizontal channel + :param s_vv: represents the vertical-vertical channel + :param s_vv_conj: represents the conjugate of horizontal-horizontal channel + :param b: represents the object of bands + """ + + self.__S_hh = self.__band_list_avg[0] + 1j * self.__band_list_avg[1] + self.__S_hh_conj = self.__band_list_avg[0] - 1j * self.__band_list_avg[1] + self.__S_hv = self.__band_list_avg[2] + 1j * self.__band_list_avg[3] + self.__S_hv_conj = self.__band_list_avg[2] - 1j * self.__band_list_avg[3] + self.__S_vh = self.__band_list_avg[4] + 1j * self.__band_list_avg[5] + self.__S_vh_conj = self.__band_list_avg[4] - 1j * self.__band_list_avg[5] + self.__S_vv = self.__band_list_avg[6] + 1j * self.__band_list_avg[7] + self.__S_vv_conj = self.__band_list_avg[6] - 1j * self.__band_list_avg[7] + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Book: Polarimetric Radar Imaging: From basics to applications + + General form of Sinclair matrix + [S] = [S11 S12 + S21 S22] + + :return: It returns the three intensity parameters based on Sinclair Matrix + """ + intensity1 = abs(self.__S_vv * self.__S_vv_conj) + intensity2 = 0.25 * abs((self.__S_hv + self.__S_vh) * (self.__S_hv_conj + self.__S_vh_conj)) + intensity3 = abs(self.__S_hh * self.__S_hh_conj) + + return [10 * np.log10(abs(intensity1)), 10 * np.log10(abs(intensity2)), 10 * np.log10(abs(intensity3))] + + def get_result(self): + x = self.get_decomposition() + intensity1, intensity2, intensity3 = x[0], x[1], x[2] + + scattering_list = ['intensity1', 'intensity2', 'intensity3'] + + for i in range(len(x)): + + cols, rows = intensity1.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Sinclair' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i] / (intensity1 + intensity2 + intensity3)) + + +class Cloude(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + self.__band = b + self.__w = w + self.__band_list = list() + self.__band_list_avg = list() + + for i in range(self.__band.RasterCount): + self.__band_list.append(self.__band.GetRasterBand(i).ReadAsArray().astype(float)) + + for i in range(len(self.__band_list)): + self.__band_list_avg.append(cv2.blur(self.__band_list[i], (5, 5))) + + """ + The private variables are consisting of the fully polarimetric channels. As for a fully polarimetric + synthetic aperture radar system, there are four components according to the Sinclair matrix. + + :param s_hh: represents the horizontal-horizontal channel + :param s_hh_conj: represents the conjugate of horizontal-horizontal channel + :param s_hv: represents the horizontal-vertical channel + :param s_hv_conj: represents the conjugate of horizontal-horizontal channel + :param s_vh: represents the vertical-horizontal channel + :param s_vh_conj: represents the conjugate of horizontal-horizontal channel + :param s_vv: represents the vertical-vertical channel + :param s_vv_conj: represents the conjugate of horizontal-horizontal channel + :param b: represents the object of bands + """ + + self.__S_hh = self.__band_list_avg[0] + 1j * self.__band_list_avg[1] + self.__S_hh_conj = self.__band_list_avg[0] - 1j * self.__band_list_avg[1] + self.__S_hv = self.__band_list_avg[2] + 1j * self.__band_list_avg[3] + self.__S_hv_conj = self.__band_list_avg[2] - 1j * self.__band_list_avg[3] + self.__S_vh = self.__band_list_avg[4] + 1j * self.__band_list_avg[5] + self.__S_vh_conj = self.__band_list_avg[4] - 1j * self.__band_list_avg[5] + self.__S_vv = self.__band_list_avg[6] + 1j * self.__band_list_avg[7] + self.__S_vv_conj = self.__band_list_avg[6] - 1j * self.__band_list_avg[7] + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Book: Polarimetric Radar Imaging: From basics to applications + + Cloude introduced the concept of eigen-vector based decomposition which utilized teh largest eigen-value to + identify the dominant scattering mechanism + + The corresponding target vector can thus be expressed as + + k1 = sqrt(Lambda1) * u1 = exp(j*phi) / sqrt(2*A0) transpose([2*A0 C + j*D H - j*G]) + + k1 = exp(j*phi) * transpose([sqrt(2*A0) sqrt(B0 + B)*exp(j*arctan(D/C)) sqrt(B0 - B)*exp(j*arctan(G/H))]) + + The three target structure generators are in one-to-one correspondence between Kennaugh Matrix and coherency + matrix (T): + + T = [2A0 C - J*D H + J*G + C + J*D B0 + B E + J*F + H - J*G E - J*F B0 - B] + + A0 => target symmetry, (B0 + B) => target irregularity, (B0 - B) => target nonsymmetry + + :return: It returns the three parameters representing the surface scattering, dihedral-scattering and volume + scattering + """ + + ps = 0.5 * abs((self.__S_hh + self.__S_vv) * (self.__S_hh_conj + self.__S_vv_conj)) + pd = 0.5 * abs((self.__S_hh - self.__S_vv) * (self.__S_hh_conj - self.__S_vv_conj)) + pv = 0.5 * abs((self.__S_hv + self.__S_vh) * (self.__S_hv_conj + self.__S_vh_conj)) + + return [10 * np.log10(abs(ps)), 10 * np.log10(abs(pd)), 10 * np.log10(abs(pv))] + + def get_result(self): + x = self.get_decomposition() + intensity1, intensity2, intensity3 = x[0], x[1], x[2] + + scattering_list = ['surface', 'double_bounce', 'volume'] + + for i in range(len(x)): + + cols, rows = intensity1.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Cloude' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i] / (intensity1 + intensity2 + intensity3)) + + +class Pauli(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + self.__band = b + self.__w = w + self.__band_list = list() + self.__band_list_avg = list() + + for i in range(self.__band.RasterCount): + self.__band_list.append(self.__band.GetRasterBand(i).ReadAsArray().astype(float)) + + for i in range(len(self.__band_list)): + self.__band_list_avg.append(cv2.blur(self.__band_list[i], (5, 5))) + + """ + The private variables are consisting of the fully polarimetric channels. As for a fully polarimetric + synthetic aperture radar system, there are four components according to the Sinclair matrix. + + :param s_hh: represents the horizontal-horizontal channel + :param s_hh_conj: represents the conjugate of horizontal-horizontal channel + :param s_hv: represents the horizontal-vertical channel + :param s_hv_conj: represents the conjugate of horizontal-horizontal channel + :param s_vh: represents the vertical-horizontal channel + :param s_vh_conj: represents the conjugate of horizontal-horizontal channel + :param s_vv: represents the vertical-vertical channel + :param s_vv_conj: represents the conjugate of horizontal-horizontal channel + :param b: represents the object of bands + """ + + self.__S_hh = self.__band_list_avg[0] + 1j * self.__band_list_avg[1] + self.__S_hh_conj = self.__band_list_avg[0] - 1j * self.__band_list_avg[1] + self.__S_hv = self.__band_list_avg[2] + 1j * self.__band_list_avg[3] + self.__S_hv_conj = self.__band_list_avg[2] - 1j * self.__band_list_avg[3] + self.__S_vh = self.__band_list_avg[4] + 1j * self.__band_list_avg[5] + self.__S_vh_conj = self.__band_list_avg[4] - 1j * self.__band_list_avg[5] + self.__S_vv = self.__band_list_avg[6] + 1j * self.__band_list_avg[7] + self.__S_vv_conj = self.__band_list_avg[6] - 1j * self.__band_list_avg[7] + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Book: Polarimetric Radar Imaging: From basics to applications + + The coherent target decompositions express the measured scattering matrix as a combinations of basis + matrices corresponding to canonical scattering mechanisms + + The Pauli decomposition is the basis of the coherency matrix formulation. + + S = [Sxx Sxy The target vector is constructed as k = V(S) = 0.5 * Trace(S * Psi) + Syx Syy] + + The complex Pauli Spin matrix basis set is represented as + + Psi = { sqrt(2) * [1 0 sqrt(2) * [1 0 sqrt(2) * [0 1 } + 0 1] 0 -1] 1 0] + + So the resulting target vector will be => sqrt(2) * transpose[(Sxx + Syy) (Sxx - Syy) 2*Sxy] + + :return: + """ + + intensity1 = 0.5 * abs((self.__S_hh - self.__S_vv) * (self.__S_hh_conj - self.__S_vv_conj)) + intensity2 = 0.5 * abs((self.__S_hv + self.__S_vh) * (self.__S_hv_conj + self.__S_vh_conj)) + intensity3 = 0.5 * abs((self.__S_hh + self.__S_vv) * (self.__S_hh_conj + self.__S_vv_conj)) + + return [10 * np.log10(abs(intensity1)), 10 * np.log10(abs(intensity2)), 10 * np.log10(abs(intensity3))] + + def get_result(self): + x = self.get_decomposition() + intensity1, intensity2, intensity3 = x[0], x[1], x[2] + + scattering_list = ['intensity1', 'intensity2', 'intensity3'] + + for i in range(len(x)): + + cols, rows = intensity1.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Sinclair' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i] / (intensity1 + intensity2 + intensity3)) + + +class Vanzyl(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + def get_coef(self): + cov_mat = self.get_cov_mat_img() + alpha = cov_mat[0] + rho = cov_mat[2] / alpha + eta = cov_mat[4] / alpha + mu = cov_mat[8] / alpha + + return [alpha, rho, eta, mu] + + def get_eigen_values(self): + coef = self.get_coef() + alpha, rho, eta, mu = coef[0], coef[1], coef[2], coef[3] + + del1 = ((1 - mu) ** 2) + 4 * abs(rho * np.conj(rho)) + lambda1 = (alpha / 2) * (1 + mu + del1 ** 0.5) + lambda2 = (alpha / 2) * (1 + mu - del1 ** 0.5) + lambda3 = alpha * eta + + return [lambda1, lambda2, lambda3, coef, del1] + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "Application of Cloude's target decomposition theorem to polarimetric imaging radar data" + + SemanticScholar: https://www.semanticscholar.org/paper + /Application-of-Cloude's-target-decomposition-to-Zyl/bad4b80ea872e5c00798c089f76b8fa7390fed34 + + DOI: 10.1117/12.140615 + + In this paper the Cloude's decomposition has been incorporated using general description of the + covariance matrix for azimuthally symmetrical natural terrain in the monostatic case + + T = C * [1 0 rho + 0 eta 0 C = rho = / C + rho* 0 zeta] eta = 2 / C zeta = / C + + The correspoding eigen-values and eigen-vector can be extracted from T + + :return: It returns ps, pd, and pv which are associated with fs, fd, and fv + """ + + eigen_values = self.get_eigen_values() + lambda1, lambda2, lambda3, coef = eigen_values[0], eigen_values[1], eigen_values[2], eigen_values[3] + del1 = eigen_values[4] + alpha, rho, eta, mu = coef[0], coef[1], coef[2], coef[3] + + alpha1 = (2 * rho) / (mu - 1 + del1 ** 0.5) + beta1 = (2 * rho) / (mu - 1 - del1 ** 0.5) + + intensity1 = lambda1 / (1 + abs(alpha1 * np.conj(alpha1))) + intensity2 = lambda2 / (1 + abs(beta1 * np.conj(beta1))) + intensity3 = lambda3 + + return [10 * np.log10(abs(intensity1)), 10 * np.log10(abs(intensity2)), 10 * np.log10(abs(intensity3))] + + def get_result(self): + x = self.get_decomposition() + ps, pd, pv = x[0], x[1], x[2] + + scattering_list = ['intensity1', 'intensity2', 'intensity3'] + + for i in range(len(x)): + + cols, rows = ps.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Vanzyl' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + + +class FreeMan(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "A three-component scattering model for polarimetric SAR data" + + IEEEXplore: https://ieeexplore.ieee.org/document/673687 + + DOI: 10.1109/36.673687 + + The coefficients (fs, fv, fd) represents the scattering contributions to the corresponding + channels associated with the scattering matrix. + + fs: for surface scattering + fd: for double-bounce scattering + fv: for volume scattering + + alpha: associated with the double-bounce scattering + beta: associated with the surface scattering (First order Bragg model with second order + statistics + + ps: scattered power return associated with surface scattering + pd: scattered power return associated with double-bounce scattering + pv: scattered power return associated with volume scattering + + :return: It returns ps, pd, and pv which are associated with fs, fd, and fv + """ + + cov_mat = self.get_cov_mat_img() + fv = 3 * cov_mat[4] + s_hh = cov_mat[0] - fv + s_vv = cov_mat[8] - fv + s_hh_vv_conj = cov_mat[2] - fv / 3 + rows, cols = np.shape(cov_mat[0])[0], np.shape(cov_mat[0])[1] + ps, pd = np.zeros([rows, cols]), np.zeros([rows, cols]) + pv = (8 * fv) / 3 + + for i in range(np.shape(s_hh)[0]): + for j in range(np.shape(s_hh)[1]): + if s_hh_vv_conj[i, j].real > 0: + alpha = -1 + beta = ((s_hh[i, j] - s_vv[i, j]) / (s_hh_vv_conj[i, j] + s_vv[i, j])) + 1 + fs = (s_vv[i, j] + s_hh_vv_conj[i, j]) / (1 + beta) + fd = s_vv[i, j] - fs + else: + beta = 1 + alpha = ((s_hh[i, j] - s_vv[i, j]) / (s_hh_vv_conj[i, j] - s_vv[i, j])) - 1 + fd = (s_hh_vv_conj[i, j] - s_vv[i, j]) / (alpha - 1) + fs = s_vv[i, j] - fd + + ps[i, j] = (abs(fs) ** 2) * (1 + abs(beta) ** 2) + pd[i, j] = (abs(fd) ** 2) * (1 + abs(alpha) ** 2) + + return [10 * np.log10(abs(ps)), 10 * np.log10(abs(pd)), 10 * np.log10(abs(pv))] + + def get_result(self): + x = self.get_decomposition() + ps, pd, pv = x[0], x[1], x[2] + + scattering_list = ['ps', 'pd', 'pv'] + + for i in range(len(x)): + + cols, rows = ps.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'FreeMan_3SD' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + + +class Yamaguchi2005(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "Four-component scattering model for polarimetric SAR image decomposition" + + link: https://ieeexplore.ieee.org/document/1487628 + + DOI: 10.1109/TGRS.2005.852084 + + The coefficients (fs, fv, fd, fc) represents the scattering contributions to the corresponding + channels associated with the scattering matrix. + + <[C]> = fs * <[Cs]> + fd * <[Cd]> + fv * <[Cv]> + fc * <[Cc]> + + fs: for surface scattering + fd: for double-bounce scattering + fv: for volume scattering + fc: for helix scattering + + alpha: associated with the double-bounce scattering + beta: associated with the surface scattering (First order Bragg model with second order + statistics + + ps: scattered power return associated with surface scattering + pd: scattered power return associated with double-bounce scattering + pv: scattered power return associated with volume scattering + pc: scattered power return associated with helix scattering + + :return: It returns ps, pd, pv, and pc which are associated with fs, fd, fv, and fc + """ + + cov_mat = self.get_cov_mat_img() + rows, cols = np.shape(cov_mat[0])[0], np.shape(cov_mat[0])[1] + + fc = 2 * abs(np.imag((cov_mat[1] + cov_mat[5]) / np.sqrt(2))) + fv = np.zeros([rows, cols]) + ps = np.zeros([rows, cols]) + pd = np.zeros([rows, cols]) + + for i in range(rows): + for j in range(cols): + + if cov_mat[8][i, j] <= 0 or cov_mat[0][i, j] <= 0: + cov_mat[8][i, j], cov_mat[0][i, j] = 1.0, 1.0 + + if 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) < -2: + + fv[i, j] = 7.5 * (0.5 * cov_mat[4][i, j] - 0.25 * fc[i, j]) + a = cov_mat[0][i, j] - (8 / 15) * fv[i, j] - 0.25 * fc[i, j] + b = cov_mat[8][i, j] - (3 / 15) * fv[i, j] - 0.25 * fc[i, j] + c = cov_mat[2][i, j] - (2 / 15) * fv[i, j] + 0.25 * fc[i, j] + + if cov_mat[4][i, j] < cov_mat[0][i, j] or cov_mat[4][i, j] < cov_mat[8][i, j]: + + if np.real(cov_mat[2][i, j]) > 0: + alpha = -1 + beta = (a + c) / (b + c) + fs = (a - b) / (abs(beta * np.conj(beta)) - 1) + fd = b - fs + + else: + beta = 1 + alpha = (a - b) / (c - b) + fd = (a - b) / (abs(alpha * np.conj(alpha)) - 1) + fs = b - fd + + else: + fv[i, j], fc[i, j] = 0, 0 + a, b, c = cov_mat[0][i, j], cov_mat[8][i, j], cov_mat[2][i, j] + + if np.real(cov_mat[2][i, j]) > 0: + alpha = -1 + beta = (a + c) / (b + c) + fs = (a - b) / (abs(beta * np.conj(beta)) - 1) + fd = b - fs + + else: + beta = 1 + alpha = (a - b) / (c - b) + fd = (a - b) / (abs(alpha * np.conj(alpha)) - 1) + fs = b - fd + + elif 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) > 2: + + fv[i, j] = 7.5 * (0.5 * cov_mat[4][i, j] - 0.25 * fc[i, j]) + a = cov_mat[0][i, j] - (3 / 15) * fv[i, j] - 0.25 * fc[i, j] + b = cov_mat[8][i, j] - (8 / 15) * fv[i, j] - 0.25 * fc[i, j] + c = cov_mat[2][i, j] - (2 / 15) * fv[i, j] + 0.25 * fc[i, j] + + if cov_mat[4][i, j] < cov_mat[0][i, j] or cov_mat[4][i, j] < cov_mat[8][i, j]: + + if np.real(cov_mat[2][i, j]) > 0: + alpha = -1 + beta = (a + c) / (b + c) + fs = (a - b) / (abs(beta * np.conj(beta)) - 1) + fd = b - fs + + else: + beta = 1 + alpha = (a - b) / (c - b) + fd = (a - b) / (abs(alpha * np.conj(alpha)) - 1) + fs = b - fd + + else: + fv[i, j], fc[i, j] = 0, 0 + a, b, c = cov_mat[0][i, j], cov_mat[8][i, j], cov_mat[2][i, j] + + if np.real(cov_mat[2][i, j]) > 0: + alpha = -1 + beta = (a + c) / (b + c) + fs = (a - b) / (abs(beta * np.conj(beta)) - 1) + fd = b - fs + + else: + beta = 1 + alpha = (a - b) / (c - b) + fd = (a - b) / (abs(alpha * np.conj(alpha)) - 1) + fs = b - fd + + else: + fv[i, j] = 8 * (0.5 * cov_mat[4][i, j] - 0.25 * fc[i, j]) + a = cov_mat[0][i, j] - (3 / 8) * fv[i, j] - 0.25 * fc[i, j] + b = cov_mat[8][i, j] - (3 / 8) * fv[i, j] - 0.25 * fc[i, j] + c = cov_mat[2][i, j] - (1 / 8) * fv[i, j] + 0.25 * fc[i, j] + + if cov_mat[4][i, j] < cov_mat[0][i, j] or cov_mat[4][i, j] < cov_mat[8][i, j]: + + if np.real(cov_mat[2][i, j]) > 0: + alpha = -1 + beta = (a + c) / (b + c) + fs = (a - b) / (abs(beta * np.conj(beta)) - 1) + fd = b - fs + + else: + beta = 1 + alpha = (a - b) / (c - b) + fd = (a - b) / (abs(alpha * np.conj(alpha)) - 1) + fs = b - fd + + else: + fv[i, j], fc[i, j] = 0, 0 + a, b, c = cov_mat[0][i, j], cov_mat[8][i, j], cov_mat[2][i, j] + + if np.real(cov_mat[2][i, j]) > 0: + alpha = -1 + beta = (a + c) / (b + c) + fs = (a - b) / (abs(beta * np.conj(beta)) - 1) + fd = b - fs + + else: + beta = 1 + alpha = (a - b) / (c - b) + fd = (a - b) / (abs(alpha * np.conj(alpha)) - 1) + fs = b - fd + + ps[i, j] = fs * (1 + abs(beta * np.conj(beta))) + pd[i, j] = fd * (1 + abs(alpha * np.conj(alpha))) + + return [10 * np.log10(abs(ps)), 10 * np.log10(abs(pd)), + 10 * np.log10(abs(fv)), 10 * np.log10(abs(fc))] + + def get_result(self): + x = self.get_decomposition() + ps, pd, pv, pc = x[0], x[1], x[2], x[3] + + scattering_list = ['ps', 'pd', 'pv', 'pc'] + + for i in range(len(x)): + + cols, rows = ps.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Yamaguchi2005_4SD' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + + +class Yamaguchi2011(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + def get_scattering_power(self): + + cov_mat = self.get_cov_mat_img() + rot_coh_mat = self.rot_coh_mat_img() + rows, cols = np.shape(cov_mat[0])[0], np.shape(cov_mat[0])[1] + + pc = 2 * abs(np.imag(rot_coh_mat[5])) + pv = np.zeros([rows, cols]) + s = np.zeros([rows, cols]) + d = np.zeros([rows, cols]) + c = np.zeros([rows, cols], dtype=complex) + + for i in range(rows): + for j in range(cols): + + if cov_mat[8][i, j] <= 0 or cov_mat[0][i, j] <= 0: + cov_mat[8][i, j], cov_mat[0][i, j] = 1.0, 1.0 + + if 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) < -2: + + pv[i, j] = (15 / 4) * rot_coh_mat[8][i, j] - (15 / 8) * pc[i, j] + + if pv[i, j] < 0: + pc[i, j] = 0 + + pv[i, j] = (15 / 4) * rot_coh_mat[8][i, j] - (15 / 18) * pc[i, j] + s[i, j] = rot_coh_mat[0][i, j] - 0.5 * pv[i, j] + d[i, j] = rot_coh_mat[4][i, j] - (7 / 30) * pv[i, j] - 0.5 * pc[i, j] + c[i, j] = rot_coh_mat[1][i, j] - (1 / 6) * pv[i, j] + + elif 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) > 2: + + pv[i, j] = (15 / 4) * rot_coh_mat[8][i, j] - (15 / 8) * pc[i, j] + + if pv[i, j] < 0: + pc[i, j] = 0 + + pv[i, j] = (15 / 4) * rot_coh_mat[8][i, j] - (15 / 8) * pc[i, j] + s[i, j] = rot_coh_mat[0][i, j] - 0.5 * pv[i, j] + d[i, j] = rot_coh_mat[4][i, j] - (7 / 30) * pv[i, j] + c[i, j] = rot_coh_mat[1][i, j] + (1 / 6) * pv[i, j] + + else: + pv[i, j] = 4 * rot_coh_mat[8][i, j] - 2 * pc[i, j] + + if pv[i, j] < 0: + pc[i, j] = 0 + + pv[i, j] = 4 * rot_coh_mat[8][i, j] - 2 * pc[i, j] + s[i, j] = rot_coh_mat[0][i, j] - 0.5 * pv[i, j] + d[i, j] = rot_coh_mat[4][i, j] - rot_coh_mat[8][i, j] + c[i, j] = rot_coh_mat[1][i, j] + + return [pc, pv, s, d, c, rot_coh_mat] + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "Four-Component Scattering Power Decomposition With Rotation of Coherency Matrix" + + IEEEXplore: https://ieeexplore.ieee.org/document/5710415?arnumber=5710415 + + DOI: 10.1109/TGRS.2010.2099124 + + In this paper, the rotation of the coherency matrix is utilized to minimized the cross-polarized + component. As the oriented urban structures and vegetation structures are decomposed into the same + scattering mechanism. + + fs: for surface scattering + fd: for double-bounce scattering + fv: for volume scattering + fc: for helix scattering + + <[T]> = fs * <[Ts]> + fd * <[Td]> + fv * <[Tv]> + fc * <[Tc]> + + <[T(theta)]> = R(theta) * <[T]> * transpose(conj(R(theta)) + + R(theta) = [1 0 0 + 0 cos(2*theta) -sin(2*theta) + 0 sin(2*theta) cos(2*theta)] + + ps: scattered power return associated with surface scattering + pd: scattered power return associated with double-bounce scattering + pv: scattered power return associated with volume scattering + pc: scattered power return associated with helix scattering + + :return: It returns ps, pd, pv, and pc + """ + + x = self.get_scattering_power() + rot_coh_mat = x[5] + t_11_theta, t_22_theta, t_33_theta = rot_coh_mat[0], rot_coh_mat[4], rot_coh_mat[8] + rows, cols = np.shape(rot_coh_mat[0])[0], np.shape(rot_coh_mat[0])[1] + pc, pv, s, d, c = x[0], x[1], x[2], x[3], x[4] + # print(np.shape(pc), np.shape(pv), np.shape(s), np.shape(d), np.shape(c)) + ps, pd = np.zeros([rows, cols]), np.zeros([rows, cols]) + + for i in range(rows): + for j in range(cols): + + tp = t_11_theta[i, j] + t_22_theta[i, j] + t_33_theta[i, j] + print(tp) + if pv[i, j] + pc[i, j] > tp: + ps[i, j], pd[i, j] = 0, 0 + pv[i, j] = tp - pc[i, j] + + else: + + c1 = t_11_theta[i, j] - t_22_theta[i, j] - t_33_theta[i, j] + pc[i, j] + + if c1 > 0: + ps[i, j] = s[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / s[i, j] + pd[i, j] = d[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / s[i, j] + + else: + ps[i, j] = s[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + pd[i, j] = d[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + + if ps[i, j] > 0 > pd[i, j]: + pd[i, j] = 0 + ps[i, j] = tp - pv[i, j] - pc[i, j] + + elif pd[i, j] > 0 > ps[i, j]: + ps[i, j] = 0 + pd[i, j] = tp - pv[i, j] - pc[i, j] + + return [10 * np.log10(abs(ps)), 10 * np.log10(abs(pd)), + 10 * np.log10(abs(pv)), 10 * np.log10(abs(pc))] + + def get_result(self): + x = self.get_decomposition() + ps, pd, pv, pc = x[0], x[1], x[2], x[3] + + scattering_list = ['ps', 'pd', 'pv', 'pc'] + + for i in range(len(x)): + + cols, rows = ps.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'Yamaguchi2011_4SD' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + + +class General4SD(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + def get_scattering_power(self): + + cov_mat = self.get_cov_mat_img() + rot_coh_mat = self.rot_coh_mat_img() + rows, cols = np.shape(cov_mat[0])[0], np.shape(cov_mat[0])[1] + + pc = 2 * abs(np.imag(rot_coh_mat[5])) + pv = np.zeros([rows, cols]) + s = np.zeros([rows, cols]) + d = np.zeros([rows, cols]) + c = np.zeros([rows, cols], dtype=complex) + c1 = rot_coh_mat[0] - rot_coh_mat[4] + (7 / 8) * (1 / 16) * pc + + for i in range(rows): + for j in range(cols): + + tp = rot_coh_mat[0][i, j] + rot_coh_mat[4][i, j] + rot_coh_mat[8][i, j] + + if c1[i, j] > 0: + + if cov_mat[8][i, j] <= 0 or cov_mat[0][i, j] <= 0: + + cov_mat[8][i, j], cov_mat[0][i, j] = 1.0, 1.0 + + print(cov_mat[8][i, j], cov_mat[0][i, j]) + + if 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) < -2: + + pv[i, j] = (15 / 8) * (2 * rot_coh_mat[8][i, j] - pc[i, j]) + + if pv[i, j] < 0: + pc[i, j] = 0 + + pv[i, j] = (15 / 8) * (2 * rot_coh_mat[8][i, j] - pc[i, j]) + s[i, j] = rot_coh_mat[0][i, j] - 0.5 * pv[i, j] + d[i, j] = tp - pv[i, j] - pc[i, j] - s[i, j] + c[i, j] = rot_coh_mat[1][i, j] + rot_coh_mat[2][i, j] - (1 / 6) * pv[i, j] + + elif 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) > 2: + + pv[i, j] = (15 / 8) * (2 * rot_coh_mat[8][i, j] - pc[i, j]) + + if pv[i, j] < 0: + pc[i, j] = 0 + + pv[i, j] = (15 / 8) * (2 * rot_coh_mat[8][i, j] - pc[i, j]) + s[i, j] = rot_coh_mat[0][i, j] - 0.5 * pv[i, j] + d[i, j] = tp - pv[i, j] - pc[i, j] - s[i, j] + c[i, j] = rot_coh_mat[1][i, j] + rot_coh_mat[2][i, j] + (1 / 6) * pv[i, j] + + else: + + pv[i, j] = 2 * (2 * rot_coh_mat[8][i, j] - pc[i, j]) + + if pv[i, j] < 0: + pc[i, j] = 0 + + pv[i, j] = 2 * (2 * rot_coh_mat[8][i, j] - pc[i, j]) + s[i, j] = rot_coh_mat[0][i, j] - 0.5 * pv[i, j] + d[i, j] = tp - pv[i, j] - pc[i, j] - s[i, j] + c[i, j] = rot_coh_mat[1][i, j] + rot_coh_mat[2][i, j] + + else: + pv[i, j] = (15 / 16) * (2 * rot_coh_mat[8][i, j] - pc[i, j]) + + if pv[i, j] < 0: + pc[i, j] = 0 + + pv[i, j] = (15 / 16) * (2 * rot_coh_mat[8][i, j] - pc[i, j]) + s[i, j] = rot_coh_mat[0][i, j] + d[i, j] = tp - pv[i, j] - pc[i, j] - s[i, j] + c[i, j] = rot_coh_mat[1][i, j] + rot_coh_mat[2][i, j] + + return [pc, pv, s, d, c, rot_coh_mat, c1] + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "General Four-Component Scattering Power Decomposition With Unitary Transformation + of Coherency Matrix" + + IEEEXplore: https://ieeexplore.ieee.org/document/6311461 + + DOI: 10.1109/TGRS.2012.2212446 + + This paper presents a new general four component scattering power methods by unitary transformation of + the coherency matrix. By additional transformation, it became possible to reduce the number of independent + parameters from eight to seven. + + The model can be written as: + + <[T(theta)]> = fs * <[Ts]> + fd * <[Td]> + fv * <[Tv]> + fc * <[Tc]> + + <[T(phi)]> = U(phi) * <[T(theta)]> * transpose(conj(U(phi)) + + <[T(phi)]> = U(phi) * (fs * <[Ts]> + fd * <[Td]> + fv * <[Tv]> + fc * <[Tc]>) * transpose(conj(U(phi)) + + <[T(phi)]> = fs * <[T(phi)s]> + fd * <[T(phi)d]> + fv * <[T(phi)v]> + fc * <[T(phi)c]> + + U(phi) = [1 0 0 + 0 cos(phi) j * sin(phi) + 0 j * sin(phi) cos(phi)] + + fs: for surface scattering + fd: for double-bounce scattering + fv: for volume scattering + fc: for helix scattering + + ps: scattered power return associated with surface scattering + pd: scattered power return associated with double-bounce scattering + pv: scattered power return associated with volume scattering + pc: scattered power return associated with helix scattering + + :return: It returns ps, pd, pv, and pc which are associated with fs, fd, fv, and fc + """ + + x = self.get_scattering_power() + rot_coh_mat, c1 = x[5], x[6] + t_11_theta, t_22_theta, t_33_theta = rot_coh_mat[0], rot_coh_mat[4], rot_coh_mat[8] + rows, cols = np.shape(rot_coh_mat[0])[0], np.shape(rot_coh_mat[0])[1] + pc, pv, s, d, c = x[0], x[1], x[2], x[3], x[4] + print(np.shape(pc), np.shape(pv), np.shape(s), np.shape(d), np.shape(c)) + ps, pd = np.zeros([rows, cols]), np.zeros([rows, cols]) + + for i in range(rows): + for j in range(cols): + + tp = rot_coh_mat[0][i, j] + rot_coh_mat[4][i, j] + rot_coh_mat[8][i, j] + + if c1[i, j] < 0: + pd[i, j] = d[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + ps[i, j] = s[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + + else: + if pv[i, j] + pc[i, j] > tp: + ps[i, j], pd[i, j] = 0, 0 + pv[i, j] = tp - pc[i, j] + + else: + c0 = 2 * t_11_theta[i, j] + pc[i, j] - tp + + if c0 > 0: + ps[i, j] = s[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / s[i, j] + pd[i, j] = d[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / s[i, j] + + else: + ps[i, j] = s[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + pd[i, j] = d[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + + if ps[i, j] > 0 > pd[i, j]: + pd[i, j] = 0 + ps[i, j] = tp - pv[i, j] - pc[i, j] + + elif pd[i, j] > 0 > ps[i, j]: + ps[i, j] = 0 + pd[i, j] = tp - pv[i, j] - pc[i, j] + + return [10 * np.log10(abs(ps)), 10 * np.log10(abs(pd)), + 10 * np.log10(abs(pv)), 10 * np.log10(abs(pc))] + + def get_result(self): + x = self.get_decomposition() + ps, pd, pv, pc = x[0], x[1], x[2], x[3] + + scattering_list = ['ps', 'pd', 'pv', 'pc'] + + for i in range(len(x)): + + cols, rows = ps.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'singh_4SD' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + + +class General6SD(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + def scattering_power(self): + + cov_mat = self.get_cov_mat_img() + coh_mat = self.get_coh_mat_img() + rot_coh_mat = self.rot_coh_mat_img() + t_11_theta, t_22_theta, t_33_theta = rot_coh_mat[0], rot_coh_mat[4], rot_coh_mat[8] + t_12_theta = rot_coh_mat[1] + rows, cols = np.shape(cov_mat[0])[0], np.shape(cov_mat[0])[1] + + ph = 2 * abs(np.imag(coh_mat[5])) + pcd = 2 * abs(np.imag(rot_coh_mat[2])) + pod = 2 * abs(np.real(rot_coh_mat[2])) + pcw = pcd + pod + pv = 2 * rot_coh_mat[8] - ph - pod - pcd + s = np.zeros([rows, cols]) + d = np.zeros([rows, cols]) + c = np.zeros([rows, cols], dtype=complex) + c1_mat = np.zeros([rows, cols]) + + for i in range(rows): + for j in range(cols): + + c1 = t_11_theta[i, j] - t_22_theta[i, j] + (7 / 8) * t_33_theta[i, j] + c1 += (1 / 16) * ph[i, j] - (15 / 16) * (pod[i, j] + pcd[i, j]) + c1_mat[i, j] = c1 + + if c1 > 0: + if pv[i, j] < 0: + ph[i, j] = 0 + pod[i, j] = 0 + pcd[i, j] = 0 + pv[i, j] = 2 * t_33_theta[i, j] + + if cov_mat[8][i, j] <= 0 or cov_mat[0][i, j] <= 0: + cov_mat[8][i, j], cov_mat[0][i, j] = 1.0, 1.0 + + if 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) < -2: + pv[i, j] = (15 / 8) * pv[i, j] + s[i, j] = t_11_theta[i, j] - 0.5 * pv[i, j] - 0.5 * pod[i, j] - 0.5 * pcd[i, j] + d[i, j] = t_22_theta[i, j] - (7 / 30) * pv[i, j] - 0.5 * ph[i, j] + c[i, j] = t_12_theta[i, j] - (1 / 6) * pv[i, j] + + elif 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) > 2: + pv[i, j] = (15 / 8) * pv[i, j] + s[i, j] = t_11_theta[i, j] - 0.5 * pv[i, j] - 0.5 * pod[i, j] - 0.5 * pcd[i, j] + d[i, j] = t_22_theta[i, j] - (7 / 30) * pv[i, j] - 0.5 * ph[i, j] + c[i, j] = t_12_theta[i, j] + (1 / 6) * pv[i, j] + + else: + pv[i, j] = 2 * pv[i, j] + s[i, j] = t_11_theta[i, j] - 0.5 * pv[i, j] - 0.5 * pod[i, j] - 0.5 * pcd[i, j] + d[i, j] = t_22_theta[i, j] - 0.25 * pv[i, j] - 0.5 * ph[i, j] + c[i, j] = t_12_theta[i, j] + + else: + + if pv[i, j] < 0: + pv[i, j] = 0 + + if ph[i, j] > pcw[i, j]: + pcw[i, j] = 2 * t_33_theta[i, j] - ph[i, j] + + if pcw[i, j] < 0: + pcw[i, j] = 0 + + if pod[i, j] > pcd[i, j]: + pcd[i, j] = pcw[i, j] - pod[i, j] + else: + pod[i, j] = pcw[i, j] - pcd[i, j] + + else: + ph[i, j] = 2 * t_33_theta[i, j] - pcw[i, j] + + if ph[i, j] < 0: + ph[i, j] = 0 + + pv[i, j] = (15 / 16) * pv[i, j] + s[i, j] = t_11_theta[i, j] - 0.5 * pod[i, j] - 0.5 * pcd[i, j] + d[i, j] = t_22_theta[i, j] - (7 / 15) * pv[i, j] - 0.5 * ph[i, j] + c[i, j] = t_12_theta[i, j] + + return [ph, pcd, pod, pv, pcw, s, d, c, cov_mat, rot_coh_mat, c1_mat] + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "Model-Based Six-Component Scattering Matrix Power Decomposition" + + IEEEXplore: https://ieeexplore.ieee.org/document/8356711 + + DOI: 10.1109/TGRS.2018.2824322 + + The major accomplishment of this paper was associated with the inclusion of 2 new types of physical + scattering submodels against the existing 4 component scattering power decomposition(4SD - + Refer Yamaguchi, Singh4SD) to account for the real and imaginary part of the T13 of the coherency matrix. + + *** One is oriented dipole scattering and other is oriented quarter wave reflector *** + + The total scattered power can be written as: + + [T] = ps*[Ts] + pd*[Ts] + pv*[Tv] + ph*[Th] + pod*[Tod] + pcd*[Tcd] + + ps: surface scattering + pd: double bounce scattering + pv: volume scattering + ph: helix scattering + pcd: compound dipole scattering + pod: oriented dipole scattering + + :return: It returns the decibel units of ps, pd, pv, ph, pod, pcd + """ + + x = self.scattering_power() + ph, pcd, pod, pv, pcw, s, d, c = x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7] + cov_mat, rot_coh_mat = x[8], x[9] + c1_mat = x[10] + t_11_theta, t_22_theta, t_33_theta = rot_coh_mat[0], rot_coh_mat[4], rot_coh_mat[8] + rows, cols = np.shape(ph)[0], np.shape(ph)[1] + ps, pd = np.zeros([rows, cols]), np.zeros([rows, cols]) + + for i in range(rows): + for j in range(cols): + + tp = t_11_theta[i, j] + t_22_theta[i, j] + t_33_theta[i, j] + + if c1_mat[i, j] < 0: + ps[i, j] = s[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + pd[i, j] = d[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + + else: + + if pv[i, j] + ph[i, j] + pcw[i, j] > tp: + ps[i, j], pd[i, j] = 0, 0 + pv[i, j] = tp - ph[i, j] - pod[i, j] - pcd[i, j] + + else: + c0 = 2 * t_11_theta[i, j] + ph[i, j] - tp + + if c0 > 0: + ps[i, j] = s[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / s[i, j] + pd[i, j] = d[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / s[i, j] + + else: + ps[i, j] = s[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + pd[i, j] = d[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + + if ps[i, j] > 0 > pd[i, j]: + pd[i, j] = 0 + ps[i, j] = tp - pv[i, j] - ph[i, j] - pod[i, j] - pcd[i, j] + + elif pd[i, j] > 0 > ps[i, j]: + ps[i, j] = 0 + pd[i, j] = tp - pv[i, j] - ph[i, j] - pod[i, j] - pcd[i, j] + + return [10 * np.log10(abs(ps)), 10 * np.log10(abs(pd)), 10 * np.log10(abs(pv)), + 10 * np.log10(abs(ph)), 10 * np.log10(abs(pod)), 10 * np.log10(abs(pcd))] + + def get_result(self): + x = self.get_decomposition() + ps, pd, pv, ph, pod, pcd = x[0], x[1], x[2], x[3], x[4], x[5] + + scattering_list = ['ps', 'pd', 'pv', 'ph', 'pod', 'pcd'] + + for i in range(len(x)): + + cols, rows = ps.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'singh_6SD' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) + + +class General7SD(Polarimetry): + def __init__(self, b, w): + super().__init__(b, w) + + def scattering_power(self): + + cov_mat = self.get_cov_mat_img() + coh_mat = self.get_coh_mat_img() + t_11, t_22, t_33 = coh_mat[0], coh_mat[4], coh_mat[8] + t_12 = coh_mat[1] + rows, cols = np.shape(cov_mat[0])[0], np.shape(cov_mat[0])[1] + + ph = 2 * abs(np.imag(coh_mat[5])) + pcd = 2 * abs(np.imag(coh_mat[2])) + pod = 2 * abs(np.real(coh_mat[2])) + pmd = 2 * abs(np.real(coh_mat[5])) + pmw = pmd + ph + pcw = pcd + pod + pv = 2 * t_33 - ph - pod - pcd - pmd + s = np.zeros([rows, cols]) + d = np.zeros([rows, cols]) + c = np.zeros([rows, cols], dtype=complex) + c1_mat = np.zeros([rows, cols]) + + for i in range(rows): + for j in range(cols): + + c1 = t_11[i, j] - t_22[i, j] - (7 / 8) * t_33[i, j] + c1 += (1 / 16) * (pmd[i, j] + ph[i, j]) - (15 / 16) * (pcd[i, j] + pod[i, j]) + + c1_mat[i, j] = c1 + + if c1 > 0: + if pv[i, j] < 0: + ph[i, j], pod[i, j] = 0, 0 + pmd[i, j], pcd[i, j] = 0, 0 + pv[i, j] = 2 * t_33[i, j] + + if cov_mat[8][i, j] <= 0 or cov_mat[0][i, j] <= 0: + cov_mat[8][i, j], cov_mat[0][i, j] = 1.0, 1.0 + + if 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) < -2: + pv[i, j] = (15 / 8) * pv[i, j] + s[i, j] = t_11[i, j] - 0.5 * pv[i, j] - 0.5 * pod[i, j] - 0.5 * pcd[i, j] + d[i, j] = t_22[i, j] - (7 / 30) * pv[i, j] - 0.5 * ph[i, j] - 0.5 * pmd[i, j] + c[i, j] = t_12[i, j] - (1 / 6) * pv[i, j] + + elif 10 * math.log10(cov_mat[8][i, j] / cov_mat[0][i, j]) > 2: + pv[i, j] = (15 / 8) * pv[i, j] + s[i, j] = t_11[i, j] - 0.5 * pv[i, j] - 0.5 * pod[i, j] - 0.5 * pcd[i, j] + d[i, j] = t_22[i, j] - (7 / 30) * pv[i, j] - 0.5 * ph[i, j] - 0.5 * pmd[i, j] + c[i, j] = t_12[i, j] + (1 / 6) * pv[i, j] + + else: + pv[i, j] = 2 * pv[i, j] + s[i, j] = t_11[i, j] - 0.5 * pv[i, j] - 0.5 * pod[i, j] - 0.5 * pcd[i, j] + d[i, j] = t_22[i, j] - 0.25 * pv[i, j] - 0.5 * ph[i, j] - 0.5 * pmd[i, j] + c[i, j] = t_12[i, j] + + else: + if pv[i, j] < 0: + pv[i, j] = 0 + + if pmw[i, j] > pcw[i, j]: + pcw[i, j] = 2 * t_33[i, j] - pmw[i, j] + + if pcw[i, j] < 0: + pcw[i, j] = 0 + + if pod[i, j] > pcd[i, j]: + pcd[i, j] = pcw[i, j] - pod[i, j] + + if pcd[i, j] < 0: + pcd[i, j] = 0 + + else: + pod[i, j] = pcw[i, j] - pcd[i, j] + + if pod[i, j] < 0: + pod[i, j] = 0 + + else: + pmw[i, j] = 2 * t_33[i, j] - pcw[i, j] + + if pmw[i, j] < 0: + pmw[i, j] = 0 + + if pmd[i, j] > ph[i, j]: + ph[i, j] = pmw[i, j] - pmd[i, j] + + if ph[i, j] < 0: + ph[i, j] = 0 + + else: + pmd[i, j] = pmw[i, j] - ph[i, j] + if pmd[i, j] < 0: + pmd[i, j] = 0 + + pv[i, j] = (15 / 16) * pv[i, j] + s[i, j] = t_11[i, j] - 0.5 * pod[i, j] - 0.5 * pcd[i, j] + d[i, j] = t_22[i, j] - (7 / 15) * pv[i, j] - 0.5 * ph[i, j] - 0.5 * pmd[i, j] + c[i, j] = t_12[i, j] + + return [ph, pcd, pcw, pmd, pmw, pod, pv, s, d, c, cov_mat, coh_mat, c1_mat] + + def get_decomposition(self): + + """ + PROGRAMMER: Raktim Ghosh, MSc (University of Twente) - Date Written (May, 2020) + + Paper Details: "Seven-Component Scattering Power Decomposition of POLSAR Coherency Matrix" + + IEEEXplore: https://ieeexplore.ieee.org/document/8751154 + + DOI: 10.1109/TGRS.2019.2920762 + + The 9 independent parameters of target coherency matrix, are assocaited with some phsical scattering models. + This paper attempts to assign one such physical scattering model to the real part of T23, and develop a new + scattering power decomposition model. + + The establised 7SD model is a extension of previosly developed 6SD model (Refer General 6SD) + + [T] = ps*[Ts] + pd*[Ts] + pv*[Tv] + ph*[Th] + pod*[Tod] + pcd*[Tcd] + + The scattering powers (ps, pd, pv, ph, pod, pcd, pmd) represents the scattering contributions + to the corresponding channels associated with the scattering matrix. + + ps: surface scattering + pd: double bounce scattering + pv: volume scattering + ph: helix scattering + pcd: compound dipole scattering + pod: oriented dipole scattering + pmd: mixed dipole scattering + + :return: It returns decibel unit of ps, pd, pv, ph, pcd, pod, pmd + """ + + x = self.scattering_power() + ph, pcd, pcw, pmd, pmw, pod, pv = x[0], x[1], x[2], x[3], x[4], x[5], x[6] + s, d, c = x[7], x[8], x[9] + cov_mat, coh_mat = x[10], x[11] + c1_mat = x[12] + t_11, t_22, t_33 = coh_mat[0], coh_mat[4], coh_mat[8] + rows, cols = np.shape(ph)[0], np.shape(ph)[1] + ps, pd = np.zeros([rows, cols]), np.zeros([rows, cols]) + + for i in range(rows): + for j in range(cols): + + tp = t_11[i, j] + t_22[i, j] + t_33[i, j] + + if c1_mat[i, j] < 0: + ps[i, j] = s[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + pd[i, j] = d[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + + else: + + if pv[i, j] + pmw[i, j] + pcw[i, j] > tp: + ps[i, j], pd[i, j] = 0, 0 + pv[i, j] = tp - ph[i, j] - pmd[i, j] - pod[i, j] - pcd[i, j] + + else: + c0 = 2 * t_11[i, j] + ph[i, j] + pmd[i, j] - tp + + if c0 > 0: + ps[i, j] = s[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / s[i, j] + pd[i, j] = d[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / s[i, j] + + else: + ps[i, j] = s[i, j] - abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + pd[i, j] = d[i, j] + abs((c[i, j] * np.conj(c[i, j]))) / d[i, j] + + if ps[i, j] > 0 > pd[i, j]: + pd[i, j] = 0 + ps[i, j] = tp - pv[i, j] - ph[i, j] - pod[i, j] - pcd[i, j] + + elif pd[i, j] > 0 > ps[i, j]: + ps[i, j] = 0 + pd[i, j] = tp - pv[i, j] - ph[i, j] - pod[i, j] - pcd[i, j] + + return [10 * np.log10(ps), 10 * np.log10(pd), 10 * np.log10(pv), + 10 * np.log10(ph), 10 * np.log10(pod), 10 * np.log10(pcd), + 10 * np.log10(pmd)] + + def get_result(self): + x = self.get_decomposition() + ps, pd, pv, ph, pod, pcd, pmd = x[0], x[1], x[2], x[3], x[4], x[5], x[6] + + scattering_list = ['ps', 'pd', 'pv', 'ph', 'pod', 'pcd', 'pmd'] + + for i in range(len(x)): + + cols, rows = ps.shape + driver = gdal.GetDriverByName("GTiff") + outfile = 'scattering' + '_' + scattering_list[i] + '_' + 'singh_7SD' + outfile += '.tiff' + out_data = driver.Create(outfile, rows, cols, 1, gdal.GDT_Float32) + out_data.SetProjection(self.get_band().GetProjection()) + out_data.SetGeoTransform(self.get_band().GetGeoTransform()) + out_data.GetRasterBand(1).WriteArray(x[i]) +""" +band = gdal.Open("HH.tif") +#band = gdal.Open("C:/Users/ThisPc/RS2-SLC-FQ2-DES-15-Apr-2008_14.38-PDS_05116980_Cal.tif") +# band = gdal.Open("C:/Users/ThisPc/RS2-SLC-FQ2-DES-15-Apr-2008_14.tif") + +decomposition = ModTouzi(band, 5) +decomposition.get_result() +""" \ No newline at end of file diff --git a/tool/algorithm/polsarpro/pspCloudePottierDecomposition.py b/tool/algorithm/polsarpro/pspCloudePottierDecomposition.py new file mode 100644 index 0000000..fb31608 --- /dev/null +++ b/tool/algorithm/polsarpro/pspCloudePottierDecomposition.py @@ -0,0 +1,132 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:pspHAAlphaDecomposition.py Cloude-Pottier分解 +@Function: Cloude-Pottier eigenvector/eigenvalue based decomposition of a 3x3 coherency matrix [T3] + (Averaging using a sliding window) + V1.0.1:(1)可选分解特征;(2)bin转tif格式 +@Contact: +@Author:SHJ +@Date:2021/9/24 9:06 +@Version:1.0.1 +""" + +import os +import shutil +import subprocess +import logging + +logger = logging.getLogger("mylog") + + +class PspCloudePottierDecomposition: + """ + 调用polsarpro4.2.0的Cloude-Pottier极化分解 h_a_alpha_decomposition_T3.exe + """ + + def __init__( + self, + exeDir, + inT3Dir, + outDir, + exeDecomposeName='h_a_alpha_decomposition_T3.exe'): + """ + :param exeDir:exe所在目录 + :param inT3Dir:T3矩阵目录 + :param outDir:输出目录 + """ + self.__exeName = exeDecomposeName + self.__exeDir = exeDir + self.__inT3Dir = inT3Dir + self.__outDir = outDir + self.__DecompostFlag = False + pass + + def api_h_a_alpha_decomposition_T3( + self, + rectX, + rectY, + rectWidth, + rectHeight, + Nwin=1): + """ + :param rectX:有效区域x + :param rectY:有效区域y + :param rectWidth:有效区域宽 + :param rectHeight:有效区域高 + :param Nwin :Size of the (Nwin, Nwin) sliding window used to compute local estimates. (int) + """ + if self.__DecompostFlag: + return True + if len(self.__exeDir) == 0: + if not os.path.exists(self.__exeName): + logger.error(self.__exeName + ' not exists.') + return False + exePath = self.__exeName + else: + if not os.path.exists(self.__exeDir + '\\' + self.__exeName): + logger.error(self.__exeName + ' not exists.') + return False + exePath = self.__exeDir + '\\' + self.__exeName + + if not self._checkT3Matrix(self.__inT3Dir): + logger.error('T3 Matrix check failed.') + return False + if not os.path.exists(self.__outDir): + os.makedirs(self.__outDir) + + alpbetdelgam = 1 + Lambda = 1 + alpha = 1 + entropy = 1 + anisotropy = 1 + + CombHA = 1 + CombH1mA = 1 + Comb1mHA = 1 + Comb1mH1mA = 1 + + Off_lig = rectX + Off_col = rectY + Sub_Nlig = rectWidth + Sub_Ncol = rectHeight + + para_list = [ + exePath, + self.__inT3Dir, + self.__outDir, + Nwin, + Off_lig, + Off_col, + Sub_Nlig, + Sub_Ncol, + alpbetdelgam, + Lambda, + alpha, + entropy, + anisotropy, + CombHA, + CombH1mA, + Comb1mHA, + Comb1mH1mA] + cmd = " ".join(str(i) for i in para_list) + config_path = os.path.join(self.__inT3Dir, 'config.txt') + shutil.copyfile(config_path, os.path.join(self.__outDir, 'config.txt')) + result_tuple = subprocess.getstatusoutput(cmd) + + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1: + raise Exception(result_tuple[1]) + self.__DecompostFlag = True + return True + @staticmethod + def _checkT3Matrix(T3Dir): + # 检测T3矩阵 + if not os.path.exists(T3Dir): + return False + file_name_in_out = ['T11.bin', 'T12_real.bin', 'T12_imag.bin', + 'T13_real.bin', 'T13_imag.bin', 'T22.bin', + 'T23_real.bin', 'T23_imag.bin', 'T33.bin'] + for item in file_name_in_out: + if not os.path.exists(T3Dir + "\\" + item): + return False + return True diff --git a/tool/algorithm/polsarpro/pspFreemanDecomposition.py b/tool/algorithm/polsarpro/pspFreemanDecomposition.py new file mode 100644 index 0000000..656f81a --- /dev/null +++ b/tool/algorithm/polsarpro/pspFreemanDecomposition.py @@ -0,0 +1,109 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:pspFreemanDecomposition.py +@Function: +@Contact: +@Author:LVY +@Date:2021/10/12 18:45 +@Version:1.0.0 +""" + +import os +import shutil +import subprocess +import logging +logger = logging.getLogger("mylog") + + +class PspFreemanDecomposition: + """ + Freeman分解 + """ + + def __init__( + self, + exeDir, + inT3Dir, + outDir, + exeDecomposeName='freeman_decomposition_T3.exe'): + """ + :param exeDir:exe所在目录 + :param inT3Dir:T3矩阵目录 + :param outDir:输出目录 + """ + self.__exeName = exeDecomposeName + self.__exeDir = exeDir + self.__inT3Dir = inT3Dir + self.__outDir = outDir + self.__DecompostFlag = False + pass + + def api_freeman_decomposition_T3( + self, + rectX, + rectY, + rectWidth, + rectHeight, + Nwin=1): + """ + :param rectX:有效区域x + :param rectY:有效区域y + :param rectWidth:有效区域宽 + :param rectHeight:有效区域高 + :param Nwin :Size of the (Nwin, Nwin) sliding window used to compute local estimates. (int) + """ + if self.__DecompostFlag: + return True + if len(self.__exeDir) == 0: + if not os.path.exists(self.__exeName): + logger.error(self.__exeName + ' not exists.') + return False + exePath = self.__exeName + else: + if not os.path.exists(self.__exeDir + '\\' + self.__exeName): + logger.error(self.__exeName + ' not exists.') + return False + exePath = self.__exeDir + '\\' + self.__exeName + + if not self._checkT3Matrix(self.__inT3Dir): + logger.error('T3 Matrix check failed.') + return False + if not os.path.exists(self.__outDir): + os.makedirs(self.__outDir) + + Off_lig = rectX + Off_col = rectY + Sub_Nlig = rectWidth + Sub_Ncol = rectHeight + + para_list = [ + exePath, + self.__inT3Dir, + self.__outDir, + Nwin, + Off_lig, + Off_col, + Sub_Nlig, + Sub_Ncol] + cmd = " ".join(str(i) for i in para_list) + config_path = os.path.join(self.__inT3Dir, 'config.txt') + shutil.copyfile(config_path, os.path.join(self.__outDir, 'config.txt')) + result_tuple = subprocess.getstatusoutput(cmd) + + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1: + raise Exception(result_tuple[1]) + self.__DecompostFlag = True + return True + @staticmethod + def _checkT3Matrix(T3Dir): + # 检测T3矩阵 + if not os.path.exists(T3Dir): + return False + file_name_in_out = ['T11.bin', 'T12_real.bin', 'T12_imag.bin', + 'T13_real.bin', 'T13_imag.bin', 'T22.bin', + 'T23_real.bin', 'T23_imag.bin', 'T33.bin'] + for item in file_name_in_out: + if not os.path.exists(T3Dir + "\\" + item): + return False + return True diff --git a/tool/algorithm/polsarpro/pspHAAlphaDecomposition.py b/tool/algorithm/polsarpro/pspHAAlphaDecomposition.py new file mode 100644 index 0000000..041a124 --- /dev/null +++ b/tool/algorithm/polsarpro/pspHAAlphaDecomposition.py @@ -0,0 +1,435 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:pspHAAlphaDecomposition.py +@Function: Cloude-Pottier eigenvector/eigenvalue based decomposition of a 3x3 coherency matrix [T3] + (Averaging using a sliding window) + V1.0.1:(1)可选分解特征;(2)bin转tif格式 +@Contact: +@Author:SHJ +@Date:2021/9/24 9:06 +@Version:1.0.1 +""" + +import os +import shutil +import subprocess +import struct +import numpy as np +import glob +from PIL import Image +import logging +logger = logging.getLogger("mylog") +import multiprocessing + +class PspHAAlphaDecomposition: + """ + 调用polsarpro4.2.0的Cloude-Pottier极化分解 + """ + def __init__(self,normalization = False): + self.__normalization = normalization #是否做归一化 + self.__res_h_a_alpha_decomposition_T3 = {} + self.__res_h_a_alpha_eigenvalue_set_T3 = {} + self.__res_h_a_alpha_eigenvector_set_T3 = {} + pass + + def api_creat_h_a_alpha_features_single_process(self, h_a_alpha_out_dir, + h_a_alpha_decomposition_T3_path, h_a_alpha_eigenvalue_set_T3_path, + h_a_alpha_eigenvector_set_T3_path, polsarpro_in_dir,is_trans_to_tif=True, is_read_to_dic=False): + """ + 对porsarpro格式T3矩阵做Cloude-Pottier分解(h_a_alpha_decomposition、h_a_alpha_eigenvalue_set 和 h_a_alpha_eigenvector_set) + :param h_a_alpha_out_dir : 输出h_a_alpha二进制数据的目录 + :param h_a_alpha_decomposition_T3_path: haalphadecompositionT3.exe路径 + :param h_a_alpha_eigenvalue_set_T3_path: h_a_alpha_eigenvalue_set_T3.exe路径 + :param h_a_alpha_eigenvector_set_T3_path: h_a_alpha_eigenvector_set_T3.exe路径 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + """ + h_a_alpha_features ={} + h_a_alpha_features.update(self.api_h_a_alpha_decomposition_T3(h_a_alpha_out_dir, h_a_alpha_decomposition_T3_path, polsarpro_in_dir, is_trans_to_tif,is_read_to_dic, *(1, 1, 1, 1, 1, 1, 1, 1, 1))) + logger.info("run h_a_alpha_decomposition_T3 success!") + logger.info('progress bar: 40%') + h_a_alpha_features.update(self.api_h_a_alpha_eigenvalue_set_T3(h_a_alpha_out_dir, h_a_alpha_eigenvalue_set_T3_path, polsarpro_in_dir, is_trans_to_tif, is_read_to_dic, *(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))) + logger.info("run h_a_alpha_eigenvalue_set_T3 success!") + logger.info('progress bar: 60%') + h_a_alpha_features.update(self.api_h_a_alpha_eigenvector_set_T3(h_a_alpha_out_dir, h_a_alpha_eigenvector_set_T3_path, polsarpro_in_dir, is_trans_to_tif,is_read_to_dic, *(1, 1, 1, 1, 1))) + logger.info("run h_a_alpha_eigenvector_set_T3 success!") + logger.info('progress bar: 80%') + if is_trans_to_tif: + self.api_trans_T3_to_tif(h_a_alpha_out_dir, polsarpro_in_dir) + if is_read_to_dic: + h_a_alpha_features.update(self.api_read_T3_matrix(polsarpro_in_dir)) + return h_a_alpha_features + + def api_creat_h_a_alpha_features(self, h_a_alpha_out_dir, + h_a_alpha_decomposition_T3_path, h_a_alpha_eigenvalue_set_T3_path, + h_a_alpha_eigenvector_set_T3_path, polsarpro_in_dir,is_trans_to_tif=True, is_read_to_dic=False): + """ + 对porsarpro格式T3矩阵做Cloude-Pottier分解(h_a_alpha_decomposition、h_a_alpha_eigenvalue_set 和 h_a_alpha_eigenvector_set) + :param h_a_alpha_out_dir : 输出h_a_alpha二进制数据的目录 + :param h_a_alpha_decomposition_T3_path: haalphadecompositionT3.exe路径 + :param h_a_alpha_eigenvalue_set_T3_path: h_a_alpha_eigenvalue_set_T3.exe路径 + :param h_a_alpha_eigenvector_set_T3_path: h_a_alpha_eigenvector_set_T3.exe路径 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + """ + + pool = multiprocessing.Pool(processes=3) + pl = [] + + logger.info("run h_a_alpha_decomposition_T3!") + pl.append(pool.apply_async(self.api_h_a_alpha_decomposition_T3, (h_a_alpha_out_dir, h_a_alpha_decomposition_T3_path, polsarpro_in_dir, is_trans_to_tif, is_read_to_dic, *(1, 1, 1, 1, 1, 1, 1, 1, 1)))) + logger.info("run h_a_alpha_eigenvalue_set_T3!") + pl.append(pool.apply_async(self.api_h_a_alpha_eigenvalue_set_T3, (h_a_alpha_out_dir, h_a_alpha_eigenvalue_set_T3_path, polsarpro_in_dir, is_trans_to_tif, is_read_to_dic, *(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)))) + logger.info("run h_a_alpha_eigenvector_set_T3!") + pl.append(pool.apply_async(self.api_h_a_alpha_eigenvector_set_T3, (h_a_alpha_out_dir, h_a_alpha_eigenvector_set_T3_path, polsarpro_in_dir, is_trans_to_tif,is_read_to_dic, *(1, 1, 1, 1, 1)))) + + pool.close() + pool.join() + logger.info(pl) + logger.info('progress bar: 60%') + + h_a_alpha_features = {} + h_a_alpha_features.update(self.__res_h_a_alpha_decomposition_T3) + logger.info("run h_a_alpha_decomposition_T3 success!") + h_a_alpha_features.update(self.__res_h_a_alpha_eigenvalue_set_T3) + logger.info("run h_a_alpha_eigenvalue_set_T3 success!") + h_a_alpha_features.update(self.__res_h_a_alpha_eigenvector_set_T3) + logger.info("run h_a_alpha_eigenvector_set_T3 success!") + if is_trans_to_tif: + self.api_trans_T3_to_tif(h_a_alpha_out_dir, polsarpro_in_dir) + if is_read_to_dic: + h_a_alpha_features.update(self.api_read_T3_matrix(polsarpro_in_dir)) + return h_a_alpha_features + + def api_h_a_alpha_decomposition_T3(self, h_a_alpha_out_dir, h_a_alpha_decomposition_T3_path, polsarpro_in_dir, is_trans_to_tif=True, is_read_to_dic=False, *args): + """ + 对porsarpro格式T3矩阵做Cloude-Pottier分解(H-A-Alpha分解) + :param h_a_alpha_out_dir : 输出h_a_alpha二进制数据的目录 + :param h_a_alpha_decomposition_T3_path: haalphadecompositionT3.exe路径 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + :param is_trans_to_tif:分解特征是否转换为tif + :param is_read_to_dic:分解特征是否以字典输出 + :param *args:9个可选分解特征(alpbetdelgam,Lambda,alpha,entropy,anisotropy, + CombHA,CombH1mA,Comb1mHA,Comb1mH1mA),不输出:0,输出:1 + :return : 包含分解特征的字典 + """ + if not os.path.exists(h_a_alpha_out_dir): + os.makedirs(h_a_alpha_out_dir) + self.__h_a_alpha_decomposition_T3(h_a_alpha_out_dir, h_a_alpha_decomposition_T3_path, polsarpro_in_dir, *args) + name_list = ['entropy', 'anisotropy', 'alpha', 'beta', 'delta', 'gamma', 'lambda', + 'combination_1mH1mA', 'combination_1mHA', 'combination_H1mA', 'combination_HA'] + if is_trans_to_tif: + self.__write_haalpha_to_tif(h_a_alpha_out_dir, h_a_alpha_out_dir, name_list) + + if is_read_to_dic: + self.__res_h_a_alpha_decomposition_T3 = self.__read_haalpha(h_a_alpha_out_dir, name_list) + return self.__res_h_a_alpha_decomposition_T3 + else: + return {} + + def api_h_a_alpha_eigenvalue_set_T3(self, h_a_alpha_out_dir, h_a_alpha_eigenvalue_set_T3_path, polsarpro_in_dir, is_trans_to_tif=True, is_read_to_dic=False, *args): + + """ + Cloude-Pottier eigenvalue based decomposition of a coherency matrix + :param h_a_alpha_out_dir : Cloude-Pottier eigenvalue + :param h_a_alpha_eigenvalue_set_T3_path: h_a_alpha_eigenvalue_set_T3.exe路径 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + :param is_trans_to_tif:分解特征是否转换为tif + :param is_read_to_dic:分解特征是否以字典输出 + :param *args:9个可选分解特征(alpbetdelgam,Lambda,alpha,entropy,anisotropy, + CombHA,CombH1mA,Comb1mHA,Comb1mH1mA),不输出:0,输出:1 + :return : 包含分解特征的字典 + """ + if not os.path.exists(h_a_alpha_out_dir): + os.makedirs(h_a_alpha_out_dir) + self.__h_a_alpha_eigenvalue_set_T3(h_a_alpha_out_dir, h_a_alpha_eigenvalue_set_T3_path, polsarpro_in_dir, *args) + name_list = ['anisotropy', 'anisotropy_lueneburg', 'anisotropy12', 'asymetry', 'derd', 'derd_norm', 'entropy_shannon', + 'entropy_shannon_I', 'entropy_shannon_I_norm', 'entropy_shannon_norm', 'entropy_shannon_P', + 'entropy_shannon_P_norm', 'l1', 'l2', 'l3', 'p1', 'p2', 'p3', 'pedestal', 'polarisation_fraction', + 'rvi', 'serd', 'serd_norm'] + if is_trans_to_tif: + self.__write_haalpha_to_tif(h_a_alpha_out_dir, h_a_alpha_out_dir, name_list) + + if is_read_to_dic: + self.__res_h_a_alpha_eigenvalue_set_T3 = self.__read_haalpha(h_a_alpha_out_dir, name_list) + return self.__res_h_a_alpha_eigenvalue_set_T3 + else: + return {} + + def api_h_a_alpha_eigenvector_set_T3(self, h_a_alpha_out_dir, h_a_alpha_eigenvector_set_T3_path, polsarpro_in_dir, is_trans_to_tif=True, is_read_to_dic=False, *args): + + """ + Cloude-Pottier eigenvector based decomposition of a coherency matrix + :param h_a_alpha_out_dir : Cloude-Pottier eigenvector + :param h_a_alpha_eigenvector_set_T3_path: h_a_alpha_eigenvector_set_T3.exe路径 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + :param is_trans_to_tif:分解特征是否转换为tif + :param is_read_to_dic:分解特征是否以字典输出 + :param *args:9个可选分解特征(alpbetdelgam,Lambda,alpha,entropy,anisotropy, + CombHA,CombH1mA,Comb1mHA,Comb1mH1mA),不输出:0,输出:1 + :return : 包含分解特征的字典 + """ + if not os.path.exists(h_a_alpha_out_dir): + os.makedirs(h_a_alpha_out_dir) + self.__h_a_alpha_eigenvector_set_T3(h_a_alpha_out_dir, h_a_alpha_eigenvector_set_T3_path, polsarpro_in_dir, *args) + name_list = ['alpha', 'alpha1', 'alpha2', 'alpha3', + 'beta', 'beta1', 'beta2', 'beta3', + 'delta', 'delta1', 'delta2', 'delta3', + 'gamma', 'gamma1', 'gamma2', 'gamma3'] + if is_trans_to_tif: + self.__write_haalpha_to_tif(h_a_alpha_out_dir, h_a_alpha_out_dir, name_list) + + if is_read_to_dic: + self.__res_h_a_alpha_eigenvector_set_T3 = self.__read_haalpha(h_a_alpha_out_dir, name_list) + return self.__res_h_a_alpha_eigenvector_set_T3 + else: + return {} + + def api_read_T3_matrix(self,polsarpro_T3_dir): + """ + 读取T3矩阵,转换字典 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + :return : 包含T3矩阵的字典 + """ + name_list = ['T11', 'T12_imag', 'T12_real', + 'T22', 'T13_imag', 'T13_real', + 'T33', 'T23_imag', 'T23_real'] + return self.__read_haalpha(polsarpro_T3_dir, name_list) + + def api_trans_T3_to_tif(self, out_tif_dir, polsarpro_T3_dir): + """ + 将T3矩阵从bin格式转换为tif格式 + :param out_tif_dir:保存路径 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + """ + name_list = ['T11', 'T12_imag', 'T12_real', + 'T22', 'T13_imag', 'T13_real', + 'T33', 'T23_imag', 'T23_real'] + self.__write_haalpha_to_tif(out_tif_dir, polsarpro_T3_dir, name_list) + + @staticmethod + def __h_a_alpha_decomposition_T3(h_a_alpha_out_dir, h_a_alpha_decomposition_T3_path, polsarpro_in_dir, *args): + """ + 对porsarpro格式T3矩阵做Cloude-Pottier分解(H-A-Alpha分解) + :param h_a_alpha_out_dir : 输出h_a_alpha二进制数据的目录 + :param h_a_alpha_decomposition_T3_path: haalphadecompositionT3.exe路径 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + :param *args:9个可选输出变量(alpbetdelgam,Lambda,alpha,entropy,anisotropy, + CombHA,CombH1mA,Comb1mHA,Comb1mH1mA),不输出:0,输出:1 + """ + if not os.path.exists(h_a_alpha_decomposition_T3_path): + raise Exception(h_a_alpha_decomposition_T3_path +' is not exists!') + + NwinFilter = 1 + offsetRow = 0 + offsetCol = 0 + + config_path = os.path.join(polsarpro_in_dir, 'config.txt') + config = open(config_path, 'r').read().split('\n', -1) + + numRow = int(config[1]) + numCol = int(config[4]) + + alpbetdelgam = int(args[0]) + Lambda = int(args[1]) + alpha = int(args[2]) + entropy = int(args[3]) + anisotropy = int(args[4]) + + CombHA = int(args[5]) + CombH1mA = int(args[6]) + Comb1mHA = int(args[7]) + Comb1mH1mA = int(args[8]) + + para_list = [h_a_alpha_decomposition_T3_path, polsarpro_in_dir, h_a_alpha_out_dir, + str(NwinFilter), str(offsetRow), str(offsetCol), str(numRow), str(numCol), + str(alpbetdelgam), str(Lambda), str(alpha), str(entropy), str(anisotropy), + str(CombHA), str(CombH1mA), str(Comb1mHA), str(Comb1mH1mA)] + cmd = ' '.join(para_list) + + result_tuple = subprocess.getstatusoutput(cmd) + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1 or result_tuple[1].find('Could not open') != -1: + raise Exception(result_tuple[1]) + shutil.copyfile(config_path, os.path.join(h_a_alpha_out_dir, 'config.txt')) + + @staticmethod + def __h_a_alpha_eigenvalue_set_T3(h_a_alpha_out_dir, h_a_alpha_eigenvalue_set_T3_path, polsarpro_in_dir, *args): + + """ + Cloude-Pottier eigenvalue based decomposition of a coherency matrix + :param h_a_alpha_out_dir : Cloude-Pottier eigenvalue + :param h_a_alpha_eigenvalue_set_T3_path: h_a_alpha_eigenvalue_set_T3.exe路径 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + :param *args:11个可选输出变量(eigen123,proba123,anisotropy,anisotropy12,asymetry, + polarisation_fraction,erd,rvi,pedestal,shannon,lueneburg),不输出:0,输出:1 + """ + if not os.path.exists(h_a_alpha_eigenvalue_set_T3_path): + raise Exception(h_a_alpha_eigenvalue_set_T3_path +' is not exists!') + NwinFilter = 1 + offsetRow = 0 + offsetCol = 0 + + config_path = os.path.join(polsarpro_in_dir, 'config.txt') + config = open(config_path, 'r').read().split('\n', -1) + + numRow = int(config[1]) + numCol = int(config[4]) + + eigen123 = int(args[0]) + proba123 = int(args[1]) + anisotropy = int(args[2]) + anisotropy12 = int(args[3]) + asymetry = int(args[4]) + polarisation_fraction = int(args[5]) + erd = int(args[6]) + rvi = int(args[7]) + pedestal = int(args[8]) + shannon = int(args[9]) + lueneburg = int(args[10]) + + para_list = [h_a_alpha_eigenvalue_set_T3_path, polsarpro_in_dir, h_a_alpha_out_dir, + str(NwinFilter), str(offsetRow), str(offsetCol), str(numRow), str(numCol), + str(eigen123), str(proba123), str(anisotropy), str(anisotropy12), str(asymetry), + str(polarisation_fraction), str(erd), str(rvi), str(pedestal), + str(shannon), str(lueneburg)] + cmd = ' '.join(para_list) + + result_tuple = subprocess.getstatusoutput(cmd) + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1 or result_tuple[1].find('Could not open') != -1: + raise Exception(result_tuple[1]) + shutil.copyfile(config_path, os.path.join(h_a_alpha_out_dir, 'config.txt')) + + @staticmethod + def __h_a_alpha_eigenvector_set_T3(h_a_alpha_out_dir, h_a_alpha_eigenvector_set_T3_path, polsarpro_in_dir, *args): + + """ + Cloude-Pottier eigenvector based decomposition of a coherency matrix + :param h_a_alpha_out_dir : Cloude-Pottier eigenvector + :param h_a_alpha_eigenvector_set_T3_set_T3_path: h_a_alpha_eigenvector_set_T3.exe路径 + :param polsarpro_in_dir:输入porsarpro格式T3矩阵目录,包含.bin,.config + :param *args:5个可选输出变量(alpha123,beta123,delta123,gamma123,alpbetdelgam),不输出:0,输出:1 + """ + if not os.path.exists(h_a_alpha_eigenvector_set_T3_path): + raise Exception(h_a_alpha_eigenvector_set_T3_path +' is not exists!') + NwinFilter = 1 + offsetRow = 0 + offsetCol = 0 + + config_path = os.path.join(polsarpro_in_dir, 'config.txt') + config = open(config_path, 'r').read().split('\n', -1) + + numRow = int(config[1]) + numCol = int(config[4]) + + alpha123 = int(args[0]) + beta123 = int(args[1]) + delta123 = int(args[2]) + gamma123 = int(args[3]) + alpbetdelgam = int(args[4]) + + para_list = [h_a_alpha_eigenvector_set_T3_path, polsarpro_in_dir, h_a_alpha_out_dir, + str(NwinFilter), str(offsetRow), str(offsetCol), str(numRow), str(numCol), + str(alpha123), str(beta123), str(delta123), str(gamma123), str(alpbetdelgam)] + cmd = ' '.join(para_list) + + result_tuple = subprocess.getstatusoutput(cmd) + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1 or result_tuple[1].find('Could not open') != -1: + raise Exception(result_tuple[1]) + shutil.copyfile(config_path, os.path.join(h_a_alpha_out_dir, 'config.txt')) + + def __read_haalpha(self, h_a_alpha_dir, name_list): + """ + 读取H-A-Alpha分解二进制数据,输出为矩阵格式的字典 + :param h_a_alpha_dir : h_a_alpha二进制数据的目录,包含.bin,.config + :name_list : 需要组合的名称集合['entropy', 'anisotropy', 'alpha', 'beta', 'delta', 'gamma', 'lambda', + 'combination_1mH1mA', 'combination_1mHA', 'combination_H1mA', 'combination_HA'] + :return : 包含H-A-Alpha矩阵信息的字典 + """ + dir = os.path.join(h_a_alpha_dir, '*.bin') + bin_paths = list(glob.glob(dir)) + haalpha_dic ={} + for name in name_list: + path = os.path.join(h_a_alpha_dir, name + '.bin') + if path in bin_paths: + img = self.__read_bin_to_img(path) + haalpha_dic.update({name: img}) + return haalpha_dic + + def standardization(self, data, num=1): + # 矩阵标准化到[0,1] + data[np.isnan(data)] = np.min(data) # 异常值填充为0 + _range = np.max(data) - np.min(data) + return (data - np.min(data)) / _range * num + + def __write_haalpha_to_tif(self, out_tif_dir, h_a_alpha_dir, name_list): + """ + 读取H-A-Alpha分解二进制数据,输出为矩阵格式的字典 + :param out_tif_dir : tif的输出路径 + :param h_a_alpha_dir : h_a_alpha二进制数据的目录,包含.bin,.config + :name_list : 需要组合的名称集合['entropy', 'anisotropy', 'alpha', 'beta', 'delta', 'gamma', 'lambda', + 'combination_1mH1mA', 'combination_1mHA', 'combination_H1mA', 'combination_HA'] + + """ + dir = os.path.join(h_a_alpha_dir, '*.bin') + bin_paths = list(glob.glob(dir)) + + for name in name_list: + in_path = os.path.join(h_a_alpha_dir, name + '.bin') + out_path = os.path.join(out_tif_dir, name + '.tif') + if in_path in bin_paths: + img_array = self.__read_bin_to_img(in_path) + if self.__normalization is True: + img_array = self.standardization(img_array, num=1) + out_image = Image.fromarray(img_array) + out_image.save(out_path) + + @staticmethod + def __read_bin_to_img(bin_path): + """ + 读取bin格式二进制数据,输出为矩阵 + :param bin_path : bin文件的路径,包含.bin,.config + :return : 矩阵信息 + """ + (bin_dir, bin_name) = os.path.split(bin_path) + config_path = os.path.join(bin_dir, 'config.txt') + config = open(config_path, 'r').read().split('\n', -1) + rows = int(config[1]) + cols = int(config[4]) + + bin_file = open(bin_path, 'rb') # 打开二进制文件 + size = os.path.getsize(bin_path) # 获得文件大小 + if size < rows*cols*4: + raise Exception('bin size less than rows*cols*4! size:', size, 'byte, rows:', rows, 'cols:', cols) + + img = np.zeros([rows, cols], dtype=np.float32) + for row in range(rows): + data = bin_file.read(4 * cols) # 每次读取一行的二进制数据 + row_data = struct.unpack('f' * cols, data) # 转为一行float数据 + img[row, :] = row_data + bin_file.close() + return img + + +# if __name__ == '__main__': + # h_a_alpha_decomposition_T3_path = 'D:\\PolSARpro_v4.2.0\\Soft\data_process_sngl\\h_a_alpha_decomposition_T3.exe' + # h_a_alpha_eigenvalue_set_T3_path = 'D:\\PolSARpro_v4.2.0\\Soft\data_process_sngl\\h_a_alpha_eigenvalue_set_T3.exe' + # h_a_alpha_eigenvector_set_T3_path = 'D:\\PolSARpro_v4.2.0\\Soft\data_process_sngl\\h_a_alpha_eigenvector_set_T3.exe' + # polsarpro_in_dir = 'D:\\PolSARpro_v4.2.0\\in' + # haalpha_out_dir = 'D:\\PolSARpro_v4.2.0\\out' + # h_a_alpha_eigenvalue_set_T3_out = 'D:\\PolSARpro_v4.2.0\\out\\h_a_alpha_eigenvalue_set_T3' + # h_a_alpha_eigenvector_set_T3_out = 'D:\\PolSARpro_v4.2.0\\out\\h_a_alpha_eigenvector_set_T3' + # + # haa = PspHAAlphaDecomposition() + # h_a_alpha_features = haa.api_creat_h_a_alpha_features(haalpha_out_dir, h_a_alpha_decomposition_T3_path, h_a_alpha_eigenvalue_set_T3_path, h_a_alpha_eigenvector_set_T3_path, polsarpro_in_dir) + + + # haa = PspHAAlphaDecomposition(normalization=True) + # psp_path = r"I:\MicroWorkspace\product\C-SAR\SoilSalinity\GF3B_MYC_QPSI_003581_E120.6_N31.3_20220729_L1A_AHV_L10000073024_RPCpsp_t3" + # t3_path = r"I:\MicroWorkspace\product\C-SAR\SoilSalinity\t3" + # exe_dir = r"I:\microproduct\soilSalinity/" + # haa.api_creat_h_a_alpha_features(h_a_alpha_out_dir=t3_path, + # h_a_alpha_decomposition_T3_path= exe_dir + 'h_a_alpha_decomposition_T3.exe', + # h_a_alpha_eigenvalue_set_T3_path= exe_dir + 'h_a_alpha_eigenvalue_set_T3.exe', + # h_a_alpha_eigenvector_set_T3_path=exe_dir +'h_a_alpha_eigenvector_set_T3.exe', + # polsarpro_in_dir=psp_path) + + # print('done') diff --git a/tool/algorithm/polsarpro/pspLeeRefinedFilterC2.py b/tool/algorithm/polsarpro/pspLeeRefinedFilterC2.py new file mode 100644 index 0000000..079e090 --- /dev/null +++ b/tool/algorithm/polsarpro/pspLeeRefinedFilterC2.py @@ -0,0 +1,170 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:pspLeeRefinedFilterC2.py +@Function: +@Contact: +@Author:SHJ +@Date:2021/11/5 +@Version:1.0.0 +""" +import logging +import os +import shutil +import subprocess +import glob +import numpy as np +import struct +from PIL import Image + +logger = logging.getLogger("mylog") + + +class LeeRefinedFilterC2: + """ + 调用polsarpro4.2.0的lee_refined_filter_C2.exe做精致Lee滤波 + """ + + def __init__(self, exeFilterName='lee_refined_filter_C2.exe'): + self.__exeName = exeFilterName + pass + + def api_lee_refined_filter_C2( + self, + exeDir, + inC2Dir, + outDir, + off_row, + off_col, + Nrow, + Ncol, + Nwin=7, + Nlook=1): + """ + :param exeDir:exe所在目录 + :param inC2Dir:C2矩阵目录 + :param outDir:输出目录 + :param off_row:行偏移,行启始位置 + :param off_col:列偏移,列启始位置 + :param Nrow:终止行 + :param Ncol:终止列 + :param Nwin:滤波窗口大小 3 5 7 9 11 + :param Nlook:一般是1 + """ + if len(exeDir) == 0: + if not os.path.exists(self.__exeName): + raise Exception(self.__exeName + ' not exists.') + exePath = self.__exeName + else: + if not os.path.exists(exeDir + '\\' + self.__exeName): + raise Exception( + exeDir + + '\\' + + self.__exeName + + ' not exists.') + exePath = exeDir + '\\' + self.__exeName + + # if not self._checkT3Matrix(inT3Dir): + # raise Exception('T3 Matrix check failed.') + if not os.path.exists(outDir): + os.makedirs(outDir) + if (Nwin % 2) == 0 or Nwin < 0: # 如果为偶数或小于0,则使用默认值 + Nwin = 7 + + Off_lig = off_row + Off_col = off_col + Sub_Nlig = Nrow + Sub_Ncol = Ncol + + para_list = [ + exePath, + inC2Dir, + outDir, + Nlook, + Nwin, + Off_lig, + Off_col, + Sub_Nlig, + Sub_Ncol] + cmd = ' '.join(str(i) for i in para_list) + result_tuple = subprocess.getstatusoutput(cmd) + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1: + raise Exception(result_tuple[1]) + config_path = os.path.join(inC2Dir, 'config.txt') + if config_path != os.path.join(outDir, 'config.txt'): + shutil.copyfile(config_path, os.path.join(outDir, 'config.txt')) + @staticmethod + def _checkC2Matrix(C2Dir): + # 检测C2矩阵 + if not os.path.exists(C2Dir): + return False + file_name_in_out = ['C11.bin', 'C12_real.bin', 'C12_imag.bin', 'C22.bin','config.txt'] + for item in file_name_in_out: + if not os.path.exists(C2Dir + "\\" + item): + return False + return True + def write_bin_to_tif(self, out_tif_dir, bin_dir): + """ + 读取H-A-Alpha分解二进制数据,输出为矩阵格式的字典 + :param out_tif_dir : tif的输出路径 + :param bin_dir : 二进制数据的目录,包含.bin,.config + :return out_tif_path: 生成tif的路径字典 + """ + bin_paths = list(glob.glob(os.path.join(bin_dir, '*.bin'))) + out_tif_path = {} + for in_path in bin_paths: + name = os.path.split(in_path)[1].split('.')[0] + out_path = os.path.join(out_tif_dir, name + '.tif') + out_tif_path.update({name: out_path}) + if os.path.exists(os.path.split(out_path)[0]) is False: + os.makedirs(os.path.split(out_path)[0]) + img_array = self.__read_bin_to_img(in_path) + img_array[np.isnan(img_array)] = 0 # 异常值填充为0 + # img_array = self.standardization(img_array) # 数据标准化到[0,1] + out_image = Image.fromarray(img_array) + out_image.save(out_path) + return out_tif_path + @staticmethod + + def __read_bin_to_img(bin_path): + """ + 读取bin格式二进制数据,输出为矩阵 + :param bin_path : bin文件的路径,包含.bin,.config + :return : 矩阵信息 + """ + (bin_dir, bin_name) = os.path.split(bin_path) + config_path = os.path.join(bin_dir, 'config.txt') + config = open(config_path, 'r').read().split('\n', -1) + rows = int(config[1]) + cols = int(config[4]) + + bin_file = open(bin_path, 'rb') # 打开二进制文件 + size = os.path.getsize(bin_path) # 获得文件大小 + if size < rows * cols * 4: + raise Exception( + 'bin size less than rows*cols*4! size:', + size, + 'byte, rows:', + rows, + 'cols:', + cols) + + img = np.zeros([rows, cols], dtype=np.float32) + for row in range(rows): + data = bin_file.read(4 * cols) # 每次读取一行的二进制数据 + row_data = struct.unpack('f' * cols, data) # 转为一行float数据 + img[row, :] = row_data + bin_file.close() + return img + +if __name__ == '__main__': + tp =LeeRefinedFilterC2() + inC2Dir=r'E:\MicroWorkspace\LandCover\HHHV1' + outDir =r'E:\MicroWorkspace\LandCover\HHHV1_f' + off_row = 0 + off_col = 0 + Nrow = 666 + Ncol = 746 + tp.api_lee_refined_filter_C2( '',inC2Dir,outDir,off_row,off_col,Nrow,Ncol) + tp.write_bin_to_tif(outDir,outDir) + print('done') \ No newline at end of file diff --git a/tool/algorithm/polsarpro/pspLeeRefinedFilterT3.py b/tool/algorithm/polsarpro/pspLeeRefinedFilterT3.py new file mode 100644 index 0000000..e8c3911 --- /dev/null +++ b/tool/algorithm/polsarpro/pspLeeRefinedFilterT3.py @@ -0,0 +1,104 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:pspLeeRefinedFilterT3.py +@Function: Cloude-Pottier eigenvector/eigenvalue based decomposition of a 3x3 coherency matrix [T3] + (Averaging using a sliding window) +@Contact: +@Author:LVY +@Date:2021/10/12 9:06 +@Version:1.0.0 +""" +import logging +import os +import shutil +import subprocess + +logger = logging.getLogger("mylog") + + +class LeeRefinedFilterT3: + """ + 调用polsarpro4.2.0的lee_refined_filter_T3.exe做精致Lee滤波 + """ + + def __init__(self, exeFilterName='lee_refined_filter_T3.exe'): + self.__exeName = exeFilterName + pass + + def api_lee_refined_filter_T3( + self, + exeDir, + inT3Dir, + outDir, + rectX, + rectY, + rectWidth, + rectHeight, + Nwin=7, + Nlook=1): + """ + :param exeDir:exe所在目录 + :param inT3Dir:T3矩阵目录 + :param outDir:输出目录 + :param rectX:有效区域x + :param rectY:有效区域y + :param rectWidth:有效区域宽 + :param rectHeight:有效区域高 + :param Nwin:滤波窗口大小 3 5 7 9 11 + :param Nlook:一般是1 + """ + if len(exeDir) == 0: + if not os.path.exists(self.__exeName): + raise Exception(self.__exeName + ' not exists.') + exePath = self.__exeName + else: + if not os.path.exists(exeDir + '\\' + self.__exeName): + raise Exception( + exeDir + + '\\' + + self.__exeName + + ' not exists.') + exePath = exeDir + '\\' + self.__exeName + + if not self._checkT3Matrix(inT3Dir): + raise Exception('T3 Matrix check failed.') + if not os.path.exists(outDir): + os.makedirs(outDir) + if (Nwin % 2) == 0 or Nwin < 0: # 如果为偶数或小于0,则使用默认值 + Nwin = 7 + + Off_lig = rectX + Off_col = rectY + Sub_Nlig = rectWidth + Sub_Ncol = rectHeight + + para_list = [ + exePath, + inT3Dir, + outDir, + Nlook, + Nwin, + Off_lig, + Off_col, + Sub_Nlig, + Sub_Ncol] + cmd = ' '.join(str(i) for i in para_list) + config_path = os.path.join(inT3Dir, 'config.txt') + shutil.copyfile(config_path, os.path.join(outDir, 'config.txt')) + result_tuple = subprocess.getstatusoutput(cmd) + + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1: + raise Exception(result_tuple[1]) + @staticmethod + def _checkT3Matrix(T3Dir): + # 检测T3矩阵 + if not os.path.exists(T3Dir): + return False + file_name_in_out = ['T11.bin', 'T12_real.bin', 'T12_imag.bin', + 'T13_real.bin', 'T13_imag.bin', 'T22.bin', + 'T23_real.bin', 'T23_imag.bin', 'T33.bin'] + for item in file_name_in_out: + if not os.path.exists(T3Dir + "\\" + item): + return False + return True diff --git a/tool/algorithm/polsarpro/pspSurfaceInversion.py b/tool/algorithm/polsarpro/pspSurfaceInversion.py new file mode 100644 index 0000000..b8463a2 --- /dev/null +++ b/tool/algorithm/polsarpro/pspSurfaceInversion.py @@ -0,0 +1,393 @@ +import logging +import os +import shutil +import subprocess + +logger = logging.getLogger("mylog") + + +class SurfaceInversionDubois: + """ + 调用polsarpro4.2.0的surface_inversion_dubois.exe做土壤水分反演 + """ + + def __init__(self, exeFilterName='surface_inversion_dubois.exe'): + self.__exeName = exeFilterName + pass + + def api_surface_inversion_dubois( + self, + exeDir, + inT3Dir, + outDir, + incidence, + rectX, + rectY, + row, + col, + frequency, # GHZ + angleFlag, # 0:deg, 1:rad + ): + """ + :param exeDir:exe所在目录 + :param inT3Dir:T3矩阵目录 + :param outDir:输出目录 + :param rectX:有效区域x + :param rectY:有效区域y + :param rectWidth:有效区域宽 + :param rectHeight:有效区域高 + :param Nwin:滤波窗口大小 3 5 7 9 11 + :param Nlook:一般是1 + """ + if len(exeDir) == 0: + if not os.path.exists(self.__exeName): + raise Exception(self.__exeName + ' not exists.') + exePath = self.__exeName + else: + if not os.path.exists(exeDir + '\\' + self.__exeName): + raise Exception( + exeDir + + '\\' + + self.__exeName + + ' not exists.') + exePath = exeDir + '\\' + self.__exeName + + if not self._checkT3Matrix(inT3Dir): + raise Exception('T3 Matrix check failed.') + if not os.path.exists(outDir): + os.makedirs(outDir) + + Off_lig = rectX + Off_col = rectY + Sub_Nlig = row + Sub_Ncol = col + dataFormat = 'T3' + calibration_flag = 1 + calibration_coefficient = 0.0 + threshold_HHHH_VVVV = 0.0 + threshold_HVHV_VVVV = 0.0 + + para_list = [ + exePath, + inT3Dir, + outDir, + dataFormat, + incidence, + Off_lig, + Off_col, + Sub_Nlig, + Sub_Ncol, + frequency, # GHZ + angleFlag, + ] + + cmd = "surface_inversion_dubois.exe -id {} -od {} -iodf {} -ang {} -ofr {} -ofc {} -fnr {} -fnc {} -fr {} -un {} -caf {} -cac {} -th1 {} -th2 {}".format( + inT3Dir, outDir, dataFormat, incidence, Off_lig, Off_col, Sub_Nlig, Sub_Ncol, frequency, angleFlag, + calibration_flag, calibration_coefficient, threshold_HHHH_VVVV, threshold_HVHV_VVVV) + + logger.info('surface_inversion_dubois:{}'.format(cmd)) + result = os.system(cmd) + logger.info('cmd_result:{}'.format(result)) + logger.info('surface_inversion_dubois finish!') + + config_path = os.path.join(inT3Dir, 'config.txt') + shutil.copyfile(config_path, os.path.join(outDir, 'config.txt')) + + # cmd = ' '.join(str(i) for i in para_list) + # config_path = os.path.join(inT3Dir, 'config.txt') + # shutil.copyfile(config_path, os.path.join(outDir, 'config.txt')) + # result_tuple = subprocess.getstatusoutput(cmd) + # + # if result_tuple[0] != 1 or result_tuple[1].find('error') != -1: + # raise Exception(result_tuple[1]) + @staticmethod + def _checkT3Matrix(T3Dir): + # 检测T3矩阵 + if not os.path.exists(T3Dir): + return False + file_name_in_out = ['T11.bin', 'T12_real.bin', 'T12_imag.bin', + 'T13_real.bin', 'T13_imag.bin', 'T22.bin', + 'T23_real.bin', 'T23_imag.bin', 'T33.bin'] + for item in file_name_in_out: + if not os.path.exists(T3Dir + "\\" + item): + return False + return True + + +class SurfaceInversionHisto: + """ + 调用polsarpro4.2.0的surface_inversion_histo.exe做土壤水分反演 + """ + + def __init__(self, exeFilterName='surface_inversion_histo.exe'): + self.__exeName = exeFilterName + pass + + def api_surface_inversion_histo( + self, + exeDir, + inT3Dir, + outDir, + rectX, + rectY, + rectWidth, + rectHeight, + Nwin=7, + Nlook=1): + """ + :param exeDir:exe所在目录 + :param inT3Dir:T3矩阵目录 + :param outDir:输出目录 + :param rectX:有效区域x + :param rectY:有效区域y + :param rectWidth:有效区域宽 + :param rectHeight:有效区域高 + :param Nwin:滤波窗口大小 3 5 7 9 11 + :param Nlook:一般是1 + """ + if len(exeDir) == 0: + if not os.path.exists(self.__exeName): + raise Exception(self.__exeName + ' not exists.') + exePath = self.__exeName + else: + if not os.path.exists(exeDir + '\\' + self.__exeName): + raise Exception( + exeDir + + '\\' + + self.__exeName + + ' not exists.') + exePath = exeDir + '\\' + self.__exeName + + if not self._checkT3Matrix(inT3Dir): + raise Exception('T3 Matrix check failed.') + if not os.path.exists(outDir): + os.makedirs(outDir) + if (Nwin % 2) == 0 or Nwin < 0: # 如果为偶数或小于0,则使用默认值 + Nwin = 7 + + Off_lig = rectX + Off_col = rectY + Sub_Nlig = rectWidth + Sub_Ncol = rectHeight + + para_list = [ + exePath, + inT3Dir, + outDir, + Nlook, + Nwin, + Off_lig, + Off_col, + Sub_Nlig, + Sub_Ncol] + cmd = ' '.join(str(i) for i in para_list) + config_path = os.path.join(inT3Dir, 'config.txt') + shutil.copyfile(config_path, os.path.join(outDir, 'config.txt')) + result_tuple = subprocess.getstatusoutput(cmd) + + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1: + raise Exception(result_tuple[1]) + @staticmethod + def _checkT3Matrix(T3Dir): + # 检测T3矩阵 + if not os.path.exists(T3Dir): + return False + file_name_in_out = ['T11.bin', 'T12_real.bin', 'T12_imag.bin', + 'T13_real.bin', 'T13_imag.bin', 'T22.bin', + 'T23_real.bin', 'T23_imag.bin', 'T33.bin'] + for item in file_name_in_out: + if not os.path.exists(T3Dir + "\\" + item): + return False + return True + + +class SurfaceInversionOh: + """ + 调用polsarpro4.2.0的surface_inversion_oh.exe做土壤水分反演 + """ + + def __init__(self, exeFilterName='surface_inversion_oh.exe'): + self.__exeName = exeFilterName + pass + + def api_surface_inversion_oh( + self, + exeDir, + inT3Dir, + outDir, + rectX, + rectY, + rectWidth, + rectHeight, + Nwin=7, + Nlook=1): + """ + :param exeDir:exe所在目录 + :param inT3Dir:T3矩阵目录 + :param outDir:输出目录 + :param rectX:有效区域x + :param rectY:有效区域y + :param rectWidth:有效区域宽 + :param rectHeight:有效区域高 + :param Nwin:滤波窗口大小 3 5 7 9 11 + :param Nlook:一般是1 + """ + if len(exeDir) == 0: + if not os.path.exists(self.__exeName): + raise Exception(self.__exeName + ' not exists.') + exePath = self.__exeName + else: + if not os.path.exists(exeDir + '\\' + self.__exeName): + raise Exception( + exeDir + + '\\' + + self.__exeName + + ' not exists.') + exePath = exeDir + '\\' + self.__exeName + + if not self._checkT3Matrix(inT3Dir): + raise Exception('T3 Matrix check failed.') + if not os.path.exists(outDir): + os.makedirs(outDir) + if (Nwin % 2) == 0 or Nwin < 0: # 如果为偶数或小于0,则使用默认值 + Nwin = 7 + + Off_lig = rectX + Off_col = rectY + Sub_Nlig = rectWidth + Sub_Ncol = rectHeight + + para_list = [ + exePath, + inT3Dir, + outDir, + Nlook, + Nwin, + Off_lig, + Off_col, + Sub_Nlig, + Sub_Ncol] + cmd = ' '.join(str(i) for i in para_list) + config_path = os.path.join(inT3Dir, 'config.txt') + shutil.copyfile(config_path, os.path.join(outDir, 'config.txt')) + result_tuple = subprocess.getstatusoutput(cmd) + + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1: + raise Exception(result_tuple[1]) + @staticmethod + def _checkT3Matrix(T3Dir): + # 检测T3矩阵 + if not os.path.exists(T3Dir): + return False + file_name_in_out = ['T11.bin', 'T12_real.bin', 'T12_imag.bin', + 'T13_real.bin', 'T13_imag.bin', 'T22.bin', + 'T23_real.bin', 'T23_imag.bin', 'T33.bin'] + for item in file_name_in_out: + if not os.path.exists(T3Dir + "\\" + item): + return False + return True + + +class SurfaceInversionOh2004: + """ + 调用polsarpro4.2.0的surface_inversion_oh2004.exe做土壤水分反演 + """ + + def __init__(self, exeFilterName='surface_inversion_oh2004.exe'): + self.__exeName = exeFilterName + pass + + def api_surface_inversion_oh2004( + self, + exeDir, + inT3Dir, + outDir, + incidence, + rectY, + rectX, + row, + col, + frequency, # GHZ + angleFlag): + """ + :param exeDir:exe所在目录 + :param inT3Dir:T3矩阵目录 + :param outDir:输出目录 + :param rectX:有效区域x + :param rectY:有效区域y + :param rectWidth:有效区域宽 + :param rectHeight:有效区域高 + :param Nwin:滤波窗口大小 3 5 7 9 11 + :param Nlook:一般是1 + """ + if len(exeDir) == 0: + if not os.path.exists(self.__exeName): + raise Exception(self.__exeName + ' not exists.') + exePath = self.__exeName + else: + if not os.path.exists(exeDir + '\\' + self.__exeName): + raise Exception( + exeDir + + '\\' + + self.__exeName + + ' not exists.') + exePath = exeDir + '\\' + self.__exeName + + if not self._checkT3Matrix(inT3Dir): + raise Exception('T3 Matrix check failed.') + if not os.path.exists(outDir): + os.makedirs(outDir) + + Off_lig = rectX + Off_col = rectY + Sub_Nlig = row + Sub_Ncol = col + dataFormat = 'T3' + threshold_mv = 1.0 + threshold_s = 7.0 + + para_list = [ + exePath, + inT3Dir, + outDir, + dataFormat, + incidence, + Off_lig, + Off_col, + Sub_Nlig, + Sub_Ncol, + frequency, # GHZ + angleFlag, + threshold_mv, + threshold_s] + cmd = "surface_inversion_oh2004.exe -id {} -od {} -iodf {} -ang {} -ofr {} -ofc {} -fnr {} -fnc {} -fr {} -un {} -th1 {} -th2 {}".format( + inT3Dir, outDir, dataFormat, incidence, Off_lig, Off_col, Sub_Nlig, Sub_Ncol, frequency, angleFlag, threshold_mv, threshold_s) + + logger.info('surface_inversion_oh2004:{}'.format(cmd)) + result = os.system(cmd) + logger.info('cmd_result:{}'.format(result)) + logger.info('surface_inversion_oh2004 finish!') + + + config_path = os.path.join(inT3Dir, 'config.txt') + shutil.copyfile(config_path, os.path.join(outDir, 'config.txt')) + # cmd = ' '.join(str(i) for i in para_list) + # result_tuple = subprocess.getstatusoutput(cmd) + # # + # if result_tuple[0] != 1 or result_tuple[1].find('error') != -1: + # raise Exception(result_tuple[1]) + @staticmethod + def _checkT3Matrix(T3Dir): + # 检测T3矩阵 + if not os.path.exists(T3Dir): + return False + file_name_in_out = ['T11.bin', 'T12_real.bin', 'T12_imag.bin', + 'T13_real.bin', 'T13_imag.bin', 'T22.bin', + 'T23_real.bin', 'T23_imag.bin', 'T33.bin'] + # file_name_in_out = ['T11.img', 'T12_real.img', 'T12_imag.img', + # 'T13_real.img', 'T13_imag.img', 'T22.img', + # 'T23_real.img', 'T23_imag.img', 'T33.img'] + for item in file_name_in_out: + if not os.path.exists(T3Dir + "\\" + item): + return False + return True \ No newline at end of file diff --git a/tool/algorithm/polsarpro/pspTouziDecomposition.py b/tool/algorithm/polsarpro/pspTouziDecomposition.py new file mode 100644 index 0000000..35ed6ca --- /dev/null +++ b/tool/algorithm/polsarpro/pspTouziDecomposition.py @@ -0,0 +1,146 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:pspTouziDecomposition.py +@Function: +@Contact: +@Author:LVY +@Date:2021/10/14 10:11 +@Version:1.0.0 +""" +import os +import logging +from tool.algorithm.polsarpro.polarizationDecomposition import ModTouzi as TouziDecomp +from osgeo import gdal +import multiprocessing +from tool.algorithm.block.blockprocess import BlockProcess +import shutil +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.file.fileHandle import fileHandle +logger = logging.getLogger("mylog") +file =fileHandle(False) + +class PspTouziDecomposition: + """ + Touzi分解 + """ + def __init__(self, inDic, outDir): + """ + :param inDic:T3矩阵目录 + :param outDir:输出目录 + """ + self.__inDic = inDic + self.__outDir = outDir + self.__DecompostFlag = False + if self._checkTifFileDic(self.__inDic) is False: + return False + if not os.path.exists(self.__outDir): + os.makedirs(self.__outDir) + + def api_Touzi_decomposition_TIF(self, Nwin = 5): + """ + :param Nwin:滤波窗口大小 3 5 7 9 11 + """ + bandHH = gdal.Open(self.__inDic["HH"]) + bandHV = gdal.Open(self.__inDic["HV"]) + bandVH = gdal.Open(self.__inDic["VH"]) + bandVV = gdal.Open(self.__inDic["VV"]) + bandAll = [bandHH, bandHV, bandVH, bandVV] + decomposition = TouziDecomp(bandAll, Nwin) + decomposition.get_result(self.__outDir) + return True + + def Touzi_decomposition_TIF(self,hh_path,hv_path,vh_path,vv_path,out_dir,suffix,Nwin = 5): + """ + :param Nwin:滤波窗口大小 3 5 7 9 11 + """ + bandHH = gdal.Open(hh_path) + bandHV = gdal.Open(hv_path) + bandVH = gdal.Open(vh_path) + bandVV = gdal.Open(vv_path) + bandAll = [bandHH, bandHV, bandVH, bandVV] + decomposition = TouziDecomp(bandAll, Nwin) + decomposition.get_result_block(out_dir, suffix) + return True + + @staticmethod + def _checkTifFileDic(inDic): + file_name_in_out = ['HH', 'VV', 'HV', 'VH'] + for item in file_name_in_out: + if item in inDic: + print(inDic[item]) + if not os.path.exists(os.path.join(inDic[item])): + return False + else: + return False + return True + + def Touzi_decomposition_multiprocessing(self): + + #创建工作文件夹 + src_path = os.path.join(self.__outDir, "src_img") + block_path = os.path.join(self.__outDir, "block") + decomposition_path = os.path.join(self.__outDir, "feature") + file.creat_dirs([src_path,block_path,decomposition_path]) + + shutil.copyfile(self.__inDic["HH"], os.path.join(src_path, "HH.tif")) + shutil.copyfile(self.__inDic["HV"], os.path.join(src_path, "HV.tif")) + shutil.copyfile(self.__inDic["VH"], os.path.join(src_path, "VH.tif")) + shutil.copyfile(self.__inDic["VV"], os.path.join(src_path, "VV.tif")) + self.__cols = ImageHandler.get_img_width(self.__inDic["HH"]) + self.__rows = ImageHandler.get_img_height(self.__inDic["HH"]) + # 分块 + bp = BlockProcess() + block_size = bp.get_block_size(self.__rows, self.__cols) + bp.cut(src_path, block_path, ['tif', 'tiff'], 'tif', block_size) + logger.info('blocking tifs success!') + + img_dir, img_name = bp.get_file_names(block_path, ['tif']) + dir_dict = bp.get_same_img(img_dir, img_name) + + hh_list, vv_list, hv_list, vh_list = None, None, None, None + for key in dir_dict.keys(): + tmp = key.split('_', 2)[0] + if tmp == 'HH': + hh_list = dir_dict[key] + elif tmp == 'VV': + vv_list = dir_dict[key] + elif tmp == 'HV': + hv_list = dir_dict[key] + elif tmp == 'VH': + vh_list = dir_dict[key] + + processes_num = min([len(hh_list), multiprocessing.cpu_count() - 1]) + + # 开启多进程处理 + pool = multiprocessing.Pool(processes=processes_num) + + for i in range(len(hh_list)): + suffix = bp.get_suffix(os.path.basename(hh_list[i])) + # self.Touzi_decomposition_TIF(hh_list[i], hv_list[i], vh_list[i], vv_list[i], block_path, suffix,5) + pool.apply_async(self.Touzi_decomposition_TIF, (hh_list[i], hv_list[i], vh_list[i], vv_list[i], decomposition_path, suffix,5)) + logger.info('total:%s, block:%s touzi!', len(hh_list), i) + + pool.close() + pool.join() + # 合并处理后的影像 + bp.combine(decomposition_path, self.__cols, self.__rows, self.__outDir, file_type=['tif'], datetype='float16') + + file.del_folder(src_path) + file.del_folder(block_path) + file.del_folder(decomposition_path) + pass + + +# if __name__ == '__main__': +# dir = {} +# dir.update({"HH":"I:\preprocessed\HH_preprocessed.tif"}) +# dir.update({"HV":"I:\preprocessed\HV_preprocessed.tif"}) +# dir.update({"VH":"I:\preprocessed\VH_preprocessed.tif"}) +# dir.update({"VV":"I:\preprocessed\VV_preprocessed.tif"}) +# +# +# p = PspTouziDecomposition(dir, "I:/preprocessed/") +# p.Touzi_decomposition_multiprocessing() +# pass + diff --git a/tool/algorithm/polsarpro/pspYamaguchiDecomposition.py b/tool/algorithm/polsarpro/pspYamaguchiDecomposition.py new file mode 100644 index 0000000..dd4f9e8 --- /dev/null +++ b/tool/algorithm/polsarpro/pspYamaguchiDecomposition.py @@ -0,0 +1,104 @@ +# -*- coding: UTF-8 -*- +""" +@Project:__init__.py +@File:pspFreemanDecomposition.py +@Function: +@Contact: +@Author:LVY +@Date:2021/10/12 18:45 +@Version:1.0.0 +""" + +import os +import shutil +import subprocess +import logging +logger = logging.getLogger("mylog") + + +class PspYamaguchiDecomposition: + """ + Yamaguchi yamaguchi_3components_decomposition_T3.exe yamaguchi_4components_decomposition_T3.exe + """ + + def __init__( + self, + exeDir, + inT3Dir, + outDir, + exeDecomposeName='yamaguchi_4components_decomposition_T3.exe'): + """ + :param exeDir:exe所在目录 + :param inT3Dir:T3矩阵目录 + :param outDir:输出目录 + """ + self.__exeName = exeDecomposeName + self.__exeDir = exeDir + self.__inT3Dir = inT3Dir + self.__outDir = outDir + self.__DecompostFlag = False + pass + + def api_yamaguchi_4components_decomposition_T3( + self, rectX, rectY, rectWidth, rectHeight, Nwin=1): + """ + :param rectX:有效区域x + :param rectY:有效区域y + :param rectWidth:有效区域宽 + :param rectHeight:有效区域高 + :param Nwin :Size of the (Nwin, Nwin) sliding window used to compute local estimates. (int) + """ + if self.__DecompostFlag: + return True + if len(self.__exeDir) == 0: + if not os.path.exists(self.__exeName): + logger.error(self.__exeName + ' not exists.') + return False + exePath = self.__exeName + else: + if not os.path.exists(self.__exeDir + '\\' + self.__exeName): + logger.error(self.__exeName + ' not exists.') + return False + exePath = self.__exeDir + '\\' + self.__exeName + + if not self._checkT3Matrix(self.__inT3Dir): + logger.error('T3 Matrix check failed.') + return False + if not os.path.exists(self.__outDir): + os.makedirs(self.__outDir) + + Off_lig = rectX + Off_col = rectY + Sub_Nlig = rectWidth + Sub_Ncol = rectHeight + + para_list = [ + exePath, + self.__inT3Dir, + self.__outDir, + Nwin, + Off_lig, + Off_col, + Sub_Nlig, + Sub_Ncol] + cmd = " ".join(str(i) for i in para_list) + config_path = os.path.join(self.__inT3Dir, 'config.txt') + shutil.copyfile(config_path, os.path.join(self.__outDir, 'config.txt')) + result_tuple = subprocess.getstatusoutput(cmd) + + if result_tuple[0] != 1 or result_tuple[1].find('error') != -1: + raise Exception(result_tuple[1]) + self.__DecompostFlag = True + return True + @staticmethod + def _checkT3Matrix(T3Dir): + # 检测T3矩阵 + if not os.path.exists(T3Dir): + return False + file_name_in_out = ['T11.bin', 'T12_real.bin', 'T12_imag.bin', + 'T13_real.bin', 'T13_imag.bin', 'T22.bin', + 'T23_real.bin', 'T23_imag.bin', 'T33.bin'] + for item in file_name_in_out: + if not os.path.exists(T3Dir + "\\" + item): + return False + return True diff --git a/tool/algorithm/transforml1a/SAR_GEO.cp38-win_amd64.pyd b/tool/algorithm/transforml1a/SAR_GEO.cp38-win_amd64.pyd new file mode 100644 index 0000000..642f519 Binary files /dev/null and b/tool/algorithm/transforml1a/SAR_GEO.cp38-win_amd64.pyd differ diff --git a/tool/algorithm/transforml1a/SAR_geo/SAR_GEO.pyx b/tool/algorithm/transforml1a/SAR_geo/SAR_GEO.pyx new file mode 100644 index 0000000..c443ac3 --- /dev/null +++ b/tool/algorithm/transforml1a/SAR_geo/SAR_GEO.pyx @@ -0,0 +1,194 @@ +import os +cimport cython # 必须导入 +import numpy as np##必须为c类型和python类型的数据都申明一个np +cimport numpy as np # 必须为c类型和python类型的数据都申明一个np +from libc.math cimport pi,ceil,floor +from scipy.interpolate import griddata + + + + + +##################### +# 结构定义区 +#################### +cdef struct Point: # 结构 + double x + double y + + + + + + + + +###################### +# 射线法 +###################### +cdef int rayCasting(Point p,np.ndarray[double,ndim=2] poly): + cdef double px = p.x, + cdef double py = p.y, + cdef int flag = 0 + + cdef int i=0 + cdef int l=poly.shape[0] + cdef int j=l-1 + + cdef double sx + cdef double sy + cdef double tx + cdef double ty + cdef x=0 + while(i= py) or (sy >= py and ty < py)) : + #// 线段上与射线 Y 坐标相同的点的 X 坐标 + x = sx + (py - sy) * (tx - sx) / (ty - sy) + #// 点在多边形的边上 + if(x == px): + return 1 + + #// 射线穿过多边形的边界 + if(x > px): + flag = 0 if flag==1 else 1 + # 循环体 + j=i + i=i+1 + + #// 射线穿过多边形边界的次数为奇数时点在多边形内 + return 1 if flag==1 else 0 + +cpdef np.ndarray[double,ndim=2] insert_data(np.ndarray[double,ndim=2] ori2geo_img,np.ndarray[int , ndim=1] row_ids,np.ndarray[int,ndim=1] col_ids,np.ndarray[double,ndim=1] data): + cdef int i=0 + cdef int count=row_ids.shape[0] + while i=0 and temp_col>=0 and temp_row=0 and temp_col>=0 and temp_row=0 and temp_col>=0 and temp_row=0 and temp_col>=0 and temp_rowp1.x or max_lonmax_lat: + continue + c=c+1 + + + + + + + + + + + +# 测试程序 +cpdef np.ndarray[double,ndim=2] Add(np.ndarray[double,ndim=2] a,double x): + cdef double d=0; # 声明 注意 cython没有 bool类型 + print("调用成功") + print(a) + print(x) + return a+x + diff --git a/tool/algorithm/transforml1a/build/SAR_geo/SAR_GEO.c b/tool/algorithm/transforml1a/build/SAR_geo/SAR_GEO.c new file mode 100644 index 0000000..626b2ed --- /dev/null +++ b/tool/algorithm/transforml1a/build/SAR_geo/SAR_GEO.c @@ -0,0 +1,9744 @@ +/* Generated by Cython 0.29.24 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "name": "SAR_GEO", + "sources": [ + "./SAR_geo/SAR_GEO.pyx" + ] + }, + "module_name": "SAR_GEO" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_24" +#define CYTHON_HEX_VERSION 0x001D18F0 +#define CYTHON_FUTURE_DIVISION 0 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #if defined(PyUnicode_IS_READY) + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #else + #define __Pyx_PyUnicode_READY(op) (0) + #endif + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__SAR_GEO +#define __PYX_HAVE_API__SAR_GEO +/* Early includes */ +#include +#include +#include "numpy/arrayobject.h" +#include "numpy/ndarrayobject.h" +#include "numpy/ndarraytypes.h" +#include "numpy/arrayscalars.h" +#include "numpy/ufuncobject.h" + + /* NumPy API declarations from "numpy/__init__.pxd" */ + +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + +/* Header.proto */ +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include + #else + #include + #endif +#endif +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + + +static const char *__pyx_f[] = { + "SAR_geo\\SAR_GEO.pyx", + "__init__.pxd", + "type.pxd", +}; +/* BufferFormatStructs.proto */ +#define IS_UNSIGNED(type) (((type) -1) > 0) +struct __Pyx_StructField_; +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) +typedef struct { + const char* name; + struct __Pyx_StructField_* fields; + size_t size; + size_t arraysize[8]; + int ndim; + char typegroup; + char is_unsigned; + int flags; +} __Pyx_TypeInfo; +typedef struct __Pyx_StructField_ { + __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; +typedef struct { + __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":690 + * # in Cython to enable them only on the right systems. + * + * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + */ +typedef npy_int8 __pyx_t_5numpy_int8_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":691 + * + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t + */ +typedef npy_int16 __pyx_t_5numpy_int16_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":692 + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< + * ctypedef npy_int64 int64_t + * #ctypedef npy_int96 int96_t + */ +typedef npy_int32 __pyx_t_5numpy_int32_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":693 + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< + * #ctypedef npy_int96 int96_t + * #ctypedef npy_int128 int128_t + */ +typedef npy_int64 __pyx_t_5numpy_int64_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":697 + * #ctypedef npy_int128 int128_t + * + * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + */ +typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":698 + * + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t + */ +typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":699 + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< + * ctypedef npy_uint64 uint64_t + * #ctypedef npy_uint96 uint96_t + */ +typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":700 + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< + * #ctypedef npy_uint96 uint96_t + * #ctypedef npy_uint128 uint128_t + */ +typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":704 + * #ctypedef npy_uint128 uint128_t + * + * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< + * ctypedef npy_float64 float64_t + * #ctypedef npy_float80 float80_t + */ +typedef npy_float32 __pyx_t_5numpy_float32_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":705 + * + * ctypedef npy_float32 float32_t + * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< + * #ctypedef npy_float80 float80_t + * #ctypedef npy_float128 float128_t + */ +typedef npy_float64 __pyx_t_5numpy_float64_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":714 + * # The int types are mapped a bit surprising -- + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t + */ +typedef npy_long __pyx_t_5numpy_int_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":715 + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< + * ctypedef npy_longlong longlong_t + * + */ +typedef npy_longlong __pyx_t_5numpy_long_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":716 + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_ulong uint_t + */ +typedef npy_longlong __pyx_t_5numpy_longlong_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":718 + * ctypedef npy_longlong longlong_t + * + * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t + */ +typedef npy_ulong __pyx_t_5numpy_uint_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":719 + * + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< + * ctypedef npy_ulonglong ulonglong_t + * + */ +typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":720 + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< + * + * ctypedef npy_intp intp_t + */ +typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":722 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< + * ctypedef npy_uintp uintp_t + * + */ +typedef npy_intp __pyx_t_5numpy_intp_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":723 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< + * + * ctypedef npy_double float_t + */ +typedef npy_uintp __pyx_t_5numpy_uintp_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":725 + * ctypedef npy_uintp uintp_t + * + * ctypedef npy_double float_t # <<<<<<<<<<<<<< + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t + */ +typedef npy_double __pyx_t_5numpy_float_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":726 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< + * ctypedef npy_longdouble longdouble_t + * + */ +typedef npy_double __pyx_t_5numpy_double_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":727 + * ctypedef npy_double float_t + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cfloat cfloat_t + */ +typedef npy_longdouble __pyx_t_5numpy_longdouble_t; +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< float > __pyx_t_float_complex; + #else + typedef float _Complex __pyx_t_float_complex; + #endif +#else + typedef struct { float real, imag; } __pyx_t_float_complex; +#endif +static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); + +/* Declarations.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< double > __pyx_t_double_complex; + #else + typedef double _Complex __pyx_t_double_complex; + #endif +#else + typedef struct { double real, imag; } __pyx_t_double_complex; +#endif +static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); + + +/*--- Type declarations ---*/ + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":729 + * ctypedef npy_longdouble longdouble_t + * + * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t + */ +typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":730 + * + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< + * ctypedef npy_clongdouble clongdouble_t + * + */ +typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":731 + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< + * + * ctypedef npy_cdouble complex_t + */ +typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":733 + * ctypedef npy_clongdouble clongdouble_t + * + * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew1(a): + */ +typedef npy_cdouble __pyx_t_5numpy_complex_t; +struct __pyx_t_7SAR_GEO_Point; + +/* "SAR_GEO.pyx":15 + * # + * #################### + * cdef struct Point: # # <<<<<<<<<<<<<< + * double x + * double y + */ +struct __pyx_t_7SAR_GEO_Point { + double x; + double y; +}; + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* IsLittleEndian.proto */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); + +/* BufferFormatCheck.proto */ +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type); + +/* BufferGetAndValidate.proto */ +#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\ + ((obj == Py_None || obj == NULL) ?\ + (__Pyx_ZeroBuffer(buf), 0) :\ + __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)) +static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj, + __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); +static void __Pyx_ZeroBuffer(Py_buffer* buf); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); +static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 }; +static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + +/* BufferIndexError.proto */ +static void __Pyx_RaiseBufferIndexError(int axis); + +#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* WriteUnraisableException.proto */ +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback, int nogil); + +#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +#define __Pyx_BufPtrStrided3d(type, buf, i0, s0, i1, s1, i2, s2) (type)((char*)buf + i0 * s0 + i1 * s1 + i2 * s2) +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* BufferStructDeclare.proto */ +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[8]; +} __Pyx_LocalBuf_ND; + +#if PY_MAJOR_VERSION < 3 + static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); + static void __Pyx_ReleaseBuffer(Py_buffer *view); +#else + #define __Pyx_GetBuffer PyObject_GetBuffer + #define __Pyx_ReleaseBuffer PyBuffer_Release +#endif + + +/* GCCDiagnostics.proto */ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* Print.proto */ +static int __Pyx_Print(PyObject*, PyObject *, int); +#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 +static PyObject* __pyx_print = 0; +static PyObject* __pyx_print_kwargs = 0; +#endif + +/* RealImag.proto */ +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif +#if defined(__cplusplus) && CYTHON_CCOMPLEX\ + && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_float(a, b) ((a)==(b)) + #define __Pyx_c_sum_float(a, b) ((a)+(b)) + #define __Pyx_c_diff_float(a, b) ((a)-(b)) + #define __Pyx_c_prod_float(a, b) ((a)*(b)) + #define __Pyx_c_quot_float(a, b) ((a)/(b)) + #define __Pyx_c_neg_float(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_float(z) ((z)==(float)0) + #define __Pyx_c_conj_float(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_float(z) (::std::abs(z)) + #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_float(z) ((z)==0) + #define __Pyx_c_conj_float(z) (conjf(z)) + #if 1 + #define __Pyx_c_abs_float(z) (cabsf(z)) + #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); + #endif +#endif + +/* Arithmetic.proto */ +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq_double(a, b) ((a)==(b)) + #define __Pyx_c_sum_double(a, b) ((a)+(b)) + #define __Pyx_c_diff_double(a, b) ((a)-(b)) + #define __Pyx_c_prod_double(a, b) ((a)*(b)) + #define __Pyx_c_quot_double(a, b) ((a)/(b)) + #define __Pyx_c_neg_double(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero_double(z) ((z)==(double)0) + #define __Pyx_c_conj_double(z) (::std::conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (::std::abs(z)) + #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero_double(z) ((z)==0) + #define __Pyx_c_conj_double(z) (conj(z)) + #if 1 + #define __Pyx_c_abs_double(z) (cabs(z)) + #define __Pyx_c_pow_double(a, b) (cpow(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); + #endif +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* PrintOne.proto */ +static int __Pyx_PrintOne(PyObject* stream, PyObject *o); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + + +/* Module declarations from 'cython' */ + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libc.stdio' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.type' */ +static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; + +/* Module declarations from 'cpython' */ + +/* Module declarations from 'cpython.object' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'cpython.mem' */ + +/* Module declarations from 'numpy' */ + +/* Module declarations from 'numpy' */ +static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; +static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; +static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; +static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; +static PyTypeObject *__pyx_ptype_5numpy_generic = 0; +static PyTypeObject *__pyx_ptype_5numpy_number = 0; +static PyTypeObject *__pyx_ptype_5numpy_integer = 0; +static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; +static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; +static PyTypeObject *__pyx_ptype_5numpy_floating = 0; +static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; +static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; +static PyTypeObject *__pyx_ptype_5numpy_character = 0; +static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; + +/* Module declarations from 'libc.math' */ + +/* Module declarations from 'SAR_GEO' */ +static int __pyx_f_7SAR_GEO_rayCasting(struct __pyx_t_7SAR_GEO_Point, PyArrayObject *); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_insert_data(PyArrayObject *, PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_cut_L1A_img(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_gereratorMask(PyArrayObject *, PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_get_r_c(PyArrayObject *, PyArrayObject *, int __pyx_skip_dispatch); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_Add(PyArrayObject *, double, int __pyx_skip_dispatch); /*proto*/ +static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 }; +static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 }; +#define __Pyx_MODULE_NAME "SAR_GEO" +extern int __pyx_module_is_main_SAR_GEO; +int __pyx_module_is_main_SAR_GEO = 0; + +/* Implementation of 'SAR_GEO' */ +static PyObject *__pyx_builtin_ImportError; +static const char __pyx_k_a[] = "a"; +static const char __pyx_k_x[] = "x"; +static const char __pyx_k__4[] = "\350\260\203\347\224\250\346\210\220\345\212\237"; +static const char __pyx_k_np[] = "np"; +static const char __pyx_k_os[] = "os"; +static const char __pyx_k_end[] = "end"; +static const char __pyx_k_max[] = "max"; +static const char __pyx_k_min[] = "min"; +static const char __pyx_k_nan[] = "nan"; +static const char __pyx_k_data[] = "data"; +static const char __pyx_k_file[] = "file"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_mask[] = "mask"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_ones[] = "ones"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_clist[] = "clist"; +static const char __pyx_k_dtype[] = "dtype"; +static const char __pyx_k_numpy[] = "numpy"; +static const char __pyx_k_print[] = "print"; +static const char __pyx_k_rlist[] = "rlist"; +static const char __pyx_k_zeros[] = "zeros"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_col_ids[] = "col_ids"; +static const char __pyx_k_float64[] = "float64"; +static const char __pyx_k_lon_lat[] = "lon_lat"; +static const char __pyx_k_ori2geo[] = "ori2geo"; +static const char __pyx_k_row_ids[] = "row_ids"; +static const char __pyx_k_griddata[] = "griddata"; +static const char __pyx_k_roi_list[] = "roi_list"; +static const char __pyx_k_ImportError[] = "ImportError"; +static const char __pyx_k_ori2geo_img[] = "ori2geo_img"; +static const char __pyx_k_scipy_interpolate[] = "scipy.interpolate"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; +static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; +static PyObject *__pyx_n_s_ImportError; +static PyObject *__pyx_kp_s__4; +static PyObject *__pyx_n_s_a; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_s_clist; +static PyObject *__pyx_n_s_col_ids; +static PyObject *__pyx_n_s_data; +static PyObject *__pyx_n_s_dtype; +static PyObject *__pyx_n_s_end; +static PyObject *__pyx_n_s_file; +static PyObject *__pyx_n_s_float64; +static PyObject *__pyx_n_s_griddata; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_lon_lat; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_mask; +static PyObject *__pyx_n_s_max; +static PyObject *__pyx_n_s_min; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_nan; +static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_s_numpy; +static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; +static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; +static PyObject *__pyx_n_s_ones; +static PyObject *__pyx_n_s_ori2geo; +static PyObject *__pyx_n_s_ori2geo_img; +static PyObject *__pyx_n_s_os; +static PyObject *__pyx_n_s_print; +static PyObject *__pyx_n_s_rlist; +static PyObject *__pyx_n_s_roi_list; +static PyObject *__pyx_n_s_row_ids; +static PyObject *__pyx_n_s_scipy_interpolate; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_x; +static PyObject *__pyx_n_s_zeros; +static PyObject *__pyx_pf_7SAR_GEO_insert_data(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_ori2geo_img, PyArrayObject *__pyx_v_row_ids, PyArrayObject *__pyx_v_col_ids, PyArrayObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_7SAR_GEO_2cut_L1A_img(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_ori2geo_img, PyArrayObject *__pyx_v_roi_list); /* proto */ +static PyObject *__pyx_pf_7SAR_GEO_4gereratorMask(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rlist, PyArrayObject *__pyx_v_clist, PyArrayObject *__pyx_v_mask); /* proto */ +static PyObject *__pyx_pf_7SAR_GEO_6get_r_c(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_ori2geo, PyArrayObject *__pyx_v_lon_lat); /* proto */ +static PyObject *__pyx_pf_7SAR_GEO_8Add(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, double __pyx_v_x); /* proto */ +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_1; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_neg_1; +static PyObject *__pyx_slice_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__5; +static PyObject *__pyx_tuple__6; +/* Late includes */ + +/* "SAR_GEO.pyx":29 + * # + * ###################### + * cdef int rayCasting(Point p,np.ndarray[double,ndim=2] poly): # <<<<<<<<<<<<<< + * cdef double px = p.x, + * cdef double py = p.y, + */ + +static int __pyx_f_7SAR_GEO_rayCasting(struct __pyx_t_7SAR_GEO_Point __pyx_v_p, PyArrayObject *__pyx_v_poly) { + double __pyx_v_px; + double __pyx_v_py; + int __pyx_v_flag; + int __pyx_v_i; + int __pyx_v_l; + int __pyx_v_j; + double __pyx_v_sx; + double __pyx_v_sy; + double __pyx_v_tx; + double __pyx_v_ty; + PyObject *__pyx_v_x = 0; + __Pyx_LocalBuf_ND __pyx_pybuffernd_poly; + __Pyx_Buffer __pyx_pybuffer_poly; + int __pyx_r; + __Pyx_RefNannyDeclarations + double __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + double __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("rayCasting", 0); + __pyx_pybuffer_poly.pybuffer.buf = NULL; + __pyx_pybuffer_poly.refcount = 0; + __pyx_pybuffernd_poly.data = NULL; + __pyx_pybuffernd_poly.rcbuffer = &__pyx_pybuffer_poly; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_poly.rcbuffer->pybuffer, (PyObject*)__pyx_v_poly, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 29, __pyx_L1_error) + } + __pyx_pybuffernd_poly.diminfo[0].strides = __pyx_pybuffernd_poly.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_poly.diminfo[0].shape = __pyx_pybuffernd_poly.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_poly.diminfo[1].strides = __pyx_pybuffernd_poly.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_poly.diminfo[1].shape = __pyx_pybuffernd_poly.rcbuffer->pybuffer.shape[1]; + + /* "SAR_GEO.pyx":30 + * ###################### + * cdef int rayCasting(Point p,np.ndarray[double,ndim=2] poly): + * cdef double px = p.x, # <<<<<<<<<<<<<< + * cdef double py = p.y, + * cdef int flag = 0 + */ + __pyx_t_1 = __pyx_v_p.x; + __pyx_v_px = __pyx_t_1; + + /* "SAR_GEO.pyx":31 + * cdef int rayCasting(Point p,np.ndarray[double,ndim=2] poly): + * cdef double px = p.x, + * cdef double py = p.y, # <<<<<<<<<<<<<< + * cdef int flag = 0 + * + */ + __pyx_t_1 = __pyx_v_p.y; + __pyx_v_py = __pyx_t_1; + + /* "SAR_GEO.pyx":32 + * cdef double px = p.x, + * cdef double py = p.y, + * cdef int flag = 0 # <<<<<<<<<<<<<< + * + * cdef int i=0 + */ + __pyx_v_flag = 0; + + /* "SAR_GEO.pyx":34 + * cdef int flag = 0 + * + * cdef int i=0 # <<<<<<<<<<<<<< + * cdef int l=poly.shape[0] + * cdef int j=l-1 + */ + __pyx_v_i = 0; + + /* "SAR_GEO.pyx":35 + * + * cdef int i=0 + * cdef int l=poly.shape[0] # <<<<<<<<<<<<<< + * cdef int j=l-1 + * + */ + __pyx_v_l = (__pyx_v_poly->dimensions[0]); + + /* "SAR_GEO.pyx":36 + * cdef int i=0 + * cdef int l=poly.shape[0] + * cdef int j=l-1 # <<<<<<<<<<<<<< + * + * cdef double sx + */ + __pyx_v_j = (__pyx_v_l - 1); + + /* "SAR_GEO.pyx":42 + * cdef double tx + * cdef double ty + * cdef x=0 # <<<<<<<<<<<<<< + * while(i= __pyx_pybuffernd_poly.diminfo[0].shape)) __pyx_t_5 = 0; + if (__pyx_t_4 < 0) { + __pyx_t_4 += __pyx_pybuffernd_poly.diminfo[1].shape; + if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 1; + } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_poly.diminfo[1].shape)) __pyx_t_5 = 1; + if (unlikely(__pyx_t_5 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_5); + __PYX_ERR(0, 44, __pyx_L1_error) + } + __pyx_v_sx = (*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_poly.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_poly.diminfo[0].strides, __pyx_t_4, __pyx_pybuffernd_poly.diminfo[1].strides)); + + /* "SAR_GEO.pyx":45 + * while(i= __pyx_pybuffernd_poly.diminfo[0].shape)) __pyx_t_5 = 0; + if (__pyx_t_3 < 0) { + __pyx_t_3 += __pyx_pybuffernd_poly.diminfo[1].shape; + if (unlikely(__pyx_t_3 < 0)) __pyx_t_5 = 1; + } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_poly.diminfo[1].shape)) __pyx_t_5 = 1; + if (unlikely(__pyx_t_5 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_5); + __PYX_ERR(0, 45, __pyx_L1_error) + } + __pyx_v_sy = (*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_poly.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_poly.diminfo[0].strides, __pyx_t_3, __pyx_pybuffernd_poly.diminfo[1].strides)); + + /* "SAR_GEO.pyx":46 + * sx=poly[i,0] + * sy=poly[i,1] + * tx=poly[j,0] # <<<<<<<<<<<<<< + * ty=poly[j,1] + * # + */ + __pyx_t_3 = __pyx_v_j; + __pyx_t_4 = 0; + __pyx_t_5 = -1; + if (__pyx_t_3 < 0) { + __pyx_t_3 += __pyx_pybuffernd_poly.diminfo[0].shape; + if (unlikely(__pyx_t_3 < 0)) __pyx_t_5 = 0; + } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_poly.diminfo[0].shape)) __pyx_t_5 = 0; + if (__pyx_t_4 < 0) { + __pyx_t_4 += __pyx_pybuffernd_poly.diminfo[1].shape; + if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 1; + } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_poly.diminfo[1].shape)) __pyx_t_5 = 1; + if (unlikely(__pyx_t_5 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_5); + __PYX_ERR(0, 46, __pyx_L1_error) + } + __pyx_v_tx = (*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_poly.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_poly.diminfo[0].strides, __pyx_t_4, __pyx_pybuffernd_poly.diminfo[1].strides)); + + /* "SAR_GEO.pyx":47 + * sy=poly[i,1] + * tx=poly[j,0] + * ty=poly[j,1] # <<<<<<<<<<<<<< + * # + * if((sx == px and sy == py) or (tx == px and ty == py)): + */ + __pyx_t_4 = __pyx_v_j; + __pyx_t_3 = 1; + __pyx_t_5 = -1; + if (__pyx_t_4 < 0) { + __pyx_t_4 += __pyx_pybuffernd_poly.diminfo[0].shape; + if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0; + } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_poly.diminfo[0].shape)) __pyx_t_5 = 0; + if (__pyx_t_3 < 0) { + __pyx_t_3 += __pyx_pybuffernd_poly.diminfo[1].shape; + if (unlikely(__pyx_t_3 < 0)) __pyx_t_5 = 1; + } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_poly.diminfo[1].shape)) __pyx_t_5 = 1; + if (unlikely(__pyx_t_5 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_5); + __PYX_ERR(0, 47, __pyx_L1_error) + } + __pyx_v_ty = (*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_poly.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_poly.diminfo[0].strides, __pyx_t_3, __pyx_pybuffernd_poly.diminfo[1].strides)); + + /* "SAR_GEO.pyx":49 + * ty=poly[j,1] + * # + * if((sx == px and sy == py) or (tx == px and ty == py)): # <<<<<<<<<<<<<< + * return 1 + * #// + */ + __pyx_t_6 = ((__pyx_v_sx == __pyx_v_px) != 0); + if (!__pyx_t_6) { + goto __pyx_L7_next_or; + } else { + } + __pyx_t_6 = ((__pyx_v_sy == __pyx_v_py) != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_2 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_L7_next_or:; + __pyx_t_6 = ((__pyx_v_tx == __pyx_v_px) != 0); + if (__pyx_t_6) { + } else { + __pyx_t_2 = __pyx_t_6; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_6 = ((__pyx_v_ty == __pyx_v_py) != 0); + __pyx_t_2 = __pyx_t_6; + __pyx_L6_bool_binop_done:; + if (__pyx_t_2) { + + /* "SAR_GEO.pyx":50 + * # + * if((sx == px and sy == py) or (tx == px and ty == py)): + * return 1 # <<<<<<<<<<<<<< + * #// + * if((sy < py and ty >= py) or (sy >= py and ty < py)) : + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "SAR_GEO.pyx":49 + * ty=poly[j,1] + * # + * if((sx == px and sy == py) or (tx == px and ty == py)): # <<<<<<<<<<<<<< + * return 1 + * #// + */ + } + + /* "SAR_GEO.pyx":52 + * return 1 + * #// + * if((sy < py and ty >= py) or (sy >= py and ty < py)) : # <<<<<<<<<<<<<< + * #// Y X + * x = sx + (py - sy) * (tx - sx) / (ty - sy) + */ + __pyx_t_6 = ((__pyx_v_sy < __pyx_v_py) != 0); + if (!__pyx_t_6) { + goto __pyx_L12_next_or; + } else { + } + __pyx_t_6 = ((__pyx_v_ty >= __pyx_v_py) != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_2 = __pyx_t_6; + goto __pyx_L11_bool_binop_done; + } + __pyx_L12_next_or:; + __pyx_t_6 = ((__pyx_v_sy >= __pyx_v_py) != 0); + if (__pyx_t_6) { + } else { + __pyx_t_2 = __pyx_t_6; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_6 = ((__pyx_v_ty < __pyx_v_py) != 0); + __pyx_t_2 = __pyx_t_6; + __pyx_L11_bool_binop_done:; + if (__pyx_t_2) { + + /* "SAR_GEO.pyx":54 + * if((sy < py and ty >= py) or (sy >= py and ty < py)) : + * #// Y X + * x = sx + (py - sy) * (tx - sx) / (ty - sy) # <<<<<<<<<<<<<< + * #// + * if(x == px): + */ + __pyx_t_1 = ((__pyx_v_py - __pyx_v_sy) * (__pyx_v_tx - __pyx_v_sx)); + __pyx_t_7 = (__pyx_v_ty - __pyx_v_sy); + if (unlikely(__pyx_t_7 == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division"); + __PYX_ERR(0, 54, __pyx_L1_error) + } + __pyx_t_8 = PyFloat_FromDouble((__pyx_v_sx + (__pyx_t_1 / __pyx_t_7))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_8); + __pyx_t_8 = 0; + + /* "SAR_GEO.pyx":56 + * x = sx + (py - sy) * (tx - sx) / (ty - sy) + * #// + * if(x == px): # <<<<<<<<<<<<<< + * return 1 + * + */ + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = PyObject_RichCompare(__pyx_v_x, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (__pyx_t_2) { + + /* "SAR_GEO.pyx":57 + * #// + * if(x == px): + * return 1 # <<<<<<<<<<<<<< + * + * #// + */ + __pyx_r = 1; + goto __pyx_L0; + + /* "SAR_GEO.pyx":56 + * x = sx + (py - sy) * (tx - sx) / (ty - sy) + * #// + * if(x == px): # <<<<<<<<<<<<<< + * return 1 + * + */ + } + + /* "SAR_GEO.pyx":60 + * + * #// + * if(x > px): # <<<<<<<<<<<<<< + * flag = 0 if flag==1 else 1 + * # + */ + __pyx_t_9 = PyFloat_FromDouble(__pyx_v_px); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = PyObject_RichCompare(__pyx_v_x, __pyx_t_9, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_2) { + + /* "SAR_GEO.pyx":61 + * #// + * if(x > px): + * flag = 0 if flag==1 else 1 # <<<<<<<<<<<<<< + * # + * j=i + */ + if (((__pyx_v_flag == 1) != 0)) { + __pyx_t_5 = 0; + } else { + __pyx_t_5 = 1; + } + __pyx_v_flag = __pyx_t_5; + + /* "SAR_GEO.pyx":60 + * + * #// + * if(x > px): # <<<<<<<<<<<<<< + * flag = 0 if flag==1 else 1 + * # + */ + } + + /* "SAR_GEO.pyx":52 + * return 1 + * #// + * if((sy < py and ty >= py) or (sy >= py and ty < py)) : # <<<<<<<<<<<<<< + * #// Y X + * x = sx + (py - sy) * (tx - sx) / (ty - sy) + */ + } + + /* "SAR_GEO.pyx":63 + * flag = 0 if flag==1 else 1 + * # + * j=i # <<<<<<<<<<<<<< + * i=i+1 + * + */ + __pyx_v_j = __pyx_v_i; + + /* "SAR_GEO.pyx":64 + * # + * j=i + * i=i+1 # <<<<<<<<<<<<<< + * + * #// + */ + __pyx_v_i = (__pyx_v_i + 1); + } + + /* "SAR_GEO.pyx":67 + * + * #// + * return 1 if flag==1 else 0 # <<<<<<<<<<<<<< + * + * cpdef np.ndarray[double,ndim=2] insert_data(np.ndarray[double,ndim=2] ori2geo_img,np.ndarray[int , ndim=1] row_ids,np.ndarray[int,ndim=1] col_ids,np.ndarray[double,ndim=1] data): + */ + if (((__pyx_v_flag == 1) != 0)) { + __pyx_t_5 = 1; + } else { + __pyx_t_5 = 0; + } + __pyx_r = __pyx_t_5; + goto __pyx_L0; + + /* "SAR_GEO.pyx":29 + * # + * ###################### + * cdef int rayCasting(Point p,np.ndarray[double,ndim=2] poly): # <<<<<<<<<<<<<< + * cdef double px = p.x, + * cdef double py = p.y, + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_poly.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_WriteUnraisable("SAR_GEO.rayCasting", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_poly.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XDECREF(__pyx_v_x); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "SAR_GEO.pyx":69 + * return 1 if flag==1 else 0 + * + * cpdef np.ndarray[double,ndim=2] insert_data(np.ndarray[double,ndim=2] ori2geo_img,np.ndarray[int , ndim=1] row_ids,np.ndarray[int,ndim=1] col_ids,np.ndarray[double,ndim=1] data): # <<<<<<<<<<<<<< + * cdef int i=0 + * cdef int count=row_ids.shape[0] + */ + +static PyObject *__pyx_pw_7SAR_GEO_1insert_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_insert_data(PyArrayObject *__pyx_v_ori2geo_img, PyArrayObject *__pyx_v_row_ids, PyArrayObject *__pyx_v_col_ids, PyArrayObject *__pyx_v_data, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_i; + int __pyx_v_count; + __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ids; + __Pyx_Buffer __pyx_pybuffer_col_ids; + __Pyx_LocalBuf_ND __pyx_pybuffernd_data; + __Pyx_Buffer __pyx_pybuffer_data; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ori2geo_img; + __Pyx_Buffer __pyx_pybuffer_ori2geo_img; + __Pyx_LocalBuf_ND __pyx_pybuffernd_row_ids; + __Pyx_Buffer __pyx_pybuffer_row_ids; + PyArrayObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("insert_data", 0); + __pyx_pybuffer_ori2geo_img.pybuffer.buf = NULL; + __pyx_pybuffer_ori2geo_img.refcount = 0; + __pyx_pybuffernd_ori2geo_img.data = NULL; + __pyx_pybuffernd_ori2geo_img.rcbuffer = &__pyx_pybuffer_ori2geo_img; + __pyx_pybuffer_row_ids.pybuffer.buf = NULL; + __pyx_pybuffer_row_ids.refcount = 0; + __pyx_pybuffernd_row_ids.data = NULL; + __pyx_pybuffernd_row_ids.rcbuffer = &__pyx_pybuffer_row_ids; + __pyx_pybuffer_col_ids.pybuffer.buf = NULL; + __pyx_pybuffer_col_ids.refcount = 0; + __pyx_pybuffernd_col_ids.data = NULL; + __pyx_pybuffernd_col_ids.rcbuffer = &__pyx_pybuffer_col_ids; + __pyx_pybuffer_data.pybuffer.buf = NULL; + __pyx_pybuffer_data.refcount = 0; + __pyx_pybuffernd_data.data = NULL; + __pyx_pybuffernd_data.rcbuffer = &__pyx_pybuffer_data; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer, (PyObject*)__pyx_v_ori2geo_img, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_pybuffernd_ori2geo_img.diminfo[0].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ori2geo_img.diminfo[0].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ori2geo_img.diminfo[1].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ori2geo_img.diminfo[1].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_ids.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_ids, &__Pyx_TypeInfo_int, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_pybuffernd_row_ids.diminfo[0].strides = __pyx_pybuffernd_row_ids.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_ids.diminfo[0].shape = __pyx_pybuffernd_row_ids.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ids.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ids, &__Pyx_TypeInfo_int, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_pybuffernd_col_ids.diminfo[0].strides = __pyx_pybuffernd_col_ids.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ids.diminfo[0].shape = __pyx_pybuffernd_col_ids.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_data.rcbuffer->pybuffer, (PyObject*)__pyx_v_data, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_pybuffernd_data.diminfo[0].strides = __pyx_pybuffernd_data.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_data.diminfo[0].shape = __pyx_pybuffernd_data.rcbuffer->pybuffer.shape[0]; + + /* "SAR_GEO.pyx":70 + * + * cpdef np.ndarray[double,ndim=2] insert_data(np.ndarray[double,ndim=2] ori2geo_img,np.ndarray[int , ndim=1] row_ids,np.ndarray[int,ndim=1] col_ids,np.ndarray[double,ndim=1] data): + * cdef int i=0 # <<<<<<<<<<<<<< + * cdef int count=row_ids.shape[0] + * while idimensions[0]); + + /* "SAR_GEO.pyx":72 + * cdef int i=0 + * cdef int count=row_ids.shape[0] + * while i= __pyx_pybuffernd_data.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 73, __pyx_L1_error) + } + __pyx_t_4 = __pyx_v_i; + __pyx_t_3 = -1; + if (__pyx_t_4 < 0) { + __pyx_t_4 += __pyx_pybuffernd_row_ids.diminfo[0].shape; + if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_row_ids.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 73, __pyx_L1_error) + } + __pyx_t_5 = __pyx_v_i; + __pyx_t_3 = -1; + if (__pyx_t_5 < 0) { + __pyx_t_5 += __pyx_pybuffernd_col_ids.diminfo[0].shape; + if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_col_ids.diminfo[0].shape)) __pyx_t_3 = 0; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 73, __pyx_L1_error) + } + __pyx_t_6 = (*__Pyx_BufPtrStrided1d(int *, __pyx_pybuffernd_row_ids.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_row_ids.diminfo[0].strides)); + __pyx_t_7 = (*__Pyx_BufPtrStrided1d(int *, __pyx_pybuffernd_col_ids.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_col_ids.diminfo[0].strides)); + __pyx_t_3 = -1; + if (__pyx_t_6 < 0) { + __pyx_t_6 += __pyx_pybuffernd_ori2geo_img.diminfo[0].shape; + if (unlikely(__pyx_t_6 < 0)) __pyx_t_3 = 0; + } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_ori2geo_img.diminfo[0].shape)) __pyx_t_3 = 0; + if (__pyx_t_7 < 0) { + __pyx_t_7 += __pyx_pybuffernd_ori2geo_img.diminfo[1].shape; + if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 1; + } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_ori2geo_img.diminfo[1].shape)) __pyx_t_3 = 1; + if (unlikely(__pyx_t_3 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_3); + __PYX_ERR(0, 73, __pyx_L1_error) + } + *__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_ori2geo_img.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_ori2geo_img.diminfo[1].strides) = (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_data.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_data.diminfo[0].strides)); + + /* "SAR_GEO.pyx":74 + * while ipybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_data.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_ids.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.insert_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ids.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_data.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_ids.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7SAR_GEO_1insert_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_7SAR_GEO_1insert_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyArrayObject *__pyx_v_ori2geo_img = 0; + PyArrayObject *__pyx_v_row_ids = 0; + PyArrayObject *__pyx_v_col_ids = 0; + PyArrayObject *__pyx_v_data = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("insert_data (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ori2geo_img,&__pyx_n_s_row_ids,&__pyx_n_s_col_ids,&__pyx_n_s_data,0}; + PyObject* values[4] = {0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ori2geo_img)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row_ids)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("insert_data", 1, 4, 4, 1); __PYX_ERR(0, 69, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_col_ids)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("insert_data", 1, 4, 4, 2); __PYX_ERR(0, 69, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("insert_data", 1, 4, 4, 3); __PYX_ERR(0, 69, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert_data") < 0)) __PYX_ERR(0, 69, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + } + __pyx_v_ori2geo_img = ((PyArrayObject *)values[0]); + __pyx_v_row_ids = ((PyArrayObject *)values[1]); + __pyx_v_col_ids = ((PyArrayObject *)values[2]); + __pyx_v_data = ((PyArrayObject *)values[3]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("insert_data", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 69, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("SAR_GEO.insert_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ori2geo_img), __pyx_ptype_5numpy_ndarray, 1, "ori2geo_img", 0))) __PYX_ERR(0, 69, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_row_ids), __pyx_ptype_5numpy_ndarray, 1, "row_ids", 0))) __PYX_ERR(0, 69, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_col_ids), __pyx_ptype_5numpy_ndarray, 1, "col_ids", 0))) __PYX_ERR(0, 69, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), __pyx_ptype_5numpy_ndarray, 1, "data", 0))) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_r = __pyx_pf_7SAR_GEO_insert_data(__pyx_self, __pyx_v_ori2geo_img, __pyx_v_row_ids, __pyx_v_col_ids, __pyx_v_data); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7SAR_GEO_insert_data(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_ori2geo_img, PyArrayObject *__pyx_v_row_ids, PyArrayObject *__pyx_v_col_ids, PyArrayObject *__pyx_v_data) { + __Pyx_LocalBuf_ND __pyx_pybuffernd_col_ids; + __Pyx_Buffer __pyx_pybuffer_col_ids; + __Pyx_LocalBuf_ND __pyx_pybuffernd_data; + __Pyx_Buffer __pyx_pybuffer_data; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ori2geo_img; + __Pyx_Buffer __pyx_pybuffer_ori2geo_img; + __Pyx_LocalBuf_ND __pyx_pybuffernd_row_ids; + __Pyx_Buffer __pyx_pybuffer_row_ids; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("insert_data", 0); + __pyx_pybuffer_ori2geo_img.pybuffer.buf = NULL; + __pyx_pybuffer_ori2geo_img.refcount = 0; + __pyx_pybuffernd_ori2geo_img.data = NULL; + __pyx_pybuffernd_ori2geo_img.rcbuffer = &__pyx_pybuffer_ori2geo_img; + __pyx_pybuffer_row_ids.pybuffer.buf = NULL; + __pyx_pybuffer_row_ids.refcount = 0; + __pyx_pybuffernd_row_ids.data = NULL; + __pyx_pybuffernd_row_ids.rcbuffer = &__pyx_pybuffer_row_ids; + __pyx_pybuffer_col_ids.pybuffer.buf = NULL; + __pyx_pybuffer_col_ids.refcount = 0; + __pyx_pybuffernd_col_ids.data = NULL; + __pyx_pybuffernd_col_ids.rcbuffer = &__pyx_pybuffer_col_ids; + __pyx_pybuffer_data.pybuffer.buf = NULL; + __pyx_pybuffer_data.refcount = 0; + __pyx_pybuffernd_data.data = NULL; + __pyx_pybuffernd_data.rcbuffer = &__pyx_pybuffer_data; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer, (PyObject*)__pyx_v_ori2geo_img, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_pybuffernd_ori2geo_img.diminfo[0].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ori2geo_img.diminfo[0].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ori2geo_img.diminfo[1].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ori2geo_img.diminfo[1].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[1]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_row_ids.rcbuffer->pybuffer, (PyObject*)__pyx_v_row_ids, &__Pyx_TypeInfo_int, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_pybuffernd_row_ids.diminfo[0].strides = __pyx_pybuffernd_row_ids.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_row_ids.diminfo[0].shape = __pyx_pybuffernd_row_ids.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_col_ids.rcbuffer->pybuffer, (PyObject*)__pyx_v_col_ids, &__Pyx_TypeInfo_int, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_pybuffernd_col_ids.diminfo[0].strides = __pyx_pybuffernd_col_ids.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_col_ids.diminfo[0].shape = __pyx_pybuffernd_col_ids.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_data.rcbuffer->pybuffer, (PyObject*)__pyx_v_data, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 69, __pyx_L1_error) + } + __pyx_pybuffernd_data.diminfo[0].strides = __pyx_pybuffernd_data.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_data.diminfo[0].shape = __pyx_pybuffernd_data.rcbuffer->pybuffer.shape[0]; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_7SAR_GEO_insert_data(__pyx_v_ori2geo_img, __pyx_v_row_ids, __pyx_v_col_ids, __pyx_v_data, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ids.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_data.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_ids.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.insert_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_col_ids.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_data.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_row_ids.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "SAR_GEO.pyx":77 + * return ori2geo_img + * + * cpdef np.ndarray[double,ndim=2] cut_L1A_img(np.ndarray[double,ndim=3] ori2geo_img,np.ndarray[double,ndim=2] roi_list): # <<<<<<<<<<<<<< + * """ roi + * """ + */ + +static PyObject *__pyx_pw_7SAR_GEO_3cut_L1A_img(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_cut_L1A_img(PyArrayObject *__pyx_v_ori2geo_img, PyArrayObject *__pyx_v_roi_list, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_height; + int __pyx_v_width; + int __pyx_v_i; + int __pyx_v_j; + struct __pyx_t_7SAR_GEO_Point __pyx_v_temp_p; + PyArrayObject *__pyx_v_mask = 0; + __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; + __Pyx_Buffer __pyx_pybuffer_mask; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ori2geo_img; + __Pyx_Buffer __pyx_pybuffer_ori2geo_img; + __Pyx_LocalBuf_ND __pyx_pybuffernd_roi_list; + __Pyx_Buffer __pyx_pybuffer_roi_list; + PyArrayObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyArrayObject *__pyx_t_6 = NULL; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + int __pyx_t_11; + double __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("cut_L1A_img", 0); + __pyx_pybuffer_mask.pybuffer.buf = NULL; + __pyx_pybuffer_mask.refcount = 0; + __pyx_pybuffernd_mask.data = NULL; + __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; + __pyx_pybuffer_ori2geo_img.pybuffer.buf = NULL; + __pyx_pybuffer_ori2geo_img.refcount = 0; + __pyx_pybuffernd_ori2geo_img.data = NULL; + __pyx_pybuffernd_ori2geo_img.rcbuffer = &__pyx_pybuffer_ori2geo_img; + __pyx_pybuffer_roi_list.pybuffer.buf = NULL; + __pyx_pybuffer_roi_list.refcount = 0; + __pyx_pybuffernd_roi_list.data = NULL; + __pyx_pybuffernd_roi_list.rcbuffer = &__pyx_pybuffer_roi_list; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer, (PyObject*)__pyx_v_ori2geo_img, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 77, __pyx_L1_error) + } + __pyx_pybuffernd_ori2geo_img.diminfo[0].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ori2geo_img.diminfo[0].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ori2geo_img.diminfo[1].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ori2geo_img.diminfo[1].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_ori2geo_img.diminfo[2].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_ori2geo_img.diminfo[2].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[2]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_roi_list.rcbuffer->pybuffer, (PyObject*)__pyx_v_roi_list, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 77, __pyx_L1_error) + } + __pyx_pybuffernd_roi_list.diminfo[0].strides = __pyx_pybuffernd_roi_list.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_roi_list.diminfo[0].shape = __pyx_pybuffernd_roi_list.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_roi_list.diminfo[1].strides = __pyx_pybuffernd_roi_list.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_roi_list.diminfo[1].shape = __pyx_pybuffernd_roi_list.rcbuffer->pybuffer.shape[1]; + + /* "SAR_GEO.pyx":80 + * """ roi + * """ + * cdef int height=ori2geo_img.shape[1] # <<<<<<<<<<<<<< + * cdef int width=ori2geo_img.shape[2] + * cdef int i=0 + */ + __pyx_v_height = (__pyx_v_ori2geo_img->dimensions[1]); + + /* "SAR_GEO.pyx":81 + * """ + * cdef int height=ori2geo_img.shape[1] + * cdef int width=ori2geo_img.shape[2] # <<<<<<<<<<<<<< + * cdef int i=0 + * cdef int j=0 + */ + __pyx_v_width = (__pyx_v_ori2geo_img->dimensions[2]); + + /* "SAR_GEO.pyx":82 + * cdef int height=ori2geo_img.shape[1] + * cdef int width=ori2geo_img.shape[2] + * cdef int i=0 # <<<<<<<<<<<<<< + * cdef int j=0 + * cdef Point temp_p + */ + __pyx_v_i = 0; + + /* "SAR_GEO.pyx":83 + * cdef int width=ori2geo_img.shape[2] + * cdef int i=0 + * cdef int j=0 # <<<<<<<<<<<<<< + * cdef Point temp_p + * cdef np.ndarray[double,ndim=2] mask=np.zeros((height,width),dtype=np.float64) + */ + __pyx_v_j = 0; + + /* "SAR_GEO.pyx":85 + * cdef int j=0 + * cdef Point temp_p + * cdef np.ndarray[double,ndim=2] mask=np.zeros((height,width),dtype=np.float64) # <<<<<<<<<<<<<< + * while ipybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { + __pyx_v_mask = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf = NULL; + __PYX_ERR(0, 85, __pyx_L1_error) + } else {__pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; + } + } + __pyx_t_6 = 0; + __pyx_v_mask = ((PyArrayObject *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "SAR_GEO.pyx":86 + * cdef Point temp_p + * cdef np.ndarray[double,ndim=2] mask=np.zeros((height,width),dtype=np.float64) + * while i= __pyx_pybuffernd_ori2geo_img.diminfo[0].shape)) __pyx_t_11 = 0; + if (__pyx_t_9 < 0) { + __pyx_t_9 += __pyx_pybuffernd_ori2geo_img.diminfo[1].shape; + if (unlikely(__pyx_t_9 < 0)) __pyx_t_11 = 1; + } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_ori2geo_img.diminfo[1].shape)) __pyx_t_11 = 1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_pybuffernd_ori2geo_img.diminfo[2].shape; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 2; + } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_ori2geo_img.diminfo[2].shape)) __pyx_t_11 = 2; + if (unlikely(__pyx_t_11 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_11); + __PYX_ERR(0, 89, __pyx_L1_error) + } + __pyx_v_temp_p.x = (*__Pyx_BufPtrStrided3d(double *, __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_ori2geo_img.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_ori2geo_img.diminfo[1].strides, __pyx_t_10, __pyx_pybuffernd_ori2geo_img.diminfo[2].strides)); + + /* "SAR_GEO.pyx":90 + * while j= __pyx_pybuffernd_ori2geo_img.diminfo[0].shape)) __pyx_t_11 = 0; + if (__pyx_t_9 < 0) { + __pyx_t_9 += __pyx_pybuffernd_ori2geo_img.diminfo[1].shape; + if (unlikely(__pyx_t_9 < 0)) __pyx_t_11 = 1; + } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_ori2geo_img.diminfo[1].shape)) __pyx_t_11 = 1; + if (__pyx_t_8 < 0) { + __pyx_t_8 += __pyx_pybuffernd_ori2geo_img.diminfo[2].shape; + if (unlikely(__pyx_t_8 < 0)) __pyx_t_11 = 2; + } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_ori2geo_img.diminfo[2].shape)) __pyx_t_11 = 2; + if (unlikely(__pyx_t_11 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_11); + __PYX_ERR(0, 90, __pyx_L1_error) + } + __pyx_v_temp_p.y = (*__Pyx_BufPtrStrided3d(double *, __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_ori2geo_img.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_ori2geo_img.diminfo[1].strides, __pyx_t_8, __pyx_pybuffernd_ori2geo_img.diminfo[2].strides)); + + /* "SAR_GEO.pyx":91 + * temp_p.x=ori2geo_img[0,i,j] # temp_p + * temp_p.y=ori2geo_img[1,i,j] # temp_p + * if rayCasting(temp_p,roi_list)==1: # <<<<<<<<<<<<<< + * mask[i,j]=1 + * else: + */ + __pyx_t_7 = ((__pyx_f_7SAR_GEO_rayCasting(__pyx_v_temp_p, ((PyArrayObject *)__pyx_v_roi_list)) == 1) != 0); + if (__pyx_t_7) { + + /* "SAR_GEO.pyx":92 + * temp_p.y=ori2geo_img[1,i,j] # temp_p + * if rayCasting(temp_p,roi_list)==1: + * mask[i,j]=1 # <<<<<<<<<<<<<< + * else: + * mask[i,j]=np.nan + */ + __pyx_t_8 = __pyx_v_i; + __pyx_t_9 = __pyx_v_j; + __pyx_t_11 = -1; + if (__pyx_t_8 < 0) { + __pyx_t_8 += __pyx_pybuffernd_mask.diminfo[0].shape; + if (unlikely(__pyx_t_8 < 0)) __pyx_t_11 = 0; + } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_11 = 0; + if (__pyx_t_9 < 0) { + __pyx_t_9 += __pyx_pybuffernd_mask.diminfo[1].shape; + if (unlikely(__pyx_t_9 < 0)) __pyx_t_11 = 1; + } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_11 = 1; + if (unlikely(__pyx_t_11 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_11); + __PYX_ERR(0, 92, __pyx_L1_error) + } + *__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_mask.diminfo[1].strides) = 1.0; + + /* "SAR_GEO.pyx":91 + * temp_p.x=ori2geo_img[0,i,j] # temp_p + * temp_p.y=ori2geo_img[1,i,j] # temp_p + * if rayCasting(temp_p,roi_list)==1: # <<<<<<<<<<<<<< + * mask[i,j]=1 + * else: + */ + goto __pyx_L7; + } + + /* "SAR_GEO.pyx":94 + * mask[i,j]=1 + * else: + * mask[i,j]=np.nan # <<<<<<<<<<<<<< + * j=j+1 + * i=i+1 + */ + /*else*/ { + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __pyx_v_i; + __pyx_t_8 = __pyx_v_j; + __pyx_t_11 = -1; + if (__pyx_t_9 < 0) { + __pyx_t_9 += __pyx_pybuffernd_mask.diminfo[0].shape; + if (unlikely(__pyx_t_9 < 0)) __pyx_t_11 = 0; + } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_11 = 0; + if (__pyx_t_8 < 0) { + __pyx_t_8 += __pyx_pybuffernd_mask.diminfo[1].shape; + if (unlikely(__pyx_t_8 < 0)) __pyx_t_11 = 1; + } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_11 = 1; + if (unlikely(__pyx_t_11 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_11); + __PYX_ERR(0, 94, __pyx_L1_error) + } + *__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_mask.diminfo[1].strides) = __pyx_t_12; + } + __pyx_L7:; + + /* "SAR_GEO.pyx":95 + * else: + * mask[i,j]=np.nan + * j=j+1 # <<<<<<<<<<<<<< + * i=i+1 + * return mask + */ + __pyx_v_j = (__pyx_v_j + 1); + } + + /* "SAR_GEO.pyx":96 + * mask[i,j]=np.nan + * j=j+1 + * i=i+1 # <<<<<<<<<<<<<< + * return mask + * + */ + __pyx_v_i = (__pyx_v_i + 1); + } + + /* "SAR_GEO.pyx":97 + * j=j+1 + * i=i+1 + * return mask # <<<<<<<<<<<<<< + * + * cpdef np.ndarray[double,ndim=2] gereratorMask(np.ndarray[double,ndim=1] rlist,np.ndarray[double,ndim=1] clist,np.ndarray[double,ndim=2] mask): + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_mask)); + __pyx_r = ((PyArrayObject *)__pyx_v_mask); + goto __pyx_L0; + + /* "SAR_GEO.pyx":77 + * return ori2geo_img + * + * cpdef np.ndarray[double,ndim=2] cut_L1A_img(np.ndarray[double,ndim=3] ori2geo_img,np.ndarray[double,ndim=2] roi_list): # <<<<<<<<<<<<<< + * """ roi + * """ + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_roi_list.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.cut_L1A_img", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_roi_list.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_mask); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7SAR_GEO_3cut_L1A_img(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7SAR_GEO_2cut_L1A_img[] = " \346\240\271\346\215\256roi \350\216\267\345\217\226\346\240\205\346\240\274\345\257\271\350\261\241\n "; +static PyObject *__pyx_pw_7SAR_GEO_3cut_L1A_img(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyArrayObject *__pyx_v_ori2geo_img = 0; + PyArrayObject *__pyx_v_roi_list = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("cut_L1A_img (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ori2geo_img,&__pyx_n_s_roi_list,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ori2geo_img)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_roi_list)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("cut_L1A_img", 1, 2, 2, 1); __PYX_ERR(0, 77, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cut_L1A_img") < 0)) __PYX_ERR(0, 77, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_ori2geo_img = ((PyArrayObject *)values[0]); + __pyx_v_roi_list = ((PyArrayObject *)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("cut_L1A_img", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 77, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("SAR_GEO.cut_L1A_img", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ori2geo_img), __pyx_ptype_5numpy_ndarray, 1, "ori2geo_img", 0))) __PYX_ERR(0, 77, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_roi_list), __pyx_ptype_5numpy_ndarray, 1, "roi_list", 0))) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_r = __pyx_pf_7SAR_GEO_2cut_L1A_img(__pyx_self, __pyx_v_ori2geo_img, __pyx_v_roi_list); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7SAR_GEO_2cut_L1A_img(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_ori2geo_img, PyArrayObject *__pyx_v_roi_list) { + __Pyx_LocalBuf_ND __pyx_pybuffernd_ori2geo_img; + __Pyx_Buffer __pyx_pybuffer_ori2geo_img; + __Pyx_LocalBuf_ND __pyx_pybuffernd_roi_list; + __Pyx_Buffer __pyx_pybuffer_roi_list; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("cut_L1A_img", 0); + __pyx_pybuffer_ori2geo_img.pybuffer.buf = NULL; + __pyx_pybuffer_ori2geo_img.refcount = 0; + __pyx_pybuffernd_ori2geo_img.data = NULL; + __pyx_pybuffernd_ori2geo_img.rcbuffer = &__pyx_pybuffer_ori2geo_img; + __pyx_pybuffer_roi_list.pybuffer.buf = NULL; + __pyx_pybuffer_roi_list.refcount = 0; + __pyx_pybuffernd_roi_list.data = NULL; + __pyx_pybuffernd_roi_list.rcbuffer = &__pyx_pybuffer_roi_list; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer, (PyObject*)__pyx_v_ori2geo_img, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 77, __pyx_L1_error) + } + __pyx_pybuffernd_ori2geo_img.diminfo[0].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ori2geo_img.diminfo[0].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ori2geo_img.diminfo[1].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ori2geo_img.diminfo[1].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_ori2geo_img.diminfo[2].strides = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_ori2geo_img.diminfo[2].shape = __pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer.shape[2]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_roi_list.rcbuffer->pybuffer, (PyObject*)__pyx_v_roi_list, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 77, __pyx_L1_error) + } + __pyx_pybuffernd_roi_list.diminfo[0].strides = __pyx_pybuffernd_roi_list.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_roi_list.diminfo[0].shape = __pyx_pybuffernd_roi_list.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_roi_list.diminfo[1].strides = __pyx_pybuffernd_roi_list.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_roi_list.diminfo[1].shape = __pyx_pybuffernd_roi_list.rcbuffer->pybuffer.shape[1]; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_7SAR_GEO_cut_L1A_img(__pyx_v_ori2geo_img, __pyx_v_roi_list, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_roi_list.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.cut_L1A_img", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo_img.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_roi_list.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "SAR_GEO.pyx":99 + * return mask + * + * cpdef np.ndarray[double,ndim=2] gereratorMask(np.ndarray[double,ndim=1] rlist,np.ndarray[double,ndim=1] clist,np.ndarray[double,ndim=2] mask): # <<<<<<<<<<<<<< + * cdef int rcount=rlist.shape[0] + * cdef int ccount=clist.shape[0] + */ + +static PyObject *__pyx_pw_7SAR_GEO_5gereratorMask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_gereratorMask(PyArrayObject *__pyx_v_rlist, PyArrayObject *__pyx_v_clist, PyArrayObject *__pyx_v_mask, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_rcount; + int __pyx_v_ccount; + int __pyx_v_count; + int __pyx_v_i; + CYTHON_UNUSED int __pyx_v_j; + int __pyx_v_temp_row; + int __pyx_v_temp_col; + int __pyx_v_height; + int __pyx_v_width; + __Pyx_LocalBuf_ND __pyx_pybuffernd_clist; + __Pyx_Buffer __pyx_pybuffer_clist; + __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; + __Pyx_Buffer __pyx_pybuffer_mask; + __Pyx_LocalBuf_ND __pyx_pybuffernd_rlist; + __Pyx_Buffer __pyx_pybuffer_rlist; + PyArrayObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("gereratorMask", 0); + __pyx_pybuffer_rlist.pybuffer.buf = NULL; + __pyx_pybuffer_rlist.refcount = 0; + __pyx_pybuffernd_rlist.data = NULL; + __pyx_pybuffernd_rlist.rcbuffer = &__pyx_pybuffer_rlist; + __pyx_pybuffer_clist.pybuffer.buf = NULL; + __pyx_pybuffer_clist.refcount = 0; + __pyx_pybuffernd_clist.data = NULL; + __pyx_pybuffernd_clist.rcbuffer = &__pyx_pybuffer_clist; + __pyx_pybuffer_mask.pybuffer.buf = NULL; + __pyx_pybuffer_mask.refcount = 0; + __pyx_pybuffernd_mask.data = NULL; + __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rlist.rcbuffer->pybuffer, (PyObject*)__pyx_v_rlist, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 99, __pyx_L1_error) + } + __pyx_pybuffernd_rlist.diminfo[0].strides = __pyx_pybuffernd_rlist.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rlist.diminfo[0].shape = __pyx_pybuffernd_rlist.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_clist.rcbuffer->pybuffer, (PyObject*)__pyx_v_clist, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 99, __pyx_L1_error) + } + __pyx_pybuffernd_clist.diminfo[0].strides = __pyx_pybuffernd_clist.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_clist.diminfo[0].shape = __pyx_pybuffernd_clist.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 99, __pyx_L1_error) + } + __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; + + /* "SAR_GEO.pyx":100 + * + * cpdef np.ndarray[double,ndim=2] gereratorMask(np.ndarray[double,ndim=1] rlist,np.ndarray[double,ndim=1] clist,np.ndarray[double,ndim=2] mask): + * cdef int rcount=rlist.shape[0] # <<<<<<<<<<<<<< + * cdef int ccount=clist.shape[0] + * cdef int count=rcount if rcountdimensions[0]); + + /* "SAR_GEO.pyx":101 + * cpdef np.ndarray[double,ndim=2] gereratorMask(np.ndarray[double,ndim=1] rlist,np.ndarray[double,ndim=1] clist,np.ndarray[double,ndim=2] mask): + * cdef int rcount=rlist.shape[0] + * cdef int ccount=clist.shape[0] # <<<<<<<<<<<<<< + * cdef int count=rcount if rcountdimensions[0]); + + /* "SAR_GEO.pyx":102 + * cdef int rcount=rlist.shape[0] + * cdef int ccount=clist.shape[0] + * cdef int count=rcount if rcountdimensions[0]); + + /* "SAR_GEO.pyx":108 + * cdef int temp_col=0 + * cdef int height=mask.shape[0] + * cdef int width=mask.shape[1] # <<<<<<<<<<<<<< + * while idimensions[1]); + + /* "SAR_GEO.pyx":109 + * cdef int height=mask.shape[0] + * cdef int width=mask.shape[1] + * while i= __pyx_pybuffernd_rlist.diminfo[0].shape)) __pyx_t_1 = 0; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 112, __pyx_L1_error) + } + __pyx_v_temp_row = ((int)ceil((*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_rlist.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_rlist.diminfo[0].strides)))); + + /* "SAR_GEO.pyx":113 + * # 1 + * temp_row=int(ceil(rlist[i])) + * temp_col=int(ceil(clist[i])) # <<<<<<<<<<<<<< + * + * if temp_row>=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_clist.diminfo[0].shape)) __pyx_t_1 = 0; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 113, __pyx_L1_error) + } + __pyx_v_temp_col = ((int)ceil((*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_clist.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_clist.diminfo[0].strides)))); + + /* "SAR_GEO.pyx":115 + * temp_col=int(ceil(clist[i])) + * + * if temp_row>=0 and temp_col>=0 and temp_row= 0) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_col >= 0) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_row < __pyx_v_height) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_col < __pyx_v_width) != 0); + __pyx_t_2 = __pyx_t_4; + __pyx_L6_bool_binop_done:; + if (__pyx_t_2) { + + /* "SAR_GEO.pyx":116 + * + * if temp_row>=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_1 = 0; + if (__pyx_t_5 < 0) { + __pyx_t_5 += __pyx_pybuffernd_mask.diminfo[1].shape; + if (unlikely(__pyx_t_5 < 0)) __pyx_t_1 = 1; + } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_1 = 1; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 116, __pyx_L1_error) + } + *__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_mask.diminfo[1].strides) = 1.0; + + /* "SAR_GEO.pyx":115 + * temp_col=int(ceil(clist[i])) + * + * if temp_row>=0 and temp_col>=0 and temp_row=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_rlist.diminfo[0].shape)) __pyx_t_1 = 0; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 119, __pyx_L1_error) + } + __pyx_v_temp_row = ((int)floor((*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_rlist.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_rlist.diminfo[0].strides)))); + + /* "SAR_GEO.pyx":120 + * # 2 + * temp_row=int(floor(rlist[i])) + * temp_col=int(ceil(clist[i])) # <<<<<<<<<<<<<< + * if temp_row>=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_clist.diminfo[0].shape)) __pyx_t_1 = 0; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 120, __pyx_L1_error) + } + __pyx_v_temp_col = ((int)ceil((*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_clist.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_clist.diminfo[0].strides)))); + + /* "SAR_GEO.pyx":121 + * temp_row=int(floor(rlist[i])) + * temp_col=int(ceil(clist[i])) + * if temp_row>=0 and temp_col>=0 and temp_row= 0) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_col >= 0) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_row < __pyx_v_height) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_col < __pyx_v_width) != 0); + __pyx_t_2 = __pyx_t_4; + __pyx_L11_bool_binop_done:; + if (__pyx_t_2) { + + /* "SAR_GEO.pyx":122 + * temp_col=int(ceil(clist[i])) + * if temp_row>=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_1 = 0; + if (__pyx_t_3 < 0) { + __pyx_t_3 += __pyx_pybuffernd_mask.diminfo[1].shape; + if (unlikely(__pyx_t_3 < 0)) __pyx_t_1 = 1; + } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_1 = 1; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 122, __pyx_L1_error) + } + *__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_3, __pyx_pybuffernd_mask.diminfo[1].strides) = 1.0; + + /* "SAR_GEO.pyx":121 + * temp_row=int(floor(rlist[i])) + * temp_col=int(ceil(clist[i])) + * if temp_row>=0 and temp_col>=0 and temp_row=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_rlist.diminfo[0].shape)) __pyx_t_1 = 0; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 125, __pyx_L1_error) + } + __pyx_v_temp_row = ((int)ceil((*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_rlist.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_rlist.diminfo[0].strides)))); + + /* "SAR_GEO.pyx":126 + * # 3 + * temp_row=int(ceil(rlist[i])) + * temp_col=int(floor(clist[i])) # <<<<<<<<<<<<<< + * if temp_row>=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_clist.diminfo[0].shape)) __pyx_t_1 = 0; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 126, __pyx_L1_error) + } + __pyx_v_temp_col = ((int)floor((*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_clist.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_clist.diminfo[0].strides)))); + + /* "SAR_GEO.pyx":127 + * temp_row=int(ceil(rlist[i])) + * temp_col=int(floor(clist[i])) + * if temp_row>=0 and temp_col>=0 and temp_row= 0) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L16_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_col >= 0) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L16_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_row < __pyx_v_height) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L16_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_col < __pyx_v_width) != 0); + __pyx_t_2 = __pyx_t_4; + __pyx_L16_bool_binop_done:; + if (__pyx_t_2) { + + /* "SAR_GEO.pyx":128 + * temp_col=int(floor(clist[i])) + * if temp_row>=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_1 = 0; + if (__pyx_t_5 < 0) { + __pyx_t_5 += __pyx_pybuffernd_mask.diminfo[1].shape; + if (unlikely(__pyx_t_5 < 0)) __pyx_t_1 = 1; + } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_1 = 1; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 128, __pyx_L1_error) + } + *__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_mask.diminfo[1].strides) = 1.0; + + /* "SAR_GEO.pyx":127 + * temp_row=int(ceil(rlist[i])) + * temp_col=int(floor(clist[i])) + * if temp_row>=0 and temp_col>=0 and temp_row=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_rlist.diminfo[0].shape)) __pyx_t_1 = 0; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 130, __pyx_L1_error) + } + __pyx_v_temp_row = ((int)floor((*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_rlist.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_rlist.diminfo[0].strides)))); + + /* "SAR_GEO.pyx":131 + * # 4 + * temp_row=int(floor(rlist[i])) + * temp_col=int(floor(clist[i])) # <<<<<<<<<<<<<< + * if temp_row>=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_clist.diminfo[0].shape)) __pyx_t_1 = 0; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 131, __pyx_L1_error) + } + __pyx_v_temp_col = ((int)floor((*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_clist.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_clist.diminfo[0].strides)))); + + /* "SAR_GEO.pyx":132 + * temp_row=int(floor(rlist[i])) + * temp_col=int(floor(clist[i])) + * if temp_row>=0 and temp_col>=0 and temp_row= 0) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L21_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_col >= 0) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L21_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_row < __pyx_v_height) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L21_bool_binop_done; + } + __pyx_t_4 = ((__pyx_v_temp_col < __pyx_v_width) != 0); + __pyx_t_2 = __pyx_t_4; + __pyx_L21_bool_binop_done:; + if (__pyx_t_2) { + + /* "SAR_GEO.pyx":133 + * temp_col=int(floor(clist[i])) + * if temp_row>=0 and temp_col>=0 and temp_row= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_1 = 0; + if (__pyx_t_3 < 0) { + __pyx_t_3 += __pyx_pybuffernd_mask.diminfo[1].shape; + if (unlikely(__pyx_t_3 < 0)) __pyx_t_1 = 1; + } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_1 = 1; + if (unlikely(__pyx_t_1 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_1); + __PYX_ERR(0, 133, __pyx_L1_error) + } + *__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_3, __pyx_pybuffernd_mask.diminfo[1].strides) = 1.0; + + /* "SAR_GEO.pyx":132 + * temp_row=int(floor(rlist[i])) + * temp_col=int(floor(clist[i])) + * if temp_row>=0 and temp_col>=0 and temp_row=0 and temp_col>=0 and temp_rowpybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rlist.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.gereratorMask", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_clist.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rlist.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7SAR_GEO_5gereratorMask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_7SAR_GEO_5gereratorMask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyArrayObject *__pyx_v_rlist = 0; + PyArrayObject *__pyx_v_clist = 0; + PyArrayObject *__pyx_v_mask = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("gereratorMask (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rlist,&__pyx_n_s_clist,&__pyx_n_s_mask,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rlist)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_clist)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gereratorMask", 1, 3, 3, 1); __PYX_ERR(0, 99, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("gereratorMask", 1, 3, 3, 2); __PYX_ERR(0, 99, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gereratorMask") < 0)) __PYX_ERR(0, 99, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_rlist = ((PyArrayObject *)values[0]); + __pyx_v_clist = ((PyArrayObject *)values[1]); + __pyx_v_mask = ((PyArrayObject *)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("gereratorMask", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 99, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("SAR_GEO.gereratorMask", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rlist), __pyx_ptype_5numpy_ndarray, 1, "rlist", 0))) __PYX_ERR(0, 99, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_clist), __pyx_ptype_5numpy_ndarray, 1, "clist", 0))) __PYX_ERR(0, 99, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_r = __pyx_pf_7SAR_GEO_4gereratorMask(__pyx_self, __pyx_v_rlist, __pyx_v_clist, __pyx_v_mask); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7SAR_GEO_4gereratorMask(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_rlist, PyArrayObject *__pyx_v_clist, PyArrayObject *__pyx_v_mask) { + __Pyx_LocalBuf_ND __pyx_pybuffernd_clist; + __Pyx_Buffer __pyx_pybuffer_clist; + __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; + __Pyx_Buffer __pyx_pybuffer_mask; + __Pyx_LocalBuf_ND __pyx_pybuffernd_rlist; + __Pyx_Buffer __pyx_pybuffer_rlist; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("gereratorMask", 0); + __pyx_pybuffer_rlist.pybuffer.buf = NULL; + __pyx_pybuffer_rlist.refcount = 0; + __pyx_pybuffernd_rlist.data = NULL; + __pyx_pybuffernd_rlist.rcbuffer = &__pyx_pybuffer_rlist; + __pyx_pybuffer_clist.pybuffer.buf = NULL; + __pyx_pybuffer_clist.refcount = 0; + __pyx_pybuffernd_clist.data = NULL; + __pyx_pybuffernd_clist.rcbuffer = &__pyx_pybuffer_clist; + __pyx_pybuffer_mask.pybuffer.buf = NULL; + __pyx_pybuffer_mask.refcount = 0; + __pyx_pybuffernd_mask.data = NULL; + __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rlist.rcbuffer->pybuffer, (PyObject*)__pyx_v_rlist, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 99, __pyx_L1_error) + } + __pyx_pybuffernd_rlist.diminfo[0].strides = __pyx_pybuffernd_rlist.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rlist.diminfo[0].shape = __pyx_pybuffernd_rlist.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_clist.rcbuffer->pybuffer, (PyObject*)__pyx_v_clist, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 99, __pyx_L1_error) + } + __pyx_pybuffernd_clist.diminfo[0].strides = __pyx_pybuffernd_clist.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_clist.diminfo[0].shape = __pyx_pybuffernd_clist.rcbuffer->pybuffer.shape[0]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 99, __pyx_L1_error) + } + __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_7SAR_GEO_gereratorMask(__pyx_v_rlist, __pyx_v_clist, __pyx_v_mask, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_clist.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rlist.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.gereratorMask", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_clist.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rlist.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "SAR_GEO.pyx":139 + * + * + * cdef double distance_powe(Point p1,Point p2): # <<<<<<<<<<<<<< + * return (p1.x-p2.x)**2+(p1.y-p2.y)**2 + * + */ + +static double __pyx_f_7SAR_GEO_distance_powe(struct __pyx_t_7SAR_GEO_Point __pyx_v_p1, struct __pyx_t_7SAR_GEO_Point __pyx_v_p2) { + double __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("distance_powe", 0); + + /* "SAR_GEO.pyx":140 + * + * cdef double distance_powe(Point p1,Point p2): + * return (p1.x-p2.x)**2+(p1.y-p2.y)**2 # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = (pow((__pyx_v_p1.x - __pyx_v_p2.x), 2.0) + pow((__pyx_v_p1.y - __pyx_v_p2.y), 2.0)); + goto __pyx_L0; + + /* "SAR_GEO.pyx":139 + * + * + * cdef double distance_powe(Point p1,Point p2): # <<<<<<<<<<<<<< + * return (p1.x-p2.x)**2+(p1.y-p2.y)**2 + * + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "SAR_GEO.pyx":149 + * + * + * cpdef np.ndarray[int,ndim=2] get_r_c(np.ndarray[double,ndim=3] ori2geo,np.ndarray[double,ndim=2] lon_lat): # <<<<<<<<<<<<<< + * cdef int p_count=lon_lat.shape[0] + * cdef int height=ori2geo.shape[1] + */ + +static PyObject *__pyx_pw_7SAR_GEO_7get_r_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_get_r_c(PyArrayObject *__pyx_v_ori2geo, PyArrayObject *__pyx_v_lon_lat, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_p_count; + CYTHON_UNUSED int __pyx_v_height; + CYTHON_UNUSED int __pyx_v_width; + CYTHON_UNUSED int __pyx_v_i; + CYTHON_UNUSED int __pyx_v_j; + int __pyx_v_c; + CYTHON_UNUSED double __pyx_v_dist; + CYTHON_UNUSED double __pyx_v_temp_dist; + struct __pyx_t_7SAR_GEO_Point __pyx_v_p1; + struct __pyx_t_7SAR_GEO_Point __pyx_v_p2; + CYTHON_UNUSED PyArrayObject *__pyx_v_result = 0; + double __pyx_v_min_lon; + double __pyx_v_max_lon; + double __pyx_v_min_lat; + double __pyx_v_max_lat; + __Pyx_LocalBuf_ND __pyx_pybuffernd_lon_lat; + __Pyx_Buffer __pyx_pybuffer_lon_lat; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ori2geo; + __Pyx_Buffer __pyx_pybuffer_ori2geo; + __Pyx_LocalBuf_ND __pyx_pybuffernd_result; + __Pyx_Buffer __pyx_pybuffer_result; + PyArrayObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyArrayObject *__pyx_t_5 = NULL; + double __pyx_t_6; + int __pyx_t_7; + Py_ssize_t __pyx_t_8; + Py_ssize_t __pyx_t_9; + int __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_r_c", 0); + __pyx_pybuffer_result.pybuffer.buf = NULL; + __pyx_pybuffer_result.refcount = 0; + __pyx_pybuffernd_result.data = NULL; + __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result; + __pyx_pybuffer_ori2geo.pybuffer.buf = NULL; + __pyx_pybuffer_ori2geo.refcount = 0; + __pyx_pybuffernd_ori2geo.data = NULL; + __pyx_pybuffernd_ori2geo.rcbuffer = &__pyx_pybuffer_ori2geo; + __pyx_pybuffer_lon_lat.pybuffer.buf = NULL; + __pyx_pybuffer_lon_lat.refcount = 0; + __pyx_pybuffernd_lon_lat.data = NULL; + __pyx_pybuffernd_lon_lat.rcbuffer = &__pyx_pybuffer_lon_lat; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ori2geo.rcbuffer->pybuffer, (PyObject*)__pyx_v_ori2geo, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 149, __pyx_L1_error) + } + __pyx_pybuffernd_ori2geo.diminfo[0].strides = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ori2geo.diminfo[0].shape = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ori2geo.diminfo[1].strides = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ori2geo.diminfo[1].shape = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_ori2geo.diminfo[2].strides = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_ori2geo.diminfo[2].shape = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.shape[2]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lon_lat.rcbuffer->pybuffer, (PyObject*)__pyx_v_lon_lat, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 149, __pyx_L1_error) + } + __pyx_pybuffernd_lon_lat.diminfo[0].strides = __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lon_lat.diminfo[0].shape = __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_lon_lat.diminfo[1].strides = __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_lon_lat.diminfo[1].shape = __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.shape[1]; + + /* "SAR_GEO.pyx":150 + * + * cpdef np.ndarray[int,ndim=2] get_r_c(np.ndarray[double,ndim=3] ori2geo,np.ndarray[double,ndim=2] lon_lat): + * cdef int p_count=lon_lat.shape[0] # <<<<<<<<<<<<<< + * cdef int height=ori2geo.shape[1] + * cdef int width=ori2geo.shape[2] + */ + __pyx_v_p_count = (__pyx_v_lon_lat->dimensions[0]); + + /* "SAR_GEO.pyx":151 + * cpdef np.ndarray[int,ndim=2] get_r_c(np.ndarray[double,ndim=3] ori2geo,np.ndarray[double,ndim=2] lon_lat): + * cdef int p_count=lon_lat.shape[0] + * cdef int height=ori2geo.shape[1] # <<<<<<<<<<<<<< + * cdef int width=ori2geo.shape[2] + * cdef int i=0 + */ + __pyx_v_height = (__pyx_v_ori2geo->dimensions[1]); + + /* "SAR_GEO.pyx":152 + * cdef int p_count=lon_lat.shape[0] + * cdef int height=ori2geo.shape[1] + * cdef int width=ori2geo.shape[2] # <<<<<<<<<<<<<< + * cdef int i=0 + * cdef int j=0 + */ + __pyx_v_width = (__pyx_v_ori2geo->dimensions[2]); + + /* "SAR_GEO.pyx":153 + * cdef int height=ori2geo.shape[1] + * cdef int width=ori2geo.shape[2] + * cdef int i=0 # <<<<<<<<<<<<<< + * cdef int j=0 + * cdef int c=0 + */ + __pyx_v_i = 0; + + /* "SAR_GEO.pyx":154 + * cdef int width=ori2geo.shape[2] + * cdef int i=0 + * cdef int j=0 # <<<<<<<<<<<<<< + * cdef int c=0 + * cdef double dist=999 + */ + __pyx_v_j = 0; + + /* "SAR_GEO.pyx":155 + * cdef int i=0 + * cdef int j=0 + * cdef int c=0 # <<<<<<<<<<<<<< + * cdef double dist=999 + * cdef double temp_dist=0 + */ + __pyx_v_c = 0; + + /* "SAR_GEO.pyx":156 + * cdef int j=0 + * cdef int c=0 + * cdef double dist=999 # <<<<<<<<<<<<<< + * cdef double temp_dist=0 + * cdef Point p1 + */ + __pyx_v_dist = 999.0; + + /* "SAR_GEO.pyx":157 + * cdef int c=0 + * cdef double dist=999 + * cdef double temp_dist=0 # <<<<<<<<<<<<<< + * cdef Point p1 + * cdef Point p2 + */ + __pyx_v_temp_dist = 0.0; + + /* "SAR_GEO.pyx":162 + * cdef int min_i + * cdef int min_j + * cdef np.ndarray[double,ndim=2] result=np.ones((p_count,2))*-1 # <<<<<<<<<<<<<< + * + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ones); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_p_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_INCREF(__pyx_int_2); + __Pyx_GIVEREF(__pyx_int_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2); + __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_int_neg_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_5 = ((PyArrayObject *)__pyx_t_3); + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { + __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL; + __PYX_ERR(0, 162, __pyx_L1_error) + } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1]; + } + } + __pyx_t_5 = 0; + __pyx_v_result = ((PyArrayObject *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "SAR_GEO.pyx":166 + * + * # + * cdef double min_lon=np.min(ori2geo[0,:,:]) # <<<<<<<<<<<<<< + * cdef double max_lon=np.max(ori2geo[0,:,:]) + * cdef double min_lat=np.min(ori2geo[1,:,:]) + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_min); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_ori2geo), __pyx_tuple__2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_min_lon = __pyx_t_6; + + /* "SAR_GEO.pyx":167 + * # + * cdef double min_lon=np.min(ori2geo[0,:,:]) + * cdef double max_lon=np.max(ori2geo[0,:,:]) # <<<<<<<<<<<<<< + * cdef double min_lat=np.min(ori2geo[1,:,:]) + * cdef double max_lat=np.max(ori2geo[1,:,:]) + */ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_ori2geo), __pyx_tuple__2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_max_lon = __pyx_t_6; + + /* "SAR_GEO.pyx":168 + * cdef double min_lon=np.min(ori2geo[0,:,:]) + * cdef double max_lon=np.max(ori2geo[0,:,:]) + * cdef double min_lat=np.min(ori2geo[1,:,:]) # <<<<<<<<<<<<<< + * cdef double max_lat=np.max(ori2geo[1,:,:]) + * while cp1.x or max_lonmax_lat: + */ + __pyx_t_8 = __pyx_v_c; + __pyx_t_9 = 0; + __pyx_t_10 = -1; + if (__pyx_t_8 < 0) { + __pyx_t_8 += __pyx_pybuffernd_lon_lat.diminfo[0].shape; + if (unlikely(__pyx_t_8 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_lon_lat.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_9 < 0) { + __pyx_t_9 += __pyx_pybuffernd_lon_lat.diminfo[1].shape; + if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_lon_lat.diminfo[1].shape)) __pyx_t_10 = 1; + if (unlikely(__pyx_t_10 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_10); + __PYX_ERR(0, 171, __pyx_L1_error) + } + __pyx_v_p1.x = (*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_lon_lat.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_lon_lat.diminfo[1].strides)); + + /* "SAR_GEO.pyx":172 + * while cp1.x or max_lonmax_lat: + * continue + */ + __pyx_t_9 = __pyx_v_c; + __pyx_t_8 = 1; + __pyx_t_10 = -1; + if (__pyx_t_9 < 0) { + __pyx_t_9 += __pyx_pybuffernd_lon_lat.diminfo[0].shape; + if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0; + } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_lon_lat.diminfo[0].shape)) __pyx_t_10 = 0; + if (__pyx_t_8 < 0) { + __pyx_t_8 += __pyx_pybuffernd_lon_lat.diminfo[1].shape; + if (unlikely(__pyx_t_8 < 0)) __pyx_t_10 = 1; + } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_lon_lat.diminfo[1].shape)) __pyx_t_10 = 1; + if (unlikely(__pyx_t_10 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_10); + __PYX_ERR(0, 172, __pyx_L1_error) + } + __pyx_v_p1.y = (*__Pyx_BufPtrStrided2d(double *, __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_lon_lat.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_lon_lat.diminfo[1].strides)); + + /* "SAR_GEO.pyx":173 + * p1.x=lon_lat[c,0] + * p1.y=lon_lat[c,1] + * if min_lon>p1.x or max_lonmax_lat: # <<<<<<<<<<<<<< + * continue + * c=c+1 + */ + __pyx_t_11 = ((__pyx_v_min_lon > __pyx_v_p1.x) != 0); + if (!__pyx_t_11) { + } else { + __pyx_t_7 = __pyx_t_11; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_11 = ((__pyx_v_max_lon < __pyx_v_p1.x) != 0); + if (!__pyx_t_11) { + } else { + __pyx_t_7 = __pyx_t_11; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_11 = ((__pyx_v_p2.y < __pyx_v_min_lat) != 0); + if (!__pyx_t_11) { + } else { + __pyx_t_7 = __pyx_t_11; + goto __pyx_L6_bool_binop_done; + } + __pyx_t_11 = ((__pyx_v_p2.y > __pyx_v_max_lat) != 0); + __pyx_t_7 = __pyx_t_11; + __pyx_L6_bool_binop_done:; + if (__pyx_t_7) { + + /* "SAR_GEO.pyx":174 + * p1.y=lon_lat[c,1] + * if min_lon>p1.x or max_lonmax_lat: + * continue # <<<<<<<<<<<<<< + * c=c+1 + * + */ + goto __pyx_L3_continue; + + /* "SAR_GEO.pyx":173 + * p1.x=lon_lat[c,0] + * p1.y=lon_lat[c,1] + * if min_lon>p1.x or max_lonmax_lat: # <<<<<<<<<<<<<< + * continue + * c=c+1 + */ + } + + /* "SAR_GEO.pyx":175 + * if min_lon>p1.x or max_lonmax_lat: + * continue + * c=c+1 # <<<<<<<<<<<<<< + * + * + */ + __pyx_v_c = (__pyx_v_c + 1); + __pyx_L3_continue:; + } + + /* "SAR_GEO.pyx":149 + * + * + * cpdef np.ndarray[int,ndim=2] get_r_c(np.ndarray[double,ndim=3] ori2geo,np.ndarray[double,ndim=2] lon_lat): # <<<<<<<<<<<<<< + * cdef int p_count=lon_lat.shape[0] + * cdef int height=ori2geo.shape[1] + */ + + /* function exit code */ + __pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lon_lat.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.get_r_c", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lon_lat.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XDECREF((PyObject *)__pyx_v_result); + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7SAR_GEO_7get_r_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_7SAR_GEO_7get_r_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyArrayObject *__pyx_v_ori2geo = 0; + PyArrayObject *__pyx_v_lon_lat = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_r_c (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ori2geo,&__pyx_n_s_lon_lat,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ori2geo)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lon_lat)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("get_r_c", 1, 2, 2, 1); __PYX_ERR(0, 149, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_r_c") < 0)) __PYX_ERR(0, 149, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_ori2geo = ((PyArrayObject *)values[0]); + __pyx_v_lon_lat = ((PyArrayObject *)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_r_c", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 149, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("SAR_GEO.get_r_c", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ori2geo), __pyx_ptype_5numpy_ndarray, 1, "ori2geo", 0))) __PYX_ERR(0, 149, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lon_lat), __pyx_ptype_5numpy_ndarray, 1, "lon_lat", 0))) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_r = __pyx_pf_7SAR_GEO_6get_r_c(__pyx_self, __pyx_v_ori2geo, __pyx_v_lon_lat); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7SAR_GEO_6get_r_c(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_ori2geo, PyArrayObject *__pyx_v_lon_lat) { + __Pyx_LocalBuf_ND __pyx_pybuffernd_lon_lat; + __Pyx_Buffer __pyx_pybuffer_lon_lat; + __Pyx_LocalBuf_ND __pyx_pybuffernd_ori2geo; + __Pyx_Buffer __pyx_pybuffer_ori2geo; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_r_c", 0); + __pyx_pybuffer_ori2geo.pybuffer.buf = NULL; + __pyx_pybuffer_ori2geo.refcount = 0; + __pyx_pybuffernd_ori2geo.data = NULL; + __pyx_pybuffernd_ori2geo.rcbuffer = &__pyx_pybuffer_ori2geo; + __pyx_pybuffer_lon_lat.pybuffer.buf = NULL; + __pyx_pybuffer_lon_lat.refcount = 0; + __pyx_pybuffernd_lon_lat.data = NULL; + __pyx_pybuffernd_lon_lat.rcbuffer = &__pyx_pybuffer_lon_lat; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ori2geo.rcbuffer->pybuffer, (PyObject*)__pyx_v_ori2geo, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 149, __pyx_L1_error) + } + __pyx_pybuffernd_ori2geo.diminfo[0].strides = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ori2geo.diminfo[0].shape = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ori2geo.diminfo[1].strides = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ori2geo.diminfo[1].shape = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_ori2geo.diminfo[2].strides = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_ori2geo.diminfo[2].shape = __pyx_pybuffernd_ori2geo.rcbuffer->pybuffer.shape[2]; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lon_lat.rcbuffer->pybuffer, (PyObject*)__pyx_v_lon_lat, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 149, __pyx_L1_error) + } + __pyx_pybuffernd_lon_lat.diminfo[0].strides = __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lon_lat.diminfo[0].shape = __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_lon_lat.diminfo[1].strides = __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_lon_lat.diminfo[1].shape = __pyx_pybuffernd_lon_lat.rcbuffer->pybuffer.shape[1]; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_7SAR_GEO_get_r_c(__pyx_v_ori2geo, __pyx_v_lon_lat, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lon_lat.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.get_r_c", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lon_lat.rcbuffer->pybuffer); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ori2geo.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "SAR_GEO.pyx":188 + * + * # + * cpdef np.ndarray[double,ndim=2] Add(np.ndarray[double,ndim=2] a,double x): # <<<<<<<<<<<<<< + * cdef double d=0; # cython bool + * print("") + */ + +static PyObject *__pyx_pw_7SAR_GEO_9Add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyArrayObject *__pyx_f_7SAR_GEO_Add(PyArrayObject *__pyx_v_a, double __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) { + CYTHON_UNUSED double __pyx_v_d; + __Pyx_LocalBuf_ND __pyx_pybuffernd_a; + __Pyx_Buffer __pyx_pybuffer_a; + PyArrayObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("Add", 0); + __pyx_pybuffer_a.pybuffer.buf = NULL; + __pyx_pybuffer_a.refcount = 0; + __pyx_pybuffernd_a.data = NULL; + __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 188, __pyx_L1_error) + } + __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_a.diminfo[1].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_a.diminfo[1].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[1]; + + /* "SAR_GEO.pyx":189 + * # + * cpdef np.ndarray[double,ndim=2] Add(np.ndarray[double,ndim=2] a,double x): + * cdef double d=0; # cython bool # <<<<<<<<<<<<<< + * print("") + * print(a) + */ + __pyx_v_d = 0.0; + + /* "SAR_GEO.pyx":190 + * cpdef np.ndarray[double,ndim=2] Add(np.ndarray[double,ndim=2] a,double x): + * cdef double d=0; # cython bool + * print("") # <<<<<<<<<<<<<< + * print(a) + * print(x) + */ + if (__Pyx_PrintOne(0, __pyx_kp_s__4) < 0) __PYX_ERR(0, 190, __pyx_L1_error) + + /* "SAR_GEO.pyx":191 + * cdef double d=0; # cython bool + * print("") + * print(a) # <<<<<<<<<<<<<< + * print(x) + * return a+x + */ + if (__Pyx_PrintOne(0, ((PyObject *)__pyx_v_a)) < 0) __PYX_ERR(0, 191, __pyx_L1_error) + + /* "SAR_GEO.pyx":192 + * print("") + * print(a) + * print(x) # <<<<<<<<<<<<<< + * return a+x + * + */ + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "SAR_GEO.pyx":193 + * print(a) + * print(x) + * return a+x # <<<<<<<<<<<<<< + * + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_a), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_r = ((PyArrayObject *)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "SAR_GEO.pyx":188 + * + * # + * cpdef np.ndarray[double,ndim=2] Add(np.ndarray[double,ndim=2] a,double x): # <<<<<<<<<<<<<< + * cdef double d=0; # cython bool + * print("") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.Add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF((PyObject *)__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7SAR_GEO_9Add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_7SAR_GEO_9Add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyArrayObject *__pyx_v_a = 0; + double __pyx_v_x; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Add (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_x,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, 1); __PYX_ERR(0, 188, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add") < 0)) __PYX_ERR(0, 188, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_a = ((PyArrayObject *)values[0]); + __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("Add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 188, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("SAR_GEO.Add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_r = __pyx_pf_7SAR_GEO_8Add(__pyx_self, __pyx_v_a, __pyx_v_x); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7SAR_GEO_8Add(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, double __pyx_v_x) { + __Pyx_LocalBuf_ND __pyx_pybuffernd_a; + __Pyx_Buffer __pyx_pybuffer_a; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("Add", 0); + __pyx_pybuffer_a.pybuffer.buf = NULL; + __pyx_pybuffer_a.refcount = 0; + __pyx_pybuffernd_a.data = NULL; + __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a; + { + __Pyx_BufFmt_StackElem __pyx_stack[1]; + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 188, __pyx_L1_error) + } + __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_a.diminfo[1].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_a.diminfo[1].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[1]; + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_7SAR_GEO_Add(__pyx_v_a, __pyx_v_x, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); + __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} + __Pyx_AddTraceback("SAR_GEO.Add", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + goto __pyx_L2; + __pyx_L0:; + __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer); + __pyx_L2:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":736 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew2(a, b): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(1, a) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":739 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(2, a, b) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":742 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(3, a, b, c) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":745 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(4, a, b, c, d) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":748 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); + if (__pyx_t_1) { + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":752 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< + * else: + * return () + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); + __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< + * return d.subarray.shape + * else: + */ + } + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":754 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< + * + * + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_empty_tuple); + __pyx_r = __pyx_empty_tuple; + goto __pyx_L0; + } + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + +static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_array_base", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":932 + * + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) + * + */ + Py_INCREF(__pyx_v_base); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":933 + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< + * + * cdef inline object get_array_base(ndarray arr): + */ + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":931 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + +static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":936 + * + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: + * return None + */ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":938 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< + * return base + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":937 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + } + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":939 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< + * + * # Versions of the import_* functions which are more suitable for + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":935 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_array", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":945 + * cdef inline int import_array() except -1: + * try: + * __pyx_import_array() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") + */ + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 945, __pyx_L3_error) + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":946 + * try: + * __pyx_import_array() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.multiarray failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 946, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":947 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_umath() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 947, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 947, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":944 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< + * __pyx_import_array() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":943 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< + * try: + * __pyx_import_array() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_umath", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":951 + * cdef inline int import_umath() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 951, __pyx_L3_error) + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":952 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 952, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":953 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef inline int import_ufunc() except -1: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 953, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 953, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":950 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":949 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + +static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_ufunc", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_1); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":957 + * cdef inline int import_ufunc() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< + * except Exception: + * raise ImportError("numpy.core.umath failed to import") + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 957, __pyx_L3_error) + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + } + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L8_try_end; + __pyx_L3_error:; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":958 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< + * raise ImportError("numpy.core.umath failed to import") + * + */ + __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); + if (__pyx_t_4) { + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 958, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":959 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< + * + * cdef extern from *: + */ + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 959, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_Raise(__pyx_t_8, 0, 0, 0); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __PYX_ERR(1, 959, __pyx_L5_except_error) + } + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":956 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< + * _import_umath() + * except Exception: + */ + __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + goto __pyx_L1_error; + __pyx_L8_try_end:; + } + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":955 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< + * try: + * _import_umath() + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":969 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` + */ + +static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_timedelta64_object", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":981 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":969 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.timedelta64)` + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":984 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` + */ + +static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_datetime64_object", 0); + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":996 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":984 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< + * """ + * Cython equivalent of `isinstance(obj, np.datetime64)` + */ + + /* function exit code */ + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":999 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object + */ + +static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { + npy_datetime __pyx_r; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1006 + * also needed. That can be found using `get_datetime64_unit`. + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":999 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy datetime64 object + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1009 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object + */ + +static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { + npy_timedelta __pyx_r; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1013 + * returns the int64 value underlying scalar numpy timedelta64 object + * """ + * return (obj).obval # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1009 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the int64 value underlying scalar numpy timedelta64 object + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + +static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { + NPY_DATETIMEUNIT __pyx_r; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1020 + * returns the unit part of the dtype for a numpy datetime64 object. + * """ + * return (obj).obmeta.base # <<<<<<<<<<<<<< + */ + __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); + goto __pyx_L0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +static PyMethodDef __pyx_methods[] = { + {"insert_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7SAR_GEO_1insert_data, METH_VARARGS|METH_KEYWORDS, 0}, + {"cut_L1A_img", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7SAR_GEO_3cut_L1A_img, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7SAR_GEO_2cut_L1A_img}, + {"gereratorMask", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7SAR_GEO_5gereratorMask, METH_VARARGS|METH_KEYWORDS, 0}, + {"get_r_c", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7SAR_GEO_7get_r_c, METH_VARARGS|METH_KEYWORDS, 0}, + {"Add", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7SAR_GEO_9Add, METH_VARARGS|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_SAR_GEO(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_SAR_GEO}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "SAR_GEO", + 0, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, + {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0}, + {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_clist, __pyx_k_clist, sizeof(__pyx_k_clist), 0, 0, 1, 1}, + {&__pyx_n_s_col_ids, __pyx_k_col_ids, sizeof(__pyx_k_col_ids), 0, 0, 1, 1}, + {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, + {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, + {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, + {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, + {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1}, + {&__pyx_n_s_griddata, __pyx_k_griddata, sizeof(__pyx_k_griddata), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_lon_lat, __pyx_k_lon_lat, sizeof(__pyx_k_lon_lat), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, + {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1}, + {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 1, 1}, + {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, + {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, + {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, + {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, + {&__pyx_n_s_ones, __pyx_k_ones, sizeof(__pyx_k_ones), 0, 0, 1, 1}, + {&__pyx_n_s_ori2geo, __pyx_k_ori2geo, sizeof(__pyx_k_ori2geo), 0, 0, 1, 1}, + {&__pyx_n_s_ori2geo_img, __pyx_k_ori2geo_img, sizeof(__pyx_k_ori2geo_img), 0, 0, 1, 1}, + {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, + {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, + {&__pyx_n_s_rlist, __pyx_k_rlist, sizeof(__pyx_k_rlist), 0, 0, 1, 1}, + {&__pyx_n_s_roi_list, __pyx_k_roi_list, sizeof(__pyx_k_roi_list), 0, 0, 1, 1}, + {&__pyx_n_s_row_ids, __pyx_k_row_ids, sizeof(__pyx_k_row_ids), 0, 0, 1, 1}, + {&__pyx_n_s_scipy_interpolate, __pyx_k_scipy_interpolate, sizeof(__pyx_k_scipy_interpolate), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, + {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 947, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "SAR_GEO.pyx":166 + * + * # + * cdef double min_lon=np.min(ori2geo[0,:,:]) # <<<<<<<<<<<<<< + * cdef double max_lon=np.max(ori2geo[0,:,:]) + * cdef double min_lat=np.min(ori2geo[1,:,:]) + */ + __pyx_slice_ = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice_)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice_); + __Pyx_GIVEREF(__pyx_slice_); + __pyx_tuple__2 = PyTuple_Pack(3, __pyx_int_0, __pyx_slice_, __pyx_slice_); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "SAR_GEO.pyx":168 + * cdef double min_lon=np.min(ori2geo[0,:,:]) + * cdef double max_lon=np.max(ori2geo[0,:,:]) + * cdef double min_lat=np.min(ori2geo[1,:,:]) # <<<<<<<<<<<<<< + * cdef double max_lat=np.max(ori2geo[1,:,:]) + * while c= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_SAR_GEO(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'SAR_GEO' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_SAR_GEO(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + PyEval_InitThreads(); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("SAR_GEO", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_b); + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_SAR_GEO) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "SAR_GEO")) { + if (unlikely(PyDict_SetItemString(modules, "SAR_GEO", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + (void)__Pyx_modinit_type_init_code(); + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "SAR_GEO.pyx":1 + * import os # <<<<<<<<<<<<<< + * cimport cython # + * import numpy as np##cpythonnp + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "SAR_GEO.pyx":3 + * import os + * cimport cython # + * import numpy as np##cpythonnp # <<<<<<<<<<<<<< + * cimport numpy as np # cpythonnp + * from libc.math cimport pi,ceil,floor + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "SAR_GEO.pyx":6 + * cimport numpy as np # cpythonnp + * from libc.math cimport pi,ceil,floor + * from scipy.interpolate import griddata # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_griddata); + __Pyx_GIVEREF(__pyx_n_s_griddata); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_griddata); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_scipy_interpolate, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_griddata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_griddata, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "SAR_GEO.pyx":1 + * import os # <<<<<<<<<<<<<< + * cimport cython # + * import numpy as np##cpythonnp + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "../../../../../Anaconda/envs/micro/lib/site-packages/numpy/__init__.pxd":1016 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< + * """ + * returns the unit part of the dtype for a numpy datetime64 object. + */ + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init SAR_GEO", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init SAR_GEO"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* IsLittleEndian */ +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } S; + S.u32 = 0x01020304; + return S.u8[0] == 4; +} + +/* BufferFormatCheck */ +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t <= '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case '?': return "'bool'"; + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparseable format string"; + } +} +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + #ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + #endif + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +#endif +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + __Pyx_StructField* field = ctx->head->field; + __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + if (ctx->enc_type == 0) return 0; + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + __Pyx_StructField* field = ctx->head->field; + __Pyx_TypeInfo* type = field->type; + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + --ctx->enc_count; + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} +static PyObject * +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number, ndim; + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ndim = ctx->head->field->type->ndim; + while (*ts && *ts != ')') { + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; + } + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) + return PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + if (*ts != ',' && *ts != ')') + return PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + if (*ts == ',') ts++; + i++; + } + if (i != ndim) + return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return NULL; + } + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return Py_None; +} +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + while (1) { + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; + if (alignment && ctx->fmt_offset % alignment) { + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + CYTHON_FALLTHROUGH; + case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && + (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + CYTHON_FALLTHROUGH; + case 's': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} + +/* BufferGetAndValidate */ + static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + if (unlikely(info->buf == NULL)) return; + if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; + __Pyx_ReleaseBuffer(info); +} +static void __Pyx_ZeroBuffer(Py_buffer* buf) { + buf->buf = NULL; + buf->obj = NULL; + buf->strides = __Pyx_zeros; + buf->shape = __Pyx_zeros; + buf->suboffsets = __Pyx_minusones; +} +static int __Pyx__GetBufferAndValidate( + Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, + int nd, int cast, __Pyx_BufFmt_StackElem* stack) +{ + buf->buf = NULL; + if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) { + __Pyx_ZeroBuffer(buf); + return -1; + } + if (unlikely(buf->ndim != nd)) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + nd, buf->ndim); + goto fail; + } + if (!cast) { + __Pyx_BufFmt_Context ctx; + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + } + if (unlikely((size_t)buf->itemsize != dtype->size)) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", + buf->itemsize, (buf->itemsize > 1) ? "s" : "", + dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); + goto fail; + } + if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; + return 0; +fail:; + __Pyx_SafeReleaseBuffer(buf); + return -1; +} + +/* BufferIndexError */ + static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +/* PyErrFetchRestore */ + #if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* WriteUnraisableException */ + static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback, CYTHON_UNUSED int nogil) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_PyThreadState_declare +#ifdef WITH_THREAD + PyGILState_STATE state; + if (nogil) + state = PyGILState_Ensure(); +#ifdef _MSC_VER + else state = (PyGILState_STATE)-1; +#endif +#endif + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +#ifdef WITH_THREAD + if (nogil) + PyGILState_Release(state); +#endif +} + +/* RaiseArgTupleInvalid */ + static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* RaiseDoubleKeywords */ + static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ + static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* ArgTypeTest */ + static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* PyObjectGetAttrStr */ + #if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ + static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* PyDictVersioning */ + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ + #if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectCall */ + #if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* ExtTypeTest */ + static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + +/* PyCFunctionFastCall */ + #if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyFunctionFastCall */ + #if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyObjectCall2Args */ + static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + +/* PyObjectCallMethO */ + #if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallOneArg */ + #if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (__Pyx_PyFastCFunction_Check(func)) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + +/* GetItemInt */ + static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* ObjectGetItem */ + #if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { + PyObject *runerr; + Py_ssize_t key_value; + PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; + if (unlikely(!(m && m->sq_item))) { + PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); + return NULL; + } + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { + PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; + if (likely(m && m->mp_subscript)) { + return m->mp_subscript(obj, key); + } + return __Pyx_PyObject_GetIndex(obj, key); +} +#endif + +/* GetTopmostException */ + #if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ + #if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/* PyErrExceptionMatches */ + #if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/* GetException */ + #if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/* RaiseException */ + #if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* TypeImport */ + #ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* Import */ + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* ImportFrom */ + static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +/* CLineInTraceback */ + #ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ + static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ + #include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +#if PY_MAJOR_VERSION < 3 +static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { + if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); + PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); + return -1; +} +static void __Pyx_ReleaseBuffer(Py_buffer *view) { + PyObject *obj = view->obj; + if (!obj) return; + if (PyObject_CheckBuffer(obj)) { + PyBuffer_Release(view); + return; + } + if ((0)) {} + view->obj = NULL; + Py_DECREF(obj); +} +#endif + + + /* CIntFromPyVerify */ + #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* Print */ + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static PyObject *__Pyx_GetStdout(void) { + PyObject *f = PySys_GetObject((char *)"stdout"); + if (!f) { + PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); + } + return f; +} +static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { + int i; + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { + PyObject* v; + if (PyFile_SoftSpace(f, 1)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + v = PyTuple_GET_ITEM(arg_tuple, i); + if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) + goto error; + if (PyString_Check(v)) { + char *s = PyString_AsString(v); + Py_ssize_t len = PyString_Size(v); + if (len > 0) { + switch (s[len-1]) { + case ' ': break; + case '\f': case '\r': case '\n': case '\t': case '\v': + PyFile_SoftSpace(f, 0); + break; + default: break; + } + } + } + } + if (newline) { + if (PyFile_WriteString("\n", f) < 0) + goto error; + PyFile_SoftSpace(f, 0); + } + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; +} +#else +static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { + PyObject* kwargs = 0; + PyObject* result = 0; + PyObject* end_string; + if (unlikely(!__pyx_print)) { + __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); + if (!__pyx_print) + return -1; + } + if (stream) { + kwargs = PyDict_New(); + if (unlikely(!kwargs)) + return -1; + if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) + goto bad; + if (!newline) { + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + goto bad; + if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + goto bad; + } + Py_DECREF(end_string); + } + } else if (!newline) { + if (unlikely(!__pyx_print_kwargs)) { + __pyx_print_kwargs = PyDict_New(); + if (unlikely(!__pyx_print_kwargs)) + return -1; + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + return -1; + if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + return -1; + } + Py_DECREF(end_string); + } + kwargs = __pyx_print_kwargs; + } + result = PyObject_Call(__pyx_print, arg_tuple, kwargs); + if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) + Py_DECREF(kwargs); + if (!result) + return -1; + Py_DECREF(result); + return 0; +bad: + if (kwargs != __pyx_print_kwargs) + Py_XDECREF(kwargs); + return -1; +} +#endif + +/* Declarations */ + #if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return ::std::complex< float >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + return x + y*(__pyx_t_float_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { + __pyx_t_float_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabsf(b.real) >= fabsf(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + float r = b.imag / b.real; + float s = (float)(1.0) / (b.real + b.imag * r); + return __pyx_t_float_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + float r = b.real / b.imag; + float s = (float)(1.0) / (b.imag + b.real * r); + return __pyx_t_float_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + if (b.imag == 0) { + return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + float denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_float_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { + __pyx_t_float_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrtf(z.real*z.real + z.imag*z.imag); + #else + return hypotf(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { + __pyx_t_float_complex z; + float r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + float denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_float(a, a); + case 3: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, a); + case 4: + z = __Pyx_c_prod_float(a, a); + return __Pyx_c_prod_float(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = powf(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2f(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_float(a); + theta = atan2f(a.imag, a.real); + } + lnr = logf(r); + z_r = expf(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cosf(z_theta); + z.imag = z_r * sinf(z_theta); + return z; + } + #endif +#endif + +/* Declarations */ + #if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return ::std::complex< double >(x, y); + } + #else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + return x + y*(__pyx_t_double_complex)_Complex_I; + } + #endif +#else + static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { + __pyx_t_double_complex z; + z.real = x; + z.imag = y; + return z; + } +#endif + +/* Arithmetic */ + #if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + #if 1 + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs(b.real) >= fabs(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); + } else { + double r = b.imag / b.real; + double s = (double)(1.0) / (b.real + b.imag * r); + return __pyx_t_double_complex_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + double r = b.real / b.imag; + double s = (double)(1.0) / (b.imag + b.real * r); + return __pyx_t_double_complex_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + if (b.imag == 0) { + return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); + } else { + double denom = b.real * b.real + b.imag * b.imag; + return __pyx_t_double_complex_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { + __pyx_t_double_complex z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if 1 + static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt(z.real*z.real + z.imag*z.imag); + #else + return hypot(z.real, z.imag); + #endif + } + static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { + __pyx_t_double_complex z; + double r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + double denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod_double(a, a); + case 3: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, a); + case 4: + z = __Pyx_c_prod_double(a, a); + return __Pyx_c_prod_double(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = pow(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2(0.0, -1.0); + } + } else { + r = __Pyx_c_abs_double(a); + theta = atan2(a.imag, a.real); + } + lnr = log(r); + z_r = exp(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos(z_theta); + z.imag = z_r * sin(z_theta); + return z; + } + #endif +#endif + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +/* CIntFromPy */ + static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* PrintOne */ + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static int __Pyx_PrintOne(PyObject* f, PyObject *o) { + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + if (PyFile_SoftSpace(f, 0)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) + goto error; + if (PyFile_WriteString("\n", f) < 0) + goto error; + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; + /* the line below is just to avoid C compiler + * warnings about unused functions */ + return __Pyx_Print(f, NULL, 0); +} +#else +static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { + int res; + PyObject* arg_tuple = PyTuple_Pack(1, o); + if (unlikely(!arg_tuple)) + return -1; + res = __Pyx_Print(stream, arg_tuple, 1); + Py_DECREF(arg_tuple); + return res; +} +#endif + +/* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntFromPy */ + static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ + #if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; ip) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/tool/algorithm/transforml1a/build/temp.win-amd64-3.8/Release/build/SAR_geo/SAR_GEO.cp38-win_amd64.exp b/tool/algorithm/transforml1a/build/temp.win-amd64-3.8/Release/build/SAR_geo/SAR_GEO.cp38-win_amd64.exp new file mode 100644 index 0000000..ce0cc3b Binary files /dev/null and b/tool/algorithm/transforml1a/build/temp.win-amd64-3.8/Release/build/SAR_geo/SAR_GEO.cp38-win_amd64.exp differ diff --git a/tool/algorithm/transforml1a/build/temp.win-amd64-3.8/Release/build/SAR_geo/SAR_GEO.cp38-win_amd64.lib b/tool/algorithm/transforml1a/build/temp.win-amd64-3.8/Release/build/SAR_geo/SAR_GEO.cp38-win_amd64.lib new file mode 100644 index 0000000..5582029 Binary files /dev/null and b/tool/algorithm/transforml1a/build/temp.win-amd64-3.8/Release/build/SAR_geo/SAR_GEO.cp38-win_amd64.lib differ diff --git a/tool/algorithm/transforml1a/build/temp.win-amd64-3.8/Release/build/SAR_geo/SAR_GEO.obj b/tool/algorithm/transforml1a/build/temp.win-amd64-3.8/Release/build/SAR_geo/SAR_GEO.obj new file mode 100644 index 0000000..d22d27a Binary files /dev/null and b/tool/algorithm/transforml1a/build/temp.win-amd64-3.8/Release/build/SAR_geo/SAR_GEO.obj differ diff --git a/tool/algorithm/transforml1a/setup.py b/tool/algorithm/transforml1a/setup.py new file mode 100644 index 0000000..5183e0c --- /dev/null +++ b/tool/algorithm/transforml1a/setup.py @@ -0,0 +1,45 @@ +from setuptools import setup +from setuptools.extension import Extension +from Cython.Distutils import build_ext +from Cython.Build import cythonize +import numpy +from pathlib import Path +import shutil + + +class MyBuildExt(build_ext): + def run(self): + build_ext.run(self) + + build_dir = Path(self.build_lib) + root_dir = Path(__file__).parent + target_dir = build_dir if not self.inplace else root_dir + + self.copy_file(Path('./SAR_geo') / '__init__.py', root_dir, target_dir) + #self.copy_file(Path('./pkg2') / '__init__.py', root_dir, target_dir) + self.copy_file(Path('.') / '__init__.py', root_dir, target_dir) + def copy_file(self, path, source_dir, destination_dir): + if not (source_dir / path).exists(): + return + shutil.copyfile(str(source_dir / path), str(destination_dir / path)) + +setup( + name="MyModule", + ext_modules=cythonize( + [ + #Extension("pkg1.*", ["root/pkg1/*.py"]), + Extension("pkg2.*", ["./SAR_geo/SAR_GEO.pyx"]), + #Extension("1.*", ["root/*.py"]) + ], + build_dir="build", + compiler_directives=dict( + always_allow_keywords=True + )), + cmdclass=dict( + build_ext=MyBuildExt + ), + packages=[], + include_dirs=[numpy.get_include()], +) + +# 指令: python setup.py build_ext --inplace diff --git a/tool/algorithm/transforml1a/transHandle.py b/tool/algorithm/transforml1a/transHandle.py new file mode 100644 index 0000000..d857f2a --- /dev/null +++ b/tool/algorithm/transforml1a/transHandle.py @@ -0,0 +1,667 @@ +from tool.algorithm.transforml1a import SAR_GEO as SAR_GEO +from tool.algorithm.image import ImageHandle +import numpy as np +import scipy +from scipy.interpolate import griddata, RegularGridInterpolator +import logging +# import pyresample as pr +# 插值模块 +from pyresample.bilinear import NumpyBilinearResampler +from pyresample import geometry +from pyresample.geometry import AreaDefinition +from osgeo import osr +import os +import math + +# os.environ['PROJ_LIB'] = r"D:\Anaconda\envs\micro\Lib\site-packages\osgeo\data\proj" + +logger = logging.getLogger("mylog") + + +############## +# 多项式回归组件 +############## +# +def griddata_geo(points, data, lon_grid, lat_grid, method, i, end_i): + grid_data = griddata(points, data, (lon_grid, lat_grid), method=method, ) + grid_data = grid_data[:, :, 0] + return [i, end_i, grid_data] + + +def griddataBlock(start_x, len_x, start_y, len_y, grid_data_input, grid_x, grid_y, method): + grid_x = grid_x.reshape(-1) + grid_y = grid_y.reshape(-1) + grid_data_input = grid_data_input.reshape(-1) + x_list = np.array(list(range(len_x))) + start_x + y_list = np.array(list(range(len_y))) + start_y + + x_grid, y_grid = np.meshgrid(x_list, y_list) + idx = np.argsort(grid_x) + grid_x = grid_x[idx].reshape(-1) + grid_y = grid_y[idx].reshape(-1) + grid_data_input = grid_data_input[idx].reshape(-1) + interp_func = RegularGridInterpolator((grid_x.reshape(-1), grid_y.reshape(-1)), grid_data_input.reshape(-1), + method='slinear', bounds_error=False, fill_value=np.nan) + grid_data = interp_func((x_grid, y_grid)) + # grid_data = griddata(p, grid_data_input, (x_grid, y_grid), method=method) + grid_data = grid_data[:, :, 0] + return (x_grid, y_grid, grid_data) + + +class polyfit2d_U: + def __init__(self, x, y, z) -> None: + # 定义参数 + + X = np.ones((x.shape[0], 10)) + X[:, 0] = 1 + X[:, 1] = x + X[:, 2] = y + X[:, 3] = x * y + X[:, 4] = x ** 2 + X[:, 5] = y ** 2 + X[:, 6] = x * X[:, 5] + X[:, 7] = y * X[:, 4] + X[:, 8] = x ** 3 + X[:, 9] = y ** 3 + Y = z.reshape(-1, 1) + A = np.matmul(np.matmul(np.linalg.inv(np.matmul(X.T, X)), X.T), Y) + self.paras_fit = A + + def fit(self, x, y): + X = np.ones((x.shape[0], 10)) + X[:, 0] = 1 + X[:, 1] = x + X[:, 2] = y + X[:, 3] = x * y + X[:, 4] = x ** 2 + X[:, 5] = y ** 2 + X[:, 6] = x * X[:, 5] + X[:, 7] = y * X[:, 4] + X[:, 8] = x ** 3 + X[:, 9] = y ** 3 + z = np.matmul(X, self.paras_fit) + return np.sum(z) + + +class TransImgL1A: + def __init__(self, ori_sim_path, roi, l1a_height, l1a_width): + self._begin_r, self._begin_c, self._end_r, self._end_c = 0, 0, 0, 0 + self.ori2geo_img = None + self._mask = None + self.l1a_height = l1a_height + self.l1a_width = l1a_width + self._min_lon, self._max_lon, self._min_lat, self._max_lat = 0, 0, 0, 0 + self.init_trans_para(ori_sim_path, roi) + + def get_roi_points(self): + rowcol = np.where(self._mask == 1) + data = [(self._begin_r + row, self._begin_c + col) for (row, col) in zip(rowcol[0], rowcol[1])] + return data + + def get_lonlat_points(self): + lon = self.ori2geo_img[0, :, :][np.where(self._mask == 1)] + lat = self.ori2geo_img[1, :, :][np.where(self._mask == 1)] + data = [(row, col) for (row, col) in zip(lon, lat)] + return data + + ###################### + # 插值方法 + ###################### + def init_trans_para(self, sim_ori_path, roi): + """裁剪L1a_img --裁剪L1A影像 + --- 修改 ori_sim 变换为 sim_ori + Args: + src_img_path (_type_): 原始L1A影像 + cuted_img_path (_type_): 待裁剪对象 + roi (_type_): 裁剪roi + """ + ori2geo_img_height = ImageHandle.ImageHandler.get_img_height(sim_ori_path) + ori2geo_img_width = ImageHandle.ImageHandler.get_img_width(sim_ori_path) + ori2geo_img = ImageHandle.ImageHandler.get_data(sim_ori_path) + ori2geo_gt = ImageHandle.ImageHandler.get_geotransform(sim_ori_path) + point_list = np.array(roi) + min_lon = np.nanmin(point_list[:, 0]) + max_lon = np.nanmax(point_list[:, 0]) + min_lat = np.nanmin(point_list[:, 1]) + max_lat = np.nanmax(point_list[:, 1]) + self._min_lon, self._max_lon, self._min_lat, self._max_lat = min_lon, max_lon, min_lat, max_lat + # 根据 min_lon max_lon + # 根据 min_lat max_lat + + (x_min, y_min) = ImageHandle.ImageHandler.lat_lon_to_pixel(sim_ori_path, (min_lon, min_lat)) + (x_max, y_max) = ImageHandle.ImageHandler.lat_lon_to_pixel(sim_ori_path, (max_lon, max_lat)) + + xmin = x_min if x_min < x_max else x_max + xmax = x_min if x_min > x_max else x_max + + ymin = y_min if y_min < y_max else y_max + ymax = y_min if y_min > y_max else y_max + + xmin = int(math.floor(xmin)) # 列号 + xmax = int(math.ceil(xmax)) # 因为python 的索引机制 + # xmax = int(math.ceil(xmax)) + 1 # 因为python 的索引机制 + ymin = int(math.floor(ymin)) # 行号 + ymax = int(math.ceil(ymax)) # 因为pytohn的索引机制 + # ymax = int(math.ceil(ymax)) + 1 # 因为pytohn的索引机制 + + # 处理最大最小范围 + xmin = 0 if 0 > xmin else xmin + ymin = 0 if 0 > ymin else ymin + xmax = ori2geo_img_width if ori2geo_img_width > xmax else xmax + ymax = ori2geo_img_height if ori2geo_img_height > ymax else ymax + + # 判断条件 + xmax = xmax + 1 if xmax == xmin else xmax + ymax = ymax + 1 if ymax == ymin else ymax + + if ymax <= ymin or xmax <= xmin or ymax > ori2geo_img_height or xmax > ori2geo_img_width or xmin < 0 or ymin < 0 or xmin > ori2geo_img_width or ymin > ori2geo_img_height or ymax < 0 or xmax < 0: + msg = 'csv_roi:' + str(roi) + 'not in box,please revise csv data!' + print(msg) + else: + r_arr = ori2geo_img[0, ymin:ymax, xmin:xmax] + c_arr = ori2geo_img[1, ymin:ymax, xmin:xmax] + + # 构建坐标矩阵 + ori2geo_mask_r_count = ymax - ymin + ori2geo_mask_c_count = xmax - xmin + + lon_lat_arr = np.ones((2, ori2geo_mask_r_count, ori2geo_mask_c_count)) + col_arr = np.arange(xmin, xmax) * np.ones((ori2geo_mask_r_count, ori2geo_mask_c_count)) + row_arr = ((np.arange(ymin, ymax)) * np.ones((ori2geo_mask_c_count, ori2geo_mask_r_count))).T + + img_geotrans = ori2geo_gt + lon_arr = img_geotrans[0] + img_geotrans[1] * col_arr + img_geotrans[2] * row_arr + lat_arr = img_geotrans[3] + img_geotrans[4] * col_arr + img_geotrans[5] * row_arr + lon_lat_arr[0, :, :] = lon_arr + lon_lat_arr[1, :, :] = lat_arr + + # print("csv_roi:") + # print(roi) + r_min = np.floor(np.nanmin(r_arr)) # 获取 L1A 的行列号范围 + r_max = np.ceil(np.nanmax(r_arr)) + 1 + c_min = np.floor(np.nanmin(c_arr)) + c_max = np.ceil(np.nanmax(c_arr)) + 1 + + # 判断是否越界 + r_min = 0 if r_min < 0 else r_min + r_max = self.l1a_height if r_max > self.l1a_height else r_max + c_min = 0 if c_min < 0 else c_min + c_max = self.l1a_width if c_max > self.l1a_width else c_max + + # 判断条件 + r_max = r_max + 1 if r_min == r_max else r_max + c_max = c_max + 1 if c_min == c_max else c_max + if r_max <= r_min or c_max <= c_min or r_max > self.l1a_height or c_max > self.l1a_width or r_min < 0 or c_min < 0 or c_min > self.l1a_width or r_min > self.l1a_height or r_max < 0 or c_max < 0: + msg = 'csv_roi:' + str(roi) + 'not in box,please revise csv data!' + else: + pass + mask_geo = SAR_GEO.cut_L1A_img(lon_lat_arr, point_list) # 在地理坐标系下裁剪对应影像 + + mask_geo = mask_geo.reshape(-1) + r_arr = r_arr.reshape(-1) + c_arr = c_arr.reshape(-1) + + mask_geo_idx = np.where(mask_geo == 1)[0] + if mask_geo_idx.shape[0] == 0: + msg = 'csv_roi:' + str(roi) + 'not in box,please revise csv data!' + print(msg) + else: + r_idx = r_arr[mask_geo_idx] + c_idx = c_arr[mask_geo_idx] + + r_idx = r_idx - r_min # offset row + c_idx = c_idx - c_min # offset col + r_count = r_max - r_min # 行数 + c_count = c_max - c_min # 列数 + + # + mask_l1a = np.zeros((r_count, c_count)) * np.nan # 创建目标大小的行列号 + mask = SAR_GEO.gereratorMask(r_idx.astype(np.float64), c_idx.astype(np.float64).astype(np.float64), + mask_l1a) # 这个函数修改了 + + self._begin_r = r_min + self._end_r = r_max + self._begin_c = c_min + self._end_c = c_max + self._mask = mask + + def cut_L1A(self, in_path, out_path): + img = ImageHandle.ImageHandler.get_data(in_path) + if len(img.shape) == 3: + cut_img = img[:, self._begin_r:self._end_r, self._begin_c:self._end_c] + cut_img[0, :, :] = cut_img[0, :, :] * self._mask + cut_img[1, :, :] = cut_img[1, :, :] * self._mask + ImageHandle.ImageHandler.write_img(out_path, '', [0, 0, 0, 0, 0, 0], cut_img) + else: + cut_img = img[self._begin_r:self._end_r + 1, self._begin_c:self._end_c + 1] + cut_img[:, :] = cut_img[:, :] * self._mask + cut_img[:, :] = cut_img[:, :] * self._mask + ImageHandle.ImageHandler.write_img(out_path, '', [0, 0, 0, 0, 0, 0], cut_img) + + def grid_interp_to_station(self, all_data, station_lon, station_lat, method='linear'): + ''' + func: 将等经纬度网格值 插值到 离散站点。使用griddata进行插值 + inputs: + all_data,形式为:[grid_lon,grid_lat,data] 即[经度网格,纬度网格,数值网格] + station_lon: 站点经度 + station_lat: 站点纬度。可以是 单个点,列表或者一维数组 + method: 插值方法,默认使用 linear + ''' + station_lon = np.array(station_lon).reshape(-1, 1) + station_lat = np.array(station_lat).reshape(-1, 1) + + lon = all_data[0].reshape(-1, 1) + lat = all_data[1].reshape(-1, 1) + data = all_data[2].reshape(-1, 1) + + points = np.concatenate([lon, lat], axis=1) + + station_value = griddata(points, data, (station_lon, station_lat), method=method) + + station_value = station_value[:, :, 0] + + return station_value + + ##################### + # 当存在 ori2geo.tif + ##################### + + @staticmethod + def cut_L1a_img(src_img_path, cuted_img_path, roi): + """裁剪L1a_img + Args: + src_img_path (_type_): 原始L1A影像 + cuted_img_path (_type_): 待裁剪对象 + roi (_type_): 裁剪roi + """ + ori2geo_img = ImageHandle.ImageHandler.get_data(src_img_path) + point_list = np.array(roi) + # 开始调用组件 计算 + mask = SAR_GEO.cut_L1A_img(ori2geo_img.astype(np.float64), point_list) + # + ori2geo_img[0, :, :] = ori2geo_img[0, :, :] * mask + ori2geo_img[1, :, :] = ori2geo_img[1, :, :] * mask + + ImageHandle.ImageHandler.write_img(cuted_img_path, '', [0, 0, 0, 0, 0, 0], ori2geo_img) + return ori2geo_img # 保存成影像 + + def tran_geo_to_l1a(self, geo_img_path, out_l1a_img_path, ori_sim_img_path, is_class=False): + """裁剪后的有投影信息的影像(cover、ndvi)转换到L1A裁剪影像的尺寸 + Args: + geo_img_path (_type_): _description_ + out_l1a_img_path (_type_): _description_ + ori_sim_img_path (_type_): _description_ + + geo_img_path:地理影像路径 + out_l1a_img_path:转换L1A坐标系图像路径 + ori_sim_img_path:裁剪后模拟影像路径 + is_clss: 是否是 定性类产品 + + """ + inverse_gt = ImageHandle.ImageHandler.get_invgeotransform(geo_img_path) + ori2geo_tif = ImageHandle.ImageHandler.get_data(ori_sim_img_path) + height = ImageHandle.ImageHandler.get_img_height(geo_img_path) + width = ImageHandle.ImageHandler.get_img_width(geo_img_path) + # 计算投影 + x = ori2geo_tif[0, :, :] # lon lat x,y + y = ori2geo_tif[1, :, :] + ori2geo_tif[0, :, :] = inverse_gt[0] + inverse_gt[1] * x + inverse_gt[2] * y # x + ori2geo_tif[1, :, :] = inverse_gt[3] + inverse_gt[4] * x + inverse_gt[5] * y # y + + del x, y + geo_tif = ImageHandle.ImageHandler.get_data(geo_img_path) # 获取目标影像 + ori2geo_tif_shape = ori2geo_tif.shape # height,width + + if is_class: + ori2geo_tif = np.round(ori2geo_tif).astype(np.int32) + mask = (ori2geo_tif[0, :, :] >= 0) & (ori2geo_tif[0, :, :] < width) & (ori2geo_tif[1, :, :] >= 0) & ( + ori2geo_tif[1, :, :] < height) + ori2geo_tif[0, :, :] = ori2geo_tif[0, :, :] * mask + ori2geo_tif[1, :, :] = ori2geo_tif[1, :, :] * mask + geo_tif_shape = geo_tif.shape + geo_tif_l1a = geo_tif[ori2geo_tif[1, :, :].reshape(-1), ori2geo_tif[0, :, :].reshape(-1)].reshape( + ori2geo_tif.shape[1], ori2geo_tif.shape[2]).astype(np.float32) + del ori2geo_tif, geo_tif + one_ids = np.where(mask == False) + geo_tif_l1a[one_ids[0], one_ids[1]] = np.nan + + ImageHandle.ImageHandler.write_img(out_l1a_img_path, '', [0, 0, 0, 0, 0, 0], geo_tif_l1a) + # save_temp_L1A(out_l1a_img_path,geo_tif_l1a) + return geo_tif_l1a + else: # 数值性插值 + mask = (ori2geo_tif[0, :, :] > 0) & (ori2geo_tif[0, :, :] < width - 1) & (ori2geo_tif[1, :, :] > 0) & ( + ori2geo_tif[1, :, :] < height - 1) + one_ids = np.where(mask == 1) + x, y = np.meshgrid(np.arange(0, width), np.arange(0, height)) + result_data = self.grid_interp_to_station([y.reshape(-1), x.reshape(-1), geo_tif.reshape(-1)], + ori2geo_tif[1, one_ids[0], one_ids[1]].reshape(-1), + ori2geo_tif[0, one_ids[0], one_ids[1]].reshape(-1), + method='linear').reshape(-1) + mask = mask.reshape(-1) + result_data_result = np.zeros((ori2geo_tif.shape[1], ori2geo_tif.shape[2])) + result_data_result[:, :] = np.nan + result_data_result = SAR_GEO.insert_data(result_data_result, one_ids[0].astype(np.int32), + one_ids[1].astype(np.int32), result_data) + ImageHandle.ImageHandler.write_img(out_l1a_img_path, '', [0, 0, 0, 0, 0, 0], result_data_result) + # save_temp_L1A(out_l1a_img_path,result_data_result) + return result_data_result + + def tran_lonlats_to_rowcols(self, lonlats, ori_sim_img_path): + """ + 功能:输入经纬度坐标,输出图像行列号 + 函数名称:tran_lonlats_to_rowcols(lonlats,out_rowcols,ori_sim_img_path) + Lonlats:经纬度坐标,示例[[120.53, 31.5], [120.61, 31.5], [120.53, 31.45], [120.61, 31.45]] + out_rowcols:图像行列号,示例[[0, 0], [7000, 0], [7000, 8000], [0, 8000]] + ori_sim_img_path:裁剪后模拟影像路径 + """ + ori2geo_tif = ImageHandle.ImageHandler.get_data(ori_sim_img_path) + min_lon = np.nanmin(ori2geo_tif[0, :, :]) + max_lon = np.nanmax(ori2geo_tif[0, :, :]) + min_lat = np.nanmin(ori2geo_tif[1, :, :]) + max_lat = np.nanmax(ori2geo_tif[1, :, :]) + + result = [] + for i in range(len(lonlats)): + p = lonlats[i] + if min_lon > p[0] or max_lon < p[0] or min_lat > p[1] or max_lat < p[1]: + result.append([-1, -1]) + continue + temp_x = np.square(ori2geo_tif[0, :, :] - p[0]) + np.square(ori2geo_tif[1, :, :] - p[1]) + r_c_list = [] + r_c = np.argmin(temp_x) + r_c = [r_c // temp_x.shape[1], r_c % temp_x.shape[1]] + r_c_list.append([r_c[0], r_c[1], ori2geo_tif[0, r_c[0], r_c[1]], ori2geo_tif[1, r_c[0], r_c[1]]]) + # 插值 + for i in range(r_c[0] - 3, r_c[0] + 3): + if i < 0 or i > temp_x.shape[0] - 1: + continue + for j in range(r_c[1] - 3, r_c[1] + 3): + if j < 0 or j > temp_x.shape[1] - 1: + continue + r_c_list.append([i, j, ori2geo_tif[0, i, j], ori2geo_tif[1, i, j]]) + r_c_list = np.array(r_c_list) + points = r_c_list[:, 2:] + f_r = scipy.interpolate.interp2d(r_c_list[:, 2], r_c_list[:, 3], r_c_list[:, 0], kind='linear') + f_c = scipy.interpolate.interp2d(r_c_list[:, 2], r_c_list[:, 3], r_c_list[:, 1], kind='linear') + tar_get_r = f_r(p[0], p[1])[0] + tar_get_c = f_c(p[0], p[1])[0] + if tar_get_r < ori2geo_tif.shape[1] and tar_get_c < ori2geo_tif.shape[2] and tar_get_r>=0 and tar_get_c>=0: + lon_temp = ori2geo_tif[0, int(round(tar_get_r)), int(round(tar_get_c))] + lon_lat = ori2geo_tif[1, int(round(tar_get_r)), int(round(tar_get_c))] + # 增加条件筛选 + result.append([tar_get_r, tar_get_c]) + else: + result.append([-1, -1]) + return result + + def tran_lonlats_to_L1A_rowcols(self, meas_data, ori_sim_path, row, col): + lonlats = [] + data_roi = [] + rowcols = [] + measdata_list = [] + data_sim = ImageHandle.ImageHandler.get_all_band_array(ori_sim_path) + for data in meas_data: + lon = float(data[1]) + lat = float(data[2]) + if (lon > self._min_lon and lon < self._max_lon and lat > self._min_lat and lat < self._max_lat): + lonlats.append([lon, lat]) + data_roi.append(data) + + for lonlat in lonlats: + (x, y) = ImageHandle.ImageHandler.lat_lon_to_pixel(ori_sim_path, lonlat) + rowcols.append([x, y]) + + for data, rowcol in zip(data_roi, rowcols): + img_x = round(data_sim[round(rowcol[1]), round(rowcol[0]), 0]) + img_y = round(data_sim[round(rowcol[1]), round(rowcol[0]), 1]) + if (img_x > 0 and img_x < row and img_y > 0 and img_y < col): + measdata_list.append([img_x, img_y, float(data[3])]) + + # rowcols = self.tran_lonlats_to_rowcols(lonlats, ori_sim_path) + # measdata_list = [] + # for data, rowcol in zip(data_roi, rowcols): + # if (rowcol[0] != -1 and rowcol[1] != -1): + # measdata_list.append( + # [round(rowcol[0]) - self._begin_r, round(rowcol[1]) - self._begin_c, float(data[3])]) + return measdata_list + + @staticmethod + def get_radius_of_influence(lalo_step, src_meta='radar2geo', ratio=3): + EARTH_RADIUS = 6378122.65 # m + """Get radius of influence based on the lookup table resolution in lat/lon direction""" + if src_meta == "geo2radar": + # geo2radar + radius = 100e3 + else: + # radar2geo + step_deg = max(np.abs(lalo_step)) + step_m = step_deg * np.pi / 180.0 * EARTH_RADIUS + radius = step_m * ratio + return radius + + def interp2d_station_to_grid(self, lon, lat, data, loc_range=[18, 54, 73, 135], + det_grid=1, method='linear', projCode=4326): + # 参考链接 https://blog.csdn.net/weixin_43718675/article/details/103497930 + ''' + func : 将站点数据插值到等经纬度格点 + inputs: + lon: 站点的经度 + lat: 站点的纬度 + data: 对应经纬度站点的 气象要素值 + loc_range: [lat_min,lat_max,lon_min,lon_max]。站点数据插值到loc_range这个范围 + det_grid: 插值形成的网格空间分辨率 + method: 所选插值方法,默认 0.125 + return: + + [lon_grid,lat_grid,data_grid] + ''' + # step1: 先将 lon,lat,data转换成 n*1 的array数组 + lon = np.array(lon).reshape(-1, 1) + lat = np.array(lat).reshape(-1, 1) + data = np.array(data).reshape(-1, 1) + + # step2:确定插值区域的经纬度网格 + lat_min = loc_range[0] # y + lat_max = loc_range[1] # y + lon_min = loc_range[2] # x + lon_max = loc_range[3] # x + gt = [0, 0, 0, 0, 0, 0] + gt[0] = lon_min # x + gt[1] = det_grid + gt[3] = lat_max # y + gt[5] = -det_grid + lat_count = int((lat_max - lat_min) / det_grid + 1) # y + lon_count = int((lon_max - lon_min) / det_grid + 1) # x + # 替换为pyresample 插值方法 + proj_osr = osr.SpatialReference() + proj_osr.ImportFromEPSG(projCode) + projection = proj_osr.ExportToPROJJSON() + # (lower_left_x、lower_left_y、upper_right_x、upper_right_y) + target_def = AreaDefinition("id1", "WGS84", "proj_id", projection, + lon_count, lat_count, [lon_min, lat_min, lon_max, lat_max]) + source_def = geometry.SwathDefinition(lons=lon, lats=lat) + lalo_step = [det_grid, -det_grid] + radius = TransImgL1A.get_radius_of_influence(lalo_step, src_meta='radar2geo') + result = pr.bilinear.resample_bilinear(data, source_def, target_def, + radius=radius, neighbours=32, + nprocs=8, fill_value=np.nan, + epsilon=0) + # + return result + + def geocoding(self, ori_geo_tif, produc_arr, pixel_delta=1, method='linear'): + # 参考链接 https://blog.csdn.net/weixin_43718675/article/details/103497930 + ori_geo_tif[np.isnan(ori_geo_tif)] = -1 + lon_data = ori_geo_tif[0, :, :].reshape(-1) + lat_data = ori_geo_tif[1, :, :].reshape(-1) + idx = np.where(lat_data != -1) + lat_data = lat_data[idx] + lon_data = lon_data[idx] + idx = np.where(lon_data != -1) + + lat_data = lat_data[idx] + lon_data = lon_data[idx] + # ########################################### + result = self.interp2d_station_to_grid(lon_data, lat_data, produc_arr, + [self._min_lat, self._max_lat, self._min_lon, self._max_lon], + det_grid=pixel_delta, method=method) + return result + + # def l1a_2_geo(self, ori_geo_path, l1a_produc_path, geo_produc_path, method='linear'): + # ori_geo_tif = ImageHandle.ImageHandler.get_data(ori_geo_path) + # # l1a_produc = ImageHandle.ImageHandler.get_data(l1a_produc_path) + # l1a_produc = ImageHandle.ImageHandler.get_band_array(l1a_produc_path, 1) + # pixel_delta_y = (self._max_lat - self._min_lat) / (self._end_r - self._begin_r) # 0.001 + # pixel_delta_x = (self._max_lon - self._min_lon) / (self._end_c - self._begin_c) + # + # lon_data = ori_geo_tif[0, :, :].reshape(-1) + # lat_data = ori_geo_tif[1, :, :].reshape(-1) + # l1a_produc = l1a_produc.reshape(-1) + # idx = np.logical_not(np.isnan(lon_data)) + # lat_data = lat_data[idx] + # lon_data = lon_data[idx] + # l1a_produc = l1a_produc[idx] + # idx = np.logical_not(np.isnan(lat_data)) + # lat_data = lat_data[idx] + # lon_data = lon_data[idx] + # l1a_produc = l1a_produc[idx] + # + # gt = [self._min_lon, pixel_delta_x, 0.0, + # self._max_lat, 0.0, -pixel_delta_y] + # [lat_min, lat_max, lon_min, lon_max] = [self._min_lat, self._max_lat, self._min_lon, self._max_lon] + # lat_count = int((lat_max - lat_min) / pixel_delta_y + 1) # y + # lon_count = int((lon_max - lon_min) / pixel_delta_x + 1) # x + # + # # 获取地理坐标系统信息,用于选取需要的地理坐标系统 + # srs = osr.SpatialReference() + # srs.ImportFromEPSG(4326) # 定义输出的坐标系为"WGS 84" + # proj = srs.ExportToWkt() + # + # projection = srs.ExportToPROJJSON() + # # (lower_left_x、lower_left_y、upper_right_x、upper_right_y) + # target_def = AreaDefinition("id1", "WGS84", "proj_id", projection, + # lon_count, lat_count, [lon_min, lat_min, lon_max, lat_max]) + # lon_data = lon_data.reshape(-1, 1) + # lat_data = lat_data.reshape(-1, 1) + # l1a_produc = l1a_produc.reshape(-1, 1) + # source_def = geometry.SwathDefinition(lons=lon_data, lats=lat_data) + # lalo_step = [pixel_delta_x, -pixel_delta_y] + # radius = TransImgL1A.get_radius_of_influence(lalo_step, src_meta='radar2geo') + # geo_produc = pr.bilinear.resample_bilinear(l1a_produc, source_def, target_def, + # radius=radius, neighbours=32, + # nprocs=8, fill_value=np.nan, + # epsilon=0) + # + # ImageHandle.ImageHandler.write_img(geo_produc_path, proj, gt, geo_produc, np.nan) + # + # def l1a_2_geo_int(self, ori_geo_path, l1a_produc_path, geo_produc_path, method='nearest'): + # ori_geo_tif = ImageHandle.ImageHandler.get_data(ori_geo_path) + # # l1a_produc = ImageHandle.ImageHandler.get_data(l1a_produc_path) + # l1a_produc = ImageHandle.ImageHandler.get_band_array(l1a_produc_path, 1) + # pixel_delta_y = (self._max_lat - self._min_lat) / (self._end_r - self._begin_r) # 0.001 + # pixel_delta_x = (self._max_lon - self._min_lon) / (self._end_c - self._begin_c) + # + # lon_data = ori_geo_tif[0, :, :].reshape(-1) + # lat_data = ori_geo_tif[1, :, :].reshape(-1) + # l1a_produc = l1a_produc.reshape(-1) + # idx = np.logical_not(np.isnan(lon_data)) + # lat_data = lat_data[idx] + # lon_data = lon_data[idx] + # l1a_produc = l1a_produc[idx] + # idx = np.logical_not(np.isnan(lat_data)) + # lat_data = lat_data[idx] + # lon_data = lon_data[idx] + # l1a_produc = l1a_produc[idx] + # + # gt = [self._min_lon, pixel_delta_x, 0.0, + # self._max_lat, 0.0, -pixel_delta_y] + # [lat_min, lat_max, lon_min, lon_max] = [self._min_lat, self._max_lat, self._min_lon, self._max_lon] + # lat_count = int((lat_max - lat_min) / pixel_delta_y + 1) # y + # lon_count = int((lon_max - lon_min) / pixel_delta_x + 1) # x + # + # # 获取地理坐标系统信息,用于选取需要的地理坐标系统 + # srs = osr.SpatialReference() + # srs.ImportFromEPSG(4326) # 定义输出的坐标系为"WGS 84" + # proj = srs.ExportToWkt() + # + # projection = srs.ExportToPROJJSON() + # # (lower_left_x、lower_left_y、upper_right_x、upper_right_y) + # target_def = AreaDefinition("id1", "WGS84", "proj_id", projection, + # lon_count, lat_count, [lon_min, lat_min, lon_max, lat_max]) + # lon_data = lon_data.reshape(-1, 1) + # lat_data = lat_data.reshape(-1, 1) + # l1a_produc = l1a_produc.reshape(-1, 1) + # source_def = geometry.SwathDefinition(lons=lon_data, lats=lat_data) + # lalo_step = [pixel_delta_x, -pixel_delta_y] + # radius = TransImgL1A.get_radius_of_influence(lalo_step, src_meta='radar2geo') + # if method == 'linear': + # geo_produc = pr.bilinear.resample_bilinear(l1a_produc, source_def, target_def, + # radius=radius, neighbours=32, + # nprocs=8, fill_value=0, + # epsilon=0) + # elif method == 'nearest': + # geo_produc = pr.kd_tree.resample_nearest(source_def, l1a_produc, target_def, epsilon=0, + # radius_of_influence=50000, + # fill_value=0, nprocs=8 + # ) + # geo_produc = geo_produc[:,:,0] + # ImageHandle.ImageHandler.write_img(geo_produc_path, proj, gt, geo_produc) + + @property + def mask(self): + return self._mask + + +if __name__ == '__main__': + # ori_sim_path = r"I:\坐标转换\坐标转换接口\L1A数据(l1a_img_path数据)\RPC_ori_sim.tif" + # roi_Extend = [[120.53, 31.5], [120.61, 31.5], [120.61, 31.45], [120.53, 31.45]] + # conver_path = r"I:\坐标转换\坐标转换接口\裁剪后辅助数据(geo_img_path数据)\Covering_cut.tif" + # ndvi_path = r"I:\坐标转换\坐标转换接口\裁剪后辅助数据(geo_img_path数据)\NDVI_cut.tif" + # out_path = r"I:\坐标转换\SAR2GEO\test" + # + # tr = TransImgL1A(ori_sim_path,roi_Extend) + # tr.l1a_2_geo("I:/cut.tif", "I:/salinity.tif", "I:/salinity_geo2.tif") + ori_sim = r'D:\micro\WorkSpace\SurfaceRoughness\Temporary\preprocessed\ori_sim_preprocessed.tif' + product_tif = r'D:\micro\WorkSpace\SurfaceRoughness\Temporary\SurfaceRoughnessProduct_temp.tif' + result = r'D:\micro\WorkSpace\SurfaceRoughness\Temporary\SurfaceRoughnessProduct.tif' + method = 'linear' + """ + 31.14;31.50;120.34;120.75 + """ + # roi_Extend = [[102.12, 33.879], [102.327, 33.879], [102.327, 33.66], [102.12, 31.45]] + ori_sim_data = ImageHandle.ImageHandler.get_data(ori_sim) + lon = ori_sim_data[0, :, :] + lat = ori_sim_data[1, :, :] + min_lon = np.nanmin(lon) + max_lon = np.nanmax(lon) + min_lat = np.nanmin(lat) + max_lat = np.nanmax(lat) + print(np.nanmin(lon)) + print(np.nanmax(lon)) + print(np.nanmin(lat)) + print(np.nanmax(lat)) + + # roi_Extend = [[min_lon, max_lat], [max_lon, max_lat], [min_lon, min_lat], [max_lon, min_lat]] + roi_Extend = [[116.17328, 43.727577], [116.652504, 43.727577], [116.652504, 44.119164], [116.17328, 44.119164]] + # roi_Extend = [[108.51960117899473, 38.192443138079895], [109.62308480328566, 38.192443138079895], [109.62308480328566, 37.69300142375064], [108.51960117899473, 37.69300142375064]] + + tr = TransImgL1A(ori_sim, roi_Extend) + tr.l1a_2_geo_int(ori_sim, product_tif, result, method) + + pass +""" +import numpy as np +from pyresample import kd_tree, geometry +area_def = geometry.AreaDefinition('areaD', 'Europe (3km, HRV, VTC)', 'areaD', + {'a': '6378144.0', 'b': '6356759.0', + 'lat_0': '50.00', 'lat_ts': '50.00', + 'lon_0': '8.00', 'proj': 'stere'}, + 800, 800, + [-1370912.72, -909968.64, + 1029087.28, 1490031.36]) +data = np.fromfunction(lambda y, x: y*x, (50, 10)) +lons = np.fromfunction(lambda y, x: 3 + x, (50, 10)) +lats = np.fromfunction(lambda y, x: 75 - y, (50, 10)) +swath_def = geometry.SwathDefinition(lons=lons, lats=lats) +result = kd_tree.resample_nearest(swath_def, data,area_def, radius_of_influence=50000, epsilon=0.5) +""" diff --git a/tool/algorithm/xml/AlgXmlHandle.py b/tool/algorithm/xml/AlgXmlHandle.py new file mode 100644 index 0000000..f2891da --- /dev/null +++ b/tool/algorithm/xml/AlgXmlHandle.py @@ -0,0 +1,746 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :AlgXmlHandle.py +@Function :算法描述文件读写和检查 +@Contact :https://www.cnblogs.com/feifeifeisir/p/10893127.html +@Author :SHJ +@Date :2021/9/6 +@Version :1.0.0 +""" +import logging +from xml.etree.ElementTree import ElementTree + +from tool.algorithm.block.blockprocess import BlockProcess +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.file.fileHandle import fileHandle +import os +import re +import platform +import psutil +import multiprocessing +import ctypes +logger = logging.getLogger("mylog") +import glob + +class ManageAlgXML: + """ + 检查和读取XML文件信息 + """ + def __init__(self, xml_path): + self.in_path = xml_path + self.__tree = ElementTree() + self.__root = None + self.__alg_compt = None + self.__workspace_path = None + self.__taskID = None + self.__algorithm_name = None + self.__envs = {} + self.__input_paras = {} + self.__output_paras = {} + self.__init_flag = False + + + def init_xml(self): + """ + 初始化XML文件 + :return: True:初始化成功 False: 初始化失败 + """ + try: + self.__tree.parse(self.in_path) + except FileNotFoundError as ex: + msg = ex + "xml_path = " + self.in_path + raise Exception(msg) + except BaseException: + raise Exception("cannot open algXMl") + + self.__root = self.__tree.getroot() + if self.__root is None: + raise Exception("get root failed") + + self.__alg_compt = self.__root.find("AlgCompt") + if self.__alg_compt is None: + raise Exception("get AlgCompt failed") + + self.__workspace_path = self.__check_workspace_path() + if self.__workspace_path is None: + raise Exception("check workspace_path failed") + + self.__taskID = self.__check_task_id() + if self.__taskID is None: + raise Exception("check taskID failed") + + self.__algorithm_name = self.__check_algorithm_name() + if self.__algorithm_name is None: + raise Exception("check AlgorithmName failed") + + self.__envs = self.__check_environment() + if self.__envs is None or self.__envs == {}: + raise Exception("check environment failed") + + self.__input_paras = self.__check_input_para() + if self.__input_paras is None or self.__input_paras == {}: + raise Exception("check input para failed") + + self.__output_paras = self.__check_output_para() + + self.__init_flag = True + return True + + def get_workspace_path(self): + """ + 获取工作空间路径 + :return: 工作空间路径, None-异常 + """ + if not self.__init_flag: + raise Exception("XML is not initialized") + return self.__workspace_path + + def get_task_id(self): + """ + 获取任务ID + :return: taskID, None-异常 + """ + if not self.__init_flag: + raise Exception("XML is not initialized") + return self.__taskID + + def get_algorithm_name(self): + """ + 获取算法名 + :return: + """ + if not self.__init_flag: + raise Exception("AlgorithmName is not initialized") + return self.__algorithm_name + + def get_envs(self): + """ + 获取运行环境要求 + :return:运行环境要求, None-异常 + """ + if not self.__init_flag: + raise Exception("XML is not initialized") + return self.__envs + + def get_input_paras(self): + """ + 获取输入参数 + :return:输入参数, None-异常 + """ + if not self.__init_flag: + raise Exception("XML is not initialized") + return self.__input_paras + + def get_output_paras(self): + """ + 获取输出参数 + :return:输出参数, None-异常 + """ + if not self.__init_flag: + raise Exception("XML is not initialized") + return self.__output_paras + + def __check_workspace_path(self): + """ + 检查工作空间路径 + :return: 工作空间路径, None-异常 + """ + workspace_note = self.__root.find("WorkSpace") + workspace_path = str(workspace_note.text).replace("\n", "").replace(' ', '') #去除空格和回车 + if workspace_path is None: + raise Exception("'workspace_path' is None") + if not os.path.isdir(workspace_path): + raise Exception("'workspace_path' is not save:%s",workspace_path) + + if workspace_path[-1] != '\\': + workspace_path += "'\'" + + return workspace_path + + def __check_environment(self): + """ + 检查XML文件中运行环境要求 + :return: dic-运行环境要求, None-异常 + """ + env_note = self.__alg_compt.find("Environment") + + is_cluster = int(env_note.find("IsCluster").text.replace("\n", "").replace(' ', '')) + is_legal = is_cluster in [0, 1] + if not is_legal: + raise Exception("IsCluster is not 0 or 1") + + cluster_num = int(env_note.find("ClusterNum").text) + is_legal = cluster_num in [0, 1, 2, 3, 4, 5, 6, 7] + if not is_legal: + raise Exception("cluster_num is beyond [0,1,2,3,4,5,6,7]") + + operating_system = env_note.find("OperatingSystem").text.replace("\n", "").replace(' ', '') #去除空格和回车 + # is_legal = operating_system in ["Windows10", "Windows7", "WindowsXP"] + # if not is_legal: + # raise Exception("OperatingSystem is beyond [Windows10, Windows7, WindowsXP]") + + cpu = env_note.find("CPU").text.replace("\n", "").replace(' ', '') #去除空格和回车 + is_legal = cpu in ["单核", "双核", "3核", "4核", "6核", "8核"] + if not is_legal: + raise Exception("OperatingSystem is beyond [单核, 双核, 3核, 4核, 6核, 8核]") + + memory = env_note.find("Memory").text.replace("\n", "").replace(' ', '') #去除空格和回车 + is_legal = memory in ["1GB", "2GB", "4GB", "6GB", "8GB", "10GB", "12GB", "16GB"] + # if not is_legal: + # raise Exception("OperatingSystem is beyond [1GB, 2GB, 4GB, 6GB, 8GB, 10GB, 12GB, 16GB]") + + storage = env_note.find("Storage").text.replace("\n", "").replace(' ', '') #去除空格和回车 + is_legal = int(storage[:-2]) > 0 + if not is_legal: + raise Exception("Storage < 0GB") + + network_card = env_note.find("NetworkCard").text + # is_legal = network_card in ["无需求"] + # if not is_legal: + # # 输出异常 + # return + + band_width = env_note.find("Bandwidth").text + # is_legal = band_width in ["无需求"] + # if not is_legal: + # # 输出异常 + # return + + gpu = env_note.find("GPU").text + # is_legal = GPU in ["无需求"] + # if not is_legal: + # # 输出异常 + # return + envs = {"is_Cluster": is_cluster, "cluster_num": cluster_num, "operating_system": operating_system, + "CPU": cpu, "memory": memory} + envs.update({"Storage": storage, "network_card": network_card, "band_width": band_width, "GPU": gpu}) + return envs + + def __check_input_para(self): + """ + 检查XML文件中输入参数 + :return: dic-输入参数, None-异常 + """ + input_paras_note = self.__alg_compt.find("Inputs") + paras_num = int(input_paras_note.attrib.get("ParameterNum")) + para_list = input_paras_note.findall("Parameter") + + if paras_num != len(para_list): + msg ="'ParameterNum':"+ str(paras_num) + " != number of 'Parameter':" + str(len(para_list)) + logger.warning(msg) + + input_paras = {} + for para in para_list: + para_name = para.find("ParaName").text.replace("\n", "").replace(' ', '') #去除空格和回车 + para_chs_name = para.find("ParaChsName").text.replace("\n", "").replace(' ', '') #去除空格和回车 + para_type = para.find("ParaType").text.replace("\n", "").replace(' ', '') #去除空格和回车 + data_type = para.find("DataType").text.replace("\n", "").replace(' ', '') #去除空格和回车 + para_value = para.find("ParaValue").text.replace("\n", "").replace(' ', '') #去除空格和回车 + input_para = {"ParaName": para_name, "ParaChsName": para_chs_name, "ParaType": para_type, + "DataType": data_type, "ParaValue": para_value} + #print(para_name) + if para_type == "Value": + # max_value = para.find("MaxValue").text + # min_value = para.find("MinValue").text + # option_value = para.find("OptionValue").text.replace("\n", "").replace(' ', '') #去除空格和回车 + # input_para.update({"MaxValue": max_value, "MinValue": min_value, "OptionValue": option_value}) + # input_para.update({"OptionValue": option_value}) todo + pass + if para_name is None or para_type is None or para_value is None: + msg = 'there is None among para_name:' + para_name + ',para_type:' + para_type + 'or para_value:' + para_value + '!' + raise Exception(msg) + + input_paras.update({para_name: input_para}) + return input_paras + + def __check_output_para(self): + """ + 检查XML文件中输出参数 + :return: dic-输出参数, None-异常 + """ + output_paras_note = self.__alg_compt.find("Outputs") + paras_num = int(output_paras_note.attrib.get("ParameterNum")) + para_list = output_paras_note.findall("Parameter") + + if paras_num != len(para_list): + raise Exception("'ParameterNum' != number of 'Parameter'") + output_paras = {} + return output_paras + + def write_out_para(self, para_name, para_value): + """ + 写入输出参数 + """ + output_paras_note = self.__alg_compt.find("Outputs") + para_list = output_paras_note.findall("Parameter") + flag = False + for para in para_list: + if para.find("ParaName").text == para_name: + para.find("ParaValue").text = para_value + flag = True + if flag == False: + raise Exception('Cannot find Output Parameter:'+para_name+'!') + self.__tree.write(self.in_path, encoding="utf-8", xml_declaration=True) + + def __check_task_id(self): + """ + 检查任务ID + :return: taskID, None-异常 + """ + task_id_note = self.__root.find("TaskID") + task_id = str(task_id_note.text).replace("\n", "").replace(' ', '') #去除空格和回车 + if task_id is None: + raise Exception("'TaskID' is None") + return task_id + + def __check_algorithm_name(self): + + algorithm_name_note = self.__alg_compt.find("AlgorithmName") + algorithm_name = str(algorithm_name_note.text).replace("\n", "").replace(' ', '') #去除空格和回车 + if algorithm_name is None: + raise Exception("'AlgorithmName' is None") + return algorithm_name + + +class CheckSource: + """ + 检查配置文件中资源的完整性和有效性 + """ + def __init__(self, alg_xml_handle): + self.__alg_xml_handle = alg_xml_handle + self.imageHandler = ImageHandler() + self.__ParameterDic={} + + + def check_alg_xml(self): + """ + 检查算法配置文件 + """ + if self.__alg_xml_handle.init_xml(): + logger.info('init algXML succeed') + return True + else: + raise Exception('init algXML failed') + + def check_run_env(self): + """ + :return: True-正常,False-异常 + """ + envs = self.__alg_xml_handle.get_envs() + # 检查操作系统 + local_plat = platform.platform() + local_plat_list = local_plat.split("-") + flag = envs['operating_system'] == local_plat_list[0]+local_plat_list[1] + if flag is False: + msg = 'operating_system:' + local_plat_list[0] + local_plat_list[1] + ' is not ' + envs['operating_system'] + #raise Exception(msg) + + # 检查电脑显存 + mem = psutil.virtual_memory() + mem_total = int(round(mem.total / 1024 / 1024 / 1024, 0)) + mem_free = round(mem.free / 1024 / 1024 / 1024, 0) + env_memory = envs['memory'] + env_memory = int(env_memory[:-2]) + if env_memory > mem_total: + msg = 'memory_total ' + str(mem_total) + ' less than'+str(env_memory) + 'GB' + # raise Exception(msg) + + if env_memory >= mem_free: + msg = 'mem_free ' + str(mem_free) + 'GB less than' + str(env_memory) + 'GB' + logger.warning(msg) + + # 检查CPU核数 + env_cpu = envs['CPU'] + if env_cpu == "单核": + env_cpu_core_num = 1 + elif env_cpu == "双核": + env_cpu_core_num = 2 + elif env_cpu == "三核": + env_cpu_core_num = 3 + else: + env_cpu_core_num = int(env_cpu[:-1]) + + local_cpu_core_num = int(multiprocessing.cpu_count()/2) + if env_cpu_core_num > local_cpu_core_num: + msg = 'CPU_core_num ' + str(local_cpu_core_num) + 'core less than' + str(env_cpu_core_num) + ' core' + # raise Exception(msg) + + # 检查磁盘的内存 + env_storage = envs['Storage'] + env_storage = int(env_storage[:-2]) + workspace_path = self.__alg_xml_handle.get_workspace_path() + if not os.path.isdir(workspace_path): + raise Exception('workspace_path:%s do not exist!', workspace_path) + + local_storage = self.__get_free_space_mb(workspace_path) + if env_storage > local_storage: + msg = 'workspace storage ' + str(local_storage) + 'GB less than' + envs['Storage'] +"GB" + # raise Exception(msg) + + return True + + @staticmethod + def __get_free_space_mb(folder): + """ + :param folder:检查的路径 eg:'C:\\' + :return: folder/drive free space (GB) + """ + if platform.system() == 'Windows': + free_bytes = ctypes.c_ulonglong(0) + ctypes.windll.kernel32.GetDiskFreeSpaceExW(ctypes.c_wchar_p(folder), None, None, ctypes.pointer(free_bytes)) + return free_bytes.value / 1024 / 1024 / 1024 + else: + st = os.statvfs(folder) + return st.f_bavail * st.f_frsize / 1024 / 1024 + + def check_input_paras(self, input_para_names): + """ + :param input_para_names :需要检查参数的名称列表[name1,name2,...] + :return: 检测是否正常 + """ + workspace_path = self.__alg_xml_handle.get_workspace_path() + input_paras = self.__alg_xml_handle.get_input_paras() + for name in input_para_names: + para = input_paras[name] + if para is None: + msg = "check para:"+name + " is failed!"+"para is None!" + raise Exception(msg) + + if para['ParaType'] == 'File': + if para['DataType'] == 'tif': + if para['ParaValue'] != 'empty' and para['ParaValue'] != 'Empty'and para['ParaValue'] != '': + para_value_list = para['ParaValue'].split(";") + for para_value in para_value_list: + para_path = para_value + if self.__check_tif(para_path) is False: + msg = "check para:"+name + " is failed!" + "Path:" + para_path + raise Exception(msg) + + if para['DataType'] == 'xml': + para_path = para['ParaValue'] + if not os.path.exists(para_path): + raise Exception('para_file:%s is inexistent!', para_path) + + if para['DataType'] == 'File': + para_path = para['ParaValue'] + if os.path.isdir(para_path) is False: + msg = "check para:" + name + " is failed!" + "FilePath:" + para_path + raise Exception(msg) + if para["DataType"]=="ymal": + para_path = para['ParaValue'] + if os.path.isfile(para_path) is False: + msg = "check para: " + name + " is failed! " + " FilePath: " + para_path + raise Exception(msg) + + elif para['ParaType'] == 'Value': + if para['DataType'] == 'float' or para['DataType'] == 'int' or para['DataType'] == 'double': + if para['ParaValue'] is None: + msg = "check para:"+name + " is failed!"+"'ParaValue' is None" + raise Exception(msg) + if self.__is_number(para['ParaValue']) is False: + raise Exception("para:"+name+" is not number!") + # if (para['MaxValue'] is not None) and (self.__is_number(para['MaxValue']) is True): + # value = para['ParaValue'] + # max = para['MaxValue'] + # if float(value) > float(max): + # msg = "para:" + name + " > max, para:" + value + "max:" + max + # raise Exception(msg) + # if (para['MinValue'] is not None) and (self.__is_number(para['MinValue']) is True): + # value = para['ParaValue'] + # min = para['MinValue'] + # if float(value) < float(min): + # msg = "para:" + name + " < min, para:" + value + "min:" + min + # raise Exception(msg) + + self.__ParameterDic[name] = para['ParaValue'] + __workspace_path = workspace_path + __input_paras = input_paras + return True, self.__ParameterDic + + def check_output_paras(self, output_para_names): + """ + :param output_para_names :需要检查参数的名称列表[name1,name2,...] + :return: Ture or False + """ + workspace_path = self.__alg_xml_handle.get_workspace_path() + output_paras = self.__alg_xml_handle.get_output_paras() + + for name in output_para_names: + para = output_paras[name] + #print(para) + if para is None: + msg = "check para:" + name + " is failed!" + "para is None!" + raise Exception(msg) + + if para['ParaType'] == 'File': + if para['DataType'] == 'tif': + para_path = workspace_path + para['ParaValue'] + para_dir = os.path.split(para_path) + flag_isdir = os.path.isdir(para_dir[0]) + flag_istif = (para_dir[1].split(".", 1)[1] == "tif") + if flag_isdir and flag_istif is False: + msg = "check para:" + name + " is failed!" + para_path + "is invalid!" + raise Exception(msg) + + if para['DataType'] == 'File': + para_path = workspace_path + para['ParaValue'] + if os.path.isdir(para_path) is False: + os.makedirs(para_path) + if os.path.isdir(para_path) is False: + msg = "check para:" + name + " is failed!" + para_path + "is invalid!" + raise Exception(msg) + return True + + @staticmethod + def __is_number(str_num): + """ + :param str_num :检查str是否为float或者double + :return: True or False + """ + if str_num[0] == '-': + str_num = str_num[1:] + pattern = re.compile(r'(.*)\.(.*)\.(.*)') + if pattern.match(str_num): + return False + return str_num.replace(".", "").isdigit() + + def __check_tif(self, filename): + """ + :filename: 文件的路径 + :return: True or False + """ + if self.imageHandler.get_dataset(filename) is None: + msg = "read tif error!,finame: " + filename + raise Exception(msg) + return True + + +class InitPara: + def __init__(self,debug = False): + self._debug = debug + + @staticmethod + def init_processing_paras(input_paras, out_path): + """ + :param names:字典列表,每个字典为一个输入产品的配置信息 + """ + processing_paras = {} + for name in input_paras: + para = input_paras[name] + if para is None: + logger.error(name + "is None!") + return False + + if para['ParaType'] == 'File': + if para['DataType'] == 'tif' or para['DataType'] == 'csv': + para_value_list = para['ParaValue'].split(";") + if len(para_value_list) == 1: + para_path = para['ParaValue'] + if para_path != 'empty' and para_path != '': + processing_paras.update({name: para_path}) + else: + for n, para_value in zip(range(len(para_value_list)), para_value_list): + processing_paras.update({name+str(n): para_value}) + elif para['DataType'] == 'zip': + # temp_para = para['ParaValue'].split(".")[0] + para_value_list = para['ParaValue'].split(";") + if len(para_value_list) == 1: + para_path = para['ParaValue'] + if para_path != 'empty' and para_path != '': + file_path = BlockProcess.unzip_file(para_path, out_path) + processing_paras.update({name: file_path}) + else: + for n, para_value_zip in zip(range(len(para_value_list)), para_value_list): + file_path = BlockProcess.unzip_file(para_value_zip, out_path) + processing_paras.update({name+str(n): file_path}) + elif para['DataType'] == 'tar.gz': + paths = para['ParaValue'].split(';') + for n, path in zip(range(len(paths)), paths): + processing_paras.update({'sar_path' + str(n): path}) + else: + para_path = para['ParaValue'] + processing_paras.update({name: para_path}) + + elif para['ParaType'] == 'Value': + if para['DataType'] == 'float': + value = float(para['ParaValue']) + elif para['DataType'] == 'int': + value = int(para['ParaValue']) + else: # 默认string + value = para['ParaValue'] + processing_paras.update({name: value}) + elif para['ParaType'] == 'String': + value = para['ParaValue'] + if value == 'empty': + continue + else: + processing_paras.update({name: value}) + return processing_paras + + # 获取文件夹内的文件 + + @staticmethod + def get_tif_paths(file_dir,name): + in_tif_paths = [] + if os.path.exists(file_dir + name + '\\'): + in_tif_paths = list(glob.glob(os.path.join(file_dir + name + '\\', '*.tif'))) + in_tif_paths1 = list(glob.glob(os.path.join(file_dir + name + '\\', '*.tiff'))) + if in_tif_paths1 != []: + in_tif_paths = in_tif_paths + in_tif_paths1 + else: + in_tif_paths = list(glob.glob(os.path.join(file_dir, '*.tif'))) + in_tif_paths1 = list(glob.glob(os.path.join(file_dir, '*.tiff'))) + if in_tif_paths != []: + in_tif_paths = in_tif_paths + in_tif_paths1 + return in_tif_paths + + @staticmethod + def get_tif_paths_new(file_dir, name): + in_tif_paths = [] + if os.path.exists(file_dir + name + '\\'): + in_tif_paths = list(glob.glob(os.path.join(file_dir + name + '\\', '*.tif'))) + in_tif_paths1 = list(glob.glob(os.path.join(file_dir + name + '\\', '*.tiff'))) + if in_tif_paths1 != []: + in_tif_paths = in_tif_paths + in_tif_paths1 + else: + in_tif_paths = list(glob.glob(os.path.join(file_dir, '*.tif'))) + in_tif_paths1 = list(glob.glob(os.path.join(file_dir, '*.tiff'))) + if len(in_tif_paths) == 0: + in_tif_paths = in_tif_paths + in_tif_paths1 + return in_tif_paths + + @staticmethod + def get_polarization_mode(in_tif_paths): + pol_dic = {} + pola_list = [0,0,0,0] + for in_tif_path in in_tif_paths: + # 获取极化类型 + if '_HH_' in os.path.basename(in_tif_path): + pol_dic.update({'HH': in_tif_path}) + pola_list[0] = 1 + elif '_HV_' in os.path.basename(in_tif_path): + pol_dic.update({'HV': in_tif_path}) + pola_list[1] = 1 + elif '_VH_' in os.path.basename(in_tif_path): + pol_dic.update({'VH': in_tif_path}) + pola_list[2] = 1 + elif '_VV_' in os.path.basename(in_tif_path): + pol_dic.update({'VV': in_tif_path}) + pola_list[3] = 1 + elif 'LocalIncidenceAngle' in os.path.basename(in_tif_path) or 'ncidenceAngle' in os.path.basename(in_tif_path): + pol_dic.update({'LocalIncidenceAngle': in_tif_path}) + elif 'inc_angle' in os.path.basename(in_tif_path): + pol_dic.update({'inc_angle': in_tif_path}) + elif 'inci_Angle-ortho' in os.path.basename(in_tif_path): + pol_dic.update({'inci_Angle-ortho': in_tif_path}) + elif 'LocalincidentAngle-ortho' in os.path.basename(in_tif_path): + pol_dic.update({'LocalIncidentAngle-ortho': in_tif_path}) + elif 'ori_sim' in os.path.basename(in_tif_path): + pol_dic.update({'ori_sim': in_tif_path}) + elif 'sim_ori' in os.path.basename(in_tif_path): + pol_dic.update({'sim_ori': in_tif_path}) + pol_dic.update({'pola':pola_list}) + return pol_dic + + @staticmethod + def get_meta_paths(file_dir, name): + meta_xml_paths = [] + if os.path.exists(file_dir + name + '\\'): + meta_xml_paths = list(glob.glob(os.path.join(file_dir + name, '*.meta.xml'))) + meta_xml_paths += list(glob.glob(os.path.join(file_dir + name, '*.xml'))) + else: + meta_xml_paths = list(glob.glob(os.path.join(file_dir, '*.meta.xml'))) + meta_xml_paths += list(glob.glob(os.path.join(file_dir, '*.xml'))) + if meta_xml_paths is None or meta_xml_paths == []: + raise Exception('there is not .meta.xml in path: ', file_dir + '\\') + return meta_xml_paths + + @staticmethod + def get_incidence_xml_paths(file_dir, name): + meta_xml_paths = [] + if os.path.exists(file_dir + name + '\\'): + meta_xml_paths = list(glob.glob(os.path.join(file_dir + name, '*.incidence.xml'))) + else: + meta_xml_paths = list(glob.glob(os.path.join(file_dir, '*.incidence.xml'))) + if meta_xml_paths is None or meta_xml_paths == []: + raise Exception('there is not .incidence.xml in path: ', file_dir + '\\') + return meta_xml_paths + + + @staticmethod + def get_meta_dic(meta_xml_paths, name): + para_dic = {} + for mete_path in meta_xml_paths: + if name in mete_path: + para_dic.update({'META': mete_path}) + if para_dic is {}: + raise Exception('the name of .meta.xml is error!') + return para_dic + + @staticmethod + def get_incidence_dic(meta_xml_paths, name): + para_dic = {} + for mete_path in meta_xml_paths: + if name in mete_path: + para_dic.update({'Incidence': mete_path}) + if para_dic is {}: + raise Exception('the name of .incidence.xml is error!') + return para_dic + + + @staticmethod + def get_meta_dic_new(meta_xml_paths, name): + para_dic = {} + for mete_path in meta_xml_paths: + if name in os.path.basename(mete_path): + para_dic.update({'META': mete_path}) + else: + para_dic.update({'Origin_META': mete_path}) + if para_dic is {}: + raise Exception('the name of .meta.xml is error!') + return para_dic + + @staticmethod + def get_meta_dic_VP(meta_xml_paths, name): + para_dic = {} + for mete_path in meta_xml_paths: + if name in os.path.basename(mete_path): + para_dic.update({name + '_META': mete_path}) + else: + para_dic.update({name + '_Origin_META': mete_path}) + if para_dic is {}: + raise Exception('the name of .meta.xml is error!') + return para_dic + + def get_mult_tar_gz_inf(self,tar_gz_path, workspace_preprocessing_path): + para_dic = {} + name = os.path.split(tar_gz_path)[1].rstrip('.tar.gz') + para_dic.update({'name': name}) + + file_dir = os.path.join(workspace_preprocessing_path, name + '\\') + if self._debug == False: + fileHandle().de_targz(tar_gz_path, file_dir) + # 元文件字典 + para_dic.update(InitPara.get_meta_dic_VP(InitPara.get_meta_paths(file_dir, name), name)) + # tif路径字典 + pol_dic = InitPara.get_polarization_mode(InitPara.get_tif_paths(file_dir, name)) + parameter_path = os.path.join(file_dir, "orth_para.txt") + para_dic.update({name + "paraMeter": parameter_path}) + for key, in_tif_path in pol_dic.items(): + para_dic.update({name + '_' + key: in_tif_path}) + return para_dic + + + def get_mult_tar_gz_infs(self,processing_paras, workspace_preprocessing_path): + tif_names_list = [] + tar_inf_dic = {} + for key, value in processing_paras.items(): + if 'sar_path' in key: + para_dic = self.get_mult_tar_gz_inf(value, workspace_preprocessing_path) + tif_names_list.append(para_dic['name']) + para_dic.pop('name') + tar_inf_dic.update(para_dic) + tar_inf_dic.update({'name_list': tif_names_list}) + + return tar_inf_dic \ No newline at end of file diff --git a/tool/algorithm/xml/AnalysisXml.py b/tool/algorithm/xml/AnalysisXml.py new file mode 100644 index 0000000..2dada82 --- /dev/null +++ b/tool/algorithm/xml/AnalysisXml.py @@ -0,0 +1,135 @@ +from xml.etree.ElementTree import ElementTree +import os + + +class DictXml: + def __init__(self, xml_path): + self.xml_path = xml_path + self.__tree = ElementTree() + self.__root = None + self.init_xml() + + def init_xml(self): + self.__root = self.__tree.parse(self.xml_path) + if self.__root is None: + raise Exception("get root failed") + + def get_extend(self): + productInfo = self.__root.find("imageinfo") + if productInfo is None: + raise Exception("get imageInfo failed") + + corner = productInfo.find("corner") + if corner is None: + raise Exception("get corner failed") + + topLeft = corner.find("topLeft") + if topLeft is None: + raise Exception("get topLeft failed") + + topRight = corner.find("topRight") + if topRight is None: + raise Exception("get topRight failed") + + bottomLeft = corner.find("bottomLeft") + if bottomLeft is None: + raise Exception("get bottomLeft failed") + + bottomRight = corner.find("bottomRight") + if bottomRight is None: + raise Exception("get bottomRight failed") + + point_upleft = [float(topLeft.find("longitude").text), float(topLeft.find("latitude").text)] + point_upright = [float(topRight.find("longitude").text), float(topRight.find("latitude").text)] + point_downleft = [float(bottomLeft.find("longitude").text), float(bottomLeft.find("latitude").text)] + point_downright = [float(bottomRight.find("longitude").text), float(bottomRight.find("latitude").text)] + scopes = [point_upleft, point_upright, point_downleft, point_downright] + + point_upleft_buf = [float(topLeft.find("longitude").text) - 0.5, float(topLeft.find("latitude").text) + 0.5] + point_upright_buf = [float(topRight.find("longitude").text) + 0.5, float(topRight.find("latitude").text) + 0.5] + point_downleft_buf = [float(bottomLeft.find("longitude").text) - 0.5, + float(bottomLeft.find("latitude").text) - 0.5] + point_downright_buf = [float(bottomRight.find("longitude").text) + 0.5, + float(bottomRight.find("latitude").text) - 0.5] + scopes_buf = [point_upleft_buf, point_upright_buf, point_downleft_buf, point_downright_buf] + return scopes_buf + + +class xml_extend: + def __init__(self, xml_path): + self.xml_path = xml_path + self.__tree = ElementTree() + self.__root = None + self.init_xml() + + def init_xml(self): + self.__root = self.__tree.parse(self.xml_path) + if self.__root is None: + raise Exception("get root failed") + + def get_extend(self): + ProductBasicInfo = self.__root.find("ProductBasicInfo") + if ProductBasicInfo is None: + raise Exception("get ProductBasicInfo failed") + + SpatialCoverageInformation = ProductBasicInfo.find("SpatialCoverageInformation") + if SpatialCoverageInformation is None: + raise Exception("get SpatialCoverageInformation failed") + + TopLeftLongitude = SpatialCoverageInformation.find("TopLeftLongitude") + if TopLeftLongitude is None: + raise Exception("get TopLeftLongitude failed") + + TopLeftLatitude = SpatialCoverageInformation.find("TopLeftLatitude") + if TopLeftLatitude is None: + raise Exception("get TopLeftLatitude failed") + + TopRightLongitude = SpatialCoverageInformation.find("TopRightLongitude") + if TopRightLongitude is None: + raise Exception("get TopRightLongitude failed") + + TopRightLatitude = SpatialCoverageInformation.find("TopRightLatitude") + if TopRightLatitude is None: + raise Exception("get TopRightLatitude failed") + + BottomRightLongitude = SpatialCoverageInformation.find("BottomRightLongitude") + if BottomRightLongitude is None: + raise Exception("get BottomRightLongitude failed") + + BottomRightLatitude = SpatialCoverageInformation.find("BottomRightLatitude") + if BottomRightLatitude is None: + raise Exception("get BottomRightLatitude failed") + + BottomLeftLongitude = SpatialCoverageInformation.find("BottomLeftLongitude") + if BottomLeftLongitude is None: + raise Exception("get BottomLeftLongitude failed") + + BottomLeftLatitude = SpatialCoverageInformation.find("BottomLeftLatitude") + if BottomLeftLatitude is None: + raise Exception("get BottomLeftLatitude failed") + + point_upleft = [float(TopLeftLongitude.text), float(TopLeftLatitude.text)] + point_upright = [float(TopRightLongitude.text), float(TopRightLatitude.text)] + point_downleft = [float(BottomLeftLongitude.text), float(BottomLeftLatitude.text)] + point_downright = [float(BottomRightLongitude.text), float(BottomRightLatitude.text)] + scopes = [point_upleft, point_upright, point_downleft, point_downright] + + point_upleft_buf = [float(TopLeftLongitude.text) - 0.5, float(TopLeftLatitude.text) + 0.5] + point_upright_buf = [float(TopRightLongitude.text) + 0.5, float(TopRightLatitude.text) + 0.5] + point_downleft_buf = [float(BottomLeftLongitude.text) - 0.5, float(BottomLeftLatitude.text) - 0.5] + point_downright_buf = [float(BottomRightLongitude.text) + 0.5, float(BottomRightLatitude.text) - 0.5] + scopes_buf = [point_upleft_buf, point_upright_buf, point_downleft_buf, point_downright_buf] + return scopes + + +if __name__ == '__main__': + xml_path = r'E:\MicroWorkspace\GF3A_nanjing\GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422\GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422.meta.xml' + scopes, scopes_buf = DictXml(xml_path).get_extend() + print(scopes) + print(scopes_buf) +# path = r'D:\BaiduNetdiskDownload\GZ\lon.rdr' +# path2 = r'D:\BaiduNetdiskDownload\GZ\lat.rdr' +# path3 = r'D:\BaiduNetdiskDownload\GZ\lon_lat.tif' +# s = ImageHandler().band_merge(path, path2, path3) +# print(s) +# pass diff --git a/tool/algorithm/xml/CreatMetafile.py b/tool/algorithm/xml/CreatMetafile.py new file mode 100644 index 0000000..7fd728e --- /dev/null +++ b/tool/algorithm/xml/CreatMetafile.py @@ -0,0 +1,319 @@ +""" +@Project :microproduct +@File :OnePlantHeight.PY +@Function :主函数 + +@Author :LMM +@Date :2021/10/19 14:39 +@Version :1.0.0 +""" +from xml.dom import minidom +from xml.etree.ElementTree import ElementTree, Element +import xml.dom.minidom +from lxml import etree +import codecs +import xml.etree.cElementTree as ET + + +class CreateMetafile: + """ + 生成元文件案例 + """ + def __init__(self, input_image_path, input_para_file, an_li_path, path): + """ + input_image_path: 影像头文件 + input_para_file: 配置文件 + an_li_path:案例路径 + path:保存路径 + """ + self.input_image_path = input_image_path + self.input_para_file = input_para_file + self.an_li_path= an_li_path + self.path = path + pass + + def create_xml(self): + """ + 读取元文件(只保留从头文件到sensor节点的部分) + 输出sensor的节点位置 + """ + tree = ElementTree() + tree.parse(self.input_image_path) # 影像头文件 + root = tree.getroot() + # 1、只保留从头文件到sensor节点的部分 + element_trees = list(root) + count = 0 + count_01=1 + for element in element_trees: + count = count+1 + if element.tag == "sensor": + element.tail = "\n\n\t" + count_01 = count-1 + for i in range(0, len(element_trees)): + if i > count_01: + root.remove(element_trees[i]) + # 2、只保留"satellite", "orbitType", "attiType", "Direction", "ReceiveTime", "sensor"的部分 + element_trees2 = list(root) + for i in element_trees2: + if i.tag not in ["satellite", "orbitType", "attiType", "Direction", "ReceiveTime", "sensor"]: + root.remove(i) + # 3、获取"sensor"节点的位置,并输出 + count2 = 0 + count2_01=1 + element_trees3 = list(root) + for element in element_trees3: + count2 = count2+1 + if element.tag == "sensor": + element.tail = "\n\n\t" + count2_01 = count2-1 + tree.write(self.path, encoding="utf-8", xml_declaration=True) + return count2_01 + + @staticmethod + def create_node(tag, property_map, content): + """ + fun: 新造一个节点 + para: tag:节点标签 + para: property_map:属性及属性值map + para: content: 节点闭合标签里的文本内容 + para: return 新节点 + """ + element = Element(tag, property_map) + element.text = content + element.tail = "\n\t" + return element + + def add_standard_xml(self, num): + """ + 模板直接写入到元文件中 + """ + tree = ElementTree() + tree.parse(self.path) # 影像头文件 + root = tree.getroot() + + tree2 = ElementTree() + tree2.parse(self.an_li_path) # 影像头文件 + root2 = tree2.getroot() + + productinfo = root2.find("productinfo") + root.insert(num + 1, productinfo) + processinfo = root2.find("processinfo") + root.insert(num + 2, processinfo) + tree.write(self.path, encoding="utf-8", xml_declaration=True) + + def add_img_xml(self, num,SrcImageName): + """添加影像信息""" + tree = ElementTree() + tree.parse(self.path) + root = tree.getroot() + + a = self.create_node("SrcImageName", {"desc": "原始影像名称"}, SrcImageName) + root.insert(num+1, a) + # root.append(a) + b = self.create_node("AlgCompt", {"desc": "算法信息"}, "\n\t\t") + b.tail = "\n\n\t" + # root.append(b) + root.insert(num+2, b) + tree.write(self.path, encoding="utf-8", xml_declaration=True) + + def add_info_xml(self): + """ + 向元文件中添加配置文件的部分节("AlgorithmName", "ChsName", "AlgorithmDesc", "Version", + "AlgorithmClass", "AlgorithmLevel", "AlgoirthmID", "Author") + """ + tree = ElementTree() + tree.parse(self.input_para_file) # 配置文件 + root = tree.getroot() + + tree2 = ElementTree() + tree2.parse(self.path) + root2 = tree2.getroot() + AlgCompt = root2.find("AlgCompt") + + a = root.find("AlgCompt") + + element_trees = list(a) + for element in element_trees: + if element.tag in ["AlgorithmName", "ChsName", "AlgorithmDesc", "Version", + "AlgorithmClass", "AlgorithmLevel", "AlgoirthmID", "Author"]: + element.tail = "\n\t\t" + AlgCompt.append(element) + if element.tag == "Author": + element.tail = "\n\t" + + tree2.write(self.path, encoding="utf-8", xml_declaration=True) + + def add_class_info(self, type_id_name, type_id_parent=None): + """ + 向元文件中: + 1.删除productinfo-productType信息; + 2.加入地物类别信息; + 输出: + + 1 + 101 + 耕地 + + + 5 + 502 + 草地 + + """ + tree = ElementTree() + tree.parse(self.path) # 配置文件 + root = tree.getroot() + productinfo = root.find("productinfo") + # element_trees = list(productinfo) + # for element in element_trees: + # if element.tag == "productType": + # productinfo.remove(element) # 移除 "productType" + productinfo.find("productConsumeTime").tail = "\n\t\t" # 定位到productConsumeTime,设置好位置 + b = self.create_node("LandCoverClass", {}, "\n\t\t\t") + b.tail = "\n\t\t" + productinfo_count=0 + for i in list(productinfo): + productinfo_count=productinfo_count+1 + if i.tag=="productConsumeTime": + break + productinfo.insert(productinfo_count, b) + + # productinfo.insert(num, b) # 插入LandCoverClass + class_num = 1 + for key, value in type_id_name.items(): + + LandCoverClass = productinfo.find("LandCoverClass") + name="Class"+str(class_num) + # name = "Class" + c = self.create_node(name, {}, "\n\t\t\t\t") + if class_num!=(len(type_id_name.keys())): + c.tail = "\n\t\t\t" + else: + c.tail = "\n\t\t" + LandCoverClass.append(c) # 插入LandCoverClass + + # LandCoverClass.find("Class")[num].tail = "\n\t\t\t" + aaa=LandCoverClass.find(name) + + if type_id_parent is not None: + parent_id = self.create_node("parent_id", {}, type_id_parent[key]) + parent_id.tail="\n\t\t\t\t" + LandCoverClass.find(name).append(parent_id) + id = self.create_node("id", {}, str(key)) + id.tail = "\n\t\t\t\t" + LandCoverClass.find(name).append(id) + covernm = self.create_node("covernm", {}, value) + covernm.tail = "\n\t\t\t" + LandCoverClass.find(name).append(covernm) + class_num=class_num+1 + tree.write(self.path, encoding="utf-8", xml_declaration=True) + + def rewrite_name(self): + """ + 修改class的名字: + class1->class + class2->class + """ + tree = ElementTree() + tree.parse(self.path) # 配置文件 + root = tree.getroot() + productinfo = root.find("productinfo") + LandCoverClass=productinfo.find("LandCoverClass") + element_trees = list(LandCoverClass) + for element in element_trees: + element.tag="Class" + tree.write(self.path, encoding="utf-8", xml_declaration=True) + + def OrthoInsertNode(self): + """正射算法专用,插入节点""" + tree = ElementTree() + tree.parse(self.path) # 影像头文件 + root = tree.getroot() + + # 插入节点 + count2 = 0 + count2_01=1 + element_trees3 = list(root) + for element in element_trees3: + count2 = count2+1 + if element.tag == "sensor": + element.tail = "\n\n\t" + count2_01 = count2-1 + b = self.create_node("l1aInfo", {}, "\n\t\t") + b.tail = "\n\n\t" + root.insert(count2_01+1, b) + + # 查询节点位置 + node_l1aInfo=root.find("l1aInfo") + + img_tree = ElementTree() + img_tree.parse(self.input_image_path) # 影像头文件 + img_root = img_tree.getroot() + + node_imageinfo = img_root.find("imageinfo") + node_processinfo=img_root.find("processinfo") + + ele_node_imageinfo = list(node_imageinfo) + ele_node_processinfo= list(node_processinfo) + + for i in ele_node_imageinfo: + if i.tag == "QualifyValue": + i.tail = "\n\t\t" + node_l1aInfo.append(i) + + for j in ele_node_processinfo: + if j.tag == "CalibrationConst": + j.tail = "\n\t" #后一个节点的位置 + node_l1aInfo.append(j) + tree.write(self.path, encoding="utf-8", xml_declaration=True) + + def process(self,SrcImageName): + """ + 不涉及到地表覆盖调用此函数 + """ + if self.input_image_path is None: + import xml.etree.cElementTree as ET + product = ET.Element("product") # 根节点tag= "product" + product.text = "\n\t" + tree = ET.ElementTree(product) + tree.write(self.path) + count = 0 + count_2 = -1 + else: + count = self.create_xml() + count_2 = count + self.add_standard_xml(count) + self.add_img_xml(count_2, SrcImageName) + self.add_info_xml() + + def process2(self, type_id_name, type_id_parent,SrcImageName): + """ + 涉及到地表覆盖的调用此函数 + type_id_name={"101":"耕地","502":"草地"} + type_id_parent={"101":"1","502":"5"} + """ + count = self.create_xml() + self.add_standard_xml(count) + self.add_img_xml(count,SrcImageName) + self.add_info_xml() + self.add_class_info(type_id_name, type_id_parent) + self.rewrite_name() + + def process3(self,SrcImageName): + """ + 正射调用此函数 + """ + if self.input_image_path is None: + import xml.etree.cElementTree as ET + product = ET.Element("product") # 根节点tag= "product" + product.text = "\n\t" + tree = ET.ElementTree(product) + tree.write(self.path) + count = 0 + else: + count = self.create_xml() + self.add_standard_xml(count) + self.add_img_xml(count, SrcImageName) + self.add_info_xml() + self.OrthoInsertNode() + diff --git a/tool/algorithm/xml/CreateMetaDict.py b/tool/algorithm/xml/CreateMetaDict.py new file mode 100644 index 0000000..f9791c5 --- /dev/null +++ b/tool/algorithm/xml/CreateMetaDict.py @@ -0,0 +1,246 @@ +import json +from xml.etree.ElementTree import ElementTree, Element +import shutil + +import xmltodict + +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.PreProcess import PreProcess as pp +from osgeo import gdal +import numpy as np +import datetime +import os +import glob +os.environ['PROJ_LIB'] = r"E:\soft\Anaconda\envs\micro\Lib\site-packages\osgeo\data\proj" + +class CreateMetaDict: + def __init__(self, image_path, origin_xml, pack_path, out_path1, out_path2): + self.ImageHandler = ImageHandler() + self.image_path = image_path + self.origin_xml = origin_xml + self.pack_path = pack_path + self.file_size = self.get_file_size() + self.out_path1 = out_path1 + self.out_path2 = out_path2 + self.timeDict = self.get_productTime() + pass + + def calu_nature(self): + """ + 将productinfo节点需要填写的信息存入字典中 + image_path:影像路径 + image_pair:输入的压缩包中的极化对 例:hh,hv,vh,vv=【1,1,1,1】 + out_path1:地理转平面的输出路径 + out_path2:平面转地理的输出路径 + """ + + para_dict = {} + + proj = self.ImageHandler.get_projection(self.image_path) # 输出的影像若是投影坐标系则先转成地理坐标系 + keyword = proj.split("[", 2)[0] # 若是地理坐标系则pass + if keyword == "GEOGCS": + pass + elif keyword == "PROJCS": + pp.trans_projcs2geogcs(self.out_path2, self.image_path) + image_path = self.out_path2 + elif len(keyword) == 0 or keyword.strip() == "" or keyword.isspace() is True: + raise Exception('image projection is missing!') + + pp.trans_geogcs2projcs(self.out_path1, self.image_path) # 坐标投影, 地理转平面投影坐标 + imageinfo_widthspace = self.ImageHandler.get_geotransform(self.out_path1)[1] # 投影后的分辨率 + # imageinfo_heightspace = -self.ImageHandler.get_geotransform(out_path1)[5] # 投影后的分辨率 + # para_dict.update({"imageinfo_widthspace": imageinfo_widthspace}) + # para_dict.update({"imageinfo_heightspace": imageinfo_heightspace}) + + para_dict.update({"imageinfo_ProductResolution": imageinfo_widthspace}) + + para_dict.update({"imageinfo_ProductFormat": "GEOTIFF"}) + para_dict.update({"imageinfo_CompressionMethod": "None"}) + para_dict.update({"imageinfo_ProductSize": str(self.file_size) + "MB"}) #todo 产品总大小 + + get_scope = self.ImageHandler.get_scope(self.image_path) + point_upleft, point_upright, point_downleft, point_downright = get_scope[0], get_scope[1], get_scope[2], get_scope[3] + para_dict.update({"SpatialCoverageInformation_TopLeftLatitude": point_upleft[1]}) + para_dict.update({"SpatialCoverageInformation_TopLeftLongitude": point_upleft[0]}) + para_dict.update({"SpatialCoverageInformation_TopRightLatitude": point_upright[1]}) + para_dict.update({"SpatialCoverageInformation_TopRightLongitude": point_upright[0]}) + para_dict.update({"SpatialCoverageInformation_BottomLeftLatitude": point_downleft[1]}) + para_dict.update({"SpatialCoverageInformation_BottomLeftLongitude": point_downleft[0]}) + para_dict.update({"SpatialCoverageInformation_BottomRightLatitude": point_downright[1]}) + para_dict.update({"SpatialCoverageInformation_BottomRightLongitude": point_downright[0]}) + longitude_max = np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).max() + longitude_min = np.array([point_upleft[0], point_upright[0], point_downleft[0], point_downright[0]]).min() + latitude_max = np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).max() + latitude_min = np.array([point_upleft[1], point_upright[1], point_downleft[1], point_downright[1]]).min() + imageinfo_center_latitude = (latitude_max + latitude_min) / 2 + imageinfo_center_longitude = (longitude_max + longitude_min) / 2 + para_dict.update({"SpatialCoverageInformation_CenterLatitude": imageinfo_center_latitude}) + para_dict.update({"SpatialCoverageInformation_CenterLongitude": imageinfo_center_longitude}) + + para_dict.update({"TimeCoverageInformation_StartTime": self.timeDict.get("startTime")}) + para_dict.update({"TimeCoverageInformation_CenterTime": self.timeDict.get("centerTime")}) + para_dict.update({"TimeCoverageInformation_EndTime": self.timeDict.get("endTime")}) + + para_dict.update({"CoordinateReferenceSystemInformation_EarthEllipsoid": "WGS84"}) + para_dict.update({"CoordinateReferenceSystemInformation_MapProjection": "UTM"}) + para_dict.update({"CoordinateReferenceSystemInformation_ZoneNo": "None"}) + + para_dict.update({"MetaInfo_Unit": "none"}) # 设置单位 + para_dict.update({"MetaInfo_UnitDes": "无量纲"}) # 设置单位 + + # 补充ProductProductionInfo节信息 + data_name = os.path.basename(self.image_path) + strs = data_name.split("_") + para_dict.update({"DataSources_DataSource_Satellite": strs[0]}) + para_dict.update({"DataSources_DataSource_Sensor": strs[0]}) + + para_dict.update({"ObservationGeometry_SatelliteAzimuth": "None"}) + para_dict.update({"ObservationGeometry_SatelliteRange": "None"}) + + para_dict.update({"ProductProductionInfo_BandSelection": "1"}) + para_dict.update({"ProductProductionInfo_DataSourceDescription": "None"}) + para_dict.update({"ProductProductionInfo_DataSourceProcessingDescription": "参考产品介绍PDF"}) + productGentime = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + para_dict.update({"ProductProductionInfo_ProductionDate": productGentime}) + para_dict.update({"ProductProductionInfo_AuxiliaryDataDescription": ""}) + + # para_dict.update({"ProductPublishInfo_Processor": "德清院"}) # 生产者 + # para_dict.update({"ProductPublishInfo_DistributionUnit": "none"}) # 分发单位 + # para_dict.update({"ProductPublishInfo_ContactInformation": "none"}) # 联系信息 + return para_dict + + def get_productTime(self): + time_dict = {} + tree = ElementTree() + tree.parse(self.origin_xml) + root = tree.getroot() + + platform = root.find("platform") + if platform is None: + centerTime = " " + else: + centerTime = platform.find("CenterTime").text.split(".")[0] + + productInfo = root.find("imageinfo") + imagingTime = productInfo.find("imagingTime") + if imagingTime is None: + startTime = " " + endTime = " " + else: + startTime = imagingTime.find("start").text.split(".")[0] + endTime = imagingTime.find("end").text.split(".")[0] + + time_dict.update({"startTime": startTime}) + time_dict.update({"centerTime": centerTime}) + time_dict.update({"endTime": endTime}) + return time_dict + + def get_file_size(self): + in_tif_paths = list(glob.glob(os.path.join(self.pack_path, '*.tif'))) + in_tif_paths1 = list(glob.glob(os.path.join(self.pack_path, '*.tiff'))) + in_tif_paths += in_tif_paths1 + size = 0 + for file in in_tif_paths: + fsize = os.path.getsize(file) # 返回的是字节大小 + size += fsize + return round(size / float(1024*1024), 2) + + +class OrthoAzimuth: + + @staticmethod + def FindInfomationFromJson(HeaderFile_dom_json, node_path_list): + """ + 在Json文件中,按照指定路径解析出制定节点 + """ + result_node = HeaderFile_dom_json + for nodename in node_path_list: + result_node = result_node[nodename] + return result_node + + @staticmethod + def get_Azimuth_incidence(Azimuth_path): + Azimuth_incidence = 0 + if not os.path.exists(Azimuth_path): + return Azimuth_incidence + with open(Azimuth_path) as f: + Azimuth_incidence = f.readline() + return Azimuth_incidence + + @staticmethod + def read_Azimuth_incidence(xml_path): + # tree = ElementTree() + # tree.parse(xml_path) + # root = tree.getroot() + # Azimuth_incidence = float(root.find('ProductProductionInfo').find('ObservationGeometry').find('SatelliteAzimuth').text) + # return Azimuth_incidence + with open(xml_path, 'r', encoding='utf-8') as fp: + HeaderFile_dom_str = fp.read() + HeaderFile_dom = xmltodict.parse(HeaderFile_dom_str) # 将XML转成json文本 + HeaderFile_dom_json = json.loads(json.dumps(HeaderFile_dom)) + node_path_list = ['Root', 'ProductProductionInfo', 'ObservationGeometry', 'SatelliteAzimuth'] + Azimuth_incidence = OrthoAzimuth.FindInfomationFromJson(HeaderFile_dom_json, node_path_list) + return Azimuth_incidence + + +class CreateProductXml: + def __init__(self, par_dict, model_path, xml_path): + self.par_dict = par_dict + self.xml_path = xml_path + shutil.copy(model_path, xml_path) + pass + + def create_standard_xml(self): + """将字典中的信息写入到copy的xml文件中""" + tree = ElementTree() + tree.parse(self.xml_path) # 影像头文件 + root = tree.getroot() + + productinfo = root.find("ProductBasicInfo") + for key, value in self.par_dict.items(): + if key.split("_")[0] == "imageinfo": + productinfo.find(key.split("_")[1]).text = str(value) + elif key.split("_")[0] == "SpatialCoverageInformation": + imageinfo = productinfo.find("SpatialCoverageInformation") + imageinfo.find(key.split("_")[1]).text = str(value) + elif key.split("_")[0] == "TimeCoverageInformation": + timeInfo = productinfo.find("TimeCoverageInformation") + timeInfo.find(key.split("_")[1]).text = str(value) + elif key.split("_")[0] == "CoordinateReferenceSystemInformation": + geoInfo = productinfo.find("CoordinateReferenceSystemInformation") + geoInfo.find(key.split("_")[1]).text = str(value) + elif key.split("_")[0] == "MetaInfo": + metaInfo = productinfo.find("MetaInfo") + metaInfo.find(key.split("_")[1]).text = str(value) + ProductProductionInfo = root.find("ProductProductionInfo") # 原始数据信息 + for key, value in self.par_dict.items(): + if key.split("_")[0] == "DataSources": + dataSources = ProductProductionInfo.find("DataSources") + dataSource = dataSources.find("DataSource") + dataSource.find(key.split("_")[2]).text = str(value) + elif key.split("_")[0] == "ObservationGeometry": + ObservationGeometry = ProductProductionInfo.find("ObservationGeometry") + ObservationGeometry.find(key.split("_")[1]).text = str(value) + elif key.split("_")[0] == "ProductProductionInfo": + ProductProductionInfo.find(key.split("_")[1]).text = str(value) + + # ProductPublishInfo = root.find("ProductPublishInfo") # 发布者信息 + # for key, value in self.par_dict.items(): + # if key.split("_")[0] == "ProductPublishInfo": + # ProductPublishInfo.find(key.split("_")[1]).text = str(value) + + tree.write(self.xml_path, encoding="utf-8", xml_declaration=True) + +if __name__ == '__main__': + + image_path = r'D:\Micro\WorkSpace\test\GF3B_MYC_QPSI_003581_E120.6_N31.3_20220729_L1B_h_h_L10000073024_db_RD_geo.tif' + origin_xml = r'D:\Micro\WorkSpace\Ortho\Temporary\package\GF3B_MYC_QPSI_003581_E120.6_N31.3_20220729_L1A_AHV_L10000073024.meta.xml' + tem_folder = r'D:\Micro\WorkSpace\test' + pack_path = r'D:\Micro\WorkSpace\Ortho\Temporary\package' + out_dem_path1 = os.path.join(tem_folder, "trans_dem_geo_projcs.tif") + out_dem_path2 = os.path.join(tem_folder, "trans_dem_projcs_geo.tif") + para_dict = CreateMetaDict(image_path, origin_xml, pack_path, out_dem_path1, out_dem_path2).calu_nature() + + model_path = r'D:\Project\microproduct\Ortho\product.xml' + xml_path = r'D:\Micro\WorkSpace\test\test.xml' + CreateProductXml(para_dict, model_path, xml_path).create_standard_xml() diff --git a/tool/config/ConfigeHandle.py b/tool/config/ConfigeHandle.py new file mode 100644 index 0000000..05c9423 --- /dev/null +++ b/tool/config/ConfigeHandle.py @@ -0,0 +1,48 @@ +# -*- coding: UTF-8 -*- +""" +@Project :onestar +@File :ConfigeHandle.py +@Contact:https://blog.csdn.net/songlh1234/article/details/83316468 +@Author :SHJ +@Date :2021/11/23 16:57 +@Version :1.0.0 +""" +import os +import configparser + + +class Config: + """读写初始化配置文件""" + def __init__(self): + pass + + @staticmethod + def get(para_name, option='config', config_name='config.ini'): + config = configparser.ConfigParser() + config_path = os.path.join(os.getcwd(), config_name) + config.read(config_path, encoding='utf-8') + config.sections() + exe_name = config.get(option, para_name) + return exe_name + + def get_list(self, para_name, option='config', config_name='config.ini'): + config = configparser.ConfigParser() + config_path = os.path.join(os.getcwd(), config_name) + config.read(config_path, encoding='utf-8') + config.sections() + str_name = config.get(option, para_name) + # 去除空格和回车 + str_name = str(str_name).replace("\n", "").replace(' ', '') # 去除空格和回车 + # 分割成lists + name_list = str_name.split(',') + return name_list + + +if __name__ == '__main__': + # c = Config() + # a = c.get('exe_name') + # b = bool(c.get('debug')) + # d = int(c.get('cover_threshold')) + # f = float(c.get('ndvi_threshold')) + + print('done') \ No newline at end of file diff --git a/tool/csv/csvHandle.py b/tool/csv/csvHandle.py new file mode 100644 index 0000000..5ad7793 --- /dev/null +++ b/tool/csv/csvHandle.py @@ -0,0 +1,265 @@ +# -*- coding: UTF-8 -*- +""" +@Project : microproduct +@File : csvHandle.py +@Function : 读写csv文件 +@Contact : +@Author:SHJ +@Date:2022/11/6 +@Version:1.0.0 +""" +import random +import csv +import logging +import numpy as np +from tool.algorithm.image.ImageHandle import ImageHandler +from tool.algorithm.algtools.CoordinateTransformation import geo2imagexy +from tool.algorithm.transforml1a.transHandle import TransImgL1A +logger = logging.getLogger("mylog") + + +class csvHandle: + def __init__(self, row=0, col=0): + self.imageHandler = ImageHandler() + self.row = row + self.col = col + self.img_falg = False + if row != 0 and col != 0: + self.roi_img = np.zeros((row, col), dtype=float) + self.img_falg = True + + def get_roi_img(self): + if self.img_falg: + self.roi_img[self.roi_img == 0] = np.nan + return self.roi_img + else: + return np.array([]) + + @staticmethod + def readcsv(csv_path): + reader = csv.reader(open(csv_path, newline='')) + csv_list = [] + for line_data in reader: + csv_list.append(line_data) + return csv_list[1:] + + def trans_measuredata(self, meas_data, tif_path): + file_name = tif_path + dataset = self.imageHandler.get_dataset(file_name) + rows = self.imageHandler.get_img_height(file_name) + cols = self.imageHandler.get_img_width(file_name) + measdata_list = [] + logger.info('[MEASURE DATA]') + for data in meas_data: + lon = float(data[1]) + lat = float(data[2]) + coord = geo2imagexy(dataset, lon, lat) + row = round(coord[1]) + col = round(coord[0]) + + if row >= 0 and row <= rows and col >= 0 and col <= cols: + measdata_list.append([row, col, float(data[3])]) + logger.info([row, col, float(data[3])]) + else: + logger.warning("measure data: %s is beyond tif scope !", data) + pass + return measdata_list + + def write_roi_img_data(self, points, type_id): + if self.img_falg: + for p in points: + r = p[0] + c = p[1] + if r < self.row and c < self.col: + self.roi_img[r, c] = type_id + + + def trans_landCover_measuredata(self, meas_data, cuted_ori_sim_path, max_train_num =100000): + """ + 获取多边形区域内所有的点,分为训练集数据和测试集数据 + :para meas_data: csv读取的实测数据 + """ + type_data = {} + n = 1 + train_data_list = [] + for data in meas_data: + for d in data: + if d == '': + raise Exception('there are empty data!', data) + + type_id = int(data[1]) + type_name = data[2] + if type_id not in type_data.keys(): + train_data_list.append([n, type_id, type_name, []]) + type_data.update({type_id: type_name}) + n += 1 + + pointList = self.__roiPolygonAnalysis(data[3]) + for points in pointList: + roi_poly = [(float(lon), float(lat)) for (lon, lat) in points] + tr = TransImgL1A(cuted_ori_sim_path, roi_poly) + if tr._mask is not None: + points = tr.get_roi_points() + for train_data in train_data_list: + if train_data[1] == type_id: + train_data[3] += points + self.write_roi_img_data(points, type_id) + if train_data[3] == [] : + raise Exception('there are empty data!', train_data) + if len(train_data_list) <= 1: + raise Exception('there is only one label type!', train_data_list) + + for train_data in train_data_list: + logger.info(str(train_data[0]) + "," + str(train_data[2]) + "," + "num:" + str(len(train_data[3]))) + max_num = max_train_num + if (len(train_data[3]) > max_num): + logger.info("max number =" + str(max_num) + ", random select" + str(max_num) + " point as train data!") + train_data[3] = random.sample(train_data[3], max_num) + + return train_data_list + + def trans_landCover_measuredata_dic(self, meas_data, cuted_ori_sim_path,max_train_num=100000): + train_data_list = self.trans_landCover_measuredata(meas_data, cuted_ori_sim_path,max_train_num) + return self.trans_landCover_list2dic(train_data_list) + + @staticmethod + def trans_landCover_list2dic(train_data_list): + ids = [] + class_ids = [] + ch_names = [] + positions = [] + for data in train_data_list: + ids.append(data[0]) + class_ids.append(data[1]) + ch_names.append(data[2]) + positions.append(data[3]) + + train_data_dic = {} + train_data_dic.update({"ids": ids}) + train_data_dic.update({"class_ids": class_ids}) + train_data_dic.update({"ch_names": ch_names}) + train_data_dic.update({"positions": positions}) + return train_data_dic + + @staticmethod + def __roiPolygonAnalysis(roiStr): + """ + 将csv的POLY数据转为数组 + :para roiStr: poly数据 + :return pointList: 保存多边形的list + """ + pointList = [] + strContent = roiStr.replace("POLYGON", "") + # 解析轮廓字符串为二维数组 + bracketsList = [] + strTemp = '' + strList = [] + for c in strContent: + if c == '(': + bracketsList.append(c) + continue + elif c == ')': + if len(bracketsList) > 0: + bracketsList.pop(0) + if len(strTemp) > 0: + strList.append(strTemp) + strTemp = '' + else: + strTemp += c + for item in strList: + if len(item) == 0: + continue + pTempList = item.split(',') + pList = [] + for row in pTempList: + cells = row.split(' ') + if len(cells) != 2: + continue + point = [float(cells[0]), float(cells[1])] + pList.append(point) + pointList.append(pList) + return pointList + + def class_landcover_list(self, csv_path): + """ + 输出csv表中的前三列 + """ + reader = csv.reader(open(csv_path, newline='')) + class_list=[] + type_id_name = {} + type_id_parent = {} + for line_data in reader: + class_list.append(line_data) # class_list含有四列 + for data in class_list[1:]: + type_parent= data[0] + type_id = int(data[1]) + type_name = data[2] + + if type_id not in type_id_name.keys(): + type_id_name.update({type_id: type_name}) + type_id_parent.update({type_id: type_parent}) + return type_id_name, type_id_parent + + def trans_VegePhenology_measdata_dic(self, meas_data, cuted_ori_sim_path): + """ + 获取多边形区域内所有的点,分为训练集数据和测试集数据 + :para meas_data: csv读取的实测数据 + """ + train_data = [] + test_data = [] + type_data = {} + + for data in meas_data: + data_use_type = data[0] + sar_img_name = data[1] + name = sar_img_name.rstrip('.tar.gz') + + if data_use_type == 'train': + phenology_id = int(data[2]) + phenology_name = data[3] + if phenology_id not in type_data.keys(): + type_data.update({phenology_id: phenology_name}) + else: + phenology_id = -1 + + pointList = self.__roiPolygonAnalysis(data[4]) + l1a_points = [] + for points in pointList: + roi_poly = [(float(lon), float(lat)) for (lon, lat) in points] + tr = TransImgL1A(cuted_ori_sim_path, roi_poly) + l1a_points = tr.get_roi_points() + # l1a_points = tr.get_lonlat_points() + if data_use_type == 'train': + train_data.append([name, phenology_id, l1a_points, type_data[phenology_id]]) + elif data_use_type == 'test': + test_data.append([name, phenology_id, l1a_points]) + type_map = [] + for n, id in zip(range(len(type_data)), type_data): + type_map.append([n + 1, id, type_data[id]]) + + return train_data, test_data, type_map + + @staticmethod + def vegePhenology_class_list(csv_path): + """ + 输出csv表中的前三列 + """ + reader = csv.reader(open(csv_path, newline='')) + class_list=[] + type_id_name = {} + for line_data in reader: + class_list.append(line_data) # class_list含有四列 + for data in class_list[1:]: + type_id = data[2] + type_name = data[3] + + if type_id not in type_id_name.keys(): + if type_id.strip() != "": + type_id_name.update({type_id: type_name}) + return type_id_name + +# if __name__ == '__main__': + # csvh = csvHandle() + # csv_path = r"I:\preprocessed\VegetationPhenologyMeasureData_E118.9_N31.4.csv" + # data = csvh.trans_VegePhenology_measdata_dic(csvh.readcsv(csv_path),r"I:\preprocessed\GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422_RPC_ori_sim_preprocessed.tif") + # pass \ No newline at end of file diff --git a/tool/file/fileHandle.py b/tool/file/fileHandle.py new file mode 100644 index 0000000..28ce04e --- /dev/null +++ b/tool/file/fileHandle.py @@ -0,0 +1,88 @@ +# -*- coding: UTF-8 -*- +""" +@Project : microproduct +@File : fileHandle.py +@Function : 文件创建、删除、解压、打包 +@Contact : +@Author:SHJ +@Date:2022/11/6 +@Version:1.0.0 +""" +import os +import tarfile +import shutil + +class fileHandle: + def __init__(self, debug_mode=False): + self.__debug_mode = debug_mode + + def creat_dirs(self, path_list): + """ + 创建文件夹 + """ + for path in path_list: + if os.path.exists(path): + if self.__debug_mode is True: + continue + self.del_folder(path) + os.makedirs(path) + else: + os.makedirs(path) + + def del_folder(self, dic): + """ + 删除整个文件夹 + """ + if self.__debug_mode is True: + return + if os.path.isdir(dic): + shutil.rmtree(dic) + + def del_file(self, path_data): + """ + 只删除文件,不删除文件夹 + """ + for i in os.listdir(path_data): # os.listdir(path_data)#返回一个列表,里面是当前目录下面的所有东西的相对路径 + file_data = path_data + '\\' + i # 当前文件夹的下面的所有东西的绝对路径 + if os.path.isfile(file_data) is True: # os.path.isfile判断是否为文件,如果是文件,就删除.如果是文件夹.递归给del_file. + os.remove(file_data) + else: + self.del_file(file_data) + + @staticmethod + def make_targz(output_filename, source_dir): + """ + 一次性打包整个根目录。空子目录会被打包。 + 如果只打包不压缩,将"w:gz"参数改为"w:"或"w"即可。 + :param output_filename:输出压缩包的完整路径,eg:'E:\test.tar.gz' + :param source_dir:需要打包的跟目录,eg: 'E:\testFfile\'打包文件夹里面的所有文件,'E:\testFfile'打包文件夹 + """ + dir = os.path.split(output_filename)[0] + if os.path.exists(dir) is False: + os.makedirs(dir) + with tarfile.open(output_filename, "w:gz") as tar: + tar.add(source_dir, arcname=os.path.basename(source_dir)) + + @staticmethod + def de_targz(tar_gz_path, file_dir): + name = os.path.split(tar_gz_path)[1].rstrip('.tar.gz') + if os.path.exists(file_dir) is False: + os.makedirs(file_dir) + # 解压 + t = tarfile.open(tar_gz_path) + t.extractall(path=file_dir) + + @staticmethod + def copyfile2dir(srcfile, dir): # 复制函数 + if not os.path.isfile(srcfile): + print("%s not exist!" % (srcfile)) + else: + fpath, fname = os.path.split(srcfile) # 分离文件名和路径 + if not os.path.exists(dir): + os.makedirs(dir) # 创建路径 + shutil.copy(srcfile, dir + fname) # 复制文件 + +# if __name__ == '__main__': +# file = fileHandle() +# file.del_floder("I:\preprocessed") +# pass \ No newline at end of file diff --git a/tool/logs/logHandler.py b/tool/logs/logHandler.py new file mode 100644 index 0000000..b4cbad1 --- /dev/null +++ b/tool/logs/logHandler.py @@ -0,0 +1,90 @@ +# -*- coding: UTF-8 -*- +""" +@Project :microproduct +@File :logHandler.py +@Author :SHJ +@Date :2021/9/6 +@Version :1.0.0 +""" +import logging +import os +# from logging import handlers +import time +import datetime + + +class LogHandler: + """ + 生成日志 + """ + __logger = logging.getLogger("mylog") + __format_str = logging.Formatter("[%(asctime)s] [%(process)d] [%(levelname)s] - %(module)s.%(funcName)s " + "(%(filename)s:%(lineno)d) - %(message)s") + __log_path = None + + @staticmethod + def init_log_handler(log_name): + """ + 初始化日志 + :param log_name: 日志保存的路径和名称 + :return: + """ + path = os.getcwd() + current_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(time.time())) + LogHandler.__log_path = os.path.join(path, log_name + current_time + ".log") + para_dir = os.path.split(LogHandler.__log_path) + if not os.path.exists(para_dir[0]): + os.makedirs(para_dir[0]) + # 删除七天以前的文件 + LogHandler.delete_outdate_files(para_dir[0], 7) + + # 方法1:普通日志 + LOG_FORMAT = "[%(asctime)s] [%(process)d] [%(levelname)s]- %(message)s ---from: %(module)s.%(funcName)s" \ + " (%(filename)s:Line%(lineno)d) " + DATE_FORMAT = "%m/%d/%Y %H:%M:%S" + fp = logging.FileHandler(LogHandler.__log_path, encoding='utf-8') + fs = logging.StreamHandler() + logging.basicConfig(level=logging.INFO, format=LOG_FORMAT, datefmt=DATE_FORMAT, handlers=[fp, fs]) # 调用 + + # 方法2:回滚日志 + # LogHandler.__logger.setLevel(logging.DEBUG) + # th = handlers.TimedRotatingFileHandler(filename=LogHandler.__log_path, when='S', interval=1, + # backupCount=2, encoding='utf-8') + # th.suffix = "%Y-%m-%d-%H-%M-%S.log" + # th.setFormatter(LogHandler.__format_str) + # th.setLevel(level=logging.DEBUG) + + # console = logging.StreamHandler() + # console.setLevel(logging.INFO) + # LogHandler.__logger.addHandler(console) + # LogHandler.__logger.addHandler(th) + + @staticmethod + def delete_outdate_files(path, date_interval=7): + """ + 删除目录下七天前创建的文件 + """ + current_time = time.strftime("%Y-%m-%d", time.localtime(time.time())) + current_timeList = current_time.split("-") + current_time_day = datetime.datetime(int(current_timeList[0]), int(current_timeList[1]), + int(current_timeList[2])) + for root, dirs, files in os.walk(path): + for item in files: + item_format = item.split(".", 2) + if item_format[1] == "log": + file_path = os.path.join(root, item) + create_time = time.strftime("%Y-%m-%d", time.localtime((os.stat(file_path)).st_mtime)) + create_time_list = create_time.split("-") + create_time_day = datetime.datetime(int(create_time_list[0]), int(create_time_list[1]), + int(create_time_list[2])) + time_difference = (current_time_day - create_time_day).days + if time_difference > date_interval: + os.remove(file_path) + +# +# if __name__ == "__main__": +# # eg2: +# log_handler = LogHandler() +# log_handler.init_log_handler(r"run_log\myrun1") +# logging.warning("1") +# print("done") diff --git a/tool/newimage.csv b/tool/newimage.csv new file mode 100644 index 0000000..6394f2b --- /dev/null +++ b/tool/newimage.csv @@ -0,0 +1,47 @@ +sar_img_name,phenology_id,phenology_name,roi_polygon +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,10,water,"POLYGON((118.91799748 31.46893509,118.91762055 31.46674878,118.9210883 31.46637183,118.9210883 31.46855814,118.91799748 31.46893509))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,10,water,"POLYGON((118.90864966 31.46388396,118.90861196 31.46384627,118.90857427 31.46380857,118.90608654 31.46188613,118.90608654 31.46181074,118.90940351 31.46015216,118.91155201 31.46199921,118.90864966 31.46388396))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,10,water,"POLYGON((118.91898928 31.45778718,118.91893038 31.45478336,118.91893038 31.45472446,118.91898928 31.45472446,118.9246432 31.45472446,118.9247021 31.45472446,118.92499657 31.45872956,118.91898928 31.45778718))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.89543794 31.46174102,118.89452125 31.4583153,118.8948831 31.45807405,118.89599277 31.46171689,118.89543794 31.46174102))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.8940629 31.45653006,118.89280848 31.45312847,118.8932427 31.45308022,118.89326683 31.45308022,118.89442475 31.45636119,118.8940629 31.45653006))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.89132626 31.44844806,118.89046628 31.4453566,118.89079168 31.44540309,118.89081492 31.44542633,118.89083817 31.44544958,118.89086141 31.44547282,118.89172139 31.44840157,118.89132626 31.44844806))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.89028034 31.4441944,118.89016413 31.44256732,118.89044304 31.44256732,118.89046628 31.44259056,118.89048953 31.4426138,118.89051277 31.44266029,118.8907452 31.44472901,118.89028034 31.4441944))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.89000143 31.44193973,118.88997819 31.44193973,118.88997819 31.44189324,118.88923442 31.43399026,118.8894436 31.43403675,118.89018737 31.44191648,118.89000143 31.44193973))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.88897526 31.42114936,118.8888637 31.4205915,118.8888637 31.4205729,118.89468368 31.41977331,118.89470227 31.41977331,118.89472087 31.41977331,118.89499978 31.42042414,118.88897526 31.42114936))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.88025459 31.42230226,118.88010583 31.42153986,118.88594441 31.42088902,118.885963 31.42088902,118.8866138 31.42155845,118.88025459 31.42230226))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.87595933 31.42280433,118.87577339 31.42222788,118.87977114 31.42178159,118.87999427 31.42228367,118.87595933 31.42280433))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.89870564 31.41809418,118.89826403 31.41748983,118.89826403 31.41746659,118.89828727 31.41744335,118.90193638 31.41511894,118.90261042 31.41551409,118.89870564 31.41809418))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,20,build,"POLYGON((118.86530883 31.42443948,118.86630754 31.42325911,118.87384328 31.42257814,118.87388867 31.42257814,118.87397946 31.42253274,118.87411565 31.42253274,118.87493278 31.42307752,118.87488738 31.42312292,118.87479659 31.42312292,118.86530883 31.42443948))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.91830432 31.38444815,118.91828107 31.3844249,118.91828107 31.38440166,118.9183508 31.38433193,118.91958267 31.3826816,118.91960591 31.3826816,118.9223718 31.38421571,118.9223718 31.38423895,118.9223718 31.38426219,118.92146533 31.38628443,118.91830432 31.38444815))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.93304021 31.37921823,118.93396992 31.37812576,118.93399316 31.37812576,118.93401641 31.37812576,118.93536449 31.37919499,118.93464396 31.38033395,118.93304021 31.37921823))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.93629419 31.37882309,118.93627095 31.37882309,118.93627095 31.37879984,118.93701472 31.37756791,118.93752606 31.37780035,118.93752606 31.37782359,118.93666608 31.37905553,118.93629419 31.37882309))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.93680553 31.38465734,118.9372239 31.38396002,118.93817686 31.38454112,118.9382001 31.38454112,118.93822334 31.38456437,118.93810713 31.38533142,118.93808389 31.38535467,118.93680553 31.38465734))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.94384808 31.38312765,118.94420137 31.38271856,118.94421997 31.38271856,118.94423856 31.38271856,118.94505671 31.38325782,118.94453607 31.38387146,118.94384808 31.38312765))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.94066848 31.37855322,118.94096598 31.37806975,118.94096598 31.37805115,118.94096598 31.37803256,118.94096598 31.37801396,118.94096598 31.37799537,118.94223039 31.37881356,118.94163538 31.37946439,118.94161678 31.37946439,118.94066848 31.37855322))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.93942267 31.3813797,118.9396272 31.38108218,118.9396458 31.38108218,118.94048254 31.38154706,118.94022222 31.38204913,118.93942267 31.3813797))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.94446169 31.38115656,118.94479639 31.38069168,118.94576329 31.38136111,118.94546578 31.38193756,118.94446169 31.38115656))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.94968666 31.38693968,118.94968666 31.38690249,118.9498912 31.38660496,118.94990979 31.38660496,118.95063496 31.38701406,118.95033746 31.38740456,118.94968666 31.38693968))" +GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422-ortho,30,road,"POLYGON((118.95310799 31.37931563,118.95310799 31.37929703,118.9537216 31.37885075,118.95374019 31.37883215,118.95379598 31.37879496,118.95463271 31.37931563,118.95418645 31.3798363,118.95310799 31.37931563))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,10,water,"POLYGON((118.91799748 31.46893509,118.91762055 31.46674878,118.9210883 31.46637183,118.9210883 31.46855814,118.91799748 31.46893509))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,10,water,"POLYGON((118.90864966 31.46388396,118.90861196 31.46384627,118.90857427 31.46380857,118.90608654 31.46188613,118.90608654 31.46181074,118.90940351 31.46015216,118.91155201 31.46199921,118.90864966 31.46388396))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,10,water,"POLYGON((118.91898928 31.45778718,118.91893038 31.45478336,118.91893038 31.45472446,118.91898928 31.45472446,118.9246432 31.45472446,118.9247021 31.45472446,118.92499657 31.45872956,118.91898928 31.45778718))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.89543794 31.46174102,118.89452125 31.4583153,118.8948831 31.45807405,118.89599277 31.46171689,118.89543794 31.46174102))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.8940629 31.45653006,118.89280848 31.45312847,118.8932427 31.45308022,118.89326683 31.45308022,118.89442475 31.45636119,118.8940629 31.45653006))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.89132626 31.44844806,118.89046628 31.4453566,118.89079168 31.44540309,118.89081492 31.44542633,118.89083817 31.44544958,118.89086141 31.44547282,118.89172139 31.44840157,118.89132626 31.44844806))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.89028034 31.4441944,118.89016413 31.44256732,118.89044304 31.44256732,118.89046628 31.44259056,118.89048953 31.4426138,118.89051277 31.44266029,118.8907452 31.44472901,118.89028034 31.4441944))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.89000143 31.44193973,118.88997819 31.44193973,118.88997819 31.44189324,118.88923442 31.43399026,118.8894436 31.43403675,118.89018737 31.44191648,118.89000143 31.44193973))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.88897526 31.42114936,118.8888637 31.4205915,118.8888637 31.4205729,118.89468368 31.41977331,118.89470227 31.41977331,118.89472087 31.41977331,118.89499978 31.42042414,118.88897526 31.42114936))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.88025459 31.42230226,118.88010583 31.42153986,118.88594441 31.42088902,118.885963 31.42088902,118.8866138 31.42155845,118.88025459 31.42230226))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.87595933 31.42280433,118.87577339 31.42222788,118.87977114 31.42178159,118.87999427 31.42228367,118.87595933 31.42280433))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.89870564 31.41809418,118.89826403 31.41748983,118.89826403 31.41746659,118.89828727 31.41744335,118.90193638 31.41511894,118.90261042 31.41551409,118.89870564 31.41809418))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,20,build,"POLYGON((118.86530883 31.42443948,118.86630754 31.42325911,118.87384328 31.42257814,118.87388867 31.42257814,118.87397946 31.42253274,118.87411565 31.42253274,118.87493278 31.42307752,118.87488738 31.42312292,118.87479659 31.42312292,118.86530883 31.42443948))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.91830432 31.38444815,118.91828107 31.3844249,118.91828107 31.38440166,118.9183508 31.38433193,118.91958267 31.3826816,118.91960591 31.3826816,118.9223718 31.38421571,118.9223718 31.38423895,118.9223718 31.38426219,118.92146533 31.38628443,118.91830432 31.38444815))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.93304021 31.37921823,118.93396992 31.37812576,118.93399316 31.37812576,118.93401641 31.37812576,118.93536449 31.37919499,118.93464396 31.38033395,118.93304021 31.37921823))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.93629419 31.37882309,118.93627095 31.37882309,118.93627095 31.37879984,118.93701472 31.37756791,118.93752606 31.37780035,118.93752606 31.37782359,118.93666608 31.37905553,118.93629419 31.37882309))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.93680553 31.38465734,118.9372239 31.38396002,118.93817686 31.38454112,118.9382001 31.38454112,118.93822334 31.38456437,118.93810713 31.38533142,118.93808389 31.38535467,118.93680553 31.38465734))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.94384808 31.38312765,118.94420137 31.38271856,118.94421997 31.38271856,118.94423856 31.38271856,118.94505671 31.38325782,118.94453607 31.38387146,118.94384808 31.38312765))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.94066848 31.37855322,118.94096598 31.37806975,118.94096598 31.37805115,118.94096598 31.37803256,118.94096598 31.37801396,118.94096598 31.37799537,118.94223039 31.37881356,118.94163538 31.37946439,118.94161678 31.37946439,118.94066848 31.37855322))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.93942267 31.3813797,118.9396272 31.38108218,118.9396458 31.38108218,118.94048254 31.38154706,118.94022222 31.38204913,118.93942267 31.3813797))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.94446169 31.38115656,118.94479639 31.38069168,118.94576329 31.38136111,118.94546578 31.38193756,118.94446169 31.38115656))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.94968666 31.38693968,118.94968666 31.38690249,118.9498912 31.38660496,118.94990979 31.38660496,118.95063496 31.38701406,118.95033746 31.38740456,118.94968666 31.38693968))" +GF3_SAY_QPSI_013952_E118.9_N31.5_20190404_L1A_AHV_L10003923848-ortho,30,road,"POLYGON((118.95310799 31.37931563,118.95310799 31.37929703,118.9537216 31.37885075,118.95374019 31.37883215,118.95379598 31.37879496,118.95463271 31.37931563,118.95418645 31.3798363,118.95310799 31.37931563))" diff --git a/tool/testxmlreading.py b/tool/testxmlreading.py new file mode 100644 index 0000000..93e3742 --- /dev/null +++ b/tool/testxmlreading.py @@ -0,0 +1,98 @@ +#encoding=utf-8 +import os +import xml.etree.ElementTree as ET +import pandas as pd +import csv + +def xml2csv(xmlpath): + tree_obj = ET.parse(xmlpath) + + # 得到所有匹配Region 标签的Element对象的list集合 + list_Region = tree_obj.findall("Region") + for Region in list_Region: + # 几何面对应的类(phenology_name)在标签 + Region_dict = Region.attrib + phenology_name = Region_dict.get("name") + print(phenology_name) + list_GeometryDef = Region.findall("GeometryDef") + list_Polygon = list_GeometryDef[0].findall("Polygon") # 获得该类下的几何面list + for polygon in list_Polygon: + # 从polygon list中获取得到标签的数据 注意是空格分隔的和csv中不同 + Coordinates_list = coordinates = polygon.find('.//Coordinates').text.strip().split() + # POLYGON((119.035 31.51,119.035 31.50,119.033 31.50)) csv中 + print("value") + +# 向csv中写 +def csvfile(csvpath,data): + + with open(csvpath, 'a', newline='') as file: + # 2. step + writer = csv.writer(file) + # data example + #data = ["This", "is", "a", "Test"] + writer.writerow(data) + + +# Define the structure of the data +#data示例 student_header = ['name', 'age', 'major', 'minor'] +def csvcreateTitile(csvpath,data): + # 1. Open a new CSV file + with open(csvpath, 'w') as file: + # 2. Create a CSV writer + writer = csv.writer(file) + # 3. Write data to the file + writer.writerow(data) + +# 将列表中的坐标对转换为字符串 +def createcsv_roi_polygon(coordinates): + coord_str = ','.join([f'{coordinates[i]} {coordinates[i + 1]}' for i in range(0, len(coordinates), 2)]) + # 构建最终的POLYGON字符串 + polygon_str = f'POLYGON(({coord_str}))' + print(polygon_str) + return polygon_str + +def get_Azimuth_incidence(Azimuth_path): + Azimuth_incidence = 0 + if not os.path.exists(Azimuth_path): + print('get Azimuth_incidence failed!') + return Azimuth_incidence + with open(Azimuth_path) as f: + Azimuth_incidence = f.readline() + return Azimuth_incidence + +# if __name__ == '__main__': +# path = r"D:\micro\WorkSpace\Ortho1\Temporary\test.txt" +# value = get_Azimuth_incidence(path) +# print(value) +if __name__ == '__main__': + xmlpath = r"E:\MicroWorkspace\S_SAR\AHV\landCover.xml" + + tree_obj = ET.parse(xmlpath) + csv_header = ['sar_img_name', 'phenology_id', 'phenology_name', 'roi_polygon'] + csvpath = r"E:\MicroWorkspace\S_SAR\AHV\newimage.csv" + # csvcreateTitile(csvpath,csv_header) + csvfile(csvpath,csv_header) + # 得到所有匹配Region 标签的Element对象的list集合 + list_Region = tree_obj.findall("Region") + name_list = {} + count = 10 + for Region in list_Region: + # 几何面对应的类(phenology_name)在标签 + Region_dict = Region.attrib + phenology_name = Region_dict.get("name") + + if not phenology_name in name_list.keys(): + name_list.update({phenology_name: count}) + count += 10 + print(phenology_name) + # list_GeometryDef = Region.findall("GeometryDef") + list_Polygon = Region.findall(".//Polygon") # 获得该类下的几何面list + + for polygon in list_Polygon: + # 从polygon list中获取得到标签的数据 注意是空格分隔的和csv中不同 + Coordinates_list = coordinates = polygon.find('.//Coordinates').text.strip().split() + # 将坐标和ploygon对应的写入到.csv中 + polygon_str=createcsv_roi_polygon(Coordinates_list) + # POLYGON((119.035 31.51,119.035 31.50,119.033 31.50)) csv中 + data = ['0', name_list.get(phenology_name), phenology_name, polygon_str] + csvfile(csvpath, data)