Skip to content

Commit ef280b4

Browse files
committed
Add (EEF product) EEJ QDLat profile coordinates
1 parent 16d5f28 commit ef280b4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

viresclient/_data_handling.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
FRAME_NAMES = {"NEC": ["B_NEC"],
4545
"VFM": ["B_VFM", "dB_Sun", "dB_AOCS", "dB_other", "B_error"],
4646
"quaternion": ["q_NEC_CRF"],
47-
"WGS84": ["GPS_Position", "LEO_Position"]}
47+
"WGS84": ["GPS_Position", "LEO_Position"],
48+
"EEJ_QDLat": ["EEJ"]}
4849
# Reverse mapping of the above
4950
DATANAMES_TO_FRAME_NAMES = {}
5051
for framename, datanameset in FRAME_NAMES.items():
@@ -55,9 +56,12 @@
5556
FRAME_LABELS = {"NEC": ["N", "E", "C"],
5657
"VFM": ["i", "j", "k"],
5758
"quaternion": ["1", "i", "j", "k"],
58-
"WGS84": ["X", "Y", "Z"]}
59+
"WGS84": ["X", "Y", "Z"],
60+
"EEJ_QDLat": numpy.linspace(-20, 20, 81)}
5961
FRAME_DESCRIPTIONS = {
60-
"NEC": "NEC frame - North, East, Centre (down)"
62+
"NEC": "NEC frame - North, East, Centre (down)",
63+
"VFM": "Vector Field Magnetometer instrument frame",
64+
"EEJ_QDLat": "Quasi-dipole latitude profile between -20 and 20 degrees from the EEF product"
6165
}
6266

6367

@@ -162,7 +166,7 @@ def as_pandas_dataframe(self, expand=False):
162166
framename = DATANAMES_TO_FRAME_NAMES.get(column, "NEC")
163167
suffixes = FRAME_LABELS[framename]
164168
for suffix in suffixes:
165-
df[column + "_" + suffix] = None
169+
df[column + "_" + str(suffix)] = None
166170
return df
167171
# Convert timestamps to datetime objects
168172
df.index = self._cdftime_to_datetime(df.index)
@@ -178,7 +182,7 @@ def as_pandas_dataframe(self, expand=False):
178182
if vector_data.shape[1] != len(suffixes):
179183
raise NotImplementedError("{}".format(column))
180184
for i, suffix in enumerate(suffixes):
181-
df[column + "_" + suffix] = vector_data[:, i]
185+
df[column + "_" + str(suffix)] = vector_data[:, i]
182186
return df
183187

184188
def as_xarray_dataset(self):

0 commit comments

Comments
 (0)