From cab20cad4557e92128085a4c268e919a25192246 Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Fri, 15 Nov 2019 10:33:14 +0100 Subject: [PATCH 1/4] Addresses #14 - FieldTools are not yet online - Brach stefan still not merged to master Install conda-build; not within a certain env but to base ``` $ ~/miniconda3/bin/conda install conda-build ``` Go to root of the repo; where the directory FieldTools is located ``` $ ~/miniconda3/bin/conda build FieldTools ``` Added channel 'local' to CORBASS.yml ``` $ ~/miniconda3/bin/conda env create -f corbass.yml ``` --- FieldTools/meta.yaml | 35 +++++++++++++++++++++++++++++++++++ corbass.yml | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 FieldTools/meta.yaml diff --git a/FieldTools/meta.yaml b/FieldTools/meta.yaml new file mode 100644 index 0000000..c492d28 --- /dev/null +++ b/FieldTools/meta.yaml @@ -0,0 +1,35 @@ +package: + name: pyfield + version: "0.1.3" + +source: + # Alternative: Get a tarball from a -- to be assigned -- DOI + git_url: https://gitup.uni-potsdam.de/matusche/fieldtools.git + git_tag: stefan # Until we merged it to master; shall become a tag + +build: + # Not quite sure about $PYTHON; Docs are just using bare 'python' + script: $PYTHON setup.py build && $PYTHON setup.py install + +requirements: + build: + - {{ compiler('cxx') }} + - swig + - pkg-config + - eigen + + host: + - python + - setuptools + - numpy + - eigen # Not sure if required + + run: + - python + - numpy + - eigen # Not sure if required + +test: + imports: + - pyfield + diff --git a/corbass.yml b/corbass.yml index 4329cbc..b10560b 100644 --- a/corbass.yml +++ b/corbass.yml @@ -2,7 +2,7 @@ # $ conda env create -f corbass.yml name: CORBASS channels: - - file:///home/arthus/miniconda3/envs/Arch/conda-bld + - local - conda-forge dependencies: - python>=3.6 -- GitLab From 37d4f887a18c648dc604bc6ea5685407e483bffa Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Fri, 15 Nov 2019 11:19:13 +0100 Subject: [PATCH 2/4] Lowering l_max=10 to reduce memory consumption ``` MemoryError Unable to allocate array with shape (1000000, 255) and data type float64 ``` --- examples/Example_Parfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Example_Parfile.py b/examples/Example_Parfile.py index dee1737..e65450f 100644 --- a/examples/Example_Parfile.py +++ b/examples/Example_Parfile.py @@ -37,4 +37,4 @@ n_fine = 4 # ...in the integration step # parameters for prediction n_desi = 10 # number of field design points -l_max = 15 # maximal SH degree +l_max = 10 # maximal SH degree -- GitLab From cc8d3c0e48704c03ec33a4314b592fc3acc1c722 Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Fri, 15 Nov 2019 11:27:57 +0100 Subject: [PATCH 3/4] UserWarning: D but no I Commenting out line 1308 no to confuse users --- examples/Example_Data.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Example_Data.csv b/examples/Example_Data.csv index 01bcaa1..703143c 100644 --- a/examples/Example_Data.csv +++ b/examples/Example_Data.csv @@ -1305,7 +1305,7 @@ Age[yr.AD],Sigma-ve[yr.],Sigma+ve[yr.],Ba[microT],SigmaBa[microT],Dec[deg.],Inc[ 1324,70,86,-999,-999,1.8,37.5,1.7,19.23,204.54,Volcanic,4,-1,-1,-1,0,102,1,243,2019,Maxwell Brown,-999,-999,-1,12636,,,, 1324,70,86,-999,-999,1.7,35.6,1,19.23,204.54,Volcanic,4,-1,-1,-1,0,102,1,889,2019,Maxwell Brown,-999,-999,-1,12538,,,, 1324,61,61,-999,-999,350.5,55.2,1.9,33.49,247.99,Archeo,10,-1,-1,-1,0,101,102,2,449,2011,Fabio Donadini,-999,-999,89,8642,,, -1325,25,25,-999,-999,2.3,-999,-999,55.6,12.2,Archeo,9,-1,-1,-1,0,0,0,192,2009,Fabio Donadini,-999,-999,-1,3847,,,, +#1325,25,25,-999,-999,2.3,-999,-999,55.6,12.2,Archeo,9,-1,-1,-1,0,0,0,192,2009,Fabio Donadini,-999,-999,-1,3847,,,, 1325,25,25,-999,-999,8.3,66.6,1.3,55.6,12.2,Archeo,9,-1,-1,-1,0,0,0,192,2009,Fabio Donadini,-999,-999,-1,3848,,,, 1325,25,25,-999,-999,353.2,63.3,2.5,34.07,249.37,Archeo,2,-1,-1,-1,0,101,2,224,2009,Fabio Donadini,-999,-999,-1,8502,,,, 1325,25,25,65.85,-999,-999,67.5,-999,40.5,50,Archeo,1,1,-1,-1,0,101,2,68,2007,Fabio Donadini,-999,-999,-1,1873,,,, -- GitLab From 48a4e2bc7125bd5940a54fb16c60ce10d33774f1 Mon Sep 17 00:00:00 2001 From: Stefan Mauerberger Date: Fri, 15 Nov 2019 11:55:51 +0100 Subject: [PATCH 4/4] To get started, five bins shall be enough. Halve the runtime ... --- examples/Example_Parfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Example_Parfile.py b/examples/Example_Parfile.py index e65450f..c167416 100644 --- a/examples/Example_Parfile.py +++ b/examples/Example_Parfile.py @@ -15,7 +15,7 @@ data_filename = Path(path, data_filename) # Relative to the parfile # set up binning # optional: specify initial and final year for the binning # initial = 1000 -# final = 2000 +final = 1500 binlength = 100 # Specify (equal) bin width # specify other parameters for the algorithm -- GitLab