示例#1
0
)
matplotlib.rc('font', **font)

B = 10.06
wl = 3e8 / 10.67e9

datafile = "../data/sun-4_3_2014-22.npz"
logfile = "../data/logs/sun-4_3_2014-22-log"

sun = Analyzer(datafile, logfile, dt=1.0)

# First we will remove that raised section at the end (starts at index 26000)
sun.slice(0, 26000)

# Next we set invalid points (from telescope homing) to the avg_dc
sun.flatten_invalid_points()


plt.subplot(211)
plt.plot(sun["ha"], sun["volts"])
plt.xlabel(r"Hour angle [h]", fontsize=18)
plt.ylabel(r"Power", fontsize=18)
plt.subplot(212)
trans = np.fft.fft(sun["volts"])
freqs = np.fft.fftfreq(len(trans), 2. * np.pi * 1.0 / 86164.)
plt.plot(np.fft.fftshift(freqs), np.fft.fftshift(abs(trans)**2))
plt.xlabel(r"Frequency [rad$^{-1}$]", fontsize=18)
plt.ylabel(r"Power", fontsize=18)

# Now we remove the dc offset, as well as high frequency noise
local_fringe_frequencies = fringe_freq(B, wl, sun["dec"], 2.*np.pi*sun["ha"]/24.)
示例#2
0
obs.long = np.deg2rad(-122.2573)
obs.date = ephem.date("2014-04-06 20:12:45")
damoon.compute(obs)
for i, lst in enumerate(moon["lst"]):
    moon["ra"][i] = 24. * damoon.ra / (2. * np.pi)
    moon["dec"][i] = np.rad2deg(damoon.dec)
    obs.date += 1. / 86164.
    damoon.compute(obs)

moon.data["ha"] = moon.data["lst"] - moon.data["ra"]
moon.data["ha"] -= (24.0 * (moon.data["ha"] > 12.0))

moon.slice(0, len(moon["volts"])-5000)

# Next we set invalid points (from telescope homing) to the avg_dc
moon.flatten_invalid_points()

plt.subplot(211)
plt.plot(moon["ha"], moon["volts"])
plt.xlabel(r"Hour angle [h]", fontsize=18)
plt.ylabel(r"Power", fontsize=18)
plt.subplot(212)
trans = np.fft.fft(moon["volts"])
freqs = np.fft.fftfreq(len(trans), 2. * np.pi * 1.0 / 86164.)
plt.plot(np.fft.fftshift(freqs), np.fft.fftshift(abs(trans)**2))
plt.xlabel(r"Frequency [rad$^{-1}$]", fontsize=18)
plt.ylabel(r"Power", fontsize=18)

# Now we remove the dc offset, as well as high frequency noise
local_fringe_frequencies = fringe_freq(B, wl, moon["dec"], 2.*np.pi*moon["ha"]/24.)
bandpass = FourierFilter(min_freq=0.001, max_freq=max(local_fringe_frequencies))
示例#3
0
crab = Analyzer(datafile, logfile, dt=1.0, ra=24. * OBJECTS["3C144"]["ra"] / (2. * np.pi))

plt.subplot(211)
plt.plot(crab["ha"], crab["volts"])
plt.xlabel(r"Hour angle [h]", fontsize=18)
plt.ylabel(r"Power", fontsize=18)
plt.subplot(212)
trans = np.fft.fft(crab["volts"])
freqs = np.fft.fftfreq(len(trans), 2. * np.pi * 1.0 / 86164.)
plt.plot(np.fft.fftshift(freqs), np.fft.fftshift(abs(trans)**2))
plt.xlabel(r"Frequency [rad$^{-1}$]", fontsize=18)
plt.ylabel(r"Power", fontsize=18)

# First we set invalid points (from telescope homing) to the avg_dc
crab.flatten_invalid_points()

crab["volts_orig"] = crab["volts"]
# Next we find the min and max fringe frequencies that we expect to see in the data
# divide it into chunks since the fringe frequency changes over time
local_fringe_frequencies = fringe_freq(10.0, wl, OBJECTS["3C144"]["dec"], 2.*np.pi*crab["ha"]/24.)
min_freq = np.min(abs(local_fringe_frequencies))
# min_freq = 40.0 # rad^-1 (seen by eye as the limit of good data)
max_freq = np.max(abs(local_fringe_frequencies))

catalog_dec = OBJECTS["3C144"]["dec"]

'''
s2s2 = []
Y_s2 = []
a2s = []