Skip to content

Instantly share code, notes, and snippets.

@francoisluus
Last active January 25, 2018 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save francoisluus/96c2bf3eb830e12d1075f77f38327531 to your computer and use it in GitHub Desktop.
Save francoisluus/96c2bf3eb830e12d1075f77f38327531 to your computer and use it in GitHub Desktop.
mapreduce
# grab all segments of 2.5 TB measurement
rdd = sc.binaryFiles(','.join(trappist1_bf1x_1))
rdd = rdd.map(lambda p: to_compamp(p)) # convert to numpy array
rdd_stats = rdd.map(lambda p: (p[0], stats(p[1])))
stats1 = rdd_stats.collect() # collect power stats
rdd_wf = rdd.map(lambda p: (p[0], line_waterfall(p[1], 256)))
wf1 = rdd_wf.collect() # collect waterfall plots
rdd_ac = rdd.map(lambda p: (p[0], line_autocorrelation(p[1], 128)))
ac1 = rdd_ac.collect() # collect autocorrelation plots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment