Beispiel #1
0
def powerspec():
    # Extract the snapshot filename
    snapshot_filename = special_params['snapshot_filename']
    # Read in the snapshot
    snapshot = load_into_standard(snapshot_filename, compare_params=False)
    # Output file
    output_dir, basename = os.path.split(snapshot_filename)
    output_filename = '{}/{}{}{}'.format(output_dir,
                                         output_bases['powerspec'],
                                         '_' if output_bases['powerspec'] else '',
                                         basename)
    # Produce powerspectrum of the snapshot
    analysis.powerspec(snapshot.particles,
                       output_filename)
Beispiel #2
0
def render():
    # Extract the snapshot filename
    snapshot_filename = special_params['snapshot_filename']
    # Read in the snapshot
    snapshot = load_into_standard(snapshot_filename, compare_params=False)
    # Output file
    output_dir, basename = os.path.split(snapshot_filename)
    output_filename = '{}/{}{}{}'.format(output_dir,
                                         output_bases['render'],
                                         '_' if output_bases['render'] else '',
                                         basename)
    # Render the snapshot
    graphics.render(snapshot.particles,
                    snapshot.params['a'],
                    output_filename)