diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2fcca72
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/dem-L-SAR/run_log/
diff --git a/Ortho-L-SAR/OrthoMain.py b/Ortho-L-SAR/OrthoMain.py
index e991dd9..ec88429 100644
--- a/Ortho-L-SAR/OrthoMain.py
+++ b/Ortho-L-SAR/OrthoMain.py
@@ -12,6 +12,7 @@ import logging
from tool.algorithm.block.blockprocess import BlockProcess
from tool.algorithm.image.ImageHandle import ImageHandler
+from tool.algorithm.xml.AnalysisXml import DictXml
from tool.algorithm.xml.CreateMetaDict import CreateMetaDict, CreateProductXml
from tool.algorithm.algtools.PreProcess import PreProcess as pp
import tarfile
@@ -523,11 +524,17 @@ class OrthoMain:
pass
-
def cut_dem(self, dem_merged_path, meta_file_path):
- left_up_lon = 0
- left_up_lat = 0
-
+ _, scopes = DictXml(meta_file_path).get_extend()
+ intersect_polygon = pp().intersect_polygon(scopes)
+ if intersect_polygon is None:
+ raise Exception('cal intersect box 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!')
+ dem_process = os.path.join(self.__workspace_Temporary_path, 'dem_cut.tif')
+ pp().cut_img(dem_process, dem_merged_path, shp_path)
+ return dem_process
def process_sim_ori(self, ori_sim, sim_ori):
diff --git a/backScattering-L-SAR/BackScattering-L-SAR.xml b/backScattering-L-SAR/BackScattering-L-SAR.xml
index ad8e829..fdf5e53 100644
--- a/backScattering-L-SAR/BackScattering-L-SAR.xml
+++ b/backScattering-L-SAR/BackScattering-L-SAR.xml
@@ -42,7 +42,7 @@
File
tar.gz
Cal
- E:\MicroWorkspace\LT1B\LT230919\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966.tar.gz
+ F:\MicroWorkspace\LT1B\LT230919\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966.tar.gz
True
False
File
@@ -57,7 +57,7 @@
File
tif
Cal
- E:\MicroWorkspace\LT1B\LT230919\DEM30m.tif
+ F:\MicroWorkspace\LT1B\LT230919\DEM30m.tif
True
True
File
@@ -74,7 +74,7 @@
File
tar.gz
Cal
- D:\micro\LWork\BackScattering\Output\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966-cal.tar.gz
+ D:\micro\LWork\BackScattering\Output\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966-CAL.tar.gz
DEFAULT
DEFAULT
DEFAULT
diff --git a/backScattering-L-SAR/BackScatteringMain.py b/backScattering-L-SAR/BackScatteringMain.py
index bb4adef..ba4bdff 100644
--- a/backScattering-L-SAR/BackScatteringMain.py
+++ b/backScattering-L-SAR/BackScatteringMain.py
@@ -11,6 +11,7 @@
import logging
from tool.algorithm.algtools.logHandler import LogHandler
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
@@ -24,7 +25,6 @@ import shutil
import tarfile
import sys
-
if cf.get('debug') == 'True':
DEBUG = True
else:
@@ -249,6 +249,18 @@ class ScatteringMain:
if os.path.exists(path):
self.del_floder(path)
+ def cut_dem(self, dem_merged_path, meta_file_path):
+ _, scopes = DictXml(meta_file_path).get_extend()
+ intersect_polygon = pp().intersect_polygon(scopes)
+ if intersect_polygon is None:
+ raise Exception('cal intersect box fail!')
+ shp_path = os.path.join(self.__workspace_preprocessing_path, 'IntersectPolygon.shp')
+ if pp().write_polygon_shp(shp_path, intersect_polygon, 4326) is False:
+ raise Exception('create intersect shp fail!')
+ dem_process = os.path.join(self.__workspace_preprocessing_path, 'dem_cut.tif')
+ pp().cut_img(dem_process, dem_merged_path, shp_path)
+ return dem_process
+
def process_sim_ori(self, ori_sim, sim_ori):
scopes = ()
@@ -303,6 +315,7 @@ class ScatteringMain:
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
+ dem_path = self.cut_dem(dem_merged_path, meta_file_path)
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):
@@ -310,7 +323,7 @@ class ScatteringMain:
break
# 获取校正模型后
- Orthorectification.preCaldem_sar_rc(dem_merged_path,in_slc_path,self.__workspace_preprocessing_path,self.__workspace_processing_path.replace("\\","\\\\")) # 初步筛选坐标范围
+ Orthorectification.preCaldem_sar_rc(dem_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")
@@ -465,7 +478,7 @@ if __name__ == '__main__':
start = datetime.datetime.now()
try:
if len(sys.argv)<2:
- xml_path = 'BackScattering.xml'
+ xml_path = 'BackScattering-L-SAR.xml'
else:
xml_path = sys.argv[1]
ScatteringMain = ScatteringMain(xml_path)
diff --git a/backScattering-L-SAR/run_log/BackScattering2023-11-21-18-32-28.log b/backScattering-L-SAR/run_log/BackScattering2023-11-21-18-32-28.log
deleted file mode 100644
index 7327b7c..0000000
--- a/backScattering-L-SAR/run_log/BackScattering2023-11-21-18-32-28.log
+++ /dev/null
@@ -1,19 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-L-SAR\backScattering
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:mylog:progress bar: 30%
-ERROR:mylog:run-time error!
-Traceback (most recent call last):
- File "D:/estar-proj/microproduct-L-SAR/backScattering/BackScatteringMain.py", line 471, in
- if not ScatteringMain.process_handle(start):
- File "D:/estar-proj/microproduct-L-SAR/backScattering/BackScatteringMain.py", line 292, in process_handle
- Orthorectification.IndirectOrthorectification(self.__in_processing_paras["SLC"], self.__workspace_processing_path) # 改动1
- File "D:\estar-proj\microproduct-L-SAR\backScattering\BackScatteringAlg.py", line 1520, in IndirectOrthorectification
- self.header_info = self.ParseHearderFile(os.path.join(FilePath_str, header_name))
- File "D:\estar-proj\microproduct-L-SAR\backScattering\BackScatteringAlg.py", line 1094, in ParseHearderFile
- GPSPoints = FindInfomationFromJson(HeaderFile_dom_json, GPSNode_Path)
- File "D:\estar-proj\microproduct-L-SAR\backScattering\BackScatteringAlg.py", line 131, in FindInfomationFromJson
- result_node = result_node[nodename]
-KeyError: 'product'
-INFO:mylog:running use time: 0:00:17.072831
diff --git a/backScattering-L-SAR/run_log/BackScattering2023-11-21-18-42-11.log b/backScattering-L-SAR/run_log/BackScattering2023-11-21-18-42-11.log
deleted file mode 100644
index 1fda6d5..0000000
--- a/backScattering-L-SAR/run_log/BackScattering2023-11-21-18-42-11.log
+++ /dev/null
@@ -1,30 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-L-SAR\backScattering
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:mylog:progress bar: 30%
-INFO:mylog:progress bar: 40%
-WARNING:mylog:LTMetaData.get_QualifyValue() error!
-ERROR:mylog:run-time error!
-Traceback (most recent call last):
- File "D:\estar-proj\microproduct-L-SAR\tool\algorithm\algtools\MetaDataHandler.py", line 85, in get_QualifyValue
- QualifyValue = OrthoMetaData.get_QualifyValue(meta_file_path, polarization)
- File "D:\estar-proj\microproduct-L-SAR\tool\algorithm\algtools\MetaDataHandler.py", line 47, in get_QualifyValue
- QualifyValue = float(root.find('processing').find('processingParameter').find('quantifyValue').find(polarization).text)
-AttributeError: 'NoneType' object has no attribute 'find'
-
-During handling of the above exception, another exception occurred:
-
-Traceback (most recent call last):
- File "D:/estar-proj/microproduct-L-SAR/backScattering/BackScatteringMain.py", line 471, in
- if not ScatteringMain.process_handle(start):
- File "D:/estar-proj/microproduct-L-SAR/backScattering/BackScatteringMain.py", line 371, in process_handle
- alg.sar_backscattering_coef(in_tif_path, meta_file_path, out_tif_path)
- File "D:\estar-proj\microproduct-L-SAR\backScattering\BackScatteringAlg.py", line 93, in sar_backscattering_coef
- QualifyValue = MetaDataHandler.get_QualifyValue(meta_file_path, polarization)
- File "D:\estar-proj\microproduct-L-SAR\tool\algorithm\algtools\MetaDataHandler.py", line 88, in get_QualifyValue
- QualifyValue = GF3L1AMetaData.get_QualifyValue(meta_file_path, polarization)
- File "D:\estar-proj\microproduct-L-SAR\tool\algorithm\algtools\MetaDataHandler.py", line 27, in get_QualifyValue
- QualifyValue = float(root.find('imageinfo').find('QualifyValue').find(polarization).text)
-AttributeError: 'NoneType' object has no attribute 'find'
-INFO:mylog:running use time: 0:00:26.594524
diff --git a/backScattering-L-SAR/run_log/BackScattering2023-11-21-18-44-18.log b/backScattering-L-SAR/run_log/BackScattering2023-11-21-18-44-18.log
deleted file mode 100644
index 23b3d46..0000000
--- a/backScattering-L-SAR/run_log/BackScattering2023-11-21-18-44-18.log
+++ /dev/null
@@ -1,30 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-L-SAR\backScattering
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:mylog:progress bar: 30%
-INFO:mylog:progress bar: 40%
-WARNING:mylog:LTMetaData.get_QualifyValue() error!
-ERROR:mylog:run-time error!
-Traceback (most recent call last):
- File "D:\estar-proj\microproduct-L-SAR\tool\algorithm\algtools\MetaDataHandler.py", line 85, in get_QualifyValue
- QualifyValue = OrthoMetaData.get_QualifyValue(meta_file_path, polarization)
- File "D:\estar-proj\microproduct-L-SAR\tool\algorithm\algtools\MetaDataHandler.py", line 47, in get_QualifyValue
- QualifyValue = float(root.find('processing').find('processingParameter').find('quantifyValue').find(polarization).text)
-AttributeError: 'NoneType' object has no attribute 'find'
-
-During handling of the above exception, another exception occurred:
-
-Traceback (most recent call last):
- File "D:/estar-proj/microproduct-L-SAR/backScattering/BackScatteringMain.py", line 471, in
- if not ScatteringMain.process_handle(start):
- File "D:/estar-proj/microproduct-L-SAR/backScattering/BackScatteringMain.py", line 371, in process_handle
- alg.sar_backscattering_coef(in_tif_path, meta_file_path, out_tif_path)
- File "D:\estar-proj\microproduct-L-SAR\backScattering\BackScatteringAlg.py", line 93, in sar_backscattering_coef
- QualifyValue = MetaDataHandler.get_QualifyValue(meta_file_path, polarization)
- File "D:\estar-proj\microproduct-L-SAR\tool\algorithm\algtools\MetaDataHandler.py", line 88, in get_QualifyValue
- QualifyValue = GF3L1AMetaData.get_QualifyValue(meta_file_path, polarization)
- File "D:\estar-proj\microproduct-L-SAR\tool\algorithm\algtools\MetaDataHandler.py", line 27, in get_QualifyValue
- QualifyValue = float(root.find('imageinfo').find('QualifyValue').find(polarization).text)
-AttributeError: 'NoneType' object has no attribute 'find'
-INFO:mylog:running use time: 0:08:05.774058
diff --git a/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-00-41.log b/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-00-41.log
deleted file mode 100644
index 36a1087..0000000
--- a/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-00-41.log
+++ /dev/null
@@ -1,5 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-L-SAR\backScattering
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:mylog:progress bar: 30%
diff --git a/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-03-11.log b/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-03-11.log
deleted file mode 100644
index 1336962..0000000
--- a/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-03-11.log
+++ /dev/null
@@ -1,17 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-L-SAR\backScattering
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:mylog:progress bar: 30%
-INFO:mylog:progress bar: 40%
-INFO:mylog:progress bar: 90%
-ERROR:mylog:run-time error!
-Traceback (most recent call last):
- File "D:/estar-proj/microproduct-L-SAR/backScattering/BackScatteringMain.py", line 471, in
- if not ScatteringMain.process_handle(start):
- File "D:/estar-proj/microproduct-L-SAR/backScattering/BackScatteringMain.py", line 437, in process_handle
- para_dict = CreateMetaDict(image_path, self.__in_processing_paras['META'], self.__workspace_processing_path,
- File "D:\estar-proj\microproduct-L-SAR\tool\algorithm\xml\CreateMetaDict.py", line 58, in calu_nature
- imageinfo_widthspace = self.ImageHandler.get_geotransform(self.out_path1)[1] # 投影后的分辨率
-TypeError: 'NoneType' object is not subscriptable
-INFO:mylog:running use time: 0:10:04.334320
diff --git a/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-27-00.log b/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-27-00.log
deleted file mode 100644
index 1e18da4..0000000
--- a/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-27-00.log
+++ /dev/null
@@ -1,7 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-L-SAR\backScattering
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:mylog:progress bar: 30%
-INFO:mylog:progress bar: 40%
-INFO:mylog:progress bar: 90%
diff --git a/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-40-46.log b/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-40-46.log
deleted file mode 100644
index 1e18da4..0000000
--- a/backScattering-L-SAR/run_log/BackScattering2023-11-21-19-40-46.log
+++ /dev/null
@@ -1,7 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-L-SAR\backScattering
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:mylog:progress bar: 30%
-INFO:mylog:progress bar: 40%
-INFO:mylog:progress bar: 90%
diff --git a/backScattering-L-SAR/run_log/BackScattering2023-11-22-11-12-38.log b/backScattering-L-SAR/run_log/BackScattering2023-11-22-11-12-38.log
deleted file mode 100644
index 67404de..0000000
--- a/backScattering-L-SAR/run_log/BackScattering2023-11-22-11-12-38.log
+++ /dev/null
@@ -1,11 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-L-SAR\backScattering
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:mylog:progress bar: 30%
-INFO:mylog:progress bar: 40%
-INFO:mylog:progress bar: 90%
-INFO:mylog:process_handle finished!
-INFO:mylog:progress bar: 100%
-INFO:mylog:successful production of backscattering products!
-INFO:mylog:running use time: 0:12:32.600524
diff --git a/backScattering-L-SAR/run_log/BackScattering2023-11-22-16-29-13.log b/backScattering-L-SAR/run_log/BackScattering2023-11-22-16-29-13.log
deleted file mode 100644
index 74fd804..0000000
--- a/backScattering-L-SAR/run_log/BackScattering2023-11-22-16-29-13.log
+++ /dev/null
@@ -1,11 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-L-SAR\backScattering
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:mylog:progress bar: 30%
-INFO:mylog:progress bar: 40%
-INFO:mylog:progress bar: 90%
-INFO:mylog:process_handle finished!
-INFO:mylog:progress bar: 100%
-INFO:mylog:successful production of backscattering products!
-INFO:mylog:running use time: 0:12:19.438164
diff --git a/landcover-L-SAR/LandCover-L-SAR.xml b/landcover-L-SAR/LandCover-L-SAR.xml
index d918d69..27c590e 100644
--- a/landcover-L-SAR/LandCover-L-SAR.xml
+++ b/landcover-L-SAR/LandCover-L-SAR.xml
@@ -38,7 +38,7 @@
File
tar.gz
Man
- E:\MicroWorkspace\LT1B\LT230919\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966-ortho.tar.gz
+ F:\MicroWorkspace\LT1B\LT230919\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966-ortho.tar.gz
True
False
File
@@ -53,7 +53,7 @@
File
csv
Man
- E:\MicroWorkspace\LT1B\LT230919\LT1B_landaCoverSample.csv
+ F:\MicroWorkspace\LT1B\LT230919\LT1B_landaCoverSample.csv
True
True
UploadInput
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-12-37-08.log b/landcover-L-SAR/run_log/LandCover2024-01-12-12-37-08.log
deleted file mode 100644
index e52ddfc..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-12-37-08.log
+++ /dev/null
@@ -1,21 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
-INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
-INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
-INFO:mylog:cut sim_ori success!
-INFO:mylog:preprocess_handle success!
-INFO:mylog:1,water,num:2598827
-INFO:mylog:max number =10000, random select10000 point as train data!
-INFO:mylog:2,build,num:260469
-INFO:mylog:max number =10000, random select10000 point as train data!
-INFO:mylog:3,dryland,num:12290
-INFO:mylog:max number =10000, random select10000 point as train data!
-INFO:mylog:4,road,num:803810
-INFO:mylog:max number =10000, random select10000 point as train data!
-INFO:mylog:read csv data success!
-INFO:mylog:progress bar: 20%
-INFO:mylog:refine_lee filter success!
-INFO:mylog:progress bar: 30%
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-00-19.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-00-19.log
deleted file mode 100644
index 9e9fca9..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-00-19.log
+++ /dev/null
@@ -1,44 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
-INFO:mylog:check_source success!
-INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
-INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
-INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
-INFO:mylog:cut sim_ori success!
-INFO:mylog:preprocess_handle success!
-INFO:mylog:1,water,num:2598827
-INFO:mylog:max number =10000, random select10000 point as train data!
-INFO:mylog:2,build,num:260469
-INFO:mylog:max number =10000, random select10000 point as train data!
-INFO:mylog:3,dryland,num:12290
-INFO:mylog:max number =10000, random select10000 point as train data!
-INFO:mylog:4,road,num:803810
-INFO:mylog:max number =10000, random select10000 point as train data!
-INFO:mylog:read csv data success!
-INFO:mylog:progress bar: 20%
-INFO:mylog:refine_lee filter success!
-INFO:mylog:progress bar: 30%
-INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif'}
-INFO:mylog:decompose feature success!
-INFO:mylog:progress bar: 50%
-INFO:mylog:feature_list:['0: Freeman_Dbl_geo.tif', '1: Freeman_Odd_geo.tif', '2: Freeman_Vol_geo.tif']
-INFO:mylog:gene_train_set success!
-INFO:mylog:importances:[0.0872527 0.40417686 0.50857044],threshold=0.07
-INFO:mylog:optimal_feature:[2, 1, 0]
-INFO:mylog:correlation_map:
- [[0. 1. 1.]
- [0. 0. 1.]
- [0. 0. 0.]]
-INFO:mylog:validity_list_corr:[2]
-INFO:mylog:[2]
-INFO:mylog:train_feature:['2: Freeman_Vol_geo.tif']
-INFO:mylog:RF trainning
-INFO:mylog:RF train successful
-INFO:mylog:progress bar: 60%
-INFO:mylog:test_feature:dict_keys(['Freeman_Vol_geo'])
-INFO:mylog:blocking tifs success!
-INFO:mylog:create features matrix success!
-INFO:mylog:testing
-INFO:mylog:test success!
-INFO:mylog:progress bar: 95%
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-17.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-17.log
deleted file mode 100644
index 2f72cbd..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-17.log
+++ /dev/null
@@ -1,30 +0,0 @@
-INFO:mylog:total:195,block:0 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_0_1024.tif
-INFO:mylog:total:195,block:1 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_10240_11264.tif
-INFO:mylog:total:195,block:9 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_4096_5120.tif
-INFO:mylog:total:195,block:10 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_5120_6144.tif
-INFO:mylog:total:195,block:19 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_12288_13312.tif
-INFO:mylog:total:195,block:20 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_13312_14336.tif
-INFO:mylog:total:195,block:29 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_9216_10240.tif
-INFO:mylog:total:195,block:30 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_0_1024.tif
-INFO:mylog:total:195,block:40 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_5120_6144.tif
-INFO:mylog:total:195,block:41 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_6144_7168.tif
-INFO:mylog:total:195,block:52 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_2048_3072.tif
-INFO:mylog:total:195,block:53 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_3072_4096.tif
-INFO:mylog:total:195,block:64 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_12288_13312.tif
-INFO:mylog:total:195,block:65 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_13312_14336.tif
-INFO:mylog:total:195,block:77 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_1024_2048.tif
-INFO:mylog:total:195,block:78 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_11264_12288.tif
-INFO:mylog:total:195,block:92 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_1024_2048.tif
-INFO:mylog:total:195,block:93 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_11264_12288.tif
-INFO:mylog:total:195,block:107 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_1024_2048.tif
-INFO:mylog:total:195,block:108 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_11264_12288.tif
-INFO:mylog:total:195,block:122 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_1024_2048.tif
-INFO:mylog:total:195,block:123 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_11264_12288.tif
-INFO:mylog:total:195,block:137 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_1024_2048.tif
-INFO:mylog:total:195,block:138 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_11264_12288.tif
-INFO:mylog:total:195,block:152 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_1024_2048.tif
-INFO:mylog:total:195,block:153 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_11264_12288.tif
-INFO:mylog:total:195,block:167 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_1024_2048.tif
-INFO:mylog:total:195,block:168 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_11264_12288.tif
-INFO:mylog:total:195,block:182 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_1024_2048.tif
-INFO:mylog:total:195,block:183 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_11264_12288.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-18.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-18.log
deleted file mode 100644
index dbe6805..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-18.log
+++ /dev/null
@@ -1,15 +0,0 @@
-INFO:mylog:total:195,block:2 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_1024_2048.tif
-INFO:mylog:total:195,block:11 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_6144_7168.tif
-INFO:mylog:total:195,block:21 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_13931_14955.tif
-INFO:mylog:total:195,block:31 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_10240_11264.tif
-INFO:mylog:total:195,block:42 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_7168_8192.tif
-INFO:mylog:total:195,block:54 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_4096_5120.tif
-INFO:mylog:total:195,block:67 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_2048_3072.tif
-INFO:mylog:total:195,block:80 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_13312_14336.tif
-INFO:mylog:total:195,block:95 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_13312_14336.tif
-INFO:mylog:total:195,block:110 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_13312_14336.tif
-INFO:mylog:total:195,block:125 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_13312_14336.tif
-INFO:mylog:total:195,block:140 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_13312_14336.tif
-INFO:mylog:total:195,block:155 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_13312_14336.tif
-INFO:mylog:total:195,block:170 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_13312_14336.tif
-INFO:mylog:total:195,block:185 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_13312_14336.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-19.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-19.log
deleted file mode 100644
index a62309d..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-19.log
+++ /dev/null
@@ -1,30 +0,0 @@
-INFO:mylog:total:195,block:3 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_11264_12288.tif
-INFO:mylog:total:195,block:4 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_12288_13312.tif
-INFO:mylog:total:195,block:12 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_7168_8192.tif
-INFO:mylog:total:195,block:13 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_8192_9216.tif
-INFO:mylog:total:195,block:22 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_2048_3072.tif
-INFO:mylog:total:195,block:23 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_3072_4096.tif
-INFO:mylog:total:195,block:32 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_1024_2048.tif
-INFO:mylog:total:195,block:33 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_11264_12288.tif
-INFO:mylog:total:195,block:43 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_8192_9216.tif
-INFO:mylog:total:195,block:44 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_9216_10240.tif
-INFO:mylog:total:195,block:55 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_5120_6144.tif
-INFO:mylog:total:195,block:56 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_6144_7168.tif
-INFO:mylog:total:195,block:68 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_3072_4096.tif
-INFO:mylog:total:195,block:69 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_4096_5120.tif
-INFO:mylog:total:195,block:82 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_2048_3072.tif
-INFO:mylog:total:195,block:83 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_3072_4096.tif
-INFO:mylog:total:195,block:97 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_2048_3072.tif
-INFO:mylog:total:195,block:98 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_3072_4096.tif
-INFO:mylog:total:195,block:112 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_2048_3072.tif
-INFO:mylog:total:195,block:113 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_3072_4096.tif
-INFO:mylog:total:195,block:127 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_2048_3072.tif
-INFO:mylog:total:195,block:128 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_3072_4096.tif
-INFO:mylog:total:195,block:142 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_2048_3072.tif
-INFO:mylog:total:195,block:143 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_3072_4096.tif
-INFO:mylog:total:195,block:157 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_2048_3072.tif
-INFO:mylog:total:195,block:158 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_3072_4096.tif
-INFO:mylog:total:195,block:172 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_2048_3072.tif
-INFO:mylog:total:195,block:173 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_3072_4096.tif
-INFO:mylog:total:195,block:187 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_2048_3072.tif
-INFO:mylog:total:195,block:188 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_3072_4096.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-21.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-21.log
deleted file mode 100644
index 8bfa6a2..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-21.log
+++ /dev/null
@@ -1,30 +0,0 @@
-INFO:mylog:total:195,block:5 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_13312_14336.tif
-INFO:mylog:total:195,block:6 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_13931_14955.tif
-INFO:mylog:total:195,block:14 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_9216_10240.tif
-INFO:mylog:total:195,block:15 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_0_1024.tif
-INFO:mylog:total:195,block:24 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_4096_5120.tif
-INFO:mylog:total:195,block:25 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_5120_6144.tif
-INFO:mylog:total:195,block:35 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_13312_14336.tif
-INFO:mylog:total:195,block:36 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_13931_14955.tif
-INFO:mylog:total:195,block:46 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_10240_11264.tif
-INFO:mylog:total:195,block:47 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_1024_2048.tif
-INFO:mylog:total:195,block:58 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_8192_9216.tif
-INFO:mylog:total:195,block:59 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_9216_10240.tif
-INFO:mylog:total:195,block:71 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_6144_7168.tif
-INFO:mylog:total:195,block:72 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_7168_8192.tif
-INFO:mylog:total:195,block:85 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_5120_6144.tif
-INFO:mylog:total:195,block:86 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_6144_7168.tif
-INFO:mylog:total:195,block:100 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_5120_6144.tif
-INFO:mylog:total:195,block:101 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_6144_7168.tif
-INFO:mylog:total:195,block:115 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_5120_6144.tif
-INFO:mylog:total:195,block:116 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_6144_7168.tif
-INFO:mylog:total:195,block:130 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_5120_6144.tif
-INFO:mylog:total:195,block:131 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_6144_7168.tif
-INFO:mylog:total:195,block:145 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_5120_6144.tif
-INFO:mylog:total:195,block:146 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_6144_7168.tif
-INFO:mylog:total:195,block:160 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_5120_6144.tif
-INFO:mylog:total:195,block:161 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_6144_7168.tif
-INFO:mylog:total:195,block:175 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_5120_6144.tif
-INFO:mylog:total:195,block:176 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_6144_7168.tif
-INFO:mylog:total:195,block:190 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_5120_6144.tif
-INFO:mylog:total:195,block:191 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_6144_7168.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-22.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-22.log
deleted file mode 100644
index 9236693..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-22.log
+++ /dev/null
@@ -1,15 +0,0 @@
-INFO:mylog:total:195,block:7 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_2048_3072.tif
-INFO:mylog:total:195,block:16 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_10240_11264.tif
-INFO:mylog:total:195,block:26 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_6144_7168.tif
-INFO:mylog:total:195,block:37 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_2048_3072.tif
-INFO:mylog:total:195,block:49 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_12288_13312.tif
-INFO:mylog:total:195,block:61 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_10240_11264.tif
-INFO:mylog:total:195,block:74 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_9216_10240.tif
-INFO:mylog:total:195,block:88 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_8192_9216.tif
-INFO:mylog:total:195,block:103 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_8192_9216.tif
-INFO:mylog:total:195,block:118 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_8192_9216.tif
-INFO:mylog:total:195,block:133 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_8192_9216.tif
-INFO:mylog:total:195,block:148 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_8192_9216.tif
-INFO:mylog:total:195,block:163 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_8192_9216.tif
-INFO:mylog:total:195,block:178 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_8192_9216.tif
-INFO:mylog:total:195,block:193 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_8192_9216.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-23.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-23.log
deleted file mode 100644
index 765725c..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-23.log
+++ /dev/null
@@ -1,14 +0,0 @@
-INFO:mylog:total:195,block:8 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_1024_3072_4096.tif
-INFO:mylog:total:195,block:18 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_11264_12288.tif
-INFO:mylog:total:195,block:28 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_8192_9216.tif
-INFO:mylog:total:195,block:39 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_4096_5120.tif
-INFO:mylog:total:195,block:51 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_13931_14955.tif
-INFO:mylog:total:195,block:63 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_11264_12288.tif
-INFO:mylog:total:195,block:76 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_10240_11264.tif
-INFO:mylog:total:195,block:91 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_10240_11264.tif
-INFO:mylog:total:195,block:106 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_10240_11264.tif
-INFO:mylog:total:195,block:121 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_10240_11264.tif
-INFO:mylog:total:195,block:136 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_10240_11264.tif
-INFO:mylog:total:195,block:151 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_10240_11264.tif
-INFO:mylog:total:195,block:166 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_10240_11264.tif
-INFO:mylog:total:195,block:181 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_10240_11264.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-25.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-25.log
deleted file mode 100644
index eaf286a..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-25.log
+++ /dev/null
@@ -1,14 +0,0 @@
-INFO:mylog:total:195,block:17 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_1024_2048.tif
-INFO:mylog:total:195,block:27 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_10240_11264_7168_8192.tif
-INFO:mylog:total:195,block:38 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_3072_4096.tif
-INFO:mylog:total:195,block:50 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_13312_14336.tif
-INFO:mylog:total:195,block:62 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_1024_2048.tif
-INFO:mylog:total:195,block:75 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_0_1024.tif
-INFO:mylog:total:195,block:89 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_9216_10240.tif
-INFO:mylog:total:195,block:104 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_9216_10240.tif
-INFO:mylog:total:195,block:119 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_9216_10240.tif
-INFO:mylog:total:195,block:134 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_9216_10240.tif
-INFO:mylog:total:195,block:149 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_9216_10240.tif
-INFO:mylog:total:195,block:164 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_9216_10240.tif
-INFO:mylog:total:195,block:179 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_9216_10240.tif
-INFO:mylog:total:195,block:194 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_9216_10240.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-26.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-26.log
deleted file mode 100644
index 35b4f61..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-26.log
+++ /dev/null
@@ -1,23 +0,0 @@
-INFO:mylog:total:195,block:34 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_1024_2048_12288_13312.tif
-INFO:mylog:total:195,block:45 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_0_1024.tif
-INFO:mylog:total:195,block:48 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_11264_12288.tif
-INFO:mylog:total:195,block:57 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11264_12288_7168_8192.tif
-INFO:mylog:total:195,block:60 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_0_1024.tif
-INFO:mylog:total:195,block:70 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_5120_6144.tif
-INFO:mylog:total:195,block:73 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_8192_9216.tif
-INFO:mylog:total:195,block:84 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_4096_5120.tif
-INFO:mylog:total:195,block:87 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_7168_8192.tif
-INFO:mylog:total:195,block:99 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_4096_5120.tif
-INFO:mylog:total:195,block:102 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_7168_8192.tif
-INFO:mylog:total:195,block:114 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_4096_5120.tif
-INFO:mylog:total:195,block:117 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_7168_8192.tif
-INFO:mylog:total:195,block:129 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_4096_5120.tif
-INFO:mylog:total:195,block:132 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_7168_8192.tif
-INFO:mylog:total:195,block:144 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_4096_5120.tif
-INFO:mylog:total:195,block:147 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_7168_8192.tif
-INFO:mylog:total:195,block:159 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_4096_5120.tif
-INFO:mylog:total:195,block:162 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_7168_8192.tif
-INFO:mylog:total:195,block:174 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_4096_5120.tif
-INFO:mylog:total:195,block:177 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_7168_8192.tif
-INFO:mylog:total:195,block:189 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_4096_5120.tif
-INFO:mylog:total:195,block:192 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_7168_8192.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-27.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-27.log
deleted file mode 100644
index b7eb1e1..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-27.log
+++ /dev/null
@@ -1,9 +0,0 @@
-INFO:mylog:total:195,block:66 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_11701_12725_13931_14955.tif
-INFO:mylog:total:195,block:79 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_12288_13312.tif
-INFO:mylog:total:195,block:94 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_12288_13312.tif
-INFO:mylog:total:195,block:109 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_12288_13312.tif
-INFO:mylog:total:195,block:124 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_12288_13312.tif
-INFO:mylog:total:195,block:139 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_12288_13312.tif
-INFO:mylog:total:195,block:154 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_12288_13312.tif
-INFO:mylog:total:195,block:169 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_12288_13312.tif
-INFO:mylog:total:195,block:184 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_12288_13312.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-28.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-28.log
deleted file mode 100644
index 7f44211..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-28.log
+++ /dev/null
@@ -1,8 +0,0 @@
-INFO:mylog:total:195,block:81 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_2048_3072_13931_14955.tif
-INFO:mylog:total:195,block:96 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_13931_14955.tif
-INFO:mylog:total:195,block:111 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_13931_14955.tif
-INFO:mylog:total:195,block:126 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_13931_14955.tif
-INFO:mylog:total:195,block:141 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_13931_14955.tif
-INFO:mylog:total:195,block:156 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_13931_14955.tif
-INFO:mylog:total:195,block:171 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_13931_14955.tif
-INFO:mylog:total:195,block:186 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_13931_14955.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-29.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-29.log
deleted file mode 100644
index e144039..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-15-29.log
+++ /dev/null
@@ -1,7 +0,0 @@
-INFO:mylog:total:195,block:90 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_4096_0_1024.tif
-INFO:mylog:total:195,block:105 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_4096_5120_0_1024.tif
-INFO:mylog:total:195,block:120 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_5120_6144_0_1024.tif
-INFO:mylog:total:195,block:135 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_7168_0_1024.tif
-INFO:mylog:total:195,block:150 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_7168_8192_0_1024.tif
-INFO:mylog:total:195,block:165 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_8192_9216_0_1024.tif
-INFO:mylog:total:195,block:180 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_10240_0_1024.tif
diff --git a/landcover-L-SAR/run_log/LandCover2024-01-12-13-18-30.log b/landcover-L-SAR/run_log/LandCover2024-01-12-13-18-30.log
deleted file mode 100644
index 8dda3b0..0000000
--- a/landcover-L-SAR/run_log/LandCover2024-01-12-13-18-30.log
+++ /dev/null
@@ -1,3 +0,0 @@
-INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
-INFO:mylog:init algXML succeed
-INFO:mylog:create new workspace success!
diff --git a/landcover-L-SAR/tool/LAI/LAIProcess.cp38-win_amd64.pyd b/landcover-L-SAR/tool/LAI/LAIProcess.cp38-win_amd64.pyd
deleted file mode 100644
index bc5375e..0000000
Binary files a/landcover-L-SAR/tool/LAI/LAIProcess.cp38-win_amd64.pyd and /dev/null differ
diff --git a/landcover-L-SAR/tool/LAI/LAIProcess.pyx b/landcover-L-SAR/tool/LAI/LAIProcess.pyx
deleted file mode 100644
index a445ffd..0000000
--- a/landcover-L-SAR/tool/LAI/LAIProcess.pyx
+++ /dev/null
@@ -1,166 +0,0 @@
-#
-# 模型计算的库
-#
-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/landcover-L-SAR/tool/LAI/build/LAIProcess.c b/landcover-L-SAR/tool/LAI/build/LAIProcess.c
deleted file mode 100644
index eb1f143..0000000
--- a/landcover-L-SAR/tool/LAI/build/LAIProcess.c
+++ /dev/null
@@ -1,11637 +0,0 @@
-/* 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