Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to fit NET vs. PWV #1

Open
wants to merge 39 commits into
base: SAT_PBDRv4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
156c55b
Add script to fit NET vs. PWV
keskitalo May 20, 2022
0da3a72
adding AoA models
JohnRuhl Jun 21, 2022
bee3e60
moved recent results to new directory
JohnRuhl Jun 21, 2022
2dd06ee
updated SAT yamls to reflect correct layout, horn diameters, in MFs
JohnRuhl Jun 28, 2022
c1e98a7
adding some notebooks with band and atmos investigations in jr_runs d…
JohnRuhl Aug 1, 2022
85a8c3e
fixing jr_runs by adding symlinks
JohnRuhl Aug 1, 2022
886facb
PBDR_2023 dierectory added
JohnRuhl Feb 5, 2023
6cc71f0
added BandOptimization notebook
JohnRuhl Feb 6, 2023
42494b6
LF_band edges update, with synch sensitivity, and moving transition f…
JohnRuhl Feb 27, 2023
329e813
deleting LF_band_edges, b/c won't push
JohnRuhl Feb 28, 2023
b13a7a8
readding LF_band_edges notebook
JohnRuhl Feb 28, 2023
b7c1090
test.txt
JohnRuhl Feb 28, 2023
261274e
remove test.txt
JohnRuhl Feb 28, 2023
9a4d23a
updating pbdr calculations with current models
JohnRuhl Mar 19, 2023
fdf4b30
LF band edges, fixed last plot
JohnRuhl Mar 22, 2023
4de38d9
getting PBDR straight, should be near final version
JohnRuhl Apr 12, 2023
85a128b
adding toml outputs
JohnRuhl Apr 12, 2023
7899ce5
adding bk ratio stuff
JohnRuhl May 31, 2023
5f97e14
added psats toml, and notebook showing how nets change with varying m…
JohnRuhl Feb 25, 2024
0ba13ca
added 2D (elev,pwv) output toml file
JohnRuhl Apr 13, 2024
1871959
updated elev_pwv_2D file to include Pelec, which goes below zero when…
JohnRuhl Apr 13, 2024
c1f6048
Added 2D (elev,pwv) outputs
JohnRuhl Apr 13, 2024
1dfc328
updating AoA with previous work
JohnRuhl Jun 18, 2024
2342b56
moved existing files to 2022 subdirectory
JohnRuhl Jun 18, 2024
fc6eb0d
aperture funcs moved, but symbolic link?
JohnRuhl Jun 18, 2024
62543da
adding AoA/2024
JohnRuhl Jun 19, 2024
f2c776b
writing mapping speed ratios
JohnRuhl Jun 19, 2024
d7a2b9c
new AoA 2024 SAT beam estimates
JohnRuhl Jun 23, 2024
a663dfd
Both LATs in Chile, notebook and yamls added
JohnRuhl Jul 15, 2024
7c693c7
updated AoA/2024 yamls and notebooks
JohnRuhl Sep 17, 2024
8d7dc55
update to SAT NETs
JohnRuhl Sep 28, 2024
12b138b
fixed bug found by Michel Piat, re mistake in keeping psats fixed. W…
JohnRuhl Oct 10, 2024
83fabd8
Add yaml file for Phase 2 case
smsimon Nov 21, 2024
70ad7fd
Create test.txt
smsimon Nov 21, 2024
b2997bf
Noises run with Phase 2 configuration
smsimon Nov 21, 2024
fb2b880
Delete jbolo/AoA/2024/tomls_20241121/test.txt
smsimon Nov 21, 2024
5cdce4e
Notebook used for Phase 2 Noise Calculations
smsimon Nov 21, 2024
e8cf568
Non-split band configuration (MF2 is the MF band)
smsimon Nov 22, 2024
8037646
Non-split band configuration (MF2 is the MF band)
smsimon Nov 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions bolo-calc/pbdr_v2/fit_NET_v_pwv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import os
import sys

import matplotlib.pyplot as plt
import numpy as np
import toml


table = toml.load("outputs_july27/NET_v_pwv.toml")

pwv_ref = 1.0

nrow, ncol = 2, 2
fig = plt.figure(figsize=[12 * ncol, 6 * nrow])
iplot = 0

for key in table.keys():
if key.endswith(".yaml"):
subtable = table[key]
iplot += 1
ax = fig.add_subplot(nrow, ncol, iplot)
ax.set_title(key)
for band in subtable:
pwv = np.array(subtable[band]["pwv"]) * 1e-3
net = np.array(subtable[band]["NET"])
pivot_pwv = subtable[band]["xdefault"] * 1e-3
p = np.polyfit(pwv, net, 2)
pivot_net = np.polyval(p, pivot_pwv)
plt.plot(pwv, net / pivot_net, label=f"{band} : {pivot_net:.1f}", lw=3)
#plt.plot(np.log(pwv), np.log((net / pivot_net) ** 2), label=f"{band} : {pivot_net:.1f}", lw=3)
p /= pivot_net
x = np.linspace(0, 6, 100)
plt.plot(x, np.polyval(p, x), "k--", label=f"{band} : fit = {p[2]:.6f}, {p[1]:.6f}, {p[0]:.6f}")
#plt.plot(np.log(x), np.log(np.polyval(p, x) ** 2), "k--", label=f"{band} : fit = {p[2]:.6f}, {p[1]:.6f}, {p[0]:.6f}")
print(f"{key} {band} {p[2]:.6f}, {p[1]:.6f}, {p[0]:.6f}")
ax.set_ylim([0, 3])
ax.set_xlabel("PWV [mm]")
ax.set_ylabel("NET factor")
plt.legend(loc="best")
fig.savefig("NET_v_pwv_fit.png")
plt.show()
497 changes: 497 additions & 0 deletions jbolo/AoA/2022/AoA_2022july23_JR.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions jbolo/AoA/2022/ApertureFuncs
339 changes: 339 additions & 0 deletions jbolo/AoA/2022/BK_bands/BK15_150_bandpass_20180920.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,339 @@
# BICEP2/Keck Array October 2018 Data Products
# BICEP2/Keck Array X: Constraints on Primordial Gravitational Waves using Planck, WMAP, and New BICEP2/Keck Observations through the 2015 Season
# http://bicepkeck.org/
#
# File: BK15_150_bandpass_20180920.txt
# Date: 2018-09-20
#
# BK15 150 GHz band frequency spectrum
# Column 1 = frequency in GHz
# Column 2 = response to a source with uniform spectra radiance
# Column 3 = response to a source with Rayleigh-Jeans spectrum
#
# Spectra are given for a beam filling source and have been peak-normalized.
# Negative values are at the noise level of the Fourier-transform spectroscopy
# measurement.
#
# Response to a source with uniform spectral radiance (column 2) matches the
# convention used in the Planck Reduced Instrument Model (http://pla.esac.esa.int/pla,
# see Planck 2013 results IX). Response to a source with Rayleigh-Jeans
# spectrum (column 3) matches the convention used in the WMAP bandpass files
# available on LAMBDA (http://lambda.gsfc.nasa.gov).
#
60.00 0.00000 0.00000
60.60 -0.01311 -0.00547
61.20 -0.01110 -0.00468
61.80 -0.01046 -0.00445
62.40 -0.00985 -0.00423
63.00 -0.00897 -0.00389
63.60 -0.00828 -0.00363
64.20 -0.00819 -0.00362
64.80 -0.00795 -0.00355
65.40 -0.00720 -0.00324
66.00 -0.00624 -0.00284
66.60 -0.00532 -0.00244
67.20 -0.00482 -0.00223
67.80 -0.00527 -0.00246
68.40 -0.00604 -0.00284
69.00 -0.00577 -0.00274
69.60 -0.00421 -0.00202
70.20 -0.00263 -0.00127
70.80 -0.00174 -0.00085
71.40 -0.00110 -0.00054
72.00 -0.00010 -0.00005
72.60 0.00104 0.00052
73.20 0.00176 0.00089
73.80 0.00225 0.00114
74.40 0.00281 0.00144
75.00 0.00308 0.00159
75.60 0.00309 0.00161
76.20 0.00326 0.00171
76.80 0.00342 0.00181
77.40 0.00357 0.00190
78.00 0.00402 0.00216
78.60 0.00474 0.00257
79.20 0.00543 0.00296
79.80 0.00622 0.00342
80.40 0.00691 0.00383
81.00 0.00709 0.00395
81.60 0.00699 0.00393
82.20 0.00684 0.00387
82.80 0.00693 0.00395
83.40 0.00734 0.00422
84.00 0.00790 0.00457
84.60 0.00820 0.00478
85.20 0.00819 0.00480
85.80 0.00841 0.00497
86.40 0.00884 0.00526
87.00 0.00898 0.00538
87.60 0.00900 0.00543
88.20 0.00897 0.00545
88.80 0.00868 0.00531
89.40 0.00855 0.00526
90.00 0.00871 0.00540
90.60 0.00897 0.00560
91.20 0.00902 0.00566
91.80 0.00884 0.00559
92.40 0.00862 0.00548
93.00 0.00849 0.00544
93.60 0.00875 0.00564
94.20 0.00909 0.00590
94.80 0.00862 0.00563
95.40 0.00792 0.00520
96.00 0.00785 0.00519
96.60 0.00821 0.00546
97.20 0.00848 0.00568
97.80 0.00828 0.00558
98.40 0.00764 0.00518
99.00 0.00728 0.00496
99.60 0.00761 0.00522
100.20 0.00817 0.00564
100.80 0.00809 0.00562
101.40 0.00733 0.00512
102.00 0.00657 0.00461
102.60 0.00632 0.00446
103.20 0.00653 0.00464
103.80 0.00685 0.00490
104.40 0.00676 0.00486
105.00 0.00625 0.00452
105.60 0.00590 0.00429
106.20 0.00595 0.00435
106.80 0.00596 0.00438
107.40 0.00554 0.00410
108.00 0.00479 0.00356
108.60 0.00413 0.00309
109.20 0.00404 0.00304
109.80 0.00428 0.00324
110.40 0.00444 0.00338
111.00 0.00432 0.00330
111.60 0.00427 0.00328
112.20 0.00509 0.00393
112.80 0.00774 0.00601
113.40 0.01222 0.00954
114.00 0.01610 0.01264
114.60 0.01643 0.01297
115.20 0.01465 0.01162
115.80 0.01560 0.01244
116.40 0.02106 0.01688
117.00 0.02720 0.02191
117.60 0.03004 0.02433
118.20 0.02940 0.02393
118.80 0.02996 0.02451
119.40 0.03780 0.03108
120.00 0.05085 0.04202
120.60 0.06005 0.04987
121.20 0.06204 0.05178
121.80 0.06582 0.05520
122.40 0.08316 0.07009
123.00 0.11380 0.09638
123.60 0.14500 0.12341
124.20 0.16327 0.13963
124.80 0.17712 0.15221
125.40 0.21370 0.18452
126.00 0.27690 0.24024
126.60 0.33623 0.29310
127.20 0.36234 0.31736
127.80 0.36655 0.32256
128.40 0.38925 0.34415
129.00 0.44279 0.39331
129.60 0.49595 0.44258
130.20 0.52374 0.46955
130.80 0.54239 0.48851
131.40 0.58497 0.52927
132.00 0.66090 0.60071
132.60 0.73854 0.67433
133.20 0.78131 0.71660
133.80 0.79876 0.73591
134.40 0.82494 0.76344
135.00 0.86483 0.80393
135.60 0.89620 0.83679
136.20 0.90264 0.84653
136.80 0.88747 0.83597
137.40 0.87004 0.82315
138.00 0.86699 0.82384
138.60 0.87994 0.83979
139.20 0.90400 0.86648
139.80 0.92884 0.89413
140.40 0.94104 0.90976
141.00 0.94407 0.91659
141.60 0.95455 0.93071
142.20 0.97485 0.95453
142.80 0.99300 0.97640
143.40 1.00000 0.98742
144.00 0.99460 0.98620
144.60 0.98396 0.97971
145.20 0.97886 0.97868
145.80 0.98158 0.98545
146.40 0.98604 0.99400
147.00 0.98794 1.00000
147.60 0.98356 0.99963
148.20 0.97184 0.99173
148.80 0.96175 0.98541
149.40 0.95630 0.98378
150.00 0.94902 0.98021
150.60 0.94374 0.97865
151.20 0.94684 0.98578
151.80 0.95139 0.99445
152.40 0.94825 0.99508
153.00 0.93823 0.98845
153.60 0.92668 0.98011
154.20 0.91601 0.97261
154.80 0.90554 0.96523
155.40 0.89449 0.95715
156.00 0.88390 0.94947
156.60 0.87436 0.94283
157.20 0.86269 0.93381
157.80 0.84573 0.91895
158.40 0.82544 0.90031
159.00 0.80487 0.88120
159.60 0.78248 0.85992
160.20 0.75505 0.83290
160.80 0.72352 0.80110
161.40 0.69101 0.76796
162.00 0.65650 0.73232
162.60 0.61794 0.69186
163.20 0.57841 0.64999
163.80 0.54199 0.61130
164.40 0.50982 0.57713
165.00 0.48144 0.54699
165.60 0.45366 0.51730
166.20 0.42181 0.48273
166.80 0.38440 0.44150
167.40 0.34344 0.39588
168.00 0.30314 0.35067
168.60 0.26678 0.30972
169.20 0.23354 0.27209
169.80 0.20137 0.23544
170.40 0.16992 0.19937
171.00 0.14004 0.16489
171.60 0.11477 0.13561
172.20 0.09600 0.11383
172.80 0.08144 0.09690
173.40 0.06884 0.08219
174.00 0.05803 0.06953
174.60 0.04926 0.05922
175.20 0.04231 0.05104
175.80 0.03632 0.04397
176.40 0.03052 0.03707
177.00 0.02554 0.03113
177.60 0.02174 0.02659
178.20 0.01842 0.02260
178.80 0.01541 0.01897
179.40 0.01259 0.01555
180.00 0.00989 0.01226
180.60 0.00772 0.00960
181.20 0.00616 0.00769
181.80 0.00489 0.00612
182.40 0.00386 0.00485
183.00 0.00310 0.00391
183.60 0.00249 0.00315
184.20 0.00200 0.00254
184.80 0.00164 0.00209
185.40 0.00128 0.00163
186.00 0.00095 0.00122
186.60 0.00075 0.00096
187.20 0.00064 0.00082
187.80 0.00055 0.00071
188.40 0.00044 0.00057
189.00 0.00029 0.00038
189.60 0.00018 0.00023
190.20 0.00015 0.00020
190.80 0.00016 0.00021
191.40 0.00015 0.00020
192.00 0.00010 0.00013
192.60 0.00003 0.00004
193.20 -0.00001 -0.00001
193.80 -0.00002 -0.00003
194.40 -0.00005 -0.00007
195.00 -0.00010 -0.00013
195.60 -0.00012 -0.00016
196.20 -0.00010 -0.00014
196.80 -0.00003 -0.00004
197.40 0.00006 0.00008
198.00 0.00011 0.00015
198.60 0.00011 0.00015
199.20 0.00007 0.00010
199.80 0.00000 0.00000
200.40 -0.00004 -0.00006
201.00 -0.00009 -0.00012
201.60 -0.00014 -0.00019
202.20 -0.00018 -0.00025
202.80 -0.00019 -0.00027
203.40 -0.00018 -0.00025
204.00 -0.00016 -0.00022
204.60 -0.00015 -0.00021
205.20 -0.00018 -0.00025
205.80 -0.00024 -0.00034
206.40 -0.00030 -0.00043
207.00 -0.00033 -0.00047
207.60 -0.00034 -0.00049
208.20 -0.00035 -0.00050
208.80 -0.00034 -0.00049
209.40 -0.00033 -0.00048
210.00 -0.00034 -0.00049
210.60 -0.00035 -0.00051
211.20 -0.00037 -0.00054
211.80 -0.00039 -0.00057
212.40 -0.00039 -0.00057
213.00 -0.00038 -0.00056
213.60 -0.00038 -0.00056
214.20 -0.00036 -0.00053
214.80 -0.00034 -0.00050
215.40 -0.00032 -0.00047
216.00 -0.00028 -0.00042
216.60 -0.00024 -0.00036
217.20 -0.00022 -0.00033
217.80 -0.00023 -0.00034
218.40 -0.00026 -0.00039
219.00 -0.00029 -0.00044
219.60 -0.00032 -0.00048
220.20 -0.00030 -0.00045
220.80 -0.00027 -0.00041
221.40 -0.00025 -0.00038
222.00 -0.00024 -0.00037
222.60 -0.00021 -0.00032
223.20 -0.00018 -0.00028
223.80 -0.00015 -0.00023
224.40 -0.00013 -0.00020
225.00 -0.00012 -0.00019
225.60 -0.00011 -0.00017
226.20 -0.00010 -0.00016
226.80 -0.00007 -0.00011
227.40 -0.00003 -0.00005
228.00 0.00001 0.00002
228.60 0.00005 0.00008
229.20 0.00010 0.00016
229.80 0.00014 0.00022
230.40 0.00016 0.00025
231.00 0.00014 0.00022
231.60 0.00013 0.00021
232.20 0.00013 0.00021
232.80 0.00013 0.00021
233.40 0.00013 0.00021
234.00 0.00013 0.00021
234.60 0.00013 0.00021
235.20 0.00013 0.00021
235.80 0.00012 0.00019
236.40 0.00012 0.00020
237.00 0.00012 0.00020
237.60 0.00012 0.00020
238.20 0.00012 0.00020
238.80 0.00012 0.00020
239.40 0.00013 0.00021
240.00 0.00015 0.00025
240.60 0.00016 0.00027
241.20 0.00017 0.00028
241.80 0.00018 0.00030
242.40 0.00020 0.00033
243.00 0.00022 0.00037
243.60 0.00024 0.00040
244.20 0.00027 0.00045
244.80 0.00029 0.00049
245.40 0.00030 0.00051
246.00 0.00031 0.00053
246.60 0.00033 0.00056
247.20 0.00034 0.00058
247.80 0.00034 0.00058
248.40 0.00033 0.00056
249.00 0.00032 0.00055
249.60 0.00000 0.00000
Loading