def grand_plot_all(o, grand):
    """ Make all the plots for the encompassing suite """
    factory = PF(int(o.sim_number),
                 snapshot_base=o.snap_base,
                 count=o.num_format,
                 grand=grand)
    factory.plot_all()
Beispiel #2
0
def plot_all(o):
    """ Make all the plots """
    factory = PF(int(o.sim_number),
                 snapshot_base=o.snap_base,
                 count=o.num_format)

    # Process snapshots ---> Make Plots
    factory.plot_all()  # <<<---
def get_final_count(o):
    """ Quickly get final count for each simulation """
    factory = PF(int(o.sim_number),
                 snapshot_base=o.snap_base,
                 count=o.num_format,
                 iter_num=o.iter_i)

    return factory.get_final_count()
"""
add forgotten plots
"""

import numpy as np
from factory import PlotFactory as PF

for i in range(1134,1146):
    print i
    f = PF(i)
    f.mm_orb()


def plot_all(o):
  """ Make all the plots """
  factory = PF(int(o.sim_number), snapshot_base = o.snap_base, count = o.num_format)

  # Process snapshots ---> Make Plots
  factory.plot_all() # <<<--- 
    f.write("Inner Disk Radius: " + str(o.r_in) + "\n")
    f.write("Outer Disk Radius: " + str(o.r_out) + "\n")
    f.write("Number of Disk Particles: " + str(o.n_disk) + "\n")
    f.write("Disk Particle Power Law: " + str(o.power) + "\n")
    f.write("Orbit Pericenter: " + str(o.peri) + "\n")
    f.write("Orbit Eccentricity: " + str(o.ecc) + "\n")
    f.write("Orbit Inclination: " + str(o.incl) + "\n")
    f.write("Orbit Argument of Periapsis: " + str(o.omega) + "\n")
    f.write("Number of Steps: " + str(o.n_steps) + "\n")
    f.close()

    # Write 'o' dictionary into file (using Pickle)
    pickle_f = open(o.snap_dir + "/info.p", "wb")
    pickle.dump(o, pickle_f)
    pickle_f.close()

    r_step = o.r_in  ### set timestep based on period of innermost disk particles ###
    t_end = o.num_T * abs(time_peri)  # Current Target Period: 4.0 T
    #t_end = 1300.0 | units.yr

    integrate_disk_flyby(stars, planetesimals, t_end, time_peri, o.nb_end,
                         o.n_steps, r_step, o.snap_dir, o.fout, o.fredir,
                         o.br_dt, o.eta)

    factory = PF(int(o.sim_number),
                 snapshot_base=snap_base,
                 count=o.num_format)

    # Process snapshots ---> Make Plots
    factory.plot_all()  # <<<---
  f.write("Bridge Timestep: " + str(o.br_dt) + "\n")
  f.write("Huayno Timestep (eta): " + str(o.eta) + "\n")
  f.write("Inner Disk Radius: " + str(o.r_in) + "\n")
  f.write("Outer Disk Radius: " + str(o.r_out) + "\n")
  f.write("Number of Disk Particles: " + str(o.n_disk) + "\n")
  f.write("Disk Particle Power Law: " + str(o.power) + "\n")
  f.write("Orbit Pericenter: " + str(o.peri) + "\n")
  f.write("Orbit Eccentricity: " + str(o.ecc) + "\n")
  f.write("Orbit Inclination: " + str(o.incl) + "\n")
  f.write("Orbit Argument of Periapsis: " + str(o.omega) + "\n")
  f.write("Number of Steps: " + str(o.n_steps) + "\n")
  f.close()

  # Write 'o' dictionary into file (using Pickle)
  pickle_f = open(o.snap_dir + "/info.p", "wb")
  pickle.dump(o, pickle_f)
  pickle_f.close()

  r_step = o.r_in ### set timestep based on period of innermost disk particles ###
  t_end = o.num_T * abs(time_peri) # Current Target Period: 4.0 T
  #t_end = 1300.0 | units.yr
  
  integrate_disk_flyby(stars, planetesimals, t_end, time_peri, o.nb_end, o.n_steps,
                       r_step, o.snap_dir, o.fout, o.fredir, o.br_dt, o.eta)

  factory = PF(int(o.sim_number), snapshot_base = snap_base, count = o.num_format)

  # Process snapshots ---> Make Plots
  factory.plot_all() # <<<--- 
  
def grand_plot_all(o, grand):
  """ Make all the plots for the encompassing suite """
  factory = PF(int(o.sim_number), snapshot_base = o.snap_base, count = o.num_format, grand = grand)
  factory.plot_all()
def get_final_count(o):
  """ Quickly get final count for each simulation """
  factory = PF(int(o.sim_number), snapshot_base = o.snap_base, count = o.num_format,
               iter_num = o.iter_i)

  return factory.get_final_count()
Beispiel #10
0
"""
test program (calculations)
"""

from factory import PlotFactory as PF

x = 981
n = 5
"""
for i in range(x, x+n):
    f = PF(i, snapshot_base = "snap", count = 3)
    f.simple_mask()
    f.sort()
    f.count()
    f.mm_pos()
"""

for i in range(x, x + n):
    f = PF(i, snapshot_base="snap", count=3)
    f.hist()
Beispiel #11
0
"""
add forgotten plots
"""

import numpy as np
from factory import PlotFactory as PF

for i in range(1134, 1146):
    print i
    f = PF(i)
    f.mm_orb()
Beispiel #12
0
"""
test program (calculations)
"""


from factory import PlotFactory as PF

x = 981
n = 5

"""
for i in range(x, x+n):
    f = PF(i, snapshot_base = "snap", count = 3)
    f.simple_mask()
    f.sort()
    f.count()
    f.mm_pos()
"""

for i in range(x, x+n):
    f = PF(i, snapshot_base = "snap", count = 3)
    f.hist()