Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 23, 2023
1 parent 7347869 commit 655e11f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions simpleDS/delay_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,6 @@ def update_cosmology(self, cosmology=None, littleh_units=False):
# If power spectrum estimation has already occurred, need to re-normalize
# in the new cosmological framework.
if self.power_array is not None:

if self.power_array.unit.is_equivalent((units.Jy * units.Hz) ** 2):
# This additoinal units.sr term in the c/2*K_b expression may seem
# weird, however, the temperature to Jy conversion factor is defined
Expand Down Expand Up @@ -1316,7 +1315,6 @@ def update_cosmology(self, cosmology=None, littleh_units=False):
self.noise_power = self.noise_power << units.Unit("mK^2 * Mpc^3")

if self.thermal_power is not None:

integration_array = (
self.freq_array.reshape(self.Nspws, 1, self.Nfreqs) ** 4
/ simple_cosmo.X2Y(
Expand Down Expand Up @@ -1968,7 +1966,6 @@ def select(
)

if not self.metadata_only:

for inds, axis in zip(
[spw_inds, uv_inds, pol_inds, bl_inds, lst_inds], [0, 1, 2, 3, 4]
):
Expand Down
3 changes: 1 addition & 2 deletions simpleDS/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ def __eq__(self, other):
return False
except TypeError:
try:

if not all(
np.isclose(p_val, other_val)
for p_val, other_val in zip(parm, other_parm)
Expand Down Expand Up @@ -333,7 +332,7 @@ def __eq__(self, other):
self_lower[key], other_lower[key]
):
values_close = False
except (TypeError):
except TypeError:
# this isn't a type that can be
# handled by np.isclose,
# test for equality
Expand Down
2 changes: 1 addition & 1 deletion simpleDS/tests/test_delay_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def test_properties(self):
this_param = getattr(self.dspec_object, v)
try:
assert rand_num == this_param.value
except (AssertionError):
except AssertionError:
print(
"setting {prop_name} to a random number failed".format(prop_name=k)
)
Expand Down

0 comments on commit 655e11f

Please sign in to comment.