Skip to content

Commit f2c7001

Browse files
author
Etienne Bonnassieux
committed
failed to comment out a variable
1 parent 0165517 commit f2c7001

2 files changed

Lines changed: 55 additions & 9 deletions

File tree

saopicc_schemas/antenna_gains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ class AntennaGains(AsDataset):
3939
NAME: Attr[str]
4040
TYPE: Attr[str]
4141
# comments field
42-
comments: Coord[Comments, str]
42+
comment: Coord[Comments, str]
4343
# Version of the schema
4444
VERSION: Attr[str] = "0.0.1.1"

tests/test_kms_gain.py

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@ def test_gains_creation():
88
# times are defined approximately based on nenufar dataset
99
# 8s dt, 8h observation
1010
time = np.linspace(1.64e9, 1.64e9 + 3600 * 8, 3600)
11+
# assume a dt of 32s for the solve
12+
t0 = time - 16.0
13+
t1 = time + 16.0
14+
# observation from 856 MHz to 1.712 GHz, why not
1115
freqs = np.linspace(0.856e9, 2 * 0.856e9, 64)
16+
# assume 48 MHz bandwidth for the solve
17+
nu0 = freqs - 24 * 1e6
18+
nu1 = freqs + 24 * 1e6
1219
antenna = np.arange(28).astype(str)
1320
direction = np.arange(16)
14-
corrs = np.array(["RR", "RL", "LR", "LL"])
21+
# nenufar, ska-low etc have linear dipoles
22+
corrs = np.array(["XX", "XY", "YX", "YY"])
1523
ntime = len(time)
1624
nfreq = len(freqs)
1725
nant = len(antenna)
@@ -30,17 +38,55 @@ def test_gains_creation():
3038
"units": "s",
3139
"format": "unix",
3240
"scale": "utc",
33-
"integration_time": {
34-
"attrs": {"type": "quantity", "units": "s"},
35-
"data": 8.0,
36-
},
3741
},
3842
),
39-
gain_freq=freqs,
43+
gain_t0=xarray.DataArray(
44+
t0,
45+
attrs={
46+
"type": "time",
47+
"units": "s",
48+
"format": "unix",
49+
"scale": "utc",
50+
},
51+
),
52+
gain_t1=xarray.DataArray(
53+
t1,
54+
attrs={
55+
"type": "time",
56+
"units": "s",
57+
"format": "unix",
58+
"scale": "utc",
59+
},
60+
),
61+
gain_freq=xarray.DataArray(
62+
freqs,
63+
attrs={
64+
"type": "spectral_coord",
65+
"units": "Hz",
66+
"observer": "gcrs",
67+
},
68+
),
69+
gain_nu0=xarray.DataArray(
70+
nu0,
71+
attrs={
72+
"type": "spectral_coord",
73+
"units": "Hz",
74+
"observer": "gcrs",
75+
},
76+
),
77+
gain_nu1=xarray.DataArray(
78+
nu1,
79+
attrs={
80+
"type": "spectral_coord",
81+
"units": "Hz",
82+
"observer": "gcrs",
83+
},
84+
),
4085
GAIN_AXES=["direction", "antenna", "gain_time", "gain_freq", "correlation"],
41-
GAIN_SPEC=[[115], [64], [28], [1], [4]],
86+
GAIN_SPEC=[[16], [28], [3600], [64], [4]],
4287
NAME="G",
43-
VERSION="0.0.1",
88+
VERSION="0.0.1.1",
4489
TYPE="complex",
90+
comment="NenuFAR prototype gain",
4591
)
4692
print(gains)

0 commit comments

Comments
 (0)