Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jdhenshaw/scousepy into f…
Browse files Browse the repository at this point in the history
…lagspec
  • Loading branch information
jdhenshaw committed Apr 27, 2022
2 parents e1388c2 + 444e572 commit 07ca8bc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions scousepy/stage_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import numpy as np
import sys
from astropy.stats import mad_std

from .io import *
from .parallel_map import *
Expand Down Expand Up @@ -62,9 +63,15 @@ def compute_noise(scouseobject):
stopcount+=1
specidx+=1
else:
stuck+=1
if stuck==50:
stopcount=500.0
rmsVal = mad_std(_spectrum, ignore_nan=True)
if np.isfinite(rmsVal):
rmsList.append(rmsVal)
stopcount+=1
specidx+=1
else:
stuck+=1
if stuck==50:
stopcount+=500.0

rms = np.nanmedian(rmsList)

Expand Down Expand Up @@ -161,7 +168,7 @@ def generate_SAAs(scouseobject, coverageobject):
if scouseobject.njobs > 1:
# if __name__ == 'scousepy.stage_1':
# print(__name__)
results = parallel_map(create_saa, inputlist, numcores=scouseobject.njobs)
results = list(parallel_map(create_saa, inputlist, numcores=scouseobject.njobs))
else:
if scouseobject.verbose:
results=[create_saa(input) for input in tqdm(inputlist)]
Expand Down

0 comments on commit 07ca8bc

Please sign in to comment.