Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Short sample processing fixes #40

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SHORT_SET: abort processing if acquisition fails and (settings.abortI…
…fInsane==True)
Ryan Kingsbury committed Jun 28, 2016
commit 7b95104a44db7304a8258399d4dffd984792438b
12 changes: 12 additions & 0 deletions peregrine/short_set.py
Original file line number Diff line number Diff line change
@@ -561,6 +561,18 @@ def postprocess_short_samples(signal, prior_trajectory, t_prior, settings,
ephem, settings,
n_codes_integrate)

# If acquisition failed, update the cache accordingly and abort
if len(acqed)==0:
logger.error("Acquisition failed, aborting processing of this capture")
if settings.useCache:
if not os.path.exists(obs_cache_dir):
os.makedirs(obs_cache_dir)
with open(obs_cache_file, 'wb') as f:
cPickle.dump(([], None, None), f,
protocol=cPickle.HIGHEST_PROTOCOL)
logger.error("Marked failed acquisition in cache")
return

# Rearrange to put sat with smallest range-rate first.
# This makes graphs a bit less hairy.
acqed.sort(key = lambda a: abs(a.doppler))