Skip to content

Commit 89032ae

Browse files
Style fix
1 parent 290f41f commit 89032ae

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

hendrics/efsearch.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ def transient_search(
607607
use_memmap = False
608608
if np.prod(results_shape) > 1e7:
609609
import tempfile
610+
610611
tmp_results = tempfile.NamedTemporaryFile(delete=True).name + "_hen.npy"
611612
tmp_f = tempfile.NamedTemporaryFile(delete=True).name + "_hen.npy"
612613
log.info(
@@ -631,7 +632,6 @@ def transient_search(
631632
times = dt * np.arange(all_results.shape[2])
632633
final_results_shape = (nave.size, all_results.shape[2], all_results.shape[0])
633634
if use_memmap:
634-
635635
tmp_results_stats = tempfile.NamedTemporaryFile(delete=True).name + "_hen.npy"
636636
all_results_stats = np.lib.format.open_memmap(
637637
tmp_results_stats, mode="w+", dtype=results.dtype, shape=final_results_shape
@@ -675,8 +675,11 @@ def plot_transient_search(results, gif_name=None):
675675
max_stats_rows = []
676676
all_images = []
677677
import tqdm
678+
678679
log.info("Generating plots for transient search...")
679-
for i, (ima, nave) in tqdm.tqdm(enumerate(zip(results.stats, results.nave)), total=len(results.nave)):
680+
for i, (ima, nave) in tqdm.tqdm(
681+
enumerate(zip(results.stats, results.nave)), total=len(results.nave)
682+
):
680683
f = results.freqs
681684
t = results.times
682685
nprof = ima.shape[0]
@@ -707,7 +710,9 @@ def plot_transient_search(results, gif_name=None):
707710
axf = plt.subplot(gs[0, i_f])
708711
axima = plt.subplot(gs[1, i_f], sharex=axf)
709712

710-
axima.pcolormesh(f, t, ima, vmax=detl, vmin=detl / 10, shading="nearest", rasterized=True)
713+
axima.pcolormesh(
714+
f, t, ima, vmax=detl, vmin=detl / 10, shading="nearest", rasterized=True
715+
)
711716

712717
mean_line = np.mean(ima, axis=0) / sum_detl * 3
713718
maxidx = np.argmax(mean_line)

0 commit comments

Comments
 (0)