Skip to content

Commit 390fa92

Browse files
authored
Merge pull request #579 from LiekeVanSon/updates_to_CI
Updates to ci
2 parents 5acb9d6 + f82e856 commit 390fa92

11 files changed

+1475
-332
lines changed

postProcessing/Folders/CosmicIntegration/0_CosmicIntegrationOverview.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"### [Setting the Data:](./1_ClassCOMPAS.ipynb)\n",
4343
"Set the required columns and other information.\n",
4444
"\n",
45-
"### [Setting the MSSFR:](./2_MSSFR.ipynb)\n",
45+
"### [Setting the MSSFR:](./2_MSSFR-or-SFRD-prescriptions.ipynb)\n",
4646
"Choose a model and plot it.\n",
4747
"\n",
4848
"### [Setting the Selection Effects:](./3_SelectionEffects.ipynb)\n",
@@ -52,7 +52,11 @@
5252
"Combine data, MSSFR, and selection effects.\n",
5353
"\n",
5454
"### [Rate as function of redshift:](./5_MergersAsFunctionOfRedhisft.ipynb)\n",
55-
"Set the integral and combine results."
55+
"Set the integral and combine results.\n",
56+
"\n",
57+
"\n",
58+
"### [Fast Cosmic Integration:](./6_FastCosmicIntegrator.ipynb)\n",
59+
"Do the whole routine in one go, using the phenomenological variation of the MSSFR and SFRD"
5660
]
5761
},
5862
{
@@ -81,7 +85,7 @@
8185
"name": "python",
8286
"nbconvert_exporter": "python",
8387
"pygments_lexer": "ipython3",
84-
"version": "3.7.4"
88+
"version": "3.7.1"
8589
}
8690
},
8791
"nbformat": 4,

postProcessing/Folders/CosmicIntegration/1_ClassCOMPAS.ipynb

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
},
3737
{
3838
"cell_type": "code",
39-
"execution_count": 23,
39+
"execution_count": 7,
4040
"metadata": {},
4141
"outputs": [],
4242
"source": [
4343
"import os\n",
4444
"pathNoteBook = os.getcwd()\n",
4545
"pathClassCOMPAS = pathNoteBook + '/PythonScripts/'\n",
46-
"pathData = \"/home/cneijssel/Desktop/Test/\""
46+
"pathData = '/Users/lieke/surfdrive/Documents/test_CI/COMPAS_Output/'#\"/home/cneijssel/Desktop/Test/\""
4747
]
4848
},
4949
{
@@ -55,7 +55,7 @@
5555
},
5656
{
5757
"cell_type": "code",
58-
"execution_count": 24,
58+
"execution_count": 8,
5959
"metadata": {},
6060
"outputs": [],
6161
"source": [
@@ -127,7 +127,7 @@
127127
},
128128
{
129129
"cell_type": "code",
130-
"execution_count": 25,
130+
"execution_count": 9,
131131
"metadata": {
132132
"scrolled": true
133133
},
@@ -136,9 +136,9 @@
136136
"name": "stdout",
137137
"output_type": "stream",
138138
"text": [
139-
"ClassCOMPAS: Remember to self.setGridAndMassEvolved()\n",
140-
" then self.setCOMPASDCOmask()\n",
141-
" then self.setCOMPASData()\n"
139+
"ClassCOMPAS: Remember to self.setCOMPASDCOmask()\n",
140+
" then self.setCOMPASData()\n",
141+
" and optionally self.setGridAndMassEvolved() if using a metallicity grid\n"
142142
]
143143
}
144144
],
@@ -171,11 +171,11 @@
171171
},
172172
{
173173
"cell_type": "code",
174-
"execution_count": 26,
174+
"execution_count": 10,
175175
"metadata": {},
176176
"outputs": [],
177177
"source": [
178-
"COMPASData.Mlower = 5\n",
178+
"COMPASData.Mlower = 15\n",
179179
"COMPASData.Mupper = 150\n",
180180
"COMPASData.binaryFraction =0.7\n",
181181
"\n",
@@ -211,14 +211,14 @@
211211
},
212212
{
213213
"cell_type": "code",
214-
"execution_count": 27,
214+
"execution_count": 11,
215215
"metadata": {},
216216
"outputs": [
217217
{
218218
"name": "stdout",
219219
"output_type": "stream",
220220
"text": [
221-
"[0.0142]\n"
221+
"[0.00142]\n"
222222
]
223223
}
224224
],
@@ -244,14 +244,14 @@
244244
},
245245
{
246246
"cell_type": "code",
247-
"execution_count": 28,
247+
"execution_count": 12,
248248
"metadata": {},
249249
"outputs": [
250250
{
251251
"name": "stdout",
252252
"output_type": "stream",
253253
"text": [
254-
"[484520.33588899]\n"
254+
"[423202.1360283]\n"
255255
]
256256
}
257257
],
@@ -301,34 +301,23 @@
301301
},
302302
{
303303
"cell_type": "code",
304-
"execution_count": 29,
304+
"execution_count": 17,
305305
"metadata": {},
306-
"outputs": [
307-
{
308-
"name": "stdout",
309-
"output_type": "stream",
310-
"text": [
311-
"Warning no RLOF_SECONDARY_POST_COMMON_ENVELOPE column\n",
312-
"I will not mask the data for this\n",
313-
"Warning no Optimistic_Common_Envelope column\n",
314-
"I will not mask the data for this\n"
315-
]
316-
}
317-
],
306+
"outputs": [],
318307
"source": [
319-
"COMPASData.setCOMPASDCOmask(types='BNS', optimistic=True)"
308+
"COMPASData.setCOMPASDCOmask(types='BBH', pessimistic=True)"
320309
]
321310
},
322311
{
323312
"cell_type": "code",
324-
"execution_count": 30,
313+
"execution_count": 18,
325314
"metadata": {},
326315
"outputs": [
327316
{
328317
"name": "stdout",
329318
"output_type": "stream",
330319
"text": [
331-
"nr systems =0 \n"
320+
"nr systems =19 \n"
332321
]
333322
}
334323
],
@@ -349,7 +338,7 @@
349338
},
350339
{
351340
"cell_type": "code",
352-
"execution_count": 31,
341+
"execution_count": 19,
353342
"metadata": {},
354343
"outputs": [],
355344
"source": [
@@ -387,17 +376,17 @@
387376
},
388377
{
389378
"cell_type": "code",
390-
"execution_count": 32,
379+
"execution_count": 20,
391380
"metadata": {},
392381
"outputs": [
393382
{
394383
"name": "stdout",
395384
"output_type": "stream",
396385
"text": [
397386
"Just to double check you create instance of ClassCOMPAS without path/Data\n",
398-
"ClassCOMPAS: Remember to self.setGridAndMassEvolved()\n",
399-
" then self.setCOMPASDCOmask()\n",
400-
" then self.setCOMPASData()\n"
387+
"ClassCOMPAS: Remember to self.setCOMPASDCOmask()\n",
388+
" then self.setCOMPASData()\n",
389+
" and optionally self.setGridAndMassEvolved() if using a metallicity grid\n"
401390
]
402391
}
403392
],
@@ -466,7 +455,7 @@
466455
"name": "python",
467456
"nbconvert_exporter": "python",
468457
"pygments_lexer": "ipython3",
469-
"version": "3.7.4"
458+
"version": "3.7.1"
470459
}
471460
},
472461
"nbformat": 4,

postProcessing/Folders/CosmicIntegration/2_MSSFR-or-SFRD-prescriptions.ipynb

Lines changed: 26 additions & 7 deletions
Large diffs are not rendered by default.

postProcessing/Folders/CosmicIntegration/3_SelectionEffects.ipynb

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
{
3838
"cell_type": "code",
3939
"execution_count": 1,
40-
"metadata": {
41-
"collapsed": true
42-
},
40+
"metadata": {},
4341
"outputs": [],
4442
"source": [
4543
"import os\n",
@@ -61,9 +59,7 @@
6159
{
6260
"cell_type": "code",
6361
"execution_count": 2,
64-
"metadata": {
65-
"collapsed": true
66-
},
62+
"metadata": {},
6763
"outputs": [],
6864
"source": [
6965
"import numpy as np\n",
@@ -83,9 +79,7 @@
8379
{
8480
"cell_type": "code",
8581
"execution_count": 3,
86-
"metadata": {
87-
"collapsed": false
88-
},
82+
"metadata": {},
8983
"outputs": [],
9084
"source": [
9185
"m1 = 40 #Msun\n",
@@ -101,9 +95,7 @@
10195
{
10296
"cell_type": "code",
10397
"execution_count": 4,
104-
"metadata": {
105-
"collapsed": false
106-
},
98+
"metadata": {},
10799
"outputs": [],
108100
"source": [
109101
"P = selection_effects.detection_probability(m1, m2, redshift, distance, snr_threshold,sensitivity=sensitivity)"
@@ -112,21 +104,26 @@
112104
{
113105
"cell_type": "code",
114106
"execution_count": 5,
115-
"metadata": {
116-
"collapsed": false
117-
},
107+
"metadata": {},
118108
"outputs": [
119109
{
120110
"name": "stdout",
121111
"output_type": "stream",
122112
"text": [
123-
"0.7761979999999999\n"
113+
"0.7771859999999999\n"
124114
]
125115
}
126116
],
127117
"source": [
128118
"print(P)"
129119
]
120+
},
121+
{
122+
"cell_type": "code",
123+
"execution_count": null,
124+
"metadata": {},
125+
"outputs": [],
126+
"source": []
130127
}
131128
],
132129
"metadata": {
@@ -145,7 +142,7 @@
145142
"name": "python",
146143
"nbconvert_exporter": "python",
147144
"pygments_lexer": "ipython3",
148-
"version": "3.5.2"
145+
"version": "3.7.1"
149146
}
150147
},
151148
"nbformat": 4,

0 commit comments

Comments
 (0)