Skip to content

Commit

Permalink
100 new datasets for nathan
Browse files Browse the repository at this point in the history
  • Loading branch information
nicochunger committed Oct 11, 2018
1 parent cfed74a commit da38554
Show file tree
Hide file tree
Showing 116 changed files with 5,128 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Ignore output from PolyChord
chains/
saved_runs/
dump/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
33 changes: 26 additions & 7 deletions src/nathan/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,52 @@
from pprint import pprint
import priors
import copy
import subprocess


def read_config(configfile, dfile):
def read_config(configfile, data_path, dfile):
"""
Initialises a sampler object using parameters in config.
:param string config: string indicating path to configuration file.
"""

model = int(configfile[-4])

# Import configuration file as module
c = imp.load_source('c', configfile)

# Make copy of all relavant dictionaries
input_dict, datadict = map(dict.copy, c.configdicts)

# Create prior instances
pprint(input_dict)
priordict = priors.prior_constructor(input_dict, {})

# Build list of parameter names
parnames, _ = get_parnames(input_dict)

# Read data from file(s)
data_files = ['a1', 'a2', 'b1', 'b2', 'c1', 'c2']
datadict['harps']['datafile'] = f'data/data_{data_files[dfile-1]}_new.txt'
# Extract all names of the data files
# data_path = '$HOME/codigo/src/nathan/data/cor-gl/'
data_files = subprocess.check_output(
f'ls {data_path}', shell=True).decode('utf-8').split('\n')
data_files.remove('') # Remove last empty item
datadict['harps']['datafile'] = data_path + data_files[dfile-1]
read_data(datadict)

# Change prior ranges dependening on dataset
alpha = 0.1
Tobs = datadict['harps']['data']['Time'].max(
) - datadict['harps']['data']['Time'].min()
freq1 = [1./60 + 2./Tobs, 1./60 - 2./Tobs]
input_dict['planet1']['period'][2][1] = 1/freq1[0]
input_dict['planet1']['period'][2][2] = 1/freq1[1]
if model == 2:
freq2 = [(1+alpha)/30, (1-alpha)/30]
input_dict['planet2']['period'][2][1] = 1/freq2[0]
input_dict['planet2']['period'][2][2] = 1/freq2[1]

# Create prior instances
pprint(input_dict)
priordict = priors.prior_constructor(input_dict, {})

# Fixed parameters
fixedpardict = get_fixedparvalues(input_dict)

Expand Down
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_1_circ.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 8.77341 0.617097
4.0172 2.73437 0.822796
8.9611 -3.0391 0.822796
23.9521 -5.43191 1.13134
35.965 -2.38845 0.822796
40.9613 1.51037 1.43989
257.193 -13.5977 1.23419
263.27 -11.4133 0.719946
291.109 9.72252 0.925645
318.101 -9.60741 0.719946
333.02 -4.95246 1.13134
339.009 -1.28251 0.617097
347.022 9.83777 1.23419
364.993 0.704079 0.617097
611.359 -8.48797 0.514247
646.153 8.58507 1.43989
670.133 -6.45228 0.925645
683.118 -7.29885 0.514247
693.077 -7.23389 0.925645
698.043 -2.93093 1.54274
928.34 -7.11046 1.13134
952.367 14.0061 0.617097
983.279 -5.02846 0.925645
1039.03 -7.20635 0.925645
1093.97 -4.02445 0.719946
1390.09 -1.06128 1.13134
1739.13 8.30709 1.64559
1785.06 4.5372 0.822796
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_1_ecc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 3.99044 0.617097
4.0172 0.789825 0.822796
8.9611 -0.403159 0.822796
23.9521 -7.69386 1.13134
35.965 -2.35028 0.822796
40.9613 4.15518 1.43989
257.193 -8.35808 1.23419
263.27 -9.88495 0.719946
291.109 11.4611 0.925645
318.101 -7.51161 0.719946
333.02 -6.79507 1.13134
339.009 0.479279 0.617097
347.022 12.037 1.23419
364.993 2.31942 0.617097
611.359 -4.65815 0.514247
646.153 11.6929 1.43989
670.133 -4.13262 0.925645
683.118 -8.59143 0.514247
693.077 -6.6429 0.925645
698.043 -3.18194 1.54274
928.34 -10.8081 1.13134
952.367 11.8559 0.617097
983.279 -6.50144 0.925645
1039.03 -7.36595 0.925645
1093.97 -4.64336 0.719946
1390.09 -4.32422 1.13134
1739.13 5.92431 1.64559
1785.06 10.5972 0.822796
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_2_circ.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 2.7238 0.617097
4.0172 -2.07539 0.822796
8.9611 -6.94487 0.822796
23.9521 -4.41568 1.13134
35.965 -0.168843 0.822796
40.9613 5.42083 1.43989
257.193 -12.6501 1.23419
263.27 -11.49 0.719946
291.109 4.67755 0.925645
318.101 -10.7416 0.719946
333.02 -1.83805 1.13134
339.009 7.57427 0.617097
347.022 10.2957 1.23419
364.993 -1.25247 0.617097
611.359 -7.44774 0.514247
646.153 4.35883 1.43989
670.133 -3.77204 0.925645
683.118 -8.89034 0.514247
693.077 1.07516 0.925645
698.043 4.00805 1.54274
928.34 -7.86476 1.13134
952.367 12.4107 0.617097
983.279 -8.82403 0.925645
1039.03 -6.10199 0.925645
1093.97 -8.96725 0.719946
1390.09 -0.875085 1.13134
1739.13 10.8956 1.64559
1785.06 6.43876 0.822796
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_2_ecc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 3.57876 0.617097
4.0172 -2.10138 0.822796
8.9611 -6.69677 0.822796
23.9521 -6.2177 1.13134
35.965 0.728038 0.822796
40.9613 6.78559 1.43989
257.193 -10.9913 1.23419
263.27 -6.66017 0.719946
291.109 10.0126 0.925645
318.101 -10.4578 0.719946
333.02 -1.47186 1.13134
339.009 2.99895 0.617097
347.022 8.45481 1.23419
364.993 -3.21698 0.617097
611.359 -6.56799 0.514247
646.153 7.10309 1.43989
670.133 -5.28971 0.925645
683.118 -6.76457 0.514247
693.077 -2.66849 0.925645
698.043 0.991943 1.54274
928.34 -3.88332 1.13134
952.367 14.5748 0.617097
983.279 -9.09184 0.925645
1039.03 -8.17499 0.925645
1093.97 -8.1174 0.719946
1390.09 -6.8672 1.13134
1739.13 9.79902 1.64559
1785.06 7.90459 0.822796
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_3_circ.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 5.97433 0.617097
4.0172 2.90948 0.822796
8.9611 0.0335247 0.822796
23.9521 -12.8211 1.13134
35.965 4.65106 0.822796
40.9613 9.10378 1.43989
257.193 -9.05752 1.23419
263.27 -11.8952 0.719946
291.109 11.522 0.925645
318.101 -6.78613 0.719946
333.02 -6.85828 1.13134
339.009 4.49662 0.617097
347.022 13.0786 1.23419
364.993 -0.571038 0.617097
611.359 -7.34148 0.514247
646.153 9.82265 1.43989
670.133 -6.7448 0.925645
683.118 -6.41652 0.514247
693.077 -2.59279 0.925645
698.043 0.418654 1.54274
928.34 -4.16315 1.13134
952.367 8.365 0.617097
983.279 -8.61327 0.925645
1039.03 -12.2842 0.925645
1093.97 -8.89792 0.719946
1390.09 -2.60891 1.13134
1739.13 6.05065 1.64559
1785.06 8.90349 0.822796
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_3_ecc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 3.16067 0.617097
4.0172 -2.71925 0.822796
8.9611 -4.17014 0.822796
23.9521 -9.19577 1.13134
35.965 -1.27166 0.822796
40.9613 5.61062 1.43989
257.193 -9.79185 1.23419
263.27 -8.71745 0.719946
291.109 16.4156 0.925645
318.101 -7.76749 0.719946
333.02 -6.60705 1.13134
339.009 0.731522 0.617097
347.022 13.4404 1.23419
364.993 -1.34777 0.617097
611.359 -6.42125 0.514247
646.153 11.4817 1.43989
670.133 -4.96949 0.925645
683.118 -8.73138 0.514247
693.077 -3.29919 0.925645
698.043 1.20898 1.54274
928.34 -7.79732 1.13134
952.367 12.7529 0.617097
983.279 -7.38143 0.925645
1039.03 -7.92367 0.925645
1093.97 -7.15174 0.719946
1390.09 -6.98147 1.13134
1739.13 5.63618 1.64559
1785.06 10.1594 0.822796
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_4_circ.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 -2.05735 0.617097
4.0172 -6.51728 0.822796
8.9611 -10.173 0.822796
23.9521 0.568946 1.13134
35.965 10.8457 0.822796
40.9613 9.21667 1.43989
257.193 -4.01093 1.23419
263.27 1.88446 0.719946
291.109 8.15672 0.925645
318.101 -3.56667 0.719946
333.02 7.50649 1.13134
339.009 5.19486 0.617097
347.022 8.77972 1.23419
364.993 -13.4422 0.617097
611.359 -8.57278 0.514247
646.153 12.1997 1.43989
670.133 -7.60031 0.925645
683.118 1.5837 0.514247
693.077 3.10981 0.925645
698.043 6.27869 1.54274
928.34 0.882029 1.13134
952.367 -0.95395 0.617097
983.279 -2.8668 0.925645
1039.03 -7.58617 0.925645
1093.97 -8.81488 0.719946
1390.09 -11.1555 1.13134
1739.13 -7.88098 1.64559
1785.06 7.58857 0.822796
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_4_ecc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 -3.85365 0.617097
4.0172 -6.19329 0.822796
8.9611 -6.97119 0.822796
23.9521 -2.99677 1.13134
35.965 12.2639 0.822796
40.9613 11.0676 1.43989
257.193 -5.8577 1.23419
263.27 -3.69243 0.719946
291.109 3.60092 0.925645
318.101 -7.21111 0.719946
333.02 11.909 1.13134
339.009 8.53049 0.617097
347.022 5.08986 1.23419
364.993 -8.06145 0.617097
611.359 -8.71541 0.514247
646.153 6.54673 1.43989
670.133 -7.27808 0.925645
683.118 -0.765822 0.514247
693.077 8.54685 0.925645
698.043 6.76818 1.54274
928.34 4.51181 1.13134
952.367 0.564106 0.617097
983.279 -1.93819 0.925645
1039.03 -7.77197 0.925645
1093.97 -9.37397 0.719946
1390.09 -8.52551 1.13134
1739.13 -8.08786 1.64559
1785.06 5.58519 0.822796
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_5_circ.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 -1.38401 0.617097
4.0172 0.639658 0.822796
8.9611 1.1821 0.822796
23.9521 11.1878 1.13134
35.965 -5.06862 0.822796
40.9613 -8.85493 1.43989
257.193 12.0289 1.23419
263.27 10.1216 0.719946
291.109 -11.4476 0.925645
318.101 11.3186 0.719946
333.02 1.17342 1.13134
339.009 -1.77738 0.617097
347.022 -9.96522 1.23419
364.993 6.11141 0.617097
611.359 3.47305 0.514247
646.153 -7.11978 1.43989
670.133 2.7317 0.925645
683.118 14.8993 0.514247
693.077 0.831293 0.925645
698.043 -5.6228 1.54274
928.34 3.01821 1.13134
952.367 -12.5473 0.617097
983.279 4.63397 0.925645
1039.03 9.1469 0.925645
1093.97 4.73001 0.719946
1390.09 8.11568 1.13134
1739.13 0.290679 1.64559
1785.06 -12.0012 0.822796
30 changes: 30 additions & 0 deletions src/nathan/data/cor-gl/data_cor_10_5_ecc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Time data sigma
---- ---- -----
0 -2.28563 0.617097
4.0172 2.46941 0.822796
8.9611 4.89151 0.822796
23.9521 7.16578 1.13134
35.965 -0.679753 0.822796
40.9613 -4.34308 1.43989
257.193 7.75867 1.23419
263.27 10.0293 0.719946
291.109 -14.3455 0.925645
318.101 9.24072 0.719946
333.02 3.25547 1.13134
339.009 -2.90124 0.617097
347.022 -13.3514 1.23419
364.993 6.0647 0.617097
611.359 6.95432 0.514247
646.153 -9.13859 1.43989
670.133 6.44228 0.925645
683.118 10.3032 0.514247
693.077 5.11068 0.925645
698.043 -0.0149578 1.54274
928.34 6.04278 1.13134
952.367 -12.3015 0.617097
983.279 6.66294 0.925645
1039.03 10.8052 0.925645
1093.97 6.77739 0.719946
1390.09 8.06635 1.13134
1739.13 -1.37479 1.64559
1785.06 -11.4036 0.822796
Loading

0 comments on commit da38554

Please sign in to comment.