コード例 #1
0
ファイル: plot_disk_fit.py プロジェクト: rieder/exorings
        help()
    elif opt in ("-d", "--dfile"):
        fitsin_disk = arg
        read_in_disk_parameters = True
    elif opt in ("-o", "--ofile"):
        plotfileout = arg

# get light curve gradients
grad = ascii.read("gradients.txt")
grad_time = grad['col1'] + 54222.
grad_mag = np.abs(grad['col2'])

# read in or create the ring system tau and radii

print 'Reading in disk parameters from %s' % fitsin_disk
(res, taun_ringsxx, rad_ringsxx, dstar) = exorings.read_ring_fits(fitsin_disk)

# make the radius and projected gradient for the measured gradient points
(ring_disk_fit, grad_disk_fit) = \
    exorings.make_ring_grad_line(grad_time, res[0], res[1], res[2], res[3])

# produce fine grained gradient and ring values
samp_t = np.arange(-100, 100, 0.001) + 54222.
(samp_r, samp_g) = exorings.make_ring_grad_line(samp_t, res[0], res[1], res[2],
                                                res[3])
hjd_minr = samp_t[np.argmin(samp_g)]

exorings.print_disk_parameters(res, hjd_minr, samp_r)

# plotting fit of gradients from ellipse curve to J1407 gradients
コード例 #2
0
ファイル: disk_sim.py プロジェクト: rieder/exorings
print 'Orbital radius   = %5.2f  AU' % a
v = vcirc(Mstar, Mb, a)

if vstar > 0:
    v = vstar
    print 'manual velocity of star is %.1f km.s-1' % v

print 'Orbital velocity = %5.2f  km/s (use option -s to set new velocity)' % (v/1.e3)

dstar = (Rstar * rsol * 2 / v) / 86400.

print 'Primary diameter = %5.2f  days' % dstar

if read_in_ring_parameters:
    print 'Reading in rings from %s' % fitsin_ring
    (resxx, taun_rings, rad_rings, xxxdstar) = exorings.read_ring_fits(fitsin_ring)
else:
    print "Starting with new rings...."
    rad_rings = np.array([59.0])
    taun_rings = np.array([0.0])
    rad_rings = np.append(rad_rings, (100.))
    taun_rings = np.append(taun_rings, (1000.))

exorings.print_ring_tau(rad_rings, exorings.y_to_tau(taun_rings))

if read_in_disk_parameters:
    print 'Reading in disk parameters from %s' % fitsin_disk
    (res, taun_ringsxx, rad_ringsxx, dstarxx) = exorings.read_ring_fits(fitsin_disk)
else:
    # run minimizer to find best guess values
    print 'No disk gradient parameters read in - refitting new ones....'
コード例 #3
0
        0]
    sys.exit(2)

for opt, arg in opts:
    if opt == '-h':
        print help
        sys.exit()
    elif opt in ("-r", "--rfile"):
        fitsin = arg
    elif opt in ("-o", "--ofile"):
        plotout = arg
    elif opt in ("-s", "--vstar"):
        v = np.array(float(arg))

print 'Reading in ring and disk parameters from %s' % fitsin
(res, taun_rings, rad_rings, dstar) = exorings.read_ring_fits(fitsin)

exorings.print_ring_tau(rad_rings, exorings.y_to_tau(taun_rings))

# set up stellar disk
kern = exorings.make_star_limbd(21, 0.8)

# make the radius and projected gradient for the measured gradient points
(ring_disk_fit,
 grad_disk_fit) = exorings.ring_grad_line(grad_time, res[0], res[1], res[2],
                                          res[3])

# produce fine grained gradient and ring values
samp_t = np.arange(-100, 100, 0.001) + 54222.
(samp_r, samp_g) = exorings.ring_grad_line(samp_t, res[0], res[1], res[2],
                                           res[3])
コード例 #4
0
    print '%s -r <inputfile> -s <velocity in metres per second> -o <outputfile>' % sys.argv[0]
    sys.exit(2)

for opt, arg in opts:
    if opt == '-h':
        print help
        sys.exit()
    elif opt in ("-r", "--rfile"):
        fitsin = arg
    elif opt in ("-o", "--ofile"):
        plotout = arg
    elif opt in ("-s", "--vstar"):
        v = np.array(float(arg))

print 'Reading in ring and disk parameters from %s' % fitsin
(res, taun_rings, rad_rings, dstar) = exorings.read_ring_fits(fitsin)

exorings.print_ring_tau(rad_rings, exorings.y_to_tau(taun_rings))

# set up stellar disk
kern = exorings.make_star_limbd(21, 0.8)

# make the radius and projected gradient for the measured gradient points
(ring_disk_fit, grad_disk_fit) = exorings.ring_grad_line(grad_time, res[0], res[1], res[2], res[3])

# produce fine grained gradient and ring values
samp_t = np.arange(-100, 100, 0.001) + 54222.
(samp_r, samp_g) = exorings.ring_grad_line(samp_t, res[0], res[1], res[2], res[3])
hjd_minr = samp_t[np.argmin(samp_g)]

# times when there is no photometry
コード例 #5
0
if vstar > 0:
    v = vstar
    print 'manual velocity of star is %.1f km.s-1' % v

print 'Orbital velocity = %5.2f  km/s (use option -s to set new velocity)' % (
    v / 1.e3)

dstar = (Rstar * rsol * 2 / v) / 86400.

print 'Primary diameter = %5.2f  days' % dstar

if read_in_ring_parameters:
    print 'Reading in rings from %s' % fitsin_ring
    (resxx, taun_rings, rad_rings,
     xxxdstar) = exorings.read_ring_fits(fitsin_ring)
else:
    print "Starting with new rings...."
    rad_rings = np.array([59.0])
    taun_rings = np.array([0.0])
    rad_rings = np.append(rad_rings, (100.))
    taun_rings = np.append(taun_rings, (1000.))

exorings.print_ring_tau(rad_rings, exorings.y_to_tau(taun_rings))

if read_in_disk_parameters:
    print 'Reading in disk parameters from %s' % fitsin_disk
    (res, taun_ringsxx, rad_ringsxx,
     dstarxx) = exorings.read_ring_fits(fitsin_disk)
else:
    # run minimizer to find best guess values
コード例 #6
0
ファイル: plot_disk_fit.py プロジェクト: bsipocz/exorings
        help()
    elif opt in ("-d", "--dfile"):
        fitsin_disk = arg
        read_in_disk_parameters = True
    elif opt in ("-o", "--ofile"):
        plotfileout = arg

# get light curve gradients
grad = ascii.read("gradients.txt")
grad_time = grad['col1'] + 54222.
grad_mag = np.abs(grad['col2'])

# read in or create the ring system tau and radii

print 'Reading in disk parameters from %s' % fitsin_disk
(res, taun_ringsxx, rad_ringsxx, dstar) = exorings.read_ring_fits(fitsin_disk)

# make the radius and projected gradient for the measured gradient points
(ring_disk_fit, grad_disk_fit) = \
    exorings.make_ring_grad_line(grad_time, res[0], res[1], res[2], res[3])

# produce fine grained gradient and ring values
samp_t = np.arange(-100, 100, 0.001) + 54222.
(samp_r, samp_g) = exorings.make_ring_grad_line(samp_t, res[0], res[1], res[2], res[3])
hjd_minr = samp_t[np.argmin(samp_g)]

exorings.print_disk_parameters(res, hjd_minr, samp_r)

# plotting fit of gradients from ellipse curve to J1407 gradients

plt.rc('font', **{'family':'sans-serif', 'sans-serif':['Helvetica']})