Skip to content

Commit

Permalink
intendation
Browse files Browse the repository at this point in the history
  • Loading branch information
jgieseler committed Jul 11, 2023
1 parent d143eec commit 7d7ec43
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions solo_epd_loader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,23 +1189,6 @@ def calc_electrons(df, meta, contamination_threshold=2, only_averages=False, res
"""
df = df.copy()

# if df.index[0] <= pd.Timestamp(dt.date(2021, 10, 22)): # old STEP data
# # TODO: add Electron_xx_Flux_Mult for all pixels. until then, only calculate Averages
# if not only_averages:
# print('For old STEP data only pixel-averaged electron fluxes supported at the moment!')
# only_averages = True # remove when adding Electron_xx_Flux_Mult
# # Electron_Flux_Mult = {'Electron_Avg_Flux_Mult':
# # np.array([0.6, 0.61, 0.63, 0.68, 0.76, 0.81, 1.06, 1.32, 1.35, 1.35, 1.35,
# # 1.34, 1.34, 1.35, 1.38, 1.36, 1.32, 1.32, 1.28, 1.26, 1.15, 1.15,
# # 1.15, 1.15, 1.16, 1.16, 1.16, 1.17, 1.17, 1.16, 1.18, 1.17, 1.17,
# # 1.16, 1.17, 1.15, 1.16, 1.17, 1.18, 1.17, 1.17, 1.17, 1.18, 1.18,
# # 1.19, 1.18, 1.19, 1.2])}
# # for i in range(1, 16):
# # Electron_Flux_Mult['Electron_'+str(i).rjust(2, '0')+'_Flux_Mult'] = np.array([0.66, 1.22, 1.35, 1.36, 1.18, 1.17, 1.16, 1.18])
# elif df.index[0] > pd.Timestamp(dt.date(2021, 10, 22)): # new STEP data
# print('new data')
# Electron_Flux_Mult = meta['Electron_Flux_Mult']

Electron_Flux_Mult = meta['Electron_Flux_Mult']

if resample:
Expand Down Expand Up @@ -1555,13 +1538,13 @@ def _read_cdf_mod(fname, ignore_vars=[]):
unit = _known_units[unit_str]
else:
warn_user(f'astropy did not recognize units of "{unit_str}". '
'Assigning dimensionless units. '
'If you think this unit should not be dimensionless, '
'please raise an issue at https://github.com/sunpy/sunpy/issues')
'Assigning dimensionless units. '
'If you think this unit should not be dimensionless, '
'please raise an issue at https://github.com/sunpy/sunpy/issues')
unit = u.dimensionless_unscaled
else:
warn_user(f'No units provided for variable "{var_key}". '
'Assigning dimensionless units.')
'Assigning dimensionless units.')
unit = u.dimensionless_unscaled

if data.ndim > 3:
Expand Down

0 comments on commit 7d7ec43

Please sign in to comment.