コード例 #1
0
rcParams['lines.linewidth'] = 1
rcParams['lines.markeredgewidth'] = 1

#M_BH = 10**(7.78/8.) #in 10^8 M_sun
#R = 1./(1.1*M_BH)*121 # in 100 R_suns
z = 0.658  # redshift
avg_mag = 19.5
tau = 121.
sigma = 0.56  #for RX J1131 at 1000 A

X_0 = avg_mag  #initial condition of light curve
print 'tau', tau
Nsteps = 1000
Nsamples = 1000

t = hubble_obs_sched(80)
figure(1)
subplot(211)
plot(t, ones(len(t)), '.')
xlabel('time, days')
title('Hubble-like obs. schedule, 80 orbits')
ylim(0., 2.)
xlim(0., max(t))
subplot(212)
plot(t, ones(len(t)), '.')
xlabel('time, days')
xlim(0., 1.)
ylim(0., 2.)
title('Hubble-like obs. schedule, 1 day zoom in')
X = drw_lightcurve(t, X_0, tau, sigma, avg_mag, z, Nsteps)
figure(2)
コード例 #2
0
rcParams['figure.figsize'] = 8, 8
rcParams['legend.numpoints'] = 1
rcParams['lines.markersize'] = 7
rcParams['lines.linewidth'] = 1
rcParams['lines.markeredgewidth'] = 1

delay = 1.5
delta_mag = 1.

tau = 121.
sigma = 0.56
avg_mag = 18.5
redshift = 0.658  # redshift
Nsteps = 1000

time_array = hubble_obs_sched(80)
lc1, lc2 = delayed_lightcurve(time_array, delay, delta_mag, redshift, tau,
                              avg_mag, sigma, Nsteps)

#figure(1)
#plot(time_array,'.')

figure(2)
#subplot(311)
#plot(concatenate(t,lc,'o-', lw=1, ms=6)
subplot(211)
plot(time_array, lc1, 'b.-', label='light curve 1')
plot(time_array, lc2, 'r.-', label='light curve 2')
legend(loc=1)
ylabel('flux, arb. u.')
xlabel('time, days')
コード例 #3
0
rcParams['lines.markersize'] = 7
rcParams['lines.linewidth'] = 1
rcParams['lines.markeredgewidth'] = 1



delay=1.5
delta_mag=1.

tau=121.
sigma=0.56
avg_mag=18.5
redshift = 0.658 # redshift
Nsteps=1000

time_array=hubble_obs_sched(80)
lc1,lc2=delayed_lightcurve(time_array, delay, delta_mag, redshift,  tau, avg_mag, sigma, Nsteps)

#figure(1)
#plot(time_array,'.')

figure(2)
#subplot(311)
#plot(concatenate(t,lc,'o-', lw=1, ms=6)
subplot(211)
plot(time_array,lc1,'b.-', label='light curve 1')
plot(time_array,lc2,'r.-', label='light curve 2')
legend(loc=1)
ylabel('flux, arb. u.')
xlabel('time, days')
subplot(212)
コード例 #4
0
ファイル: delay_ll_plots.py プロジェクト: hlabathems/fot
rcParams['figure.figsize'] = 10, 8 
rcParams['legend.numpoints'] = 1 
rcParams['lines.markersize'] = 10 
rcParams['lines.linewidth'] = 1
rcParams['lines.markeredgewidth'] = 1

delay=1.5
delta_mag=-1.

tau=121.
sigma=0.56
avg_mag=18.5
redshift = 0.658 # redshift
Nsteps=1000

t=hubble_obs_sched(80)
#t=arange(0.,1825.,5.)
lc1,lc2=delayed_lightcurve(t, delay, delta_mag, redshift,  tau, avg_mag, sigma, Nsteps)

error=avg_mag*.02
err1=array([random.gauss(0.,error) for _ in xrange(len(t))])
err2=array([random.gauss(0.,error) for _ in xrange(len(t))])
#X_data=X+err
#t*=(1+z) # convert back to time at the observer
#print lc1
figure()
ax=subplot(221)
plot(t,lc1, 'bo', ms=6,  label='light curve 1')
plot(t,lc2, 'r.', ms=3, label='light curve 2')
legend(loc=1)
xlabel('time, days')