Skip to content

Commit e5ed36a

Browse files
committed
updated remote.py and relevant bits of ares.util.Survey to accommodate change in Roman effective area data files
1 parent d2c81c5 commit e5ed36a

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

ares/util/Survey.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def _read_roman(self, filters=None):
420420
except ImportError:
421421
raise ImportError("Need pandas to read Roman ST throughputs.")
422422

423-
_fn = 'WFIRST_WIMWSM_throughput_data_190531.xlsm'
423+
_fn = 'Roman_effarea_20201130.xlsx'
424424

425425
A = np.pi * (0.5 * 2.4)**2
426426

@@ -430,11 +430,14 @@ def _read_roman(self, filters=None):
430430
if fn != _fn:
431431
continue
432432

433-
df = pd.read_excel(self.path + '/' + _fn, sheet_name='EffectiveArea',
434-
header=18)
433+
df = pd.read_excel(self.path + '/' + _fn,
434+
sheet_name='Roman_effarea_20201130',
435+
header=1)
435436

436-
cols = df.columns
437-
x = df['microns'].to_numpy()
437+
_cols = df.columns
438+
cols = [col.strip() for col in _cols]
439+
440+
x = df['Wave'].to_numpy()
438441

439442
for col in cols:
440443
if col[0] != 'F':
@@ -444,7 +447,7 @@ def _read_roman(self, filters=None):
444447
cent = float(col[1] + '.' + col[2:])
445448

446449
# This is an effective area. Take T = A_eff / (pi * 1.2**2)
447-
y = df[col].to_numpy() / A
450+
y = df[' '+col].to_numpy() / A
448451
y[x > 2] = 0 # spurious spike at ~2.6 microns
449452

450453
data[pre] = self._get_filter_prop(np.array(x), np.array(y), cent)

remote.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
'080924ch1trans_full.txt',
6262
'080924ch2trans_full.txt',
6363
None],
64-
'roman': ['https://roman.gsfc.nasa.gov/science/201907/',
65-
'WFIRST_WIMWSM_throughput_data_190531.xlsm',
64+
'roman': ['https://roman.gsfc.nasa.gov/science/RRI/',
65+
'Roman_effarea_20201130.xlsx',
6666
None],
6767
#'wfc': ['http://www.stsci.edu/hst/acs/analysis/throughputs/tables',
6868
# 'wfc_F435W.dat',

0 commit comments

Comments
 (0)