diff --git a/python/rfplot.py b/python/rfplot.py index 29a066f..1d40805 100755 --- a/python/rfplot.py +++ b/python/rfplot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python import numpy as np import ppgplot from strf.rfio import Spectrogram @@ -10,17 +10,15 @@ if __name__ == "__main__": prefix = "2018-12-31T09:34:11" ifile = 48000 nsub = 900 - path = "/data2/satobs/radio/20190207" - prefix = "2019-02-07T08:26:59" - ifile = 0 - nsub = 21600 # Read spectrogram s = Spectrogram.read_bin_files(path, prefix, ifile, nsub, 4171) + + s.correct_spectrogram(143050000.0, 200.0) + zmin = 0.0 zmax = 0.00008 - zmax = 0.02 # Start ppgplot @@ -73,7 +71,7 @@ if __name__ == "__main__": fmin -= fcen fmax -= fcen ppgplot.pgswin(xmin, xmax, fmin, fmax) - ppgplot.pgbox("", 0., 0, "BCTSN", 0., 0) + ppgplot.pgbox("", 0., 0, "BTSN", 0., 0) ppgplot.pglab("UT Date", "Frequency - {:.3f} MHz".format(fcen), "") # Back to pixels diff --git a/python/strf/cmap.py b/python/strf/cmap.py index aff9c76..f363209 100644 --- a/python/strf/cmap.py +++ b/python/strf/cmap.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python import numpy as np cm_cool = np.array([[-0.5, 0.0, 0.17, 0.33, 0.50, 0.67, 0.83, 1.0, 1.7], diff --git a/python/strf/rfio.py b/python/strf/rfio.py index 76dbfd4..bc43256 100644 --- a/python/strf/rfio.py +++ b/python/strf/rfio.py @@ -1,9 +1,10 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python import numpy as np from datetime import datetime import re import os from astropy.time import Time +import scipy.optimize class Spectrogram: """Spectrogram class""" @@ -34,7 +35,7 @@ class Spectrogram: while isub