From a78e7b51d463b1d50f59fc344337d767a343f2bf Mon Sep 17 00:00:00 2001 From: Melanie Simet Date: Tue, 8 Nov 2016 15:24:53 -0500 Subject: [PATCH 1/3] Fix thing where stile requires TreeCorr despite saying it doesn't (#93) --- stile/treecorr_utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stile/treecorr_utils.py b/stile/treecorr_utils.py index a51fce8..21daaf3 100644 --- a/stile/treecorr_utils.py +++ b/stile/treecorr_utils.py @@ -3,8 +3,11 @@ """ import numpy import file_io -import treecorr -from treecorr.corr2 import corr2_valid_params +try: + import treecorr + from treecorr.corr2 import corr2_valid_params +except ImportError: + pass def Parser(): import argparse From eb2cb8a03ddef4702a15cbad84347365b876fa9f Mon Sep 17 00:00:00 2001 From: Melanie Simet Date: Tue, 8 Nov 2016 15:22:25 -0500 Subject: [PATCH 2/3] Allow for FITS columns that are arrays in WriteFITSTable (#93) --- stile/file_io.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stile/file_io.py b/stile/file_io.py index 3be8bfc..921f890 100644 --- a/stile/file_io.py +++ b/stile/file_io.py @@ -172,6 +172,11 @@ def WriteASCIITable(file_name, data_array, fields=None, print_header=False): 'c': 'M', # complex-floating point, } def _coerceFitsFormat(fmt): + if fmt.subdtype: + if len(fmt.subdtype[1])>1: + raise RuntimeError("Cannot make a FITS table with a column containing arrays "+ + "of greater than one dimension") + return str(fmt.subdtype[1][0])+_coerceFitsFormat(fmt.subdtype[0]) if 'S' in fmt.str or 'a' in fmt.str or 'U' in fmt.str: return 'A'+fmt.str.split('S')[1] elif fmt.str[1] in _fits_dict: # first character is probably a byte-order flag From 7aac06c09a3d17134b76344f0d1fa56f70e9eb9b Mon Sep 17 00:00:00 2001 From: Melanie Simet Date: Fri, 13 Jul 2018 18:33:06 -0700 Subject: [PATCH 3/3] Update changelog (#93a) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d07c664..96b5380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +7/13/18: Fix TreeCorr imports, 1d arrays in FITS writing (#93) 7/11/18: Update code to python3 3/17/16: Update documentation to Sphinx standard and add documentation build files (issue #17) 2/17/16: Changes to correlation function plots & documentation (issue #77)